Choreonoid  1.8
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
cnoid::View Class Reference

#include <View.h>

Inheritance diagram for cnoid::View:
cnoid::Widget cnoid::BodyLinkView cnoid::BodyStateView cnoid::CoordinateFrameListView cnoid::DigitalIoDeviceView cnoid::DSMediaView cnoid::GeneralSliderView cnoid::GraphViewBase cnoid::GSMediaView cnoid::ImageView cnoid::IoConnectionView cnoid::ItemPropertyView cnoid::ItemTreeView cnoid::JointDisplacementView cnoid::JointGraphView cnoid::JointStateView cnoid::LinkDeviceListView cnoid::LinkGraphView cnoid::LinkPositionView cnoid::LinkPropertyView cnoid::LocationView cnoid::MessageView cnoid::MprPositionListView cnoid::MprProgramViewBase cnoid::MprStatementViewBase cnoid::MprVariableListView cnoid::PythonConsoleView cnoid::SceneView cnoid::TaskView cnoid::TextEditView cnoid::UnifiedEditHistoryView cnoid::VirtualJoystickView

Public Types

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

 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)
 
virtual bool storeState (Archive &archive)
 
virtual bool restoreState (const Archive &archive)
 
- Public Member Functions inherited from cnoid::Widget
 Widget (QWidget *parent=0)
 
SignalProxy< void(std::string name)> sigObjectNameChanged ()
 
SignalProxy< void(std::string title)> sigWindowTitleChanged ()
 

Static Public Member Functions

static ViewlastFocusView ()
 

Protected Member Functions

void setLayoutContentsMarginRatio (QLayout *layout, double leftMarginRatio, double topMarginRatio, double rightMarginRatio, double bottomMarginRatio)
 
void zoomFontSize (int zoom)
 
virtual void onActivated ()
 
virtual void onDeactivated ()
 
virtual void onFocusChanged (bool on)
 
virtual void onAttachedMenuRequest (MenuManager &menuManager)
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void resizeEvent (QResizeEvent *event)
 

Friends

class ViewManager
 
class ViewArea
 

Member Enumeration Documentation

◆ LayoutArea

Enumerator
TopLeftArea 
MiddleLeftArea 
BottomLeftArea 
TopCenterArea 
CenterArea 
BottomCenterArea 
TopRightArea 
MiddleRightArea 
BottomRightArea 
NumLayoutAreas 
LEFT 
LEFT_TOP 
LEFT_BOTTOM 
CENTER 
RIGHT 
BOTTOM 

Constructor & Destructor Documentation

◆ View()

View::View ( )

◆ ~View()

View::~View ( )
virtual

Member Function Documentation

◆ bringToFront()

void View::bringToFront ( )

◆ defaultLayoutArea()

View::LayoutArea View::defaultLayoutArea ( ) const

◆ enableFontSizeZoomKeys()

void View::enableFontSizeZoomKeys ( bool  on)

◆ hasFocus()

bool View::hasFocus ( ) const

◆ indicatorOnInfoBar()

QWidget * View::indicatorOnInfoBar ( )
virtual

◆ isActive()

bool View::isActive ( ) const

◆ keyPressEvent()

void View::keyPressEvent ( QKeyEvent *  event)
protectedvirtual

◆ lastFocusView()

View * View::lastFocusView ( )
static

◆ name()

const std::string & View::name ( ) const

◆ onActivated()

void View::onActivated ( )
protectedvirtual

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 in cnoid::PythonConsoleView, cnoid::MprProgramViewBase, cnoid::CoordinateFrameListView, cnoid::LocationView, cnoid::DigitalIoDeviceView, cnoid::JointDisplacementView, cnoid::LinkPositionView, cnoid::MprStatementViewBase, cnoid::LinkDeviceListView, cnoid::UnifiedEditHistoryView, cnoid::GSMediaView, and cnoid::DSMediaView.

◆ onAttachedMenuRequest()

void View::onAttachedMenuRequest ( MenuManager menuManager)
protectedvirtual

◆ onDeactivated()

void View::onDeactivated ( )
protectedvirtual

◆ onFocusChanged()

void View::onFocusChanged ( bool  on)
protectedvirtual

◆ resetTitleFormat()

void View::resetTitleFormat ( )

◆ resizeEvent()

void View::resizeEvent ( QResizeEvent *  event)
protectedvirtual

Reimplemented in cnoid::GSMediaView, and cnoid::DSMediaView.

◆ restoreState()

bool View::restoreState ( const Archive archive)
virtual

◆ setDefaultLayoutArea()

void View::setDefaultLayoutArea ( LayoutArea  area)

◆ setLayout() [1/2]

void View::setLayout ( QLayout *  layout,
double  leftMarginRatio,
double  topMarginRatio,
double  rightMarginRatio,
double  bottomMarginRatio 
)

◆ setLayout() [2/2]

void View::setLayout ( QLayout *  layout,
double  marginRatio = 0.0 
)

◆ setLayoutContentsMarginRatio()

void View::setLayoutContentsMarginRatio ( QLayout *  layout,
double  leftMarginRatio,
double  topMarginRatio,
double  rightMarginRatio,
double  bottomMarginRatio 
)
protected

◆ setName()

void View::setName ( const std::string &  name)
virtual

◆ setTitleFormat()

void View::setTitleFormat ( const std::string &  title)

◆ sigActivated()

SignalProxy< void()> View::sigActivated ( )

◆ sigDeactivated()

SignalProxy< void()> View::sigDeactivated ( )

◆ sigRemoved()

SignalProxy< void()> View::sigRemoved ( )

◆ sigResized()

SignalProxy< void()> View::sigResized ( )

◆ storeState()

bool View::storeState ( Archive archive)
virtual

◆ titleFormat()

const std::string & View::titleFormat ( ) const

◆ viewArea()

ViewArea * View::viewArea ( ) const

◆ viewAreaPos()

QPoint View::viewAreaPos ( ) const

◆ viewClass()

ViewClass * View::viewClass ( ) const

◆ zoomFontSize()

void View::zoomFontSize ( int  zoom)
protected

Friends And Related Function Documentation

◆ ViewArea

friend class ViewArea
friend

◆ ViewManager

friend class ViewManager
friend

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