|
#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 | |
Public Member Functions inherited from Logging | |
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 |
Protected Attributes inherited from Logging | |
MessageTypeT | minimumLoggingLevel |
SpamFilterDataPtr | spamFilter |
LogTag | tag |
Additional Inherited Members | |
Protected Member Functions inherited from Logging | |
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 51 of file ArmarXWidgetController.h.
using RecursiveMutex = std::recursive_mutex |
Definition at line 255 of file ArmarXWidgetController.h.
using RecursiveMutexLock = std::unique_lock<RecursiveMutex> |
Definition at line 257 of file ArmarXWidgetController.h.
using RecursiveMutexLockPtr = std::shared_ptr<RecursiveMutexLock> |
Definition at line 258 of file ArmarXWidgetController.h.
using RecursiveMutexPtr = std::shared_ptr<RecursiveMutex> |
Definition at line 256 of file ArmarXWidgetController.h.
|
explicit |
Definition at line 39 of file ArmarXWidgetController.cpp.
|
override |
Definition at line 44 of file ArmarXWidgetController.cpp.
|
slot |
Definition at line 146 of file ArmarXWidgetController.cpp.
|
signal |
|
slot |
Definition at line 152 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, RobotIKWidgetController, WidgetController, RobotUnitPluginWidgetController, HandUnitWidget, RobotViewerWidgetController, CartesianNaturalPositionControllerWidgetController, LookAtClickWidgetController, HandEyeCalibrationWidgetController, ImageRecorderWidgetController, LaserScannerSelfLocalisationWidgetController, UserAssistedSegmenterGuiWidgetController, MotionPlanningServerWidgetController, LaserScannerPluginWidgetController, TCPMover, WriteToDebugObserverGuiPluginWidgetController, GraspCandidateViewerWidgetController, HapticUnitWidget, AffordancePipelineGuiWidgetController, PrimitiveExtractionWidgetController, ArVizWidgetController, ViewSelectionWidgetController, ArMemMemoryViewerWidgetController, PointCloudVisualizationWidgetController, BoxToGraspCandidatesWidgetController, RemoteGuiWidgetController, DebugPlotterWidgetWidgetController, ObjectPoseGuiWidgetController, DebugRobotUnitDataStreamingWidgetController, Base, and SkillManagerMonitorWidgetController.
Definition at line 101 of file ArmarXWidgetController.h.
|
inlinestatic |
Definition at line 266 of file ArmarXWidgetController.h.
|
slot |
Definition at line 157 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 174 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, RobotViewerWidgetController, HandEyeCalibrationWidgetController, TCPMover, WriteToDebugObserverGuiPluginWidgetController, AffordancePipelineGuiWidgetController, HapticUnitWidget, PrimitiveExtractionWidgetController, PointCloudVisualizationWidgetController, RemoteGuiWidgetController, SceneEditorMainWindowController, StatechartEditorController, SimoxCSpaceVisualizerWidgetController, FTSensorCalibrationGuiWidgetController, ViewSelectionWidgetController, RobotUnitPluginWidgetController, CartesianNaturalPositionControllerWidgetController, LookAtClickWidgetController, LoadObjectsIntoMemoryWidgetController, ImageRecorderWidgetController, LaserScannerSelfLocalisationWidgetController, UserAssistedSegmenterGuiWidgetController, LaserScannerPluginWidgetController, GraspCandidateViewerWidgetController, SemanticRelationViewerWidgetController, ArVizWidgetController, ImageMaskPainterWidgetController, ArMemMemoryViewerWidgetController, DebugPlotterWidgetWidgetController, ObjectPoseGuiWidgetController, DebugRobotUnitDataStreamingWidgetController, Base, SkillManagerMonitorWidgetController, and BoxToGraspCandidatesWidgetController.
Definition at line 64 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, ScenarioManagerWidgetController, SimulatorControlController, ObjectLocalizationRequesterWidgetController, MessageDisplayPluginWidgetController, StatechartViewerController, RobotUnitPluginWidgetController, ObserverWidgetController, LogViewer, ConditionViewerWidgetController, and StaticPlotterWidgetController.
Definition at line 69 of file ArmarXWidgetController.cpp.
QString getInstanceName | ( | ) |
Definition at line 115 of file ArmarXWidgetController.cpp.
|
virtual |
Returns the ArmarX MainWindow.
Definition at line 125 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 202 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 94 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 130 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 89 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 84 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 79 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 74 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, EventSenderOverview, ImageMonitorWidgetController, SimulatorControlController, FTSensorCalibrationGuiWidgetController, PlatformUnitWidget, ArmarXPlotter, MMMPlayerWidget, RobotIKWidgetController, WidgetController, FeatureLearningWidgetController, HandUnitWidget, RobotViewerWidgetController, BatteryWidget, WidgetController, EmergencyStopWidget, ImageRecorderWidgetController, GraspCandidateViewerWidgetController, SystemStateMonitorWidget, RobotTrajectoryDesignerGuiPluginWidgetController, HsvColorSegmentationWidgetController, UserAssistedSegmenterGuiWidgetController, HapticUnitWidget, HandEyeCalibrationWidgetController, ClockWidgetController, TCPMover, CartesianNaturalPositionControllerWidgetController, RemoteGuiWidgetController, RobotUnitPluginWidgetController, ArVizWidgetController, SemanticRelationViewerWidgetController, ObserverWidgetController, AffordancePipelineGuiWidgetController, ScenarioManagerWidgetController, StatechartViewerController, TopicReplayerWidgetController, ArMemMemoryViewerWidgetController, PrimitiveExtractionWidgetController, ViewSelectionWidgetController, SnapshotControlWidgetController, ObjectLocalizationRequesterWidgetController, LookAtClickWidgetController, ClutteredSceneGeneratorWidgetController, LaserScannerSelfLocalisationWidgetController, MotionPlanningServerWidgetController, MessageDisplayPluginWidgetController, GuiHealthClientWidgetController, GridFSFileEditorWidgetController, DebugPlotterWidgetWidgetController, IceProxyWidgetController, HomogeneousMatrixCalculatorWidgetController, LaserScannerPluginWidgetController, PointCloudVisualizationWidgetController, Viewer3DWidget, ConditionViewerWidgetController, WriteToDebugObserverGuiPluginWidgetController, ImageMaskPainterWidgetController, DebugRobotUnitDataStreamingWidgetController, IceGridViewer, BoxToGraspCandidatesWidgetController, ObjectPoseGuiWidgetController, Base, ThreadViewer, DebugDrawerViewerWidgetController, StaticPlotterWidgetController, ArVizDrawerGuiWidgetController, LogViewer, DebugDrawerGuiPluginWidgetController, SkillManagerMonitorWidgetController, and LoadObjectsIntoMemoryWidgetController.
|
inlinevirtual |
onClose is called before the DockWidget is closed.
Reimplemented in StatechartEditorController, MMMPlayerWidget, LogViewer, and ArmarXComponentWidgetController.
Definition at line 219 of file ArmarXWidgetController.h.
|
virtual |
Reimplemented in Viewer3DWidget, WidgetController, and RemoteGuiWidgetController.
Definition at line 183 of file ArmarXWidgetController.cpp.
|
virtual |
Reimplemented in Viewer3DWidget, WidgetController, and RemoteGuiWidgetController.
Definition at line 185 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 228 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, SimoxCSpaceVisualizerWidgetController, PriorEditorController, EventSenderOverview, ImageMonitorWidgetController, SimulatorControlController, FTSensorCalibrationGuiWidgetController, PlatformUnitWidget, ArmarXPlotter, MMMPlayerWidget, RobotIKWidgetController, FeatureLearningWidgetController, WidgetController, HandUnitWidget, RobotViewerWidgetController, BatteryWidget, WidgetController, SystemStateMonitorWidget, ImageRecorderWidgetController, RobotTrajectoryDesignerGuiPluginWidgetController, EmergencyStopWidget, HsvColorSegmentationWidgetController, GraspCandidateViewerWidgetController, UserAssistedSegmenterGuiWidgetController, HandEyeCalibrationWidgetController, ClockWidgetController, HapticUnitWidget, CartesianNaturalPositionControllerWidgetController, RemoteGuiWidgetController, SemanticRelationViewerWidgetController, RobotUnitPluginWidgetController, AffordancePipelineGuiWidgetController, ScenarioManagerWidgetController, TCPMover, TopicReplayerWidgetController, PrimitiveExtractionWidgetController, ArVizWidgetController, ViewSelectionWidgetController, SnapshotControlWidgetController, ObserverWidgetController, ObjectLocalizationRequesterWidgetController, LookAtClickWidgetController, StatechartViewerController, ArMemMemoryViewerWidgetController, LaserScannerSelfLocalisationWidgetController, MotionPlanningServerWidgetController, MessageDisplayPluginWidgetController, GuiHealthClientWidgetController, GridFSFileEditorWidgetController, ClutteredSceneGeneratorWidgetController, IceProxyWidgetController, HomogeneousMatrixCalculatorWidgetController, LaserScannerPluginWidgetController, PointCloudVisualizationWidgetController, WriteToDebugObserverGuiPluginWidgetController, ImageMaskPainterWidgetController, DebugPlotterWidgetWidgetController, IceGridViewer, Viewer3DWidget, ConditionViewerWidgetController, ThreadViewer, DebugDrawerViewerWidgetController, DebugRobotUnitDataStreamingWidgetController, ObjectPoseGuiWidgetController, BoxToGraspCandidatesWidgetController, Base, StaticPlotterWidgetController, ArVizDrawerGuiWidgetController, LogViewer, DebugDrawerGuiPluginWidgetController, SkillManagerMonitorWidgetController, 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 99 of file ArmarXWidgetController.cpp.
|
virtual |
Reimplemented in Viewer3DWidget.
Definition at line 120 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 141 of file ArmarXWidgetController.cpp.
void setTipDialog | ( | QPointer< TipDialog > | tipDialog | ) |
Definition at line 135 of file ArmarXWidgetController.cpp.
|
static |
Definition at line 166 of file ArmarXWidgetController.cpp.
|
protected |
Definition at line 301 of file ArmarXWidgetController.h.