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

VisuGUI_BasePanel Class Reference

Base class for VISU interactive sub-panels. More...

#include <VisuGUI_BasePanel.h>

Inheritance diagram for VisuGUI_BasePanel:
Inheritance graph

Data Structures

class  MainFrame

Public Types

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

Signals

void bpOk ()
void bpApply ()
void bpClose ()
void bpHelp ()

Public Member Functions

 VisuGUI_BasePanel (const QString &theName, QWidget *theParent, const int theBtns=AllBtn)
 Constructor creates panels look and feel.
virtual ~VisuGUI_BasePanel ()
 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.

Protected Member Functions

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

Protected Attributes

QScrollArea * myView
QFramemyMainFrame
QPushButton * myOK
QPushButton * myApply
QPushButton * myClose
QPushButton * myHelp

Detailed Description

Set of classes is derived from this class and are intended for representing widgets (GUI controls) for different operations. VisuGUI_BasePanel 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_BasePanel::VisuGUI_BasePanel ( const QString &  theName,
QWidget theParent,
const int  theBtns = AllBtn 
)
Parameters:
theNamename of the panel
theParentparent widget

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

VisuGUI_BasePanel::~VisuGUI_BasePanel ( ) [virtual]

Member Function Documentation

bool VisuGUI_BasePanel::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_BasePanel::clear ( ) [virtual]
void VisuGUI_BasePanel.bpOk ( ) [signal]
void VisuGUI_BasePanel.bpApply ( ) [signal]
void VisuGUI_BasePanel.bpClose ( ) [signal]
void VisuGUI_BasePanel.bpHelp ( ) [signal]
void VisuGUI_BasePanel::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 bpOk(), and myOK.

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

References bpApply(), and myApply.

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

References bpClose(), and myClose.

void VisuGUI_BasePanel::onHelp ( ) [protected, virtual, slot]
See also:
onOK

References bpHelp(), and myHelp.

QFrame * VisuGUI_BasePanel::mainFrame ( ) [protected]
Returns:
QFrame* object

References myMainFrame.


Field Documentation

QScrollArea* VisuGUI_BasePanel.myView [protected]
QPushButton* VisuGUI_BasePanel.myOK [protected]
QPushButton* VisuGUI_BasePanel.myApply [protected]
QPushButton* VisuGUI_BasePanel.myClose [protected]
QPushButton* VisuGUI_BasePanel.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