diff options
| author | Peter Penz <[email protected]> | 2006-12-20 19:10:39 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2006-12-20 19:10:39 +0000 |
| commit | 642110309ace0ec0da270615464d7d04944d5dcf (patch) | |
| tree | 173d3fefbcf1adfe93667348c243e3cb7fbc3bf0 /src/dolphinview.cpp | |
| parent | 3396d0dbee4e609fa5f7608912b4ac5badd36f72 (diff) | |
Let the user chose whether view properties should be remembered for each directory or whether they should be valid globally. Per default the view properties are remembered for each directory. For testing purposes the MIME type information is shown per default in the icons mode (thanks to Fredrik for the cool implementation in KFileItemDelegate!).
svn path=/trunk/playground/utils/dolphin/; revision=615232
Diffstat (limited to 'src/dolphinview.cpp')
| -rw-r--r-- | src/dolphinview.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 1a02ddea0..35737e41b 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -109,9 +109,10 @@ DolphinView::DolphinView(DolphinMainWindow *mainWindow, m_proxyModel = new DolphinSortFilterProxyModel(this); m_proxyModel->setSourceModel(m_dirModel); - m_iconsView->setModel(m_dirModel); // TODO: using m_proxyModel crashed when clicking on an item + m_iconsView->setModel(m_dirModel); // TODO: using m_proxyModel crashes when clicking on an item KFileItemDelegate* delegate = new KFileItemDelegate(this); + delegate->setAdditionalInformation(KFileItemDelegate::FriendlyMimeType); m_iconsView->setItemDelegate(delegate); m_dirLister->setDelayedMimeTypes(true); @@ -985,19 +986,22 @@ void DolphinView::slotChangeNameFilter(const QString& nameFilter) void DolphinView::applyModeToView() { - //m_iconsView->setAlternatingRowColors(true); m_iconsView->setSelectionMode(QAbstractItemView::ExtendedSelection); // TODO: the following code just tries to test some QListView capabilities switch (m_mode) { case IconsView: m_iconsView->setViewMode(QListView::IconMode); - m_iconsView->setGridSize(QSize(128, 64)); + m_iconsView->setSpacing(32); + // m_iconsView->setAlternatingRowColors(false); + // m_iconsView->setGridSize(QSize(128, 64)); break; case DetailsView: m_iconsView->setViewMode(QListView::ListMode); - m_iconsView->setGridSize(QSize(256, 24)); + m_iconsView->setSpacing(0); + // m_iconsView->setAlternatingRowColors(true); + // m_iconsView->setGridSize(QSize(256, 24)); break; } } |
