vnote.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef VNOTE_H
  2. #define VNOTE_H
  3. #include <QString>
  4. #include <QVector>
  5. #include <QSettings>
  6. #include <QFont>
  7. #include "vnotebook.h"
  8. class VNote
  9. {
  10. public:
  11. VNote();
  12. void readGlobalConfig();
  13. void writeGlobalConfig();
  14. const QVector<VNotebook>& getNotebooks();
  15. int getCurNotebookIndex() const;
  16. void setCurNotebookIndex(int index);
  17. static void decorateTemplate();
  18. static const QString orgName;
  19. static const QString appName;
  20. static const QString welcomePagePath;
  21. static const QString templatePath;
  22. static QString templateHtml;
  23. private:
  24. // Write notebooks section of global config
  25. void writeGlobalConfigNotebooks(QSettings &settings);
  26. // Read notebooks section of global config
  27. void readGlobalConfigNotebooks(QSettings &settings);
  28. QVector<VNotebook> notebooks;
  29. int curNotebookIndex;
  30. static const QString preTemplatePath;
  31. static const QString postTemplatePath;
  32. static const QString defaultCssUrl;
  33. // For self CSS definition
  34. static QString cssUrl;
  35. };
  36. #endif // VNOTE_H