1 #include "searchoptions.h"
2 #include "ui_searchoptions.h"
4 SearchOptions::SearchOptions(QWidget *parent) :
6 ui(new Ui::SearchOptions)
11 SearchOptions::~SearchOptions()
16 void SearchOptions::changeEvent(QEvent *e)
18 QDialog::changeEvent(e);
20 case QEvent::LanguageChange:
21 ui->retranslateUi(this);
28 void SearchOptions::setSelections(bool pkgname, bool dispname, bool dshort, bool dlong)
30 ui->checkBox_pkgname->setChecked(pkgname);
31 ui->checkBox_displayname->setChecked(dispname);
32 ui->checkBox_descshort->setChecked(dshort);
33 ui->checkBox_desclong->setChecked(dlong);
36 bool SearchOptions::searchPkgName()
38 return ui->checkBox_pkgname->isChecked();
41 bool SearchOptions::searchDisplayName()
43 if( !ui->checkBox_pkgname->isChecked() &&
44 !ui->checkBox_descshort->isChecked() &&
45 !ui->checkBox_desclong->isChecked() )
50 return ui->checkBox_displayname->isChecked();
53 bool SearchOptions::searchDescShort()
55 return ui->checkBox_descshort->isChecked();
58 bool SearchOptions::searchDescLong()
60 return ui->checkBox_desclong->isChecked();