- SettingsView: complete UI with tabs for Accounts, Categories, Rules, Templates, Signatures, General, Appearance - Categories: QTreeWidget with hierarchical view, color picker, parent categories - Rules: QListWidget with RuleEditorDialog integration, toggle enabled - Templates: QListWidget with TemplateEditorDialog integration - Signatures: QListWidget with SignatureEditorDialog integration - SignatureDao: full CRUD with default signature support - common_structs.h: QColor for Category, all structs centralized - icons.qrc: updated with Linear/Outline/Bold icons from resources - Category: QColor instead of QString for color - EmailTreeModel/DateGroupProxyModel: email grouping by date - MailListView: QTreeView with date grouping combo - ReaderView: subject frame with shadow, avatar in header, body inside header - MainWindow: frameless with rounded corners, 1px border, edge resize, no status bar - icons.qrc: complete icon set from resources/icons/SVG
23 lines
687 B
C++
23 lines
687 B
C++
#pragma once
|
|
|
|
#include "../databasemanager.h"
|
|
#include <QVector>
|
|
#include <optional>
|
|
#include <QJsonDocument>
|
|
#include <QJsonObject>
|
|
#include <QJsonArray>
|
|
#include "common_structs.h"
|
|
|
|
class TemplateDao
|
|
{
|
|
public:
|
|
static bool insert(Template& tmpl);
|
|
static bool update(const Template& tmpl);
|
|
static bool remove(qint64 id);
|
|
static std::optional<Template> findById(qint64 id);
|
|
static QVector<Template> findByAccount(qint64 accountId); // accountId = -1 for global
|
|
static QVector<Template> findGlobal();
|
|
static QVector<Template> findAll();
|
|
static std::optional<Template> findDefault(qint64 accountId);
|
|
static bool setDefault(qint64 id, bool isDefault);
|
|
}; |