aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.h
diff options
context:
space:
mode:
authorLibravatar Keshav Bhatt <keshavnrj@gmail.com>2022-06-25 23:12:28 +0530
committerLibravatar Keshav Bhatt <keshavnrj@gmail.com>2022-06-25 23:12:28 +0530
commit211139005036fced3ae191c4989b32dfd9e95de1 (patch)
tree138855b6c58a89827f00dfa00942bcb02e3feb43 /src/mainwindow.h
parentf8455de73e0b4eeeaa51013dd0d2a984f9335047 (diff)
downloadwhatsie-211139005036fced3ae191c4989b32dfd9e95de1.tar.gz
whatsie-211139005036fced3ae191c4989b32dfd9e95de1.zip
feat: some new features
- feat: new command line options, run: whatsie -h for more - feat: add theme toggle action in system tray action menu with shortcut CTRL+T - feat: shortcut to open settings CTRL+P - fix: Changes (mosty non visible) in applock flow
Diffstat (limited to 'src/mainwindow.h')
-rw-r--r--src/mainwindow.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 4c2c1b8..f8a4ff5 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -25,6 +25,7 @@
#include <QWebEngineView>
#include "about.h"
+#include "autolockeventfilter.h"
#include "dictionaries.h"
#include "downloadmanagerwidget.h"
#include "lock.h"
@@ -34,7 +35,6 @@
#include "settingswidget.h"
#include "webenginepage.h"
#include "webview.h"
-#include "autolockeventfilter.h"
class MainWindow : public QMainWindow {
Q_OBJECT
@@ -44,13 +44,19 @@ public:
public slots:
void updateWindowTheme();
void updatePageTheme();
-
void handleWebViewTitleChanged(QString title);
void handleLoadFinished(bool loaded);
void handleDownloadRequested(QWebEngineDownloadItem *download);
- void loadAppWithArgument(const QString &arg);
+ void loadSchemaUrl(const QString &arg);
+ void showSettings(bool isAskedByCLI = false);
+ void showAbout();
+ void lockApp();
void runMinimized();
void alreadyRunning(bool notify = false);
+ void notify(QString title, QString message);
+ void toggleTheme();
+ void doReload(bool byPassCache = false, bool isAskedByCLI = false);
+ void newChat();
protected slots:
void closeEvent(QCloseEvent *event) override;
void resizeEvent(QResizeEvent *event) override;
@@ -72,6 +78,7 @@ private:
QAction *restoreAction;
QAction *aboutAction;
QAction *settingsAction;
+ QAction *toggleThemeAction;
QAction *quitAction;
QAction *lockAction;
QAction *fullscreenAction;
@@ -93,10 +100,6 @@ private slots:
QString getPageTheme();
void iconActivated(QSystemTrayIcon::ActivationReason reason);
void messageClicked();
- void doReload(bool byPassCache = false);
- void showAbout();
- void notify(QString title, QString message);
- void showSettings();
void handleCookieAdded(const QNetworkCookie &cookie);
void toggleMute(const bool &checked);
void doAppReload();
@@ -104,23 +107,21 @@ private slots:
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 initSettingWidget();
+ void initGlobalWebProfile();
+ void checkWindowState();
+ void initLock();
+ void tryLock();
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();
+ void changeLockPassword();
void forceLogOut();
void tryLogOut();
bool isLoggedIn();