Maemo package folder added.
[speedfreak] / Client / helpsettingsdialog.cpp
1 /*
2  * Help settings dialog
3  *
4  * @author     Janne Änäkkälä   <janne.anakkala@fudeco.com>
5  * @author     Toni Jussila     <toni.jussila@fudeco.com>
6  * @copyright  (c) 2010 Speed Freak team
7  * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
8  */
9
10 #include "helpsettingsdialog.h"
11 #include "ui_helpsettingsdialog.h"
12
13 /**
14   * Default constructor of this class.
15   */
16 HelpSettingsDialog::HelpSettingsDialog(QWidget *parent) :
17     QDialog(parent),
18     ui(new Ui::HelpSettingsDialog)
19 {
20     ui->setupUi(this);
21     pageCounter = 0;
22
23     ui->labelInfo2->hide();
24     ui->labelLast->hide();
25     ui->pushButtonLast->hide();
26 }
27
28 /**
29   * Default destructor of this class.
30   */
31 HelpSettingsDialog::~HelpSettingsDialog()
32 {
33     delete ui;
34 }
35
36 /**
37   *
38   */
39 void HelpSettingsDialog::changeEvent(QEvent *e)
40 {
41     QDialog::changeEvent(e);
42     switch (e->type()) {
43     case QEvent::LanguageChange:
44         ui->retranslateUi(this);
45         break;
46     default:
47         break;
48     }
49 }
50
51 /**
52   * This slot function called when ever next button clicked.
53   */
54 void HelpSettingsDialog::on_pushButtonNext_clicked()
55 {
56     pageCounter ++;
57
58     if(pageCounter == 1)
59     {
60         ui->labelNext->hide();
61         ui->pushButtonNext->hide();
62         ui->labelInfo1->hide();
63
64         ui->labelInfo2->show();
65         ui->labelLast->show();
66         ui->pushButtonLast->show();
67     }
68 }
69
70 /**
71   * This slot function called when ever last button clicked.
72   */
73 void HelpSettingsDialog::on_pushButtonLast_clicked()
74 {
75     pageCounter --;
76
77     if(pageCounter == 0)
78     {
79         ui->labelInfo2->hide();
80         ui->labelLast->hide();
81         ui->pushButtonLast->hide();
82
83         ui->labelNext->show();
84         ui->pushButtonNext->show();
85         ui->labelInfo1->show();
86     }
87 }