| Wireshark 4.7.3 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
22 class PathSelectionEdit : public QWidget
23{
24 Q_OBJECT
25
26 public:
34 PathSelectionEdit(QString title, QString path, bool selectFile, QWidget *parent = 0);
35
40 PathSelectionEdit(QWidget *parent = 0);
41
46 QString path() const;
47
48 public slots:
53 void setPath(QString newPath = QString());
54
55signals:
60 void pathChanged(QString newPath);
61
62 protected slots:
66 void browseForPath();
67
68 private:
69 QString _title;
70 QString _path;
71 bool _selectFile;
72
73 QLineEdit * _edit;
74 QToolButton * _button;
75};
76#endif // PATH_SELECTOR_EDIT_H
PathSelectionEdit::setPath
void setPath(QString newPath=QString())
Sets a new path programmatically.
Definition path_selection_edit.cpp:56
PathSelectionEdit::path
QString path() const
Gets the currently selected path.
Definition path_selection_edit.cpp:68
PathSelectionEdit::browseForPath
void browseForPath()
Opens a dialog to browse for a path.
Definition path_selection_edit.cpp:73
PathSelectionEdit::PathSelectionEdit
PathSelectionEdit(QString title, QString path, bool selectFile, QWidget *parent=0)
Constructs a PathSelectionEdit with specific parameters.
Definition path_selection_edit.cpp:24
PathSelectionEdit::pathChanged
void pathChanged(QString newPath)
Signal emitted when the path changes.