homescreenapp/hsdomainmodel/inc/hsdbupdatethread.h
changeset 101 ba1b7e218624
equal deleted inserted replaced
98:e6f74eb7f69f 101:ba1b7e218624
       
     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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef HSDBUPDATETHREAD_H
       
    19 #define HSDBUPDATETHREAD_H
       
    20 
       
    21 #include <QThread>
       
    22 #include <QVariantHash>
       
    23 
       
    24 #include "hsdomainmodel_global.h"
       
    25 #include "hstest_global.h"
       
    26 
       
    27 HOMESCREEN_TEST_CLASS(TestHsDomainModel)
       
    28 
       
    29 class HSDOMAINMODEL_EXPORT HsDbUpdateThread : public QThread
       
    30 {
       
    31     Q_OBJECT
       
    32     
       
    33 public:
       
    34     HsDbUpdateThread(const QString &connectionName, const QString &databaseName, QObject *parent = 0);
       
    35     ~HsDbUpdateThread();
       
    36 public:
       
    37     static HsDbUpdateThread *instance();
       
    38     static void setInstance(HsDbUpdateThread *instance);
       
    39 
       
    40 signals:
       
    41     void updateWidgetZValues(const QHash<int, qreal> &data, Qt::Orientation orientation);
       
    42 public slots:
       
    43      
       
    44     void slotUpdateWidgetZValues(const QHash<int, qreal> &data, Qt::Orientation orientation);
       
    45 
       
    46 protected:
       
    47     void run();
       
    48 
       
    49 private:    
       
    50     Q_DISABLE_COPY(HsDbUpdateThread)
       
    51 
       
    52 private:
       
    53     QString mConnectionName;
       
    54     QString mDatabaseName;
       
    55     static HsDbUpdateThread *mInstance;
       
    56     HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel)
       
    57 };
       
    58 
       
    59 #endif // HSDBUPDATETHREAD_H