MIRA
|
Provides display and editing facilities for property items in the editor. More...
#include <widgets/PropertyEditor.h>
Classes | |
struct | SupportedType |
Public Types | |
typedef boost::shared_ptr< Delegate > | DelegatePtr |
typedef std::list< SupportedType > | SupportedTypes |
Public Slots | |
void | clear () |
Removes all property nodes that were set and therefore clears the whole editor content (without deleting the nodes). More... | |
void | addProperty (PropertyNode *property, QVariant user=QVariant()) |
Adds the specified property node as top level node to the editor. More... | |
void | removeProperty (PropertyNode *property) |
Remove the specified property node from the editor. More... | |
void | moveUpProperty (PropertyNode *property) |
Moves the property node up in the editor's property node list. More... | |
void | moveDownProperty (PropertyNode *property) |
Moves the property node down in the editor's property node list. More... | |
QVariant | getUser (PropertyNode *property) |
void | setAutoHideFilterBar (bool hide=true) |
void | showFilter () |
void | hideFilter () |
Public Member Functions | |
PropertyEditor (QWidget *parent=0) | |
virtual | ~PropertyEditor () |
PropertyNode * | currentProperty () |
Returns the current selected property node, or NULL if nothing is selected. More... | |
void | setHideSingleRootNode (bool hide=true) |
If hiding of the single root node is enabled, a single top level node will not be shown explicitly. More... | |
bool | getHideSingleRootNode () const |
Returns the set mode, whether a single root node should be hidden or not. More... | |
void | installFilterShortCut (QWidget *widget, const QString &shortcut="Ctrl+F") |
bool | getAutoHideFilterBar () const |
void | setColor (const PropertyNode *property, const QColor &color) |
Sets the background color for the specified property. More... | |
QColor | getColor (const PropertyNode *property) const |
std::string | getText (const PropertyNode *property) const |
QIcon | getIcon (const PropertyNode *property) const |
QColor | getBackgroundColor (const PropertyNode *property) const |
QWidget * | createEditor (PropertyNode *property, QWidget *parent) |
std::string | getName (const PropertyNode *property) |
const PropertyNode * | getCurrentEditedProperty () const |
virtual SupportedTypes | supportedTypes () const =0 |
virtual std::string | getText (const PropertyNode *property) |
Returns text for a text label. More... | |
virtual QIcon | getIcon (const PropertyNode *property) |
virtual QColor | getBackgroundColor (const PropertyNode *property) |
virtual QWidget * | createEditor (PropertyNode *property, QWidget *parent) |
virtual bool | execDialog (PropertyNode *property, QWidget *parent) |
virtual std::string | getName (const PropertyNode *property) |
PropertyListener interface | |
virtual void | beginAddChildren (const PropertyNode *node, int index, int count) |
virtual void | endAddChildren () |
virtual void | beginRemoveChildren (const PropertyNode *node, int index, int count) |
virtual void | endRemoveChildren () |
virtual void | beginMoveChildren (const PropertyNode *node, int index, int count, int destination) |
virtual void | endMoveChildren () |
Static Public Member Functions | |
template<typename Type > | |
static SupportedType | makeSupportedType (SupportedType::Flags flags) |
Static Public Attributes | |
static const QColor | lightBlue |
static const QColor | lightRed |
static const QColor | lightGreen |
static const QColor | lightYellow |
static const QColor | lightPurple |
Protected Member Functions | |
void | timerEvent (QTimerEvent *) |
void | customEvent (QEvent *) |
Friends | |
class | Model |
class | TreeView |
class | ItemDelegate |
class | PropertyItemEditor |
Provides display and editing facilities for property items in the editor.
A PropertyEditor::Delegate is used to provide custom display features and editor widgets. Using the delegate mechanism allows the development of display and editing facilities independently from the PropertyEditor. PropertyEditor::Delegate classes can be implemented in different libraries. The PropertyEditor automatically asks the ClassFactory for loaded Delegates and instantiates them.
typedef boost::shared_ptr<Delegate> DelegatePtr |
typedef std::list<SupportedType> SupportedTypes |
PropertyEditor | ( | QWidget * | parent = 0 | ) |
|
virtual |
PropertyNode* currentProperty | ( | ) |
Returns the current selected property node, or NULL if nothing is selected.
|
slot |
Removes all property nodes that were set and therefore clears the whole editor content (without deleting the nodes).
|
slot |
Adds the specified property node as top level node to the editor.
|
slot |
Remove the specified property node from the editor.
|
slot |
Moves the property node up in the editor's property node list.
|
slot |
Moves the property node down in the editor's property node list.
|
slot |
void setHideSingleRootNode | ( | bool | hide = true | ) |
If hiding of the single root node is enabled, a single top level node will not be shown explicitly.
Its children will be shown only.
bool getHideSingleRootNode | ( | ) | const |
Returns the set mode, whether a single root node should be hidden or not.
void installFilterShortCut | ( | QWidget * | widget, |
const QString & | shortcut = "Ctrl+F" |
||
) |
bool getAutoHideFilterBar | ( | ) | const |
|
slot |
|
slot |
|
slot |
void setColor | ( | const PropertyNode * | property, |
const QColor & | color | ||
) |
Sets the background color for the specified property.
QColor getColor | ( | const PropertyNode * | property | ) | const |
std::string getText | ( | const PropertyNode * | property | ) | const |
QIcon getIcon | ( | const PropertyNode * | property | ) | const |
QColor getBackgroundColor | ( | const PropertyNode * | property | ) | const |
QWidget* createEditor | ( | PropertyNode * | property, |
QWidget * | parent | ||
) |
std::string getName | ( | const PropertyNode * | property | ) |
|
protected |
|
protected |
|
inline |
|
virtual |
Implements PropertyNodeListener.
|
virtual |
Implements PropertyNodeListener.
|
virtual |
Implements PropertyNodeListener.
|
virtual |
Implements PropertyNodeListener.
|
virtual |
Implements PropertyNodeListener.
|
virtual |
Implements PropertyNodeListener.
|
inlinestatic |
|
pure virtual |
|
inlinevirtual |
Returns text for a text label.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
friend |
|
friend |
|
friend |
|
friend |
|
static |
|
static |
|
static |
|
static |
|
static |