[Kde-imaging] kdeextragear-libs-1/libkipi/libkipi
Gilles Caulier
caulier.gilles at free.fr
Wed Sep 15 15:54:13 CEST 2004
CVS commit by cgilles:
ImageCollectionSelector : Added signal when a collection is selected (requested by CDArchiving Kipi plugin)
CCMAIL: kde-imaging at kde.org
M +27 -12 imagecollectionselector.cpp 1.8
M +17 -4 imagecollectionselector.h 1.6
--- kdeextragear-libs-1/libkipi/libkipi/imagecollectionselector.cpp #1.7:1.8
@@ -20,9 +20,7 @@
*
* ============================================================ */
-#include "imagecollectionselector.moc"
-#include "imagecollectionselector.h"
+// Qt includes.
-// Qt
#include <qheader.h>
#include <qlayout.h>
@@ -32,5 +30,6 @@
#include <qtimer.h>
-// KDE
+// KDE includes.
+
#include <kbuttonbox.h>
#include <kdialog.h>
@@ -40,8 +39,14 @@
#include <kio/previewjob.h>
-// KIPI
+// KIPI includes.
+
#include "libkipi/interface.h"
-namespace KIPI {
+// Local includes.
+
+#include "imagecollectionselector.h"
+
+namespace KIPI
+{
class ImageCollectionItem : public QCheckListItem
@@ -70,5 +75,5 @@ struct ImageCollectionSelector::Private
ImageCollectionSelector::ImageCollectionSelector(QWidget* parent, Interface* interface, const char* name)
-: QWidget(parent, name)
+ : QWidget(parent, name)
{
d=new Private;
@@ -96,7 +101,10 @@ ImageCollectionSelector::ImageCollection
box->layout();
- connect(selectAll, SIGNAL(clicked()), this, SLOT(slotSelectAll()) );
- connect(invertSelection, SIGNAL(clicked()), this, SLOT(slotInvertSelection()) );
- connect(selectNone, SIGNAL(clicked()), this, SLOT(slotSelectNone()) );
+ connect(selectAll, SIGNAL(clicked()),
+ this, SLOT(slotSelectAll()) );
+ connect(invertSelection, SIGNAL(clicked()),
+ this, SLOT(slotInvertSelection()) );
+ connect(selectNone, SIGNAL(clicked()),
+ this, SLOT(slotSelectNone()) );
rightLayout->addItem(new QSpacerItem(10,20,QSizePolicy::Fixed,
@@ -177,4 +185,5 @@ void ImageCollectionSelector::slotSelect
item->setOn(true);
}
+ emit signalSelectionChanged();
}
@@ -187,4 +196,5 @@ void ImageCollectionSelector::slotInvert
item->setOn(!item->isOn());
}
+ emit signalSelectionChanged();
}
@@ -197,4 +207,5 @@ void ImageCollectionSelector::slotSelect
item->setOn(false);
}
+ emit signalSelectionChanged();
}
@@ -273,6 +284,7 @@ void ImageCollectionSelector::slotSelect
text += "</table>";
-
d->_textLabel->setText(text);
+
+ emit signalSelectionChanged();
}
@@ -290,5 +302,8 @@ void ImageCollectionSelector::slotInitia
d->_itemToSelect = 0;
}
+ emit signalSelectionChanged();
}
} // KIPI
+
+#include "imagecollectionselector.moc"
--- kdeextragear-libs-1/libkipi/libkipi/imagecollectionselector.h #1.5:1.6
@@ -23,10 +24,12 @@
#define IMAGECOLLECTIONSELECTOR_H
-// Qt
+// Qt includes.
+
#include <qwidget.h>
#include <qvaluelist.h>
#include <qpixmap.h>
-// KIPI
+// KIPI includes.
+
#include "libkipi/imagecollection.h"
@@ -34,22 +37,32 @@ class QListViewItem;
class KFileItem;
-namespace KIPI {
+namespace KIPI
+{
class Interface;
-class ImageCollectionSelector : public QWidget {
+class ImageCollectionSelector : public QWidget
+{
Q_OBJECT
class Private;
public:
+
ImageCollectionSelector(QWidget* parent, Interface*, const char* name=0);
~ImageCollectionSelector();
+
QValueList<ImageCollection> selectedImageCollections() const;
+signals:
+
+ void signalSelectionChanged(void);
+
private:
+
Private* d;
void fillList();
private slots:
+
void slotSelectAll();
void slotInvertSelection();
More information about the Kde-imaging
mailing list