src/hbcore/gui/hbmainwindow.h
changeset 2 06ff229162e9
parent 1 f7ac710697a9
child 3 11d3954df52a
equal deleted inserted replaced
1:f7ac710697a9 2:06ff229162e9
    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 
    46     //Deprecated
       
    47     Q_PROPERTY(int currentViewIndex READ currentViewIndex WRITE setCurrentViewIndex)
       
    48     //Deprecated
       
    49     Q_PROPERTY(int viewCount READ viewCount)
       
    50 
       
    51     Q_PROPERTY(Qt::Orientation orientation 
    46     Q_PROPERTY(Qt::Orientation orientation 
    52                READ orientation
    47                READ orientation
    53                WRITE setOrientation
    48                WRITE setOrientation
    54                RESET unsetOrientation
    49                RESET unsetOrientation
    55                NOTIFY orientationChanged)
    50                NOTIFY orientationChanged)
    56 
    51 
    57 public:
    52 public:
    58     explicit HbMainWindow(QWidget *parent = 0, Hb::WindowFlags windowFlags = Hb::WindowFlagNone);
    53     explicit HbMainWindow(QWidget *parent = 0, Hb::WindowFlags windowFlags = Hb::WindowFlagNone);
    59     ~HbMainWindow();
    54     ~HbMainWindow();
    60 
       
    61     // deprecated
       
    62     QGraphicsWidget *removeView(int index);
       
    63     // deprecated
       
    64     int currentViewIndex() const;
       
    65     // deprecated
       
    66     int viewCount() const;
       
    67     // deprecated
       
    68     int indexOfView(HbView *view) const;
       
    69     // deprecated
       
    70     HbView *viewAt(int index) const;
       
    71 
    55 
    72     HbView *addView(QGraphicsWidget *widget = 0);
    56     HbView *addView(QGraphicsWidget *widget = 0);
    73     HbView *insertView(int index, QGraphicsWidget *widget = 0);
    57     HbView *insertView(int index, QGraphicsWidget *widget = 0);
    74     void removeView(QGraphicsWidget *widget);
    58     void removeView(QGraphicsWidget *widget);
    75     QList<HbView *> views() const;
    59     QList<HbView *> views() const;
    77     void setCurrentView(HbView *view, bool animate = true, Hb::ViewSwitchFlags flags = Hb::ViewSwitchDefault);
    61     void setCurrentView(HbView *view, bool animate = true, Hb::ViewSwitchFlags flags = Hb::ViewSwitchDefault);
    78 
    62 
    79     Qt::Orientation orientation() const;
    63     Qt::Orientation orientation() const;
    80     void setOrientation(Qt::Orientation orientation, bool animate = true);
    64     void setOrientation(Qt::Orientation orientation, bool animate = true);
    81     void unsetOrientation(bool animate = true);
    65     void unsetOrientation(bool animate = true);
    82     
    66 
    83     // Deprecated
       
    84     void showItems(Hb::SceneItems items);
       
    85     // Deprecated
       
    86     void hideItems(Hb::SceneItems items);
       
    87     // Deprecated
       
    88     Hb::SceneItems visibleItems() const;
       
    89     // Deprecated
       
    90     bool isItemVisible(Hb::SceneItem item)  const;
       
    91     // Deprecated
       
    92     void setItemVisible(Hb::SceneItem item, bool visible);
       
    93     
       
    94     WId nativeBackgroundWindow();
    67     WId nativeBackgroundWindow();
    95     void resetNativeBackgroundWindow();
    68     void resetNativeBackgroundWindow();
    96 
    69 
    97     QRectF layoutRect() const;
    70     QRectF layoutRect() const;
    98 
    71 
    99     void setBackgroundImageName(Qt::Orientation orientation, const QString &name);
    72     void setBackgroundImageName(Qt::Orientation orientation, const QString &name);
   100     QString backgroundImageName(Qt::Orientation orientation) const;
    73     QString backgroundImageName(Qt::Orientation orientation) const;
   101 
    74 
       
    75     void setAutomaticOrientationEffectEnabled(bool enabled = true);
       
    76     bool automaticOrientationEffectEnabled() const;
       
    77 
   102 public slots:
    78 public slots:
   103     // Deprecated
       
   104     void setCurrentViewIndex(int index);
       
   105     // Deprecated
       
   106     void nextView();
       
   107     // Deprecated
       
   108     void previousView();
       
   109 
       
   110     void broadcastEvent( int eventType );
    79     void broadcastEvent( int eventType );
   111 
    80 
   112 signals:
    81 signals:
   113     // deprecated
       
   114     void currentViewIndexChanged(int index);
       
   115 
       
   116     void viewReady();
    82     void viewReady();
   117     void aboutToChangeView(HbView *oldView, HbView *newView);
    83     void aboutToChangeView(HbView *oldView, HbView *newView);
   118     void currentViewChanged(HbView *view);
    84     void currentViewChanged(HbView *view);
   119     void aboutToChangeOrientation();
    85     void aboutToChangeOrientation();
   120     void aboutToChangeOrientation(Qt::Orientation newOrientation, bool animated);
    86     void aboutToChangeOrientation(Qt::Orientation newOrientation, bool animated);
   136     Q_DISABLE_COPY(HbMainWindow)
   102     Q_DISABLE_COPY(HbMainWindow)
   137     Q_DECLARE_PRIVATE_D(d_ptr, HbMainWindow)
   103     Q_DECLARE_PRIVATE_D(d_ptr, HbMainWindow)
   138     Q_PRIVATE_SLOT(d_func(), void rootItemFirstPhaseDone(const HbEffect::EffectStatus& status))
   104     Q_PRIVATE_SLOT(d_func(), void rootItemFirstPhaseDone(const HbEffect::EffectStatus& status))
   139     Q_PRIVATE_SLOT(d_func(), void rootItemFinalPhaseDone(const HbEffect::EffectStatus& status))
   105     Q_PRIVATE_SLOT(d_func(), void rootItemFinalPhaseDone(const HbEffect::EffectStatus& status))
   140     Q_PRIVATE_SLOT(d_func(), void orientationEffectFinished(const HbEffect::EffectStatus& status))
   106     Q_PRIVATE_SLOT(d_func(), void orientationEffectFinished(const HbEffect::EffectStatus& status))
   141     Q_PRIVATE_SLOT(d_func(), void _q_viewChanged(int))
   107     Q_PRIVATE_SLOT(d_func(), void _q_viewChanged())
   142     Q_PRIVATE_SLOT(d_func(), void _q_viewRemoved(QGraphicsWidget *))
   108     Q_PRIVATE_SLOT(d_func(), void _q_viewRemoved(QGraphicsWidget *))
   143     Q_PRIVATE_SLOT(d_func(), void _q_viewTitleChanged(const QString &))
   109     Q_PRIVATE_SLOT(d_func(), void _q_viewTitleChanged(const QString &))
   144     Q_PRIVATE_SLOT(d_func(), void _q_viewToolBarChanged())
   110     Q_PRIVATE_SLOT(d_func(), void _q_viewToolBarChanged())
   145     Q_PRIVATE_SLOT(d_func(), void _q_viewDockWidgetChanged())
   111     Q_PRIVATE_SLOT(d_func(), void _q_viewDockWidgetChanged())
   146     Q_PRIVATE_SLOT(d_func(), void _q_launchMenu(const QPointF &))
   112     Q_PRIVATE_SLOT(d_func(), void _q_launchMenu(const QPointF &))