phoneapp/phoneuiview2/inc/phoneuiqtview.h
changeset 78 baacf668fe89
parent 76 cfea66083b62
--- a/phoneapp/phoneuiview2/inc/phoneuiqtview.h	Mon Oct 04 16:06:10 2010 +0300
+++ b/phoneapp/phoneuiview2/inc/phoneuiqtview.h	Fri Oct 15 12:58:46 2010 +0300
@@ -1,5 +1,5 @@
 /*!
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -22,16 +22,9 @@
 #include <hbview.h>
 #include "phoneuiqtviewif.h"
 #include <bubblemanagerif.h>
-#include <qsysteminfo.h>
 
-class BubbleManager;
 class HbAction;
-class QSignalMapper;
-class HbToolBar;
-class HbVolumeSliderPopup;
-class Dialpad;
-class XQKeyCapture;
-class DialpadKeyHandler;
+class PhoneUIQtViewPrivate;
 
 #ifdef BUILD_PHONEUIQTVIEW
 #define PHONEUIQTVIEW_EXPORT Q_DECL_EXPORT
@@ -39,7 +32,6 @@
 #define PHONEUIQTVIEW_EXPORT Q_DECL_IMPORT
 #endif
 
-using namespace QtMobility;
 
 
 class PHONEUIQTVIEW_EXPORT PhoneUIQtView : public HbView, public PhoneUIQtViewIF
@@ -51,12 +43,12 @@
     /*!
        Constructor
     */
-    PhoneUIQtView (HbMainWindow &window, QGraphicsItem *parent = 0);
+    PhoneUIQtView(HbMainWindow &window, QGraphicsItem *parent = 0);
     
     /*!
        Destructor
     */
-    virtual ~PhoneUIQtView ();
+    virtual ~PhoneUIQtView();
             
     /*!
         \fn void PhoneUIQtView::bubbleManager ()
@@ -69,16 +61,16 @@
         \fn void PhoneUIQtView::addBubbleCommand ()
         
         Adds new command to bubble. Command id will be emitted as
-        a parameter from view's command(int) signal.
+        a parameter from view's command(int) signal. Ownership transferred.
     */
-    void addBubbleCommand (int bubbleId, const PhoneAction& action);
+    void addBubbleCommand(int bubbleId, HbAction* action);
 
     /*!
         \fn void PhoneUIQtView::clearBubbleCommands ()
         
         Clears commands from bubble.
     */
-    void clearBubbleCommands (int bubbleId);
+    void clearBubbleCommands(int bubbleId);
     
     /*!
         \fn void PhoneUIQtView::addParticipantListAction ()
@@ -97,23 +89,23 @@
     /*!
         \fn void PhoneUIQtViewIF::setToolbarActions()
         
-       Sets toolbar actions.
+       Sets toolbar actions. Ownership transferred.
     */
-    void setToolbarActions(const QList<PhoneAction*>& actions);
+    void setToolbarActions(const QList<HbAction *> &actions);
     
     /*!
         \fn void PhoneUIQtView::hideToolbar ()
         
         Hides toolbar.
     */
-    void hideToolbar ();
+    void hideToolbar();
     
     /*!
         \fn void PhoneUIQtView::showToolbar ()
         
         Shows toolbar.
     */
-    void showToolbar ();
+    void showToolbar();
 
     /*!
         \fn void PhoneUIQtView::volumeSliderValue ()
@@ -121,26 +113,26 @@
         Returns HbVolumeSliderPopup's volume value.
         If this volume slider isn't active -1 is returned.
     */
-    int volumeSliderValue ();
+    int volumeSliderValue();
 
     /*!
         \fn void PhoneUIQtView::setVolumeSliderValue (int value)
         
         Sets slider value to HbVolumeSliderPopup.
     */
-    void setVolumeSliderValue (
+    void setVolumeSliderValue(
             int value,
             int commandId, 
             int maxVolumeValue, 
             int minVolumeValue);
-
+    
     /*!
-        \fn void PhoneUIQtView::removeVolumeSlider ()
+        \fn void PhoneUIQtView::removeVolumeSlider()
         
         Removes HbVolumeSliderPopup.
     */
-    void removeVolumeSlider ();
-
+    void removeVolumeSlider();
+    
     /*!
         \fn void PhoneUIQtView::setExpandAction ()
         
@@ -205,11 +197,18 @@
     void bringToForeground();
     
     /*!
+        \fn void PhoneUIQtViewIF::hide()
+        
+        Lowers the phone to the bottom of the stack.
+     */
+    void hide();
+    
+    /*!
         \fn void PhoneUIQtViewIF::setToolbarActions()
         
-       Sets menu actions for call handling.
+       Sets menu actions for call handling. Ownership transferred.
     */
-    void setMenuActions(const QList<PhoneAction*>& actions);
+    void setMenuActions(const QList<HbAction *> &actions);
     
     /*!
         \fn void PhoneUIQtView::setBackButtonVisible()
@@ -239,66 +238,12 @@
      */
     void setRestrictedMode(bool restrictedMode);
     
-public slots:
-
-    /*!
-        \fn void PhoneUIQtView::volumeSliderClosed ()
-        
-        HbVolumeSliderPopup calls this method when slider
-        is going to be closed.
-    */
-    void volumeSliderClosed ();
-    
-    /*!
-        \fn void PhoneUIQtView::volumeSliderChanged (int value)
-        
-        HbVolumeSliderPopup calls this method when it's value is changed.
-    */
-    void volumeSliderChanged(int value);
-
-    /*!
-        \fn void PhoneUIQtView::handleOrientationChange(Qt::Orientation orientation)
-        
-        HbMainWindow calls this method when orientation is changed.
-    */
-    void handleOrientationChange(Qt::Orientation orientation);
-        
-    /*!
-        \fn void PhoneUIQtView::backButtonClicked(Qt::Orientation orientation)
-        
-        HbMainWindow calls this method when back softkey is clicked.
-    */    
-    void backButtonClicked();
-    
-    /*!
-        \fn void PhoneUIQtView::onEditorContentChanged()
-        
-        Dialpad calls this method when dialpad content is changed.
-    */
-    void onEditorContentChanged();
-    
-    /*!
-        \fn void dialpadClosed()
-        
-        Dialpad calls this method when dialpad is closed.
-    */
-    void dialpadClosed();
-
     /*!
         \fn void PhoneUIQtView::shutdownPhoneApp()
         
         Shutdown phone application.
     */
     void shutdownPhoneApp();
-    
-    /*!
-        \fn void PhoneUIQtView::networkNameChanged(QSystemNetworkInfo::NetworkMode mode, const QString &netName)
-        
-        Network name change is informed via this method.
-    */
-    void networkNameChanged(QSystemNetworkInfo::NetworkMode mode, const QString &netName);
-    
-   
 signals:
 
     /*!
@@ -306,21 +251,21 @@
         
         This signal is emitted when key is pressed down.
     */
-    void keyPressed (QKeyEvent *event);
+    void keyPressed(QKeyEvent *event);
 
     /*!
         \fn void keyPressed (QKeyEvent *event)
         
         This signal is emitted when key is released.
     */
-    void keyReleased (QKeyEvent *event);
+    void keyReleased(QKeyEvent *event);
     
     /*!
         \fn void command(int command)
         
         This signal is emitted when UI action is handled.
     */
-    void command (int command);
+    void command(int command);
     
     /*!
         \fn void dialpadIsAboutToClose()
@@ -343,65 +288,15 @@
      */
     void windowDeactivated();
     
-protected:
-
+public slots:
     /*!
-        \fn void eventFilter(int command)
-        
-        Handles key events.
+        \fn void handleOrientationChange(Qt::Orientation orientation)
     */
-    bool eventFilter(QObject * watched, QEvent * event);
+    void handleOrientationChange(Qt::Orientation orientation);
     
 private:
-
-    /*!
-        \fn void setDialpadPosition(int command)
-        
-        Sets dialpad position.
-    */
-    void setDialpadPosition();
-
-    /*!
-        \fn void setActionRole()
-        
-        Sets action role.
-    */    
-    static void setActionRole(const PhoneAction& pa, HbAction& action);
-
-    /*!
-        \fn void createToolBarActions()
-        
-        Creates tool bar actions.
-    */
-    void createToolBarActions();
-    
-    /*!
-        \fn void updateMenuVisibility()
-     */
-    void updateMenuVisibility();
-    
-private:
-    HbMainWindow        &m_window;
-    BubbleManager       *m_bubbleManager;
-    QMap<int , QSignalMapper *> m_bubbleMap;
-    QMap<int , QList<HbAction *> *> m_bubbleActionMap;
-    QSignalMapper       *m_signalMapper;
-    QList<HbAction *>   m_toolbarActions;
-    HbVolumeSliderPopup *m_volumeSlider;
-    QSignalMapper       *m_expandSignalMapper;
-    QMap<int , HbAction*> m_expandActionMap;
-    QSignalMapper       *m_participantListSignalMapper;
-    QList<HbAction *>   m_participantListActions;
-    int                 m_volumeCommandId;
-    HbAction            *m_backAction;
-    Dialpad             *m_dialpad;
-    QSignalMapper       *m_menuSignalMapper;
-    XQKeyCapture        *m_keyCapture;
-    QSystemNetworkInfo  *m_networkInfo;
-    QList<Qt::Key>      m_keyCaptures;
-    DialpadKeyHandler   *m_dialpadKeyHandler;
-    bool                m_restrictedMode;
-    HbMenu              *m_optionsMenu;
+    friend class PhoneUIQtViewPrivate;
+    PhoneUIQtViewPrivate *m_priv;
 };
 
 #endif // PHONEUIQTVIEW_H