feat: complete settings view + signatures + signatures DAO + icons
- 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
This commit is contained in:
@@ -6,35 +6,7 @@
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
|
||||
struct TemplateVariable
|
||||
{
|
||||
QString name;
|
||||
QString label;
|
||||
QString defaultValue;
|
||||
QString type; // "text", "email", "date", "select", "textarea"
|
||||
QStringList options; // for select type
|
||||
};
|
||||
|
||||
struct Template
|
||||
{
|
||||
qint64 id{-1};
|
||||
qint64 accountId{-1}; // -1 = global
|
||||
QString name;
|
||||
QString subject;
|
||||
QString bodyHtml;
|
||||
QString bodyText;
|
||||
QVector<TemplateVariable> variables;
|
||||
bool isDefault{false};
|
||||
QDateTime createdAt;
|
||||
QDateTime updatedAt;
|
||||
|
||||
bool isGlobal() const { return accountId < 0; }
|
||||
bool isValid() const { return id >= 0 && !name.isEmpty(); }
|
||||
|
||||
QJsonObject toJson() const;
|
||||
static Template fromJson(const QJsonObject& obj);
|
||||
};
|
||||
#include "common_structs.h"
|
||||
|
||||
class TemplateDao
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user