VR-Vantage
Loading...
Searching...
No Matches
ReplacementDialogPage Class Reference

The example dialog-page that will be inserted into the dialog. This page contains a widget and logic for that widget. The widget is created at construction of this page and destroyed with the page. The logic is created when this page is activated (shown) and destroyed when this page is deactivated (hidden). For this example, the widget is derived from DtLoaderSettingsWidget and is extended with an extra checkbox. The logic is derived from DtLoaderSettingsLogic and manages the events from the extra checkbox. More...

Inheritance diagram for ReplacementDialogPage:

Public Member Functions

 ReplacementDialogPage (makVrv::DtDe &de, QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
 CTOR. This constructor creates the main widget of the ReplacementDialogPage. The logic is created at a later time.
virtual ~ReplacementDialogPage ()
 DTOR. This destructor destroys both the main widget and the logic for the ReplacementDialogPage.
virtual QIcon icon ()
 Get the icon of the page. makVrv::DtPage requires this function to be implemented.
virtual makVrv::DtQIconConfigurations qIconConfigurations () const
 Get the icon configurations for the page. This is used to style the page's icon based on application settings. makVrv::DtPage requires this function to be implemented.
virtual QString title ()
 Get the title of the page. makVrv::DtPage requires this function to be implemented.
virtual const std::string & pageClassName () const
 Get the class name of the page. makVrv::DtPage requires this function to be implemented.
Public Member Functions inherited from makVrv::DtPage
 DtPage (DtDe &de, QWidget *parent=0, Qt::WindowFlags f=0)
 CTOR for page. The DtPage should not populate itself automatically. It should only do this when activate is called.
virtual ~DtPage ()
 DTOR for page.
virtual PageAction pageAction ()
 return the current action on the page
virtual void setPageAction (PageAction action)
 set the curret action on the page
virtual void setActionFlag (int flag)
 set the action flag of the page
virtual int actionFlag ()
 return the action flag of the page
virtual void setParentDialog (QWidget *paraentDialog)
 set the parent dialog that owns this page
virtual QWidget * parentDialog ()
 return the parent dialog that own this page
virtual bool shouldAskBeforeAction (PageAction action)
 test the action flag with the action, return true if we should ask before executing the action /param action the current page action
virtual void askBeforeAction ()
 Called when the action flag is set and before the action is beind executed, default do nothing. subclass must implement this if they want ask user before they swith or close the page. /param action the current page action.
virtual void executeAfterAsk (bool revert)
 Called after askBeforeAction(), whether user wants to revert the action or resume the action /param revert if true, the user wants to revert the action, otherwise resume it.
virtual void resumeLastAction ()
 resume the last action of the page
virtual void onCloseEvent ()
 will be called when user hit the close button of this page, default do nothing.
virtual void onSwitchEvent ()
 will be called when user try switch to another page, default do nothing.

Static Public Member Functions

static const std::string & thePageClassName ()
 Get the class name of the page. makVrv::DtPageCreatorTemplate requires this function to be implemented.

Protected Member Functions

virtual void activate ()
 Called by the pager when this page is activated and shown. This function creates the logic and connects it to the main widget. makVrv::DtPage requires this function to be implemented.
virtual void deactivate ()
 Called by the pager when this page is deactivated and hidden. This function disconnects the logic form the main widget then destroys the logic object. makVrv::DtPage requires this function to be implemented.
Protected Member Functions inherited from makVrv::DtPage
virtual QWidget * wrapPageWithScrollArea (QWidget *scrollableWidget, bool isHorizontalScrollingEnabled=false, bool isVerticalScrollingEnabled=true)
virtual DtPageScrollArea * createScrollArea (QWidget *scrollableWidget, QWidget *parent, bool isHorizontalScrollingEnabled=false, bool isVerticalScrollingEnabled=true)
 Creates a DtPageScrollArea for the given widget and parent.

Protected Attributes

makVrv::DtPersistenceToolbarWidget * myToolbar
DerivedDialogWidget * myWidget
DerivedDialogLogic * myLogic
Protected Attributes inherited from makVrv::DtPage
DtDe & myDe
QWidget * myParentDialog
PageAction myCurrentPageAction
int myActionFlag

Additional Inherited Members

Public Types inherited from makVrv::DtPage
enum  PageAction { None = 0x0000 , Switching = 0x0001 , Closing = 0x0010 }

Detailed Description

The example dialog-page that will be inserted into the dialog. This page contains a widget and logic for that widget. The widget is created at construction of this page and destroyed with the page. The logic is created when this page is activated (shown) and destroyed when this page is deactivated (hidden). For this example, the widget is derived from DtLoaderSettingsWidget and is extended with an extra checkbox. The logic is derived from DtLoaderSettingsLogic and manages the events from the extra checkbox.

Examples

Constructor & Destructor Documentation

◆ ReplacementDialogPage()

ReplacementDialogPage::ReplacementDialogPage ( makVrv::DtDe & de,
QWidget * parent = 0,
Qt::WindowFlags f = Qt::Widget )

CTOR. This constructor creates the main widget of the ReplacementDialogPage. The logic is created at a later time.

◆ ~ReplacementDialogPage()

virtual ReplacementDialogPage::~ReplacementDialogPage ( )
virtual

DTOR. This destructor destroys both the main widget and the logic for the ReplacementDialogPage.

Member Function Documentation

◆ icon()

virtual QIcon ReplacementDialogPage::icon ( )
virtual

Get the icon of the page. makVrv::DtPage requires this function to be implemented.

Implements makVrv::DtPage.

◆ qIconConfigurations()

virtual makVrv::DtQIconConfigurations ReplacementDialogPage::qIconConfigurations ( ) const
virtual

Get the icon configurations for the page. This is used to style the page's icon based on application settings. makVrv::DtPage requires this function to be implemented.

Implements makVrv::DtPage.

◆ title()

virtual QString ReplacementDialogPage::title ( )
virtual

Get the title of the page. makVrv::DtPage requires this function to be implemented.

Implements makVrv::DtPage.

◆ pageClassName()

virtual const std::string & ReplacementDialogPage::pageClassName ( ) const
virtual

Get the class name of the page. makVrv::DtPage requires this function to be implemented.

Implements makVrv::DtPage.

◆ thePageClassName()

const std::string & ReplacementDialogPage::thePageClassName ( )
static

Get the class name of the page. makVrv::DtPageCreatorTemplate requires this function to be implemented.

◆ activate()

virtual void ReplacementDialogPage::activate ( )
protectedvirtual

Called by the pager when this page is activated and shown. This function creates the logic and connects it to the main widget. makVrv::DtPage requires this function to be implemented.

Implements makVrv::DtPage.

◆ deactivate()

virtual void ReplacementDialogPage::deactivate ( )
protectedvirtual

Called by the pager when this page is deactivated and hidden. This function disconnects the logic form the main widget then destroys the logic object. makVrv::DtPage requires this function to be implemented.

Implements makVrv::DtPage.

Member Data Documentation

◆ myToolbar

makVrv::DtPersistenceToolbarWidget* ReplacementDialogPage::myToolbar
protected

◆ myWidget

DerivedDialogWidget* ReplacementDialogPage::myWidget
protected

◆ myLogic

DerivedDialogLogic* ReplacementDialogPage::myLogic
protected

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