diff options
author | Ken Moore <ken@pcbsd.org> | 2015-01-20 16:22:03 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-01-20 16:22:03 -0500 |
commit | 0b7f30930be1318030b9749f352a8dec3b9c6f39 (patch) | |
tree | c0daffd4a133b241d81d2fe7e5a2c47d4b8560d8 /lumina-desktop/desktop-plugins/notepad/NotepadPlugin.h | |
parent | Fix the detection of file extensions within lumina-open for files that have m... (diff) | |
download | lumina-0b7f30930be1318030b9749f352a8dec3b9c6f39.tar.gz lumina-0b7f30930be1318030b9749f352a8dec3b9c6f39.tar.bz2 lumina-0b7f30930be1318030b9749f352a8dec3b9c6f39.zip |
Completely revamp the notepad desktop plugin so that it is now file-based instead of saving everything into the plugin settings directly. This allows it to manage generic text files as well as just the *.note files in ~/Notes.
Diffstat (limited to 'lumina-desktop/desktop-plugins/notepad/NotepadPlugin.h')
-rw-r--r-- | lumina-desktop/desktop-plugins/notepad/NotepadPlugin.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.h b/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.h index 0a4311ed..a1d9bf8f 100644 --- a/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.h +++ b/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.h @@ -11,9 +11,10 @@ #include <QPlainTextEdit> #include <QToolButton> -#include <QLabel> +#include <QComboBox> #include <QVBoxLayout> #include <QTimer> +#include <QFileSystemWatcher> #include "../LDPlugin.h" class NotePadPlugin : public LDPlugin{ @@ -24,25 +25,28 @@ public: private: QPlainTextEdit *edit; - QToolButton *next, *prev, *add, *rem; - QLabel *label; + QToolButton *open, *add, *rem; + QComboBox *cnote; QFrame *frame; - int cnote, maxnote; //current/max note - + QFileSystemWatcher *watcher; + bool updating; + QTimer *typeTimer; + private slots: - void nextNote(); - void prevNote(); + void openNote(); void newNote(); void remNote(); + void newTextAvailable(); void updateContents(); + void notesDirChanged(); void noteChanged(); void loadIcons(); public slots: void LocaleChange(){ - QTimer::singleShot(0,this, SLOT(updateContents())); + QTimer::singleShot(0,this, SLOT(noteChanged())); } void ThemeChange(){ QTimer::singleShot(0,this, SLOT(loadIcons())); |