qtmobility/examples/notesmanagerplugin/note.h
changeset 4 90517678cc4f
child 5 453da2cfceef
equal deleted inserted replaced
1:2b40d63a9c3d 4:90517678cc4f
       
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 ** All rights reserved.
       
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
       
     6 **
       
     7 ** This file is part of the Qt Mobility Components.
       
     8 **
       
     9 ** $QT_BEGIN_LICENSE:LGPL$
       
    10 ** You may use this file in accordance with the terms and conditions
       
    11 ** contained in the Technology Preview License Agreement accompanying
       
    12 ** this package.
       
    13 **
       
    14 ** GNU Lesser General Public License Usage
       
    15 ** Alternatively, this file may be used under the terms of the GNU Lesser
       
    16 ** General Public License version 2.1 as published by the Free Software
       
    17 ** Foundation and appearing in the file LICENSE.LGPL included in the
       
    18 ** packaging of this file.  Please review the following information to
       
    19 ** ensure the GNU Lesser General Public License version 2.1 requirements
       
    20 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    21 **
       
    22 ** In addition, as a special exception, Nokia gives you certain additional
       
    23 ** rights.  These rights are described in the Nokia Qt LGPL Exception
       
    24 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
       
    25 **
       
    26 ** If you have questions regarding the use of this file, please contact
       
    27 ** Nokia at qt-info@nokia.com.
       
    28 **
       
    29 **
       
    30 **
       
    31 **
       
    32 **
       
    33 **
       
    34 **
       
    35 **
       
    36 ** $QT_END_LICENSE$
       
    37 **
       
    38 ****************************************************************************/
       
    39 
       
    40 #ifndef NOTE_H
       
    41 #define NOTE_H
       
    42 
       
    43 #include <QObject>
       
    44 #include <QDateTime>
       
    45 
       
    46 class Note : public QObject
       
    47 {
       
    48     Q_OBJECT
       
    49     Q_PROPERTY(int index READ index WRITE setIndex)
       
    50     Q_PROPERTY(QString message READ message WRITE setMessage)
       
    51     Q_PROPERTY(QDateTime alarm READ alarm WRITE setAlarm)
       
    52 
       
    53 public:
       
    54     Note(QObject *parent =0) : QObject(parent) {}
       
    55     ~Note() {}
       
    56 
       
    57 public slots:
       
    58     int index() const { return m_index; }
       
    59     void setIndex(int index) { m_index = index; }
       
    60 
       
    61     QString message() const { return m_message; }
       
    62     void setMessage(const QString &message) { m_message = message; }
       
    63 
       
    64     QDateTime alarm() const { return m_alarm; }
       
    65     void setAlarm(const QDateTime &alarm) { m_alarm = alarm; }
       
    66 
       
    67 private:
       
    68     int m_index;
       
    69     QString m_message;
       
    70     QDateTime m_alarm;
       
    71 };
       
    72 
       
    73 #endif
       
    74