QOwnNotesQOwnNotes
البدء
التثبيت
  • Ask question
  • Ask for feature
  • Report bug
  • Telegram Channel
  • Matrix/Element.io Room
  • Gitter Chat
  • IRC Channel
  • Mastodon
  • Twitter
  • Facebook
تبرع
  • English
  • Deutsch
  • Italiano
  • Français
  • Español
  • فارسی
  • Nederlands
  • Magyar
  • العربية
  • Polski
  • 한국어
GitHub
البدء
التثبيت
  • Ask question
  • Ask for feature
  • Report bug
  • Telegram Channel
  • Matrix/Element.io Room
  • Gitter Chat
  • IRC Channel
  • Mastodon
  • Twitter
  • Facebook
تبرع
  • English
  • Deutsch
  • Italiano
  • Français
  • Español
  • فارسی
  • Nederlands
  • Magyar
  • العربية
  • Polski
  • 한국어
GitHub
  • البدء

    • نظرة عامة
    • المفاهيم
    • تجربة QOwnNotes
    • ماركداون (Markdown)
    • استيراد الملاحظات
    • مُعامِلات واجهة سطر الأوامر
    • إضافة المتصفح رفيقة ويب QOwnNotes
    • مدير قصاصات سطر الأوامر
    • تطبيق ويب QOwnNotes
    • QOwnNotesAPI Nextcloud App
    • Note relations panel
    • البحث عن الملاحظات
    • الاختصارات
    • إدارة الإصدارات عبر git
  • التثبيت

    • التثبيت
    • التثبيت على أوبنتو وإلمنتري ولينكس منت
    • التثبيت على ميكروسوفت ويندوز
    • التثبيت على ماك أو إس
    • التثبيت على دبيان
    • التثبيت على openSUSE Linux
    • التثبيت على فيدورا
    • التثبيت كحزمة Snap
    • التثبيت كحزمة Flatpak
    • التثبيت كـ AppImage
    • التثبيت عبر Nix
    • التثبيت على آرتش لينكس
    • التثبيت على Solus
    • التثبيت على KaOS Linux
    • التثبيت على CentOS Linux
    • التثبيت على Raspberry Pi OS
    • التثبيت على Gentoo Linux
    • التثبيت على Funtoo Linux
    • التثبيت على Void Linux
    • التثبيت على Slackware Linux
    • التثبيت على FreeBSD
    • بناء QOwnNotes
  • المحرر

    • التدقيق الإملائي
    • AI support
    • صيغ الوقت
  • البرمجة

    • برمجة QOwnNotes
    • الدوال والكائنات التي يوفرها QOwnNotes
    • الخطاطيف
    • الفصائل (الكلاسات) المكشوفة
  • المساهمة

    • شارك معنا
    • ميثاق السلوك
    • المطورون
    • الترجمة
    • تبرّع
    • الداعمون
  • الأسئلة الشائعة

    • كيف يمكنني إظهار لوحة المعاينة فقط بدون لوحة تحرير الملاحظات؟
    • أين يمكنني أن أجد ما يقوله الآخرون عن QOwnNotes؟
    • لماذا مقاييس؟
  • المدونة (بالإنجليزية)

    • Overview
    • QOwnNotes Webpage Relaunch with VuePress 2, Vue.js 3, and Vuetify 3
    • Universal binary for macOS
    • Note relations panel
    • AI support was added to QOwnNotes
    • Source Archive switched from TuxFamily to GitHub Releases
    • Nextcloud Deck integration in QOwnNotes
    • QOwnNotes UI End2End Tests with the help of NixOS
    • Please test Qt6 version of QOwnNotes from a new PPA for Ubuntu Linux
    • Evernote import for huge files
    • Happy 1000th release of QOwnNotes
    • Polish website translation
    • Working with multiple notes
    • QOwnNotes command-line snippet manager
    • Nextcloud note versions
    • Manage orphaned image files and attachments
    • Linking of note headings
    • Tor Hidden Service Webpage
    • Use workspaces to manage different layouts of the user interface
    • Auto-complete text in note editor
    • Open links in the note editor
    • Solve simple equations in the note editor
    • Auto-format Markdown tables
    • QOwnNotes Mastodon page
    • Repository for Debian 11
    • Joplin import
    • Send photos from your mobile phone to QOwnNotes on the desktop
    • Four new languages added to the website
    • QOwnNotes Demo
    • Markdown explanation
    • Webpage translation
    • QOwnNotes for Ubuntu 21.04 Hirsute Hippo
    • QOwnNotes for Fedora 33
    • Release and blog posting automation
    • Legacy update service up again
    • RSS Feeds are back in place
    • Time Flies Podcast episode with interview about QOwnNotes
    • Bookmark management with QOwnNotes and Web Companion browser extension
    • Firefox extension on Firefox Add-ons page
    • Chrome extension in Chrome Web Store
    • QOwnNotes Web Companion Chrome extension
    • 500th release of QOwnNotes
    • QOwnNotes Telegram Group
    • Vim mode
    • QOwnNotes for openSUSE Leap 15, SUSE Linux Enterprise 15 and SUSE Linux Enterprise 12 SP3
    • QOwnNotes featured on LINUX Unplugged podcast and by Ubuntu
    • Interview for ownCloud
    • QOwnNotes for Fedora 27
    • QOwnNotes reviewed in German magazine c't
    • QOwnNotesAPI in the ownCloud Marketplace
    • QOwnNotes as AppImage
    • QOwnNotes for Debian 9.0, Fedora 26 and openSUSE Leap 42.3
    • Script repository and script settings variables
    • Fedora 25 release and new documentation page
    • Solus package for QOwnNotes
    • Automatic updates in Windows and macOS
    • Note encryption with keybase.io or directly with PGP
    • Evernote import
    • Portable mode
    • QOwnNotes on webupd8.org
    • QOwnNotes featured on the Linux Voice Podcast
    • QOwnNotes snap
    • QOwnNotes review in British magazine Linux Format
    • QOwnNotes Slackware Linux Repository
    • QOwnNotes review
    • QOwnNotes IRC
    • QOwnNotes now has scripting support
    • QOwnNotes is the Desktop App Pick on the Linux Action Show
    • QOwnNotes got featured in Linux Voice 25
    • QOwnNotes Gentoo Linux Overlay
    • Translate QOwnNotes on Crowdin
    • QOwnNotes 1.0 out now in 6 languages and with Freedesktop theme icons support
    • QOwnNotes software repository for Debian Linux
    • QOwnNotes package on the Arch User Repository
    • QOwnNotes software repository for Arch Linux
    • Webpage redesign
    • Qt widget QMarkdownTextEdit now a separate project for developer's pleasure
    • New release version RSS feed
    • New Linux software repositories and todo list support
    • QOwnNotes on Linux Unplugged
    • Build and release systems for QOwnNotes for Linux, macOS and Windows!
    • Links to other notes or files are now possible in QOwnNotes
  • سجل التغييرات (بالإنجليزية)

    • QOwnNotes Changelog

الفصائل (الكلاسات) المكشوفة

Note (ملاحظة)

الخصائص والدوال

class NoteApi {
    Q_PROPERTY(int id)
    Q_PROPERTY(QString name)
    Q_PROPERTY(QString fileName)
    Q_PROPERTY(QString fullNoteFilePath)
    Q_PROPERTY(QString fullNoteFileDirPath)
    Q_PROPERTY(QString relativeNoteFileDirPath)
    Q_PROPERTY(int noteSubFolderId)
    Q_PROPERTY(QString noteText)
    Q_PROPERTY(QString decryptedNoteText)
    Q_PROPERTY(bool hasDirtyData)
    Q_PROPERTY(QQmlListProperty<TagApi> tags)
    Q_PROPERTY(QDateTime fileCreated)
    Q_PROPERTY(QDateTime fileLastModified)
    Q_INVOKABLE QStringList tagNames()
    Q_INVOKABLE bool addTag(QString tagName)
    Q_INVOKABLE bool removeTag(QString tagName)
    Q_INVOKABLE bool renameNoteFile(QString newName)
    Q_INVOKABLE QString toMarkdownHtml(bool forExport = true)
    Q_INVOKABLE QString getFileURLFromFileName(QString localFileName)
    Q_INVOKABLE bool allowDifferentFileName()
    // Returns the Markdown note url for linking to the note with noteId
    Q_INVOKABLE QString getNoteUrlForLinkingToNoteId(int noteId)
};

يمكنك استخدام دوال Date للتعامل مع fileCreated أو fileLastModified.

مثال

script.log(note.fileCreated.toISOString());
script.log(note.fileLastModified.getFullYear());

// يغيّر اسم ملف الملاحظة إلى "new name.md"
note.renameNoteFile("new name");

// يتحقق إذا كان مسموحا بجعل اسم ملف الملاحظة مختلفًا عن عنوانها
script.log(note.allowDifferentFileName());

NoteSubFolder (مجلد فرعي لملاحظة)

الخصائص والدوال

class NoteSubFolderApi {
    Q_PROPERTY(int id)
    Q_PROPERTY(QString name)
    Q_PROPERTY(QQmlListProperty<NoteApi> notes)
    Q_INVOKABLE static NoteSubFolderApi *fetchNoteSubFolderById(int id);
    Q_INVOKABLE static NoteSubFolderApi *activeNoteSubFolder();
    Q_INVOKABLE static QList<QObject*> fetchNoteSubFoldersByParentId(int parentId);
    Q_INVOKABLE QString relativePath();
    Q_INVOKABLE QString fullPath();
};

مثال

var noteSubFolderQmlObj = Qt.createQmlObject(
  "import QOwnNotesTypes 1.0; NoteSubFolder{}",
  mainWindow,
  "noteSubFolder",
);

// print all subfolder names
noteSubFolderQmlObj
  .fetchNoteSubFoldersByParentId(parentId)
  .forEach(function (nsf) {
    script.log(nsf.name);
  });

// get the active note subfolder
var noteSubFolder = noteSubFolderQmlObj.activeNoteSubFolder();

// print the full and relative path of the active note subfolder
script.log(noteSubFolder.fullPath());
script.log(noteSubFolder.relativePath());

script.log(noteSubFolder.id);
script.log(noteSubFolder.name);

// iterate through notes in note subfolder
for (var idx in noteSubFolder.notes) {
  var note = noteSubFolder.notes[idx];
}

Tag (وسم)

الخصائص والدوال

class TagApi {
    Q_PROPERTY(int id)
    Q_PROPERTY(QString name)
    Q_PROPERTY(int parentId)
    Q_PROPERTY(QQmlListProperty<NoteApi> notes)
    Q_INVOKABLE TagApi fetchByName(const QString &name, int parentId = 0)
    Q_INVOKABLE QStringList getParentTagNames()
};

مثال

// لا تنس أن تبدأ بُريمجك بالعبارة "import QOwnNotesTypes 1.0"!

// Fetch tag "home"
var tag = script.getTagByNameBreadcrumbList(["home"]);
// Fetch all notes tagged with the tag
var notes = tag.notes;

// Iterate through notes of the tag
for (var idx in notes) {
  var note = notes[idx];
  script.log(note.name);
}

يمكنك أن تجد أمثلة أكثر على استخدام TagApi في note-tagging-by-object.qml.

MainWindow (النافذة الرئيسية)

الخصائص والدوال

class MainWindow {
    Q_INVOKABLE void reloadTagTree();
    Q_INVOKABLE void reloadNoteSubFolderTree();
    Q_INVOKABLE void buildNotesIndexAndLoadNoteDirectoryList(
            bool forceBuild = false, bool forceLoad = false);
    Q_INVOKABLE void focusNoteTextEdit();
    // تنشئ مجلد ملاحظة فرعي جديد في المجلد الفرعي الحالي
    Q_INVOKABLE bool createNewNoteSubFolder(QString folderName = "");
    // تضيف هتمل إلى الملاحظة الحالية بصيغة ماركداون
    // وتنزّل أيضا الصور البعيدة وتحوّل روابط البيانات
    // ("data:image")
    // إلى صور محلية مخزنة في مجلد الوسائط
    Q_INVOKABLE void insertHtmlAsMarkdownIntoCurrentNote(QString html);
    // تعيد تحميل الملاحظة الحالية، بدلالة معرّفها
    // تفيد هذه الدالة عندما يتغير مسار الملاحظة الحالية أو اسم ملفها
    Q_INVOKABLE void reloadCurrentNoteByNoteId();
    // ترجع قائمة بالمعرّفات العالمية الفريدة لمساحات العمل (UUIDs)
    Q_INVOKABLE QStringList getWorkspaceUuidList();
    // ترجع المعرّف العالمي الفريد لمساحة عمل، بدلالة اسمها
    Q_INVOKABLE QString getWorkspaceUuid(const QString &workspaceName);
    // تضبط مساحة العمل الحالية، بدلالة معرّفها العالمي الفريد
    Q_INVOKABLE void setCurrentWorkspace(const QString &uuid);
    // تغلق تبويب ملاحظة، بدلالة دليله، وعند النجاح ترجع القيمة المنطقية الصادقة (true)
    Q_INVOKABLE bool removeNoteTab(int index);
    // ترجع قائمة بمعرِّفات الملاحظات المفتوحة في تبويبات
    Q_INVOKABLE QList<int> getNoteTabNoteIdList();
    // تنتقل إلى وسم في شجرة الوسوم
    Q_INVOKABLE bool jumpToTag(int tagId);
};

مثال

// Force a reload of the note list
mainWindow.buildNotesIndexAndLoadNoteDirectoryList(true, true);

// Creates a new note subfolder "My fancy folder" in the current subfolder
mainWindow.createNewNoteSubFolder("My fancy folder");

// Inserts html in the current note as markdown
mainWindow.insertHtmlAsMarkdownIntoCurrentNote("<h2>my headline</h2>some text");

// Set 'Edit' workspace as current workspace
mainWindow.setCurrentWorkspace(mainWindow.getWorkspaceUuid("Edit"));

// Jump to the tag "test" in the tag tree
// There is an example in https://github.com/pbek/QOwnNotes/blob/main/docs/scripting/examples/custom-actions.qml
var tag = script.getTagByNameBreadcrumbList(["test"]);
mainWindow.jumpToTag(tag.id);

// Get all notes that are opened in tabs
var noteIds = mainWindow.getNoteTabNoteIdList();
noteIds.forEach(function (noteId) {
  var note = script.fetchNoteById(noteId);

  // do something with the note
});
Prev
الخطاطيف