 |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
Go to the documentation of this file.
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,
195 #ifdef USE_QFILEDIALOG_OPTIONS
196 void setOptions(
const QFileDialog::Options&
options);
197 const QFileDialog::Options&
options()
const;
273 QScopedPointer<ctkPathLineEditPrivate>
d_ptr;
279 Q_PRIVATE_SLOT(d_ptr,
void _q_recomputeCompleterPopupSize())
283 #ifndef USE_QFILEDIALOG_OPTIONS
287 #endif // __ctkPathLineEdit_h
void addCurrentPathToHistory()
void setLabel(const QString &label)
void updateHasValidInput()
QString settingKey() const
Q_DECLARE_OPERATORS_FOR_FLAGS(ctkPathLineEdit::Options)
void setOptions(const Options &options)
const QStringList & nameFilters() const
bool showBrowseButton() const
virtual ~ctkPathLineEdit()
void setSizeAdjustPolicy(SizeAdjustPolicy policy)
void setFilters(const Filters &filters)
void setCurrentDirectory(const QString &directory)
bool showHistoryButton() const
virtual QSize sizeHint() const
void setNameFilters(const QStringList &nameFilters)
ctkPathLineEdit(QWidget *parent=0)
virtual QSize minimumSizeHint() const
QComboBox * comboBox() const
Return the combo box internally used by the path line edit.
int minimumContentsLength() const
QScopedPointer< ctkPathLineEditPrivate > d_ptr
void setSettingKey(const QString &key)
SizeAdjustPolicy sizeAdjustPolicy() const
void validInputChanged(bool)
void setShowHistoryButton(bool visible)
void setCurrentFileExtension(const QString &extension)
@ AdjustToContents
The path line edit will always adjust to the contents.
void setShowBrowseButton(bool visible)
QString currentPath() const
@ AdjustToContentsOnFirstShow
The path line edit will adjust to its contents the first time it is shown.
ctkPathLineEdit(const QString &label, const QStringList &nameFilters, Filters filters=ctkPathLineEdit::AllEntries, QWidget *parent=0)
const Options & options() const
const QString & label() const
void setMinimumContentsLength(int lenght)
void currentPathChanged(const QString &path)
Advanced line edit to select a file or directory.
void setCurrentPath(const QString &path)