All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Slots | Public Member Functions
Qtilities::CoreGui::ObjectScopeWidget Class Reference

The ObjectScopeWidget class provides details about the contexts to which an object is attached to. More...

#include <ObjectScopeWidget.h>

Inheritance diagram for Qtilities::CoreGui::ObjectScopeWidget:
Inheritance graph
[legend]

List of all members.

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

IActionProvideractionProvider ()
 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.

Detailed Description

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.

object_scope_widget_without_owner.jpg
Object Scope Widget Without Owner

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.

object_scope_widget_with_owner.jpg
Object Scope Widget With Owner

Member Function Documentation

const QObject* Qtilities::CoreGui::ObjectScopeWidget::objectBase ( ) const
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.

void Qtilities::CoreGui::ObjectScopeWidget::setObject ( QObject *  obj)
slot

Sets the object for which the scope must be shown.

Parameters:
objThe object which must be used.
void Qtilities::CoreGui::ObjectScopeWidget::setObject ( QPointer< QObject >  obj)
slot

Sets the object for which the scope must be shown.

Parameters:
objThe object which must be used.
void Qtilities::CoreGui::ObjectScopeWidget::setObject ( QList< QObject * >  objects)
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.

Parameters:
objectsA 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é