summaryrefslogtreecommitdiffstats
path: root/library/components/locationui.cpp
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2010-02-26 11:32:16 +0100
committerChristian Kamm <christian.d.kamm@nokia.com>2010-02-26 11:32:16 +0100
commitcef2b1fee913b50167ba26598dcfc7124cc98185 (patch)
tree6f2e525e776c86c12741ff586b63e111176e2739 /library/components/locationui.cpp
parent3a11db5d90e1c79d6e8fe47afda3b96cd7d8406b (diff)
Improve separation of ToolBoxPages and the RCW.
Instead of adding themselves to the RCW in the constructor, just initialize the page there and count on the user to add the page when needed.
Diffstat (limited to 'library/components/locationui.cpp')
-rw-r--r--library/components/locationui.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/library/components/locationui.cpp b/library/components/locationui.cpp
index 4d1f6ff..b0a08e7 100644
--- a/library/components/locationui.cpp
+++ b/library/components/locationui.cpp
@@ -1,7 +1,7 @@
#include "locationui.h"
#include "optionsitem.h"
-#include "remotecontrolwidget.h"
+#include "toolbox.h"
#include <QtGui/QLineEdit>
#include <QtGui/QDoubleValidator>
@@ -9,8 +9,8 @@
#include <QtGui/QBoxLayout>
#include <QtGui/QDateTimeEdit>
-LocationUi::LocationUi(RemoteControlWidget *w)
- : QObject(w)
+LocationUi::LocationUi(QWidget *parent)
+ : ToolBoxPage(parent)
, mLatitudeEdit(0)
, mLongitudeEdit(0)
, mAltitudeEdit(0)
@@ -56,7 +56,8 @@ LocationUi::LocationUi(RemoteControlWidget *w)
item->setTags(tags);
optionsList << item;
- w->addToolBoxPage(tr("Location"), optionsList);
+ setOptions(optionsList);
+ setTitle(tr("Location"));
}
void LocationUi::updateLocationTime()