Get category when top dialog started.
[speedfreak] / Client / helpdialog.cpp
1 #include "helpdialog.h"
2 #include "ui_helpdialog.h"
3
4 HelpDialog::HelpDialog(QWidget *parent) :
5     QDialog(parent),
6     ui(new Ui::HelpDialog)
7 {
8     ui->setupUi(this);
9     helpResultsDialog = NULL;
10     helpAccelerationDialog = NULL;
11     helpRoutingDialog = NULL;
12     creditsDialog = NULL;
13 }
14
15 HelpDialog::~HelpDialog()
16 {
17     delete ui;
18 }
19
20 void HelpDialog::changeEvent(QEvent *e)
21 {
22     QDialog::changeEvent(e);
23     switch (e->type()) {
24     case QEvent::LanguageChange:
25         ui->retranslateUi(this);
26         break;
27     default:
28         break;
29     }
30 }
31
32
33 void HelpDialog::on_pushButtonHelpResults_clicked()
34 {
35     if(!helpResultsDialog)
36     {
37         helpResultsDialog = new HelpResultsDialog;
38     }
39     helpResultsDialog->show();
40 }
41
42 void HelpDialog::on_pushButtonHelpAccelerate_clicked()
43 {
44     if(!helpAccelerationDialog)
45     {
46         helpAccelerationDialog = new HelpAccelerationDialog;
47     }
48     helpAccelerationDialog->show();
49 }
50
51 void HelpDialog::on_pushButtonHelpRoute_clicked()
52 {
53     if(!helpRoutingDialog)
54     {
55         helpRoutingDialog = new HelpRoutingDialog;
56     }
57     helpRoutingDialog->show();
58 }
59
60 void HelpDialog::on_pushButtonCredits_clicked()
61 {
62     if(!creditsDialog)
63     {
64         creditsDialog = new CreditsDialog;
65     }
66     creditsDialog->show();
67 }