From 474b9212a6630c8404d5f4cf7aa02428deddd3fd Mon Sep 17 00:00:00 2001 From: Keshav Bhatt Date: Wed, 30 Mar 2022 04:24:36 +0530 Subject: feat: v4.0 (#35) * add new widgets * feat: version 4.0 - SystemTray: tray icon uses png rather than svg - SystemTray: added settings to lets user change the systemtray icon click behavior(minimize/maximize on right click) - Download: added settiing that lets user set default download directory, avoid asking while saving files - Lock: added setting to let user change current set password for lock screen - Lock: current set password now hidden by default and can be revealed for 5 seconds by pressing view button - Style/Theme: added ability to change widget style on the fly, added default light palatte (prevent breaking of light theme on KDE EVs) - Theme: dark theme update - WebApp: added setting to set zoom factor when window is maximized and fullscreen (gives user ability to set different zoom factor for Normal , Maximized/Fullscreen WindowStates) - Setting: settings UI is more oraganized - WebApp: enable JavaScript execCommand("paste") - WebApp: tested for new WhatsApp Web that lets users use whatsie without requiring the phone connected to internet --- src/settingswidget.h | 166 ++++++++++++++++++++++++--------------------------- 1 file changed, 79 insertions(+), 87 deletions(-) (limited to 'src/settingswidget.h') diff --git a/src/settingswidget.h b/src/settingswidget.h index d7353ec..c9931a2 100644 --- a/src/settingswidget.h +++ b/src/settingswidget.h @@ -1,110 +1,102 @@ #ifndef SETTINGSWIDGET_H #define SETTINGSWIDGET_H -#include -#include -#include "utils.h" - #include "permissiondialog.h" +#include "utils.h" - +#include +#include namespace Ui { class SettingsWidget; } -class SettingsWidget : public QWidget -{ - Q_OBJECT +class SettingsWidget : public QWidget { + Q_OBJECT signals: - void updateWindowTheme(); - void updatePageTheme(); - void muteToggled(const bool checked); - void autoPlayMediaToggled(const bool checked); - void userAgentChanged(QString userAgentStr); - void init_lock(); - void dictChanged(QString dict); - void spellCheckChanged(bool checked); - void notificationPopupTimeOutChanged(); - void notify(QString message); - void zoomChanged(); + void updateWindowTheme(); + void updatePageTheme(); + void muteToggled(const bool checked); + void autoPlayMediaToggled(const bool checked); + void userAgentChanged(QString userAgentStr); + void init_lock(); + void change_lock_password(); + void dictChanged(QString dict); + void spellCheckChanged(bool checked); + void notificationPopupTimeOutChanged(); + void notify(QString message); + void zoomChanged(); + void zoomMaximizedChanged(); public: - explicit SettingsWidget(QWidget *parent = nullptr,QString engineCachePath = "", - QString enginePersistentStoragePath = ""); - ~SettingsWidget(); + explicit SettingsWidget(QWidget *parent = nullptr, + QString engineCachePath = "", + QString enginePersistentStoragePath = ""); + ~SettingsWidget(); public slots: - void refresh(); - void updateDefaultUAButton(const QString engineUA); - void appLockSetChecked(bool checked); - void setCurrentPasswordText(QString str); - void loadDictionaries(QStringList dictionaries); -protected slots: - bool eventFilter(QObject *obj, QEvent *event); - void closeEvent(QCloseEvent *event); -private slots: - QString cachePath(); - QString persistentStoragePath(); - - void on_deleteCache_clicked(); - - void on_deletePersistentData_clicked(); - - void on_notificationCheckBox_toggled(bool checked); - - void on_themeComboBox_currentTextChanged(const QString &arg1); - - void applyThemeQuirks(); - void on_muteAudioCheckBox_toggled(bool checked); - - void on_defaultUserAgentButton_clicked(); - - void on_userAgentLineEdit_textChanged(const QString &arg1); + void refresh(); + void updateDefaultUAButton(const QString engineUA); + void appLockSetChecked(bool checked); + void setCurrentPasswordText(QString str); + void loadDictionaries(QStringList dictionaries); - void on_setUserAgent_clicked(); - - void on_autoPlayMediaCheckBox_toggled(bool checked); - - void on_closeButtonActionComboBox_currentIndexChanged(int index); - - void on_applock_checkbox_toggled(bool checked); - - void on_dictComboBox_currentIndexChanged(const QString &arg1); - - void on_enableSpellCheck_toggled(bool checked); - - void on_showShortcutsButton_clicked(); - - void on_showPermissionsButton_clicked(); - - - void on_notificationTimeOutspinBox_valueChanged(int arg1); - - void on_notificationCombo_currentIndexChanged(int index); - - void on_tryNotification_clicked(); - - void on_automaticThemeCheckBox_toggled(bool checked); - - void updateAutomaticTheme(); - void themeSwitchTimerTimeout(); - void on_useNativeFileDialog_toggled(bool checked); - - void on_zoomPlus_clicked(); - void on_zoomMinus_clicked(); - - void on_zoomReset_clicked(); + void clearAllData(); +protected slots: + bool eventFilter(QObject *obj, QEvent *event); + void closeEvent(QCloseEvent *event); - bool isChildOf(QObject *Of, QObject *self); - void on_startMinimized_toggled(bool checked); +private slots: + QString cachePath(); + QString persistentStoragePath(); + bool isChildOf(QObject *Of, QObject *self); + void applyThemeQuirks(); + void on_appAutoLockcheckBox_toggled(bool checked); + void on_applock_checkbox_toggled(bool checked); + void on_autoLockDurationSpinbox_valueChanged(int arg1); + void on_autoPlayMediaCheckBox_toggled(bool checked); + void on_automaticThemeCheckBox_toggled(bool checked); + void on_changeDefaultDownloadLocationPb_clicked(); + void on_chnageCurrentPasswordPushButton_clicked(); + void on_closeButtonActionComboBox_currentIndexChanged(int index); + void on_defaultUserAgentButton_clicked(); + void on_deleteCache_clicked(); + void on_deletePersistentData_clicked(); + void on_dictComboBox_currentIndexChanged(const QString &arg1); + void on_enableSpellCheck_toggled(bool checked); + void on_minimizeOnTrayIconClick_toggled(bool checked); + void on_muteAudioCheckBox_toggled(bool checked); + void on_notificationCheckBox_toggled(bool checked); + void on_notificationCombo_currentIndexChanged(int index); + void on_notificationTimeOutspinBox_valueChanged(int arg1); + void on_resetAppAutoLockPushButton_clicked(); + void on_setUserAgent_clicked(); + void on_showPermissionsButton_clicked(); + void on_showShortcutsButton_clicked(); + void on_startMinimized_toggled(bool checked); + void on_styleComboBox_currentTextChanged(const QString &arg1); + void on_themeComboBox_currentTextChanged(const QString &arg1); + void on_tryNotification_clicked(); + void on_useNativeFileDialog_toggled(bool checked); + void on_userAgentLineEdit_editingFinished(); + void on_userAgentLineEdit_textChanged(const QString &arg1); + void on_viewPassword_clicked(); + void on_zoomMinusMaximized_clicked(); + void on_zoomMinus_clicked(); + void on_zoomPlusMaximized_clicked(); + void on_zoomPlus_clicked(); + void on_zoomResetMaximized_clicked(); + void on_zoomReset_clicked(); + void showSetApplockPasswordDialog(); + void themeSwitchTimerTimeout(); + void updateAutomaticTheme(); private: - Ui::SettingsWidget *ui; - QString engineCachePath,enginePersistentStoragePath; - QSettings settings; - QTimer *themeSwitchTimer; + Ui::SettingsWidget *ui; + QString engineCachePath, enginePersistentStoragePath; + QSettings settings; + QTimer *themeSwitchTimer; }; #endif // SETTINGSWIDGET_H -- cgit v1.2.3