Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
path_selection_edit.h
1/* path_chooser_delegate.cpp
2 * Delegate to select a file path for a treeview entry
3 *
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11#ifndef PATH_SELECTOR_EDIT_H
12#define PATH_SELECTOR_EDIT_H
13
14#include <QWidget>
15#include <QString>
16#include <QLineEdit>
17#include <QToolButton>
18
22class PathSelectionEdit : public QWidget
23{
24 Q_OBJECT
25
26public:
34 PathSelectionEdit(QString title, QString path, bool selectFile, QWidget *parent = 0);
35
40 PathSelectionEdit(QWidget *parent = 0);
41
46 QString path() const;
47
48public slots:
53 void setPath(QString newPath = QString());
54
55signals:
60 void pathChanged(QString newPath);
61
62protected slots:
66 void browseForPath();
67
68private:
69 QString _title;
70 QString _path;
71 bool _selectFile;
73 QLineEdit * _edit;
74 QToolButton * _button;
75};
76#endif // PATH_SELECTOR_EDIT_H
A widget for selecting a file or directory path.
Definition path_selection_edit.h:23
void setPath(QString newPath=QString())
Sets a new path programmatically.
Definition path_selection_edit.cpp:56
QString path() const
Gets the currently selected path.
Definition path_selection_edit.cpp:68
void browseForPath()
Opens a dialog to browse for a path.
Definition path_selection_edit.cpp:73
void pathChanged(QString newPath)
Signal emitted when the path changes.