screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrindicatorwidget/inc/snsrindicatormodel.h
changeset 97 66b5fe3c07fd
parent 95 32e56106abf2
child 98 e6f74eb7f69f
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrindicatorwidget/inc/snsrindicatormodel.h	Mon Sep 27 11:52:00 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
-* Copyright (c) 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Model for handling indicator data.
-*
-*/
-
-#ifndef SNSRINDICATORMODEL_H
-#define SNSRINDICATORMODEL_H
-
-#include <qobject.h>
-#include <XQSettingsManager>
-#include "snsrindicatorinfo.h"
-#include "snsrtest_global.h"
-
-SCREENSAVER_TEST_CLASS(T_SnsrIndicatorWidget)
-
-class HbIndicatorInterface;
-
-class SnsrIndicatorModel : public QObject
-{
-    Q_OBJECT
-
-public:
-    
-    SnsrIndicatorModel(QObject *parent = 0);
-    virtual ~SnsrIndicatorModel();
-    
-public slots:
-    
-    void handleActiveIndicators(const QList<HbIndicatorInterface*> &activeIndicators);
-    void handleActivatedIndicator(HbIndicatorInterface *activatedIndicator);
-    void handleDeactivatedIndicator(HbIndicatorInterface *deactivatedIndicator);
-    
-    void handleUpdatedIndicator();
-    
-    void initializeIndicatorWidget();
-
-    /*
-     * Provides notification of changes in online/offline mode
-     */
-    void offlineValueChanged( const XQSettingsKey &key, const QVariant &value);    
-    
-signals:
-
-    void indicatorsUpdated(const QList<SnsrIndicatorInfo> &activeIndicators);
-    void allIndicatorsDeactivated();
-
-private:
-
-    bool addIndicator(const SnsrIndicatorInfo &indicatorInfo);
-    bool isIndicatorAlreadyAdded(const SnsrIndicatorInfo &indicatorInfo) const;
-    
-    bool findAndRemoveIndicator(const SnsrIndicatorInfo &indicatorInfo);
-   
-    bool showIndicatorInScreensaver(const HbIndicatorInterface &indicatorInterface,
-                                    SnsrIndicatorInfo &indicatorInfo);
-    
-    void connectToIndicatorsUpdateSignal(const HbIndicatorInterface &indicatorInterface);
-
-    bool anyActiveIndicators() const;
-    
-    void emitChangeSignal();
-    void updateIndicatorsToShowList();
-    
-    void initializeOfflineModeIndication();
-    void getCurrentOfflineState();
- 
-private:
-    
-    bool mOfflineStateOn;
-    SnsrIndicatorInfo mOfflineIndicatorInfo;
-    XQSettingsKey *mOfflineKey;
-    XQSettingsManager *mSettingsManager;
-    
-    // Save universal indicator statuses into these 2 lists.
-    // Active notification indicators in reversed chronological order:
-    // the first item is the most recent.
-    QList<SnsrIndicatorInfo> mNotificationIndicators;
-    // Screensaver should show only silent indicator from this category.
-    QList<SnsrIndicatorInfo> mSettingIndicators;
-    
-    // This is a combined ordered list of all indicators that should
-    // be shown in UI: offline + notification indicators +
-    // settings indicators
-    QList<SnsrIndicatorInfo> mIndicatorsToShow;
-
-    Q_DISABLE_COPY(SnsrIndicatorModel)
-    SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrIndicatorWidget)
-};
-
-#endif // SNSRINDICATORMODEL_H
-