diff --git a/alert.cpp b/alert.cpp
index 5f487c1..0bce713 100644
--- a/alert.cpp
+++ b/alert.cpp
@@ -12,7 +12,7 @@ alert::alert(QWidget *parent) :
ui(new Ui::alert)
{
ui->setupUi(this);
- alert::setFont(QFont("u001"));
+ ui->messageLabel->setFont(QFont("u001"));
// Getting the screen's size
float sW = QGuiApplication::screens()[0]->size().width();
@@ -82,9 +82,9 @@ alert::alert(QWidget *parent) :
qApp->quit();
}
- ui->warningLabel->setStyleSheet("QLabel { background-color : black; color : white; font-size: 18pt }");
+ ui->warningLabel->setStyleSheet("QLabel { background-color : black; color : white; font-size: 16pt }");
ui->messageLabel->setStyleSheet("QLabel { background-color : black; color : white; font-size: 10pt }");
- ui->securityLabel->setStyleSheet("QLabel { background-color : black; color : white; font-size: 12pt }");
+ ui->securityLabel->setStyleSheet("QLabel { background-color : black; color : white; font-size: 11pt }");
ui->continueBtn->setProperty("type", "borderless");
ui->resetBtn->setProperty("type", "borderless");
ui->continueBtn->setStyleSheet("padding: 20px");
diff --git a/alert.h b/alert.h
index fcc560a..251191b 100644
--- a/alert.h
+++ b/alert.h
@@ -14,6 +14,7 @@ class alert : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit alert(QWidget *parent = nullptr);
~alert();
bool signatureError = false;
diff --git a/apps.cpp b/apps.cpp
index 5ea135f..1ad8d9c 100644
--- a/apps.cpp
+++ b/apps.cpp
@@ -114,6 +114,7 @@ void apps::on_calculatorLaunchBtn_clicked()
void apps::on_koboxAppsOpenButton_clicked()
{
koboxAppsDialogWindow = new koboxAppsDialog();
+ connect(koboxAppsDialogWindow, SIGNAL(showToast(QString)), SLOT(showToastNative(QString)));
koboxAppsDialogWindow->setAttribute(Qt::WA_DeleteOnClose);
koboxAppsDialogWindow->show();
}
@@ -146,3 +147,7 @@ void apps::on_g2048LaunchBtn_clicked()
process.startDetached("2048", QStringList());
qApp->quit();
}
+
+void apps::showToastNative(QString messageToDisplay) {
+ emit showToast(messageToDisplay);
+}
diff --git a/apps.h b/apps.h
index 7714a2b..44ed62a 100644
--- a/apps.h
+++ b/apps.h
@@ -16,6 +16,7 @@ class apps : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit apps(QWidget *parent = nullptr);
~apps();
@@ -31,6 +32,7 @@ private slots:
void on_reversiLaunchBtn_clicked();
void refreshScreenNative();
void on_g2048LaunchBtn_clicked();
+ void showToastNative(QString messageToDisplay);
private:
Ui::apps *ui;
@@ -41,6 +43,7 @@ private:
signals:
void refreshScreen();
+ void showToast(QString messageToDisplay);
};
#endif // APPS_H
diff --git a/bookinfodialog.h b/bookinfodialog.h
index a565ef8..5d7c767 100644
--- a/bookinfodialog.h
+++ b/bookinfodialog.h
@@ -12,6 +12,7 @@ class bookInfoDialog : public QDialog
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit bookInfoDialog(QWidget *parent = nullptr);
~bookInfoDialog();
float sH;
diff --git a/brightnessdialog.h b/brightnessdialog.h
index 93bad63..2795fbf 100644
--- a/brightnessdialog.h
+++ b/brightnessdialog.h
@@ -14,6 +14,7 @@ class brightnessDialog : public QDialog
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
QString checkconfig_str_val;
int oldValue;
int oldWarmthValue;
diff --git a/calendarapp.h b/calendarapp.h
index 96b2fae..98560e2 100644
--- a/calendarapp.h
+++ b/calendarapp.h
@@ -12,6 +12,7 @@ class calendarApp : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit calendarApp(QWidget *parent = nullptr);
~calendarApp();
diff --git a/dictionarywidget.h b/dictionarywidget.h
index 6344777..ca6b545 100644
--- a/dictionarywidget.h
+++ b/dictionarywidget.h
@@ -14,6 +14,7 @@ class dictionaryWidget : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit dictionaryWidget(QWidget *parent = nullptr);
~dictionaryWidget();
void dictionaryLookup(std::string word, QString first_letter, int position);
diff --git a/encryptionmanager.cpp b/encryptionmanager.cpp
index 16939a8..1b9401b 100644
--- a/encryptionmanager.cpp
+++ b/encryptionmanager.cpp
@@ -16,13 +16,9 @@ encryptionManager::encryptionManager(QWidget *parent) :
ui(new Ui::encryptionManager)
{
ui->setupUi(this);
- ui->encryptionSetupLabel->setFont(QFont("u001"));
- ui->successLabel->setFont(QFont("u001"));
- ui->failureLabel->setFont(QFont("u001"));
ui->descriptionLabel->setFont(QFont("u001"));
ui->successDescriptionLabel->setFont(QFont("u001"));
ui->failureDescriptionLabel->setFont(QFont("u001"));
- ui->warningLabel->setFont(QFont("u001"));
ui->warningDescriptionLabel->setFont(QFont("u001"));
// Stylesheet
@@ -31,11 +27,11 @@ encryptionManager::encryptionManager(QWidget *parent) :
this->setStyleSheet(stylesheetFile.readAll());
stylesheetFile.close();
- ui->encryptionSetupLabel->setStyleSheet("font-size: 18pt; font-weight: bold");
+ ui->encryptionSetupLabel->setStyleSheet("font-size: 15pt; font-weight: bold");
ui->descriptionLabel->setStyleSheet("font-size: 10pt");
- ui->successLabel->setStyleSheet("font-size: 18pt; font-weight: bold");
+ ui->successLabel->setStyleSheet("font-size: 15pt; font-weight: bold");
ui->successDescriptionLabel->setStyleSheet("font-size: 10pt");
- ui->failureLabel->setStyleSheet("font-size: 18pt; font-weight: bold");
+ ui->failureLabel->setStyleSheet("font-size: 15pt; font-weight: bold");
ui->failureDescriptionLabel->setStyleSheet("font-size: 10pt");
ui->setupContinueBtn->setStyleSheet("background: lightGrey; border: 3px solid black; color: black; padding: 10px; outline: none; font-size: 10pt; font-weight: bold; border-radius: 10px");
ui->setupAbortBtn->setStyleSheet("background: lightGrey; border: 3px solid black; color: black; padding: 10px; outline: none; font-size: 10pt; font-weight: bold; border-radius: 10px");
@@ -43,7 +39,7 @@ encryptionManager::encryptionManager(QWidget *parent) :
ui->failureContinueBtn->setStyleSheet("background: lightGrey; border: 3px solid black; color: black; padding: 10px; outline: none; font-size: 10pt; font-weight: bold; border-radius: 10px");
ui->acceptBtn->setStyleSheet("background: lightGrey; border: 3px solid black; color: black; padding: 10px; outline: none; font-size: 10pt; font-weight: bold; border-radius: 10px");
ui->usbmsBtn->setStyleSheet("background: lightGrey; border: 3px solid black; color: black; padding: 10px; outline: none; font-size: 10pt; font-weight: bold; border-radius: 10px");
- ui->warningLabel->setStyleSheet("font-size: 18pt; font-weight: bold");
+ ui->warningLabel->setStyleSheet("font-size: 15pt; font-weight: bold");
ui->warningDescriptionLabel->setStyleSheet("font-size: 10pt");
// Getting the screen's size
@@ -259,7 +255,7 @@ void encryptionManager::unlockEncryptedStorage() {
std::string unlockTime_str = to_string(currentEpoch);
global::encfs::unlockTime = QDateTime::fromTime_t(currentEpoch).toString();
QString message = "FATAL: 4 invalid passphrase tries, locking down device until " + global::encfs::unlockTime;
- qDebug() << message;
+ log(message, className);
string_writeconfig("/external_root/boot/flags/ENCRYPT_LOCK", unlockTime_str);
global::encfs::lockdown = true;
setupMessageBoxRan = true;
@@ -328,7 +324,7 @@ void encryptionManager::on_failureContinueBtn_clicked()
void encryptionManager::setupFailedAuthenticationMessageBox() {
ui->activityWidget->hide();
- QMessageBox::critical(this, tr("Invalid argument"), tr("Invalid passphrase. Please try again."));
+ QMessageBox::critical(this, tr("Invalid argument"), tr("Invalid passphrase. Please try again."));
QFile::remove("/external_root/run/encfs_mounted");
quit_restart();
}
diff --git a/encryptionmanager.h b/encryptionmanager.h
index 073aca8..ac14c91 100644
--- a/encryptionmanager.h
+++ b/encryptionmanager.h
@@ -16,6 +16,7 @@ class encryptionManager : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit encryptionManager(QWidget *parent = nullptr);
~encryptionManager();
bool setupExitWidgetRan = false;
diff --git a/encryptionmanager.ui b/encryptionmanager.ui
index 7ea1b04..27bc478 100644
--- a/encryptionmanager.ui
+++ b/encryptionmanager.ui
@@ -75,8 +75,7 @@
-
- <font face="u001">Encrypted storage allows you to keep your most important files and data safe from anyone else than you.
-Would you like to enable it</font><font face="Inter">?</font>
+ <html><head/><body><p><span style=" font-family:'u001';">Encrypted storage allows you to keep your most important files and data safe from anyone else but you. Would you like to enable it</span><span style=" font-family:'Inter';">?</span></p></body></html>
Qt::AlignCenter
diff --git a/functions.h b/functions.h
index a5cbb37..0b7f207 100644
--- a/functions.h
+++ b/functions.h
@@ -12,6 +12,7 @@
#include
#include
#include
+#include
#include
#include
@@ -116,6 +117,9 @@ namespace global {
namespace localStorage {
inline QStringList searchResultsPaths;
}
+ namespace logger {
+ inline bool status;
+ }
inline QString systemInfoText;
inline bool forbidOpenSearchDialog;
inline bool isN705;
@@ -142,6 +146,13 @@ namespace {
int defaultPdfPageWidth;
int defaultPdfPageHeight;
bool checked_box = false;
+ void log(QString message, QString className) {
+ if(global::logger::status == true) {
+ QDebug logger = qDebug();
+ logger.noquote();
+ logger << QDateTime::currentDateTime().toString("dd/MM/yyyy @ hh:mm:ss") << "|" << className + ":" << message;
+ }
+ }
bool checkconfig(QString file) {
if(QFile::exists(file)) {
QFile config(file);
@@ -690,7 +701,6 @@ namespace {
}
return exitCode;
}
-
}
#endif // FUNCTIONS_H
diff --git a/generaldialog.cpp b/generaldialog.cpp
index 959edff..7801a38 100644
--- a/generaldialog.cpp
+++ b/generaldialog.cpp
@@ -650,13 +650,13 @@ void generalDialog::syncGutenbergCatalog() {
connect(syncCheckTimer, &QTimer::timeout, [&]() {
if(QFile::exists("/inkbox/gutenbergSyncDone") == true) {
if(checkconfig("/inkbox/gutenbergSyncDone") == true) {
- qDebug() << "Gutenberg sync successfully completed";
+ log("Gutenberg sync successfully completed", className);
gutenbergSyncDone = true;
gutenbergSyncStatus = true;
emit closeIndefiniteToast();
}
else {
- qDebug() << "Gutenberg sync encountered an error";
+ log("Gutenberg sync encountered an error", className);
gutenbergSyncDone = true;
gutenbergSyncStatus = false;
emit closeIndefiniteToast();
diff --git a/generaldialog.h b/generaldialog.h
index 56abf72..bb9bd24 100644
--- a/generaldialog.h
+++ b/generaldialog.h
@@ -22,6 +22,7 @@ class generalDialog : public QDialog
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit generalDialog(QWidget *parent = nullptr);
~generalDialog();
bool resetDialog = false;
diff --git a/hourglassanimationwidget.h b/hourglassanimationwidget.h
index 5a305c6..cbaf0d7 100644
--- a/hourglassanimationwidget.h
+++ b/hourglassanimationwidget.h
@@ -12,6 +12,7 @@ class hourglassAnimationWidget : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit hourglassAnimationWidget(QWidget *parent = nullptr);
~hourglassAnimationWidget();
int i;
diff --git a/koboxappsdialog.cpp b/koboxappsdialog.cpp
index 154ff85..58bca41 100644
--- a/koboxappsdialog.cpp
+++ b/koboxappsdialog.cpp
@@ -90,8 +90,8 @@ void koboxAppsDialog::on_launchBtn_clicked()
{
index = ui->appsList->currentIndex();
itemText = index.data(Qt::DisplayRole).toString();
- if(itemText == "") {
- QMessageBox::critical(this, tr("Invalid argument"), tr("Please select an application."));
+ if(itemText.isEmpty()) {
+ emit showToast("Please select an application");
}
else {
// DPI setting
diff --git a/koboxappsdialog.h b/koboxappsdialog.h
index 6b2c9cb..f3861f3 100644
--- a/koboxappsdialog.h
+++ b/koboxappsdialog.h
@@ -15,6 +15,7 @@ class koboxAppsDialog : public QDialog
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit koboxAppsDialog(QWidget *parent = nullptr);
~koboxAppsDialog();
@@ -30,6 +31,9 @@ private slots:
void on_cancelBtn_clicked();
void on_launchBtn_clicked();
+signals:
+ void showToast(QString messageToDisplay);
+
private:
Ui::koboxAppsDialog *ui;
usbms_splash *usbmsSplashWindow;
diff --git a/koboxsettings.h b/koboxsettings.h
index dbd0135..43b254a 100644
--- a/koboxsettings.h
+++ b/koboxsettings.h
@@ -15,6 +15,7 @@ class koboxSettings : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit koboxSettings(QWidget *parent = nullptr);
~koboxSettings();
diff --git a/librarywidget.h b/librarywidget.h
index 5c67bf8..30bcb72 100644
--- a/librarywidget.h
+++ b/librarywidget.h
@@ -14,6 +14,7 @@ class libraryWidget : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit libraryWidget(QWidget *parent = nullptr);
~libraryWidget();
float sH;
diff --git a/main.cpp b/main.cpp
index bbc352c..884ed23 100644
--- a/main.cpp
+++ b/main.cpp
@@ -32,6 +32,13 @@
int main(int argc, char *argv[])
{
global::deviceID = readFile("/opt/inkbox_device");
+
+ if(char * debug = std::getenv("DEBUG")) {
+ if(std::atoi(debug) == 1) {
+ global::logger::status = true;
+ }
+ }
+
setDefaultWorkDir();
if(checkconfig(".config/18-encrypted_storage/status") == true and checkconfig("/external_root/run/encfs_mounted") == false) {
// Open Encryption Manager to unlock encrypted storage
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 75f80e2..ec5c3ff 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -314,7 +314,7 @@ MainWindow::MainWindow(QWidget *parent)
;
}
else {
- qDebug() << "Warning! Battery is at a critical charge level!";
+ log("Warning! Battery is at a critical charge level!", className);
openCriticalBatteryAlertWindow();
}
}
@@ -334,7 +334,7 @@ MainWindow::MainWindow(QWidget *parent)
;
}
else {
- qDebug() << "Warning! Battery is low!";
+ log("Warning! Battery is low!", className);
openLowBatteryDialog();
}
}
@@ -662,6 +662,7 @@ void MainWindow::on_appsBtn_clicked()
// Create widget
appsWindow = new apps();
connect(appsWindow, SIGNAL(refreshScreen()), SLOT(refreshScreen()));
+ connect(appsWindow, SIGNAL(showToast(QString)), SLOT(showToast(QString)));
ui->stackedWidget->insertWidget(1, appsWindow);
global::mainwindow::tabSwitcher::appsWidgetCreated = true;
@@ -1029,7 +1030,7 @@ void MainWindow::showToast(QString messageToDisplay) {
}
void MainWindow::hello(int testNumber) {
- qDebug() << "Hello" << testNumber;
+ log("Hello" + QString::number(testNumber), className);
}
void MainWindow::closeIndefiniteToast() {
@@ -1079,11 +1080,11 @@ void MainWindow::checkForUpdate() {
if(checkconfig("/mnt/onboard/onboard/.inkbox/can_update") == true) {
if(checkconfig("/tmp/cancelUpdateDialog") == false) {
// I'm sorry.
- qDebug() << "An update is available.";
+ log("An update is available.", className);
QTimer::singleShot(2000, this, SLOT(openUpdateDialog()));
}
else {
- qDebug() << "Not showing update dialog, user dismissed it...";
+ log("Not showing update dialog, user dismissed it ...", className);
}
}
}
diff --git a/mainwindow.h b/mainwindow.h
index c525916..447b937 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -30,6 +30,7 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
MainWindow(QWidget *parent = nullptr);
~MainWindow();
diff --git a/otamanager.cpp b/otamanager.cpp
index c376652..20805ae 100644
--- a/otamanager.cpp
+++ b/otamanager.cpp
@@ -13,18 +13,18 @@ otaManager::otaManager(QWidget *parent) :
ui->setupUi(this);
QThread::msleep(500);
if(global::otaUpdate::downloadOta == false) {
- qDebug() << "Checking for available OTA update ...";
+ log("Checking for available OTA update ...", className);
string_writeconfig("/opt/ibxd", "ota_update_check\n");
QTimer * otaCheckTimer = new QTimer(this);
otaCheckTimer->setInterval(100);
connect(otaCheckTimer, &QTimer::timeout, [&]() {
if(QFile::exists("/run/can_ota_update") == true) {
if(checkconfig("/run/can_ota_update") == true) {
- qDebug() << "OTA update is available!";
+ log("OTA update is available!", className);
emit canOtaUpdate(true);
}
else {
- qDebug() << "No OTA update available.";
+ log("No OTA update available.", className);
emit canOtaUpdate(false);
}
unsigned long currentEpoch = QDateTime::currentSecsSinceEpoch();
@@ -35,7 +35,7 @@ otaManager::otaManager(QWidget *parent) :
otaCheckTimer->start();
}
else {
- qDebug() << "Downloading OTA update ...";
+ log("Downloading OTA update ...", className);
QFile::remove("/run/can_install_ota_update");
string_writeconfig("/opt/ibxd", "ota_update_download\n");
QTimer * otaDownloadTimer = new QTimer(this);
@@ -43,12 +43,12 @@ otaManager::otaManager(QWidget *parent) :
connect(otaDownloadTimer, &QTimer::timeout, [&]() {
if(QFile::exists("/run/can_install_ota_update") == true) {
if(checkconfig("/run/can_install_ota_update") == true) {
- qDebug() << "Download succeeded.";
+ log("Download succeeded.", className);
emit downloadedOtaUpdate(true);
global::otaUpdate::downloadOta = false;
}
else {
- qDebug() << "Download failed.";
+ log("Download failed.", className);
emit downloadedOtaUpdate(false);
global::otaUpdate::downloadOta = false;
}
diff --git a/otamanager.h b/otamanager.h
index d29ef3d..115dcdb 100644
--- a/otamanager.h
+++ b/otamanager.h
@@ -12,6 +12,7 @@ class otaManager : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit otaManager(QWidget *parent = nullptr);
~otaManager();
diff --git a/quit.h b/quit.h
index 6582b01..1e73f6e 100644
--- a/quit.h
+++ b/quit.h
@@ -14,6 +14,7 @@ class quit : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit quit(QWidget *parent = nullptr);
~quit();
diff --git a/reader.cpp b/reader.cpp
index 9f58cb0..f0d493b 100644
--- a/reader.cpp
+++ b/reader.cpp
@@ -219,7 +219,7 @@ reader::reader(QWidget *parent) :
}
}
}
- qDebug() << "Reader: Opening file" << book_file;
+ log("Opening file '" + book_file + "'", className);
// Writing book path to file
std::string book_file_str = book_file.toStdString();
@@ -697,7 +697,7 @@ reader::reader(QWidget *parent) :
}
else {
if(isBatteryCritical() == true) {
- qDebug() << "Warning! Battery is at a critical charge level!";
+ log("Warning! Battery is at a critical charge level!", className);
openCriticalBatteryAlertWindow();
}
}
@@ -716,7 +716,7 @@ reader::reader(QWidget *parent) :
;
}
else {
- qDebug() << "Warning! Battery is low!";
+ log("Warning! Battery is low!", className);
openLowBatteryDialog();
}
}
diff --git a/reader.h b/reader.h
index f63ba63..5e18d20 100644
--- a/reader.h
+++ b/reader.h
@@ -46,6 +46,7 @@ class reader : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit reader(QWidget *parent = nullptr);
~reader();
diff --git a/savedwords.h b/savedwords.h
index 9345ebf..4957804 100644
--- a/savedwords.h
+++ b/savedwords.h
@@ -19,6 +19,7 @@ class savedwords : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit savedwords(QWidget *parent = nullptr);
~savedwords();
QString words;
diff --git a/searchresultswidget.h b/searchresultswidget.h
index 9b8adad..34c6afe 100644
--- a/searchresultswidget.h
+++ b/searchresultswidget.h
@@ -14,6 +14,7 @@ class searchResultsWidget : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit searchResultsWidget(QWidget *parent = nullptr);
~searchResultsWidget();
void setListViewContents(QStringList searchResults);
diff --git a/settings.cpp b/settings.cpp
index b895600..a3d4c5e 100644
--- a/settings.cpp
+++ b/settings.cpp
@@ -55,7 +55,7 @@ settings::settings(QWidget *parent) :
ui->generateSystemReportBtn->setStyleSheet("font-size: 9pt");
ui->checkOtaUpdateBtn->setStyleSheet("font-size: 9pt");
ui->comboBox->setStyleSheet("font-size: 9pt");
- ui->tzComboBox->setStyleSheet("font-size: 9pt");
+ ui->tzComboBox->setStyleSheet("font-size: 8.5pt");
ui->sleepTimeoutComboBox->setStyleSheet("font-size: 9pt");
ui->setPasscodeBtn->setStyleSheet("font-size: 9pt");
ui->repackBtn->setStyleSheet("font-size: 9pt");
diff --git a/settings.h b/settings.h
index 16fa198..c3828be 100644
--- a/settings.h
+++ b/settings.h
@@ -19,6 +19,7 @@ class settings : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
int settings_page = 1;
bool launch_sh = false;
bool ui_enable_changed = false;
diff --git a/settingschooser.h b/settingschooser.h
index 45798cb..0f8c4ab 100644
--- a/settingschooser.h
+++ b/settingschooser.h
@@ -15,6 +15,7 @@ class settingsChooser : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit settingsChooser(QWidget *parent = nullptr);
~settingsChooser();
diff --git a/textwidget.h b/textwidget.h
index f17f7d7..e35bedf 100644
--- a/textwidget.h
+++ b/textwidget.h
@@ -12,6 +12,7 @@ class textwidget : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit textwidget(QWidget *parent = nullptr);
~textwidget();
diff --git a/toast.h b/toast.h
index 1026f38..fa1cac8 100644
--- a/toast.h
+++ b/toast.h
@@ -14,6 +14,7 @@ class toast : public QDialog
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit toast(QWidget *parent = nullptr);
~toast();
void centerToast();
diff --git a/usbms_splash.cpp b/usbms_splash.cpp
index c7967fb..061540d 100644
--- a/usbms_splash.cpp
+++ b/usbms_splash.cpp
@@ -13,6 +13,7 @@ usbms_splash::usbms_splash(QWidget *parent) :
{
ui->setupUi(this);
usbms_splash::setFont(QFont("u001"));
+ ui->label->setFont(QFont("Inter"));
// Getting the screen's size
sW = QGuiApplication::screens()[0]->size().width();
@@ -29,8 +30,9 @@ usbms_splash::usbms_splash(QWidget *parent) :
this->setStyleSheet(stylesheetFile.readAll());
stylesheetFile.close();
+ ui->label->setFont(QFont("Inter"));
ui->label->setText("Launching KoBox subsystem");
- ui->label->setStyleSheet("font-size: 14pt");
+ ui->label->setStyleSheet("font-size: 14pt; font-weight: bold");
ui->label_3->setText("Please wait, this could take a while.");
if(global::deviceID == "n905\n") {
ui->label_3->setStyleSheet("font-size: 11pt");
@@ -48,7 +50,7 @@ usbms_splash::usbms_splash(QWidget *parent) :
float stdIconHeight = sH / 1.15;
this->setStyleSheet("background-color:black;");
- ui->label->setStyleSheet("QLabel { background-color : black; color : white; font-size: 15pt }");
+ ui->label->setStyleSheet("QLabel { background-color : black; color : white; font-size: 15pt; font-weight: bold }");
ui->label_3->setStyleSheet("QLabel { background-color : black; color : white; font-size: 10pt }");
QPixmap pixmap(":/resources/usbms.png");
@@ -64,6 +66,7 @@ usbms_splash::usbms_splash(QWidget *parent) :
void usbms_splash::usbms_launch()
{
+ log("Entering USBMS session ...", className);
string_writeconfig("/tmp/in_usbms", "true");
QTimer::singleShot(1500, this, SLOT(brightnessDown()));
@@ -114,13 +117,15 @@ void usbms_splash::usbms_launch()
qApp->quit();
}
else {
- qDebug() << "Exiting USBMS session...";
- ui->label->setText("Processing content");
+ log("Exiting USBMS session ...", className);
+ // '' bit: because nothing else works ...
+ ui->label->setText("Processing content");
+ ui->label->setFont(QFont("Inter"));
ui->label_3->setText("Please wait");
+ ui->label_3->setFont(QFont("u001"));
ui->label->setStyleSheet("QLabel { background-color : black; color : white; font-size: 15pt; font-weight: bold }");
ui->label_3->setStyleSheet("QLabel { background-color : black; color : white; font-size: 11pt }");
ui->label->setFont(QFont("u001"));
- ui->label_3->setFont(QFont("u001"));
float stdIconWidth = sW / 2;
float stdIconHeight = sH / 2;
@@ -181,6 +186,7 @@ void usbms_splash::restartServices() {
// Checking for updates
string_writeconfig("/opt/ibxd", "update_inkbox_restart\n");
QThread::msleep(2500);
+ string_writeconfig("/tmp/in_usbms", "false");
quit_restart();
}
diff --git a/usbms_splash.h b/usbms_splash.h
index 67e744a..132e1e0 100644
--- a/usbms_splash.h
+++ b/usbms_splash.h
@@ -12,6 +12,7 @@ class usbms_splash : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit usbms_splash(QWidget *parent = nullptr);
~usbms_splash();
float sW;
diff --git a/virtualkeyboard.h b/virtualkeyboard.h
index abd8825..042fb3a 100644
--- a/virtualkeyboard.h
+++ b/virtualkeyboard.h
@@ -13,6 +13,7 @@ class virtualkeyboard : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit virtualkeyboard(QWidget *parent = nullptr);
~virtualkeyboard();
bool shift;
diff --git a/virtualkeypad.h b/virtualkeypad.h
index 0a5d58f..b3360ac 100644
--- a/virtualkeypad.h
+++ b/virtualkeypad.h
@@ -13,6 +13,7 @@ class virtualkeypad : public QWidget
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit virtualkeypad(QWidget *parent = nullptr);
~virtualkeypad();
diff --git a/wifidialog.h b/wifidialog.h
index c722497..cd98c92 100644
--- a/wifidialog.h
+++ b/wifidialog.h
@@ -15,6 +15,7 @@ class wifiDialog : public QDialog
Q_OBJECT
public:
+ QString className = this->metaObject()->className();
explicit wifiDialog(QWidget *parent = nullptr);
~wifiDialog();
QString wifiNetworksList;