<file>resources/clock_small.png</file>
<file>resources/arrow_left.png</file>
<file>resources/arrow_right.png</file>
+ <file>resources/list_item.png</file>
+ <file>resources/dummy_Avatar.png</file>
+ <file>resources/fb.jpg</file>
+ <file>resources/list_item_selected.png</file>
</qresource>
</RCC>
ui/pixmap.cpp \
ui/infotab.cpp \
ui/updatelocation/updatelocationdialog.cpp \
- ui/updatelocation/texteditautoresizer.cpp
+ ui/updatelocation/texteditautoresizer.cpp \
+ ui/friendlistview.cpp \
+ ui/friendlistitemdelegate.cpp \
+ ui/friendlistitem.cpp
HEADERS += ui/mainwindow.h \
ui/mapviewscreen.h \
ui/listviewscreen.h \
cookiehandler/cookiehandler.h \
facebookservice/facebookcredentials.h \
facebookservice/facebookauthentication.h \
- facebookservice/facebookcommon.h
+ facebookservice/facebookcommon.h \
+ ui/friendlistview.h \
+ ui/friendlistitemdelegate.h \
+ ui/friendlistitem.h
QT += network \
webkit
+/*
+ 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)
void InfoTab::paintEvent(QPaintEvent *aPaintEvent)
{
- //Look and feel settings
- QPalette qpalette;
- QColor myColor(Qt::black);
- myColor.setAlpha(50);
- qpalette.setColor(QPalette::Background,myColor);
- setPalette(qpalette);
- int roundness(6);
-
- QRect widgetRect = this->rect();
- QPainter painter(this);
- painter.save();
-
- painter.setRenderHint(QPainter::Antialiasing);
- QPainterPath roundedRect;
- roundedRect.addRoundedRect(1,1,widgetRect.width() - 2, widgetRect.height()-2,roundness,roundness);
-
- painter.setClipPath(roundedRect);
- QRegion maskRegion = painter.clipRegion();
-
- setMask(maskRegion);
-
- painter.fillPath(roundedRect,QBrush(myColor));
- painter.restore();
+// //Look and feel settings
+// QPalette qpalette;
+// QColor myColor(Qt::black);
+// myColor.setAlpha(50);
+// qpalette.setColor(QPalette::Background,myColor);
+// setPalette(qpalette);
+// int roundness(6);
+//
+// QRect widgetRect = this->rect();
+// QPainter painter(this);
+// painter.save();
+//
+// painter.setRenderHint(QPainter::Antialiasing);
+// QPainterPath roundedRect;
+// roundedRect.addRoundedRect(1,1,widgetRect.width() - 2, widgetRect.height()-2,roundness,roundness);
+//
+// painter.setClipPath(roundedRect);
+// QRegion maskRegion = painter.clipRegion();
+//
+// setMask(maskRegion);
+//
+// painter.fillPath(roundedRect,QBrush(myColor));
+// painter.restore();
}
void InfoTab::setAvatar(const QPixmap &avat)
#include "listviewscreen.h"
#include <QDebug>
+#include "friendlistitemdelegate.h"
+#include "friendlistview.h"
+
ListViewScreen::ListViewScreen(QWidget *parent)
: QWidget(parent)
{
+ //DEBUG
+ FriendListView *friendListView = new FriendListView(this);
+ friendListView->setItemDelegate(new FriendListItemDelegate());
+ QListWidgetItem *item1 = new QListWidgetItem();
+ item1->setData(Qt::DisplayRole, "Nimi");
+ item1->setData(Qt::UserRole +1, "Sijainti");
+ item1->setData(Qt::DecorationRole, QPixmap(":/resources/dummy_Avatar.png"));
+ QListWidgetItem *item2 = new QListWidgetItem();
+ item2->setData(Qt::DisplayRole, "Nimi2");
+ item2->setData(Qt::UserRole +1, "Sijainti");
+ item2->setData(Qt::DecorationRole, QPixmap(":/resources/dummy_Avatar.png"));
+ QListWidgetItem *item3 = new QListWidgetItem();
+ item3->setData(Qt::DisplayRole, "Nimi3");
+ item3->setData(Qt::UserRole +1, "Sijainti");
+ item3->setData(Qt::DecorationRole, QPixmap(":/resources/dummy_Avatar.png"));
+ QListWidgetItem *item4 = new QListWidgetItem();
+ item4->setData(Qt::DisplayRole, "Nimi4");
+ item4->setData(Qt::UserRole +1, "Sijainti");
+ item4->setData(Qt::DecorationRole, QPixmap(":/resources/dummy_Avatar.png"));
+ QListWidgetItem *item5 = new QListWidgetItem();
+ item5->setData(Qt::DisplayRole, "Nimi5");
+ item5->setData(Qt::UserRole +1, "Sijainti");
+ item5->setData(Qt::DecorationRole, QPixmap(":/resources/dummy_Avatar.png"));
+ friendListView->addItem(item1);
+ friendListView->addItem(item2);
+ friendListView->addItem(item3);
+ friendListView->addItem(item4);
+ friendListView->addItem(item5);
+ //DEBUG
m_arrowbutton = new Pixmap(QPixmap(":/resources/arrow_right.png"));
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);
+ //DEBUG
m_vbox->setMargin(0);
connect(m_personalInfo,SIGNAL(launchMessageUpdate()),this,SLOT(updateMessage()));
* DATA MEMBERS
******************************************************************************/
private:
- QVBoxLayout *m_vbox; ///< Holds the graphics view
+ QHBoxLayout *m_vbox; ///< Holds the graphics view
InfoTab *m_personalInfo; ///< Personal info tab
Pixmap *m_arrowbutton; ///< Button which reveals/hides the info tab when pressed
QGraphicsProxyWidget *m_widgetProxy; ///< Embeds InfoTab to graphics view
USA.
*/
+#include <QGraphicsScene>
+#include <QGraphicsView>
+#include <QGraphicsWidget>
+#include <QtGui/QVBoxLayout>
+#include <QGraphicsProxyWidget>
#include <QtGui>
#include "mainwindow.h"
#include "listviewscreen.h"
m_situareViews = new QStackedWidget;
m_situareViews->addWidget(new ListViewScreen);
m_situareViews->addWidget(new MapViewScreen);
+
}
void MainWindow::toListView()