The ObjectScopeWidget class provides details about the contexts to which an object is attached to. More...
#include <ObjectScopeWidget.h>
Public Slots | |
void | handleObjectDestroyed () |
Handles the event where the current object is destroyed. | |
void | setObject (QObject *obj) |
Sets the object for which the scope must be shown. | |
void | setObject (QPointer< QObject > obj) |
Sets the object for which the scope must be shown. | |
void | setObject (QList< QObject * > objects) |
Sets the object for which the scope must be shown. | |
void | setObject (QList< QPointer< QObject > > objects) |
Sets the object by providing a list of smart pointers. | |
void | updateContents () |
Refreshes the view. |
Public Member Functions | |
IActionProvider * | actionProvider () |
Action provider interface through which this widget provides its actions. | |
QString | contextHelpId () const |
Returns a help ID for this context. | |
QString | contextString () const |
Returns a context string for the context represented by this interface. | |
QObject * | objectBase () |
Returns the QObject* base of the interface. | |
const QObject * | objectBase () const |
Returns a const QObject* base of the interface. | |
void | setNameVisible (bool visible) |
When true, the object name will be shown above the object scope table. |
The ObjectScopeWidget class provides details about the contexts to which an object is attached to.
As explained in the Observers article, an object can be attached to multiple observers. In such cases it be useful to display the scope of an object within the application using the ObjectScopeWidget widget. An example object scope widget is shown below. Tooltips provide more information about specific contexts to which an object is attached and different columns are available to provide details about each context.
When an object is attached to an observer context using Qtilities::Core::Observer::SpecificObserverOwnership a new column appear in the ObjectScopeWidget indicating object ownership as shown below.
|
inlinevirtual |
Returns a const QObject* base of the interface.
This function can be used in const methods, but make sure that you don't modify things that should stay const. An example where this is used is when we want to get a property on an object in a const method. This is a const operation.
Implements Qtilities::Core::Interfaces::IObjectBase.
|
slot |
Sets the object for which the scope must be shown.
obj | The object which must be used. |
|
slot |
Sets the object for which the scope must be shown.
obj | The object which must be used. |
|
slot |
Sets the object for which the scope 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. |
Qtilities : Reference Documentation | Back to top |
Copyright © 2009-2013, Jaco Naudé
|