2021-03-25 05:00:19 -07:00
|
|
|
#include "apps.h"
|
|
|
|
#include "ui_apps.h"
|
|
|
|
#include <QFile>
|
|
|
|
#include <QProcess>
|
|
|
|
|
|
|
|
apps::apps(QWidget *parent) :
|
|
|
|
QWidget(parent),
|
|
|
|
ui(new Ui::apps)
|
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
|
|
|
ui->backBtn->setProperty("type", "borderless");
|
|
|
|
ui->scribbleLaunchBtn->setProperty("type", "borderless");
|
|
|
|
ui->lightmapsLaunchBtn->setProperty("type", "borderless");
|
|
|
|
ui->calendarLaunchBtn->setProperty("type", "borderless");
|
|
|
|
ui->savedWordsLaunchBtn->setProperty("type", "borderless");
|
|
|
|
|
2021-03-26 15:53:02 -07:00
|
|
|
ui->scribbleLaunchBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px");
|
|
|
|
ui->lightmapsLaunchBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px");
|
|
|
|
ui->calendarLaunchBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px");
|
|
|
|
ui->savedWordsLaunchBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px");
|
2021-03-25 05:00:19 -07:00
|
|
|
|
|
|
|
QFile stylesheetFile(":/resources/eink.qss");
|
|
|
|
stylesheetFile.open(QFile::ReadOnly);
|
|
|
|
this->setStyleSheet(stylesheetFile.readAll());
|
|
|
|
stylesheetFile.close();
|
|
|
|
QObject::connect(ui->backBtn, SIGNAL(clicked()), this, SLOT(exitSlot()));
|
|
|
|
}
|
|
|
|
|
|
|
|
apps::~apps()
|
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|
|
|
|
|
|
|
|
void apps::exitSlot() {
|
|
|
|
apps::close();
|
|
|
|
}
|
|
|
|
|
|
|
|
void apps::on_scribbleLaunchBtn_clicked()
|
|
|
|
{
|
|
|
|
QProcess process;
|
|
|
|
process.startDetached("scribble", QStringList());
|
|
|
|
qApp->quit();
|
|
|
|
}
|
|
|
|
|
|
|
|
void apps::on_lightmapsLaunchBtn_clicked()
|
|
|
|
{
|
|
|
|
QProcess process;
|
|
|
|
process.startDetached("lightmaps", QStringList());
|
|
|
|
qApp->quit();
|
|
|
|
}
|
|
|
|
|
|
|
|
void apps::on_savedWordsLaunchBtn_clicked()
|
|
|
|
{
|
|
|
|
savedWordsWindow = new savedwords();
|
|
|
|
savedWordsWindow->setAttribute(Qt::WA_DeleteOnClose);
|
|
|
|
savedWordsWindow->showFullScreen();
|
|
|
|
}
|
|
|
|
|
|
|
|
void apps::on_calendarLaunchBtn_clicked()
|
|
|
|
{
|
|
|
|
calendarWindow = new calendarApp();
|
|
|
|
calendarWindow->setAttribute(Qt::WA_DeleteOnClose);
|
|
|
|
calendarWindow->showFullScreen();
|
|
|
|
}
|