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

List:       kde-commits
Subject:    extragear/graphics/digikam/digikam
From:       Gilles Caulier <caulier.gilles () gmail ! com>
Date:       2011-01-21 10:48:53
Message-ID: 20110121104853.8F9F8AC8B8 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1216096 by cgilles:

polish


 M  +14 -11    addtagslineedit.cpp  
 M  +7 -9      addtagslineedit.h  
 M  +5 -1      albumhistory.cpp  
 M  +1 -1      albumhistory.h  
 M  +14 -16    albummodificationhelper.cpp  
 M  +15 -8     albummodificationhelper.h  
 M  +2 -2      albumpropsedit.cpp  
 M  +2 -2      albumpropsedit.h  
 M  +2 -3      albumselectcombobox.cpp  
 M  +2 -2      albumselectcombobox.h  
 M  +1 -1      albumselectdialog.cpp  
 M  +1 -1      albumselectdialog.h  


--- trunk/extragear/graphics/digikam/digikam/addtagslineedit.cpp #1216095:1216096
@@ -6,7 +6,7 @@
  * Date        : 2010-06-12
  * Description : Special line edit for adding or creatingtags
  *
- * Copyright (C) 2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+ * Copyright (C) 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
  * Copyright (C) 1997 Sven Radej (sven.radej@iname.com)
  * Copyright (C) 1999 Patrick Ward <PAT_WARD@HP-USA-om5.om.hp.com>
  * Copyright (C) 1999 Preston Brown <pbrown@kde.org>
@@ -116,6 +116,8 @@
     return static_cast<TagModel*>(ModelCompletion::model());
 }
 
+// -------------------------------------------------------------------------------
+
 class AddTagsCompletionBoxItem : public QListWidgetItem
 {
 public:
@@ -144,7 +146,7 @@
 
 // ---------------------------------------------------------------------------------------
  
-class AddTagsCompletionBoxPriv
+class AddTagsCompletionBox::AddTagsCompletionBoxPriv
 {
 public:
 
@@ -165,6 +167,8 @@
     TagModel*             model;
     AlbumPointer<TAlbum> parentTag;
 
+public:
+
     AddTagsCompletionBoxItem* createItemForExistingTag(TAlbum* talbum, bool \
                uniqueName);
     AddTagsCompletionBoxItem* createItemForNewTag(const QString& newName, TAlbum* \
parent);  int maximumAvailableScreenHeight(const QPoint& globalPos);
@@ -190,7 +194,7 @@
     d->model = model;
 }
 
-AddTagsCompletionBoxItem* AddTagsCompletionBoxPriv::createItemForExistingTag(TAlbum* \
talbum, bool uniqueName) +AddTagsCompletionBoxItem* \
AddTagsCompletionBox::AddTagsCompletionBoxPriv::createItemForExistingTag(TAlbum* \
talbum, bool uniqueName)  {
     if (!talbum || talbum->isRoot())
     {
@@ -198,7 +202,6 @@
     }
 
     AddTagsCompletionBoxItem* item = new AddTagsCompletionBoxItem;
-
     TAlbum* parent = static_cast<TAlbum*>(talbum->parent());
 
     if (parent->isRoot() || uniqueName)
@@ -223,7 +226,7 @@
     return item;
 }
 
-AddTagsCompletionBoxItem* AddTagsCompletionBoxPriv::createItemForNewTag(const \
QString& newName, TAlbum* parent) +AddTagsCompletionBoxItem* \
AddTagsCompletionBox::AddTagsCompletionBoxPriv::createItemForNewTag(const QString& \
newName, TAlbum* parent)  {
     int parentTagId = parent ? parent->id() : 0;
 
@@ -246,7 +249,6 @@
     }
 
     item->setData(Qt::DecorationRole, \
                AlbumThumbnailLoader::instance()->getNewTagIcon());
-
     item->setData(CompletionTextRole, newName);
     item->setAction(TaggingAction(newName, parentTagId));
 
@@ -328,6 +330,7 @@
 }
 
 /*
+
     /// If an item matches the given completion text exactly, it is made the current \
item  void setCurrentCompletionText(const QString& completionText);
     QString currentCompletionText() const;
@@ -480,9 +483,7 @@
     }
 
     const int frameHeight = 2*frameWidth();
-
     int maxHeight         = d->maximumAvailableScreenHeight(globalPositionHint());
-
     int suggestedHeight   = qMin(15, count()) * itemSizeHint.height();
 
     //kDebug() << itemSizeHint << maxHeight << suggestedHeight;
@@ -539,7 +540,7 @@
     return calculateGeometry().size();
 }
 
-int AddTagsCompletionBoxPriv::maximumAvailableScreenHeight(const QPoint& orig)
+int AddTagsCompletionBox::AddTagsCompletionBoxPriv::maximumAvailableScreenHeight(const \
QPoint& orig)  {
     QRect screenSize = QApplication::desktop()->availableGeometry(orig);
 
@@ -552,7 +553,9 @@
     return qMax(orig.y() - screenSize.top(), screenSize.bottom() - orig.y());
 }
 
-class AddTagsLineEditPriv
+// ---------------------------------------------------------------------------------------
 +
+class AddTagsLineEdit::AddTagsLineEditPriv
 {
 public:
 
@@ -816,7 +819,7 @@
     }
 }
 
-TaggingAction AddTagsLineEditPriv::makeTaggingAction(const QString& text)
+TaggingAction AddTagsLineEdit::AddTagsLineEditPriv::makeTaggingAction(const QString& \
text)  {
     TAlbum* parentTag = 0;
 
--- trunk/extragear/graphics/digikam/digikam/addtagslineedit.h #1216095:1216096
@@ -6,7 +6,7 @@
  * Date        : 2010-06-12
  * Description : Special line edit for adding or creatingtags
  *
- * Copyright (C) 2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+ * Copyright (C) 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
@@ -24,8 +24,6 @@
 #ifndef ADDTAGSLINEEDIT_H
 #define ADDTAGSLINEEDIT_H
 
-// Qt includes
-
 // KDE includes
 
 #include <kcompletionbox.h>
@@ -54,6 +52,8 @@
     TagModel* model() const;
 };
 
+// -------------------------------------------------------------------------------
+
 class TaggingAction
 {
 public:
@@ -127,10 +127,8 @@
     QString m_tagName;
 };
 
-// ---------------------------------------------------------------------------------------
 +// -------------------------------------------------------------------------------
 
-class AddTagsCompletionBoxPriv;
-
 class AddTagsCompletionBox : public KCompletionBox
 {
     Q_OBJECT
@@ -203,13 +201,12 @@
 
 private:
 
+    class AddTagsCompletionBoxPriv;
     AddTagsCompletionBoxPriv* const d;
 };
 
-// ---------------------------------------------------------------------------------------
 +// -------------------------------------------------------------------------------
 
-class AddTagsLineEditPriv;
-
 class AddTagsLineEdit : public KLineEdit
 {
     Q_OBJECT
@@ -249,6 +246,7 @@
 
 private:
 
+    class AddTagsLineEditPriv;
     AddTagsLineEditPriv* const d;
 };
 
--- trunk/extragear/graphics/digikam/digikam/albumhistory.cpp #1216095:1216096
@@ -7,7 +7,7 @@
  * Description : albums history manager.
  *
  * Copyright (C) 2004 by Joern Ahrens <joern.ahrens@kdemail.net>
- * Copyright (C) 2006-2009 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright (C) 2006-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
@@ -67,6 +67,8 @@
     QWidget* widget;
 };
 
+// ---------------------------------------------------------------------
+
 class HistoryPosition
 {
 public:
@@ -91,6 +93,8 @@
     KUrl::List select;
 };
 
+// ---------------------------------------------------------------------
+
 AlbumHistory::AlbumHistory()
 {
     m_backwardStack = new AlbumStack;
--- trunk/extragear/graphics/digikam/digikam/albumhistory.h #1216095:1216096
@@ -7,7 +7,7 @@
  * Description : Albums history manager.
  *
  * Copyright (C) 2004 by Joern Ahrens <joern.ahrens@kdemail.net>
- * Copyright (C) 2006-2009 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright (C) 2006-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
--- trunk/extragear/graphics/digikam/digikam/albummodificationhelper.cpp \
#1216095:1216096 @@ -6,7 +6,7 @@
  * Date        : 2000-12-05
  * Description : helper class used to modify physical albums in views
  *
- * Copyright (C) 2009 by Johannes Wienke <languitar at semipol dot de>
+ * Copyright (C) 2009-2011 by Johannes Wienke <languitar at semipol dot de>
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
@@ -24,6 +24,7 @@
 #include "albummodificationhelper.moc"
 
 // KDE includes
+
 #include <kdebug.h>
 #include <kinputdialog.h>
 #include <kio/jobuidelegate.h>
@@ -32,6 +33,7 @@
 #include <kurl.h>
 
 // Local includes
+
 #include "albummanager.h"
 #include "albumpropsedit.h"
 #include "albumsettings.h"
@@ -42,15 +44,19 @@
 namespace Digikam
 {
 
-class AlbumModificationHelperPriv
+class AlbumModificationHelper::AlbumModificationHelperPriv
 {
 public:
+    AlbumModificationHelperPriv() :
+        dialogParent(0)
+    {
+    }
+
     QWidget* dialogParent;
 };
 
-AlbumModificationHelper::AlbumModificationHelper(QObject* parent,
-        QWidget* dialogParent) :
-    QObject(parent), d(new AlbumModificationHelperPriv)
+AlbumModificationHelper::AlbumModificationHelper(QObject* parent, QWidget* \
dialogParent) +    : QObject(parent), d(new AlbumModificationHelperPriv)
 {
     d->dialogParent = dialogParent;
 }
@@ -112,7 +118,7 @@
     }
 
     QString errMsg;
-    PAlbum* album;
+    PAlbum* album = 0;
 
     if (parent->isRoot())
     {
@@ -132,12 +138,10 @@
     }
 
     return album;
-
 }
 
 void AlbumModificationHelper::slotAlbumDelete(PAlbum* album)
 {
-
     if (!album || album->isRoot() || album->isAlbumRoot())
     {
         return;
@@ -167,14 +171,13 @@
     u.setProtocol("file");
     u.setPath(album->folderPath());
     KIO::Job* job = DIO::del(u, useTrash);
+
     connect(job, SIGNAL(result(KJob*)),
             this, SLOT(slotDIOResult(KJob*)));
-
 }
 
 void AlbumModificationHelper::slotAlbumRename(PAlbum* album)
 {
-
     if (!album)
     {
         return;
@@ -201,7 +204,6 @@
             KMessageBox::error(0, errMsg);
         }
     }
-
 }
 
 void AlbumModificationHelper::addAlbumChildrenToList(KUrl::List& list, Album* album)
@@ -218,7 +220,6 @@
             ++it;
         }
     }
-
 }
 
 void AlbumModificationHelper::slotDIOResult(KJob* kjob)
@@ -234,7 +235,6 @@
 
 void AlbumModificationHelper::slotAlbumEdit(PAlbum* album)
 {
-
     if (!album || album->isRoot() || album->isAlbumRoot())
     {
         return;
@@ -282,9 +282,7 @@
                 KMessageBox::error(d->dialogParent, errMsg);
             }
         }
-
     }
-
 }
 
-}
+} // namespace Digikam
--- trunk/extragear/graphics/digikam/digikam/albummodificationhelper.h \
#1216095:1216096 @@ -6,7 +6,7 @@
  * Date        : 2000-12-05
  * Description : helper class used to modify physical albums in views
  *
- * Copyright (C) 2009 by Johannes Wienke <languitar at semipol dot de>
+ * Copyright (C) 2009-2011 by Johannes Wienke <languitar at semipol dot de>
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
@@ -24,21 +24,22 @@
 #ifndef ALBUMMODIFICATIONHELPER_H
 #define ALBUMMODIFICATIONHELPER_H
 
-// QT includes
-#include <qobject.h>
-#include <qwidget.h>
+// Qt includes
 
+#include <QObject>
+#include <QWidget>
+
 // KDE includes
+
 #include <kjob.h>
 
 // Local includes
+
 #include "album.h"
 
 namespace Digikam
 {
 
-class AlbumModificationHelperPriv;
-
 /**
  * Utility class providing methods to modify physical albums (PAlbum) in a way
  * useful to implement views.
@@ -48,6 +49,7 @@
 class AlbumModificationHelper : public QObject
 {
     Q_OBJECT
+
 public:
 
     /**
@@ -97,15 +99,20 @@
     void slotAlbumEdit(PAlbum* album);
 
 private Q_SLOTS:
+
     void slotDIOResult(KJob* kjob);
 
 private:
+
     void addAlbumChildrenToList(KUrl::List& list, Album* album);
 
-    AlbumModificationHelperPriv* d;
+private:
 
+    class AlbumModificationHelperPriv;
+    AlbumModificationHelperPriv* const d;
+
 };
 
-}
+} // namespace Digikam
 
 #endif /* ALBUMMODIFICATIONHELPER_H */
--- trunk/extragear/graphics/digikam/digikam/albumpropsedit.cpp #1216095:1216096
@@ -8,7 +8,7 @@
  *
  * Copyright (C) 2003-2004 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
  * Copyright (C) 2005 by Tom Albers <tomalbers@kde.nl>
- * Copyright (C) 2006-2009 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright (C) 2006-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
@@ -68,7 +68,7 @@
 namespace Digikam
 {
 
-class AlbumPropsEditPriv
+class AlbumPropsEdit::AlbumPropsEditPriv
 {
 
 public:
--- trunk/extragear/graphics/digikam/digikam/albumpropsedit.h #1216095:1216096
@@ -8,7 +8,7 @@
  *
  * Copyright (C) 2003-2004 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
  * Copyright (C) 2005 by Tom Albers <tomalbers@kde.nl>
- * Copyright (C) 2006-2009 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright (C) 2006-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
@@ -40,7 +40,6 @@
 {
 
 class PAlbum;
-class AlbumPropsEditPriv;
 
 class AlbumPropsEdit : public KDialog
 {
@@ -80,6 +79,7 @@
 
 private:
 
+    class AlbumPropsEditPriv;
     AlbumPropsEditPriv* const d;
 };
 
--- trunk/extragear/graphics/digikam/digikam/albumselectcombobox.cpp #1216095:1216096
@@ -6,8 +6,8 @@
  * Date        : 2009-05-09
  * Description : A combo box for selecting albums
  *
- * Copyright (C) 2008-2010 by Marcel Wiesweg <marcel.wiesweg@gmx.de>
- * Copyright (C) 2010 by Andi Clemens <andi dot clemens at gmx dot net>
+ * Copyright (C) 2008-2011 by Marcel Wiesweg <marcel.wiesweg@gmx.de>
+ * Copyright (C) 2010-2011 by Andi Clemens <andi dot clemens at gmx dot net>
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
@@ -157,4 +157,3 @@
 }
 
 } // namespace Digikam
-
--- trunk/extragear/graphics/digikam/digikam/albumselectcombobox.h #1216095:1216096
@@ -6,8 +6,8 @@
  * Date        : 2009-05-09
  * Description : A combo box for selecting albums
  *
- * Copyright (C) 2008-2010 by Marcel Wiesweg <marcel.wiesweg@gmx.de>
- * Copyright (C) 2010 by Andi Clemens <andi dot clemens at gmx dot net>
+ * Copyright (C) 2008-2011 by Marcel Wiesweg <marcel.wiesweg@gmx.de>
+ * Copyright (C) 2010-2011 by Andi Clemens <andi dot clemens at gmx dot net>
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
--- trunk/extragear/graphics/digikam/digikam/albumselectdialog.cpp #1216095:1216096
@@ -8,7 +8,7 @@
  *               pictures from camera
  *
  * Copyright (C) 2005 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
- * Copyright (C) 2006-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright (C) 2006-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
--- trunk/extragear/graphics/digikam/digikam/albumselectdialog.h #1216095:1216096
@@ -8,7 +8,7 @@
  *               pictures from camera
  *
  * Copyright (C) 2005 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
- * Copyright (C) 2006-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright (C) 2006-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General


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

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