FougTools  0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
qtgui::StrictStackWidget Class Reference

Provides a stack of widgets similar to QStackedWidget but with "strict" stack semantics. More...

#include <qttools/gui/strict_stack_widget.h>

Inheritance diagram for qtgui::StrictStackWidget:

Public Member Functions

 StrictStackWidget (QWidget *parent=NULL)
 
 ~StrictStackWidget ()
 
void pushWidget (QWidget *widget)
 
QWidget * popWidget ()
 
bool isEmpty () const
 
QWidget * topWidget () const
 

Detailed Description

Provides a stack of widgets similar to QStackedWidget but with "strict" stack semantics.

QStackedWidget can be seen as a page-based widget rather than a stack widget. StrictStackWidget provides strict stack semantics applied to widgets : the only widget visible is the top widget.

When popWidget() is called it destroys the top widget and then makes visible the previous widget (if any), becoming the new top widget.

Constructor & Destructor Documentation

qtgui::StrictStackWidget::StrictStackWidget ( QWidget *  parent = NULL)
qtgui::StrictStackWidget::~StrictStackWidget ( )

Member Function Documentation

bool qtgui::StrictStackWidget::isEmpty ( ) const

Retruns true if the stack contains no widget, otherwise returns false

QWidget * qtgui::StrictStackWidget::popWidget ( )

Destroys the top widget from the stack

Does nothing if stack is empty

void qtgui::StrictStackWidget::pushWidget ( QWidget *  widget)

Adds widget to the top of the stack (and makes it the visible widget)

QWidget * qtgui::StrictStackWidget::topWidget ( ) const

Returns a pointer to the stack's top widget

If stack is empty, NULL is returned


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