Started to modify personalinfoarea to "final" version
authorJukka Saastamoinen <juksa@czc6303cj1.ixonos.local>
Fri, 23 Apr 2010 11:45:21 +0000 (14:45 +0300)
committerJukka Saastamoinen <juksa@czc6303cj1.ixonos.local>
Fri, 23 Apr 2010 11:45:21 +0000 (14:45 +0300)
13 files changed:
src/resources/arrow_left.png
src/resources/arrow_right.png
src/resources/clock.png [new file with mode: 0755]
src/resources/compass.png [new file with mode: 0644]
src/resources/envelope.png [new file with mode: 0755]
src/resources/facebook_user_50.png [new file with mode: 0644]
src/resources/side_bar_left.png [new file with mode: 0755]
src/resources/side_bar_right.png [new file with mode: 0755]
src/resources/sliding_bar_left.png [new file with mode: 0755]
src/resources/sliding_bar_right.png [new file with mode: 0755]
src/ui/infotab.cpp
src/ui/infotab.h
src/ui/listviewscreen.cpp

index 454fbdb..2232aef 100755 (executable)
Binary files a/src/resources/arrow_left.png and b/src/resources/arrow_left.png differ
index 4a43016..42fbde4 100755 (executable)
Binary files a/src/resources/arrow_right.png and b/src/resources/arrow_right.png differ
diff --git a/src/resources/clock.png b/src/resources/clock.png
new file mode 100755 (executable)
index 0000000..4c9298e
Binary files /dev/null and b/src/resources/clock.png differ
diff --git a/src/resources/compass.png b/src/resources/compass.png
new file mode 100644 (file)
index 0000000..be58c14
Binary files /dev/null and b/src/resources/compass.png differ
diff --git a/src/resources/envelope.png b/src/resources/envelope.png
new file mode 100755 (executable)
index 0000000..64f9c74
Binary files /dev/null and b/src/resources/envelope.png differ
diff --git a/src/resources/facebook_user_50.png b/src/resources/facebook_user_50.png
new file mode 100644 (file)
index 0000000..5a41af8
Binary files /dev/null and b/src/resources/facebook_user_50.png differ
diff --git a/src/resources/side_bar_left.png b/src/resources/side_bar_left.png
new file mode 100755 (executable)
index 0000000..bdd3c22
Binary files /dev/null and b/src/resources/side_bar_left.png differ
diff --git a/src/resources/side_bar_right.png b/src/resources/side_bar_right.png
new file mode 100755 (executable)
index 0000000..a4fdbed
Binary files /dev/null and b/src/resources/side_bar_right.png differ
diff --git a/src/resources/sliding_bar_left.png b/src/resources/sliding_bar_left.png
new file mode 100755 (executable)
index 0000000..359b8ad
Binary files /dev/null and b/src/resources/sliding_bar_left.png differ
diff --git a/src/resources/sliding_bar_right.png b/src/resources/sliding_bar_right.png
new file mode 100755 (executable)
index 0000000..35f249e
Binary files /dev/null and b/src/resources/sliding_bar_right.png differ
index a3ab6a5..0bf5cb0 100644 (file)
 InfoTab::InfoTab(QWidget *parent)
     : QWidget(parent, Qt::FramelessWindowHint)
 {
-    QWidget *widget = new QWidget(this);
-    QGridLayout *layout = new QGridLayout(widget);
+    widget = new QWidget(this);
+    QVBoxLayout *verticalLayout = new QVBoxLayout(widget);
+    QVBoxLayout *verticalLayout2 = new QVBoxLayout(widget);
+    QHBoxLayout *horizontalLayout = new QHBoxLayout(widget);
+    QGridLayout *m_layout = new QGridLayout(widget);
     m_userPicture = new QLabel(widget);
+    m_userPicture->setAlignment(Qt::AlignCenter);
+    m_userPicture->setMargin(2);
     m_userNameLabel = new QLabel(widget);
     m_messageLabel = new QLabel(widget);
     m_addressLabel = new QLabel(widget);
@@ -41,20 +46,27 @@ InfoTab::InfoTab(QWidget *parent)
     updateFriendsButton->setIcon(QIcon(QPixmap(":/resources/reload_icon.png")));
     updateStatusMessageButton->setIcon(QIcon(QPixmap(":/resources/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"));
-    layout->addWidget(m_userPicture,0,0,4,1);
-    layout->addWidget(m_userNameLabel,0,2,1,2);
-    layout->addWidget(m_clockLabel,1,1,1,1);
-    layout->addWidget(m_envelopeLabel,2,1,1,1);
-    layout->addWidget(m_compassLabel,3,1,1,1);
-    layout->addWidget(m_timeLabel,1,2,1,1);
-    layout->addWidget(m_messageLabel,2,2,1,1);
-    layout->addWidget(m_addressLabel,3,2,1,1);
-    layout->addWidget(updateFriendsButton,0,3,1,1);
-    layout->addWidget(updateStatusMessageButton,2,3,1,1);
+    m_clockLabel->setPixmap(QPixmap(":/resources/clock.png"));
+    m_envelopeLabel->setPixmap(QPixmap(":/resources/envelope.png"));
+    m_compassLabel->setPixmap(QPixmap(":/resources/compass.png"));
+    m_layout->addWidget(m_userPicture,0,0,1,2);
+    m_layout->addWidget(m_userNameLabel,1,0,1,2);
+    m_layout->addWidget(m_clockLabel,3,0,1,1);
+    m_layout->addWidget(m_envelopeLabel,2,0,1,1);
+    m_layout->addWidget(m_compassLabel,4,0,1,1);
+    m_layout->addWidget(m_timeLabel,3,1,1,1);
+    m_layout->addWidget(m_messageLabel,2,1,1,1);
+    m_layout->addWidget(m_addressLabel,4,1,1,1);
 
+    verticalLayout->addLayout(m_layout);
+
+    horizontalLayout->setContentsMargins(-1,0,-1,-1);
+    horizontalLayout->addWidget(updateFriendsButton);
+    horizontalLayout->addWidget(updateStatusMessageButton);
+
+    verticalLayout->addLayout(horizontalLayout);
+
+    verticalLayout2->addLayout(verticalLayout);
     connect(updateStatusMessageButton,SIGNAL(clicked()),this,SLOT(messageUpdate()));
     connect(updateFriendsButton,SIGNAL(clicked()),this,SLOT(updateFriendsStatus()));
 }
@@ -66,6 +78,12 @@ void InfoTab::paintEvent(QPaintEvent *aPaintEvent)
     QColor myColor(Qt::black);
     myColor.setAlpha(50);
     qpalette.setColor(QPalette::Background,myColor);
+    //QBrush brush;
+    //brush.setTexture(QPixmap(":/resources/bkg_grid.png"));
+    //brush.setStyle(Qt::TexturePattern);
+    //brush.setColor(myColor);
+    qpalette.setBrush(QPalette::Window,myColor);
+    //qpalette.setBrush(QPalette::Window,brush);
     setPalette(qpalette);
     int roundness(6);
 
@@ -75,7 +93,7 @@ void InfoTab::paintEvent(QPaintEvent *aPaintEvent)
 
     painter.setRenderHint(QPainter::Antialiasing);
     QPainterPath roundedRect;
-    roundedRect.addRoundedRect(1,1,widgetRect.width() - 2, widgetRect.height()-2,roundness,roundness);
+    roundedRect.addRoundedRect(1,1,widgetRect.width()-2, widgetRect.height()-2,roundness,roundness);
 
     painter.setClipPath(roundedRect);
     QRegion maskRegion = painter.clipRegion();
index 632f7a8..350fb7a 100644 (file)
@@ -103,16 +103,17 @@ signals:
     */
     void launchUpdateFriendsStatus();
 private:
-    QLabel *m_addressLabel;   ///< Shows the Situare address icon
+    QLabel *m_userPicture;    ///< Shows the user's avatar
+    QLabel *m_userNameLabel;  ///< Shows the user's name
     QLabel *m_messageLabel;   ///< Shows the Situare message icon
+    QLabel *m_addressLabel;   ///< Shows the Situare address icon
     QLabel *m_timeLabel;      ///< Shows the Situare time icon
-    QLabel *m_userNameLabel;  ///< Shows the user's name
-    QLabel *m_userPicture;    ///< Shows the user's avatar
-    QPixmap m_avatar;         ///< User's avatar
-    QString m_address;        ///< Address from where the new message was sent.
     QString m_messageText;    ///< User's message
-    QString m_time;           ///< Time when the new message was sent
     QString m_userName;       ///< User's name
+    QString m_address;        ///< Address from where the new message was sent.
+    QString m_time;           ///< Time when the new message was sent
+    QPixmap m_avatar;         ///< User's avatar
+    QWidget *widget;
 };
 
 #endif // INFOTAB_H
index 8e62d0a..450d3db 100644 (file)
@@ -50,7 +50,7 @@ ListViewScreen::ListViewScreen(QWidget *parent)
     scene->setBackgroundBrush(Qt::white);    
     scene->addItem(m_widgetProxy);
     scene->addItem(m_arrowbutton);
-    qDebug() << "Scene width: " << scene->width();
+    qDebug() << "Infotab heigth: " << m_personalInfo->height();
     qDebug() << "Scene heigth: " << scene->height();
 
     QGraphicsView *view = new QGraphicsView(scene);
@@ -71,11 +71,11 @@ ListViewScreen::ListViewScreen(QWidget *parent)
 
     // State 1
     state1->assignProperty(m_widgetProxy,"pos",QPointF(-(m_personalInfo->width()),0));
-    state1->assignProperty(m_arrowbutton,"pos",QPointF(0,(m_personalInfo->height()/4)));
+    state1->assignProperty(m_arrowbutton,"pos",QPointF(0,(m_personalInfo->height()/4)+8));
 
     // State 2
     state2->assignProperty(m_widgetProxy,"pos",QPointF(0,0));
-    state2->assignProperty(m_arrowbutton,"pos",QPointF((m_personalInfo->width()),(m_personalInfo->height()/4)));
+    state2->assignProperty(m_arrowbutton,"pos",QPointF((m_personalInfo->width()-2),(m_personalInfo->height()/4)+8));
 
     m_trans1 = state1->addTransition(m_arrowbutton,SIGNAL(clicked()),state2);
     m_anim1 = new QPropertyAnimation(m_widgetProxy,"pos");