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 TopResultDialog::~TopResultDialog()
30 void TopResultDialog::changeEvent(QEvent *e)
32 QDialog::changeEvent(e);
34 case QEvent::LanguageChange:
35 ui->retranslateUi(this);
43 void TopResultDialog::on_buttonTopRefresh_clicked()
45 ui->labelTopList->clear();
46 ui->comboBoxTopCategory->clear();
47 emit refreshCategoryList();
50 void TopResultDialog::setCompoBoxCategories(QStringList list)
52 ui->comboBoxTopCategory->addItems(list);
55 void TopResultDialog::showTopList(QString str)
57 ui->labelTopList->setText(str);
60 int TopResultDialog::getRecentCategoryIndex()
62 return recentCategoryIndex;
65 void TopResultDialog::setLimitNr(int number)
70 int TopResultDialog::getLimitNr()
75 void TopResultDialog::on_comboBoxTopCategory_currentIndexChanged(int index)
77 ui->labelTopList->clear();
78 recentCategoryIndex = index;
79 emit refreshTopList(index);
82 void TopResultDialog::setLabelInfoToUser(QString infoText)
84 this->ui->labelInfoToUser->setText(infoText);