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 TopResultDialog::~TopResultDialog()
34 void TopResultDialog::changeEvent(QEvent *e)
36 QDialog::changeEvent(e);
38 case QEvent::LanguageChange:
39 ui->retranslateUi(this);
47 void TopResultDialog::on_buttonTopRefresh_clicked()
49 ui->labelTopList->clear();
50 ui->comboBoxTopCategory->clear();
51 emit refreshCategoryList();
54 void TopResultDialog::setCompoBoxCategories(QStringList list)
56 ui->comboBoxTopCategory->addItems(list);
59 void TopResultDialog::showTopList(QString str)
61 ui->labelTopList->setText(str);
64 int TopResultDialog::getRecentCategoryIndex()
66 return recentCategoryIndex;
69 void TopResultDialog::setLimitNr(int number)
74 int TopResultDialog::getLimitNr()
79 void TopResultDialog::on_comboBoxTopCategory_currentIndexChanged(int index)
81 ui->labelTopList->clear();
82 recentCategoryIndex = index;
83 emit refreshTopList(index);
86 void TopResultDialog::setLabelInfoToUser(QString infoText)
88 this->ui->labelInfoToUser->setText(infoText);