| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
editor_file_dialog.h
Go to the documentation of this file.
1
12#ifndef EDITOR_FILE_DIALOG_H_
13#define EDITOR_FILE_DIALOG_H_
14
15#include <QModelIndex>
16#include <QLineEdit>
17#include <QFileDialog>
18#include <QPushButton>
19
20 class EditorFileDialog : public QLineEdit
21{
22 Q_OBJECT
23public:
24 enum FileMode { ExistingFile, Directory };
25
26 explicit EditorFileDialog(const QModelIndex& index, enum FileMode mode, QWidget* parent = 0, const QString & caption = QString(), const QString & directory = QString(), const QString & filter = QString());
27
28 void setOption(QFileDialog::Option option, bool on = true);
29 virtual void focusInEvent(QFocusEvent *event);
30 virtual void focusOutEvent(QFocusEvent *event);
31 virtual bool eventFilter(QObject *obj, QEvent *event);
32
33signals:
34 void acceptEdit(const QModelIndex& index);
35
36private slots:
37 void applyFilename();
38
39protected:
40 void resizeEvent(QResizeEvent *);
41 QPushButton* file_dialog_button_;
42 const QModelIndex index_; //saved index of table cell
43 enum FileMode mode_;
44 QString caption_;
45 QString directory_;
46 QString filter_;
47 QFileDialog::Options options_;
48};
49
50#endif /* EDITOR_FILE_DIALOG_H_ */
EditorFileDialog
Definition editor_file_dialog.h:21