Files
sqlitebrowser/src/FindReplaceDialog.h
mgrojo 12b4fd91a7 Replace button in SQL Editor inserts text at cursor after a previous find
Each time the searched term or the dialog is closed, the find process in
the QScintilla widget is cancelled. This avoids the problem mentioned in
issue #1612 and similar others, like finding, then changing the searched
term and pressing Replace. In all these cases Replace only finds the next
term to be replaced without performing any actual replacement.
2018-11-17 14:51:46 +01:00

44 lines
832 B
C++

#ifndef FindReplaceDialog_H
#define FindReplaceDialog_H
#include <ExtendedScintilla.h>
#include <QDialog>
#include <QAbstractButton>
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:
void indicateSelection();
void clearIndicators();
Ui::FindReplaceDialog* ui;
ExtendedScintilla* m_scintilla;
int foundIndicatorNumber;
};
#endif