Index: help/html/iqnotes.html =================================================================== RCS file: /usr/local/cvsroot/external/iqnotes/help/html/iqnotes.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- help/html/iqnotes.html 22 Feb 2003 17:11:03 -0000 1.1 +++ help/html/iqnotes.html 22 Feb 2003 23:10:40 -0000 1.2 @@ -59,7 +59,13 @@ make changes to the entry to make it the same, make the changes, save and close that data file, open it again, delete the note you wish to move, open destination data file and add the last deleted note. Pretty confusing, isn't - it? ':) + it? ':)
+ Create an empty text note checkbox sets whether you will be prompted + for the note type and contents, or whether a simple empty text note will + be created. The default can be set in the Preferences dialog. This + is useful if you often create a lot of simple entries which can be + completely described in their name string. +
Add after
Add a new note after the selected note. See Add before for more info.
@@ -167,6 +173,11 @@ Select if the root node should have a plus sign (+), if it has children.
Word wrap
If word wrap is set, than text the widget is set to word wrap notes.
+Default to empty notes
+ This sets the default for the Create an empty text note option in the + dialog for creating a new note. If you use the 'create empty note' feature + a lot you will probably want to set this, to minimise the number of actions + required to add a simple new note. Backup
This option, if set, automatically saves a backup file in a chosen location after IQNotes is closed. The location must be a directory, for example '/mnt/cf/backup/iqnotes'. Index: iqnotes/app.cpp =================================================================== RCS file: /usr/local/cvsroot/external/iqnotes/iqnotes/app.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- iqnotes/app.cpp 22 Feb 2003 18:42:16 -0000 1.2 +++ iqnotes/app.cpp 22 Feb 2003 23:10:45 -0000 1.3 @@ -322,6 +322,7 @@ notes->setWordWrap(config.wordWrap); notes->setRootNodeDecoration(config.rootNodeDecoration); notes->setShowScrollBars(config.showScrollBars); + notes->setDefaultWriteEmpty(config.defaultWriteEmpty); isEmptyNoteTree(); halfView(); @@ -1368,6 +1369,7 @@ pb.WordWrap->setChecked(config.wordWrap); pb.RootNodeDecoration->setChecked(config.rootNodeDecoration); pb.ShowScrollBars->setChecked(config.showScrollBars); + pb.DefaultWriteEmpty->setChecked(config.defaultWriteEmpty); pb.SaveBackup->setChecked(preferences.saveBackupFile); pb.BackupLocation->setText(preferences.backupLocation); @@ -1399,12 +1401,14 @@ config.wordWrap = pb.WordWrap->isChecked(); config.rootNodeDecoration = pb.RootNodeDecoration->isChecked(); config.showScrollBars = pb.ShowScrollBars->isChecked(); + config.defaultWriteEmpty = pb.DefaultWriteEmpty->isChecked(); preferences.saveBackupFile = pb.SaveBackup->isChecked(); preferences.backupLocation = pb.BackupLocation->text(); notes->setWordWrap(config.wordWrap); notes->setRootNodeDecoration(config.rootNodeDecoration); notes->setShowScrollBars(config.showScrollBars); + notes->setDefaultWriteEmpty(config.defaultWriteEmpty); saveConfig(); Index: iqnotes/noteNameBase.ui =================================================================== RCS file: /usr/local/cvsroot/external/iqnotes/iqnotes/noteNameBase.ui,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- iqnotes/noteNameBase.ui 22 Feb 2003 17:11:03 -0000 1.1 +++ iqnotes/noteNameBase.ui 22 Feb 2003 22:10:32 -0000 1.2 @@ -75,7 +75,23 @@ toolTip - Usefull for moving the note. + Useful for moving the note. + what? + + + + QCheckBox + + name + WriteEmpty + + + text + Create an empty text note + + + toolTip + Don't prompt for note type and contents, just create a text note with nothing in it. what? Index: iqnotes/notes.cpp =================================================================== RCS file: /usr/local/cvsroot/external/iqnotes/iqnotes/notes.cpp,v retrieving revision 1.2 retrieving revision 1.4 diff -u -r1.2 -r1.4 --- iqnotes/notes.cpp 22 Feb 2003 18:42:16 -0000 1.2 +++ iqnotes/notes.cpp 22 Feb 2003 23:10:45 -0000 1.4 @@ -889,6 +889,7 @@ lastDeletedItem = 0; addLastDeleted = false; + writeEmpty = false; } Notes::~Notes() @@ -1336,6 +1337,11 @@ notesTree->setRootIsDecorated(rootDecoration); } +void Notes::setDefaultWriteEmpty(bool dwe) +{ + defaultWriteEmpty = dwe; +} + void Notes::setShowScrollBars(bool scrollBars) { showScrollBars = scrollBars; QListView *currentTree = getCurrentTree(); @@ -1914,7 +1920,32 @@ refreshItems(); } -bool Notes::writeNote(NotesViewItem *nvi) +bool Notes::writeNote(NotesViewItem *nvi, bool writeEmpty) +{ + /* Write a new note: + * If writeEmpty, write a simple empty text note, otherwise prompt + * for note type and contents. + */ + if (writeEmpty) + return writeEmptyTextNote(nvi); + else + return writeNoteWithContent(nvi); +} + + +bool Notes::writeEmptyTextNote(NotesViewItem *nvi) +{ + // Like writeNote, but don't display the 'choose a note + // type' dialog -- just assume a text note with no contents. + nvi->setTextData(""); + // Make new item current + notesTree->ensureItemVisible(nvi); + notesTree->setCurrentItem(nvi); + + return true; +} + +bool Notes::writeNoteWithContent(NotesViewItem *nvi) { NoteType nt(this, 0, true); Entry *entry; @@ -2415,7 +2446,7 @@ } if (!addLastDeleted) - if (!writeNote(newItem)) + if (!writeNote(newItem, writeEmpty)) { delete newItem; return false; @@ -2486,7 +2517,7 @@ } if (!addLastDeleted) - if (!writeNote(newItem)) + if (!writeNote(newItem, writeEmpty)) { delete newItem; return false; @@ -2529,7 +2560,7 @@ } if (!addLastDeleted) - if (!writeNote(newItem)) + if (!writeNote(newItem, writeEmpty)) { delete newItem; return false; @@ -2569,7 +2600,7 @@ } if (!addLastDeleted) - if (!writeNote(newItem)) + if (!writeNote(newItem, writeEmpty)) { delete newItem; return false; @@ -2603,6 +2634,8 @@ if (!lastDeletedItem) nm->AddLastDeleted->setEnabled(false); + nm->WriteEmpty->setChecked(defaultWriteEmpty); + if (!nm->exec()) rv = ""; else @@ -2613,6 +2646,7 @@ } addLastDeleted = nm->AddLastDeleted->isChecked(); + writeEmpty = nm->WriteEmpty->isChecked(); delete nm; return rv; Index: iqnotes/notes.h =================================================================== RCS file: /usr/local/cvsroot/external/iqnotes/iqnotes/notes.h,v retrieving revision 1.1 retrieving revision 1.3 diff -u -r1.1 -r1.3 --- iqnotes/notes.h 22 Feb 2003 17:11:03 -0000 1.1 +++ iqnotes/notes.h 22 Feb 2003 23:10:45 -0000 1.3 @@ -613,7 +613,7 @@ void sort(); - bool writeNote(NotesViewItem *nvi); + bool writeNote(NotesViewItem *nvi, bool writeEmpty); bool editNote(); void halfView(); @@ -645,6 +645,9 @@ void paintEvent(QPaintEvent *pe); private: + bool writeEmptyTextNote(NotesViewItem *nvi); + bool writeNoteWithContent(NotesViewItem *nvi); + void taskList(NotesViewItem *startItem = 0); void taskListRecur(NotesViewItem *startItem = 0); void eventList(NotesViewItem *startItem = 0); @@ -668,6 +671,7 @@ void setWordWrap(bool); void setRootNodeDecoration(bool); void setShowScrollBars(bool); + void setDefaultWriteEmpty(bool); void destroyNotes(); void createNotes(); @@ -704,6 +708,9 @@ bool wordWrap, showScrollBars; bool addLastDeleted; + bool writeEmpty; + bool defaultWriteEmpty; + QListViewItem *lastDeletedItem; unsigned int noteDataLastID; Index: iqnotes/notesConfig.h =================================================================== RCS file: /usr/local/cvsroot/external/iqnotes/iqnotes/notesConfig.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- iqnotes/notesConfig.h 22 Feb 2003 17:11:03 -0000 1.1 +++ iqnotes/notesConfig.h 22 Feb 2003 23:10:45 -0000 1.2 @@ -25,6 +25,7 @@ wordWrap = true; showScrollBars = true; rootNodeDecoration = false; + defaultWriteEmpty = false; } NotesConfig &operator=(const NotesConfig &nc) @@ -32,11 +33,11 @@ wordWrap = nc.wordWrap; showScrollBars = nc.showScrollBars; rootNodeDecoration = nc.rootNodeDecoration; - + defaultWriteEmpty = nc.defaultWriteEmpty; return *this; } - bool wordWrap, showScrollBars, rootNodeDecoration; + bool wordWrap, showScrollBars, rootNodeDecoration, defaultWriteEmpty; }; Index: iqnotes/preferencesBase.ui =================================================================== RCS file: /usr/local/cvsroot/external/iqnotes/iqnotes/preferencesBase.ui,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- iqnotes/preferencesBase.ui 22 Feb 2003 17:11:03 -0000 1.1 +++ iqnotes/preferencesBase.ui 22 Feb 2003 23:10:45 -0000 1.2 @@ -156,6 +156,26 @@ Root node decoration + + QCheckBox + + name + DefaultWriteEmpty + + + geometry + + 10 + 110 + 140 + 20 + + + + text + Default to empty notes + + QWidget