#include <config.h>
-#include "GuiSearch.h"
-
+#include "lyxfind.h"
#include "qt_helpers.h"
-
#include "FuncRequest.h"
-#include "lyxfind.h"
+#include "BufferView.h"
+#include "Buffer.h"
+#include "Cursor.h"
+#include "GuiSearch.h"
+#include "GuiView.h"
+
+#include "support/gettext.h"
+#include "frontends/alert.h"
#include <QLineEdit>
#include <QShowEvent>
{
setupUi(this);
- connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
+ // fix height to minimum
+ setFixedHeight(sizeHint().height());
+
+ // align items in grid on top
+ mainGridLayout->setAlignment(Qt::AlignTop);
+
+ connect(buttonBox, SIGNAL(clicked(QAbstractButton *)),
+ this, SLOT(slotButtonBox(QAbstractButton *)));
connect(findPB, SIGNAL(clicked()), this, SLOT(findClicked()));
connect(replacePB, SIGNAL(clicked()), this, SLOT(replaceClicked()));
connect(replaceallPB, SIGNAL(clicked()), this, SLOT(replaceallClicked()));
setFocusProxy(findCO);
bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy);
- bc().setCancel(closePB);
+ bc().setCancel(buttonBox->button(QDialogButtonBox::Close));
bc().addReadOnly(replaceCO);
bc().addReadOnly(replacePB);
bc().addReadOnly(replaceallPB);
void GuiSearch::find(docstring const & search, bool casesensitive,
bool matchword, bool forward)
{
- docstring const data =
+ docstring const sdata =
find2string(search, casesensitive, matchword, forward);
- dispatch(FuncRequest(LFUN_WORD_FIND, data));
+ dispatch(FuncRequest(LFUN_WORD_FIND, sdata));
}
bool casesensitive, bool matchword,
bool forward, bool all)
{
- docstring const data =
- replace2string(search, replace, casesensitive,
+ docstring const sdata =
+ replace2string(replace, search, casesensitive,
matchword, all, forward);
- dispatch(FuncRequest(LFUN_WORD_REPLACE, data));
+ dispatch(FuncRequest(LFUN_WORD_REPLACE, sdata));
}
+
Dialog * createGuiSearch(GuiView & lv) { return new GuiSearch(lv); }
} // namespace lyx
-#include "GuiSearch_moc.cpp"
+#include "moc_GuiSearch.cpp"