4 * @author Olavi Pulkkinen <olavi.pulkkinena@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
11 #include "topresultdialog.h"
12 #include "ui_topresultdialog.h"
14 TopResultDialog::TopResultDialog(QWidget *parent) :
16 ui(new Ui::TopResultDialog)
19 this->setWindowTitle("Top Results");
21 //Set the amount of requested top results here, untill there is user input
25 ui->buttonTopRefresh->setAutoFillBackground(true);
26 ui->buttonTopRefresh->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
29 ui->labelInfoToUser->setText("");
30 ui->labelTopList->setText("");
33 TopResultDialog::~TopResultDialog()
38 void TopResultDialog::changeEvent(QEvent *e)
40 QDialog::changeEvent(e);
42 case QEvent::LanguageChange:
43 ui->retranslateUi(this);
51 void TopResultDialog::on_buttonTopRefresh_clicked()
53 ui->labelTopList->clear();
54 ui->comboBoxTopCategory->clear();
55 emit refreshCategoryList();
58 void TopResultDialog::setCompoBoxCategories(QStringList list)
60 ui->comboBoxTopCategory->addItems(list);
63 void TopResultDialog::showTopList(QString str)
65 ui->labelTopList->setText(str);
68 int TopResultDialog::getRecentCategoryIndex()
70 return recentCategoryIndex;
73 void TopResultDialog::setLimitNr(int number)
78 int TopResultDialog::getLimitNr()
83 void TopResultDialog::on_comboBoxTopCategory_currentIndexChanged(int index)
85 ui->labelTopList->clear();
86 recentCategoryIndex = index;
87 emit refreshTopList(index);
90 void TopResultDialog::setLabelInfoToUser(QString infoText)
92 this->ui->labelInfoToUser->setText(infoText);