feat: Complete Preferences system implementation
- PreferencesService: QSettings-based persistence for all app settings - StartupBehaviorService: Windows registry auto-start management with policy detection - TranslationService: Language management with QTranslator, 9 built-in languages - AiActionOptionsService: 30+ AI translation language options - SettingsView: New 'Preferences' tab with full UI: * Search Mode (Local/Online) * Default App Mode (Mail/Calendar/Contacts/Settings) * Language selector (9 built-in + .qm files) * Email Sync Interval (1-1440 minutes) * Startup Behavior (auto-start, minimize to tray, notifications) * AI Translation (default language, summarize language, summary save path) - MainMainWindow: Service wiring (PreferencesService, StartupBehaviorService, TranslationService, AiActionOptionsService) - CMake: Added all new service files All services integrated and wired to SettingsView.
This commit is contained in:
@@ -17,6 +17,10 @@
|
||||
#include <QDialog>
|
||||
#include <QColorDialog>
|
||||
#include "services/accountservice.h"
|
||||
#include "services/preferencesservice.h"
|
||||
#include "services/startupbehaviorservice.h"
|
||||
#include "services/translationservice.h"
|
||||
#include "services/aiactionoptionsservice.h"
|
||||
#include "db/dao/common_structs.h"
|
||||
|
||||
class SettingsView : public QWidget {
|
||||
@@ -27,6 +31,10 @@ public:
|
||||
~SettingsView() override = default;
|
||||
|
||||
void setAccountService(AccountService *service);
|
||||
void setPreferencesService(PreferencesService *service);
|
||||
void setStartupBehaviorService(StartupBehaviorService *service);
|
||||
void setTranslationService(TranslationService *service);
|
||||
void setAiActionOptionsService(AiActionOptionsService *service);
|
||||
|
||||
signals:
|
||||
void accountAddRequested();
|
||||
@@ -92,6 +100,7 @@ private:
|
||||
QWidget* createAccountsTab();
|
||||
QWidget* createGeneralTab();
|
||||
QWidget* createAppearanceTab();
|
||||
QWidget* createPreferencesTab(); // New: Preferences tab
|
||||
QWidget* createCategoriesTab();
|
||||
QWidget* createRulesTab();
|
||||
QWidget* createTemplatesTab();
|
||||
@@ -149,4 +158,26 @@ private:
|
||||
QPushButton *m_signatureAddBtn;
|
||||
QPushButton *m_signatureEditBtn;
|
||||
QPushButton *m_signatureDeleteBtn;
|
||||
|
||||
// Services
|
||||
AccountService *m_accountService = nullptr;
|
||||
PreferencesService *m_preferencesService = nullptr;
|
||||
StartupBehaviorService *m_startupBehaviorService = nullptr;
|
||||
TranslationService *m_translationService = nullptr;
|
||||
AiActionOptionsService *m_aiActionOptionsService = nullptr;
|
||||
|
||||
// Preferences tab controls
|
||||
QComboBox *m_searchModeCombo = nullptr;
|
||||
QComboBox *m_defaultAppModeCombo = nullptr;
|
||||
QComboBox *m_languageCombo = nullptr;
|
||||
QSpinBox *m_syncIntervalSpin = nullptr;
|
||||
QCheckBox *m_startOnLoginCheck = nullptr;
|
||||
QCheckBox *m_minimizeToTrayCheck = nullptr;
|
||||
QCheckBox *m_enableNotificationsCheck = nullptr;
|
||||
QComboBox *m_translateLanguageCombo = nullptr;
|
||||
QComboBox *m_summarizeLanguageCombo = nullptr;
|
||||
QLineEdit *m_summarySavePathEdit = nullptr;
|
||||
QPushButton *m_summarySavePathBtn = nullptr;
|
||||
|
||||
int m_selectedAccountId = -1;
|
||||
};
|
||||
Reference in New Issue
Block a user