24 #ifndef __ctkPathListWidget_h
25 #define __ctkPathListWidget_h
31 #include "ctkWidgetsExport.h"
33 class ctkPathListWidgetPrivate;
52 Q_PROPERTY(QStringList paths READ paths WRITE setPaths NOTIFY pathsChanged)
55 Q_PROPERTY(
Mode mode READ mode WRITE setMode)
58 Q_PROPERTY(PathOptions fileOptions READ fileOptions WRITE setFileOptions)
61 Q_PROPERTY(PathOptions directoryOptions READ directoryOptions WRITE setDirectoryOptions)
64 Q_PROPERTY(QIcon fileIcon READ fileIcon WRITE setFileIcon RESET unsetFileIcon)
67 Q_PROPERTY(QIcon directoryIcon READ directoryIcon WRITE setDirectoryIcon RESET unsetDirectoryIcon)
77 AbsolutePathRole = Qt::UserRole + 1
94 Q_DECLARE_FLAGS(PathOptions, PathOption)
159 QStringList
files(
bool absolutePath =
false)
const;
169 QStringList
paths(
bool absolutePath =
false)
const;
188 QStandardItem*
item(
int row)
const;
191 QStandardItem*
item(
const QString& absolutePath)
const;
195 QString
pathAt(
const QPoint& point)
const;
199 QStandardItem*
itemAt(
const QPoint& point)
const;
205 QStandardItem*
itemAt(
int x,
int y)
const {
return itemAt(QPoint(x, y)); }
209 int row(
const QString& path)
const;
216 bool editPath(
const QString& oldPath,
const QString& newPath);
223 bool editPath(
const QModelIndex& index,
const QString& newPath);
285 void pathsChanged(
const QStringList& added,
const QStringList& removed);
305 QScopedPointer<ctkPathListWidgetPrivate>
d_ptr;
309 void setModel(QAbstractItemModel *model);
314 Q_PRIVATE_SLOT(d_func(),
void _q_emitPathClicked(
const QModelIndex& index))
315 Q_PRIVATE_SLOT(d_func(),
void _q_emitPathDoubleClicked(
const QModelIndex& index))
316 Q_PRIVATE_SLOT(d_func(),
void _q_emitPathActivated(
const QModelIndex& index))
317 Q_PRIVATE_SLOT(d_func(),
void _q_emitCurrentPathChanged(
const QModelIndex &previous,
const QModelIndex ¤t))
Q_DECLARE_OPERATORS_FOR_FLAGS(ctkVTKDataSetModel::AttributeTypes)