55 #ifndef PATHLINEEDIT_H 56 #define PATHLINEEDIT_H 64 #include "commonWidgets.h" 75 Q_PROPERTY ( QString label READ label WRITE setLabel )
77 Q_PROPERTY ( Filters filters READ filters WRITE setFilters)
78 Q_PROPERTY ( QString currentPath READ currentPath WRITE setCurrentPath USER
true )
82 #ifdef USE_QFILEDIALOG_OPTIONS 83 Q_PROPERTY(QFileDialog::Options options READ options WRITE setOptions)
85 Q_PROPERTY(Options options READ options WRITE setOptions)
86 Q_FLAGS(Option Options)
97 Q_PROPERTY(QString settingKey READ settingKey WRITE setSettingKey )
100 Q_PROPERTY(
bool showBrowseButton READ showBrowseButton WRITE setShowBrowseButton)
106 Q_PROPERTY(
bool showHistoryButton READ showHistoryButton WRITE setShowHistoryButton)
112 Q_PROPERTY(
SizeAdjustPolicy sizeAdjustPolicy READ sizeAdjustPolicy WRITE setSizeAdjustPolicy)
117 Q_PROPERTY(
int minimumContentsLength READ minimumContentsLength WRITE setMinimumContentsLength)
123 Q_PROPERTY(QStringList nameFilters READ nameFilters WRITE setNameFilters)
128 enum Filter { Dirs = 0x001,
132 AllEntries = Dirs | Files | Drives,
137 PermissionMask = 0x070,
143 CaseSensitive = 0x800,
144 NoDotAndDotDot = 0x1000,
149 Q_DECLARE_FLAGS(Filters, Filter)
151 #ifndef USE_QFILEDIALOG_OPTIONS 155 ShowDirsOnly = 0x00000001,
156 DontResolveSymlinks = 0x00000002,
157 DontConfirmOverwrite = 0x00000004,
158 DontUseSheet = 0x00000008,
159 DontUseNativeDialog = 0x00000010,
160 ReadOnly = 0x00000020,
161 HideNameFilterDetails = 0x00000040
163 Q_DECLARE_FLAGS(Options, Option)
174 AdjustToMinimumContentsLength
188 const QStringList& nameFilters,
189 Filters filters = PathLineEdit::AllEntries,
192 QString currentPath()
const;
194 void setLabel(
const QString &label);
195 const QString& label()
const;
197 void setNameFilters(
const QStringList &nameFilters);
198 const QStringList& nameFilters()
const;
200 void setFilters(
const Filters& filters);
201 Filters filters()
const;
205 #ifdef USE_QFILEDIALOG_OPTIONS 206 void setOptions(
const QFileDialog::Options& options);
207 const QFileDialog::Options& options()
const;
209 void setOptions(
const Options& options);
210 const Options& options()
const;
215 void setCurrentFileExtension(
const QString& extension);
217 QString settingKey()
const;
218 void setSettingKey(
const QString& key);
220 bool showBrowseButton()
const;
221 void setShowBrowseButton(
bool visible);
223 bool showHistoryButton()
const;
224 void setShowHistoryButton(
bool visible);
236 int minimumContentsLength()
const;
237 void setMinimumContentsLength(
int lenght);
240 QComboBox* comboBox()
const;
244 virtual QSize minimumSizeHint()
const;
248 virtual QSize sizeHint()
const;
253 void validInputChanged(
bool);
255 void currentPathChanged(
const QString& path);
258 void setCurrentPath(
const QString& path);
271 void retrieveHistory();
276 void addCurrentPathToHistory();
279 void setCurrentDirectory(
const QString& directory);
280 void updateHasValidInput();
283 QScopedPointer<PathLineEditPrivate> d_ptr;
289 Q_PRIVATE_SLOT(d_ptr,
void _q_recomputeCompleterPopupSize())
292 Q_DECLARE_OPERATORS_FOR_FLAGS(PathLineEdit::Filters)
293 #ifndef USE_QFILEDIALOG_OPTIONS 294 Q_DECLARE_OPERATORS_FOR_FLAGS(PathLineEdit::Options);
297 #endif // PATHLINEEDIT_H The path line edit will always adjust to the contents.
Definition: pathLineEdit.h:169
Advanced line edit to select a file or directory.
Definition: pathLineEdit.h:71
Definition: pathLineEdit.cpp:51
SizeAdjustPolicy
Definition: pathLineEdit.h:166
The path line edit will adjust to its contents the first time it is shown.
Definition: pathLineEdit.h:171