mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Connect filter reset button and remove unnecessary directives.
This commit is contained in:
parent
ade098e289
commit
f1ae30919f
@ -52,15 +52,11 @@ GuiRef::GuiRef(GuiView & lv)
|
||||
|
||||
// The filter bar
|
||||
filter_ = new FancyLineEdit(this);
|
||||
#if QT_VERSION >= 0x040600
|
||||
filter_->setButtonPixmap(FancyLineEdit::Right, getPixmap("images/", "editclear", "svgz,png"));
|
||||
filter_->setButtonVisible(FancyLineEdit::Right, true);
|
||||
filter_->setButtonToolTip(FancyLineEdit::Right, qt_("Clear text"));
|
||||
filter_->setAutoHideButton(FancyLineEdit::Right, true);
|
||||
#endif
|
||||
#if QT_VERSION >= 0x040700
|
||||
filter_->setPlaceholderText(qt_("All available labels"));
|
||||
#endif
|
||||
filter_->setToolTip(qt_("Enter string to filter the list of available labels"));
|
||||
|
||||
filterBarL->addWidget(filter_, 0);
|
||||
@ -87,6 +83,8 @@ GuiRef::GuiRef(GuiView & lv)
|
||||
this, SLOT(changed_adaptor()));
|
||||
connect(filter_, SIGNAL(textEdited(QString)),
|
||||
this, SLOT(filterLabels()));
|
||||
connect(filter_, SIGNAL(rightButtonClicked()),
|
||||
this, SLOT(resetFilter()));
|
||||
connect(csFindCB, SIGNAL(clicked()),
|
||||
this, SLOT(filterLabels()));
|
||||
connect(nameED, SIGNAL(textChanged(QString)),
|
||||
@ -541,6 +539,13 @@ void GuiRef::filterLabels()
|
||||
}
|
||||
|
||||
|
||||
void GuiRef::resetFilter()
|
||||
{
|
||||
filter_->setText(QString());
|
||||
filterLabels();
|
||||
}
|
||||
|
||||
|
||||
bool GuiRef::initialiseParams(std::string const & data)
|
||||
{
|
||||
InsetCommand::string2params(data, params_);
|
||||
|
@ -40,6 +40,7 @@ private Q_SLOTS:
|
||||
void changed_adaptor();
|
||||
void gotoClicked();
|
||||
void filterLabels();
|
||||
void resetFilter();
|
||||
void refHighlighted(QTreeWidgetItem *);
|
||||
void selectionChanged();
|
||||
void refTextChanged(QString const &);
|
||||
|
Loading…
Reference in New Issue
Block a user