| 906 | } |
| 907 | |
| 908 | QStringList ProjectModel::pathFromIndex(const QModelIndex& index) const |
| 909 | { |
| 910 | if (!index.isValid()) |
| 911 | return QStringList(); |
| 912 | |
| 913 | QModelIndex idx = index; |
| 914 | QStringList list; |
| 915 | do { |
| 916 | QString t = data(idx, Qt::DisplayRole).toString(); |
| 917 | list.prepend(t); |
| 918 | QModelIndex parent = idx.parent(); |
| 919 | idx = parent.sibling(parent.row(), index.column()); |
| 920 | } while (idx.isValid()); |
| 921 | |
| 922 | return list; |
| 923 | } |
| 924 | |
| 925 | int ProjectModel::columnCount( const QModelIndex& ) const |
| 926 | { |