[Digikam-devel] extragear/graphics/digikam

Gilles Caulier caulier.gilles at free.fr
Tue Mar 28 21:07:48 BST 2006


SVN commit 523679 by cgilles:

digikam from trunk : showfoto thumbbar now support Exif auto-rotate in according with showfoto Exif setup

CCMAIL: digikam-devel at kde.org



 M  +22 -17    libs/thumbbar/thumbbar.cpp  
 M  +4 -3      libs/thumbbar/thumbbar.h  
 M  +4 -2      showfoto/showfoto.cpp  


--- trunk/extragear/graphics/digikam/libs/thumbbar/thumbbar.cpp #523678:523679
@@ -61,37 +61,42 @@
 
     ThumbBarViewPriv()
     {
-        firstItem = 0;
-        lastItem  = 0;
-        currItem  = 0;
-        count     = 0;
+        exifRotate = false;
+        firstItem  = 0;
+        lastItem   = 0;
+        currItem   = 0;
+        count      = 0;
         itemDict.setAutoDelete(false);
     }
     
-    ThumbBarItem    *firstItem;
-    ThumbBarItem    *lastItem;
-    ThumbBarItem    *currItem;
-    int              count;
+    bool                      clearing;
+    bool                      exifRotate;
 
-    bool             clearing;
-    int              margin;
-    int              tileSize;
-    int              orientation;
+    int                       count;
+    int                       margin;
+    int                       tileSize;
+    int                       orientation;
     
-    QTimer*          timer;
-    ThumbBarToolTip* tip;
+    QTimer                   *timer;
+
+    ThumbBarItem             *firstItem;
+    ThumbBarItem             *lastItem;
+    ThumbBarItem             *currItem;
+
+    ThumbBarToolTip          *tip;
     
     QDict<ThumbBarItem>       itemDict;
     QGuardedPtr<ThumbnailJob> thumbJob;
 };
 
-ThumbBarView::ThumbBarView(QWidget* parent, int orientation)
+ThumbBarView::ThumbBarView(QWidget* parent, int orientation, bool exifRotate)
             : QScrollView(parent)
 {
     d = new ThumbBarViewPriv;
     d->margin      = 5;
     d->tileSize    = 64;
     d->orientation = orientation;
+    d->exifRotate  = exifRotate;
 
     d->tip   = new ThumbBarToolTip(this);
     d->timer = new QTimer(this);
@@ -257,7 +262,7 @@
     if (!d->thumbJob.isNull())
        d->thumbJob->kill();
        
-    d->thumbJob = new ThumbnailJob(item->url(), d->tileSize, true);
+    d->thumbJob = new ThumbnailJob(item->url(), d->tileSize, true, d->exifRotate);
     
     connect(d->thumbJob, SIGNAL(signalThumbnail(const KURL&, const QPixmap&)),
             this, SLOT(slotGotThumbnail(const KURL&, const QPixmap&)));
@@ -511,7 +516,7 @@
         if (!d->thumbJob.isNull())
            d->thumbJob->kill();
 
-        d->thumbJob = new ThumbnailJob(urlList, d->tileSize, true);
+        d->thumbJob = new ThumbnailJob(urlList, d->tileSize, true, d->exifRotate);
         
         connect(d->thumbJob, SIGNAL(signalThumbnail(const KURL&, const QPixmap&)),
                 this, SLOT(slotGotThumbnail(const KURL&, const QPixmap&)));
--- trunk/extragear/graphics/digikam/libs/thumbbar/thumbbar.h #523678:523679
@@ -18,6 +18,7 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
+ *
  * ============================================================ */
 
 #ifndef THUMBBAR_H
@@ -53,13 +54,13 @@
     
     enum Orientation
     {
-    Horizontal=0,      
-    Vertical         
+        Horizontal=0,      
+        Vertical         
     };
 
 public:
 
-    ThumbBarView(QWidget* parent, int orientation=Vertical);
+    ThumbBarView(QWidget* parent, int orientation=Vertical, bool exifRotate=false);
     ~ThumbBarView();
 
     int  countItems();
--- trunk/extragear/graphics/digikam/showfoto/showfoto.cpp #523678:523679
@@ -255,7 +255,8 @@
         m_canvas          = new Digikam::Canvas(m_splitter);
         m_rightSidebar    = new Digikam::ImagePropertiesSideBar(widget, "ShowFoto Sidebar Right", m_splitter, 
                                                                 Digikam::Sidebar::Right);
-        m_bar             = new Digikam::ThumbBarView(widget, Digikam::ThumbBarView::Vertical);
+        m_bar             = new Digikam::ThumbBarView(widget, Digikam::ThumbBarView::Vertical,
+                                                      config->readBoolEntry("EXIF Rotate", true));
         
         hlay->addWidget(m_bar);
         hlay->addWidget(m_splitter);
@@ -267,7 +268,8 @@
         QWidget* widget2  = new QWidget(m_splitter);
         QVBoxLayout *vlay = new QVBoxLayout(widget2);
         m_canvas          = new Digikam::Canvas(widget2);
-        m_bar             = new Digikam::ThumbBarView(widget2, Digikam::ThumbBarView::Horizontal);
+        m_bar             = new Digikam::ThumbBarView(widget2, Digikam::ThumbBarView::Horizontal, 
+                                                      config->readBoolEntry("EXIF Rotate", true));
 
         vlay->addWidget(m_canvas);
         vlay->addWidget(m_bar);



More information about the Digikam-devel mailing list