Signals | Public Member Functions | Public Attributes | Private Slots | Private Member Functions

conan::ConanWidget Class Reference

The main Conan widget that provides run-time signal/slot introspection. More...

#include <ConanWidget.h>

List of all members.

Signals

void SignalSpyLog (const QString &msg)
 Subscribe to all signal spy log messages. Never ever connect a spy to this signal!!!

Public Member Functions

 ConanWidget (QWidget *inParent=0, Qt::WindowFlags inFlags=0)
 Creates and initializes the main Conan widget.
QList< const QObject * > GetRootObjects () const
 Returns a list containing all non-deleted root objects from the object tree.
void AddRootObject (const QObject *inObject)
 Adds the object hierarchy defined by the given object to the object tree. Note that the object hierarchy may be merged with an existing hierarchy, see RootItem::AddChild for details.
void RemoveRootObject (const QObject *inObject)
 Removes the object hierarchy defined by the given object from the object tree.
void RemoveAllRootObjects ()
 Removes all the object hierarchy from the object tree.
void DiscoverObjects ()
 Discovers exting object hierarchies and adds these to the object tree. Note that currently only hierarchies starting with a QWidget are found.
void SetHeaderResizeMode (QHeaderView::ResizeMode mode)
 Sets the resize mode for the horizontal header of each view. Views include: object tree, signal view, slot view, and signal spy table.

Public Attributes

Ui::ConanWidget mForm
ObjectModelmObjectModel
 The model containing the object hierarchies.
ConnectionModelmSignalModel
 The model containing all signal connections for the current object.
ConnectionModelmSlotModel
 The model containing all slot connections for the current object.
ConnectionFilterProxyModelmProxySignalModel
 Provides sorting and filtering for the signal model.
ConnectionFilterProxyModelmProxySlotModel
 Provides sorting and filtering for the slot model.
QStringListModel * mInheritanceModel
 The model containing the inheritance data for the current object.
KeyValueTableModelmClassInfoModel
 The model containing the class info data for the current object.
SignalSpyModelmSignalSpyModel
 The model containing all signal spies.
QSortFilterProxyModel * mProxySignalSpyModel
 Provides sorting for the signal spy model.
QUndoStack * mUndoStack
 Object selection undo stack.
bool mBlockSelectionCommand
 Used to prevent a selection command to generate a new selection command.

Private Slots

void SlotAbout ()
 Shows the 'about' dialog.
void SlotCurrentObjectChanged (const QModelIndex &inCurrent, const QModelIndex &inPrevious)
 Called when the current object has changed.
void SlotRefresh ()
 The complete object hierarchy is refreshed. Resets all views, but keeps the current object selected.
void SlotFindObject ()
 Finds and selects the next object the matches the search text.
void SlotFindMethod (const QModelIndex &inProxyIndex)
 Finds and selects the object corresponding to the selected method in either the signal or slot view. If the object cannot be found the user may choose to add the corresponding object hierarachy to the object tree.
void SlotFindDuplicateConnection ()
 Finds and selects the next object the contains duplicate connections.
void SlotDiscoverObjects ()
 Discovers exting object hierarchies and adds these to the object tree.
void SlotObjectContextMenuRequested (const QPoint &inPos)
 Displays a context menu for the object hierarchy tree view.
void SlotRemoveRootObject ()
 Asks for permission to remove the current selected root object.
void SlotRemoveAllRootObjects ()
 Asks for permission to remove all root objects.
void SlotConnectionContextMenuRequested (const QPoint &inPos)
 Displays a context menu for a connected method of either the signal or slot view.
void SlotExportToXML ()
 Exports the current selected object to XML.
void SlotSpiesContextMenuRequested (const QPoint &inPos)
 Displays a context menu for the signal spies view.
void SlotUpdateSignalLoggerOptions ()
 Synchronizes the logger options with the corresponding settings on Signal spies tab.
void SlotDeleteSpies ()
void SlotRequestConfirmation (const QString &title, const QString &message, bool &confirmed)
 Used by the signal and slot models to ask the user for permission.

Private Member Functions

void InitObjectHierarchyTab ()
 Initializes the Objects hierarchy tab.
void InitSignalSpiesTab ()
 Initializes the Signal spies tab.
void ClearCurrentObjectViews ()
 Clears all views that show information about the current selected object.
template<typename Pred >
bool FindAndSelectObject (Pred inPred)
 Finds and selects the next object the matches the given text.
bool BlockSelectionCommand (bool inBlock)
 Sets the selcection command block to inBlock and returns its previous value.
void ExportToXML (QXmlStreamWriter &inWriter, const QModelIndex &inIndex) const
 Exports the object indentified by the given index to XML.

Detailed Description

The main Conan widget that provides run-time signal/slot introspection.

Object hierarchies can be added using AddRootObject or they can be discovered automatically using DiscoverObjects.

The following shortcuts are supported:


Constructor & Destructor Documentation

conan::ConanWidget::ConanWidget ( QWidget *  inParent = 0,
Qt::WindowFlags  inFlags = 0 
)

Creates and initializes the main Conan widget.


Member Function Documentation

void conan::ConanWidget::AddRootObject ( const QObject *  inObject  ) 

Adds the object hierarchy defined by the given object to the object tree. Note that the object hierarchy may be merged with an existing hierarchy, see RootItem::AddChild for details.

bool conan::ConanWidget::BlockSelectionCommand ( bool  inBlock  )  [private]

Sets the selcection command block to inBlock and returns its previous value.

void conan::ConanWidget::ClearCurrentObjectViews (  )  [private]

Clears all views that show information about the current selected object.

void conan::ConanWidget::DiscoverObjects (  ) 

Discovers exting object hierarchies and adds these to the object tree. Note that currently only hierarchies starting with a QWidget are found.

void conan::ConanWidget::ExportToXML ( QXmlStreamWriter &  inWriter,
const QModelIndex &  inIndex 
) const [private]

Exports the object indentified by the given index to XML.

template<typename Pred >
bool conan::ConanWidget::FindAndSelectObject ( Pred  inPred  )  [private]

Finds and selects the next object the matches the given text.

QList< const QObject * > conan::ConanWidget::GetRootObjects (  )  const

Returns a list containing all non-deleted root objects from the object tree.

void conan::ConanWidget::InitObjectHierarchyTab (  )  [private]

Initializes the Objects hierarchy tab.

void conan::ConanWidget::InitSignalSpiesTab (  )  [private]

Initializes the Signal spies tab.

void conan::ConanWidget::RemoveAllRootObjects (  ) 

Removes all the object hierarchy from the object tree.

void conan::ConanWidget::RemoveRootObject ( const QObject *  inObject  ) 

Removes the object hierarchy defined by the given object from the object tree.

void conan::ConanWidget::SetHeaderResizeMode ( QHeaderView::ResizeMode  mode  ) 

Sets the resize mode for the horizontal header of each view. Views include: object tree, signal view, slot view, and signal spy table.

void conan::ConanWidget::SignalSpyLog ( const QString &  msg  )  [signal]

Subscribe to all signal spy log messages. Never ever connect a spy to this signal!!!

void conan::ConanWidget::SlotAbout (  )  [private, slot]

Shows the 'about' dialog.

void conan::ConanWidget::SlotConnectionContextMenuRequested ( const QPoint &  inPos  )  [private, slot]

Displays a context menu for a connected method of either the signal or slot view.

void conan::ConanWidget::SlotCurrentObjectChanged ( const QModelIndex &  inCurrent,
const QModelIndex &  inPrevious 
) [private, slot]

Called when the current object has changed.

Initializes the signal, slot and inheritance view with the current object and creates a command to undo the current object change.

void conan::ConanWidget::SlotDeleteSpies (  )  [private, slot]
void conan::ConanWidget::SlotDiscoverObjects (  )  [private, slot]

Discovers exting object hierarchies and adds these to the object tree.

void conan::ConanWidget::SlotExportToXML (  )  [private, slot]

Exports the current selected object to XML.

void conan::ConanWidget::SlotFindDuplicateConnection (  )  [private, slot]

Finds and selects the next object the contains duplicate connections.

void conan::ConanWidget::SlotFindMethod ( const QModelIndex &  inProxyIndex  )  [private, slot]

Finds and selects the object corresponding to the selected method in either the signal or slot view. If the object cannot be found the user may choose to add the corresponding object hierarachy to the object tree.

void conan::ConanWidget::SlotFindObject (  )  [private, slot]

Finds and selects the next object the matches the search text.

void conan::ConanWidget::SlotObjectContextMenuRequested ( const QPoint &  inPos  )  [private, slot]

Displays a context menu for the object hierarchy tree view.

void conan::ConanWidget::SlotRefresh (  )  [private, slot]

The complete object hierarchy is refreshed. Resets all views, but keeps the current object selected.

void conan::ConanWidget::SlotRemoveAllRootObjects (  )  [private, slot]

Asks for permission to remove all root objects.

void conan::ConanWidget::SlotRemoveRootObject (  )  [private, slot]

Asks for permission to remove the current selected root object.

void conan::ConanWidget::SlotRequestConfirmation ( const QString &  title,
const QString &  message,
bool &  confirmed 
) [private, slot]

Used by the signal and slot models to ask the user for permission.

void conan::ConanWidget::SlotSpiesContextMenuRequested ( const QPoint &  inPos  )  [private, slot]

Displays a context menu for the signal spies view.

void conan::ConanWidget::SlotUpdateSignalLoggerOptions (  )  [private, slot]

Synchronizes the logger options with the corresponding settings on Signal spies tab.


Member Data Documentation

Used to prevent a selection command to generate a new selection command.

The model containing the class info data for the current object.

Ui::ConanWidget conan::ConanWidget::mForm

The model containing the inheritance data for the current object.

The model containing the object hierarchies.

Provides sorting and filtering for the signal model.

Provides sorting for the signal spy model.

Provides sorting and filtering for the slot model.

The model containing all signal connections for the current object.

The model containing all signal spies.

The model containing all slot connections for the current object.

Object selection undo stack.


The documentation for this class was generated from the following files: