Choreonoid  1.8
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | List of all members
cnoid::MprProgramViewBase Class Referenceabstract

#include <MprProgramViewBase.h>

Inheritance diagram for cnoid::MprProgramViewBase:
cnoid::View cnoid::Widget

Classes

class  StatementDelegate
 

Public Types

enum  BodySyncMode { NoBodySync, DirectBodySync, TwoStageBodySync }
 
- Public Types inherited from cnoid::View
enum  LayoutArea {
  TopLeftArea = 0, MiddleLeftArea = 1, BottomLeftArea = 2, TopCenterArea = 3,
  CenterArea = 4, BottomCenterArea = 5, TopRightArea = 6, MiddleRightArea = 7,
  BottomRightArea = 8, NumLayoutAreas = 9, LEFT = TopLeftArea, LEFT_TOP = TopLeftArea,
  LEFT_BOTTOM = BottomLeftArea, CENTER = CenterArea, RIGHT = TopRightArea, BOTTOM = BottomCenterArea
}
 

Public Member Functions

 MprProgramViewBase ()
 
virtual ~MprProgramViewBase ()
 
virtual void onActivated () override
 
virtual void onDeactivated () override
 
MprProgramItemBasecurrentProgramItem ()
 
bool checkCurrentProgramItem () const
 
MprStatementcurrentStatement ()
 
SignalProxy< void(MprStatement *statement)> sigCurrentStatementChanged ()
 
const std::vector< MprStatementPtr > & selectedStatements ()
 
SignalProxy< void(std::vector< MprStatementPtr > &statements)> sigSelectedStatementsChanged ()
 
void updateStatementTree ()
 
template<class StatementType >
void registerStatementDelegate (StatementDelegate *delegate)
 
template<class StatementType >
void customizeContextMenu (std::function< void(StatementType *statement, MenuManager &menuManager, MprStatementFunctionDispatcher menuFunction)> func)
 
void setBodySyncMode (BodySyncMode mode)
 
BodySyncMode bodySyncMode () const
 
- Public Member Functions inherited from cnoid::View
 View ()
 
virtual ~View ()
 
ViewClassviewClass () const
 
const std::string & name () const
 
virtual void setName (const std::string &name)
 
void setTitleFormat (const std::string &title)
 
void resetTitleFormat ()
 
const std::string & titleFormat () const
 
ViewAreaviewArea () const
 
bool isActive () const
 
bool hasFocus () const
 
void bringToFront ()
 
SignalProxy< void()> sigActivated ()
 
SignalProxy< void()> sigDeactivated ()
 
SignalProxy< void()> sigResized ()
 
SignalProxy< void()> sigRemoved ()
 
void setDefaultLayoutArea (LayoutArea area)
 
LayoutArea defaultLayoutArea () const
 
void setLayout (QLayout *layout, double marginRatio=0.0)
 
void setLayout (QLayout *layout, double leftMarginRatio, double topMarginRatio, double rightMarginRatio, double bottomMarginRatio)
 
QPoint viewAreaPos () const
 
virtual QWidget * indicatorOnInfoBar ()
 
void enableFontSizeZoomKeys (bool on)
 
- Public Member Functions inherited from cnoid::Widget
 Widget (QWidget *parent=0)
 
SignalProxy< void(std::string name)> sigObjectNameChanged ()
 
SignalProxy< void(std::string title)> sigWindowTitleChanged ()
 

Protected Types

enum  InsertionType { BeforeTargetPosition, AfterTargetPosition }
 

Protected Member Functions

void addEditButton (ToolButton *button, int row)
 
bool insertStatement (MprStatement *statement, int insertionType=AfterTargetPosition)
 
virtual bool onCurrentProgramItemChanged (MprProgramItemBase *item)=0
 
virtual void onCurrentStatementChanged (MprStatement *statement)
 
virtual void onStatementActivated (MprStatement *statement)
 
virtual void onStatementDoubleClicked (MprStatement *statement)
 
virtual void onAttachedMenuRequest (MenuManager &menuManager) override
 
virtual bool storeState (Archive &archive) override
 
virtual bool restoreState (const Archive &archive) override
 
- Protected Member Functions inherited from cnoid::View
void setLayoutContentsMarginRatio (QLayout *layout, double leftMarginRatio, double topMarginRatio, double rightMarginRatio, double bottomMarginRatio)
 
void zoomFontSize (int zoom)
 
virtual void onFocusChanged (bool on)
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void resizeEvent (QResizeEvent *event)
 

Additional Inherited Members

- Static Public Member Functions inherited from cnoid::View
static ViewlastFocusView ()
 

Member Enumeration Documentation

◆ BodySyncMode

Enumerator
NoBodySync 
DirectBodySync 
TwoStageBodySync 

◆ InsertionType

Enumerator
BeforeTargetPosition 
AfterTargetPosition 

Constructor & Destructor Documentation

◆ MprProgramViewBase()

MprProgramViewBase::MprProgramViewBase ( )

◆ ~MprProgramViewBase()

MprProgramViewBase::~MprProgramViewBase ( )
virtual

Member Function Documentation

◆ addEditButton()

void MprProgramViewBase::addEditButton ( ToolButton button,
int  row 
)
protected

◆ bodySyncMode()

MprProgramViewBase::BodySyncMode MprProgramViewBase::bodySyncMode ( ) const

◆ checkCurrentProgramItem()

bool MprProgramViewBase::checkCurrentProgramItem ( ) const

◆ currentProgramItem()

MprProgramItemBase * MprProgramViewBase::currentProgramItem ( )

◆ currentStatement()

MprStatement * MprProgramViewBase::currentStatement ( )

◆ customizeContextMenu()

template<class StatementType >
void cnoid::MprProgramViewBase::customizeContextMenu ( std::function< void(StatementType *statement, MenuManager &menuManager, MprStatementFunctionDispatcher menuFunction)>  func)
inline

◆ insertStatement()

bool MprProgramViewBase::insertStatement ( MprStatement statement,
int  insertionType = AfterTargetPosition 
)
protected

◆ onActivated()

void MprProgramViewBase::onActivated ( )
overridevirtual

Virtual function which is called when the view becomes visible on the main window.

Note
In the current implementation, this function may be continuously called two or three times when the perspective changes, and the number of calles does not necessarily corresponds to the number of 'onDeactivated()' calles.

Reimplemented from cnoid::View.

◆ onAttachedMenuRequest()

void MprProgramViewBase::onAttachedMenuRequest ( MenuManager menuManager)
overrideprotectedvirtual

Reimplemented from cnoid::View.

◆ onCurrentProgramItemChanged()

virtual bool cnoid::MprProgramViewBase::onCurrentProgramItemChanged ( MprProgramItemBase item)
protectedpure virtual

◆ onCurrentStatementChanged()

void MprProgramViewBase::onCurrentStatementChanged ( MprStatement statement)
protectedvirtual

◆ onDeactivated()

void MprProgramViewBase::onDeactivated ( )
overridevirtual

Reimplemented from cnoid::View.

◆ onStatementActivated()

void MprProgramViewBase::onStatementActivated ( MprStatement statement)
protectedvirtual

◆ onStatementDoubleClicked()

void MprProgramViewBase::onStatementDoubleClicked ( MprStatement statement)
protectedvirtual

◆ registerStatementDelegate()

template<class StatementType >
void cnoid::MprProgramViewBase::registerStatementDelegate ( StatementDelegate delegate)
inline

◆ restoreState()

bool MprProgramViewBase::restoreState ( const Archive archive)
overrideprotectedvirtual

Reimplemented from cnoid::View.

◆ selectedStatements()

const std::vector< MprStatementPtr > & MprProgramViewBase::selectedStatements ( )

◆ setBodySyncMode()

void MprProgramViewBase::setBodySyncMode ( BodySyncMode  mode)

◆ sigCurrentStatementChanged()

SignalProxy< void(MprStatement *statement)> MprProgramViewBase::sigCurrentStatementChanged ( )

◆ sigSelectedStatementsChanged()

SignalProxy< void(std::vector< MprStatementPtr > &statements)> MprProgramViewBase::sigSelectedStatementsChanged ( )

◆ storeState()

bool MprProgramViewBase::storeState ( Archive archive)
overrideprotectedvirtual

Reimplemented from cnoid::View.

◆ updateStatementTree()

void MprProgramViewBase::updateStatementTree ( )

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