RedPanda-CPP/RedPandaIDE/widgets/searchdialog.h

55 lines
1.1 KiB
C
Raw Normal View History

2021-08-02 21:58:39 +08:00
#ifndef SEARCHDIALOG_H
#define SEARCHDIALOG_H
#include <QDialog>
#include <QTabBar>
2023-01-11 16:22:26 +08:00
#include <qsynedit/searcher/baseseacher.h>
2021-08-02 21:58:39 +08:00
namespace Ui {
class SearchDialog;
}
class SearchDialog : public QDialog
{
Q_OBJECT
public:
explicit SearchDialog(QWidget *parent = nullptr);
~SearchDialog();
2021-08-02 23:42:10 +08:00
void find(const QString& text);
void replace(const QString& text);
void findNext();
void findPrevious();
private:
void doSearch(bool backward);
void doReplace(bool replaceAll);
void prepareOptions(bool backward);
private slots:
void onTabBarCurrentChanged(int currentIndex);
void on_cbFind_currentTextChanged(const QString &arg1);
2021-08-03 23:55:57 +08:00
void on_btnClose_clicked();
void on_btnNext_clicked();
2021-08-02 23:42:10 +08:00
void on_btnPrevious_clicked();
void on_btnReplace_clicked();
void on_btnReplaceAll_clicked();
2021-08-02 21:58:39 +08:00
private:
Ui::SearchDialog *ui;
QTabBar * mTabBar;
int mSearchTabIdx;
int mReplaceTabIdx;
2022-09-27 14:01:38 +08:00
QSynedit::SearchOptions mSearchOptions;
2022-09-25 09:55:18 +08:00
QSynedit::PSynSearchBase mBasicSearchEngine;
QSynedit::PSynSearchBase mRegexSearchEngine;
2021-08-02 21:58:39 +08:00
};
#endif // SEARCHDIALOG_H