mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 05:49:53 +08:00

Move config related stuff to VConfigManager. For a config value, VConfigManager will first try to look it up in the user-scoped vnote.ini config file, if it is empty, then try to look it up in the default vnote.ini. Signed-off-by: Le Tan <tamlokveer@gmail.com>
28 lines
535 B
C++
28 lines
535 B
C++
#include <QSettings>
|
|
#include <QDebug>
|
|
#include "vnote.h"
|
|
#include "utils/vutils.h"
|
|
#include "vconfigmanager.h"
|
|
|
|
VConfigManager vconfig;
|
|
|
|
QString VNote::templateHtml;
|
|
|
|
VNote::VNote()
|
|
{
|
|
vconfig.initialize();
|
|
decorateTemplate();
|
|
notebooks = vconfig.getNotebooks();
|
|
}
|
|
|
|
void VNote::decorateTemplate()
|
|
{
|
|
templateHtml = VUtils::readFileFromDisk(vconfig.getTemplatePath());
|
|
templateHtml.replace("CSS_PLACE_HOLDER", vconfig.getTemplateCssUrl());
|
|
}
|
|
|
|
const QVector<VNotebook>& VNote::getNotebooks()
|
|
{
|
|
return notebooks;
|
|
}
|