src/hbwidgets/devicedialogs/hbdevicenotificationdialog.h
changeset 0 16d8024aca5e
equal deleted inserted replaced
-1:000000000000 0:16d8024aca5e
       
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
       
     4 ** All rights reserved.
       
     5 ** Contact: Nokia Corporation (developer.feedback@nokia.com)
       
     6 **
       
     7 ** This file is part of the HbWidgets module of the UI Extensions for Mobile.
       
     8 **
       
     9 ** GNU Lesser General Public License Usage
       
    10 ** This file may be used under the terms of the GNU Lesser General Public
       
    11 ** License version 2.1 as published by the Free Software Foundation and
       
    12 ** appearing in the file LICENSE.LGPL included in the packaging of this file.
       
    13 ** Please review the following information to ensure the GNU Lesser General
       
    14 ** Public License version 2.1 requirements will be met:
       
    15 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    16 **
       
    17 ** In addition, as a special exception, Nokia gives you certain additional
       
    18 ** rights.  These rights are described in the Nokia Qt LGPL Exception
       
    19 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
       
    20 **
       
    21 ** If you have questions regarding the use of this file, please contact
       
    22 ** Nokia at developer.feedback@nokia.com.
       
    23 **
       
    24 ****************************************************************************/
       
    25 #ifndef HBDEVICENOTIFICATIONDIALOG_H
       
    26 #define HBDEVICENOTIFICATIONDIALOG_H
       
    27 
       
    28 #include <hbglobal.h>
       
    29 
       
    30 #include <QObject>
       
    31 #include <QString>
       
    32 #include <hbicon.h>
       
    33 #include <hbnamespace.h>
       
    34 
       
    35 class HbDeviceNotificationDialogPrivate;
       
    36 
       
    37 class HB_WIDGETS_EXPORT HbDeviceNotificationDialog : public QObject
       
    38 {
       
    39     Q_OBJECT
       
    40     Q_PROPERTY(QString iconName READ iconName WRITE setIconName)
       
    41     Q_PROPERTY(QString text READ text WRITE setText)
       
    42     Q_PROPERTY(QString title READ title WRITE setTitle)
       
    43     Q_PROPERTY(Hb::TextWrapping titleTextWrapping READ titleTextWrapping WRITE setTitleTextWrapping)
       
    44     Q_PROPERTY(bool enableTouchActivation READ isTouchActivating WRITE enableTouchActivation)
       
    45     Q_PROPERTY(int timeout READ timeout WRITE setTimeout)
       
    46     Q_PROPERTY(QString animationDefinition READ animationDefinition WRITE setAnimationDefinition)
       
    47 
       
    48 public:
       
    49     explicit HbDeviceNotificationDialog(QObject *parent = 0);
       
    50     virtual ~HbDeviceNotificationDialog();
       
    51 
       
    52     static void notification(const QString &iconName, const QString &title = QString());
       
    53     static void notification(const QString &iconName, const QString &text, const QString &title);
       
    54 
       
    55     void setIconName(const QString &iconName);
       
    56     void setText(const QString &text);
       
    57     void setTitle(const QString &title);
       
    58     void enableTouchActivation(bool enable);
       
    59     void setTimeout(int timeout);
       
    60     void setTitleTextWrapping(Hb::TextWrapping wrapping);
       
    61     void setAnimationDefinition(QString &animationDefinition);
       
    62 
       
    63     QString iconName() const;
       
    64     QString text() const;
       
    65     QString title() const;
       
    66     bool isTouchActivating() const;
       
    67     int timeout() const;
       
    68     Hb::TextWrapping titleTextWrapping() const;
       
    69     QString animationDefinition() const;
       
    70 
       
    71     void show();
       
    72     void update();
       
    73     void close();
       
    74 
       
    75 signals:
       
    76     void aboutToClose();
       
    77     void activated();
       
    78 
       
    79 protected:
       
    80     HbDeviceNotificationDialogPrivate *d_ptr;
       
    81 
       
    82 private:
       
    83     Q_DECLARE_PRIVATE_D(d_ptr, HbDeviceNotificationDialog)
       
    84     Q_DISABLE_COPY(HbDeviceNotificationDialog)
       
    85 
       
    86 };
       
    87 
       
    88 #endif // HBDEVICENOTIFICATIONDIALOG_H