Files
sqlitebrowser/src/FindReplaceDialog.h
mgrojo 8896ecca40 Refactoring and find/replace dialog in the JSON editor.
SQL and JSON text editor classes have been refactored. A new parent class
for both editors have been added for the common logic implementable without
depending on the specific lexer.

The only visible effect of this change should be that the JSON editor
(issue #1173) now has the same find/replace dialog as the SQL editor.

This prepares for the implementation of the XML editor (issue #1253).
2017-12-16 00:09:47 +01:00

43 lines
791 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();
void setExtendedScintilla(ExtendedScintilla* scintilla);
void show();
private slots:
bool findNext();
void replace();
void findAll();
void replaceAll();
void help();
void close();
void reject();
void buttonBox_clicked(QAbstractButton* button);
private:
void indicateSelection();
void clearIndicators();
Ui::FindReplaceDialog* ui;
ExtendedScintilla* m_scintilla;
int foundIndicatorNumber;
};
#endif