#include "topresultdialog.h"
#include "ui_topresultdialog.h"
+/**
+ * Constructor of this class
+ */
TopResultDialog::TopResultDialog(QWidget *parent) :
QDialog(parent), ui(new Ui::TopResultDialog)
{
ui->labelTopList->setText("");
}
+/**
+ * Destructor of this class
+ */
TopResultDialog::~TopResultDialog()
{
qDebug() << "__~TopResultDialog";
delete ui;
}
+/**
+ *
+ */
void TopResultDialog::changeEvent(QEvent *e)
{
QDialog::changeEvent(e);
}
}
-
+/**
+ * This slot function called when ever refresh button clicked.
+ */
void TopResultDialog::on_buttonTopRefresh_clicked()
{
ui->labelTopList->clear();
emit refreshCategoryList();
}
+/**
+ * Set categories compobox.
+ *
+ * @param QStringList list
+ */
void TopResultDialog::setCompoBoxCategories(QStringList list)
{
ui->comboBoxTopCategory->addItems(list);
}
+/**
+ * Show top list.
+ *
+ * @param QString str
+ */
void TopResultDialog::showTopList(QString str)
{
qDebug() << "__showTopList";
ui->labelTopList->setText(str);
}
+/**
+ * Get recent category index.
+ *
+ * @return int category index
+ */
int TopResultDialog::getRecentCategoryIndex()
{
return recentCategoryIndex;
}
+/**
+ * Set limit nr.
+ *
+ * @param int number
+ */
void TopResultDialog::setLimitNr(int number)
{
limitNr = number;
}
+/**
+ * Get limit nr.
+ *
+ * @return int limit nr
+ */
int TopResultDialog::getLimitNr()
{
return limitNr;
}
+/**
+ * This slot function called when ever top category combobox current index changed.
+ *
+ * @param int index
+ */
void TopResultDialog::on_comboBoxTopCategory_currentIndexChanged(int index)
{
ui->labelTopList->clear();
emit refreshTopList(index);
}
+/**
+ * Set label info to user.
+ *
+ * @param QString info text
+ */
void TopResultDialog::setLabelInfoToUser(QString infoText)
{
this->ui->labelInfoToUser->setText(infoText);