All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
MultiWidgets::WidgetInspector Class Reference

WidgetInspector is a development and debugging tool for displaying and modifying Widget hierarchy and widget attributes in a separate window. More...

#include <MultiWidgets/WidgetInspector/WidgetInspector.hpp>

Public Member Functions

MultiWidgets::WidgetPtr rootWidget () const
 Inspector will handle one Widget hierarchy, this is the root widget in that tree. More...
 
void setRootWidget (const MultiWidgets::WidgetPtr &root)
 Set the root Widget to Widget. More...
 
 WidgetInspector (QWidget *parent=0)
 Makes a new instance of the inspector. More...
 
 ~WidgetInspector ()
 Destructor.
 

Static Public Member Functions

static void close ()
 Closes the singleton instance, if one exists.
 
static bool isVisible ()
 Returns true if the singleton instance is visible.
 
static void open (const MultiWidgets::WidgetPtr &root)
 Opens a singleton instance of the widget inspector and sets a new root widget to it. More...
 
static void pick (Nimble::Vector2f location)
 

Detailed Description

WidgetInspector is a development and debugging tool for displaying and modifying Widget hierarchy and widget attributes in a separate window.

Constructor & Destructor Documentation

MultiWidgets::WidgetInspector::WidgetInspector ( QWidget *  parent = 0)
explicit

Makes a new instance of the inspector.

By default it is a top-level window, but you can optionally specify a QWidget parent.

Parameters
parentParent QT-widget for inspector, or null for top-level window

Member Function Documentation

static void MultiWidgets::WidgetInspector::open ( const MultiWidgets::WidgetPtr root)
static

Opens a singleton instance of the widget inspector and sets a new root widget to it.

Parameters
rootRoot Widget inspected with WidgetInspector
MultiWidgets::WidgetPtr MultiWidgets::WidgetInspector::rootWidget ( ) const

Inspector will handle one Widget hierarchy, this is the root widget in that tree.

Returns
Root Widget of hierarchy described by inspector
void MultiWidgets::WidgetInspector::setRootWidget ( const MultiWidgets::WidgetPtr root)

Set the root Widget to Widget.

Using this from JavaScript-interpreter one can for example inspect ViewWidget's scene.

Parameters
rootRoot Widget for inspector