The ObjectDynamicPropertyBrowser class provides an interface to the Qt Property Editor solution. More...
#include <ObjectDynamicPropertyBrowser.h>
Public Types | |
enum | BrowserType { TreeBrowser, GroupBoxBrowser, ButtonBrowser } |
This enumeration contains all the possible modes in which the property editor can be used. More... |
Public Slots | |
void | refresh () |
Refresh function which gets all properties on the current object and refreshes the property editor. | |
void | setObject (QObject *obj, bool monitor_changes=true) |
Sets the object for which the properties must be shown. | |
void | setObject (QPointer< QObject > obj, bool monitor_changes=true) |
Sets the object for which the properties must be shown. | |
void | setObject (QList< QObject * > objects, bool monitor_changes=true) |
Sets the object for which the properties must be shown. | |
void | setObject (QList< QPointer< QObject > > objects, bool monitor_changes=true) |
Sets the object by providing a list of smart pointers. |
Public Member Functions | |
QtAbstractPropertyBrowser * | abstractPropertyBrowser () const |
Return a reference to the QtAbstractPropertyBrowser property browser used internally. | |
void | clear () |
Clears currently displayed properties. | |
bool | isToolBarVisible () const |
Function which checks if the toolbar is currently visible. | |
ObjectManager::PropertyTypes | newPropertyType () const |
Gets what property type must be used when the user adds new properties. | |
QObject * | object () const |
Sets the object to inspect and display properties for. | |
bool | readOnly () const |
Gets if the property editor is read only. | |
void | setNewPropertyType (ObjectManager::PropertyTypes new_property_type) |
Sets what property type must be used when the user adds new properties. | |
void | setReadOnly (bool read_only) |
Sets if the property editor is read only. | |
QSize | sizeHint () const |
Reimplement size hint for our case. | |
void | toggleQtilitiesProperties (bool show_qtilities_properties) |
Toggles if Qtilities properties are shown. | |
void | toggleToolBar () |
Function which toggle the visibility of the toolbar with add/remove actions etc. on the property browser. |
The ObjectDynamicPropertyBrowser class provides an interface to the Qt Property Editor solution.
To view the properties of an object, set the object using the setObject() function and the current object can be obtained using the object() function. The properties can be displayed in different ways, defined by the BrowserType enumeration.
This widget allows you to display the following type of properties:
The widget embedded in the debug plugin is shown below for an example object.
This class was added in Qtilities v1.0.
This enumeration contains all the possible modes in which the property editor can be used.
QtAbstractPropertyBrowser * ObjectDynamicPropertyBrowser::abstractPropertyBrowser | ( | ) | const |
Return a reference to the QtAbstractPropertyBrowser property browser used internally.
This function was added in Qtilities v1.2.
bool ObjectDynamicPropertyBrowser::isToolBarVisible | ( | ) | const |
Function which checks if the toolbar is currently visible.
This function was added in Qtilities v1.2.
ObjectManager::PropertyTypes Qtilities::CoreGui::ObjectDynamicPropertyBrowser::newPropertyType | ( | ) | const |
Gets what property type must be used when the user adds new properties.
bool ObjectDynamicPropertyBrowser::readOnly | ( | ) | const |
Gets if the property editor is read only.
This function was added in Qtilities v1.2.
|
slot |
Refresh function which gets all properties on the current object and refreshes the property editor.
void Qtilities::CoreGui::ObjectDynamicPropertyBrowser::setNewPropertyType | ( | ObjectManager::PropertyTypes | new_property_type | ) |
Sets what property type must be used when the user adds new properties.
|
slot |
Sets the object for which the properties must be shown.
obj | The object which must be used. |
monitor_changes | When true this function will check if the object implements the Qtilities::Core::Interfaces::IModificationNotifier interface, and if so it will monitor it for changes. When it changes the property browser will automatically call refresh(). |
|
slot |
Sets the object for which the properties must be shown.
obj | The object which must be used. |
monitor_changes | When true this function will check if the object implements the Qtilities::Core::Interfaces::IModificationNotifier interface, and if so it will monitor it for changes. When it changes the property browser will automatically call refresh(). |
|
slot |
Sets the object for which the properties must be shown.
Function which allows this widget to be connected to the Qtilities::Core::Interfaces::IObjectManager::metaTypeActiveObjectsChanged() signal.
objects | A list of objects. When the list contains 1 item, it will be used in this widget, if it contains more than 1 this function does nothing. |
monitor_changes | When true this function will check if the object implements the Qtilities::Core::Interfaces::IModificationNotifier interface, and if so it will monitor it for changes. When it changes the property browser will automatically call refresh(). |
|
slot |
Sets the object by providing a list of smart pointers.
objects | A list of objects. When the list contains 1 item, it will be used in this widget, if it contains more than 1 this function does nothing. |
monitor_changes | When true this function will check if the object implements the Qtilities::Core::Interfaces::IModificationNotifier interface, and if so it will monitor it for changes. When it changes the property browser will automatically call refresh(). |
void ObjectDynamicPropertyBrowser::setReadOnly | ( | bool | read_only | ) |
Sets if the property editor is read only.
This function was added in Qtilities v1.2.
void ObjectDynamicPropertyBrowser::toggleToolBar | ( | ) |
Function which toggle the visibility of the toolbar with add/remove actions etc. on the property browser.
This function was added in Qtilities v1.2.
Qtilities : Reference Documentation | Back to top |
Copyright © 2009-2013, Jaco Naudé
|