vnote/vnote.h
Le Tan d8c5114c1b read/write the info about notebooks
Use QSettings to store notebooks info in INI format.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-02 13:38:05 +08:00

32 lines
705 B
C++

#ifndef VNOTE_H
#define VNOTE_H
#include <QString>
#include <QVector>
#include <QSettings>
#include "vnotebook.h"
class VNote
{
public:
VNote();
void readGlobalConfig();
void writeGlobalConfig();
const QVector<VNotebook>& getNotebooks();
int getCurNotebookIndex() const;
void setCurNotebookIndex(int index);
private:
// Write notebooks section of global config
void writeGlobalConfigNotebooks(QSettings &settings);
// Read notebooks section of global config
void readGlobalConfigNotebooks(QSettings &settings);
QVector<VNotebook> notebooks;
int curNotebookIndex;
static const QString orgName;
static const QString appName;
};
#endif // VNOTE_H