diff -r 2e2dc3d30ca8 -r 341166945d65 screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrindicatorwidget/inc/snsrindicatorwidget.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrindicatorwidget/inc/snsrindicatorwidget.h Fri Jun 25 19:19:22 2010 +0300 @@ -0,0 +1,72 @@ +/* +* 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: Indicator Widget. +* +*/ + +#ifndef SNSRINDICATORWIDGET_H +#define SNSRINDICATORWIDGET_H + +#include +#include "snsrtest_global.h" + +SCREENSAVER_TEST_CLASS(T_SnsrIndicatorWidget) + +class HbIconItem; +class SnsrIndicatorInfo; + + +class SnsrIndicatorWidget: public HbWidget +{ + Q_OBJECT + + Q_ENUMS(IndicatorLayoutType) + Q_PROPERTY(IndicatorLayoutType layoutType READ layoutType WRITE setLayoutType) + +public: + + enum IndicatorLayoutType + { + IndicatorsAlignedLeft, + IndicatorsCentered + }; + +public: + + explicit SnsrIndicatorWidget(QGraphicsItem *parent = 0); + virtual ~SnsrIndicatorWidget(); + + IndicatorLayoutType layoutType() const; + void setLayoutType(IndicatorLayoutType type); + +public slots: + + void showIndicators(const QList &indicators); + void removeAllIndicators(); + +private: + + virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const; + void createPrimitives(); + +private: + + QList mIcons; + IndicatorLayoutType mLayoutType; + + Q_DISABLE_COPY(SnsrIndicatorWidget) + SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrIndicatorWidget) +}; + +#endif // SNSRINDICATORWIDGET_H