Mywebwidget3/mytoolbar.h
changeset 2 fa1a8300ce01
equal deleted inserted replaced
1:3e3364c5ae1c 2:fa1a8300ce01
       
     1 /*
       
     2 * Copyright (c) 2010 Symbian Foundation.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "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 * Symbian Foundation - Initial contribution
       
    11 *
       
    12 * Description:
       
    13 * Declaration of the MyToolBar class.
       
    14 */
       
    15 
       
    16 #ifndef MYTOOLBAR_H
       
    17 #define MYTOOLBAR_H
       
    18 
       
    19 #include <qmobilityglobal.h>
       
    20 #include <QtGui/QWidget>
       
    21 
       
    22 QTM_BEGIN_NAMESPACE
       
    23 class QGeoPositionInfo;
       
    24 class QGeoPositionInfoSource;
       
    25 QTM_END_NAMESPACE
       
    26 
       
    27 QTM_USE_NAMESPACE
       
    28 
       
    29 class QHBoxLayout;
       
    30 class QPushButton;
       
    31 class QLabel;
       
    32 
       
    33 class MyToolBar : public QWidget
       
    34 {
       
    35     Q_OBJECT
       
    36 
       
    37 public:
       
    38     MyToolBar(QWidget *parent = 0);
       
    39     ~MyToolBar();
       
    40 
       
    41 signals:
       
    42     void goBack();
       
    43     void showLocation();
       
    44 
       
    45 private slots:
       
    46     void onBackPressed();
       
    47     void onPositionUpdated(const QGeoPositionInfo& posInfo);
       
    48 
       
    49 private:
       
    50     QPushButton* m_backButton;
       
    51     QLabel* m_locationLabel;
       
    52     QHBoxLayout* m_layout;
       
    53     QGeoPositionInfoSource* m_location;
       
    54 };
       
    55 
       
    56 #endif // MYTOOLBAR_H