src/hbcore/gui/hbmainwindow.h
changeset 1 f7ac710697a9
parent 0 16d8024aca5e
child 2 06ff229162e9
equal deleted inserted replaced
0:16d8024aca5e 1:f7ac710697a9
    40 class HbView;
    40 class HbView;
    41 
    41 
    42 class HB_CORE_EXPORT HbMainWindow : public QGraphicsView
    42 class HB_CORE_EXPORT HbMainWindow : public QGraphicsView
    43 {
    43 {
    44     Q_OBJECT
    44     Q_OBJECT
       
    45 
    45     //Deprecated
    46     //Deprecated
    46     Q_PROPERTY(int currentViewIndex READ currentViewIndex WRITE setCurrentViewIndex)
    47     Q_PROPERTY(int currentViewIndex READ currentViewIndex WRITE setCurrentViewIndex)
    47     //Deprecated
    48     //Deprecated
    48     Q_PROPERTY(int viewCount READ viewCount)
    49     Q_PROPERTY(int viewCount READ viewCount)
       
    50 
    49     Q_PROPERTY(Qt::Orientation orientation 
    51     Q_PROPERTY(Qt::Orientation orientation 
    50                READ orientation
    52                READ orientation
    51                WRITE setOrientation
    53                WRITE setOrientation
    52                RESET unsetOrientation
    54                RESET unsetOrientation
    53                NOTIFY orientationChanged )
    55                NOTIFY orientationChanged)
    54 
    56 
    55 public:
    57 public:
    56 
       
    57     //deprecated
       
    58     enum Element {
       
    59         RootItem,
       
    60         ViewportItem,
       
    61         BackgroundItem
       
    62     };
       
    63 
       
    64     explicit HbMainWindow(QWidget *parent = 0, Hb::WindowFlags windowFlags = Hb::WindowFlagNone);
    58     explicit HbMainWindow(QWidget *parent = 0, Hb::WindowFlags windowFlags = Hb::WindowFlagNone);
    65     ~HbMainWindow();
    59     ~HbMainWindow();
    66 
    60 
    67     // deprecated
    61     // deprecated
    68     QGraphicsWidget *removeView(int index);
    62     QGraphicsWidget *removeView(int index);
    79     HbView *insertView(int index, QGraphicsWidget *widget = 0);
    73     HbView *insertView(int index, QGraphicsWidget *widget = 0);
    80     void removeView(QGraphicsWidget *widget);
    74     void removeView(QGraphicsWidget *widget);
    81     QList<HbView *> views() const;
    75     QList<HbView *> views() const;
    82     HbView *currentView() const;
    76     HbView *currentView() const;
    83     void setCurrentView(HbView *view, bool animate = true, Hb::ViewSwitchFlags flags = Hb::ViewSwitchDefault);
    77     void setCurrentView(HbView *view, bool animate = true, Hb::ViewSwitchFlags flags = Hb::ViewSwitchDefault);
    84 
       
    85     // Deprecated
       
    86     QGraphicsWidget *element(HbMainWindow::Element element) const;
       
    87 
    78 
    88     Qt::Orientation orientation() const;
    79     Qt::Orientation orientation() const;
    89     void setOrientation(Qt::Orientation orientation, bool animate = true);
    80     void setOrientation(Qt::Orientation orientation, bool animate = true);
    90     void unsetOrientation(bool animate = true);
    81     void unsetOrientation(bool animate = true);
    91     
    82     
   116     // Deprecated
   107     // Deprecated
   117     void previousView();
   108     void previousView();
   118 
   109 
   119     void broadcastEvent( int eventType );
   110     void broadcastEvent( int eventType );
   120 
   111 
   121     // Deprecated
       
   122     void toggleOrientation();
       
   123 
       
   124 signals:
   112 signals:
   125     // deprecated
   113     // deprecated
   126     void currentViewIndexChanged(int index);
   114     void currentViewIndexChanged(int index);
       
   115 
   127     void viewReady();
   116     void viewReady();
       
   117     void aboutToChangeView(HbView *oldView, HbView *newView);
   128     void currentViewChanged(HbView *view);
   118     void currentViewChanged(HbView *view);
   129     void aboutToChangeOrientation();
   119     void aboutToChangeOrientation();
   130     void aboutToChangeOrientation(Qt::Orientation newOrientation, bool animated);
   120     void aboutToChangeOrientation(Qt::Orientation newOrientation, bool animated);
   131     void orientationChanged(Qt::Orientation orientation);
   121     void orientationChanged(Qt::Orientation orientation);
   132 
   122 
   159     Q_PRIVATE_SLOT(d_func(), void _q_themeChanged())
   149     Q_PRIVATE_SLOT(d_func(), void _q_themeChanged())
   160     Q_PRIVATE_SLOT(d_func(), void _q_continueBroadcasting(int))
   150     Q_PRIVATE_SLOT(d_func(), void _q_continueBroadcasting(int))
   161     Q_PRIVATE_SLOT(d_func(), void _q_restoreTitlePane())
   151     Q_PRIVATE_SLOT(d_func(), void _q_restoreTitlePane())
   162     Q_PRIVATE_SLOT(d_func(), void _q_delayedConstruction())
   152     Q_PRIVATE_SLOT(d_func(), void _q_delayedConstruction())
   163     Q_PRIVATE_SLOT(d_func(), void _q_viewReady())
   153     Q_PRIVATE_SLOT(d_func(), void _q_viewReady())
   164 
       
   165 };
   154 };
   166 
   155 
   167 #endif // HBMAINWINDOW_H
   156 #endif // HBMAINWINDOW_H