diff options
author | 2022-03-30 04:24:36 +0530 | |
---|---|---|
committer | 2022-03-30 04:24:36 +0530 | |
commit | 474b9212a6630c8404d5f4cf7aa02428deddd3fd (patch) | |
tree | d3ae12704da254acb18c74fd5e741ae2b1c055ea /src/mainwindow.h | |
parent | 8f071469453c6dbbe3c3dbc78ee893f239835b5a (diff) | |
download | whatsie-474b9212a6630c8404d5f4cf7aa02428deddd3fd.tar.gz whatsie-474b9212a6630c8404d5f4cf7aa02428deddd3fd.zip |
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
Diffstat (limited to 'src/mainwindow.h')
-rw-r--r-- | src/mainwindow.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/mainwindow.h b/src/mainwindow.h index 5ffe9b1..e1298b0 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -24,16 +24,15 @@ #include <QWebEngineSettings> #include <QWebEngineView> +#include "about.h" +#include "dictionaries.h" +#include "downloadmanagerwidget.h" #include "lock.h" #include "notificationpopup.h" +#include "rateapp.h" #include "requestinterceptor.h" #include "settingswidget.h" #include "webenginepage.h" - -#include "about.h" -#include "dictionaries.h" -#include "downloadmanagerwidget.h" -#include "rateapp.h" #include "webview.h" class MainWindow : public QMainWindow { @@ -53,9 +52,10 @@ public slots: protected slots: void closeEvent(QCloseEvent *event) override; void resizeEvent(QResizeEvent *event) override; + void changeEvent(QEvent *e) override; private: - QPalette lightPalette; + QPalette lightPalette, darkPalette; void createActions(); void createTrayIcon(); void createWebEngine(); @@ -87,34 +87,37 @@ private: private slots: + QString getPageTheme(); void iconActivated(QSystemTrayIcon::ActivationReason reason); void messageClicked(); - void doReload(); + void doReload(bool byPassCache = false); void showAbout(); void notify(QString title, QString message); void showSettings(); void handleCookieAdded(const QNetworkCookie &cookie); - - QString getPageTheme(); void toggleMute(const bool &checked); void doAppReload(); void askToReloadPage(); void updateSettingsUserAgentWidget(); void fullScreenRequested(QWebEngineFullScreenRequest request); - void createWebPage(bool offTheRecord = false); void init_settingWidget(); void init_globalWebProfile(); void check_window_state(); void init_lock(); void lockApp(); - void checkLoadedCorrectly(); void loadingQuirk(QString test); void setNotificationPresenter(QWebEngineProfile *profile); void newChat(); bool isPhoneNumber(const QString &phoneNumber); void quitApp(); + void initRateWidget(); + void initThemes(); + void handleZoomOnWindowStateChange(QWindowStateChangeEvent *ev); + void handleZoom(); + void change_lock_password(); + void tryLock(); }; #endif // MAINWINDOW_H |