[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/extragear/graphics/digikam
From:       Gabriel Voicu <ping.gabi () gmail ! com>
Date:       2010-08-01 1:31:06
Message-ID: 20100801013106.EF1B3AC783 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1157726 by gvoicu:

Added a item selection model to gpssearch. Removed the button that clears a selection \
from gpssearch.

 M  +1 -1      digikam/digikamview.cpp  
 M  +2 -2      digikam/leftsidebarwidgets.cpp  
 M  +1 -1      digikam/leftsidebarwidgets.h  
 M  +15 -16    utilities/gpssearch/gpssearchview.cpp  
 M  +1 -1      utilities/gpssearch/gpssearchview.h  


--- branches/extragear/graphics/digikam/digikam/digikamview.cpp #1157725:1157726
@@ -224,7 +224,7 @@
 #ifdef HAVE_MARBLEWIDGET
     d->gpsSearchSideBar = new GPSSearchSideBarWidget(d->leftSideBar,
                     d->modelCollection->getSearchModel(),
-                    d->searchModificationHelper);
+                    d->searchModificationHelper, d->iconView->getSelectionModel());
     d->leftSideBarWidgets << d->gpsSearchSideBar;
 #endif
 
--- branches/extragear/graphics/digikam/digikam/leftsidebarwidgets.cpp \
#1157725:1157726 @@ -1008,14 +1008,14 @@
 };
 
 GPSSearchSideBarWidget::GPSSearchSideBarWidget(QWidget* parent, SearchModel* \
                searchModel,
-                                               SearchModificationHelper* \
searchModificationHelper) +                                               \
SearchModificationHelper* searchModificationHelper, QItemSelectionModel* \
                itemSelectionModel)
                       : SidebarWidget(parent), d(new GPSSearchSideBarWidgetPriv)
 {
     setObjectName("GPS Search Sidebar");
 
     d->searchModel   = searchModel;
 
-    d->gpsSearchView = new GPSSearchView(this, searchModel, \
searchModificationHelper); +    d->gpsSearchView = new GPSSearchView(this, \
searchModel, searchModificationHelper, itemSelectionModel);  \
d->gpsSearchView->setConfigGroup(getConfigGroup());  
     QVBoxLayout* layout = new QVBoxLayout(this);
--- branches/extragear/graphics/digikam/digikam/leftsidebarwidgets.h #1157725:1157726
@@ -275,7 +275,7 @@
 
 public:
 
-    GPSSearchSideBarWidget(QWidget* parent, SearchModel* searchModel, \
SearchModificationHelper* searchModificationHelper); +    \
GPSSearchSideBarWidget(QWidget* parent, SearchModel* searchModel, \
SearchModificationHelper* searchModificationHelper,QItemSelectionModel* \
itemSelectionModel);  virtual ~GPSSearchSideBarWidget();
 
     void setActive(bool active);
--- branches/extragear/graphics/digikam/utilities/gpssearch/gpssearchview.cpp \
#1157725:1157726 @@ -105,17 +105,17 @@
     KMapIface::KMap*            mapSearchWidget;
     GPSMarkerTiler*             gpsMarkerTiler;
    
-    KAction*                    actionRemoveCurrentSelection;
+    //KAction*                    actionRemoveCurrentSelection;
     ImageAlbumModel*            imageAlbumModel;
     QItemSelectionModel*        selectionModel;
     MapViewModelHelper*         mapViewModelHelper;
     KMapIface::ItemMarkerTiler* markerTilerModelBased;
-    QToolButton*                removeCurrentSelectionButton;
+    //QToolButton*                removeCurrentSelectionButton;
     bool                        existsSelection;
 };
 
 GPSSearchView::GPSSearchView(QWidget* parent, SearchModel* searchModel,
-                             SearchModificationHelper* searchModificationHelper)
+                             SearchModificationHelper* searchModificationHelper, \
QItemSelectionModel* itemSelectionModel)  : QWidget(parent), StateSavingObject(this),
                d(new GPSSearchViewPriv)
 {
@@ -123,7 +123,7 @@
     setAcceptDrops(true);
 
     d->imageAlbumModel    = new ImageAlbumModel(this);
-    d->selectionModel     = new QItemSelectionModel(d->imageAlbumModel);
+    d->selectionModel     = itemSelectionModel;
     d->mapViewModelHelper = new MapViewModelHelper(d->imageAlbumModel, \
d->selectionModel, this);  
     d->markerTilerModelBased = new KMapIface::ItemMarkerTiler(d->mapViewModelHelper, \
this); @@ -190,15 +190,15 @@
     vlayTop->addWidget(mapPanel);
     vlayTop->addWidget(d->mapSearchWidget->getControlWidget());
 
-    d->actionRemoveCurrentSelection = new KAction(this);
-    d->actionRemoveCurrentSelection->setIcon(SmallIcon("edit-clear"));
-    d->actionRemoveCurrentSelection->setToolTip(i18n("Removes the current selection \
and shows all images on the map.")); +//    d->actionRemoveCurrentSelection = new \
KAction(this); +//    \
d->actionRemoveCurrentSelection->setIcon(SmallIcon("edit-clear")); +//    \
d->actionRemoveCurrentSelection->setToolTip(i18n("Removes the current selection and \
shows all images on the map."));  
 
-    d->removeCurrentSelectionButton = new QToolButton(this);
-    d->removeCurrentSelectionButton->setDefaultAction(d->actionRemoveCurrentSelection);
                
-    d->mapSearchWidget->addWidgetToControlWidget(d->removeCurrentSelectionButton);
-    d->removeCurrentSelectionButton->setEnabled(false);
+//    d->removeCurrentSelectionButton = new QToolButton(this);
+//    d->removeCurrentSelectionButton->setDefaultAction(d->actionRemoveCurrentSelection);
 +//    d->mapSearchWidget->addWidgetToControlWidget(d->removeCurrentSelectionButton);
 +//    d->removeCurrentSelectionButton->setEnabled(false);
     d->existsSelection              = false; 
 
     vlayTop->addWidget(hbox);
@@ -221,8 +221,8 @@
 
     // ---------------------------------------------------------------
 
-    connect(d->actionRemoveCurrentSelection, SIGNAL(triggered()),
-            this, SLOT(slotRemoveCurrentSelection()));
+    //connect(d->actionRemoveCurrentSelection, SIGNAL(triggered()),
+    //        this, SLOT(slotRemoveCurrentSelection()));
 
     connect(d->searchTreeView, SIGNAL(currentAlbumChanged(Album*)),
             this, SLOT(slotAlbumSelected(Album*)));
@@ -383,7 +383,7 @@
     if(d->existsSelection) 
     {
         d->mapSearchWidget->setGroupedModel(d->markerTilerModelBased); 
-        d->removeCurrentSelectionButton->setEnabled(true);
+        //d->removeCurrentSelectionButton->setEnabled(true);
     }
 }
 
@@ -482,14 +482,13 @@
 void GPSSearchView::slotRemoveCurrentSelection()
 {
     d->existsSelection = false;
-    d->removeCurrentSelectionButton->setEnabled(d->existsSelection);
+    //d->removeCurrentSelectionButton->setEnabled(d->existsSelection);
     d->imageAlbumModel->clearImageInfos();
     d->mapSearchWidget->setGroupedModel(d->gpsMarkerTiler);
 }
 
 void GPSSearchView::slotCheckNameEditGPSConditions()
 {
-    //d->gpsMarkerTiler->secondTestDatabase(5.1,80.3,20.4,130.6);
 
     if (d->mapSearchWidget->hasSelection())
     {
--- branches/extragear/graphics/digikam/utilities/gpssearch/gpssearchview.h \
#1157725:1157726 @@ -59,7 +59,7 @@
 public:
 
     GPSSearchView(QWidget* parent, SearchModel* searchModel,
-                  SearchModificationHelper* searchModificationHelper);
+                  SearchModificationHelper* searchModificationHelper, \
QItemSelectionModel* itemSelectionModel);  ~GPSSearchView();
 
     void setActive(bool val);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic