Version: 6.3.1
Data Structures | Public Types | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes

VisuGUI_Panel Class Reference

Base class for VISU interactive dockable panels. More...

#include <VisuGUI_Panel.h>

Inheritance diagram for VisuGUI_Panel:
Inheritance graph

Data Structures

class  MainFrame

Public Types

enum  {
  OKBtn = 0x0001, ApplyBtn = 0x0002, CloseBtn = 0x0004, HelpBtn = 0x0008,
  AllBtn = OKBtn | ApplyBtn | CloseBtn | HelpBtn
}

Public Member Functions

 VisuGUI_Panel (const QString &theName, VisuGUI *theModule, QWidget *theParent=0, const int theBtns=AllBtn)
 Constructor creates panels look and feel.
virtual ~VisuGUI_Panel ()
 Destructor.
virtual bool isValid (QString &theMessage)
 Verifies validity of input data.
virtual void clear ()
 Virtual methods should be redefined in derived classes and clears all GUI controls.

Protected Slots

virtual void onOK ()
 Virtual slot called when “OK” button pressed emits corresponding signal.
virtual void onApply ()
 Virtual slot called when “Apply” button pressed emits corresponding signal.
virtual void onClose ()
 Virtual slot called when “Close” button pressed emits corresponding signal.
virtual void onHelp ()
 Virtual slot called when “Help” button pressed emits corresponding signal.
virtual void onModuleActivated ()
virtual void onModuleDeactivated ()

Protected Member Functions

QWidgetmainFrame ()
 Gets frame inserted in scroll view. All controls of derived panels should use it as parent.

Protected Attributes

QScrollArea * myView
QWidgetmyMainFrame
QPushButton * myOK
QPushButton * myApply
QPushButton * myClose
QPushButton * myHelp
VisuGUImyModule

Detailed Description

Set of classes is derived from this class and are intended for representing widgets (GUI controls) for different operations. VisuGUI_Panel consists of main frame inserted in scroll view and four push buttons. So all widgets of derived sub-panels should be inherited from mainframe() instead of “this” pointer.


Member Enumeration Documentation

anonymous enum
Enumerator:
OKBtn 
ApplyBtn 
CloseBtn 
HelpBtn 
AllBtn 

Constructor & Destructor Documentation

VisuGUI_Panel::VisuGUI_Panel ( const QString &  theName,
VisuGUI theModule,
QWidget theParent = 0,
const int  theBtns = AllBtn 
)
Parameters:
theNamepanel title
theModuleparent VISU GUI module
theParentparent widget
theBtnspanel buttons

References ApplyBtn, CloseBtn, HelpBtn, myApply, myClose, myHelp, myMainFrame, myOK, myView, OKBtn, onApply(), onClose(), onHelp(), onModuleActivated(), onModuleDeactivated(), and onOK().

VisuGUI_Panel::~VisuGUI_Panel ( ) [virtual]

Member Function Documentation

bool VisuGUI_Panel::isValid ( QString &  theMessage) [virtual]

This virtual method should be redefined in derived classes. Usually operator corresponding to the sub-panel calls this method to check validity of input data when Apply/OK button is pressed.

Parameters:
theErrMsgError message.

If data is invalid when panel can return message using this parameter given clear explanation what is wrong

Returns:
TRUE if data is valid, FALSE otherwise
void VisuGUI_Panel::clear ( ) [virtual]
void VisuGUI_Panel::onOK ( ) [protected, virtual, slot]

This slot moves focus in OK button before emitting signal. Mainly it provides application with correct moving data from currently edited controls to internal structure. For example QTable moves data from cell editor to table item when focus is out.

References myOK.

void VisuGUI_Panel::onApply ( ) [protected, virtual, slot]
void VisuGUI_Panel::onClose ( ) [protected, virtual, slot]
See also:
onOK

Reimplemented in VisuGUI_FeatureEdgesPanel, and VisuGUI_SelectionPanel.

References myClose.

void VisuGUI_Panel::onHelp ( ) [protected, virtual, slot]
void VisuGUI_Panel::onModuleActivated ( ) [protected, virtual, slot]
void VisuGUI_Panel::onModuleDeactivated ( ) [protected, virtual, slot]
QWidget * VisuGUI_Panel::mainFrame ( ) [protected]
Returns:
QFrame* object

References myMainFrame.


Field Documentation

QScrollArea* VisuGUI_Panel.myView [protected]
QPushButton* VisuGUI_Panel.myOK [protected]
QPushButton* VisuGUI_Panel.myApply [protected]
QPushButton* VisuGUI_Panel.myClose [protected]
QPushButton* VisuGUI_Panel.myHelp [protected]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS