libs/flake
KoShapeConfigWidgetBase Class Reference
Base widget for shape-configuration panels. More...
#include <KoShapeConfigWidgetBase.h>

Signals | |
| void | propertyChanged () |
Public Member Functions | |
| KoShapeConfigWidgetBase () | |
| virtual | ~KoShapeConfigWidgetBase () |
| virtual QUndoCommand * | createCommand () |
| virtual void | open (KoShape *shape)=0 |
| virtual void | save ()=0 |
| void | setResourceProvider (KoCanvasResourceProvider *provider) |
| virtual void | setUnit (KoUnit unit) |
| virtual bool | showOnShapeCreate () |
| virtual bool | showOnShapeSelect () |
Protected Attributes | |
| KoCanvasResourceProvider * | m_resourceProvider |
Detailed Description
Base widget for shape-configuration panels.
This is an interface type class used by classes that intend to provide a GUI for configuring newly created shapes as created by a KoShapeFactory.
Every time after a shape is created the KoShapeFactory for that shape-type will be queried for all the config widgets; both factory specific as well as those set by the hosting application. A dialog will be shown with all those panels, each extending this class. The framework will then call open() to populate the widget with data from the param shape. After the user ok-ed the dialog the save() will be called to allow the widget to apply all settings from the widget to the shape.
Definition at line 48 of file KoShapeConfigWidgetBase.h.
Constructor & Destructor Documentation
| KoShapeConfigWidgetBase::KoShapeConfigWidgetBase | ( | ) |
Default constructor.
Definition at line 22 of file KoShapeConfigWidgetBase.cpp.
| KoShapeConfigWidgetBase::~KoShapeConfigWidgetBase | ( | ) | [virtual] |
Definition at line 27 of file KoShapeConfigWidgetBase.cpp.
Member Function Documentation
| QUndoCommand * KoShapeConfigWidgetBase::createCommand | ( | ) | [virtual] |
Creates a command which applies all changes to the opened shape.
Reimplemented in KoConnectionShapeConfigWidget.
Definition at line 51 of file KoShapeConfigWidgetBase.cpp.
| virtual void KoShapeConfigWidgetBase::open | ( | KoShape * | shape | ) | [pure virtual] |
Open the argument shape by interpreting the data and setting that data on this widget.
- Parameters:
-
shape the shape that is to be queried for the data this widget can edit.
Implemented in KoConnectionShapeConfigWidget.
| void KoShapeConfigWidgetBase::propertyChanged | ( | ) | [signal] |
is emitted after one of the config options has changed
| virtual void KoShapeConfigWidgetBase::save | ( | ) | [pure virtual] |
Save the data of this widget to the shape passed to open earlier to apply any user changed options.
Called by the tool that created the shape.
Implemented in KoConnectionShapeConfigWidget.
| void KoShapeConfigWidgetBase::setResourceProvider | ( | KoCanvasResourceProvider * | provider | ) |
called to set the canvas resource provider of the canvas the user used to insert the new shape.
Definition at line 36 of file KoShapeConfigWidgetBase.cpp.
| void KoShapeConfigWidgetBase::setUnit | ( | KoUnit | unit | ) | [virtual] |
Overwrite this method to set the application unit type and update all unit-widgets in this panel.
Called by the tool that created the shape using KoCavasBase::unit()
- Parameters:
-
unit the new unit to show data in.
Definition at line 31 of file KoShapeConfigWidgetBase.cpp.
| bool KoShapeConfigWidgetBase::showOnShapeCreate | ( | ) | [virtual] |
Return true if the shape config panel should be shown after the shape is created.
Reimplemented in KoConnectionShapeConfigWidget.
Definition at line 41 of file KoShapeConfigWidgetBase.cpp.
| bool KoShapeConfigWidgetBase::showOnShapeSelect | ( | ) | [virtual] |
Return true if the shape config panel should be shown when the shape is selected.
Definition at line 46 of file KoShapeConfigWidgetBase.cpp.
Member Data Documentation
the resource provider with data for this canvas
Definition at line 96 of file KoShapeConfigWidgetBase.h.
The documentation for this class was generated from the following files:
