calendarwidgetplugin/inc/contentlayoutgesture.h
changeset 0 db1bf15cefff
equal deleted inserted replaced
-1:000000000000 0:db1bf15cefff
       
     1 /*
       
     2 * Copyright (c) 2009 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: Content layout gesture class
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CONTENTLAYOUTGESTURE_H_
       
    19 #define CONTENTLAYOUTGESTURE_H_
       
    20 
       
    21 #include <QObject>
       
    22 #include <QRectF>
       
    23 #include <QVector>
       
    24 #include <QDateTime>
       
    25 
       
    26 class QPointF;
       
    27 class HbDocumentLoader;
       
    28 class HbWidget;
       
    29 class TestContentLayoutHandler;
       
    30 
       
    31 /*!
       
    32     \class ContentLayoutGesture
       
    33     \brief Handles gestures for content layout.
       
    34 */
       
    35 
       
    36 // Class declaration
       
    37 class ContentLayoutGesture: public QObject
       
    38 {
       
    39     Q_OBJECT
       
    40     Q_PROPERTY(int testID READ testId WRITE setTestId)
       
    41 
       
    42 public:
       
    43     /*!
       
    44         \fn ContentLayoutGesture::ContentLayoutGesture(HbWidget* widget, QList<QString> parameters, QString& layout, QString& gestureType, QString& action, QObject* parent = 0)
       
    45 
       
    46         Constructor of the ContentLayoutGesture class.
       
    47         @param widget
       
    48         @param parameters
       
    49         @param layout
       
    50         @param gestureType
       
    51         @param action
       
    52         @param parent
       
    53     */
       
    54     ContentLayoutGesture(HbWidget* widget, QList<QString> parameters, QString& layout, QString& gestureType, QString& action, QObject* parent = 0);
       
    55     /*!
       
    56         \fn ContentLayoutGesture::~ContentLayoutGesture()
       
    57 
       
    58         Destructor of the ContentLayoutGesture class.
       
    59     */
       
    60     ~ContentLayoutGesture();
       
    61 
       
    62 public slots:
       
    63     /*!
       
    64         \fn void ContentLayoutGesture::onTap(QPointF& point)
       
    65 
       
    66         @param point
       
    67     */
       
    68     void onTap(QPointF& point);
       
    69     /*!
       
    70         \fn void ContentLayoutGesture::handleOk(const QVariant& var)
       
    71 
       
    72         @param var
       
    73     */
       
    74     void handleOk(const QVariant& var);
       
    75     /*!
       
    76         \fn void ContentLayoutGesture::handleError(int err, const QString& str)
       
    77 
       
    78         @param err
       
    79         @param str
       
    80     */
       
    81     void handleError(int err, const QString& str);
       
    82     /*!
       
    83         \fn void ContentLayoutGesture::updateDate(QDateTime& date)
       
    84 
       
    85         @param date
       
    86     */
       
    87     void updateDate(QDateTime& date);
       
    88     /*!
       
    89         \fn void ContentLayoutGesture::addGesture(QList<QString> parameters, QString& gestureType, QString& action)
       
    90 
       
    91         @param parameters
       
    92         @param gestureType
       
    93         @param action
       
    94     */
       
    95     void addGesture(QList<QString> parameters, QString& gestureType, QString& action);
       
    96 
       
    97 signals:
       
    98     /*!
       
    99         \fn void ContentLayoutGesture::requestError()
       
   100     */
       
   101     void requestError();
       
   102     /*!
       
   103         \fn void ContentLayoutGesture::requestComplete()
       
   104     */
       
   105     void requestComplete();
       
   106     
       
   107 private:
       
   108     /*!
       
   109         \fn void ContentLayoutGesture::assignParameters(QList<QString> parameters, QString& gestureType, QString& action)
       
   110 
       
   111         @param parameters
       
   112         @param gestureType
       
   113         @param action
       
   114     */
       
   115     void assignParameters(QList<QString> parameters, QString& gestureType, QString& action);
       
   116     /*!
       
   117         \fn void ContentLayoutGesture::launchApplication(QList<QString> parameters)
       
   118 
       
   119         @param parameters
       
   120     */
       
   121     void launchApplication(QList<QString> parameters, QList<QString> parametersType);
       
   122 	
       
   123     /*!
       
   124         \fn void ContentLayoutGesture::parseParameters( QString& gestureType )
       
   125 
       
   126         @param gestureType
       
   127     */
       
   128 	void parseParameters( QString& gestureType );
       
   129 	
       
   130 	//Test property functions
       
   131     /*! 
       
   132         \fn int ContentLayoutHandler::testId()
       
   133         
       
   134         Used to check which test needs to run.
       
   135         @return Test id
       
   136      */
       
   137     int testId();
       
   138     /*! 
       
   139         \fn void ContentLayoutHandler::setTestId(int testID)
       
   140         
       
   141         Used to set which test it needs to run.
       
   142      */
       
   143     void setTestId(int testID);
       
   144 
       
   145 private:
       
   146     QDateTime mDate;
       
   147     
       
   148     QList<QString> mTapParameters;
       
   149     QList<QString> mSwipeParameters;
       
   150     QList<QString> mPinchParameters;
       
   151     QList<QString> mPanParameters;
       
   152     QList<QString> mHighlightParameters;
       
   153     QList<QString> mTapParametersType;
       
   154     QList<QString> mSwipeParametersType;
       
   155     QList<QString> mPinchParametersType;
       
   156     QList<QString> mPanParametersType;
       
   157     QList<QString> mHighlightParametersType;
       
   158     HbWidget* mLayout;
       
   159     QString mTapAction;
       
   160     QString mSwipeAction;
       
   161     QString mPinchAction;
       
   162     QString mPanAction;
       
   163     QString mHighlightAction;
       
   164     
       
   165     //test variables
       
   166     friend class TestContentLayoutGesture;   
       
   167     int mTestID;
       
   168     int mTestResult;
       
   169 };
       
   170 
       
   171 #endif /* CONTENTLAYOUTGESTURE_H_ */