#include <QStateMachine>
#include "listviewscreen.h"
#include "pixmap.h"
+#include "ui/personalinfotab.h"
+#include <QGraphicsProxyWidget>
ListViewScreen::ListViewScreen(QWidget *parent)
: QWidget(parent)
{
Pixmap *infoTab = new Pixmap(QPixmap(":/resources/personal_infotab_background.png")); //350x140 pix
- Pixmap *userPic = new Pixmap(QPixmap(":/resources/facebook_user_64.png")); //64x64 pix
- Pixmap *envelope = new Pixmap(QPixmap(":/resources/list_small.png"));
- Pixmap *compass = new Pixmap(QPixmap(":/resources/compas_small.png"));
- Pixmap *clock = new Pixmap(QPixmap(":/resources/clock_small.png"));
- Pixmap *reload = new Pixmap(QPixmap(":/resources/reload_icon.png"));
- Pixmap *reloca = new Pixmap(QPixmap(":/resources/sendPosition_icon.png"));
+ PersonalInfoTab = myTab(this);
+ // Pixmap *userPic = new Pixmap(QPixmap(":/resources/facebook_user_64.png")); //64x64 pix
+ // Pixmap *envelope = new Pixmap(QPixmap(":/resources/list_small.png"));
+ // Pixmap *compass = new Pixmap(QPixmap(":/resources/compas_small.png"));
+ // Pixmap *clock = new Pixmap(QPixmap(":/resources/clock_small.png"));
+ // Pixmap *reload = new Pixmap(QPixmap(":/resources/reload_icon.png"));
+ // Pixmap *reloca = new Pixmap(QPixmap(":/resources/sendPosition_icon.png"));
QGraphicsScene *scene= new QGraphicsScene(0,0,700,360);
scene->setBackgroundBrush(Qt::white);
scene->addItem(infoTab);
- scene->addItem(userPic);
- scene->addItem(envelope);
- scene->addItem(compass);
- scene->addItem(clock);
- scene->addItem(reload);
- scene->addItem(reloca);
+ // scene->addItem(userPic);
+ // scene->addItem(envelope);
+ // scene->addItem(compass);
+ // scene->addItem(clock);
+ // scene->addItem(reload);
+ // scene->addItem(reloca);
+ QGraphicsProxyWidget *widgetProxy = new QGraphicsProxyWidget();
+ widgetProxy->setWidget(myTab);
QGraphicsView *view = new QGraphicsView(scene);
view->setFrameStyle(0);
// State 1
state1->assignProperty(infoTab,"pos",QPointF(-330,110));
- state1->assignProperty(userPic,"pos",QPointF(-320,120));
- state1->assignProperty(envelope,"pos",QPointF(-246,165));
- state1->assignProperty(compass,"pos",QPointF(-246,190));
- state1->assignProperty(clock,"pos",QPointF(-246,220));
- state1->assignProperty(reload,"pos",QPointF(-60,120));
- state1->assignProperty(reloca,"pos",QPointF(-60,180));
+ //state1->assignProperty(userPic,"pos",QPointF(-320,120));
+ //state1->assignProperty(envelope,"pos",QPointF(-246,165));
+ //state1->assignProperty(compass,"pos",QPointF(-246,190));
+ //state1->assignProperty(clock,"pos",QPointF(-246,220));
+ //state1->assignProperty(reload,"pos",QPointF(-60,120));
+ //state1->assignProperty(reloca,"pos",QPointF(-60,180));
// State 2
state2->assignProperty(infoTab,"pos",QPointF(0,110));
- state2->assignProperty(userPic,"pos",QPointF(10,120));
- state2->assignProperty(envelope,"pos",QPointF(84,165));
- state2->assignProperty(compass,"pos",QPointF(84,190));
- state2->assignProperty(clock,"pos",QPointF(84,220));
- state2->assignProperty(reload,"pos",QPointF(290,120));
- state2->assignProperty(reloca,"pos",QPointF(290,180));
+ //state2->assignProperty(userPic,"pos",QPointF(10,120));
+ //state2->assignProperty(envelope,"pos",QPointF(84,165));
+ //state2->assignProperty(compass,"pos",QPointF(84,190));
+ //state2->assignProperty(clock,"pos",QPointF(84,220));
+ //state2->assignProperty(reload,"pos",QPointF(290,120));
+ //state2->assignProperty(reloca,"pos",QPointF(290,180));
QAbstractTransition *trans1 = state1->addTransition(infoTab,SIGNAL(clicked()),state2);
trans1->addAnimation(new QPropertyAnimation(infoTab,"pos"));
- trans1->addAnimation(new QPropertyAnimation(userPic,"pos"));
+ /*trans1->addAnimation(new QPropertyAnimation(userPic,"pos"));
trans1->addAnimation(new QPropertyAnimation(envelope,"pos"));
trans1->addAnimation(new QPropertyAnimation(compass,"pos"));
trans1->addAnimation(new QPropertyAnimation(clock,"pos"));
trans1->addAnimation(new QPropertyAnimation(reload,"pos"));
- trans1->addAnimation(new QPropertyAnimation(reloca,"pos"));
+ trans1->addAnimation(new QPropertyAnimation(reloca,"pos"));*/
QAbstractTransition *trans2 = state2->addTransition(infoTab,SIGNAL(clicked()),state1);
trans2->addAnimation(new QPropertyAnimation(infoTab,"pos"));
- trans2->addAnimation(new QPropertyAnimation(userPic,"pos"));
+ /* trans2->addAnimation(new QPropertyAnimation(userPic,"pos"));
trans2->addAnimation(new QPropertyAnimation(envelope,"pos"));
trans2->addAnimation(new QPropertyAnimation(compass,"pos"));
trans2->addAnimation(new QPropertyAnimation(clock,"pos"));
trans2->addAnimation(new QPropertyAnimation(reload,"pos"));
- trans2->addAnimation(new QPropertyAnimation(reloca,"pos"));
+ trans2->addAnimation(new QPropertyAnimation(reloca,"pos"));*/
machine->start();
--- /dev/null
+#include "personalinfotab.h"
+
+PersonalInfoTab::PersonalInfoTab(QWidget *parent)
+ : QWidget(parent)
+{
+ QGridLayout *layout = new QGridLayout(this);
+ QLabel *userPicture = new QLabel;
+ QLabel *userNameLabel = new QLabel;
+ QLabel *messageLabel = new QLabel;
+ QLabel *addressLabel = new QLabel;
+ QLabel *timeLabel = new QLabel;
+ QLabel *clockLabel = new QLabel;
+ QLabel *envelopeLabel = new QLabel;
+ QLabel *compassLabel = new QLabel;
+
+ //QPixmap pixmap(350,140);
+ //pixmap.fill(Qt::gray);
+ //QPainter painter(&pixmap);
+ //painter.setPen(Qt::black);
+
+
+ userPicture->setPixmap(QPixmap(":/resources/facebook_user_64.png"));
+ clockLabel->setPixmap(QPixmap(":/resources/clock_small.png"));
+ envelopeLabel->setPixmap(QPixmap(":/resources/list_small.png"));
+ compassLabel->setPixmap(QPixmap(":/resources/compas_small.png"));
+ layout->addWidget(userPicture,0,0,4,1);
+ layout->addWidget(userNameLabel,0,1,1,2);
+ layout->addWidget(clockLabel,1,1,1,1);
+ layout->addWidget(envelopeLabel,2,1,1,1);
+ layout->addWidget(compassLabel,3,1,1,1);
+ layout->addWidget(timeLabel,1,2,1,1);
+ layout->addWidget(messageLabel,2,2,1,1);
+ layout->addWidget(addressLabel,3,2,1,1);
+
+}
+
+void PersonalInfoTab::setUserName(const QString &username)
+{
+ userName = username;
+}
+
+void PersonalInfoTab::setMessageText(const QString &text)
+{
+ message = text;
+}
+
+void PersonalInfoTab::setAddress(const QString &address)
+{
+ this->address = address;
+}
+
+void PersonalInfoTab::setTime(const QString &time)
+{
+ this->time = time;
+}