-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlauncher.cpp
More file actions
32 lines (25 loc) · 834 Bytes
/
launcher.cpp
File metadata and controls
32 lines (25 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "launcher.h"
#include <QDebug>
Launcher::Launcher(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);
connect(ui.ide, SIGNAL(clicked()), this, SLOT(ide()));
connect(ui.img, SIGNAL(clicked()), this, SLOT(img()));
connect(ui.map, SIGNAL(clicked()), this, SLOT(map()));
connect(ui.wav, SIGNAL(clicked()), this, SLOT(wav()));
connect(ui.sng, SIGNAL(clicked()), this, SLOT(sng()));
}
Launcher::~Launcher()
{
}
void Launcher::launch(QString filename)
{
if (!QProcess::startDetached(filename))
qDebug() << qPrintable(tr("%1 does not exist!").arg(filename));
}
void Launcher::ide() { launch("propelleride"); }
void Launcher::img() { launch("lsimage"); }
void Launcher::map() { launch("lsmap"); }
void Launcher::wav() { launch("lswave"); }
void Launcher::sng() { launch("lsmusic"); }