diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-10-09 04:29:10 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-10-09 04:29:10 (GMT) |
commit | 9b7d77460c38ec93d98fa4779826b32bea2eaaff (patch) | |
tree | df741aad025f325e0f15330887bcd82b0226b366 /examples/declarative/support/contact.cpp | |
parent | 04511e3dbbcdf40489852babbf4753e0f744c26f (diff) | |
parent | 3a0cb6ebef245780782fcab6709e471d26789590 (diff) | |
download | Qt-9b7d77460c38ec93d98fa4779826b32bea2eaaff.zip Qt-9b7d77460c38ec93d98fa4779826b32bea2eaaff.tar.gz Qt-9b7d77460c38ec93d98fa4779826b32bea2eaaff.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'examples/declarative/support/contact.cpp')
-rw-r--r-- | examples/declarative/support/contact.cpp | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/examples/declarative/support/contact.cpp b/examples/declarative/support/contact.cpp deleted file mode 100644 index 9ffeb97..0000000 --- a/examples/declarative/support/contact.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 1992-$THISYEAR$ $TROLLTECH$. All rights reserved. -** -** This file is part of the $MODULE$ of the Qt Toolkit. -** -** $TROLLTECH_DUAL_LICENSE$ -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -****************************************************************************/ - -#include "contact.h" - -QML_DEFINE_TYPE(0,0,0,0,Contact,Contact); -Contact::Contact() : QObject(0) -{ - m_firstName = "John"; - m_lastName = "Smith"; - m_portraitFile = "contact.png"; - m_company = "Trollkia"; - m_emails << "smith@trollkia.com" << "john45@gmail.com"; - - m_numbers << new PhoneNumber; - m_numbers << new PhoneNumber; - m_numbers << new PhoneNumber; - - m_numbers.at(0)->setType(PhoneNumber::HomePhone); - m_numbers.at(0)->setNumber("35412451"); - - m_numbers.at(1)->setType(PhoneNumber::BusinessPhone); - m_numbers.at(1)->setNumber("33424994"); - - m_numbers.at(2)->setType(PhoneNumber::MobilePhone); - m_numbers.at(2)->setNumber("0424655137"); - - m_addresses << new Address; - m_addresses << new Address; - m_addresses << new Address; - m_addresses.at(0)->setNumber(13); - m_addresses.at(0)->setStreet("Blackhill Cr"); - m_addresses.at(0)->setCountry("Australia"); - m_addresses.at(1)->setNumber(116); - m_addresses.at(1)->setStreet("Sandankerveien"); - m_addresses.at(1)->setCountry("Norway"); - m_addresses.at(2)->setNumber(92); - m_addresses.at(2)->setStreet("Elizibeth St"); - m_addresses.at(2)->setCountry("Australia"); -} - -void Contact::addNumber(PhoneNumber *newNumber) -{ - m_numbers << newNumber; - emit numbersChanged(); -} - -void Contact::addAddress(Address *newAddress) -{ - m_addresses << newAddress; - emit addressesChanged(); -} - -void Contact::addEmail(QString &newEmail) -{ - - m_emails << newEmail; - emit emailsChanged(); -} - -QML_DEFINE_TYPE(0,0,0,0,Address,Address); -Address::Address() -: _number(0) -{ -} - -QML_DEFINE_TYPE(0,0,0,0,PhoneNumber, PhoneNumber); -PhoneNumber::PhoneNumber() -: _type(HomePhone) -{ -} |