findfiledialog.h Example File
simpletextviewer/findfiledialog.h
#ifndef FINDFILEDIALOG_H
#define FINDFILEDIALOG_H
#include <QDialog>
class QComboBox;
class QDialogButtonBox;
class QLabel;
class QToolButton;
class QTreeWidget;
class QTreeWidgetItem;
class Assistant;
class TextEdit;
class FindFileDialog : public QDialog
{
Q_OBJECT
public:
FindFileDialog(TextEdit *editor, Assistant *assistant);
private slots:
void browse();
void help();
void openFile(QTreeWidgetItem *item = nullptr);
void update();
private:
void findFiles();
void showFiles(const QStringList &files);
void createButtons();
void createComboBoxes();
void createFilesTree();
void createLabels();
void createLayout();
Assistant *currentAssistant;
TextEdit *currentEditor;
QTreeWidget *foundFilesTree;
QComboBox *directoryComboBox;
QComboBox *fileNameComboBox;
QLabel *directoryLabel;
QLabel *fileNameLabel;
QDialogButtonBox *buttonBox;
QToolButton *browseButton;
};
#endif