ACMX 2.139.0
Dual-Backend Real-Time GPU Video Synthesis
Loading...
Searching...
No Matches
find-shader.hpp
Go to the documentation of this file.
1#ifndef FIND_SHADER_HPP
2#define FIND_SHADER_HPP
3
4/**
5 * @file find-shader.hpp
6 * @brief Regular-expression search dialog for shader source libraries.
7 */
8
9#include <QDialog>
10#include <QString>
11
12class QCheckBox;
13class QCloseEvent;
14class QLabel;
15class QLineEdit;
16class QPushButton;
17class QTreeWidget;
18class QTreeWidgetItem;
19
20/**
21 * @brief Search all GLSL source files beneath an active shader library.
22 */
23class FindShaderDialog : public QDialog {
24 Q_OBJECT
25
26 public:
27 explicit FindShaderDialog(const QString &shaderPath, QWidget *parent = nullptr);
28
29 signals:
30 /// @brief Emitted when the user opens one search result.
31 void resultActivated(const QString &filePath, int lineNumber, int columnNumber, int matchLength);
32
33 protected:
34 void closeEvent(QCloseEvent *event) override;
35
36 private:
37 void performSearch();
38 void openResult(QTreeWidgetItem *item);
39 void updateOpenButton();
40
41 QString shaderPath;
42 QLineEdit *patternEdit = nullptr;
43 QCheckBox *caseSensitiveCheck = nullptr;
44 QTreeWidget *resultsTree = nullptr;
45 QLabel *statusLabel = nullptr;
46 QPushButton *openButton = nullptr;
47};
48
49#endif
void resultActivated(const QString &filePath, int lineNumber, int columnNumber, int matchLength)
Emitted when the user opens one search result.
QTreeWidget * resultsTree
QPushButton * openButton
void openResult(QTreeWidgetItem *item)
FindShaderDialog(const QString &shaderPath, QWidget *parent=nullptr)
QLineEdit * patternEdit
void closeEvent(QCloseEvent *event) override
QCheckBox * caseSensitiveCheck