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:
2026-08-28 02:27:46 +02:00
parent 516a658b91
commit 15e06d64d4
853 changed files with 1523 additions and 611610 deletions
+18
View File
@@ -9,6 +9,10 @@
#include "ui/rulesmanagerdialog.h"
#include "ui/accountsetupdialog.h"
#include "ui/delegates/FolderTreeDelegate.h"
#include "services/preferencesservice.h"
#include "services/startupbehaviorservice.h"
#include "services/translationservice.h"
#include "services/aiactionoptionsservice.h"
#include <optional>
#include <QMessageBox>
#include <QFileDialog>
@@ -333,11 +337,25 @@ void MainMainWindow::connectModels()
qDebug() << "[MainMainWindow::connectModels] Start";
m_accountService = new AccountService(this);
qDebug() << "[MainMainWindow::connectModels] AccountService created";
// Initialize preferences and related services
m_preferencesService = new PreferencesService(this);
m_startupBehaviorService = new StartupBehaviorService(this);
m_translationService = new TranslationService(this);
m_aiActionOptionsService = new AiActionOptionsService(this);
m_mailService = new MailService(m_accountService, this);
qDebug() << "[MainMainWindow::connectModels] MailService created";
m_composeView->setAccountService(m_accountService);
m_embeddedComposeView->setAccountService(m_accountService);
// Pass services to settings view
m_settingsView->setAccountService(m_accountService);
m_settingsView->setPreferencesService(m_preferencesService);
m_settingsView->setStartupBehaviorService(m_startupBehaviorService);
m_settingsView->setTranslationService(m_translationService);
m_settingsView->setAiActionOptionsService(m_aiActionOptionsService);
m_folderModel = new FolderListModel(m_accountService, this);
qDebug() << "[MainMainWindow::connectModels] FolderListModel created";
m_emailModel = new EmailListModel(this);