quill/reader.h

102 lines
2.6 KiB
C
Raw Normal View History

2021-03-25 05:00:19 -07:00
#ifndef READER_H
#define READER_H
#include "functions.h"
#include "alert.h"
#include "generaldialog.h"
2021-03-25 05:00:19 -07:00
#include <QWidget>
using namespace std;
namespace Ui {
class reader;
}
class reader : public QWidget
{
Q_OBJECT
public:
explicit reader(QWidget *parent = nullptr);
~reader();
2021-03-25 05:00:19 -07:00
int split_total;
int split_files_number;
int page_number;
int dictionary_position = 1;
2021-03-30 05:24:13 -07:00
int pagesTurned = 0;
// -1 : Never refresh | 0 : Refresh every page | 1 : Refresh every 1 page. And so on...
// Refresh every 3 pages is the default
int pageRefreshSetting = 3;
2021-03-25 05:00:19 -07:00
bool menubar_shown = false;
bool selected_text_lock = false;
bool nextdefinition_lock = false;
bool is_epub = false;
bool parser_ran = false;
bool booktostr_ran = false;
2021-03-30 05:24:13 -07:00
bool neverRefresh = false;
bool wakeFromSleep = false;
bool remount = true;
2021-03-25 05:00:19 -07:00
QString book_1;
QString book_2;
QString book_3;
QString book_4;
QString ittext;
QString book_file;
bool batt_status;
QString selected_text;
QString word;
QString words; // Saved words
QString letter;
string selected_text_str;
QString definition;
QPixmap scaledChargingPixmap;
QPixmap scaledHalfPixmap;
QPixmap scaledFullPixmap;
QPixmap scaledEmptyPixmap;
QList<QString> content;
2021-04-22 07:10:47 -07:00
int setup_book(QString book, int i, bool run_parser);
void checkwords();
bool epub_file_match(QString file);
void dictionary_lookup(string word, QString first_letter, int position);
void save_word(string word, bool remove);
2021-03-25 05:00:19 -07:00
void menubar_show();
void menubar_hide();
void wordwidget_show();
void wordwidget_hide();
void openLowBatteryDialog();
void openCriticalBatteryAlertWindow();
2021-03-25 05:00:19 -07:00
private slots:
void on_nextBtn_clicked();
void on_previousBtn_clicked();
void on_optionsBtn_clicked();
void on_hideOptionsBtn_clicked();
void on_brightnessDecBtn_clicked();
void on_brightnessIncBtn_clicked();
void on_aboutBtn_clicked();
void on_homeBtn_clicked();
void on_fontChooser_currentIndexChanged(const QString &arg1);
void on_alignLeftBtn_clicked();
void on_alignCenterBtn_clicked();
void on_alignRightBtn_clicked();
void on_alignJustifyBtn_clicked();
void on_infoCloseBtn_clicked();
void on_previousDefinitionBtn_clicked();
void on_nextDefinitionBtn_clicked();
void on_saveWordBtn_clicked();
void on_sizeSlider_valueChanged(int value);
void writeconfig_pagenumber();
void quit_restart();
2021-03-25 05:00:19 -07:00
private:
Ui::reader *ui;
alert *alertWindow;
generalDialog *generalDialogWindow;
2021-03-25 05:00:19 -07:00
};
#endif // READER_H