Added Calculator launch button in Apps

This commit is contained in:
Nicolas Mailloux 2021-04-13 10:23:12 -04:00
parent 40ca616eee
commit 342bc91f0f
3 changed files with 75 additions and 41 deletions

View file

@ -18,6 +18,7 @@ apps::apps(QWidget *parent) :
ui->lightmapsLaunchBtn->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->calendarLaunchBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px");
ui->savedWordsLaunchBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px"); ui->savedWordsLaunchBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px");
ui->calculatorLaunchBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px");
QFile stylesheetFile(":/resources/eink.qss"); QFile stylesheetFile(":/resources/eink.qss");
stylesheetFile.open(QFile::ReadOnly); stylesheetFile.open(QFile::ReadOnly);
@ -62,3 +63,10 @@ void apps::on_calendarLaunchBtn_clicked()
calendarWindow->setAttribute(Qt::WA_DeleteOnClose); calendarWindow->setAttribute(Qt::WA_DeleteOnClose);
calendarWindow->showFullScreen(); calendarWindow->showFullScreen();
} }
void apps::on_calculatorLaunchBtn_clicked()
{
QProcess process;
process.startDetached("calculator", QStringList());
qApp->quit();
}

1
apps.h
View file

@ -23,6 +23,7 @@ private slots:
void on_lightmapsLaunchBtn_clicked(); void on_lightmapsLaunchBtn_clicked();
void on_savedWordsLaunchBtn_clicked(); void on_savedWordsLaunchBtn_clicked();
void on_calendarLaunchBtn_clicked(); void on_calendarLaunchBtn_clicked();
void on_calculatorLaunchBtn_clicked();
private: private:
Ui::apps *ui; Ui::apps *ui;

107
apps.ui
View file

@ -85,6 +85,18 @@ Back
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item row="3" column="1">
<widget class="QPushButton" name="savedWordsLaunchBtn">
<property name="font">
<font>
<family>Inter</family>
</font>
</property>
<property name="text">
<string>Launch</string>
</property>
</widget>
</item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="calendarLabel"> <widget class="QLabel" name="calendarLabel">
<property name="font"> <property name="font">
@ -98,19 +110,6 @@ Back
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Light Maps</string>
</property>
</widget>
</item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QPushButton" name="calendarLaunchBtn"> <widget class="QPushButton" name="calendarLaunchBtn">
<property name="font"> <property name="font">
@ -123,32 +122,6 @@ Back
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1">
<widget class="QPushButton" name="scribbleLaunchBtn">
<property name="font">
<font>
<family>Inter</family>
<italic>false</italic>
</font>
</property>
<property name="text">
<string>Launch</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="scribbleLabel">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Scribble</string>
</property>
</widget>
</item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QPushButton" name="lightmapsLaunchBtn"> <widget class="QPushButton" name="lightmapsLaunchBtn">
<property name="font"> <property name="font">
@ -175,8 +148,60 @@ Back
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="1" column="0">
<widget class="QPushButton" name="savedWordsLaunchBtn"> <widget class="QLabel" name="label_2">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Light Maps</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="scribbleLabel">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Scribble</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="scribbleLaunchBtn">
<property name="font">
<font>
<family>Inter</family>
<italic>false</italic>
</font>
</property>
<property name="text">
<string>Launch</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_4">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Calculator</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QPushButton" name="calculatorLaunchBtn">
<property name="font"> <property name="font">
<font> <font>
<family>Inter</family> <family>Inter</family>