#include "extra.h"
#endif
+namespace The {
+QMap<QString, QAction*>* globalActions();
+}
+
RefineSearchWidget::RefineSearchWidget(QWidget *parent) :
QWidget(parent) {
dirty = false;
void RefineSearchWidget::setSearchParams(SearchParams *params) {
setup();
+ The::globalActions()->value("refine-search")->setEnabled(params);
+ setEnabled(params);
+
+ if (!params) return;
+
QToolBar* bar;
QAction* action;
action = bar->actions().at(params->quality());
if (action) action->setChecked(true);
+ disconnect(SIGNAL(paramChanged(QString,QVariant)));
connect(this, SIGNAL(paramChanged(QString,QVariant)),
params, SLOT(setParam(QString,QVariant)),
Qt::UniqueConnection);