Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SUIT_ViewManager Class Reference

#include <SUIT_ViewManager.h>

Inheritance diagram for SUIT_ViewManager:
Inheritance graph

Classes

class  Class
 

Public Slots

void createView ()
 
void closeAllViews ()
 

Signals

void lastViewClosed (SUIT_ViewManager *)
 
void tryCloseView (SUIT_ViewWindow *)
 
void deleteView (SUIT_ViewWindow *)
 
void viewCreated (SUIT_ViewWindow *)
 
void mousePress (SUIT_ViewWindow *, QMouseEvent *)
 
void mouseRelease (SUIT_ViewWindow *, QMouseEvent *)
 
void mouseDoubleClick (SUIT_ViewWindow *, QMouseEvent *)
 
void mouseMove (SUIT_ViewWindow *, QMouseEvent *)
 
void wheel (SUIT_ViewWindow *, QWheelEvent *)
 
void keyPress (SUIT_ViewWindow *, QKeyEvent *)
 
void keyRelease (SUIT_ViewWindow *, QKeyEvent *)
 
void activated (SUIT_ViewManager *)
 

Public Member Functions

 SUIT_ViewManager (SUIT_Study *, SUIT_Desktop *, SUIT_ViewModel *=0)
 
virtual ~SUIT_ViewManager ()
 
virtual QString popupClientType () const
 
virtual void contextMenuPopup (QMenu *)
 
void setViewModel (SUIT_ViewModel *theViewModel)
 
SUIT_ViewModelgetViewModel ()
 
SUIT_Studystudy () const
 
QString getType () const
 
SUIT_ViewWindowgetActiveView ()
 
int getViewsCount ()
 
QVector< SUIT_ViewWindow * > getViews () const
 
QString getTitle () const
 
virtual void setTitle (const QString &)
 
QPixmap getIcon () const
 
virtual void setIcon (const QPixmap &)
 
SUIT_ViewWindowcreateViewWindow ()
 
bool isVisible () const
 
virtual void setShown (const bool)
 
virtual void setDestructiveClose (const bool)
 
int getId () const
 
int getGlobalId () const
 
void setDetached (bool detached)
 
bool getDetached () const
 
- Public Member Functions inherited from SUIT_PopupClient
 SUIT_PopupClient ()
 
virtual ~SUIT_PopupClient ()
 
bool connectPopupRequest (QObject *reciever, const char *slot)
 
bool disconnectPopupRequest (QObject *reciever, const char *slot)
 

Protected Types

typedef QPointer< SUIT_ViewWindowViewWindow
 

Protected Slots

void onWindowActivated (SUIT_ViewWindow *)
 
void onClosingView (SUIT_ViewWindow *)
 
void onMousePressed (SUIT_ViewWindow *, QMouseEvent *)
 
void onDeleteStudy ()
 

Protected Member Functions

virtual bool insertView (SUIT_ViewWindow *theView)
 
virtual void removeView (SUIT_ViewWindow *theView)
 
virtual void closeView (SUIT_ViewWindow *theView)
 
virtual void setViewName (SUIT_ViewWindow *theView)
 
QString prepareTitle (const QString &, const int, const int)
 
- Protected Member Functions inherited from SUIT_PopupClient
void contextMenuRequest (QContextMenuEvent *e)
 

Static Protected Member Functions

static int useNewId (const QString &)
 

Protected Attributes

SUIT_DesktopmyDesktop
 
SUIT_ViewModelmyViewModel
 
QVector< ViewWindowmyViews
 
SUIT_ViewWindowmyActiveView
 
int myId
 
QPixmap myIcon
 
QString myTitle
 
SUIT_StudymyStudy
 
bool myIsDetached
 

Static Protected Attributes

static QMap< QString, int > _ViewMgrId
 

Private Slots

void onContextMenuRequested (QContextMenuEvent *e)
 

Member Typedef Documentation

typedef QPointer<SUIT_ViewWindow> SUIT_ViewManager::ViewWindow
protected

Constructor & Destructor Documentation

SUIT_ViewManager::SUIT_ViewManager ( SUIT_Study theStudy,
SUIT_Desktop theDesktop,
SUIT_ViewModel theViewModel = 0 
)
SUIT_ViewManager::~SUIT_ViewManager ( )
virtual

Destructor.

References myViewModel, and SUIT_ViewModel::setViewManager().

Member Function Documentation

void SUIT_ViewManager::activated ( SUIT_ViewManager )
signal
void SUIT_ViewManager::closeAllViews ( )
slot

Close all views.

References myViews.

void SUIT_ViewManager::closeView ( SUIT_ViewWindow theView)
protectedvirtual

Close the specified View.

Remove the view window theView from view manager and destroy it.

Reimplemented in QxScene_ViewManager.

References deleteView(), and removeView().

void SUIT_ViewManager::contextMenuPopup ( QMenu popup)
virtual

Context menu popup for popup.

Reimplemented from SUIT_PopupClient.

Reimplemented in GLViewer_ViewManager, and OCCViewer_ViewManager.

References SUIT_ViewModel::contextMenuPopup(), and getViewModel().

void SUIT_ViewManager::createView ( )
slot

Create view window.

References createViewWindow().

SUIT_ViewWindow * SUIT_ViewManager::createViewWindow ( )

Creates View, adds it into list of views and returns just created view window

References SUIT_ViewModel::createView(), insertView(), myActiveView, myDesktop, myIcon, myViewModel, onWindowActivated(), SUIT_ViewWindow::setViewManager(), setViewName(), and viewCreated().

void SUIT_ViewManager::deleteView ( SUIT_ViewWindow )
signal
SUIT_ViewWindow* SUIT_ViewManager::getActiveView ( )
inline
bool SUIT_ViewManager::getDetached ( ) const

get option detached (false by default) to decide if the viewWindow is to be added to Desktop TabBar

References myIsDetached.

int SUIT_ViewManager::getGlobalId ( ) const
QPixmap SUIT_ViewManager::getIcon ( ) const
inline
int SUIT_ViewManager::getId ( ) const

Get identifier

References myId.

QString SUIT_ViewManager::getTitle ( ) const
inline
QString SUIT_ViewManager::getType ( ) const
Return values
QString- type of view model.

References SUIT_ViewModel::getType(), and myViewModel.

SUIT_ViewModel* SUIT_ViewManager::getViewModel ( )
inline
QVector< SUIT_ViewWindow * > SUIT_ViewManager::getViews ( ) const

References myViews.

int SUIT_ViewManager::getViewsCount ( )
inline
bool SUIT_ViewManager::insertView ( SUIT_ViewWindow theView)
protectedvirtual

Inserts the View into internal Views Vector.
Returns true if view has been added successfully

Insert view window to view manager.

Return values
false- if something wrong, else true.

Reimplemented in Plot2d_ViewManager, and QxScene_ViewManager.

References keyPress(), keyRelease(), mouseDoubleClick(), mouseMove(), mouseRelease(), myViews, onClosingView(), onContextMenuRequested(), onMousePressed(), tryCloseView(), and wheel().

bool SUIT_ViewManager::isVisible ( ) const

Returns 'true' if any of views (view windows) is visible.

References myViews.

void SUIT_ViewManager::keyPress ( SUIT_ViewWindow ,
QKeyEvent *   
)
signal
void SUIT_ViewManager::keyRelease ( SUIT_ViewWindow ,
QKeyEvent *   
)
signal
void SUIT_ViewManager::lastViewClosed ( SUIT_ViewManager )
signal
void SUIT_ViewManager::mouseDoubleClick ( SUIT_ViewWindow ,
QMouseEvent *   
)
signal
void SUIT_ViewManager::mouseMove ( SUIT_ViewWindow ,
QMouseEvent *   
)
signal
void SUIT_ViewManager::mousePress ( SUIT_ViewWindow ,
QMouseEvent *   
)
signal
void SUIT_ViewManager::mouseRelease ( SUIT_ViewWindow ,
QMouseEvent *   
)
signal
void SUIT_ViewManager::onClosingView ( SUIT_ViewWindow theView)
protectedslot

Emit delete view. Remove view window theView from view manager.

References closeView().

void SUIT_ViewManager::onContextMenuRequested ( QContextMenuEvent *  e)
privateslot

invoke method of SUIT_PopupClient, which notifies about popup

References SUIT_PopupClient::contextMenuRequest().

void SUIT_ViewManager::onDeleteStudy ( )
protectedslot

Sets stydy to NULL.

References myStudy.

void SUIT_ViewManager::onMousePressed ( SUIT_ViewWindow theView,
QMouseEvent *  theEvent 
)
protectedslot

Emit on theEvent mouse pressed in theView.

References mousePress().

void SUIT_ViewManager::onWindowActivated ( SUIT_ViewWindow view)
protectedslot

Emit activated for view view.

References activated(), myActiveView, and myViews.

virtual QString SUIT_ViewManager::popupClientType ( ) const
inlinevirtual

Implements SUIT_PopupClient.

QString SUIT_ViewManager::prepareTitle ( const QString &  title,
const int  mId,
const int  vId 
)
protected
void SUIT_ViewManager::removeView ( SUIT_ViewWindow theView)
protectedvirtual

Removes the View from internal Views Vector.

Remove view window theView from view manager. *And close the last view, if it has theView.

References lastViewClosed(), myActiveView, and myViews.

void SUIT_ViewManager::setDestructiveClose ( const bool  on)
virtual

Set or clear flag Qt::WDestructiveClose for all views

References myViews.

void SUIT_ViewManager::setDetached ( bool  detached)

option detached (false by default) to set before the viewWindow is added to Desktop TabBar

References myIsDetached.

void SUIT_ViewManager::setIcon ( const QPixmap &  theIcon)
virtual

References myIcon, and myViews.

void SUIT_ViewManager::setShown ( const bool  on)
virtual

Show or hide all views (view windows)

References myViews.

void SUIT_ViewManager::setTitle ( const QString &  theTitle)
virtual

References myTitle, myViews, and setViewName().

void SUIT_ViewManager::setViewModel ( SUIT_ViewModel theViewModel)

Sets view model theViewModel to view manager.

References myViewModel, and SUIT_ViewModel::setViewManager().

void SUIT_ViewManager::setViewName ( SUIT_ViewWindow theView)
protectedvirtual

Used to set unique name for the view.

Sets view name for view window theView.

References getTitle(), myId, myViews, and prepareTitle().

SUIT_Study * SUIT_ViewManager::study ( ) const
Return values
SUIT_Study*- current study.

References myStudy.

void SUIT_ViewManager::tryCloseView ( SUIT_ViewWindow )
signal
int SUIT_ViewManager::useNewId ( const QString &  type)
staticprotected

References _ViewMgrId.

void SUIT_ViewManager::viewCreated ( SUIT_ViewWindow )
signal
void SUIT_ViewManager::wheel ( SUIT_ViewWindow ,
QWheelEvent *   
)
signal

Member Data Documentation

QMap< QString, int > SUIT_ViewManager::_ViewMgrId
staticprotected
SUIT_ViewWindow* SUIT_ViewManager::myActiveView
protected
SUIT_Desktop* SUIT_ViewManager::myDesktop
protected
QPixmap SUIT_ViewManager::myIcon
protected
int SUIT_ViewManager::myId
protected
bool SUIT_ViewManager::myIsDetached
protected
SUIT_Study* SUIT_ViewManager::myStudy
protected
QString SUIT_ViewManager::myTitle
protected
SUIT_ViewModel* SUIT_ViewManager::myViewModel
protected
QVector<ViewWindow> SUIT_ViewManager::myViews
protected

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