#include "FancyLineEdit.h"
#include "GuiApplication.h"
#include "GuiSelectionManager.h"
+#include "GuiView.h"
#include "qt_helpers.h"
#include "Buffer.h"
#include "BufferView.h"
#include "BufferParams.h"
#include "Citation.h"
+#include "Cursor.h"
#include "TextClass.h"
#include "FuncRequest.h"
// The filter bar
filter_ = new FancyLineEdit(this);
- 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);
+ filter_->setClearButton(true);
filter_->setPlaceholderText(qt_("All avail. citations"));
filterBarL->addWidget(filter_, 0);
addPB, deletePB, upPB, downPB, &available_model_, &selected_model_, 1);
connect(selectionManager, SIGNAL(selectionChanged()),
this, SLOT(setCitedKeys()));
+ connect(selectionManager, SIGNAL(updateHook()),
+ this, SLOT(setCitedKeys()));
connect(selectionManager, SIGNAL(updateHook()),
this, SLOT(updateControls()));
connect(selectionManager, SIGNAL(okHook()),
this, SLOT(filterChanged(QString)));
connect(filter_, SIGNAL(returnPressed()),
this, SLOT(filterPressed()));
-#if (QT_VERSION < 0x050000)
- connect(filter_, SIGNAL(downPressed()),
- availableLV, SLOT(setFocus()));
-#else
connect(filter_, &FancyLineEdit::downPressed,
- availableLV, [=](){ focusAndHighlight(availableLV); });
-#endif
+ availableLV, [this](){ focusAndHighlight(availableLV); });
connect(regexp_, SIGNAL(triggered()),
this, SLOT(regexChanged()));
connect(casesense_, SIGNAL(triggered()),
connect(instant_, SIGNAL(triggered(bool)),
this, SLOT(instantChanged(bool)));
-#if (QT_VERSION < 0x050000)
- selectedLV->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
-#else
selectedLV->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
-#endif
selectedLV->setToolTip(qt_("Ordered list of all cited references.\n"
"You can reorder, add and remove references with the buttons on the left."));
QString const after = textAfterED->text();
applyParams(choice, full, force, before, after);
+ connectToNewInset();
}
buttonBox->button(QDialogButtonBox::Apply)->setEnabled(false);
buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
+
+ // apply filter
+ if (!filter_->text().isEmpty())
+ findText(filter_->text(), true);
}