quill/mainwindow.h

123 lines
3.1 KiB
C
Raw Permalink Normal View History

2021-03-25 05:00:19 -07:00
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include "settings.h"
#include "settingschooser.h"
2021-03-25 05:00:19 -07:00
#include "apps.h"
#include "reader.h"
#include "quit.h"
#include "alert.h"
#include "usbms_splash.h"
#include "brightnessdialog.h"
#include "generaldialog.h"
2021-04-27 05:40:08 -07:00
#include "koboxsettings.h"
#include "koboxappsdialog.h"
#include "textwidget.h"
#include "virtualkeypad.h"
#include "toast.h"
#include "otamanager.h"
#include "librarywidget.h"
2021-03-25 05:00:19 -07:00
using namespace std;
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
QString className = this->metaObject()->className();
2021-03-25 05:00:19 -07:00
MainWindow(QWidget *parent = nullptr);
~MainWindow();
float stdIconWidth;
float stdIconHeight;
float brightnessIconWidth;
float brightnessIconHeight;
float homeIconWidth;
float homeIconHeight;
float wifiIconWidth;
float wifiIconHeight;
float sW;
float sH;
2022-04-03 19:44:46 -07:00
int truncateThreshold;
2021-03-25 05:00:19 -07:00
bool existing_recent_books = false;
bool reboot_after_update = false;
bool resetFullWindowException;
2022-03-11 17:44:26 -08:00
bool wifiIconClickedWhileReconnecting;
int lastWifiState;
int timerTime = 0;
2021-03-25 05:00:19 -07:00
QString relative_path;
QString usbmsStatus;
void openLowBatteryDialog();
void openCriticalBatteryAlertWindow();
void openUsbmsDialog();
void resetIcons();
void setBatteryIcon();
bool checkWifiState();
2021-03-25 05:00:19 -07:00
public slots:
private slots:
void on_settingsBtn_clicked();
void on_appsBtn_clicked();
void on_pushButton_clicked();
void on_searchBtn_clicked();
void on_quitBtn_clicked();
void on_book1Btn_clicked();
void on_book2Btn_clicked();
void on_book3Btn_clicked();
void on_book4Btn_clicked();
void on_brightnessBtn_clicked();
void openUpdateDialog();
void openWifiDialog();
void setInitialBrightness();
void on_homeBtn_clicked();
2021-07-05 13:01:32 -07:00
void refreshScreen();
void setupSearchDialog();
void setWifiIcon();
void on_wifiBtn_clicked();
void updateWifiIcon(int mode);
void hello(int testNumber);
void showToast(QString messageToDisplay);
void closeIndefiniteToast();
void openUpdateDialogOTA(bool open);
void launchOtaUpdater();
void openBookFile(QString book, bool relativePath);
void openReaderFramework();
2021-09-26 13:46:25 -07:00
void checkForUpdate();
2022-02-18 08:06:09 -08:00
void checkForOtaUpdate();
void openEncfsRepackDialog();
void on_libraryButton_clicked();
2022-01-04 16:06:47 -08:00
void resetWindow(bool resetStackedWidget);
void resetFullWindow();
2022-04-03 19:44:46 -07:00
void setRecentBooksLabelsTruncateThreshold();
2022-03-11 17:44:26 -08:00
void resetWifiIconClickedWhileReconnecting();
2021-03-25 05:00:19 -07:00
private:
Ui::MainWindow * ui;
settingsChooser * settingsChooserWindow;
apps * appsWindow;
reader * readerWindow;
quit * quitWindow;
alert * alertWindow;
usbms_splash * usbmsWindow;
brightnessDialog * brightnessDialogWindow;
generalDialog * generalDialogWindow;
koboxSettings * koboxSettingsWindow;
koboxAppsDialog * koboxAppsDialogWindow;
textwidget * textwidgetWindow;
virtualkeypad * keypadWidget;
toast * toastWindow;
otaManager * otaManagerWindow;
libraryWidget * libraryWidgetWindow;
2021-03-25 05:00:19 -07:00
};
2021-03-25 05:00:19 -07:00
#endif // MAINWINDOW_H