Updates
authorJukka Saastamoinen <juksa@czc6303cj1.ixonos.local>
Wed, 28 Apr 2010 06:46:58 +0000 (09:46 +0300)
committerJukka Saastamoinen <juksa@czc6303cj1.ixonos.local>
Wed, 28 Apr 2010 06:46:58 +0000 (09:46 +0300)
src/resources/refresh.png
src/ui/buttonitem.cpp
src/ui/buttonitem.h
src/ui/infotab.h
src/ui/listviewscreen.cpp
src/ui/listviewscreen.h
src/ui/situareuser.cpp
src/ui/situareuser.h

index f11efba..f19d846 100755 (executable)
Binary files a/src/resources/refresh.png and b/src/resources/refresh.png differ
index 6d449f0..f0173d6 100644 (file)
@@ -1,16 +1,34 @@
+/*
+   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 <QPainter>
 #include "buttonitem.h"
 
+
 ButtonItem::ButtonItem(QWidget *parent)
     : QPushButton(parent)
 {
 
 }
 
-ButtonItem::~ButtonItem()
-{
-
-}
-
 void ButtonItem::paintEvent(QPaintEvent *aPaintEvent)
 {
     //Look and feel settings
@@ -38,6 +56,6 @@ void ButtonItem::paintEvent(QPaintEvent *aPaintEvent)
 
 QSize ButtonItem::sizeHint() const
 {
-   return iconSize();
+   return this->iconSize();
 }
 
index 95319ac..8ad3d3c 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef BUTTONITEM_H
 #define BUTTONITEM_H
 
-#include <QtGui>
+#include <QPushButton>
 
 class ButtonItem : public QPushButton
 {
@@ -34,7 +34,6 @@ public:
     * @param parent Parent
     */
     ButtonItem(QWidget *parent = 0);
-    ~ButtonItem();
 
 /*******************************************************************************
 * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
@@ -50,15 +49,10 @@ protected:
     * @brief This function returns the preferred size of the button
     *        for the layout using it.
     *
-    * @return Size of the button
+    * @return QSize Size of the button
     */
     QSize sizeHint() const;
 
-/*******************************************************************************
-* DATA MEMBERS
-*******************************************************************************/
-private:
-    QSize size;
 };
 
 #endif // BUTTONITEM_H
index 788707f..9b44ca2 100644 (file)
@@ -114,7 +114,7 @@ private:
     QString m_time;           ///< Time when the new message was sent
     QPixmap m_avatar;         ///< User's avatar
     QWidget *widget;          ///< Parent of all widgets.
-    SituareUser *situUser;
+    SituareUser *situUser;    ///< Situare user's framed picture
 };
 
 #endif // INFOTAB_H
index 3da21bf..7594c07 100644 (file)
@@ -29,6 +29,7 @@
 #include "listviewscreen.h"
 #include "situareuser.h"
 #include <QDebug>
+#include <QGraphicsRotation>
 
 ListViewScreen::ListViewScreen(QWidget *parent)
     : QWidget(parent)
@@ -61,6 +62,10 @@ ListViewScreen::ListViewScreen(QWidget *parent)
     scene->addItem(m_arrowRight);
     m_leftSideBar->setPos(0,0);
 
+    QGraphicsRotation rotation(m_arrowRight);
+    rotation.setAxis(Qt::YAxis);
+    rotation.setOrigin(QVector3D(size().width()/2, size().height()/2, 0));
+
     QGraphicsView *view = new QGraphicsView(scene);
     view->setAlignment(Qt::AlignLeft|Qt::AlignTop);
     view->setSceneRect(0,0,7000,3000);
@@ -88,6 +93,7 @@ ListViewScreen::ListViewScreen(QWidget *parent)
     state2->assignProperty(m_slidingLeftSideBar,"pos",QPointF(376,0));
     state2->assignProperty(m_personalInfoBackGround,"pos",QPointF(0,0));
     state2->assignProperty(m_arrowRight,"pos", QPointF(385,205));
+    state2->assignProperty(m_arrowRight,"angle", 180);
 
     m_trans1 = state1->addTransition(m_slidingLeftSideBar,SIGNAL(clicked()),state2);
     m_anim1 = new QPropertyAnimation(m_widgetProxy,"pos");
@@ -104,11 +110,12 @@ ListViewScreen::ListViewScreen(QWidget *parent)
     m_anim4 = new QPropertyAnimation(m_slidingLeftSideBar,"pos");
     m_anim6 = new QPropertyAnimation(m_personalInfoBackGround,"pos");
     m_anim8 = new QPropertyAnimation(m_arrowRight,"pos");
+    m_anim9 = new QPropertyAnimation(&rotation,"angle");
     m_trans2->addAnimation(m_anim3);
     m_trans2->addAnimation(m_anim4);
     m_trans2->addAnimation(m_anim6);
     m_trans2->addAnimation(m_anim8);
-
+    m_trans2->addAnimation(m_anim9);
     machine->start();
 
     m_vbox = new QVBoxLayout(this);
@@ -142,6 +149,10 @@ ListViewScreen::~ListViewScreen()
         delete m_anim5;
     if (m_anim6)
         delete m_anim6;
+    if (m_anim7)
+        delete m_anim7;
+    if (m_anim8)
+        delete m_anim8;
     if (m_vbox)
         delete m_vbox;
 }
index f672ba1..93c07fa 100644 (file)
@@ -81,10 +81,8 @@ private:
     QPropertyAnimation *m_anim6;    ///< Animation for arrowbutton from visible to hidden
     QPropertyAnimation *m_anim7;
     QPropertyAnimation *m_anim8;
+    QPropertyAnimation *m_anim9;
     UpdateLocationDialog *m_locationDialog; ///< Message dialog
 };
 
 #endif // LISTVIEWTAB_H
-
-
-#endif // LISTVIEWTAB_H
\ No newline at end of file
index 0f23fa6..8f2c1f4 100644 (file)
@@ -1,3 +1,24 @@
+/*
+   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 "situareuser.h"
 #include <QPainter>
 #include <QDebug>
@@ -25,8 +46,7 @@ void SituareUser::paintEvent(QPaintEvent *aPaintEvent)
     QRegion maskRegion = painter.clipRegion();
 
     setMask(maskRegion);
-    //qDebug() << "Current clip region: " << painter.clipRegion();
-    qDebug() << "Current mask region: " << maskRegion.boundingRect();
+
     painter.drawPixmap(QPointF(0,0),(*(this->pixmap())));
     painter.drawPixmap(QPointF(-6,-6),(QPixmap(":/resources/profile_pic_border.png")));
     painter.restore();
index 43f0f85..792d5f6 100644 (file)
@@ -1,3 +1,24 @@
+/*
+   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 SITUAREUSER_H
 #define SITUAREUSER_H
 
@@ -14,11 +35,19 @@ protected:
     * @param aPaintEvent Pointer to paint event
     */
     void paintEvent(QPaintEvent *aPaintEvent);
+    /**
+    * @brief This function suggests layouter correct size.
+    *
+    * @return QSize Size of the label
+    */
+    QSize sizeHint() const;
 public:
+    /**
+    * @brief Constructor
+    *
+    * @param parent Parent
+    */
     SituareUser(QWidget *parent=0);
-    QSize sizeHint() const;
-private:
-    QPixmap m_p;
 };
 
 #endif // SITUAREUSER_H