Engauge Digitizer  2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MainDirectoryPersist.h
Go to the documentation of this file.
1 /******************************************************************************************************
2  * (C) 2018 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #ifndef MAIN_DIRECTORY_PERSIST_H
8 #define MAIN_DIRECTORY_PERSIST_H
9 
10 #include <QDir>
11 #include <QString>
12 
18 {
19 public:
22 
24  QDir getDirectoryExportSave () const;
25 
27  QDir getDirectoryImportOpen () const;
28 
30  void setDirectoryExportSaveFromFilename (const QString &fileName);
31 
34  void setDirectoryExportSaveFromSavedPath (const QString &path);
35 
37  void setDirectoryImportOpenFromFilename (const QString &fileName);
38 
41  void setDirectoryImportLoadFromSavedPath (const QString &path);
42 
43 private:
44 
45  // The directories are static so all instances of this class share the same values
46  static bool m_setExportSave;
47  static bool m_setImportOpen;
48  static QDir m_directoryExportSave;
49  static QDir m_directoryImportOpen;
50 
51 };
52 
53 #endif // MAIN_DIRECTORY_PERSIST_H
QDir getDirectoryImportOpen() const
Get the current Import/Open directory.
MainDirectoryPersist()
Default constructor.
void setDirectoryExportSaveFromFilename(const QString &fileName)
Save the current Export/Save directory, after user has accepted the Export/Save dialog.
void setDirectoryImportOpenFromFilename(const QString &fileName)
Save the current Import/Open directory, after user has accepted the Import/Open dialog.
void setDirectoryImportLoadFromSavedPath(const QString &path)
Set the current Import/Open directory at startup to path from previous execution. ...
QDir getDirectoryExportSave() const
Get the current Export/Save directory.
void setDirectoryExportSaveFromSavedPath(const QString &path)
Set the current Export/Save directory at startup to path from previous execution. ...
Persist the directory between successive Import/Open operations, or successive Export/Save operations...