[Digikam-devel] [Bug 118526] make it possible to remove an album's thumbnail

Gilles Caulier caulier.gilles at free.fr
Fri Sep 1 14:29:29 BST 2006


------- 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=118526         




------- Additional Comments From caulier.gilles free fr  2006-09-01 15:29 -------
SVN commit 579716 by cgilles:

digikam from trunk: new button to reset tag thumb in tag properties dialog
CCBUGS: 118526

 M  +24 -10    tagcreatedlg.cpp  
 M  +1 -0      tagcreatedlg.h  


--- trunk/extragear/graphics/digikam/digikam/tagcreatedlg.cpp #579715:579716
 @ -204,8 +204,9  @
 
     TagEditDlgPriv()
     {
-        titleEdit  = 0;
-        iconButton = 0;
+        titleEdit       = 0;
+        iconButton      = 0;
+        resetIconButton = 0;
     }
 
     KLineEdit   *titleEdit;
 @ -213,6 +214,7  @
     QString      icon;
 
     QPushButton *iconButton;
+    QPushButton *resetIconButton;
 };
 
 TagEditDlg::TagEditDlg(QWidget *parent, TAlbum* album)
 @ -248,28 +250,31  @
 
     QLabel *titleLabel = new QLabel(plainPage());
     titleLabel->setText(i18n("&Title:"));
-    gl->addWidget(titleLabel, 0, 0);
 
     d->titleEdit = new KLineEdit(plainPage());
     d->titleEdit->setText(album->title());
     titleLabel->setBuddy(d->titleEdit);
-    gl->addWidget(d->titleEdit, 0, 1);
-
     setFocusProxy(d->titleEdit);
 
     QLabel *iconTextLabel = new QLabel(plainPage());
     iconTextLabel->setText(i18n("&Icon:"));
-    gl->addWidget(iconTextLabel, 1, 0);
 
     d->iconButton = new QPushButton(plainPage());
     d->iconButton->setFixedSize(40, 40);
     iconTextLabel->setBuddy(d->iconButton);
-    gl->addWidget(d->iconButton, 1, 1);
+    
+    d->resetIconButton = new QPushButton(i18n("Reset"), plainPage());
 
     QSpacerItem* spacer = new QSpacerItem(0, 0, QSizePolicy::Minimum,
-                                          QSizePolicy::Expanding);
-    gl->addItem(spacer, 2, 1);
-
+                                           QSizePolicy::Expanding);
+    
+    gl->addWidget(titleLabel, 0, 0);
+    gl->addMultiCellWidget(d->titleEdit, 0, 0, 1, 3);
+    gl->addWidget(iconTextLabel, 1, 0);
+    gl->addWidget(d->iconButton, 1, 1);
+    gl->addWidget(d->resetIconButton, 1, 2);
+    gl->addItem(spacer, 1, 3);
+    
     grid->addMultiCellWidget(logo, 0, 0, 0, 0);
     grid->addMultiCellLayout(topLayout, 0, 1, 1, 1);
     grid->setRowStretch(1, 10);
 @ -279,6 +284,9  @
     connect(d->iconButton, SIGNAL(clicked()),
             this, SLOT(slotIconChange()));
 
+    connect(d->resetIconButton, SIGNAL(clicked()),
+            this, SLOT(slotIconResetClicked()));
+            
     connect(d->titleEdit, SIGNAL(textChanged(const QString&)),
             this, SLOT(slotTitleChanged(const QString&)));
 
 @ -306,6 +314,12  @
     return d->icon;
 }
 
+void TagEditDlg::slotIconResetClicked()
+{
+    d->icon = QString("tag");
+    d->iconButton->setIconSet(SyncJob::getTagThumbnail(d->icon, 20));
+}
+    
 void TagEditDlg::slotIconChange()
 {
 #if KDE_IS_VERSION(3,3,0)
--- trunk/extragear/graphics/digikam/digikam/tagcreatedlg.h #579715:579716
 @ -85,6 +85,7  @
 private slots:
 
     void slotIconChange();
+    void slotIconResetClicked();
     void slotTitleChanged(const QString& newtitle);
     
 private:



More information about the Digikam-devel mailing list