]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Respect global single/double click setting for the icons- and details view (thanks...
authorPeter Penz <peter.penz19@gmail.com>
Tue, 1 May 2007 09:12:24 +0000 (09:12 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Tue, 1 May 2007 09:12:24 +0000 (09:12 +0000)
* In general we want to avoid having Kxxx-view classes for existing Qxxx-view classes like this was the case in KDE3. Qt4 allows us to use custom models + delegates and hence there should be no need to introduce KListView, KTreeView or KColumnView.

* It looks like KListView will be renamed to KCategoryView and it's open yet whether it it will be available outside the scope of a file manager for KDE 4.0.

* The details view is derived from QTreeView and the columns view is derived from QColumnView -> adjusting KListView won't help here :-)

svn path=/trunk/KDE/kdebase/apps/; revision=659994

src/dolphindetailsview.cpp
src/dolphiniconsview.cpp

index 6544940b11436833cb5a82dfe071f7618d907662..af503723a32c889bc12bf6963e594d015d31579a 100644 (file)
@@ -60,8 +60,13 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* contr
     connect(parent, SIGNAL(sortOrderChanged(Qt::SortOrder)),
             this, SLOT(setSortIndicatorOrder(Qt::SortOrder)));
 
-    connect(this, SIGNAL(clicked(const QModelIndex&)),
-            controller, SLOT(triggerItem(const QModelIndex&)));
+    if (KGlobalSettings::singleClick()) {
+        connect(this, SIGNAL(clicked(const QModelIndex&)),
+                controller, SLOT(triggerItem(const QModelIndex&)));
+    } else {
+        connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
+                controller, SLOT(triggerItem(const QModelIndex&)));
+    }
     connect(this, SIGNAL(activated(const QModelIndex&)),
             controller, SLOT(triggerItem(const QModelIndex&)));
 
index 43718a0d17aa9f0131328bcdc240f3672bf82c14..35789f75439e02cb934dd858baefdedaaaf14d4b 100644 (file)
@@ -42,8 +42,13 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle
 
     viewport()->setAttribute(Qt::WA_Hover);
 
-    connect(this, SIGNAL(clicked(const QModelIndex&)),
-            controller, SLOT(triggerItem(const QModelIndex&)));
+    if (KGlobalSettings::singleClick()) {
+        connect(this, SIGNAL(clicked(const QModelIndex&)),
+                controller, SLOT(triggerItem(const QModelIndex&)));
+    } else {
+        connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
+                controller, SLOT(triggerItem(const QModelIndex&)));
+    }
     connect(this, SIGNAL(activated(const QModelIndex&)),
             controller, SLOT(triggerItem(const QModelIndex&)));
     connect(controller, SIGNAL(showPreviewChanged(bool)),