mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-29 23:40:04 -06:00
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.
47 lines
930 B
C++
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
|