11 #ifdef DESIGNER_PLUGIN 12 #include <QDesignerExportWidget> 13 #define DESIGNER_PLUGIN_EXPORT QDESIGNER_WIDGET_EXPORT 15 #define DESIGNER_PLUGIN_EXPORT 30 Q_PROPERTY(
Style style READ style WRITE setStyle)
32 Q_PROPERTY(
QIcon dialogButtonIcon READ dialogButtonIcon WRITE setDialogButtonIcon RESET resetDialogButtonIcon)
34 Q_PROPERTY(
PathMode pathMode READ pathMode WRITE setPathMode)
36 Q_PROPERTY(
QFileDialog::Options dialogOptions READ dialogOptions WRITE setDialogOptions)
38 Q_PROPERTY(
bool editable READ isEditable WRITE setEditable)
40 Q_PROPERTY(
bool allowEmptyPath READ isEmptyPathAllowed WRITE setAllowEmptyPath)
42 Q_PROPERTY(
bool useCompleter READ useCompleter WRITE setUseCompleter)
44 Q_PROPERTY(
QString defaultDirectory READ defaultDirectory WRITE setDefaultDirectory)
46 Q_PROPERTY(
QString path READ path WRITE setPath RESET clear NOTIFY pathChanged)
48 Q_PROPERTY(
QString placeholder READ placeholder WRITE setPlaceholder)
50 Q_PROPERTY(
QStringList nameFilters READ nameFilters WRITE setNameFilters)
52 Q_PROPERTY(
QStringList mimeTypeFilters READ mimeTypeFilters WRITE setMimeTypeFilters)
83 bool isEmptyPathAllowed() const;
85 QString defaultDirectory() const;
97 bool isEditable() const;
99 bool useCompleter() const;
103 QIcon dialogButtonIcon() const;
106 void setPathMode(
PathMode pathMode);
108 void setDialogOptions(
QFileDialog::Options dialogOptions);
110 void setAllowEmptyPath(
bool allowEmptyPath);
112 void setDefaultDirectory(
QString defaultDirectory);
114 bool setPath(
QString path,
bool allowInvalid = false);
118 void setPlaceholder(
QString placeholder);
122 void setMimeTypeFilters(
QStringList mimeTypeFilters);
124 void setEditable(
bool editable);
126 void setUseCompleter(
bool useCompleter);
130 void setDialogButtonIcon(const
QIcon &icon);
132 void resetDialogButtonIcon();
140 void pathChanged(
QString path);
144 void editTextUpdate();
146 void dialogFileSelected(const QString & file);
152 PathValidator *pathValidator;
155 QString currentValidPath;
168 QIcon getDefaultIcon();
173 #endif // QPATHEDIT_H A single, existings file. This is basically "Open file".
Style
Descibes various styles that the edit can take.
The button to open the dialog will be place next to the edit.
The button to open the dialog will be placed inside the edit.
A single, existing directory. This is basically "Open Folder".
PathMode
Describes modes for the kind of path.
The QPathEdit provides a simple way to get a path from the user as comfortable as possible...