-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwelcome.cpp
73 lines (58 loc) · 2 KB
/
welcome.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
67
68
69
70
71
72
73
/*
* Copyright (c) 2013 Anke Boersma <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*/
#include <QtGui>
#include "welcome.h"
#include <QProcess>
// if we include <QtGui> there is no need to include every class used: <QString>, <QFileDialog>,...
welcome::welcome(QWidget *parent)
{
setupUi(this); // this sets up GUI
Qt::WindowFlags flags;
flags = Qt::Window
| Qt::WindowMinimizeButtonHint
| Qt::WindowCloseButtonHint;
setFixedSize(550,400);
setWindowFlags( flags );
// signals/slots mechanism in action
connect( pushButton_install, SIGNAL( clicked() ), this, SLOT( InstallKaOS() ) );
connect( pushButton_passw, SIGNAL( clicked() ), this, SLOT( Passwords() ) );
connect( pushButton_about, SIGNAL( clicked() ), this, SLOT( About() ) );
connect( pushButton_package, SIGNAL( clicked() ), this, SLOT( PackageList() ) );
connect( pushButton_guide, SIGNAL( clicked() ), this, SLOT( Guide() ) );
connect( pushButton_forum, SIGNAL( clicked() ), this, SLOT( Forum() ) );
}
void welcome::InstallKaOS()
{
QProcess::startDetached("/usr/bin/launch-installer.sh");
}
void welcome::Passwords()
{
QMessageBox::about(this,"Passwords",
"Correct passwords for use in the live session:\n"
"root: root / root\n"
"user: live / live\n"
"Hope you enjoy :)\n");
}
void welcome::About()
{
QDesktopServices::openUrl(QUrl("file:///home/live/Desktop/info/about.pdf"));
}
void welcome::PackageList()
{
QProcess::startDetached("/home/live/Desktop/info/packages.sh");
}
void welcome::Guide()
{
QDesktopServices::openUrl(QUrl("file:///home/live/Desktop/info/guide.pdf"));
}
void welcome::Forum()
{
QDesktopServices::openUrl(QUrl("http://kaosx.us/phpBB3"));
}