SVN commit 484470 by netterfield: Some functionality for viewobjectdialog :-) M +3 -2 ksteditviewobjectdialog_i.cpp M +3 -2 kstviewlabel.cpp M +1 -1 kstviewlabel.h M +2 -2 kstviewobject.h --- trunk/extragear/graphics/kst/kst/ksteditviewobjectdialog_i.cpp #484469:484470 @@ -35,6 +35,7 @@ #include "ksteditviewobjectdialog_i.h" #include +#include KstEditViewObjectDialogI::KstEditViewObjectDialogI(QWidget* parent, const char* name, bool modal, WFlags fl) : KstEditViewObjectDialog(parent, name, modal, fl) { @@ -90,7 +91,7 @@ void KstEditViewObjectDialogI::updateWidgets() { // clear all the current widgets from the grid clearWidgets(); - + // get the qt properties of the viewobject if (_viewObject) { _customWidget = _viewObject->configWidget(); @@ -101,7 +102,7 @@ _grid->addWidget(_customWidget, 0, 0); return; } - + //--------------------------------------------------------------- // NOTE: due to Early return, nothing after this line is executed // if the view object provides a custom widget. --- trunk/extragear/graphics/kst/kst/kstviewlabel.cpp #484469:484470 @@ -571,12 +571,12 @@ // return map; // } -bool KstViewLabel::fillConfigWidget(QWidget *w) { +bool KstViewLabel::fillConfigWidget(QWidget *w) const { ViewLabelWidget *widget = dynamic_cast(w); if (!w) { return false; } - widget->_text->setText(_txt+"Hi"); + widget->_text->setText(_txt); return true; } @@ -586,6 +586,7 @@ return false; } _txt = widget->_text->text(); + reparse(); // calls setDirty() return true; } --- trunk/extragear/graphics/kst/kst/kstviewlabel.h #484469:484470 @@ -93,7 +93,7 @@ QWidget *configWidget(); // handle custom widget, if any: is called by KstEditViewObjectDialogI - virtual bool fillConfigWidget(QWidget *w); + virtual bool fillConfigWidget(QWidget *w) const; virtual bool readConfigWidget(QWidget *w); public slots: --- trunk/extragear/graphics/kst/kst/kstviewobject.h #484469:484470 @@ -214,14 +214,14 @@ // given a property name // FIXME: Don't use QMap. We need to preserve order here. virtual QMap widgetHints(const QString& propertyName) const; - + // draws a minimalistic shadow outline of this object at the given position virtual void drawShadow(KstPainter& p, const QPoint& pos); // handle custom widget, if any: is called by KstEditViewObjectDialogI virtual bool fillConfigWidget(QWidget *w) const; virtual bool readConfigWidget(QWidget *w); - + public slots: virtual void paint(KstPainter& p, const QRegion& bounds); virtual void updateFromAspect();