homescreenapp/hsdomainmodel/src/hspagevisual.cpp
changeset 92 6727c5d0afc7
parent 77 4b195f3bea29
equal deleted inserted replaced
85:35368b604b28 92:6727c5d0afc7
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 #include "hspagevisual.h"
    18 #include "hspagevisual.h"
    19 #include "hspagetoucharea.h"
    19 #include "hspagetoucharea.h"
    20 
    20 #include "hsscene.h"
       
    21 #include "hspage.h"
    21 
    22 
    22 
    23 
    23 /*!
    24 /*!
    24     \class HsPageVisual
    25     \class HsPageVisual
    25     \ingroup group_hsdomainmodel
    26     \ingroup group_hsdomainmodel
    49 */
    50 */
    50 HsPageVisual::~HsPageVisual()
    51 HsPageVisual::~HsPageVisual()
    51 {
    52 {
    52 }
    53 }
    53 
    54 
       
    55 int HsPageVisual::pageIndex() const
       
    56 {
       
    57     QList<HsPage *> pages = HsScene::instance()->pages();
       
    58     for (int i = 0; i < pages.count(); ++i) {
       
    59         if (pages.at(i)->visual() == this) {
       
    60             return i;
       
    61         }
       
    62     }
       
    63     return -1;
       
    64 }
       
    65 
    54 void HsPageVisual::setGeometry(const QRectF &rect)
    66 void HsPageVisual::setGeometry(const QRectF &rect)
    55 {
    67 {
    56     if (mTouchArea) {
    68     if (mTouchArea) {
    57         mTouchArea->resize(rect.size());
    69         mTouchArea->resize(rect.size());
    58     }
    70     }