# -------------------------------------------------
TARGET = ../situare
TEMPLATE = app
- RESOURCES += images.qrc
+ INCLUDEPATH += "/usr/include/qjson"
+ LIBS += "-lqjson"
+ RESOURCES += ../images.qrc
SOURCES += main.cpp \
ui/mainwindow.cpp \
ui/mapviewscreen.cpp \
ui/infotab.cpp \
ui/updatelocation/updatelocationdialog.cpp \
ui/updatelocation/texteditautoresizer.cpp \
+ ui/friendlistview.cpp \
+ ui/friendlistitemdelegate.cpp \
+ ui/friendlistitem.cpp \
- ui/friendlistmodel.cpp
++ ui/friendlistmodel.cpp \
+ user/user.cpp
HEADERS += ui/mainwindow.h \
ui/mapviewscreen.h \
ui/listviewscreen.h \
facebookservice/facebookcredentials.h \
facebookservice/facebookauthentication.h \
facebookservice/facebookcommon.h \
+ ui/friendlistview.h \
+ ui/friendlistitemdelegate.h \
+ ui/friendlistitem.h \
- ui/friendlistmodel.h
++ ui/friendlistmodel.h \
+ user/user.h
++
QT += network \
webkit
message(OpenGL built in)
message(Make sure you have OpenGL development headers installed)
message(install headers with: sudo apt-get install libgl-dev libglu-dev)
+
+ message(QJson built in)
+ message(Make sure you have QJson development headers installed)
+ message(install headers with: sudo apt-get install libqjson-dev)
+ }
+
+ maemo5 {
+ message(QJson built in)
+ message(Make sure you have QJson development headers installed)
+ message(add: deb http://repository.maemo.org/extras-devel fremantle free non-free)
+ message(and deb-src http://repository.maemo.org/extras-devel fremantle free non-free)
+ message(to scratchbox's sources.list in /etc/apt)
+ message(run: apt-get update)
+ message(install headers with: apt-get install libqjson-dev)
}
# -----------------------------------------------------------------
desktop.path = $$DATADIR/applications/hildon
desktop.files += situare.desktop
INSTALLS += desktop
- icon26.path = $$DATADIR/icons/hicolor/26x26/apps
- icon26.files += situare.png
- INSTALLS += icon26
- icon40.path = $$DATADIR/icons/hicolor/40x40/apps
- icon40.files += situare_40x40.png
- INSTALLS += icon40
+ icon48.path = $$DATADIR/icons/hicolor/48x48/apps
+ icon48.files += ../res/icon/48x48/situare.png
+ INSTALLS += icon48
icon64.path = $$DATADIR/icons/hicolor/64x64/apps
- icon64.files += situare_64x64.png
+ icon64.files += ../res/icon/64x64/situare.png
INSTALLS += icon64
target.path = $$BINDIR
INSTALLS += target
+/*
+ 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 "infotab.h"
InfoTab::InfoTab(QWidget *parent)
QToolButton *updateFriendsButton = new QToolButton;
QToolButton *updateStatusMessageButton = new QToolButton;
- updateFriendsButton->setIcon(QIcon(QPixmap(":/resources/reload_icon.png")));
- updateStatusMessageButton->setIcon(QIcon(QPixmap(":/resources/sendPosition_icon.png")));
+ updateFriendsButton->setIcon(QIcon(QPixmap(":/res/images/reload_icon.png")));
+ updateStatusMessageButton->setIcon(QIcon(QPixmap(":/res/images/sendPosition_icon.png")));
- m_clockLabel->setPixmap(QPixmap(":/resources/clock_small.png"));
- m_envelopeLabel->setPixmap(QPixmap(":/resources/list_small.png"));
- m_compassLabel->setPixmap(QPixmap(":/resources/compas_small.png"));
+ m_clockLabel->setPixmap(QPixmap(":/res/images/clock_small.png"));
+ m_envelopeLabel->setPixmap(QPixmap(":/res/images/list_small.png"));
+ m_compassLabel->setPixmap(QPixmap(":/res/images/compas_small.png"));
m_layout->addWidget(m_userPicture,0,0,4,1);
m_layout->addWidget(m_userNameLabel,0,2,1,2);
m_layout->addWidget(m_clockLabel,1,1,1,1);
#include <QtGui/QVBoxLayout>
#include <QGraphicsProxyWidget>
#include <QStateMachine>
-#include "listviewscreen.h"
+#include <QListView>
#include <QDebug>
+#include <QScrollArea>
+
+#include "listviewscreen.h"
+#include "friendlistitemdelegate.h"
+#include "friendlistview.h"
+#include "friendlistitem.h"
+#include "friendlistmodel.h"
ListViewScreen::ListViewScreen(QWidget *parent)
: QWidget(parent)
{
+ //DEBUG
+// FriendListView *friendListView = new FriendListView(this);
+// friendListView->setItemDelegate(new FriendListItemDelegate());
+
+// FriendListItem *item1 = new FriendListItem();
+// item1->setData(FriendListItem::Name, "Name 1");
+// item1->setData(FriendListItem::Updated, "2 days ago");
+// QString test = QString("Hello Maemo Situare! Hello Maemo Situare! ");
+// test.append("Hello Maemo Situare! ");
+// test.append("Hello Maemo Situare! ");
+// test.append("Hello Maemo Situare! ");
+// test.append("Hello Maemo Situare! ");
+// item1->setData(FriendListItem::StatusText, test);
+// item1->setData(FriendListItem::Location, "Kiviharjunlenkki 1E, 91910 Oulu");
+// item1->setData(FriendListItem::Image, ":/resources/dummy_Avatar.png");
+// FriendListItem *item2 = new FriendListItem();
+// item2->setData(FriendListItem::Name, "Name 2");
+// item2->setData(FriendListItem::Updated, "2 days ago");
+// item2->setData(FriendListItem::StatusText, "Hello Maemo Situare!");
+// item2->setData(FriendListItem::Location, "Kiviharjunlenkki 1E, 91910 Oulu");
+// item2->setData(FriendListItem::Image, ":/resources/dummy_Avatar.png");
+// FriendListItem *item3 = new FriendListItem();
+// item3->setData(FriendListItem::Name, "Name 3");
+// item3->setData(FriendListItem::Updated, "2 days ago");
+// item3->setData(FriendListItem::StatusText, "Hello Maemo Situare!");
+// item3->setData(FriendListItem::Location, "Kiviharjunlenkki 1E, 91910 Oulu");
+// item3->setData(FriendListItem::Image, ":/resources/dummy_Avatar.png");
+// FriendListItem *item4 = new FriendListItem();
+// item4->setData(FriendListItem::Name, "Name 4");
+// item4->setData(FriendListItem::Updated, "2 days ago");
+// item4->setData(FriendListItem::StatusText, "Hello Maemo Situare!");
+// item4->setData(FriendListItem::Location, "Kiviharjunlenkki 1E, 91910 Oulu");
+// item4->setData(FriendListItem::Image, ":/resources/dummy_Avatar.png");
+// FriendListItem *item5 = new FriendListItem();
+// item5->setData(FriendListItem::Name, "Name 5");
+// item5->setData(FriendListItem::Updated, "2 days ago");
+// item5->setData(FriendListItem::StatusText, "Hello Maemo Situare!");
+// item5->setData(FriendListItem::Location, "Kiviharjunlenkki 1E, 91910 Oulu");
+// item5->setData(FriendListItem::Image, ":/resources/dummy_Avatar.png");
+// FriendListItem *item6 = new FriendListItem();
+// item6->setData(FriendListItem::Name, "Name 6");
+// item6->setData(FriendListItem::Updated, "2 days ago");
+// item6->setData(FriendListItem::StatusText, "Hello Maemo Situare!");
+// item6->setData(FriendListItem::Location, "Kiviharjunlenkki 1E, 91910 Oulu");
+// item6->setData(FriendListItem::Image, ":/resources/dummy_Avatar.png");
+// friendListView->addItem(item1);
+// friendListView->addItem(item2);
+// friendListView->addItem(item3);
+// friendListView->addItem(item4);
+// friendListView->addItem(item5);
+// friendListView->addItem(item6);
+
+ QWidget *friendListView = new QWidget(this);
+ QVBoxLayout *friendListLayout = new QVBoxLayout(this);
+ friendListLayout->setMargin(0);
+ friendListLayout->setSpacing(0);
+ friendListView->setLayout(friendListLayout);
+ FriendListItem *item1 = new FriendListItem();
+ FriendListItem *item2 = new FriendListItem();
+ FriendListItem *item3 = new FriendListItem();
+ FriendListItem *item4 = new FriendListItem();
+ FriendListItem *item5 = new FriendListItem();
+ FriendListItem *item6 = new FriendListItem();
+
+ friendListLayout->addWidget(item1);
+ friendListLayout->addWidget(item2);
+ friendListLayout->addWidget(item3);
+ friendListLayout->addWidget(item4);
+ friendListLayout->addWidget(item5);
+ friendListLayout->addWidget(item6);
+
+ QScrollArea *friendListScroll = new QScrollArea();
+ friendListScroll->setWidget(friendListView);
+ //DEBUG
+
- m_arrowbutton = new Pixmap(QPixmap(":/resources/arrow_right.png"));
+ m_arrowbutton = new Pixmap(QPixmap(":/res/images/arrow_right.png"));
m_personalInfo = new InfoTab;
- m_personalInfo->setAvatar(QPixmap(":/resources/facebook_user_64.png"));
+ m_personalInfo->setAvatar(QPixmap(":/res/images/facebook_user_64.png"));
m_personalInfo->setUserName("Fred Facebook");
m_personalInfo->setMessageText("Hello Maemo Situare !");
m_personalInfo->setTime("1 hour ago");
view->setAlignment(Qt::AlignLeft | Qt::AlignTop);
view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ view->setBackgroundBrush(Qt::white);
+
QStateMachine *machine = new QStateMachine(this);
machine->setGlobalRestorePolicy(QStateMachine::RestoreProperties);
machine->start();
- m_vbox = new QVBoxLayout(this);
- m_vbox->addWidget(view);
+ m_vbox = new QHBoxLayout(this);
+// m_vbox->addWidget(view);
+ //DEBUG
+ //m_vbox->addWidget(friendListView);
+ m_vbox->addWidget(friendListScroll);
+ //DEBUG
m_vbox->setMargin(0);
connect(m_personalInfo,SIGNAL(launchMessageUpdate()),this,SLOT(updateMessage()));