Beispiel #1
0
void SettingsBase::initApplication()
{
    // Prepare the menu of all modules
    categories = KServiceTypeTrader::self()->query("SystemSettingsCategory");
    modules = KServiceTypeTrader::self()->query("KCModule", "[X-KDE-System-Settings-Parent-Category] != ''");
    modules += KServiceTypeTrader::self()->query("SystemSettingsExternalApp");
    rootModule = new MenuItem( true, 0 );
    initMenuList(rootModule);
    // Handle lost+found modules...
    if (lostFound) {
        for (int i = 0; i < modules.size(); ++i) {
            const KService::Ptr entry = modules.at(i);
            MenuItem * infoItem = new MenuItem(false, lostFound);
            infoItem->setService( entry );
            qDebug() << "Added " << entry->name();
        }
    }

    // Prepare the Base Data
    BaseData::instance()->setMenuItem( rootModule );
    // Load all possible views
    const KService::List pluginObjects = KServiceTypeTrader::self()->query( "SystemSettingsView" );
    const int nbPlugins = pluginObjects.count();
    for( int pluginsDone = 0; pluginsDone < nbPlugins ; ++pluginsDone ) {
        KService::Ptr activeService = pluginObjects.at( pluginsDone );
        QString error;
        BaseMode * controller = activeService->createInstance<BaseMode>(this, QVariantList(), &error);
        if( error.isEmpty() ) {
            possibleViews.insert( activeService->library(), controller );
            controller->init( activeService );
            connect(controller, SIGNAL(changeToolBarItems(BaseMode::ToolBarItems)), this, SLOT(changeToolBar(BaseMode::ToolBarItems)));
            connect(controller, SIGNAL(actionsChanged()), this, SLOT(updateViewActions()));
            connect(searchText, SIGNAL(textChanged(QString)), controller, SLOT(searchChanged(QString)));
            connect(controller, SIGNAL(viewChanged(bool)), this, SLOT(viewChange(bool)));
        } else {
Beispiel #2
0
void WebSearchBar::setupEngines()
{
    disconnect(m_searchManager, SIGNAL(enginesChanged()), this, SLOT(setupEngines()));
    m_reloadingEngines = true;

    QString activeEngine = m_searchManager->startingEngineName();

    if (m_boxSearchType->allItems().count() != 0) {
        activeEngine = m_activeEngine.name;
    }

    m_boxSearchType->clearItems();

    foreach (const SearchEngine &en, m_searchManager->allEngines()) {
        ButtonWithMenu::Item item;
        item.icon = en.icon;
        item.text = en.name;
        QVariant v;
        v.setValue<SearchEngine>(en);
        item.userData = v;

        m_boxSearchType->addItem(item);

        if (item.text == activeEngine) {
            m_boxSearchType->setCurrentItem(item, false);
        }
    }

    searchChanged(m_boxSearchType->currentItem());

    connect(m_searchManager, SIGNAL(enginesChanged()), this, SLOT(setupEngines()));
    m_reloadingEngines = false;
}
Beispiel #3
0
//==========
//    PUBLIC
//==========
page_main::page_main(QWidget *parent) : PageWidget(parent), ui(new Ui::page_main()){
  ui->setupUi(this);
  findShort = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_F), this, SLOT(showFind()));
  ui->treeWidget->setMouseTracking(true);
  ui->treeWidget->setSortingEnabled(false); //the QTreeView sort flag always puts them in backwards (reverse-alphabetical)
  connect(ui->treeWidget, SIGNAL(itemActivated(QTreeWidgetItem*,int)), this, SLOT(itemTriggered(QTreeWidgetItem*, int)) );
  connect(ui->treeWidget, SIGNAL(itemPressed(QTreeWidgetItem*,int)), this, SLOT(itemTriggered(QTreeWidgetItem*, int)) );

  connect(ui->lineEdit, SIGNAL(textChanged(QString)), this, SLOT(searchChanged(QString)) );
}
Beispiel #4
0
/**
 * Constructeur
 */
SearchWidget::SearchWidget(QWidget *parent) :
  QWidget(parent)
{

  text = new QLineEdit();
  connect(text,SIGNAL(textChanged(QString)),this,SIGNAL(searchChanged(QString)));

  QVBoxLayout *layout = new QVBoxLayout();
  layout->addWidget(text);

  QHBoxLayout *buttonsLayout = new QHBoxLayout();
  layout->addLayout(buttonsLayout);

  setLayout(layout);
}
Beispiel #5
0
MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI) {
    ui->setupUi(this); //load the designer file
    //setupIcons();
    ui->radio_apps->setChecked(true); //always default to starting here
    ui->tool_stop->setVisible(false); //no search running initially
    ui->tool_configure->setVisible(false); //app search initially set

    livetime = new QTimer(this);
    livetime->setInterval(300); //1/3 second for live searches
    livetime->setSingleShot(true);

    workthread = new QThread(this);
    workthread->setObjectName("Lumina Search Process");

    searcher = new Worker();
    searcher->moveToThread(workthread);

    closeShort = new QShortcut(QKeySequence(tr("Esc")), this);

    //Setup the connections
    connect(livetime, SIGNAL(timeout()), this, SLOT(startSearch()) );
    connect(this, SIGNAL(SearchTerm(QString, bool)), searcher, SLOT(StartSearch(QString, bool)) );
    connect(searcher, SIGNAL(FoundItem(QString)), this, SLOT(foundSearchItem(QString)) );
    connect(searcher, SIGNAL(SearchUpdate(QString)), this, SLOT(searchMessage(QString)) );
    connect(searcher, SIGNAL(SearchDone()), this, SLOT(searchFinished()) );
    connect(ui->tool_stop, SIGNAL(clicked()), this, SLOT(stopSearch()) );
    connect(ui->push_done, SIGNAL(clicked()), this, SLOT(closeApplication()) );
    connect(ui->push_launch, SIGNAL(clicked()), this, SLOT(LaunchItem()) );
    connect(ui->line_search, SIGNAL(textEdited(QString)), this, SLOT(searchChanged()) );
    connect(ui->line_search, SIGNAL(returnPressed()), this, SLOT(LaunchItem()) );
    connect(ui->radio_apps, SIGNAL(toggled(bool)), this, SLOT(searchTypeChanged()) );
    connect(ui->listWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(LaunchItem(QListWidgetItem*)) );
    connect(ui->listWidget, SIGNAL(itemActivated(QListWidgetItem*)), this, SLOT(LaunchItem(QListWidgetItem*)) );
    connect(ui->tool_configure, SIGNAL(clicked()), this, SLOT(configureSearch()) );
    connect(closeShort, SIGNAL(activated()), this, SLOT( close() ) );

    //Setup the settings file
    QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath()+"/.lumina");
    settings = new QSettings("LuminaDE", "lumina-search",this);
    searcher->startDir = settings->value("StartSearchDir", QDir::homePath()).toString();
    searcher->skipDirs = settings->value("SkipSearchDirs", QStringList()).toStringList();
    updateDefaultStatusTip();
    this->show();
    workthread->start();
    QTimer::singleShot(0,this, SLOT(setupIcons()) );
}
Beispiel #6
0
WebSearchBar::WebSearchBar(BrowserWindow* window)
    : LineEdit(window)
    , m_window(window)
    , m_reloadingEngines(false)
{
    setObjectName("websearchbar");
    setDragEnabled(true);

    m_buttonSearch = new WebSearchBar_Button(this);

    m_boxSearchType = new ButtonWithMenu(this);
    m_boxSearchType->setObjectName("websearchbar-searchprovider-comobobox");
    // RTL Support
    // If we don't add 'm_boxSearchType' by following code, then we should use suitable padding-left value
    // but then, when typing RTL text the layout dynamically changed and within RTL layout direction
    // padding-left is equivalent to padding-right and vice versa, and because style sheet is
    // not changed dynamically this create padding problems.
    addWidget(m_boxSearchType, LineEdit::LeftSide);

    addWidget(m_buttonSearch, LineEdit::RightSide);

    connect(m_buttonSearch, SIGNAL(clicked(QPoint)), this, SLOT(search()));
    connect(m_buttonSearch, SIGNAL(middleClicked(QPoint)), this, SLOT(searchInNewTab()));
    connect(m_boxSearchType, SIGNAL(activeItemChanged(ButtonWithMenu::Item)), this, SLOT(searchChanged(ButtonWithMenu::Item)));

    setWidgetSpacing(0);

    m_searchManager = mApp->searchEnginesManager();
    connect(m_boxSearchType->menu(), SIGNAL(aboutToShow()), this, SLOT(aboutToShowMenu()));

    m_completer = new QCompleter(this);
    m_completer->setCompletionMode(QCompleter::UnfilteredPopupCompletion);
    m_completerModel = new QStringListModel(this);
    m_completer->setModel(m_completerModel);
    m_completer->popup()->setMinimumHeight(90);
    setCompleter(m_completer);

    m_openSearchEngine = new OpenSearchEngine(this);
    m_openSearchEngine->setNetworkAccessManager(mApp->networkManager());
    connect(m_openSearchEngine, SIGNAL(suggestions(QStringList)), this, SLOT(addSuggestions(QStringList)));
    connect(this, SIGNAL(textEdited(QString)), m_openSearchEngine, SLOT(requestSuggestions(QString)));

    editAction(PasteAndGo)->setText(tr("Paste And &Search"));
    editAction(PasteAndGo)->setIcon(QIcon::fromTheme(QSL("edit-paste")));
    connect(editAction(PasteAndGo), SIGNAL(triggered()), this, SLOT(pasteAndGo()));

    QTimer::singleShot(0, this, SLOT(setupEngines()));
}
Beispiel #7
0
void ChatViewSearchBar::search()
{
    emit searchChanged(ui.searchEditLine->text());
}
Beispiel #8
0
Playlist::Playlist(PlaylistWidget::ListTypes listType, QString title, quint64 hash, QObject *parent) :
    QObject(parent)
{
    m_listType = listType;
    m_sTitle = title;
    m_bCustomTitle = false;

    m_Settings = Settings::instance();
    connect(m_Settings, SIGNAL(changed()), SLOT(onSettingsChanged()));

    m_bLoadingState = false;
    m_bShuffleList = m_Settings->getValue("player/shuffle").toInt() > 1 ? true : false;

    m_LastTrack = 0;

    m_bLoadMeta = false;
    m_bUseMeta = false;

    m_bTitleByContent = m_Settings->getValue("playlist/tabs_by_content").toBool();

    m_Auth = Auth::instance();
    connect(m_Auth, SIGNAL(authComplete()), SLOT(update()));


    // Set hash
    if(hash == 0) {
        QDateTime *time = new QDateTime(QDateTime::currentDateTime());
        m_Hash = time->toMSecsSinceEpoch();
        m_bNewly = true;
    } else {
        m_Hash = hash;
        m_bNewly = false;
    }

    // Create playlist widget
    m_listWidget = new PlaylistWidget(m_listType);
    connect(this, SIGNAL(trackAdded()), m_listWidget, SLOT(trackAdded()));
    connect(m_listWidget, SIGNAL(trackActivate(Track*)), SLOT(trackActivate(Track*)));

    // Connect key events
    connect(m_listWidget, SIGNAL(skQueue()), SLOT(addToQueue()));
    connect(m_listWidget, SIGNAL(skRemove()), SLOT(removeTrack()));
    connect(m_listWidget, SIGNAL(skDownload()), SLOT(downloadTrack()));

    // Create object of parser
    m_Parser = new Parser(this);
    connect(m_Parser, SIGNAL(newTrack(Track*)), SLOT(addTrack(Track*)));
    connect(m_Parser, SIGNAL(busy()), SLOT(parserBusy()));
    connect(m_Parser, SIGNAL(free()), SLOT(parserFree()));
    connect(m_Parser, SIGNAL(savePlaylist()), SLOT(save()));
    connect(m_Parser, SIGNAL(busy()), m_listWidget, SLOT(showLoading()));
    connect(m_Parser, SIGNAL(free()), m_listWidget, SLOT(hideLoading()));

    // Create actions parser
    m_vkActions = VkActions::instance();
    connect(m_vkActions, SIGNAL(message(QString,QString)), SIGNAL(message(QString,QString)));

    switch(m_listType) {
        case PlaylistWidget::Search:
            connect(m_listWidget, SIGNAL(searchChanged(QString)), SLOT(searchChanged(QString)));
            connect(m_listWidget, SIGNAL(loadMore()), m_Parser, SLOT(loadMoreResults()));
        break;
        case PlaylistWidget::AudioLib:
            connect(m_listWidget->friendsList(), SIGNAL(friendSelected(QString,QString,QString)), SLOT(librarySelected(QString,QString,QString)));
            connect(m_listWidget, SIGNAL(refresh()), SLOT(refresh()));
        break;
        case PlaylistWidget::Suggestions:
            connect(m_listWidget, SIGNAL(loadMore()), m_Parser, SLOT(loadMoreResults()));
            connect(m_listWidget, SIGNAL(refresh()), SLOT(refresh()));
        break;
        case PlaylistWidget::DbSearch:
            connect(m_listWidget, SIGNAL(searchChanged(QString)), SLOT(searchChanged(QString)));
            connect(m_listWidget, SIGNAL(newTrack(Track*)), SLOT(addTrack(Track*)));
            connect(m_listWidget, SIGNAL(clearList()), SLOT(clearList()));
        break;
    }

    m_Model = new QStandardItemModel(this);

    m_ProxyModel = new QSortFilterProxyModel(this);
    m_ProxyModel->setSourceModel(m_Model);
    m_ProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
    m_ProxyModel->setFilterKeyColumn(2);

    m_listWidget->setModel(m_ProxyModel);

    connect(m_listWidget, SIGNAL(listSearchChanged(QString)), SLOT(setListSearch(QString)));

    createMenus();

    load();

    if(type() == PlaylistWidget::AudioLib &&
       m_bNewly &&
       m_Settings->getValue("playlist/autoload_library").toBool()
       )
        librarySelected(m_Auth->vkId(), "0", tr("My Library"));

    // Actions on newly created plalylists
    if(m_bNewly) {
        switch(m_listType) {
            case PlaylistWidget::Search:
                m_listWidget->focusOnSearch();
            break;
            case PlaylistWidget::AudioLib:
            if(m_Settings->getValue("playlist/autoload_library").toBool())
                librarySelected(m_Auth->vkId(), "0", tr("My Library"));
            break;
            case PlaylistWidget::Suggestions:
                refresh();
            break;
            case PlaylistWidget::DbSearch:
                // Unused
            break;
        }
    }
}
Beispiel #9
0
	SearchWidget::SearchWidget(int _offset, bool _isWithButton, QWidget* _parent)
        : QWidget(_parent)
	{
        if (this->objectName().isEmpty())
            this->setObjectName(QStringLiteral("search_widget"));
        active_ = false;
        parent_search_vertical_layout_ = new QVBoxLayout(this);
        parent_search_vertical_layout_->setContentsMargins(0, 0, 0, 0);
        parent_search_vertical_layout_->setSpacing(0);
        horizontal_search_layout_ = new QHBoxLayout();
        horizontal_search_layout_->setContentsMargins(0, 0, 0, Utils::scale_value(0));
        parent_search_vertical_layout_->addLayout(horizontal_search_layout_);

        horizontal_search_layout_->addSpacing(Utils::scale_value(_offset - 8));

        search_icon_ = new Ui::CustomButton(this, ":/resources/contr_search_100.png");
        search_icon_->setOffsets(Utils::scale_value(8), Utils::scale_value(0));
        search_icon_->setActiveImage(":/resources/contr_search_100_active.png");
        search_icon_->setFixedWidth(Utils::scale_value(34));
        search_icon_->setFixedHeight(Utils::scale_value(53));
        search_icon_->setStyleSheet("border: none;");
        horizontal_search_layout_->addWidget(search_icon_);

        parent_widget_ = new QWidget(this);
        search_vertical_layout_ = new QVBoxLayout(parent_widget_);
        search_vertical_layout_->setContentsMargins(0, Utils::scale_value(5), 0, 0);
        search_edit_ = new LineEditEx(this);
        search_edit_->setProperty("SearchEdit", true);
        search_edit_->setPlaceholderText(QT_TRANSLATE_NOOP("search_widget", "Search"));
        search_edit_->setContentsMargins(Utils::scale_value(6), 0, Utils::scale_value(22), 0);
        search_edit_->setAttribute(Qt::WA_MacShowFocusRect, false);
        search_edit_->setStyleSheet(QString("background-color: transparent"));
        Testing::setAccessibleName(search_edit_, "search_edit");
        search_vertical_layout_->addSpacing(Utils::scale_value(0));
        search_vertical_layout_->addWidget(search_edit_);
        horizontal_search_layout_->addWidget(parent_widget_);

        search_edit_icon_ = new CustomButton(this, ":/resources/contr_compose_100.png");
        search_edit_icon_->setOffsets(Utils::scale_value(0), Utils::scale_value(0));
		search_edit_icon_->setOffsetsForActive(Utils::scale_value(2), Utils::scale_value(0));
        search_edit_icon_->setHoverImage(":/resources/contr_compose_100_hover.png");
        search_edit_icon_->setActiveImage(":/resources/contr_clear_100.png");
        search_edit_icon_->setFixedWidth(Utils::scale_value(50));
        search_edit_icon_->setFixedHeight(Utils::scale_value(53));
		search_edit_icon_->setCursor(Qt::PointingHandCursor);
		search_edit_icon_->setFocusPolicy(Qt::NoFocus);
        search_edit_icon_->setStyleSheet("background-color: transparent;");
        Testing::setAccessibleName(search_edit_icon_, "CreateGroupChat");
		horizontal_search_layout_->addWidget(search_edit_icon_);

        horizontal_line_widget_ = new QWidget(this);
        horizontal_line_widget_->setFixedHeight(Utils::scale_value(1));
        horizontal_line_widget_->setStyleSheet(QString("background-color: #dadada;"));
        parent_search_vertical_layout_->addSpacing(0);
        widget_2_ = new QWidget(this);
        horizontal_layout_2_ = new QHBoxLayout(widget_2_);
        horizontal_layout_2_->setContentsMargins(Utils::scale_value(_isWithButton ? 24 : 16), 0, Utils::scale_value(_isWithButton ? 24 : 60), Utils::scale_value(10));
        horizontal_layout_2_->addWidget(horizontal_line_widget_);
        parent_search_vertical_layout_->addWidget(widget_2_);

        QMetaObject::connectSlotsByName(this);
        connect(search_edit_, SIGNAL(textEdited(QString)), this, SLOT(searchChanged(QString)), Qt::QueuedConnection);
        connect(search_edit_, SIGNAL(clicked()), this, SLOT(searchStarted()), Qt::QueuedConnection);
        connect(search_edit_, SIGNAL(escapePressed()), this, SLOT(searchCompleted()), Qt::QueuedConnection);
        connect(search_edit_, SIGNAL(enter()), this, SLOT(editEnterPressed()), Qt::QueuedConnection);
        connect(search_edit_, SIGNAL(upArrow()), this, SLOT(editUpPressed()), Qt::QueuedConnection);
        connect(search_edit_, SIGNAL(downArrow()), this, SLOT(editDownPressed()), Qt::QueuedConnection);
        connect(search_edit_, SIGNAL(focusOut()), this, SLOT(focusedOut()), Qt::QueuedConnection);
        connect(search_edit_icon_, SIGNAL(clicked()), this, SLOT(clearPressed()), Qt::QueuedConnection);

		setActive(false);
	}
Beispiel #10
0
QWidget* RKObjectListViewSettings::filterWidget (QWidget *parent) {
	RK_TRACE (APP);

	if (filter_widget) return filter_widget;

	filter_widget = new QWidget (parent);

	QVBoxLayout *layout = new QVBoxLayout (filter_widget);
	layout->setContentsMargins (0, 0, 0, 0);
	QHBoxLayout* hlayout = new QHBoxLayout ();
	hlayout->setContentsMargins (0, 0, 0, 0);
	layout->addLayout (hlayout);

	sline = new RKDynamicSearchLine (filter_widget);
	filter_widget->setFocusProxy (sline);
	sline->setModelToFilter (this);
	RKCommonFunctions::setTips (sline->regexpTip (), sline);
	connect (sline, SIGNAL (searchChanged(QRegExp)), this, SLOT (filterSettingsChanged()));
	hlayout->addWidget (sline);
	QPushButton* expander = new QPushButton (filter_widget);
	expander->setIcon (RKStandardIcons::getIcon (RKStandardIcons::ActionConfigureGeneric));
	expander->setCheckable (true);
	hlayout->addWidget (expander);

	filter_widget_expansion = new QWidget (filter_widget);
	layout->addWidget (filter_widget_expansion);
	connect (expander, SIGNAL (toggled(bool)), filter_widget_expansion, SLOT (setShown(bool)));
	filter_widget_expansion->hide ();
	QVBoxLayout *elayout = new QVBoxLayout (filter_widget_expansion);
	elayout->setContentsMargins (0, 0, 0, 0);

	QGroupBox *box = new QGroupBox (i18nc ("Fields==columns in tree view", "Fields to search in"), filter_widget_expansion);
	elayout->addWidget (box);
	QVBoxLayout *boxvlayout = new QVBoxLayout (box);
	QHBoxLayout *boxhlayout = new QHBoxLayout ();
	boxvlayout->addLayout (boxhlayout);
	boxhlayout->setContentsMargins (0, 0, 0, 0);
	filter_on_name_box = new QCheckBox (i18n ("Name"));
	boxhlayout->addWidget (filter_on_name_box);
	filter_on_label_box = new QCheckBox (i18n ("Label"));
	boxhlayout->addWidget (filter_on_label_box);
	filter_on_class_box = new QCheckBox (i18n ("Class"));
	boxhlayout->addWidget (filter_on_class_box);

	filter_on_name_box->setChecked (filter_on_name);
	filter_on_label_box->setChecked (filter_on_label);
	filter_on_class_box->setChecked (filter_on_class);
	connect (filter_on_name_box, SIGNAL(clicked(bool)), this, SLOT (filterSettingsChanged()));
	connect (filter_on_label_box, SIGNAL(clicked(bool)), this, SLOT (filterSettingsChanged()));
	connect (filter_on_class_box, SIGNAL(clicked(bool)), this, SLOT (filterSettingsChanged()));

	depth_box = new QComboBox ();
	depth_box->addItem (i18n ("Top level objects, only"));
	depth_box->addItem (i18n ("Top level objects, and direct children"));
	RKCommonFunctions::setTips (i18n ("Depth of search in the object tree.<ul>"
	                                      "<li><i>%1</i> means looking for matches in objects that are on the search path, only (in <i>.GlobalEnv</i> or a loaded package)</li>"
	                                      "<li><i>%2</i> includes direct child objects. In this case, the list will show matching objects on the search path, <i>and</i> objects on the search path that hold matching child objects.</li>", depth_box->itemText (0), depth_box->itemText (1)), depth_box);
	boxvlayout->addWidget (depth_box);

	depth_box->setCurrentIndex (1);
	connect (depth_box, SIGNAL (currentIndexChanged(QString)), this, SLOT (filterSettingsChanged()));

	type_box = new QComboBox ();
	type_box->addItem (i18n ("Show all objects"));
	type_box->addItem (i18n ("Show functions, only"));
	type_box->addItem (i18n ("Show objects excluding functions"));
	RKCommonFunctions::setTips (i18n ("When looking for a particular function, you may want to exclude 'data' objects, and vice versa. This control allows you to limit the list to objects that are not (or do not contain) functions, or to those that are (or contain) functions."), type_box);
	boxvlayout->addWidget (type_box);

	if (hide_functions) type_box->setCurrentIndex (2);
	else if (hide_non_functions) type_box->setCurrentIndex (1);
	else type_box->setCurrentIndex (0);
	connect (type_box, SIGNAL (currentIndexChanged(QString)), this, SLOT (filterSettingsChanged()));

	QHBoxLayout *bottom_layout = new QHBoxLayout (filter_widget);
	layout->addLayout (bottom_layout);
	QCheckBox* hidden_objects_box = new QCheckBox (i18n ("Show Hidden Objects"));
	hidden_objects_box->setChecked (persistent_settings[ShowObjectsHidden]);
	connect (hidden_objects_box, SIGNAL (clicked(bool)), persistent_settings_actions[ShowObjectsHidden], SLOT (setChecked(bool)));
	connect (persistent_settings_actions[ShowObjectsHidden], SIGNAL (triggered(bool)), hidden_objects_box, SLOT (setChecked(bool)));
	bottom_layout->addWidget (hidden_objects_box);

	// KF5 TODO: In frameworks, there is a function KIconUtils::kIconAddOverlay(). We could use this to overlay "view-filter" and discard, then use that
	// in a tool button (with tooltip), in order to save space.
	reset_filters_button = new QPushButton (i18nc ("Width is limited, please opt for something that is not much longer than the English string. Simply 'Clear'/'Reset' should be good enough to understand the function.", "Reset filters"), filter_widget);
	connect (reset_filters_button, SIGNAL (clicked(bool)), this, SLOT(resetFilters()));
	RKCommonFunctions::setTips (i18n ("Discards the current object search filters"), reset_filters_button);
	reset_filters_button->hide ();
	bottom_layout->addWidget (reset_filters_button);

	return filter_widget;
}
void PeopleApplication::searchCommit()
{
    searchChanged();
    searchCancel();
}