[Kst] branches/work/kst/portto4/kst/src/widgets
Adam Treat
treat at kde.org
Fri Jun 15 21:31:44 CEST 2007
SVN commit 676043 by treat:
* First dialog for viewitems
M +2 -0 CMakeLists.txt
M +1 -0 colorbutton.cpp
A fillandstroke.cpp [License: GPL (v2+)]
A fillandstroke.h [License: GPL (v2+)]
A fillandstroke.ui
M +17 -1 kstwidgets.h
--- branches/work/kst/portto4/kst/src/widgets/CMakeLists.txt #676042:676043
@@ -7,11 +7,13 @@
set(kstwidgets_LIB_SRCS
kstwidgets.cpp
colorbutton.cpp
+ fillandstroke.cpp
)
kde4_automoc(${kstwidgets_LIB_SRCS})
kde4_add_ui_files(kstwidgets_LIB_SRCS
+ fillandstroke.ui
)
kde4_add_library(kstwidgets SHARED ${kstwidgets_LIB_SRCS})
--- branches/work/kst/portto4/kst/src/widgets/colorbutton.cpp #676042:676043
@@ -41,6 +41,7 @@
void ColorButton::setColor(const QColor &color) {
_color = color;
+ update();
emit changed(color);
}
--- branches/work/kst/portto4/kst/src/widgets/kstwidgets.h #676042:676043
@@ -40,7 +40,7 @@
}
QString includeFile() const {
- return name().toLower() + ".h";
+ return name().replace("Kst::", "").toLower() + ".h";
}
QString domXml() const {
@@ -85,6 +85,21 @@
};
+#include "fillandstroke.h"
+class FillAndStrokePlugin : public KstWidgetPlugin {
+ Q_OBJECT
+ Q_INTERFACES(QDesignerCustomWidgetInterface)
+public:
+ FillAndStrokePlugin(QObject *parent = 0) : KstWidgetPlugin(parent) {}
+ QString name() const {
+ return QLatin1String("Kst::FillAndStroke");
+ } //do not translate
+ QWidget *createWidget(QWidget *parent) {
+ return new Kst::FillAndStroke(parent);
+ }
+};
+
+
class KstWidgets : public QObject, public QDesignerCustomWidgetCollectionInterface {
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
@@ -105,6 +120,7 @@
: QObject(parent) {
(void) new KComponentData("kstwidgets");
_plugins.append(new ColorButtonPlugin(this));
+ _plugins.append(new FillAndStrokePlugin(this));
}
#endif
More information about the Kst
mailing list