summaryrefslogtreecommitdiffstats
path: root/ui/qt/widgets/path_selection_edit.h
diff options
context:
space:
mode:
Diffstat (limited to 'ui/qt/widgets/path_selection_edit.h')
-rw-r--r--ui/qt/widgets/path_selection_edit.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/ui/qt/widgets/path_selection_edit.h b/ui/qt/widgets/path_selection_edit.h
new file mode 100644
index 0000000..1c0f9fb
--- /dev/null
+++ b/ui/qt/widgets/path_selection_edit.h
@@ -0,0 +1,47 @@
+/* path_chooser_delegate.cpp
+ * Delegate to select a file path for a treeview entry
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef PATH_SELECTOR_EDIT_H
+#define PATH_SELECTOR_EDIT_H
+
+#include <QWidget>
+#include <QString>
+#include <QLineEdit>
+#include <QToolButton>
+
+class PathSelectionEdit : public QWidget
+{
+ Q_OBJECT
+
+public:
+ PathSelectionEdit(QString title, QString path, bool selectFile, QWidget *parent = 0);
+ PathSelectionEdit(QWidget *parent = 0);
+
+ QString path() const;
+
+public slots:
+ void setPath(QString newPath = QString());
+
+signals:
+ void pathChanged(QString newPath);
+
+protected slots:
+ void browseForPath();
+
+private:
+ QString _title;
+ QString _path;
+ bool _selectFile;
+
+ QLineEdit * _edit;
+ QToolButton * _button;
+};
+
+#endif // PATH_SELECTOR_EDIT_H