X-Git-Url: http://git.maemo.org/git/?p=speedfreak;a=blobdiff_plain;f=Client%2Ftopresultdialog.cpp;h=0c81ced54e4e0d9938e0e84e56ad3a0a645681e0;hp=fafff580e08c57cc68f1031da429ad2725a50413;hb=f3a1efc20f17e6473b97c71346cc688f498aaf47;hpb=f7f140509f9767c1062c6dbcab5862353de86e1d diff --git a/Client/topresultdialog.cpp b/Client/topresultdialog.cpp index fafff58..0c81ced 100644 --- a/Client/topresultdialog.cpp +++ b/Client/topresultdialog.cpp @@ -12,10 +12,12 @@ #include "ui_topresultdialog.h" TopResultDialog::TopResultDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::TopResultDialog) + QDialog(parent), ui(new Ui::TopResultDialog) { ui->setupUi(this); + + helpResultsDialog = NULL; + this->setWindowTitle("Top Results"); //Set the amount of requested top results here, untill there is user input @@ -24,6 +26,8 @@ TopResultDialog::TopResultDialog(QWidget *parent) : //Button settings ui->buttonTopRefresh->setAutoFillBackground(true); ui->buttonTopRefresh->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)"); + ui->pushButtonInfo->setAutoFillBackground(true); + ui->pushButtonInfo->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)"); //Clear labels ui->labelInfoToUser->setText(""); @@ -32,6 +36,7 @@ TopResultDialog::TopResultDialog(QWidget *parent) : TopResultDialog::~TopResultDialog() { + qDebug() << "__~TopResultDialog"; delete ui; } @@ -62,6 +67,7 @@ void TopResultDialog::setCompoBoxCategories(QStringList list) void TopResultDialog::showTopList(QString str) { + qDebug() << "__showTopList"; ui->labelTopList->setText(str); } @@ -91,3 +97,29 @@ void TopResultDialog::setLabelInfoToUser(QString infoText) { this->ui->labelInfoToUser->setText(infoText); } + +/** + * This slot function called when ever info button clicked. + */ +void TopResultDialog::on_pushButtonInfo_clicked() +{ + if(!helpResultsDialog) + { + helpResultsDialog = new HelpResultsDialog; + } + connect(helpResultsDialog, SIGNAL(rejected()), this, SLOT(killHelpDialog())); + helpResultsDialog->show(); +} + +/** + * This slot function called when ever dialog rejected. + */ +void TopResultDialog::killHelpDialog() +{ + if(helpResultsDialog) + { + qDebug() << "__Top result kill: helpResultsDialog"; + delete helpResultsDialog; + helpResultsDialog = NULL; + } +}