-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforcequitdialog.cpp
executable file
·66 lines (52 loc) · 1.56 KB
/
forcequitdialog.cpp
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#include "forcequitdialog.h"
#include "ui_forcequitdialog.h"
forcequitDialog::forcequitDialog(bool takeaction, QWidget *parent) :
QDialog(parent),
ui(new Ui::forcequitDialog)
{
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
m_action=takeaction;
ui->setupUi(this);
// am start -n org.xbmc.kodi/org.xbmc.kodi.Splash
// am start -n com.semperpax.spmc16/com.semperpax.spmc16.Splash
// launchable-activity
// am force-stop org.xbmc.kodi
if (m_action)
{
ui->title->setText("Start Application");
ui->explainLabel->setText("String: app starting activity");
ui->packagename->setText("org.xbmc.kodi/org.xbmc.kodi.Splash");
}
else
{
ui->title->setText("Stop Application");
ui->explainLabel->setText("String: app package name");
ui->packagename->setText("org.xbmc.kodi");
}
}
forcequitDialog::~forcequitDialog()
{
delete ui;
}
void forcequitDialog::on_kodiButton_clicked()
{
if (m_action)
ui->packagename->setText("org.xbmc.kodi/org.xbmc.kodi.Splash");
else
ui->packagename->setText("org.xbmc.kodi");
}
void forcequitDialog::on_spmcButton_clicked()
{
if (m_action)
ui->packagename->setText("com.semperpax.spmc16/com.semperpax.spmc16.Splash");
else
ui->packagename->setText("com.semperpax.spmc16");
}
void forcequitDialog::on_otherButton_clicked()
{
ui->packagename->setText("");
}
///////////////////////////////////////////////////
QString forcequitDialog::packagename() {
return ui->packagename->text();
}