piprofilerui/ui/hb/inc/pimainwindow.h
branchRCL_3
changeset 13 822c625f7adc
child 21 b3cee849fa46
equal deleted inserted replaced
11:454d022d514b 13:822c625f7adc
       
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef PIPROFILERMAINWINDOW_H_
       
    19 #define PIPROFILERMAINWINDOW_H_
       
    20 
       
    21 // System includes
       
    22 #include <QObject.h>
       
    23 #include <hbmainwindow.h>
       
    24 
       
    25 // User includes
       
    26 #include "pluginattributes.h"
       
    27 
       
    28 // Forward declarations
       
    29 class PIMainView;
       
    30 class PISettingsView;
       
    31 class PIProfilerEngine;
       
    32 class HbDocumentLoader;
       
    33 class HbApplication;
       
    34 
       
    35 // Class declaration
       
    36 class PIMainWindow: public HbMainWindow
       
    37 {
       
    38 Q_OBJECT
       
    39 public:
       
    40 
       
    41     // Member functions
       
    42 
       
    43     PIMainWindow(PIProfilerEngine* engine, HbDocumentLoader &loader, HbApplication *app);
       
    44     virtual ~PIMainWindow();
       
    45 
       
    46 signals:
       
    47 
       
    48     /**
       
    49      * Signal that is emitted when back button is pressed at settings view
       
    50      */
       
    51     void returnedFromSettings();
       
    52 
       
    53 public slots:
       
    54 
       
    55     /**
       
    56      * Activates main view
       
    57      */
       
    58     void activateMainView();
       
    59 
       
    60     /**
       
    61      * Activates settings view
       
    62      */
       
    63     void activateSettingsView(int uid = 0);
       
    64 
       
    65     /**
       
    66      * method that is called when back button pressed at settings view
       
    67      */
       
    68     void settingsViewClosed();
       
    69 
       
    70     /**
       
    71      * Sets and new plugin list to all views
       
    72      */
       
    73     void setPluginList(QList<PluginAttributes> &pluginList);
       
    74 
       
    75 private:
       
    76 
       
    77     /**
       
    78      * creates and adds main view to window
       
    79      */
       
    80     void addMainView(HbDocumentLoader &loader, HbApplication *app);
       
    81 
       
    82     /**
       
    83      * creates and adds settings view to main window
       
    84      */
       
    85     void addSettingsView();
       
    86 
       
    87 private slots:
       
    88 
       
    89 private:
       
    90     // data
       
    91 
       
    92     // Engine wrapper
       
    93     PIProfilerEngine* mEngine;
       
    94 
       
    95     // Main view
       
    96     PIMainView* mMainView;
       
    97 
       
    98     // Settings view
       
    99     PISettingsView* mSettingsView;
       
   100 
       
   101     // Back Action
       
   102     HbAction *mBackAction;
       
   103 
       
   104     // plug-in attributes
       
   105     QList<PluginAttributes> mPluginAttributes;
       
   106 
       
   107 };
       
   108 
       
   109 #endif /* PIPROFILERMAINWINDOW_H_ */