2021-03-25 05:00:19 -07:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
|
|
|
#include "settings.h"
|
2021-04-24 09:44:57 -07:00
|
|
|
#include "settingschooser.h"
|
2021-03-25 05:00:19 -07:00
|
|
|
#include "apps.h"
|
|
|
|
#include "reader.h"
|
|
|
|
#include "quit.h"
|
|
|
|
#include "alert.h"
|
2021-03-29 05:04:46 -07:00
|
|
|
#include "usbms_splash.h"
|
2021-03-29 18:47:21 -07:00
|
|
|
#include "brightnessdialog.h"
|
2021-03-31 05:38:59 -07:00
|
|
|
#include "generaldialog.h"
|
2021-04-27 05:40:08 -07:00
|
|
|
#include "koboxsettings.h"
|
2021-04-29 20:36:25 -07:00
|
|
|
#include "koboxappsdialog.h"
|
2021-06-08 04:49:52 -07:00
|
|
|
#include "textwidget.h"
|
2021-07-05 10:45:35 -07:00
|
|
|
#include "virtualkeypad.h"
|
2021-04-23 19:23:24 -07:00
|
|
|
|
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:
|
|
|
|
MainWindow(QWidget *parent = nullptr);
|
|
|
|
~MainWindow();
|
2021-04-23 19:23:24 -07:00
|
|
|
|
|
|
|
float stdIconWidth;
|
|
|
|
float stdIconHeight;
|
|
|
|
float brightnessIconWidth;
|
|
|
|
float brightnessIconHeight;
|
|
|
|
float homeIconWidth;
|
|
|
|
float homeIconHeight;
|
|
|
|
float sW;
|
|
|
|
float sH;
|
|
|
|
|
2021-03-25 05:00:19 -07:00
|
|
|
bool existing_recent_books = false;
|
2021-03-27 12:13:37 -07:00
|
|
|
bool reboot_after_update = false;
|
2021-04-01 05:58:37 -07:00
|
|
|
int timerTime = 0;
|
2021-03-25 05:00:19 -07:00
|
|
|
QString relative_path;
|
2021-06-29 07:19:21 -07:00
|
|
|
QString usbmsStatus;
|
2021-04-23 05:47:05 -07:00
|
|
|
|
|
|
|
void openLowBatteryDialog();
|
|
|
|
void openCriticalBatteryAlertWindow();
|
2021-05-09 11:07:05 -07:00
|
|
|
void openUsbmsDialog();
|
2021-04-24 06:34:35 -07:00
|
|
|
void resetWindow(bool resetStackedWidget);
|
2021-04-23 19:23:24 -07:00
|
|
|
void resetIcons();
|
2021-06-23 08:26:00 -07:00
|
|
|
void setBatteryIcon();
|
2021-04-23 05:47:05 -07:00
|
|
|
|
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();
|
2021-03-29 18:47:21 -07:00
|
|
|
void on_brightnessBtn_clicked();
|
2021-04-01 05:58:37 -07:00
|
|
|
void openUpdateDialog();
|
2021-06-28 16:57:40 -07:00
|
|
|
void setInitialBrightness();
|
2021-04-23 19:23:24 -07:00
|
|
|
void on_homeBtn_clicked();
|
2021-07-05 13:01:32 -07:00
|
|
|
void refreshScreen();
|
2021-07-05 19:21:20 -07:00
|
|
|
void setupSearchDialog();
|
2021-03-29 18:47:21 -07:00
|
|
|
|
2021-03-25 05:00:19 -07:00
|
|
|
private:
|
|
|
|
Ui::MainWindow *ui;
|
2021-04-24 09:44:57 -07:00
|
|
|
settingsChooser *settingsChooserWindow;
|
2021-03-25 05:00:19 -07:00
|
|
|
apps *appsWindow;
|
|
|
|
reader *readerWindow;
|
|
|
|
quit *quitWindow;
|
|
|
|
alert *alertWindow;
|
2021-03-29 05:04:46 -07:00
|
|
|
usbms_splash *usbmsWindow;
|
2021-03-29 18:47:21 -07:00
|
|
|
brightnessDialog *brightnessDialogWindow;
|
2021-03-31 05:38:59 -07:00
|
|
|
generalDialog *generalDialogWindow;
|
2021-04-27 05:40:08 -07:00
|
|
|
koboxSettings *koboxSettingsWindow;
|
2021-04-29 20:36:25 -07:00
|
|
|
koboxAppsDialog *koboxAppsDialogWindow;
|
2021-06-08 04:49:52 -07:00
|
|
|
textwidget *textwidgetWindow;
|
2021-07-05 10:45:35 -07:00
|
|
|
virtualkeypad *keypadWidget;
|
2021-03-25 05:00:19 -07:00
|
|
|
};
|
2021-06-28 13:13:44 -07:00
|
|
|
|
2021-03-25 05:00:19 -07:00
|
|
|
#endif // MAINWINDOW_H
|