OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
otoolkit::Tool Class Referenceabstract

#include "Tool.h"

Inheritance diagram for otoolkit::Tool:
ColorStyleEditor FAR GraphicsItemDesigner ImageEditor Logging NetworkTools Randomizer Terminal WidgetTest

Public Member Functions

 Tool ()
 
virtual ~Tool ()
 
virtual QString getToolName (void) const =0
 Return the unique tool name The name will be used to create all required menu entries.
 
virtual bool runTool (QMenu *_rootMenu, ToolWidgets &_content)=0
 Create all widgets. The menu already contains the following items: Run / Stop (Starts or stops the tool) [] Autorun (Autostart mode checkbox for the tool upon OToolkit start)
 
virtual void restoreToolSettings (QSettings &_settings)
 
virtual QIcon getToolIcon (void) const
 Return the icon that will be used in the tool menu.
 
virtual bool prepareToolShutdown (QSettings &_settings)
 Stop all the logic of this tool.
 
virtual void toolWasShown (void)
 
virtual void toolWasHidden (void)
 
void setToolIsRunning (bool _isRunning)
 
bool getToolIsRunning (void) const
 
void setToolIsExternal (bool _isExternal)
 
bool getToolIsExternal (void) const
 

Protected Member Functions

ot::WidgetViewcreateCentralWidgetView (QWidget *_widget, const QString &_widgetName) const
 
ot::WidgetViewcreateSideWidgetView (QWidget *_widget, const QString &_widgetName) const
 
ot::WidgetViewcreateToolWidgetView (QWidget *_widget, const QString &_widgetName) const
 

Constructor & Destructor Documentation

◆ Tool()

otoolkit::Tool::Tool ( )

◆ ~Tool()

otoolkit::Tool::~Tool ( )
virtual

Member Function Documentation

◆ createCentralWidgetView()

ot::WidgetView * otoolkit::Tool::createCentralWidgetView ( QWidget * _widget,
const QString & _widgetName ) const
protected

◆ createSideWidgetView()

ot::WidgetView * otoolkit::Tool::createSideWidgetView ( QWidget * _widget,
const QString & _widgetName ) const
protected

◆ createToolWidgetView()

ot::WidgetView * otoolkit::Tool::createToolWidgetView ( QWidget * _widget,
const QString & _widgetName ) const
protected

◆ getToolIcon()

virtual QIcon otoolkit::Tool::getToolIcon ( void ) const
inlinevirtual

Return the icon that will be used in the tool menu.

◆ getToolIsExternal()

bool otoolkit::Tool::getToolIsExternal ( void ) const
inline

◆ getToolIsRunning()

bool otoolkit::Tool::getToolIsRunning ( void ) const
inline

◆ getToolName()

virtual QString otoolkit::Tool::getToolName ( void ) const
pure virtual

Return the unique tool name The name will be used to create all required menu entries.

Implemented in ColorStyleEditor, FAR, GraphicsItemDesigner, ImageEditor, Logging, NetworkTools, Randomizer, Terminal, and WidgetTest.

◆ prepareToolShutdown()

virtual bool otoolkit::Tool::prepareToolShutdown ( QSettings & _settings)
inlinevirtual

Stop all the logic of this tool.

Reimplemented in ColorStyleEditor, FAR, GraphicsItemDesigner, ImageEditor, Logging, NetworkTools, Randomizer, and Terminal.

◆ restoreToolSettings()

virtual void otoolkit::Tool::restoreToolSettings ( QSettings & _settings)
inlinevirtual

◆ runTool()

virtual bool otoolkit::Tool::runTool ( QMenu * _rootMenu,
ToolWidgets & _content )
pure virtual

Create all widgets. The menu already contains the following items: Run / Stop (Starts or stops the tool) [] Autorun (Autostart mode checkbox for the tool upon OToolkit start)

Parameters
_rootMenuMenu where the menu controls should be added to.
_contentThe tool contents must be set here

Implemented in ColorStyleEditor, FAR, GraphicsItemDesigner, ImageEditor, Logging, NetworkTools, Randomizer, Terminal, and WidgetTest.

◆ setToolIsExternal()

void otoolkit::Tool::setToolIsExternal ( bool _isExternal)
inline

◆ setToolIsRunning()

void otoolkit::Tool::setToolIsRunning ( bool _isRunning)
inline

◆ toolWasHidden()

virtual void otoolkit::Tool::toolWasHidden ( void )
inlinevirtual

◆ toolWasShown()

virtual void otoolkit::Tool::toolWasShown ( void )
inlinevirtual

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