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 ( Filters filters READ filters WRITE setFilters)
68 Q_PROPERTY ( QString currentPath READ currentPath WRITE setCurrentPath USER true )
72 #ifdef USE_QFILEDIALOG_OPTIONS 73 Q_PROPERTY(QFileDialog::Options
options READ
options WRITE setOptions)
87 Q_PROPERTY(QString settingKey READ settingKey WRITE setSettingKey )
90 Q_PROPERTY(
bool showBrowseButton READ showBrowseButton WRITE setShowBrowseButton)
96 Q_PROPERTY(
bool showHistoryButton READ showHistoryButton WRITE setShowHistoryButton)
102 Q_PROPERTY(
SizeAdjustPolicy sizeAdjustPolicy READ sizeAdjustPolicy WRITE setSizeAdjustPolicy)
107 Q_PROPERTY(
int minimumContentsLength READ minimumContentsLength WRITE setMinimumContentsLength)
113 Q_PROPERTY(QStringList nameFilters READ nameFilters WRITE setNameFilters)
122 AllEntries = Dirs | Files | Drives,
127 PermissionMask = 0x070,
133 CaseSensitive = 0x800,
134 NoDotAndDotDot = 0x1000,
139 Q_DECLARE_FLAGS(Filters,
Filter)
141 #ifndef USE_QFILEDIALOG_OPTIONS 145 ShowDirsOnly = 0x00000001,
146 DontResolveSymlinks = 0x00000002,
147 DontConfirmOverwrite = 0x00000004,
148 DontUseSheet = 0x00000008,
149 DontUseNativeDialog = 0x00000010,
150 ReadOnly = 0x00000020,
151 HideNameFilterDetails = 0x00000040
153 Q_DECLARE_FLAGS(Options,
Option)
164 AdjustToMinimumContentsLength
178 const QStringList& nameFilters,
182 QString currentPath()
const;
184 void setLabel(
const QString &label);
185 const QString& label()
const;
187 void setNameFilters(
const QStringList &nameFilters);
188 const QStringList& nameFilters()
const;
190 void setFilters(
const Filters& filters);
191 Filters filters()
const;
195 #ifdef USE_QFILEDIALOG_OPTIONS 196 void setOptions(
const QFileDialog::Options&
options);
197 const QFileDialog::Options&
options()
const;
199 void setOptions(
const Options&
options);
205 void setCurrentFileExtension(
const QString& extension);
207 QString settingKey()
const;
208 void setSettingKey(
const QString& key);
210 bool showBrowseButton()
const;
211 void setShowBrowseButton(
bool visible);
213 bool showHistoryButton()
const;
214 void setShowHistoryButton(
bool visible);
226 int minimumContentsLength()
const;
227 void setMinimumContentsLength(
int lenght);
230 QComboBox* comboBox()
const;
234 virtual QSize minimumSizeHint()
const;
238 virtual QSize sizeHint()
const;
243 void validInputChanged(
bool);
245 void currentPathChanged(
const QString& path);
248 void setCurrentPath(
const QString& path);
261 void retrieveHistory();
266 void addCurrentPathToHistory();
269 void setCurrentDirectory(
const QString& directory);
270 void updateHasValidInput();
273 QScopedPointer<ctkPathLineEditPrivate>
d_ptr;
279 Q_PRIVATE_SLOT(d_ptr,
void _q_recomputeCompleterPopupSize())
283 #ifndef USE_QFILEDIALOG_OPTIONS 287 #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.