#include <DiaryEntryCreator.h>
Static Public Member Functions | |
| static void | SaveDate (MyQTextBrowser *editor, const QDir &entryLocationBaseDir) |
| static int | LoadDate (MyQTextBrowser *editor, const QDate &date, const QDir &entryLocationBaseDir) |
| static QString | HandleFileInsertion (const QString &absoluteFilepathAndName, const QDir &entryLocationBaseDir, EmbeddedTextObjectCopyingCallbackAPI *progressBarParent=NULL) |
| static int | GetNextAvailableFileNo (const QDir &targetFolder) |
| Get next available number that can be used as a filename in specified directory. | |
| static int | GetNextAvailableFileNo () |
| Get next available number that can be used as a filename in [Diary entry storage folder]/[currenlty open date] directory. | |
| static QString | GetNextAvailableFilename () |
| Get next available name for file in [Diary entry storage folder]/[currenlty open date] with complete path. | |
Static Private Member Functions | |
| static void | CleanEntryFolder (MyQTextBrowser *editor, const QDir &entryLocationBaseDir) |
Static Private Attributes | |
| static QDate | iLastEditedDate = QDate(0,0,0) |
| Stores the date that was last loaded by DiaryEntryCreator::LoadDate(const QDate &date, const QDir &entryLocationBaseDir). | |
Handle changing the day:
| QString DiaryEntryCreator::GetNextAvailableFilename | ( | ) | [static] |
Get next available name for file in [Diary entry storage folder]/[currenlty open date] with complete path.
Uses GetNextAvailableFileNo() to get next available number that can be used as a filename in [Diary entry storage folder]/[currenlty open date] directory and constructs a filename with full path from it. ( [Diary entry storage folder]/[currenlty open date]/[number returned by GetNextAvailableFileNo()] ).
| int DiaryEntryCreator::GetNextAvailableFileNo | ( | ) | [static] |
Get next available number that can be used as a filename in [Diary entry storage folder]/[currenlty open date] directory.
Same as GetNextAvailableFileNo(const QDir &targetFolder) but uses SettingsStorage::GetValue(targetFolder, DIARY_ENTRY_STORAGE_PATH) and iLastEditedDate to construct targetFolder pointing to directory for storing files for currently open date. Determines the lowest possible number that can be used as a name for a file in directory. Will just start from 0 and check if directory allready contains a file named as "0" and increase the number till the first free number is found.
| int DiaryEntryCreator::GetNextAvailableFileNo | ( | const QDir & | targetFolder | ) | [static] |
Get next available number that can be used as a filename in specified directory.
| targetFolder | Directory where we want to add the file. |
QDate DiaryEntryCreator::iLastEditedDate = QDate(0,0,0) [static, private] |
Stores the date that was last loaded by DiaryEntryCreator::LoadDate(const QDate &date, const QDir &entryLocationBaseDir).
QDate iLastEditedDate [static]
1.5.9