[Kst] extragear/graphics/kst/kst

Barth Netterfield netterfield at astro.utoronto.ca
Tue Dec 6 00:03:03 CET 2005


SVN commit 485852 by netterfield:

Add a custom dialog to legends... doesn't do anything yet.



 M  +1 -0      Makefile.am  
 M  +18 -2     kstviewlegend.cpp  
 M  +6 -1      kstviewlegend.h  
 A             viewlegendwidget.ui  


--- trunk/extragear/graphics/kst/kst/Makefile.am #485851:485852
@@ -155,6 +155,7 @@
 	kstlogwidget.cpp \
 	kstplotbase.cpp \
 	viewlabelwidget.ui \
+	viewlegendwidget.ui \
 	kstviewlabel.cpp \
 	kstplotlabel.cpp \
 	kst2dplot.cpp \
--- trunk/extragear/graphics/kst/kst/kstviewlegend.cpp #485851:485852
@@ -27,6 +27,7 @@
 #include "ksttimers.h"
 #include "kstviewobjectfactory.h"
 #include "labelrenderer.h"
+#include "viewlegendwidget.h"
 
 #include <kdatastream.h>
 #include <kglobal.h>
@@ -363,7 +364,7 @@
 void KstViewLegend::readBinary(QDataStream& str) {
 }
 
-
+/*
 QMap<QString, QVariant> KstViewLegend::widgetHints(const QString& propertyName) const {
   QMap<QString, QVariant> map = KstBorderedViewObject::widgetHints(propertyName);
   if (!map.empty()) {
@@ -392,7 +393,7 @@
     map.insert(QString("text"), i18n("Transparent fill"));
   }
   return map;
-}
+}*/
 
 
 bool KstViewLegend::transparent() const {
@@ -422,6 +423,21 @@
 }
 
 
+/** fill the custom widget with current properties */
+bool KstViewLegend::fillConfigWidget(QWidget *w) const {
+}
+
+
+/** apply properties in the custom config widget to this */
+bool KstViewLegend::readConfigWidget(QWidget *w) {
+}
+
+
+QWidget *KstViewLegend::configWidget() {
+  return new ViewLegendWidget;
+}
+
+
 namespace {
 KstViewObject *create_KstViewLegend() {
   return new KstViewLegend;
--- trunk/extragear/graphics/kst/kst/kstviewlegend.h #485851:485852
@@ -61,8 +61,13 @@
     virtual void resize(const QSize&);
     virtual QRegion clipRegion();
     
-    virtual QMap<QString, QVariant> widgetHints(const QString& propertyName) const;
+    //virtual QMap<QString, QVariant> widgetHints(const QString& propertyName) const;
+    QWidget *configWidget();
 
+    // handle custom widget, if any: is called by KstEditViewObjectDialogI
+    virtual bool fillConfigWidget(QWidget *w) const;
+    virtual bool readConfigWidget(QWidget *w);
+
     KstBaseCurveList Curves;
 
     void addCurve(KstBaseCurvePtr curve);


More information about the Kst mailing list