45 #ifndef __ctkPathLineEdit_h 46 #define __ctkPathLineEdit_h 54 #include "ctkWidgetsExport.h" 55 class ctkPathLineEditPrivate;
65 Q_PROPERTY ( QString label READ label WRITE setLabel )
67 Q_PROPERTY ( QStringList nameFilters READ nameFilters WRITE setNameFilters)
68 Q_PROPERTY ( Filters filters READ filters WRITE setFilters)
69 Q_PROPERTY ( QString currentPath READ currentPath WRITE setCurrentPath USER true )
73 #ifdef USE_QFILEDIALOG_OPTIONS 74 Q_PROPERTY(QFileDialog::Options
options READ
options WRITE setOptions)
88 Q_PROPERTY(QString settingKey READ settingKey WRITE setSettingKey )
91 Q_PROPERTY(
bool showBrowseButton READ showBrowseButton WRITE setShowBrowseButton)
97 Q_PROPERTY(
bool showHistoryButton READ showHistoryButton WRITE setShowHistoryButton)
103 Q_PROPERTY(
SizeAdjustPolicy sizeAdjustPolicy READ sizeAdjustPolicy WRITE setSizeAdjustPolicy)
108 Q_PROPERTY(
int minimumContentsLength READ minimumContentsLength WRITE setMinimumContentsLength)
114 Q_PROPERTY(QStringList nameFilters READ nameFilters WRITE setNameFilters)
123 AllEntries = Dirs | Files | Drives,
128 PermissionMask = 0x070,
134 CaseSensitive = 0x800,
135 NoDotAndDotDot = 0x1000,
140 Q_DECLARE_FLAGS(Filters,
Filter)
142 #ifndef USE_QFILEDIALOG_OPTIONS 146 ShowDirsOnly = 0x00000001,
147 DontResolveSymlinks = 0x00000002,
148 DontConfirmOverwrite = 0x00000004,
149 DontUseSheet = 0x00000008,
150 DontUseNativeDialog = 0x00000010,
151 ReadOnly = 0x00000020,
152 HideNameFilterDetails = 0x00000040
154 Q_DECLARE_FLAGS(Options,
Option)
165 AdjustToMinimumContentsLength
179 const QStringList& nameFilters,
183 QString currentPath()
const;
185 void setLabel(
const QString &label);
186 const QString& label()
const;
188 void setNameFilters(
const QStringList &nameFilters);
189 const QStringList& nameFilters()
const;
191 void setFilters(
const Filters& filters);
192 Filters filters()
const;
196 #ifdef USE_QFILEDIALOG_OPTIONS 197 void setOptions(
const QFileDialog::Options&
options);
198 const QFileDialog::Options&
options()
const;
200 void setOptions(
const Options&
options);
206 void setCurrentFileExtension(
const QString& extension);
208 QString settingKey()
const;
209 void setSettingKey(
const QString& key);
211 bool showBrowseButton()
const;
212 void setShowBrowseButton(
bool visible);
214 bool showHistoryButton()
const;
215 void setShowHistoryButton(
bool visible);
227 int minimumContentsLength()
const;
228 void setMinimumContentsLength(
int lenght);
231 QComboBox* comboBox()
const;
235 virtual QSize minimumSizeHint()
const;
239 virtual QSize sizeHint()
const;
244 void validInputChanged(
bool);
246 void currentPathChanged(
const QString& path);
249 void setCurrentPath(
const QString& path);
262 void retrieveHistory();
267 void addCurrentPathToHistory();
270 void setCurrentDirectory(
const QString& directory);
271 void updateHasValidInput();
274 QScopedPointer<ctkPathLineEditPrivate>
d_ptr;
280 Q_PRIVATE_SLOT(d_ptr,
void _q_recomputeCompleterPopupSize())
284 #ifndef USE_QFILEDIALOG_OPTIONS 288 #endif // __ctkPathLineEdit_h QScopedPointer< ctkPathLineEditPrivate > d_ptr
The path line edit will adjust to its contents the first time it is shown.
The path line edit will always adjust to the contents.
Q_DECLARE_OPERATORS_FOR_FLAGS(ctkPathLineEdit::Options)
Advanced line edit to select a file or directory.