|
#include <ArmarXGui/libraries/ArmarXGuiBase/ArmarXWidgetController.h>
Public Types | |
using | RecursiveMutex = std::recursive_mutex |
using | RecursiveMutexLock = std::unique_lock< RecursiveMutex > |
using | RecursiveMutexLockPtr = std::shared_ptr< RecursiveMutexLock > |
using | RecursiveMutexPtr = std::shared_ptr< RecursiveMutex > |
Public Slots | |
void | configAccepted () |
void | configRejected () |
void | enableMainWidget (bool enable) |
Signals | |
void | configAccepted (ArmarXWidgetControllerPtr widget) |
void | configRejected (ArmarXWidgetControllerPtr widget) |
Public Member Functions | |
ArmarXWidgetController () | |
virtual void | configured () |
This function must be implemented by the user, if he supplies a config dialog. More... | |
void | enableMainWidgetAsync (bool enable) |
This function enables/disables the main widget asynchronously (if called from a non qt thread). More... | |
virtual QPointer< QDialog > | getConfigDialog (QWidget *parent=0) |
getConfigDialog returns a pointer to the a configuration widget of this controller. More... | |
virtual QPointer< QWidget > | getCustomTitlebarWidget (QWidget *parent=0) |
getTitleToolbar returns a pointer to the a toolbar widget of this controller. More... | |
QString | getInstanceName () |
virtual QMainWindow * | getMainWindow () |
Returns the ArmarX MainWindow. More... | |
virtual SoNode * | getScene () |
Reimplementing this function and returning a SoNode* will show this SoNode in the 3DViewerWidget, so that you do not need to implement a viewer yourself. More... | |
virtual QPointer< QDialog > | getSceneConfigDialog (QWidget *parent=nullptr) |
Reimplementing this function and returning a QDialog* will enable a configuration button which opens the returned dialog. More... | |
QPointer< TipDialog > | getTipDialog () const |
Returns the default instance for the TipDialog used by all widgets (if not set otherwise). More... | |
virtual QPointer< QWidget > | getWidget () |
getWidget returns a pointer to the a widget of this controller. More... | |
virtual QIcon | getWidgetCategoryIcon () const |
Implement this function to supply an icon for the category. More... | |
virtual QIcon | getWidgetIcon () const |
Implement this function to supply an icon for the menu. More... | |
virtual QString | getWidgetName () const =0 |
Implement this function to specify the default name of your Widget. More... | |
virtual void | loadSettings (QSettings *settings)=0 |
Implement to load the settings that are part of the GUI configuration. More... | |
virtual bool | onClose () |
onClose is called before the DockWidget is closed. More... | |
virtual void | onLockWidget () |
virtual void | onUnlockWidget () |
virtual void | postDocking () |
postDocking is called after the widget has been docked into the main window. More... | |
virtual void | saveSettings (QSettings *settings)=0 |
Implement to save the settings as part of the GUI configuration. More... | |
bool | setInstanceName (QString instanceName) |
sets the name of this instance. More... | |
virtual void | setMainWindow (QMainWindow *mainWindow) |
virtual void | setMutex3D (RecursiveMutexPtr const &mutex3D) |
This mutex is used to protect 3d scene updates. Usually called by the ArmarXGui main window on creation of this controller. More... | |
void | setTipDialog (QPointer< TipDialog > tipDialog) |
~ArmarXWidgetController () override | |
![]() | |
SpamFilterDataPtr | deactivateSpam (float deactivationDurationSec=10.0f, const std::string &identifier="", bool deactivate=true) const |
disables the logging for the current line for the given amount of seconds. More... | |
MessageTypeT | getEffectiveLoggingLevel () const |
Logging () | |
void | setLocalMinimumLoggingLevel (MessageTypeT level) |
With setLocalMinimumLoggingLevel the minimum verbosity-level of log-messages can be set. More... | |
void | setTag (const LogTag &tag) |
void | setTag (const std::string &tagName) |
virtual | ~Logging () |
Static Public Member Functions | |
template<typename Class > | |
static ArmarXWidgetControllerPtr | createInstance () |
static QIcon | GetWidgetCategoryIcon () |
Implement this function to supply an icon for the menu (if you implemented static QString GetWidgetName()). More... | |
static QIcon | GetWidgetIcon () |
Implement this function to supply an icon for the menu (if you implemented static QString GetWidgetName()). More... | |
static int | showMessageBox (const QString &msg) |
Protected Attributes | |
std::shared_ptr< std::recursive_mutex > | mutex3D |
![]() | |
MessageTypeT | minimumLoggingLevel |
SpamFilterDataPtr | spamFilter |
LogTag | tag |
Additional Inherited Members | |
![]() | |
bool | checkLogLevel (MessageTypeT level) const |
const LogSenderPtr & | getLogSender () const |
Retrieve log sender. More... | |
LogSenderPtr | loghelper (const char *file, int line, const char *function) const |
Definition at line 52 of file ArmarXWidgetController.h.
using RecursiveMutex = std::recursive_mutex |
Definition at line 261 of file ArmarXWidgetController.h.
using RecursiveMutexLock = std::unique_lock<RecursiveMutex> |
Definition at line 263 of file ArmarXWidgetController.h.
using RecursiveMutexLockPtr = std::shared_ptr<RecursiveMutexLock> |
Definition at line 264 of file ArmarXWidgetController.h.
using RecursiveMutexPtr = std::shared_ptr<RecursiveMutex> |
Definition at line 262 of file ArmarXWidgetController.h.
|
explicit |
Definition at line 38 of file ArmarXWidgetController.cpp.
|
override |
Definition at line 43 of file ArmarXWidgetController.cpp.
|
slot |
Definition at line 160 of file ArmarXWidgetController.cpp.
|
signal |
|
slot |
Definition at line 167 of file ArmarXWidgetController.cpp.
|
signal |
|
inlinevirtual |
This function must be implemented by the user, if he supplies a config dialog.
This function is then automatically called, when the dialog was accepted.
Reimplemented in SceneEditorMainWindowController, GraphVisualizerWidget, StatechartEditorController, WorkingMemoryController, SimoxCSpaceVisualizerWidgetController, KinematicUnitWidgetController, PriorEditorController, FTSensorCalibrationGuiWidgetController, PlatformUnitWidget, ImageMaskPainterWidgetController, WidgetController, RobotIKWidgetController, HandUnitWidget, GraspCandidateViewerWidgetController, RobotUnitPluginWidgetController, RobotViewerWidgetController, HandEyeCalibrationWidgetController, CartesianNaturalPositionControllerWidgetController, TCPMover, LookAtClickWidgetController, LaserScannerSelfLocalisationWidgetController, ImageRecorderWidgetController, MotionPlanningServerWidgetController, LaserScannerPluginWidgetController, HapticUnitWidget, WriteToDebugObserverGuiPluginWidgetController, UserAssistedSegmenterGuiWidgetController, AffordancePipelineGuiWidgetController, PresenterViewWidgetController, PrimitiveExtractionWidgetController, ArVizWidgetController, BoxToGraspCandidatesWidgetController, ViewSelectionWidgetController, OperatorViewWidgetController, ArMemMemoryViewerWidgetController, PointCloudVisualizationWidgetController, RemoteGuiWidgetController, ObjectPoseGuiWidgetController, DebugPlotterWidgetWidgetController, DebugRobotUnitDataStreamingWidgetController, Base, and SkillManagerMonitorWidgetController.
Definition at line 103 of file ArmarXWidgetController.h.
|
inlinestatic |
Definition at line 273 of file ArmarXWidgetController.h.
|
slot |
Definition at line 173 of file ArmarXWidgetController.cpp.
void enableMainWidgetAsync | ( | bool | enable | ) |
This function enables/disables the main widget asynchronously (if called from a non qt thread).
Call this function from onConnectComponent, onDisconnectComponent if your widget should be disabled if the connection was lost
enable | true to enable widget, false to disable widget |
Definition at line 191 of file ArmarXWidgetController.cpp.
|
virtual |
getConfigDialog returns a pointer to the a configuration widget of this controller.
It is optional.
If you need your widget configured, before it is shown, you should implement this function and return a QDialog derived class.
parent | Pointer to the object, that should own this dialog. |
Reimplemented in WorkingMemoryController, WidgetController, MotionPlanningServerWidgetController, GraphVisualizerWidget, KinematicUnitWidgetController, PriorEditorController, PlatformUnitWidget, RobotIKWidgetController, MMMPlayerWidget, HandUnitWidget, HandEyeCalibrationWidgetController, TCPMover, RobotViewerWidgetController, WriteToDebugObserverGuiPluginWidgetController, HapticUnitWidget, AffordancePipelineGuiWidgetController, PrimitiveExtractionWidgetController, PointCloudVisualizationWidgetController, RemoteGuiWidgetController, SceneEditorMainWindowController, StatechartEditorController, SimoxCSpaceVisualizerWidgetController, FTSensorCalibrationGuiWidgetController, GraspCandidateViewerWidgetController, LoadObjectsIntoMemoryWidgetController, ViewSelectionWidgetController, RobotUnitPluginWidgetController, CartesianNaturalPositionControllerWidgetController, LookAtClickWidgetController, LaserScannerSelfLocalisationWidgetController, ImageRecorderWidgetController, LaserScannerPluginWidgetController, UserAssistedSegmenterGuiWidgetController, SemanticRelationViewerWidgetController, PresenterViewWidgetController, ImageMaskPainterWidgetController, ArVizWidgetController, OperatorViewWidgetController, ArMemMemoryViewerWidgetController, ObjectPoseGuiWidgetController, DebugPlotterWidgetWidgetController, DebugRobotUnitDataStreamingWidgetController, Base, SkillManagerMonitorWidgetController, and BoxToGraspCandidatesWidgetController.
Definition at line 65 of file ArmarXWidgetController.cpp.
|
virtual |
getTitleToolbar returns a pointer to the a toolbar widget of this controller.
It is optional. It must return the same instance on all calls.
The returned toolbar is displayed in the titlebar of the parent dockwidget. Use this to show button that should always be visible in the widget, but should not take up space in the widget. Keep the size of the toolbar to a minimum, so that it is not wider than the widget itself.
Reimplemented in AffordancePipelineGuiWidgetController, Viewer3DWidget, WorkingMemoryController, SceneEditorMainWindowController, ImageMonitorWidgetController, KinematicUnitWidgetController, SimulatorControlController, ScenarioManagerWidgetController, StatechartViewerController, MessageDisplayPluginWidgetController, ObjectLocalizationRequesterWidgetController, RobotUnitPluginWidgetController, ObserverWidgetController, ConditionViewerWidgetController, LogViewer, and StaticPlotterWidgetController.
Definition at line 71 of file ArmarXWidgetController.cpp.
QString getInstanceName | ( | ) |
Definition at line 124 of file ArmarXWidgetController.cpp.
|
virtual |
Returns the ArmarX MainWindow.
Definition at line 136 of file ArmarXWidgetController.cpp.
|
inlinevirtual |
Reimplementing this function and returning a SoNode* will show this SoNode in the 3DViewerWidget, so that you do not need to implement a viewer yourself.
Reimplemented in SimoxCSpaceVisualizerWidgetController, WorkingMemoryController, KinematicUnitWidgetController, PriorEditorController, DebugDrawerViewerWidgetController, RobotViewerWidgetController, and ArVizWidgetController.
Definition at line 207 of file ArmarXWidgetController.h.
|
virtual |
Reimplementing this function and returning a QDialog* will enable a configuration button which opens the returned dialog.
parent | The parent widget which should be used as parent of the dialog |
Reimplemented in WorkingMemoryController.
Definition at line 101 of file ArmarXWidgetController.cpp.
QPointer< TipDialog > getTipDialog | ( | ) | const |
Returns the default instance for the TipDialog used by all widgets (if not set otherwise).
This dialog has always the checkbox to not show a tip again, which is stored persistently.
Definition at line 142 of file ArmarXWidgetController.cpp.
|
virtual |
getWidget returns a pointer to the a widget of this controller.
This widget should be the main widget of this WidgetController. The standard implementation of this function creates a QWidget on the first call and assigns the pointer to the widget-member and returns the member.
Reimplemented in SceneEditorMainWindowController, PlatformUnitWidget, StatechartEditorController, ImageMonitorWidgetController, ObserverWidgetController, and ConditionViewerWidgetController.
Definition at line 54 of file ArmarXWidgetController.cpp.
|
static |
Implement this function to supply an icon for the menu (if you implemented static QString GetWidgetName()).
The implementation should look like this:
Definition at line 95 of file ArmarXWidgetController.cpp.
|
virtual |
Implement this function to supply an icon for the category.
Reimplemented in ArmarXComponentWidgetControllerTemplate< Derived >, and NJointControllerGuiPluginBase< Derived, Proxy >.
Definition at line 89 of file ArmarXWidgetController.cpp.
|
static |
Implement this function to supply an icon for the menu (if you implemented static QString GetWidgetName()).
The implementation should look like this:
Definition at line 83 of file ArmarXWidgetController.cpp.
|
virtual |
Implement this function to supply an icon for the menu.
Reimplemented in Viewer3DWidget, ArmarXComponentWidgetControllerTemplate< Derived >, and NJointControllerGuiPluginBase< Derived, Proxy >.
Definition at line 77 of file ArmarXWidgetController.cpp.
|
pure virtual |
Implement this function to specify the default name of your Widget.
Implement the function as:
If you implement the static GetWidgetName() function, the armarx gui does not need to instantiate this widget only to get the name.
Dot-Notation can be used to insert the widget in categories and subcategories (e.g.: "Statecharts.StatechartEditor"). Categories must not collide with Widget names.
Implemented in SimoxCSpaceVisualizerWidgetController, RobotTrajectoryDesignerGuiPluginWidgetController, LaserScannerSelfLocalisationWidgetController, Viewer3DWidget, ArmarXComponentWidgetControllerTemplate< Derived >, and NJointControllerGuiPluginBase< Derived, Proxy >.
|
pure virtual |
Implement to load the settings that are part of the GUI configuration.
These settings are NOT loaded automatically on widget startup, but when a GUI config is loaded (instead of the optional config dialog).
Implemented in GraphVisualizerWidget, SceneEditorMainWindowController, WorkingMemoryController, StatechartEditorController, KinematicUnitWidgetController, PriorEditorController, SimoxCSpaceVisualizerWidgetController, SimulatorControlController, ImageMonitorWidgetController, EventSenderOverview, FTSensorCalibrationGuiWidgetController, PlatformUnitWidget, ArmarXPlotter, MMMPlayerWidget, RobotIKWidgetController, WidgetController, HandUnitWidget, GraspCandidateViewerWidgetController, RobotViewerWidgetController, BatteryWidget, FeatureLearningWidgetController, ImageRecorderWidgetController, WidgetController, HapticUnitWidget, EmergencyStopWidget, SystemStateMonitorWidget, RobotTrajectoryDesignerGuiPluginWidgetController, UserAssistedSegmenterGuiWidgetController, ObserverWidgetController, HandEyeCalibrationWidgetController, HsvColorSegmentationWidgetController, CartesianNaturalPositionControllerWidgetController, ClockWidgetController, TCPMover, StatechartViewerController, RobotUnitPluginWidgetController, SemanticRelationViewerWidgetController, RemoteGuiWidgetController, ArVizWidgetController, AffordancePipelineGuiWidgetController, PrimitiveExtractionWidgetController, TopicReplayerWidgetController, ViewSelectionWidgetController, SnapshotControlWidgetController, LookAtClickWidgetController, ConditionViewerWidgetController, ScenarioManagerWidgetController, ArMemMemoryViewerWidgetController, LaserScannerSelfLocalisationWidgetController, ObjectLocalizationRequesterWidgetController, Viewer3DWidget, ClutteredSceneGeneratorWidgetController, MotionPlanningServerWidgetController, MessageDisplayPluginWidgetController, GuiHealthClientWidgetController, IceProxyWidgetController, HomogeneousMatrixCalculatorWidgetController, LaserScannerPluginWidgetController, GridFSFileEditorWidgetController, ImageMaskPainterWidgetController, PointCloudVisualizationWidgetController, WriteToDebugObserverGuiPluginWidgetController, DebugPlotterWidgetWidgetController, StaticPlotterWidgetController, ThreadViewer, DebugRobotUnitDataStreamingWidgetController, ObjectPoseGuiWidgetController, IceGridViewer, BoxToGraspCandidatesWidgetController, Base, LogViewer, ArVizDrawerGuiWidgetController, DebugDrawerViewerWidgetController, DebugDrawerGuiPluginWidgetController, SkillManagerMonitorWidgetController, PresenterViewWidgetController, OperatorViewWidgetController, and LoadObjectsIntoMemoryWidgetController.
|
inlinevirtual |
onClose is called before the DockWidget is closed.
Reimplemented in StatechartEditorController, LogViewer, MMMPlayerWidget, and ArmarXComponentWidgetController.
Definition at line 225 of file ArmarXWidgetController.h.
|
virtual |
Reimplemented in Viewer3DWidget, WidgetController, and RemoteGuiWidgetController.
Definition at line 201 of file ArmarXWidgetController.cpp.
|
virtual |
Reimplemented in Viewer3DWidget, WidgetController, and RemoteGuiWidgetController.
Definition at line 206 of file ArmarXWidgetController.cpp.
|
inlinevirtual |
postDocking is called after the widget has been docked into the main window.
This can be used to initialize OpenGL etc. to avoid strange effects like window plopping out.
Reimplemented in SceneEditorMainWindowController, WidgetController, and Viewer3DWidget.
Definition at line 235 of file ArmarXWidgetController.h.
|
pure virtual |
Implement to save the settings as part of the GUI configuration.
These settings are NOT saved automatically when closing the widget, but when a GUI config is saved.
Implemented in GraphVisualizerWidget, SceneEditorMainWindowController, WorkingMemoryController, StatechartEditorController, KinematicUnitWidgetController, PriorEditorController, SimoxCSpaceVisualizerWidgetController, SimulatorControlController, ImageMonitorWidgetController, EventSenderOverview, FTSensorCalibrationGuiWidgetController, PlatformUnitWidget, ArmarXPlotter, MMMPlayerWidget, RobotIKWidgetController, WidgetController, HandUnitWidget, GraspCandidateViewerWidgetController, RobotViewerWidgetController, BatteryWidget, FeatureLearningWidgetController, WidgetController, ImageRecorderWidgetController, SystemStateMonitorWidget, HapticUnitWidget, RobotTrajectoryDesignerGuiPluginWidgetController, EmergencyStopWidget, ObserverWidgetController, HandEyeCalibrationWidgetController, HsvColorSegmentationWidgetController, UserAssistedSegmenterGuiWidgetController, CartesianNaturalPositionControllerWidgetController, ClockWidgetController, SemanticRelationViewerWidgetController, RemoteGuiWidgetController, RobotUnitPluginWidgetController, TCPMover, AffordancePipelineGuiWidgetController, StatechartViewerController, PrimitiveExtractionWidgetController, TopicReplayerWidgetController, ArVizWidgetController, ViewSelectionWidgetController, SnapshotControlWidgetController, LookAtClickWidgetController, ConditionViewerWidgetController, ScenarioManagerWidgetController, LaserScannerSelfLocalisationWidgetController, ObjectLocalizationRequesterWidgetController, IceProxyWidgetController, MotionPlanningServerWidgetController, MessageDisplayPluginWidgetController, ArMemMemoryViewerWidgetController, GuiHealthClientWidgetController, HomogeneousMatrixCalculatorWidgetController, LaserScannerPluginWidgetController, GridFSFileEditorWidgetController, ImageMaskPainterWidgetController, PointCloudVisualizationWidgetController, ClutteredSceneGeneratorWidgetController, Viewer3DWidget, WriteToDebugObserverGuiPluginWidgetController, ThreadViewer, IceGridViewer, DebugPlotterWidgetWidgetController, StaticPlotterWidgetController, DebugRobotUnitDataStreamingWidgetController, ObjectPoseGuiWidgetController, ArVizDrawerGuiWidgetController, BoxToGraspCandidatesWidgetController, Base, DebugDrawerViewerWidgetController, LogViewer, DebugDrawerGuiPluginWidgetController, SkillManagerMonitorWidgetController, PresenterViewWidgetController, OperatorViewWidgetController, and LoadObjectsIntoMemoryWidgetController.
bool setInstanceName | ( | QString | instanceName | ) |
sets the name of this instance.
Can only be set once. Only the first call has an effect. Further calls are ignored.
Definition at line 107 of file ArmarXWidgetController.cpp.
|
virtual |
Reimplemented in Viewer3DWidget.
Definition at line 130 of file ArmarXWidgetController.cpp.
|
virtual |
This mutex is used to protect 3d scene updates. Usually called by the ArmarXGui main window on creation of this controller.
mutex3D |
Reimplemented in WorkingMemoryController, SimoxCSpaceVisualizerWidgetController, KinematicUnitWidgetController, RobotViewerWidgetController, and Viewer3DWidget.
Definition at line 154 of file ArmarXWidgetController.cpp.
void setTipDialog | ( | QPointer< TipDialog > | tipDialog | ) |
Definition at line 148 of file ArmarXWidgetController.cpp.
|
static |
Definition at line 182 of file ArmarXWidgetController.cpp.
|
protected |
Definition at line 309 of file ArmarXWidgetController.h.