diff options
author | Rainer Keller <rainer.keller@nokia.com> | 2011-02-04 08:43:54 +0000 |
---|---|---|
committer | Rainer Keller <rainer.keller@nokia.com> | 2011-02-04 11:26:13 +0000 |
commit | 79caf9f2e117b2437ccd04b70222847b8d4903a5 (patch) | |
tree | ff1d02cb63fac57b97167830198a9c171f4162b6 | |
parent | 8a9c8d193c27166567b28ccf2c4779ecbc9e9465 (diff) |
Remove unused files
These files are present in the remotecontrolwidget instead.
-rw-r--r-- | src/ui/locationui.cpp | 117 | ||||
-rw-r--r-- | src/ui/locationui.h | 59 |
2 files changed, 0 insertions, 176 deletions
diff --git a/src/ui/locationui.cpp b/src/ui/locationui.cpp deleted file mode 100644 index 55b624b..0000000 --- a/src/ui/locationui.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Simulator -** -** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** Commercial Usage -** -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Nokia. -** -** 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. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** -**************************************************************************/ - -#include "locationui.h" - -#include "optionsitem.h" -#include "configurationwidget.h" -#include "location.h" - -#include <location/qlocationdata_simulator_p.h> - -#include <QtGui/QLineEdit> -#include <QtGui/QDoubleValidator> -#include <QtGui/QPushButton> -#include <QtGui/QBoxLayout> -#include <QtGui/QDateTimeEdit> - -LocationUi::LocationUi(ConfigurationWidget *w, Location *location) - : QObject(w) - , mLocation(location) - , mLatitudeEdit(0) - , mLongitudeEdit(0) - , mAltitudeEdit(0) - , mTimeEdit(0) -{ - QStringList tags; - QList<OptionsItem *> optionsList; - - mLatitudeEdit = new QLineEdit("52.5056819"); - mLatitudeEdit->setValidator(new QDoubleValidator(-90, 90, 10, this)); - OptionsItem *item = new OptionsItem(tr("Latitude"), mLatitudeEdit); - connect(mLatitudeEdit, SIGNAL(editingFinished()), SLOT(triggerLocationInfoChange())); - item->setTags(tags); - optionsList << item; - - mLongitudeEdit = new QLineEdit("13.3232027"); - mLatitudeEdit->setValidator(new QDoubleValidator(-180, 180, 10, this)); - item = new OptionsItem(tr("Longitude"), mLongitudeEdit); - connect(mLongitudeEdit, SIGNAL(editingFinished()), SLOT(triggerLocationInfoChange())); - item->setTags(tags); - optionsList << item; - - mAltitudeEdit = new QLineEdit("13.3232027"); - mAltitudeEdit->setValidator(new QDoubleValidator(-15000, 15000, 10, this)); - item = new OptionsItem(tr("Altitude"), mAltitudeEdit); - connect(mAltitudeEdit, SIGNAL(editingFinished()), SLOT(triggerLocationInfoChange())); - item->setTags(tags); - optionsList << item; - - mTimeEdit = new QDateTimeEdit(); - QPushButton *locationTimeButton = new QPushButton(tr("Now")); - QHBoxLayout *hLayout = new QHBoxLayout(); - hLayout->setContentsMargins(0, 0, 0, 0); - QVBoxLayout *vLayout = new QVBoxLayout(); - vLayout->addWidget(mTimeEdit); - vLayout->addWidget(locationTimeButton); - hLayout->addLayout(vLayout); - QWidget *tmp = new QWidget(); - tmp->setLayout(hLayout); - connect(mTimeEdit, SIGNAL(dateTimeChanged(const QDateTime &)), SLOT(triggerLocationInfoChange())); - connect(locationTimeButton, SIGNAL(clicked()), this, SLOT(updateLocationTime())); - item = new OptionsItem(tr("Timestamp"), tmp); - item->setTags(tags); - optionsList << item; - connect(mLocation, SIGNAL(locationChanged(QGeoPositionInfoData)), this, SLOT(locationSetData())); - - w->addToolBoxPage(tr("Location"), optionsList); -} - -void LocationUi::triggerLocationInfoChange() -{ - mLocation->setLatitude(mLatitudeEdit->text().toDouble()); - mLocation->setLongitude(mLongitudeEdit->text().toDouble()); - mLocation->setAltitude(mAltitudeEdit->text().toDouble()); - mLocation->setDateTime(mTimeEdit->dateTime()); - mLocation->publish(); -} - -void LocationUi::updateLocationTime() -{ - mTimeEdit->setDateTime(QDateTime::currentDateTime()); -} - -void LocationUi::locationSetData() -{ - mLatitudeEdit->setText(QString::number(mLocation->latitude(), 'f', 8)); - mLongitudeEdit->setText(QString::number(mLocation->longitude(), 'f', 8)); - mAltitudeEdit->setText(QString::number(mLocation->altitude(), 'f', 8)); - mTimeEdit->setDateTime(mLocation->dateTime()); -} - diff --git a/src/ui/locationui.h b/src/ui/locationui.h deleted file mode 100644 index d241237..0000000 --- a/src/ui/locationui.h +++ /dev/null @@ -1,59 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Simulator -** -** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** Commercial Usage -** -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Nokia. -** -** 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. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** -**************************************************************************/ - -#ifndef LOCATIONUI_H -#define LOCATIONUI_H - -#include <QtCore/QObject> - -class ConfigurationWidget; -class Location; -class QLineEdit; -class QDateTimeEdit; - -class LocationUi : public QObject -{ - Q_OBJECT -public: - LocationUi(ConfigurationWidget* w, Location *location); - -private slots: - void updateLocationTime(); - void locationSetData(); - void triggerLocationInfoChange(); - -private: - Location *mLocation; - QLineEdit *mLatitudeEdit; - QLineEdit *mLongitudeEdit; - QLineEdit *mAltitudeEdit; - QDateTimeEdit *mTimeEdit; -}; - -#endif // LOCATIONUI_H |