-#-------------------------------------------------
-#
+# -------------------------------------------------
# Project created by QtCreator 2010-03-26T07:57:35
-#
-#-------------------------------------------------
-
+# -------------------------------------------------
TARGET = ../situare
TEMPLATE = app
-
-
SOURCES += main.cpp \
ui/mainwindow.cpp \
ui/mapviewscreen.cpp \
map/mapview.cpp \
map/mapscene.cpp \
map/maptile.cpp \
- map/mapfetcher.cpp
-
+ map/mapfetcher.cpp \
+ ui/personalinfotab.cpp
HEADERS += ui/mainwindow.h \
ui/mapviewscreen.h \
ui/listviewscreen.h \
map/mapscene.h \
map/maptile.h \
map/mapfetcher.h \
- common.h
-
+ common.h \
+ ui/personalinfotab.h
QT += network \
- webkit
+ webkit
# -----------------------------------------------------------------
-# Debian packetizing additions
+# Debian packetizing additions
# -----------------------------------------------------------------
-unix {
-#VARIABLES
- isEmpty(PREFIX) {
- PREFIX = /usr
- }
-BINDIR = $$PREFIX/bin
-DATADIR =$$PREFIX/share
-
-DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"
-
-#MAKE INSTALL
-
-desktop.path = $$DATADIR/applications/hildon
-desktop.files += situare.desktop
-INSTALLS += desktop
-
-icon26.path = $$DATADIR/icons/hicolor/26x26/apps
-icon26.files += situare.png
-INSTALLS += icon26
-
-target.path = $$BINDIR
-INSTALLS += target
+unix {
+ # VARIABLES
+ isEmpty(PREFIX):PREFIX = /usr
+ BINDIR = $$PREFIX/bin
+ DATADIR = $$PREFIX/share
+ DEFINES += DATADIR=\\\"$$DATADIR\\\" \
+ PKGDATADIR=\\\"$$PKGDATADIR\\\"
+
+ # MAKE INSTALL
+ desktop.path = $$DATADIR/applications/hildon
+ desktop.files += situare.desktop
+ INSTALLS += desktop
+ icon26.path = $$DATADIR/icons/hicolor/26x26/apps
+ icon26.files += situare.png
+ INSTALLS += icon26
+ target.path = $$BINDIR
+ INSTALLS += target
}
Copyright (C) 2010 Ixonos Plc. Authors:
Kaj Wallin - kaj.wallin@ixonos.com
+ Jukka Saastamoinen jukka.saastamoinen@ixonos.com
Situare is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
USA.
*/
+#include <QGraphicsScene>
+#include <QGraphicsWidget>
+#include <QGraphicsLinearLayout>
+#include <QGraphicsView>
+#include <QGraphicsProxyWidget>
+#include <QtGui/QVBoxLayout>
+#include <QStateMachine>
#include "listviewscreen.h"
+#include "personalinfotab.h"
ListViewScreen::ListViewScreen(QWidget *parent)
: QWidget(parent)
{
- QPushButton *listViewButton = new QPushButton(tr("This is listview"));
- QHBoxLayout *listViewLayout = new QHBoxLayout;
- listViewLayout->addWidget(listViewButton);
- setLayout(listViewLayout);
+
+ PersonalInfoTab *myTab = new PersonalInfoTab();
+ QGraphicsScene *scene= new QGraphicsScene();
+ QGraphicsWidget *widget = new QGraphicsWidget();
+ QGraphicsLinearLayout *linearLayout = new QGraphicsLinearLayout(widget);
+ linearLayout->setOrientation(Qt::Vertical);
+ linearLayout->addItem(myTab);
+ widget->setLayout(linearLayout);
+ scene->addItem(widget);
+
+ //States and animations
+
+ QStateMachine machine;
+ QState *state1 = new QState(&machine);
+ QState *state2 = new QState(&machine);
+ machine.setInitialState(state1);
+
+ state1->assignProperty(widget, "pos", QPointF(-140, 0));
+ state2->assignProperty(widget, "pos", QPointF(0, 0));
+
+ QAbstractTransition *t1 = state1->addTransition(myTab, SIGNAL(clicked()), state2);
+ t1->addAnimation(new QPropertyAnimation(widget, "pos"));
+
+ QAbstractTransition *t2 = state2->addTransition(myTab, SIGNAL(clicked()), state1);
+ t2->addAnimation(new QPropertyAnimation(widget, "pos"));
+
+ machine.start();
+
+
+ QGraphicsView *view = new QGraphicsView(scene);
+ QVBoxLayout *vbox = new QVBoxLayout(this);
+ vbox->addWidget(view);
+
}
--- /dev/null
+/*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Jukka Saastamoinen - jukka.saastamoinen@ixonos.com
+
+ Situare is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ version 2 as published by the Free Software Foundation.
+
+ Situare is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+*/
+
+#include "personalinfotab.h"
+#include <QtGui/QPushButton>
+#include <QtGui/QVBoxLayout>
+#include <QGraphicsProxyWidget>
+#include <QGraphicsLinearLayout>
+
+
+PersonalInfoTab::PersonalInfoTab(QGraphicsItem *parent)
+ : QGraphicsWidget(parent)
+{
+ QWidget *infoTab = new QWidget();
+ QPushButton *reloadButton = new QPushButton("Testing");
+ QVBoxLayout *vbox = new QVBoxLayout(infoTab);
+ vbox->addWidget(reloadButton);
+
+ // Need to use QGraphicsProxyWidget to enable embedding QWidgets like QPushButton etc.
+ QGraphicsProxyWidget *infoTabProxy = new QGraphicsProxyWidget();
+ infoTabProxy->setWidget(infoTab);
+ QGraphicsLinearLayout *linearVbox = new QGraphicsLinearLayout(this);
+ linearVbox->addItem(infoTabProxy);
+
+}
+
+void PersonalInfoTab::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ emit clicked();
+}
--- /dev/null
+/*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Jukka Saastamoinen - jukka.saastamoinen@ixonos.com
+
+ Situare is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ version 2 as published by the Free Software Foundation.
+
+ Situare is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+*/
+
+#ifndef PERSONALINFOTAB_H
+#define PERSONALINFOTAB_H
+
+#include <QGraphicsWidget>
+
+
+class PersonalInfoTab : public QGraphicsWidget
+{
+ Q_OBJECT
+public:
+ /**
+ * @brief Constructor
+ *
+ * @param parent Parent
+ */
+ PersonalInfoTab(QGraphicsItem *parent = 0);
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+
+Q_SIGNALS:
+ void clicked();
+};
+
+#endif // PERSONALINFOTAB_H