DolphinSearchBox::DolphinSearchBox(QWidget* parent) :
QWidget(parent),
m_searchInput(0),
- m_searchButton(0),
m_completer(0)
{
QHBoxLayout* hLayout = new QHBoxLayout(this);
hLayout->addWidget(m_searchInput);
connect(m_searchInput, SIGNAL(returnPressed()),
this, SLOT(emitSearchSignal()));
-
- m_searchButton = new QToolButton(this);
- m_searchButton->setAutoRaise(true);
- m_searchButton->setIcon(KIcon("edit-find"));
- m_searchButton->setToolTip(i18nc("@info:tooltip", "Click to begin the search"));
- hLayout->addWidget(m_searchButton);
- connect(m_searchButton, SIGNAL(clicked()),
- this, SLOT(emitSearchSignal()));
}
DolphinSearchBox::~DolphinSearchBox()
class QCompleter;
class QModelIndex;
class QStandardItemModel;
-class QToolButton;
/**
* @brief Helper class used for completition for the DolphinSearchBox.
private:
KLineEdit* m_searchInput;
- QToolButton* m_searchButton;
DolphinSearchCompleter* m_completer;
};
m_searchWhatBox->addItem(i18nc("@label", "Text"));
m_searchWhatBox->addItem(i18nc("@label", "Filenames"));
+ // add button "Search"
+ QPushButton* searchButton = new QPushButton(this);
+ searchButton->setIcon(KIcon("edit-find"));
+ searchButton->setText(i18nc("@action:button", "Search"));
+ searchButton->setToolTip(i18nc("@info", "Start searching"));
+
// add button "Save"
QPushButton* saveButton = new QPushButton(this);
saveButton->setIcon(KIcon("document-save"));
QHBoxLayout* lastLineLayout = new QHBoxLayout();
lastLineLayout->addWidget(new QWidget(this), 1); // filler
+ lastLineLayout->addWidget(searchButton);
lastLineLayout->addWidget(saveButton);
lastLineLayout->addWidget(closeButton);
m_removeButton = new QPushButton(this);
m_removeButton->setIcon(KIcon("list-remove"));
+ m_removeButton->setToolTip(i18nc("@info", "Remove search option"));
m_removeButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
connect(m_removeButton, SIGNAL(clicked()), this, SIGNAL(removeCriterion()));