#ifndef SETTINGS_H #define SETTINGS_H #include "../../connector/syncthingconnectionsettings.h" #include #include #include #include #include #include #include #include namespace Media { enum class TagUsage; enum class ElementPosition; } namespace Dialogs { class QtSettings; } namespace Settings { struct Connection { Data::SyncthingConnectionSettings primary; std::vector secondary; }; struct NotifyOn { bool disconnect = true; bool internalErrors = true; bool syncComplete = true; bool syncthingErrors = true; }; struct Appearance { bool showTraffic = true; QSize trayMenuSize = QSize(450, 400); int frameStyle = QFrame::StyledPanel | QFrame::Sunken; int tabPosition = QTabWidget::South; }; struct Launcher { bool enabled = false; QString syncthingPath = #ifdef PLATFORM_WINDOWS QStringLiteral("syncthing.exe"); #else QStringLiteral("syncthing"); #endif QString syncthingArgs; QString syncthingCmd() const; }; #if defined(SYNCTHINGTRAY_USE_WEBENGINE) || defined(SYNCTHINGTRAY_USE_WEBKIT) struct WebView { bool disabled = false; double zoomFactor = 1.0; QByteArray geometry; bool keepRunning = true; }; #endif struct Settings { bool firstLaunch = false; Connection connection; NotifyOn notifyOn; Appearance appearance; Launcher launcher; #if defined(SYNCTHINGTRAY_USE_WEBENGINE) || defined(SYNCTHINGTRAY_USE_WEBKIT) WebView webView; #endif Dialogs::QtSettings qt; }; Settings &values(); void restore(); void save(); } #endif // SETTINGS_H