Files
sqlitebrowser/src/FindReplaceDialog.h
mgrojo 87a8aeb1c0 Option to find&replace in selection #1618
New check box in the Find and Replace dialog for Scintilla editors. The
new option uses the feature in QScintilla for finding text in the
selection only.

The implementation has been changed to use findFirst(InSelection) and
findNext so it works exactly as designed by QScintilla. Consequently the
finding process has to be cancel whenever any of the parameters have
changed.
2018-11-24 00:25:40 +01:00

47 lines
930 B
C++

#ifndef FindReplaceDialog_H
#define FindReplaceDialog_H
#include <QDialog>
#include <QAbstractButton>
class ExtendedScintilla;
namespace Ui {
class FindReplaceDialog;
}
class FindReplaceDialog : public QDialog
{
Q_OBJECT
public:
explicit FindReplaceDialog(QWidget* parent = nullptr);
~FindReplaceDialog() override;
void setExtendedScintilla(ExtendedScintilla* scintilla);
void show();
private slots:
bool findNext();
void replace();
void findAll();
void replaceAll();
void cancelFind();
void help();
void close();
void reject() override;
void buttonBox_clicked(QAbstractButton* button);
private:
bool findFirst(bool wrap, bool forward);
void searchAll(bool replace);
void indicateSelection();
void clearIndicators();
Ui::FindReplaceDialog* ui;
ExtendedScintilla* m_scintilla;
int foundIndicatorNumber;
bool findInProgress;
};
#endif