emailuis/nmailui/src/nmbaseview.cpp
changeset 40 2c62ef3caffd
parent 23 2dc6caa42ec3
child 30 759dc5235cdb
equal deleted inserted replaced
39:b0b89ca206b5 40:2c62ef3caffd
    25 
    25 
    26 /*!
    26 /*!
    27     Constructor
    27     Constructor
    28 */
    28 */
    29 NmBaseView::NmBaseView(NmUiStartParam* startParam,
    29 NmBaseView::NmBaseView(NmUiStartParam* startParam,
       
    30                        NmApplication &application,
    30                        QGraphicsItem *parent)
    31                        QGraphicsItem *parent)
    31 : HbView(parent),
    32 : HbView(parent),
    32 mStartParam(startParam)
    33 mStartParam(startParam),
       
    34 mApplication(application)
    33 {
    35 {
    34 }
    36 }
    35 
    37 
    36 /*!
    38 /*!
    37     Destructor
    39     Destructor
    40 {
    42 {
    41     delete mStartParam;
    43     delete mStartParam;
    42 }
    44 }
    43 
    45 
    44 /*!
    46 /*!
    45     Is it ok to exit current view. Function is called when exiting the view. 
    47     Is it ok to exit current view. Function is called when exiting the view.
    46     Views can override this function and return false to stay in current view. 
    48     Views can override this function and deside are they going to signal popView
       
    49     or not. For example based on the user query. 
    47 */
    50 */
    48 bool NmBaseView::okToExitView()
    51 void NmBaseView::okToExitView()
    49 {
    52 {
    50     return true;
    53 	mApplication.popView();
    51 }
    54 }
    52 
    55 
    53 /*!
    56 /*!
    54     About to exit view. Function is called before view is removed from
    57     About to exit view. Function is called before view is removed from
    55     view stack and deleted. Views can override this function and do pre-exit
    58     view stack and deleted. Views can override this function and do pre-exit