OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::WidgetView Class Referenceabstract

The WidgetView class is used to integrate the Qt-ADS functionallity into open twin. More...

#include "WidgetView.h"

Inheritance diagram for ot::WidgetView:
ot::BasicWidgetView ot::GraphicsPickerView ot::GraphicsViewView ot::NavigationTreeView ot::PlainTextEditView ot::PlotView ot::PropertyGridView ot::TableView ot::TextEditorView ot::VersionGraphManagerView

Public Types

enum  InsertFlag { NoInsertFlags = 0 << 0 , KeepCurrentFocus = 1 << 0 }
 
typedef ot::Flags< InsertFlagInsertFlags
 

Signals

void viewDataModifiedChanged (void)
 

Public Member Functions

 WidgetView (WidgetViewBase::ViewType _viewType)
 
virtual ~WidgetView ()
 
virtual QWidget * getViewWidget (void)=0
 Returns the widget that is set to this widget view.
 
virtual void setViewWidgetFocus (void)
 Sets the input focus to the view widget. Custom widget views with nested widgets can override this method to set the focus to the correct widget. By default the root widget (widget returned by WidgetView::getViewWidget()) will get the focus set.
 
void setViewData (const WidgetViewBase &_data)
 
WidgetViewBasegetViewData (void)
 
const WidgetViewBasegetViewData (void) const
 
ads::CDockWidget * getViewDockWidget (void) const
 Returns the dock widget that belongs to this widget view.
 
QAction * getViewToggleAction (void) const
 Returns the dock widget toggle visibility action. Returns 0 if no widget view is set.
 
void setViewIsPermanent (bool _permanent=true)
 Permanent views wont be removed from the widget view manager when calling remove view.
 
bool getViewIsPermanent (void) const
 Permanent views wont be removed from the widget view manager when calling remove view.
 
void setViewContentModified (bool _isModified)
 Set the view modified state. Modified views will change the title to display an unsaved change.
 
bool getViewContentModified (void) const
 
QString getCurrentViewTitle (void) const
 Returns the widget view title that is currently displayed.
 
void setAsCurrentViewTab (void)
 
bool isCurrentViewTab (void) const
 

Static Public Member Functions

static std::string createStoredViewName (const WidgetViewBase &_view)
 
static std::string createStoredViewName (const std::string &_entityName, WidgetViewBase::ViewType _viewType)
 Creates the name that should be used in the view management logic. The resulted name has the following syntax: <entityName>$<viewTypeString>
 

Protected Member Functions

void addWidgetToDock (QWidget *_widget)
 Call this function as soon as the widget for this view is created to add it to the dock.
 

Friends

class WidgetViewManager
 

Detailed Description

The WidgetView class is used to integrate the Qt-ADS functionallity into open twin.

Member Typedef Documentation

◆ InsertFlags

Member Enumeration Documentation

◆ InsertFlag

Enumerator
NoInsertFlags 
KeepCurrentFocus 

Constructor & Destructor Documentation

◆ WidgetView()

ot::WidgetView::WidgetView ( WidgetViewBase::ViewType _viewType)

◆ ~WidgetView()

ot::WidgetView::~WidgetView ( )
virtual

Member Function Documentation

◆ addWidgetToDock()

void ot::WidgetView::addWidgetToDock ( QWidget * _widget)
protected

Call this function as soon as the widget for this view is created to add it to the dock.

◆ createStoredViewName() [1/2]

std::string ot::WidgetView::createStoredViewName ( const std::string & _entityName,
WidgetViewBase::ViewType _viewType )
static

Creates the name that should be used in the view management logic. The resulted name has the following syntax: <entityName>$<viewTypeString>

◆ createStoredViewName() [2/2]

std::string ot::WidgetView::createStoredViewName ( const WidgetViewBase & _view)
static

◆ getCurrentViewTitle()

QString ot::WidgetView::getCurrentViewTitle ( void ) const

Returns the widget view title that is currently displayed.

◆ getViewContentModified()

bool ot::WidgetView::getViewContentModified ( void ) const
inline

◆ getViewData() [1/2]

WidgetViewBase & ot::WidgetView::getViewData ( void )
inline

◆ getViewData() [2/2]

const WidgetViewBase & ot::WidgetView::getViewData ( void ) const
inline

◆ getViewDockWidget()

ads::CDockWidget * ot::WidgetView::getViewDockWidget ( void ) const
inline

Returns the dock widget that belongs to this widget view.

◆ getViewIsPermanent()

bool ot::WidgetView::getViewIsPermanent ( void ) const
inline

Permanent views wont be removed from the widget view manager when calling remove view.

◆ getViewToggleAction()

QAction * ot::WidgetView::getViewToggleAction ( void ) const

Returns the dock widget toggle visibility action. Returns 0 if no widget view is set.

◆ getViewWidget()

virtual QWidget * ot::WidgetView::getViewWidget ( void )
pure virtual

◆ isCurrentViewTab()

bool ot::WidgetView::isCurrentViewTab ( void ) const

◆ setAsCurrentViewTab()

void ot::WidgetView::setAsCurrentViewTab ( void )

◆ setViewContentModified()

void ot::WidgetView::setViewContentModified ( bool _isModified)

Set the view modified state. Modified views will change the title to display an unsaved change.

◆ setViewData()

void ot::WidgetView::setViewData ( const WidgetViewBase & _data)

◆ setViewIsPermanent()

void ot::WidgetView::setViewIsPermanent ( bool _permanent = true)
inline

Permanent views wont be removed from the widget view manager when calling remove view.

◆ setViewWidgetFocus()

void ot::WidgetView::setViewWidgetFocus ( void )
virtual

Sets the input focus to the view widget. Custom widget views with nested widgets can override this method to set the focus to the correct widget. By default the root widget (widget returned by WidgetView::getViewWidget()) will get the focus set.

◆ viewDataModifiedChanged

void ot::WidgetView::viewDataModifiedChanged ( void )
signal

Friends And Related Symbol Documentation

◆ WidgetViewManager

friend class WidgetViewManager
friend

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