[Digikam-devel] [Bug 145227] change ratings via short-cuts in the light-table

Gilles Caulier caulier.gilles at gmail.com
Thu May 10 13:54:11 BST 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=145227         
caulier.gilles gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From caulier.gilles gmail com  2007-05-10 14:54 -------
SVN commit 663188 by cgilles:

digikam from trunk : Light Table : and finaly, to be able to assign Rating to the current selected picture in thumbbar using standard digiKam keyboard shorcuts (CTRL+0, CTRL+1, ..., CTRL+5)
BUG: 145227

 M  +30 -0     lighttablebar.cpp  
 M  +7 -0      lighttablebar.h  
 M  +35 -0     lighttablewindow.cpp  


--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablebar.cpp #663187:663188
 @ -173,6 +173,36  @
     }
 }
 
+void LightTableBar::slotAssignRatingNoStar()
+{
+    slotAssignRating(0);
+}
+
+void LightTableBar::slotAssignRatingOneStar()
+{
+    slotAssignRating(1);
+}
+
+void LightTableBar::slotAssignRatingTwoStar()
+{
+    slotAssignRating(2);
+}
+
+void LightTableBar::slotAssignRatingThreeStar()
+{
+    slotAssignRating(3);
+}
+
+void LightTableBar::slotAssignRatingFourStar()
+{
+    slotAssignRating(4);
+}
+
+void LightTableBar::slotAssignRatingFiveStar()
+{
+    slotAssignRating(5);
+}
+
 void LightTableBar::setOnLeftPanel(const ImageInfo* info)
 {
     if (!info) return;
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablebar.h #663187:663188
 @ -89,6 +89,13  @
 
     void slotImageRatingChanged(Q_LLONG);
     void slotItemSelected(ThumbBarItem*);
+
+    void slotAssignRatingNoStar();
+    void slotAssignRatingOneStar();
+    void slotAssignRatingTwoStar();
+    void slotAssignRatingThreeStar();
+    void slotAssignRatingFourStar();
+    void slotAssignRatingFiveStar();
     void slotAssignRating(int);
 
 private:
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablewindow.cpp #663187:663188
 @ -79,6 +79,12  @
         fullScreen                          = false;
         removeFullScreenButton              = false;
         cancelSlideShow                     = false;
+        star0                               = 0;
+        star1                               = 0;
+        star2                               = 0;
+        star3                               = 0;
+        star4                               = 0;
+        star5                               = 0;
         accelerators                        = 0;
         leftSidebar                         = 0;
         rightSidebar                        = 0;
 @ -116,6 +122,14  @
     QSplitter                *hSplitter;
     QSplitter                *vSplitter;
 
+    // Rating actions.
+    KAction                  *star0;
+    KAction                  *star1;
+    KAction                  *star2;
+    KAction                  *star3;
+    KAction                  *star4;
+    KAction                  *star5;
+
     KAction                  *setItemLeftAction;
     KAction                  *setItemRightAction;
     KAction                  *clearListAction;
 @ -447,6 +461,27  @
     // Provides a menu entry that allows showing/hiding the statusbar
     createStandardStatusBarAction();
 
+    // -- Rating actions ---------------------------------------------------------------
+
+    d->star0 = new KAction(i18n("Assign Rating \"No Star\""), CTRL+Key_0,
+                          d->barView, SLOT(slotAssignRatingNoStar()),
+                          actionCollection(), "lighttable_ratenostar");
+    d->star1 = new KAction(i18n("Assign Rating \"One Star\""), CTRL+Key_1,
+                          d->barView, SLOT(slotAssignRatingOneStar()),
+                          actionCollection(), "lighttable_rateonestar");
+    d->star2 = new KAction(i18n("Assign Rating \"Two Stars\""), CTRL+Key_2,
+                          d->barView, SLOT(slotAssignRatingTwoStar()),
+                          actionCollection(), "lighttable_ratetwostar");
+    d->star3 = new KAction(i18n("Assign Rating \"Three Stars\""), CTRL+Key_3,
+                          d->barView, SLOT(slotAssignRatingThreeStar()),
+                          actionCollection(), "lighttable_ratethreestar");
+    d->star4 = new KAction(i18n("Assign Rating \"Four Stars\""), CTRL+Key_4,
+                          d->barView, SLOT(slotAssignRatingFourStar()),
+                          actionCollection(), "lighttable_ratefourstar");
+    d->star5 = new KAction(i18n("Assign Rating \"Five Stars\""), CTRL+Key_5,
+                          d->barView, SLOT(slotAssignRatingFiveStar()),
+                          actionCollection(), "lighttable_ratefivestar");
+
     // ---------------------------------------------------------------------------------
 
     createGUI("lighttablewindowui.rc", false);



More information about the Digikam-devel mailing list