diff options
author | Evan Nguyen <evan.nguyen@nokia.com> | 2010-03-08 15:27:11 +1000 |
---|---|---|
committer | Evan Nguyen <evan.nguyen@nokia.com> | 2010-03-08 15:27:11 +1000 |
commit | 692090dcc8f6251595379350dab18ca97ecfe1f6 (patch) | |
tree | a279b6dfead805437f27b8bfffb4e4fe631a6d7b | |
parent | 5907a8191642e24f044f5bde1045251699c879ae (diff) |
Fixed up declarative examples and plugin
Complies with 4.7 (with QML) as well as 4.6 (without QML)
23 files changed, 69 insertions, 1680 deletions
diff --git a/examples/declarative-sfw-dialer/sfwexample/sfwexample.qml b/examples/declarative-sfw-dialer/sfwexample/sfwexample.qml index a8cb72a5b4..c2df66d048 100644 --- a/examples/declarative-sfw-dialer/sfwexample/sfwexample.qml +++ b/examples/declarative-sfw-dialer/sfwexample/sfwexample.qml @@ -125,8 +125,8 @@ Rectangle { //! [0] //! [1] - Connection { - sender: dialScreen + Connections { + target: dialScreen signal: "stateChanged()" script: { if (dialScreen.currentDialer.state == 1) { diff --git a/examples/examples.pro b/examples/examples.pro index 150c99b536..dae1ee2c50 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -8,11 +8,11 @@ contains(mobility_modules,serviceframework) { bluetoothtransferplugin \ notesmanagerplugin \ servicebrowser \ - #servicenotesmanager/sfw-notes + servicenotesmanager/sfw-notes contains(QT_CONFIG, declarative) { - SUBDIRS += servicenotesmanager/declarative-sfw-notes - #declarative-sfw-dialer + SUBDIRS += servicenotesmanager/declarative-sfw-notes \ + declarative-sfw-dialer } } diff --git a/examples/notesmanagerplugin/note.h b/examples/notesmanagerplugin/note.h index 5b0cc1f36c..514113a43e 100644 --- a/examples/notesmanagerplugin/note.h +++ b/examples/notesmanagerplugin/note.h @@ -42,7 +42,6 @@ #include <QObject> #include <QDateTime> -#include <QtDeclarative/qdeclarative.h> class Note : public QObject { @@ -71,7 +70,5 @@ private: QDateTime m_alarm; }; -QML_DECLARE_TYPE(Note) - #endif diff --git a/examples/notesmanagerplugin/notesmanager.cpp b/examples/notesmanagerplugin/notesmanager.cpp index e65c60c56d..40cbe9bd82 100644 --- a/examples/notesmanagerplugin/notesmanager.cpp +++ b/examples/notesmanagerplugin/notesmanager.cpp @@ -50,7 +50,7 @@ NotesManager::NotesManager(QObject *parent) : QObject(parent) { m_search = ""; - + QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); db.setDatabaseName("todoDB"); db.open(); @@ -121,12 +121,13 @@ void NotesManager::setSearch(const QString& search) m_search = search; } -QList<Note*> NotesManager::getNotes(const QString& search) +QList<QObject*> NotesManager::getNotes(const QString& search) { - QList<Note*> list; + m_notes.clear(); + setSearch(search); QString queryString = "SELECT * FROM todolist"; - if (search != "") queryString += " WHERE notes LIKE '%" + search + "%'"; + if (m_search != "") queryString += " WHERE notes LIKE '%" + m_search + "%'"; queryString += " ORDER BY date"; QSqlQuery query(queryString); @@ -136,14 +137,17 @@ QList<Note*> NotesManager::getNotes(const QString& search) entry->setMessage(query.value(1).toString()); entry->setAlarm(QDateTime::fromString(query.value(2).toString(), "yyyy-MM-dd HH:mm:ss")); - list << entry; + m_notes << entry; } - - return list; + + return m_notes; } -QDeclarativeListProperty<Note> NotesManager::noteSet() + +#ifdef DECLARATIVE +QDeclarativeListProperty<QObject> NotesManager::noteSet() { m_notes = getNotes(m_search); - return QDeclarativeListProperty<Note>(this, m_notes); + return QDeclarativeListProperty<QObject>(this, m_notes); } +#endif diff --git a/examples/notesmanagerplugin/notesmanager.h b/examples/notesmanagerplugin/notesmanager.h index bbf7f0aa07..484e77c385 100644 --- a/examples/notesmanagerplugin/notesmanager.h +++ b/examples/notesmanagerplugin/notesmanager.h @@ -47,6 +47,12 @@ #include <QSqlDatabase> #include <QSqlQuery> + +#ifdef DECLARATIVE +#include <QtDeclarative/qdeclarativelist.h> +#include <QtDeclarative/qdeclarative.h> +#endif + #include "note.h" class NotesManager : public QObject @@ -54,12 +60,16 @@ class NotesManager : public QObject Q_OBJECT Q_PROPERTY(QDateTime alarmTime READ getAlarmTime WRITE setAlarmTime NOTIFY soundAlarm) Q_PROPERTY(QString alarmMessage READ getAlarmMessage WRITE setAlarmMessage) - Q_PROPERTY(QDeclarativeListProperty<Note> noteSet READ noteSet) +#ifdef DECLARATIVE + Q_PROPERTY(QDeclarativeListProperty<QObject> noteSet READ noteSet) +#endif public: NotesManager(QObject *parent = 0); - Q_INVOKABLE QList<Note*> getNotes(const QString& search=QString()); - QDeclarativeListProperty<Note> noteSet(); + Q_INVOKABLE QList<QObject*> getNotes(const QString& search=QString()); +#ifdef DECLARATIVE + QDeclarativeListProperty<QObject> noteSet(); +#endif public slots: void addNote(const QString ¬e, const QDateTime &alarm); @@ -69,7 +79,7 @@ public slots: private: QDateTime m_alarmTime; QString m_alarmMessage; - QList<Note *> m_notes; + QList<QObject *> m_notes; QString m_search; QDateTime getAlarmTime() const; @@ -87,7 +97,5 @@ signals: void soundAlarm(const QDateTime &alarm); }; -QML_DECLARE_TYPE(NotesManager); - #endif diff --git a/examples/notesmanagerplugin/notesmanagerplugin.pro b/examples/notesmanagerplugin/notesmanagerplugin.pro index da038e7544..7f0d462444 100644 --- a/examples/notesmanagerplugin/notesmanagerplugin.pro +++ b/examples/notesmanagerplugin/notesmanagerplugin.pro @@ -10,6 +10,8 @@ QT += sql TARGET = serviceframework_notesmanagerplugin DESTDIR = . +contains(QT_CONFIG, declarative):DEFINES += DECLARATIVE + include(../examples.pri) CONFIG += mobility MOBILITY = serviceframework diff --git a/examples/servicenotesmanager/declarative-sfw-notes/main.cpp b/examples/servicenotesmanager/declarative-sfw-notes/main.cpp index b5bdec9f65..852157379c 100644 --- a/examples/servicenotesmanager/declarative-sfw-notes/main.cpp +++ b/examples/servicenotesmanager/declarative-sfw-notes/main.cpp @@ -53,7 +53,7 @@ int main(int argc, char* argv[]) { QML_REGISTER_TYPE(QtSFW,1,0,Service, ServiceWrapper); - QML_REGISTER_NOCREATE_TYPE(Note); + //QML_REGISTER_NOCREATE_TYPE(Note); QApplication app(argc, argv); diff --git a/examples/servicenotesmanager/declarative-sfw-notes/note.h b/examples/servicenotesmanager/declarative-sfw-notes/note.h index 1215a595b3..5653f9acda 100644 --- a/examples/servicenotesmanager/declarative-sfw-notes/note.h +++ b/examples/servicenotesmanager/declarative-sfw-notes/note.h @@ -71,7 +71,7 @@ private: QDateTime m_alarm; }; -QML_DECLARE_TYPE(Note) +//QML_DECLARE_TYPE(Note) class NoteSet : public QObject { @@ -89,7 +89,7 @@ private: QList<Note*> m_noteset; }; -QML_DECLARE_TYPE(NoteSet) +//QML_DECLARE_TYPE(NoteSet) #endif diff --git a/examples/servicenotesmanager/sfw-notes/note.h b/examples/servicenotesmanager/sfw-notes/note.h deleted file mode 100644 index 5b0cc1f36c..0000000000 --- a/examples/servicenotesmanager/sfw-notes/note.h +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef NOTE_H -#define NOTE_H - -#include <QObject> -#include <QDateTime> -#include <QtDeclarative/qdeclarative.h> - -class Note : public QObject -{ - Q_OBJECT - Q_PROPERTY(int index READ index WRITE setIndex) - Q_PROPERTY(QString message READ message WRITE setMessage) - Q_PROPERTY(QDateTime alarm READ alarm WRITE setAlarm) - -public: - Note(QObject *parent =0) : QObject(parent) {} - ~Note() {} - -public slots: - int index() const { return m_index; } - void setIndex(int index) { m_index = index; } - - QString message() const { return m_message; } - void setMessage(const QString &message) { m_message = message; } - - QDateTime alarm() const { return m_alarm; } - void setAlarm(const QDateTime &alarm) { m_alarm = alarm; } - -private: - int m_index; - QString m_message; - QDateTime m_alarm; -}; - -QML_DECLARE_TYPE(Note) - -#endif - diff --git a/examples/servicenotesmanager/sfw-notes/sfw-notes.pro b/examples/servicenotesmanager/sfw-notes/sfw-notes.pro index b57ee44b47..cff3d18f07 100644 --- a/examples/servicenotesmanager/sfw-notes/sfw-notes.pro +++ b/examples/servicenotesmanager/sfw-notes/sfw-notes.pro @@ -7,8 +7,7 @@ include(../../examples.pri) QT += gui # Input -HEADERS += note.h \ - sfwnotes.h +HEADERS += sfwnotes.h SOURCES += sfwnotes.cpp \ main.cpp @@ -32,10 +31,10 @@ unix: { } symbian { - addFiles.sources = ../../notesmanagerplugin/notesmanagerservice.xml - addFiles.path = xmldata - DEPLOYMENT += addFiles + #addFiles.sources = ../../notesmanagerplugin/notesmanagerservice.xml + #addFiles.path = xmldata + #DEPLOYMENT += addFiles - TARGET.CAPABILITY = ALL -TCB - FORMS += sfwnotes.ui #change to sfwnotes_small.ui + #TARGET.CAPABILITY = ALL -TCB + #FORMS += sfwnotes.ui #change to sfwnotes_small.ui } diff --git a/examples/servicenotesmanager/sfw-notes/sfwnotes.cpp b/examples/servicenotesmanager/sfw-notes/sfwnotes.cpp index e8dffbca22..b8fcf2589f 100644 --- a/examples/servicenotesmanager/sfw-notes/sfwnotes.cpp +++ b/examples/servicenotesmanager/sfw-notes/sfwnotes.cpp @@ -69,7 +69,7 @@ ToDoTool::~ToDoTool() void ToDoTool::soundAlarm(const QDateTime& alarm) { - QString message = notesObject->property("alarmMessage").toString(); + QString message = notesManager->property("alarmMessage").toString(); QMessageBox msgBox; msgBox.setWindowTitle("Alert"); @@ -85,17 +85,17 @@ void ToDoTool::init() filter.setServiceName("NotesManagerService"); QList<QServiceInterfaceDescriptor> list = serviceManager->findInterfaces(filter); - notesObject = mgr.loadInterface(list[0]); + notesManager = mgr.loadInterface(list[0]); - if (notesObject) - notesObject->setParent(this); + if (notesManager) + notesManager->setParent(this); { currentNote = 1; searchWord = ""; refreshList(); - QObject::connect(notesObject, SIGNAL(soundAlarm(QDateTime)), + QObject::connect(notesManager, SIGNAL(soundAlarm(QDateTime)), this, SLOT(soundAlarm(QDateTime))); } } @@ -117,8 +117,8 @@ void ToDoTool::unregisterExampleServices() void ToDoTool::refreshList() { - QMetaObject::invokeMethod(notesObject, "getNotes", - Q_RETURN_ARG(QList<Note*>, ret), + QMetaObject::invokeMethod(notesManager, "getNotes", + Q_RETURN_ARG(QList<QObject*>, ret), Q_ARG(QString, searchWord)); totalNotes = ret.size(); @@ -138,8 +138,13 @@ void ToDoTool::refreshNotes() noteLabel->setText("Click + to add a note"); } else { - dateLabel->setText(ret[currentNote-1]->alarm().toString("yyyy-MM-dd HH:mm")); - noteLabel->setText(ret[currentNote-1]->message()); + QDateTime alarm; + QMetaObject::invokeMethod(ret[currentNote-1], "alarm", Q_RETURN_ARG(QDateTime, alarm)); + dateLabel->setText(alarm.toString("yyyy-MM-dd HH:mm")); + + QString note; + QMetaObject::invokeMethod(ret[currentNote-1], "message", Q_RETURN_ARG(QString, note)); + noteLabel->setText(note); } } @@ -178,12 +183,12 @@ void ToDoTool::on_addButton_clicked() if (date.size() == 3 && time.size() == 2) { QDateTime alarm = QDateTime::fromString(note.at(1)+" "+note.at(2),"yyyy-MM-dd HH:mm"); - QMetaObject::invokeMethod(notesObject, "addNote", + QMetaObject::invokeMethod(notesManager, "addNote", Q_ARG(QString, note.at(0)), Q_ARG(QDateTime, alarm)); } } else { - QMetaObject::invokeMethod(notesObject, "addNote", + QMetaObject::invokeMethod(notesManager, "addNote", Q_ARG(QString, note.at(0)), Q_ARG(QDateTime, QDateTime::currentDateTime())); } @@ -200,9 +205,10 @@ void ToDoTool::on_deleteButton_clicked() msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); if (msgBox.exec() == QMessageBox::Ok) { - int index = ret[currentNote-1]->index(); + int index; + QMetaObject::invokeMethod(ret[currentNote-1], "index", Q_RETURN_ARG(int, index)); - QMetaObject::invokeMethod(notesObject, "removeNote", Q_ARG(int, index)); + QMetaObject::invokeMethod(notesManager, "removeNote", Q_ARG(int, index)); if (currentNote > 1) currentNote--; diff --git a/examples/servicenotesmanager/sfw-notes/sfwnotes.h b/examples/servicenotesmanager/sfw-notes/sfwnotes.h index bc90c50a2d..09f8374448 100644 --- a/examples/servicenotesmanager/sfw-notes/sfwnotes.h +++ b/examples/servicenotesmanager/sfw-notes/sfwnotes.h @@ -46,13 +46,12 @@ #include <QObject> #include <QDateTime> #include <qmobilityglobal.h> -#ifdef Q_OS_SYMBIAN -#include "ui_sfwnotes.h" -#else -#include "ui_sfwnotes.h" -#endif -#include "note.h" +//#ifdef Q_OS_SYMBIAN +//#include "ui_sfwnotes.h" +//#else +#include "ui_sfwnotes.h" +//#endif QTM_BEGIN_NAMESPACE class QServiceManager; @@ -83,9 +82,9 @@ private: void unregisterExampleServices(); QServiceManager *serviceManager; - QObject *notesObject; + QObject *notesManager; - QList<Note*> ret; + QList<QObject*> ret; QString searchWord; int currentNote; diff --git a/examples/todotool/icons/nextIcon.png b/examples/todotool/icons/nextIcon.png Binary files differdeleted file mode 100644 index cb372095d1..0000000000 --- a/examples/todotool/icons/nextIcon.png +++ /dev/null diff --git a/examples/todotool/icons/prevIcon.png b/examples/todotool/icons/prevIcon.png Binary files differdeleted file mode 100644 index ef70a4e4a4..0000000000 --- a/examples/todotool/icons/prevIcon.png +++ /dev/null diff --git a/examples/todotool/icons/searchIcon.png b/examples/todotool/icons/searchIcon.png Binary files differdeleted file mode 100644 index b1b2e83cb1..0000000000 --- a/examples/todotool/icons/searchIcon.png +++ /dev/null diff --git a/examples/todotool/icons/todotool.ui b/examples/todotool/icons/todotool.ui deleted file mode 100644 index 3c55a1dd45..0000000000 --- a/examples/todotool/icons/todotool.ui +++ /dev/null @@ -1,305 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>ToDoToolDiaog</class> - <widget class="QDialog" name="ToDoToolDiaog"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>222</width> - <height>264</height> - </rect> - </property> - <property name="windowTitle"> - <string>ToDoTool</string> - </property> - <widget class="QPushButton" name="addButton"> - <property name="geometry"> - <rect> - <x>20</x> - <y>40</y> - <width>61</width> - <height>31</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset> - <normaloff>addIcon.png</normaloff>addIcon.png</iconset> - </property> - </widget> - <widget class="QPushButton" name="deleteButton"> - <property name="geometry"> - <rect> - <x>80</x> - <y>40</y> - <width>61</width> - <height>31</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset> - <normaloff>deleteIcon.png</normaloff>deleteIcon.png</iconset> - </property> - </widget> - <widget class="QPushButton" name="searchButton"> - <property name="geometry"> - <rect> - <x>140</x> - <y>40</y> - <width>61</width> - <height>31</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset> - <normaloff>searchIcon.png</normaloff>searchIcon.png</iconset> - </property> - </widget> - <widget class="QPushButton" name="prevButton"> - <property name="geometry"> - <rect> - <x>50</x> - <y>80</y> - <width>41</width> - <height>31</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset> - <normaloff>prevIcon.png</normaloff>prevIcon.png</iconset> - </property> - </widget> - <widget class="QPushButton" name="nextButton"> - <property name="geometry"> - <rect> - <x>130</x> - <y>80</y> - <width>41</width> - <height>31</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset> - <normaloff>nextIcon.png</normaloff>nextIcon.png</iconset> - </property> - </widget> - <widget class="QLabel" name="noteLabel"> - <property name="geometry"> - <rect> - <x>90</x> - <y>80</y> - <width>41</width> - <height>31</height> - </rect> - </property> - <property name="text"> - <string>6/10</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - <widget class="QLabel" name="titleLabel"> - <property name="geometry"> - <rect> - <x>20</x> - <y>10</y> - <width>181</width> - <height>21</height> - </rect> - </property> - <property name="palette"> - <palette> - <active> - <colorrole role="WindowText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>255</blue> - </color> - </brush> - </colorrole> - <colorrole role="Text"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - </active> - <inactive> - <colorrole role="WindowText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>255</blue> - </color> - </brush> - </colorrole> - <colorrole role="Text"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - </inactive> - <disabled> - <colorrole role="WindowText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>126</red> - <green>125</green> - <blue>124</blue> - </color> - </brush> - </colorrole> - <colorrole role="Text"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>126</red> - <green>125</green> - <blue>124</blue> - </color> - </brush> - </colorrole> - </disabled> - </palette> - </property> - <property name="font"> - <font> - <family>Nimbus Roman No9 L</family> - <pointsize>24</pointsize> - <weight>75</weight> - <italic>true</italic> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string>ToDoTool</string> - </property> - <property name="textFormat"> - <enum>Qt::AutoText</enum> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - <widget class="QLabel" name="label"> - <property name="geometry"> - <rect> - <x>30</x> - <y>120</y> - <width>161</width> - <height>131</height> - </rect> - </property> - <property name="palette"> - <palette> - <active> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>255</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - </active> - <inactive> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>255</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - </inactive> - <disabled> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - </disabled> - </palette> - </property> - <property name="font"> - <font> - <family>Comic Sans MS</family> - <pointsize>18</pointsize> - <italic>true</italic> - </font> - </property> - <property name="autoFillBackground"> - <bool>true</bool> - </property> - <property name="text"> - <string>Service the car nand buy tyres</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - </widget> - <resources/> - <connections/> -</ui> diff --git a/examples/todotool/main.cpp b/examples/todotool/main.cpp deleted file mode 100644 index 6a8b341754..0000000000 --- a/examples/todotool/main.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QApplication> -#include "todotool.h" - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - ToDoTool dialog; - -#ifdef Q_OS_SYMBIAN - dialog.showMaximused(); -#else - dialog.show(); -#endif - - return app.exec(); -} - diff --git a/examples/todotool/resource.qrc b/examples/todotool/resource.qrc deleted file mode 100644 index b5f506bfe9..0000000000 --- a/examples/todotool/resource.qrc +++ /dev/null @@ -1,9 +0,0 @@ -<RCC> - <qresource prefix="icons" > - <file>icons/searchIcon.png</file> - <file>icons/nextIcon.png</file> - <file>icons/prevIcon.png</file> - <file>icons/deleteIcon.png</file> - <file>icons/addIcon.png</file> - </qresource> -</RCC> diff --git a/examples/todotool/todotool.cpp b/examples/todotool/todotool.cpp deleted file mode 100644 index cf1abdd60a..0000000000 --- a/examples/todotool/todotool.cpp +++ /dev/null @@ -1,230 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QtGui> -#include <QDebug> - -#include <qservicemanager.h> -#include <qserviceinterfacedescriptor.h> - -#include "todotool.h" - -Q_DECLARE_METATYPE(QServiceInterfaceDescriptor) - -ToDoTool::ToDoTool(QWidget *parent, Qt::WindowFlags flags) - : QWidget(parent, flags) -{ - setupUi(this); - - serviceManager = new QServiceManager(this); - - registerExampleServices(); - - setWindowTitle(tr("ToDoTool")); - - init(); -} - -ToDoTool::~ToDoTool() -{ - unregisterExampleServices(); -} - -void ToDoTool::soundAlarm(const QDateTime& alarm) -{ - QString message = notesObject->property("message").toString(); - - QMessageBox msgBox; - msgBox.setWindowTitle("Alert"); - msgBox.setText(alarm.toString() + "\n\n" + message); - msgBox.exec(); -} - -void ToDoTool::init() -{ - QServiceManager mgr; - QServiceFilter filter; - filter.setServiceName("NotesManagerService"); - QList<QServiceInterfaceDescriptor> list = serviceManager->findInterfaces(filter); - - notesObject = mgr.loadInterface(list[0]); - - if (notesObject) - notesObject->setParent(this); - - { - currentNote = 1; - searchWord = ""; - refreshList(); - - QObject::connect(notesObject, SIGNAL(soundAlarm(QDateTime)), - this, SLOT(soundAlarm(QDateTime))); - } -} - -void ToDoTool::registerExampleServices() -{ - QStringList exampleXmlFiles; - exampleXmlFiles << "notesmanagerservice.xml"; - foreach (const QString &fileName, exampleXmlFiles) { - QString path = QCoreApplication::applicationDirPath() + "/xmldata/" + fileName; - serviceManager->addService(path); - } -} - -void ToDoTool::unregisterExampleServices() -{ - serviceManager->removeService("DatabaseManagerService"); -} - -void ToDoTool::refreshList() -{ - QMetaObject::invokeMethod(notesObject, "getNotes", - Q_RETURN_ARG(QList<Note>, ret), - Q_ARG(QString, searchWord)); - - totalNotes = ret.size(); - - if (totalNotes < 1) - currentNote = 0; - - refreshNotes(); -} - -void ToDoTool::refreshNotes() -{ - countLabel->setText(QString::number(currentNote) + "/" + QString::number(totalNotes)); - - if (currentNote == 0) { - dateLabel->setText(""); - noteLabel->setText("Click + to add a note"); - } - else { - dateLabel->setText(ret[currentNote-1].alert.toString()); - noteLabel->setText(ret[currentNote-1].message); - } -} - -void ToDoTool::on_nextButton_clicked() -{ - if (currentNote < totalNotes) { - currentNote++; - refreshNotes(); - } -} - -void ToDoTool::on_prevButton_clicked() -{ - if (currentNote > 1) { - currentNote--; - refreshNotes(); - } -} - -void ToDoTool::on_addButton_clicked() -{ - // re-implement date-time input method - - bool ok; - QString newNote = QInputDialog::getText(this, tr("ToDoTool"), - tr("Add a new note + alarm of format:\nnote#yyyy-mm-dd#hh:mm"), - QLineEdit::Normal, QDir::home().dirName(), &ok); - if (ok && !newNote.isEmpty()) { - QStringList note = newNote.split(QRegExp("#")); - - if (note.size() == 3) { - - QStringList date = note.at(1).split("-"); - QStringList time = note.at(2).split(":"); - - if (date.size() == 3 && time.size() == 2) { - QDateTime alarm = QDateTime::fromString(note.at(1)+" "+note.at(2),"yyyy-MM-dd HH:mm"); - QMetaObject::invokeMethod(notesObject, "addNote", - Q_ARG(QString, note.at(0)), - Q_ARG(QDateTime, alarm)); - refreshList(); - } - } else { - QMetaObject::invokeMethod(notesObject, "addNote", - Q_ARG(QString, note.at(0)), - Q_ARG(QDateTime, QDateTime::currentDateTime())); - } - - refreshList(); - } -} - -void ToDoTool::on_deleteButton_clicked() -{ - if (currentNote != 0) { - QMessageBox msgBox; - msgBox.setWindowTitle("ToDoTool"); - msgBox.setText("Are you sure you want to remove this note item?"); - msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); - - if (msgBox.exec() == QMessageBox::Ok) { - int index = ret[currentNote-1].index; - - QMetaObject::invokeMethod(notesObject, "removeNote", Q_ARG(int, index)); - if (currentNote > 1) - currentNote--; - - refreshList(); - } - } -} - -void ToDoTool::on_searchButton_clicked() -{ - bool ok; - QString searchNote = QInputDialog::getText(this, tr("ToDoTool"), tr("Find a note:"), - QLineEdit::Normal, QDir::home().dirName(), &ok); - if (ok) { - if (searchNote.isEmpty()) - searchWord = ""; - else - searchWord = searchNote; - - currentNote = 1; - refreshList(); - } -} - diff --git a/examples/todotool/todotool.h b/examples/todotool/todotool.h deleted file mode 100644 index 183a115853..0000000000 --- a/examples/todotool/todotool.h +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef TODOTOOL_H -#define TODOTOOL_H - -#include <QWidget> -#include <QObject> -#include <QDateTime> -#include <qmobilityglobal.h> -#ifdef Q_OS_SYMBIAN -#include "ui_todotool_s60.h" -#else -#include "ui_todotool.h" -#endif - -QT_BEGIN_NAMESPACE -class QAbstractButton; -class QGroupBox; -class QListWidget; -class QListWidgetItem; -class QPushButton; -class QRadioButton; -QT_END_NAMESPACE - -QTM_BEGIN_NAMESPACE -class QServiceManager; -QTM_END_NAMESPACE - -QTM_USE_NAMESPACE - -typedef struct -{ - int index; - QString message; - QDateTime alert; -} Note; - -class ToDoTool : public QWidget, public Ui_ToDoTool -{ - Q_OBJECT -public: - ToDoTool(QWidget *parent = 0, Qt::WindowFlags flags = 0); - ~ToDoTool(); - -private slots: - void on_nextButton_clicked(); - void on_prevButton_clicked(); - void on_addButton_clicked(); - void on_deleteButton_clicked(); - void on_searchButton_clicked(); - void soundAlarm(const QDateTime &alarm); - -private: - void init(); - void refreshList(); - void refreshNotes(); - void registerExampleServices(); - void unregisterExampleServices(); - - QServiceManager *serviceManager; - QObject *notesObject; - - QList<Note> ret; - - QString searchWord; - int currentNote; - int totalNotes; - -}; - -#endif - diff --git a/examples/todotool/todotool.pro b/examples/todotool/todotool.pro deleted file mode 100644 index ce0b92a926..0000000000 --- a/examples/todotool/todotool.pro +++ /dev/null @@ -1,40 +0,0 @@ -TEMPLATE = app -TARGET = todotool -INCLUDEPATH += ../../src/serviceframework - -include(../examples.pri) - -QT += gui - -# Input -HEADERS += todotool.h -SOURCES += todotool.cpp \ - main.cpp - -CONFIG += mobility -MOBILITY = serviceframework - -RESOURCES += resource.qrc - -win32 { - FORMS += todotool.ui -} - -unix: { - linux-*: { - FORMS += todotool.ui - } - - mac: { - FORMS += todotool.ui - } -} - -symbian { - addFiles.sources = ../notesmanagerplugin/notesmanagerservice.xml - addFiles.path = xmldata - DEPLOYMENT += addFiles - - TARGET.CAPABILITY = ALL -TCB - FORMS += todotool.ui #change to todotool_s60.ui -} diff --git a/examples/todotool/todotool.ui b/examples/todotool/todotool.ui deleted file mode 100644 index c24cf9e100..0000000000 --- a/examples/todotool/todotool.ui +++ /dev/null @@ -1,398 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>ToDoTool</class> - <widget class="QWidget" name="ToDoTool"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>221</width> - <height>264</height> - </rect> - </property> - <property name="contextMenuPolicy"> - <enum>Qt::DefaultContextMenu</enum> - </property> - <property name="windowTitle"> - <string>ToDoTool</string> - </property> - <widget class="QPushButton" name="addButton"> - <property name="geometry"> - <rect> - <x>20</x> - <y>40</y> - <width>61</width> - <height>31</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="resource.qrc"> - <normaloff>:/icons/icons/addIcon.png</normaloff>:/icons/icons/addIcon.png</iconset> - </property> - </widget> - <widget class="QPushButton" name="deleteButton"> - <property name="geometry"> - <rect> - <x>80</x> - <y>40</y> - <width>61</width> - <height>31</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="resource.qrc"> - <normaloff>:/icons/icons/deleteIcon.png</normaloff>:/icons/icons/deleteIcon.png</iconset> - </property> - </widget> - <widget class="QPushButton" name="searchButton"> - <property name="geometry"> - <rect> - <x>140</x> - <y>40</y> - <width>61</width> - <height>31</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="resource.qrc"> - <normaloff>:/icons/icons/searchIcon.png</normaloff>:/icons/icons/searchIcon.png</iconset> - </property> - </widget> - <widget class="QPushButton" name="prevButton"> - <property name="geometry"> - <rect> - <x>50</x> - <y>80</y> - <width>41</width> - <height>31</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="resource.qrc"> - <normaloff>:/icons/icons/prevIcon.png</normaloff>:/icons/icons/prevIcon.png</iconset> - </property> - </widget> - <widget class="QPushButton" name="nextButton"> - <property name="geometry"> - <rect> - <x>130</x> - <y>80</y> - <width>41</width> - <height>31</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="resource.qrc"> - <normaloff>:/icons/icons/nextIcon.png</normaloff>:/icons/icons/nextIcon.png</iconset> - </property> - </widget> - <widget class="QLabel" name="countLabel"> - <property name="geometry"> - <rect> - <x>90</x> - <y>80</y> - <width>41</width> - <height>31</height> - </rect> - </property> - <property name="text"> - <string>0/0</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - <widget class="QLabel" name="titleLabel"> - <property name="geometry"> - <rect> - <x>20</x> - <y>10</y> - <width>181</width> - <height>21</height> - </rect> - </property> - <property name="palette"> - <palette> - <active> - <colorrole role="WindowText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>255</blue> - </color> - </brush> - </colorrole> - <colorrole role="Text"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - </active> - <inactive> - <colorrole role="WindowText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>255</blue> - </color> - </brush> - </colorrole> - <colorrole role="Text"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - </inactive> - <disabled> - <colorrole role="WindowText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>126</red> - <green>125</green> - <blue>124</blue> - </color> - </brush> - </colorrole> - <colorrole role="Text"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>126</red> - <green>125</green> - <blue>124</blue> - </color> - </brush> - </colorrole> - </disabled> - </palette> - </property> - <property name="font"> - <font> - <family>Nimbus Roman No9 L</family> - <pointsize>24</pointsize> - <weight>75</weight> - <italic>true</italic> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string>ToDoTool</string> - </property> - <property name="textFormat"> - <enum>Qt::AutoText</enum> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - <widget class="QLabel" name="noteLabel"> - <property name="geometry"> - <rect> - <x>30</x> - <y>140</y> - <width>161</width> - <height>111</height> - </rect> - </property> - <property name="palette"> - <palette> - <active> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>255</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - </active> - <inactive> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>255</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - </inactive> - <disabled> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - </disabled> - </palette> - </property> - <property name="font"> - <font> - <family>Comic Sans MS</family> - <pointsize>18</pointsize> - <italic>true</italic> - </font> - </property> - <property name="autoFillBackground"> - <bool>true</bool> - </property> - <property name="text"> - <string>Service the car nand buy tyres</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - <widget class="QLabel" name="dateLabel"> - <property name="geometry"> - <rect> - <x>30</x> - <y>120</y> - <width>161</width> - <height>21</height> - </rect> - </property> - <property name="palette"> - <palette> - <active> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - </active> - <inactive> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - </inactive> - <disabled> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - </disabled> - </palette> - </property> - <property name="font"> - <font> - <pointsize>10</pointsize> - </font> - </property> - <property name="autoFillBackground"> - <bool>true</bool> - </property> - <property name="text"> - <string>Jan 1, 2010 - 8:00PM </string> - </property> - <property name="alignment"> - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </widget> - <resources> - <include location="resource.qrc"/> - </resources> - <connections/> -</ui> diff --git a/examples/todotool/todotool_small.ui b/examples/todotool/todotool_small.ui deleted file mode 100644 index c24cf9e100..0000000000 --- a/examples/todotool/todotool_small.ui +++ /dev/null @@ -1,398 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>ToDoTool</class> - <widget class="QWidget" name="ToDoTool"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>221</width> - <height>264</height> - </rect> - </property> - <property name="contextMenuPolicy"> - <enum>Qt::DefaultContextMenu</enum> - </property> - <property name="windowTitle"> - <string>ToDoTool</string> - </property> - <widget class="QPushButton" name="addButton"> - <property name="geometry"> - <rect> - <x>20</x> - <y>40</y> - <width>61</width> - <height>31</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="resource.qrc"> - <normaloff>:/icons/icons/addIcon.png</normaloff>:/icons/icons/addIcon.png</iconset> - </property> - </widget> - <widget class="QPushButton" name="deleteButton"> - <property name="geometry"> - <rect> - <x>80</x> - <y>40</y> - <width>61</width> - <height>31</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="resource.qrc"> - <normaloff>:/icons/icons/deleteIcon.png</normaloff>:/icons/icons/deleteIcon.png</iconset> - </property> - </widget> - <widget class="QPushButton" name="searchButton"> - <property name="geometry"> - <rect> - <x>140</x> - <y>40</y> - <width>61</width> - <height>31</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="resource.qrc"> - <normaloff>:/icons/icons/searchIcon.png</normaloff>:/icons/icons/searchIcon.png</iconset> - </property> - </widget> - <widget class="QPushButton" name="prevButton"> - <property name="geometry"> - <rect> - <x>50</x> - <y>80</y> - <width>41</width> - <height>31</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="resource.qrc"> - <normaloff>:/icons/icons/prevIcon.png</normaloff>:/icons/icons/prevIcon.png</iconset> - </property> - </widget> - <widget class="QPushButton" name="nextButton"> - <property name="geometry"> - <rect> - <x>130</x> - <y>80</y> - <width>41</width> - <height>31</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="resource.qrc"> - <normaloff>:/icons/icons/nextIcon.png</normaloff>:/icons/icons/nextIcon.png</iconset> - </property> - </widget> - <widget class="QLabel" name="countLabel"> - <property name="geometry"> - <rect> - <x>90</x> - <y>80</y> - <width>41</width> - <height>31</height> - </rect> - </property> - <property name="text"> - <string>0/0</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - <widget class="QLabel" name="titleLabel"> - <property name="geometry"> - <rect> - <x>20</x> - <y>10</y> - <width>181</width> - <height>21</height> - </rect> - </property> - <property name="palette"> - <palette> - <active> - <colorrole role="WindowText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>255</blue> - </color> - </brush> - </colorrole> - <colorrole role="Text"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - </active> - <inactive> - <colorrole role="WindowText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>255</blue> - </color> - </brush> - </colorrole> - <colorrole role="Text"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - </inactive> - <disabled> - <colorrole role="WindowText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>126</red> - <green>125</green> - <blue>124</blue> - </color> - </brush> - </colorrole> - <colorrole role="Text"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>126</red> - <green>125</green> - <blue>124</blue> - </color> - </brush> - </colorrole> - </disabled> - </palette> - </property> - <property name="font"> - <font> - <family>Nimbus Roman No9 L</family> - <pointsize>24</pointsize> - <weight>75</weight> - <italic>true</italic> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string>ToDoTool</string> - </property> - <property name="textFormat"> - <enum>Qt::AutoText</enum> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - <widget class="QLabel" name="noteLabel"> - <property name="geometry"> - <rect> - <x>30</x> - <y>140</y> - <width>161</width> - <height>111</height> - </rect> - </property> - <property name="palette"> - <palette> - <active> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>255</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - </active> - <inactive> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>255</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - </inactive> - <disabled> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - </disabled> - </palette> - </property> - <property name="font"> - <font> - <family>Comic Sans MS</family> - <pointsize>18</pointsize> - <italic>true</italic> - </font> - </property> - <property name="autoFillBackground"> - <bool>true</bool> - </property> - <property name="text"> - <string>Service the car nand buy tyres</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - <widget class="QLabel" name="dateLabel"> - <property name="geometry"> - <rect> - <x>30</x> - <y>120</y> - <width>161</width> - <height>21</height> - </rect> - </property> - <property name="palette"> - <palette> - <active> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - </active> - <inactive> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - </inactive> - <disabled> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>127</blue> - </color> - </brush> - </colorrole> - </disabled> - </palette> - </property> - <property name="font"> - <font> - <pointsize>10</pointsize> - </font> - </property> - <property name="autoFillBackground"> - <bool>true</bool> - </property> - <property name="text"> - <string>Jan 1, 2010 - 8:00PM </string> - </property> - <property name="alignment"> - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </widget> - <resources> - <include location="resource.qrc"/> - </resources> - <connections/> -</ui> |