Merge branch 'master' into new_info_panels
authorKaj Wallin <kaj.wallin@ixonos.com>
Tue, 18 May 2010 05:30:52 +0000 (08:30 +0300)
committerKaj Wallin <kaj.wallin@ixonos.com>
Tue, 18 May 2010 05:30:52 +0000 (08:30 +0300)
Conflicts:
images.qrc

1  2 
images.qrc
src/ui/friendlistpanel.cpp
src/ui/friendlistpanel.h
src/ui/panelsliderbar.cpp
src/ui/userpanel.cpp
src/ui/userpanel.h

diff --cc images.qrc
          <file>res/images/list_item_bottom.png</file>
          <file>res/images/list_item_middle.png</file>
          <file>res/images/list_item_top.png</file>
 +        <file>res/images/sliding_bar_left_test.png</file>
 +        <file>res/images/userpanel_mask.png</file>
 +        <file>res/images/sliding_bar_right_test.png</file>
+         <file>res/images/gps_pos_accurate.png</file>
+         <file>res/images/gps_pos_coarse.png</file>
+         <file>res/images/friend_group.png</file>
      </qresource>
  </RCC>
@@@ -35,16 -35,6 +35,16 @@@ FriendListPanel::FriendListPanel(QWidge
      m_friendsPanelVBox->setSpacing(0);
      setLayout(m_friendsPanelVBox);
  
-     QWidget *panelBase = new QWidget(this);
-     panelBase->setLayout(m_friendsPanelVBox);
-     panelBase->move(TOP_CORNER_X + SLIDINGBAR_WIDTH,PANEL_TOP_Y);
-     panelBase->resize(FRIENDPANEL_WIDTH, FRIENDPANEL_HEIGHT);
++    m_panelBase = new QWidget(this);
++    m_panelBase->setLayout(m_friendsPanelVBox);
++    m_panelBase->move(TOP_CORNER_X + SLIDINGBAR_WIDTH,PANEL_TOP_Y);
++    m_panelBase->resize(FRIENDPANEL_WIDTH, FRIENDPANEL_HEIGHT);
 +
 +    QPalette pal = palette();
 +    pal.setColor(QPalette::Background, QColor(0, 0, 0, 128));
-     panelBase->setPalette(pal);
-     panelBase->setAutoFillBackground(true);
++    m_panelBase->setPalette(pal);
++    m_panelBase->setAutoFillBackground(true);
 +
      m_friendListView = new FriendListView(this);
      QScrollArea *friendListScroll = new QScrollArea(this);
      friendListScroll->setWidgetResizable(false);
@@@ -97,10 -92,10 +97,11 @@@ void FriendListPanel::friendInfoReceive
  void FriendListPanel::reDrawFriendsPanel(int width, int height)
  {
      qDebug() << __PRETTY_FUNCTION__;
 -    resize(FRIENDPANEL_WIDTH,height + MARGIN_CORRECTION);
 +    resize(FRIENDPANEL_WIDTH + SLIDINGBAR_WIDTH,height + MARGIN_CORRECTION);
++    m_panelBase->resize(FRIENDPANEL_WIDTH, height + MARGIN_CORRECTION);
      m_friendsPanelStateClosed->assignProperty(this, "pos", QPoint(
 -            width - PANEL_PEEK_AMOUNT, PANEL_TOP_Y));
 +            width - PANEL_PEEK_AMOUNT - SLIDINGBAR_WIDTH + MARGIN_CORRECTION, PANEL_TOP_Y));
      m_friendsPanelStateOpened->assignProperty(this, "pos", QPoint(
 -            width - FRIENDPANEL_WIDTH + MARGIN_CORRECTION, PANEL_TOP_Y));
 -    move(width - PANEL_PEEK_AMOUNT, PANEL_TOP_Y);
 +            width - FRIENDPANEL_WIDTH - SLIDINGBAR_WIDTH + MARGIN_CORRECTION, PANEL_TOP_Y));
 +    move(width - PANEL_PEEK_AMOUNT - SLIDINGBAR_WIDTH + MARGIN_CORRECTION, PANEL_TOP_Y);
  }
@@@ -81,7 -81,7 +81,6 @@@ signals
   ******************************************************************************/
  private:
      FriendListView *m_friendListView; ///< Friend list view
--    QVBoxLayout *m_friendsPanelVBox; ///< Vertical layout inside the panel
      PanelSliderBar *m_friendsPanelSlidingBar; ///< Widget for sidebar tab item
  
      QStateMachine *m_friendsPanelStateMachine; ///< State machine for sliding the panel
@@@ -89,6 -89,6 +88,8 @@@
      QState *m_friendsPanelStateOpened; ///< State of the opened panel
      QSignalTransition *m_friendsPanelTransitionClose; ///< Transition signal for closing the panel
      QSignalTransition *m_friendsPanelTransitionOpen; ///< Transition signal for opening the panel
++    QVBoxLayout *m_friendsPanelVBox; ///< Vertical layout inside the panel
++    QWidget *m_panelBase; ///< Widget for panel base
  };
  
  #endif // FRIENDLISTPANEL_H
@@@ -41,7 -39,7 +41,7 @@@ PanelSliderBar::PanelSliderBar(QWidget 
      else {
          qFatal("Illegal PanelSliderBar 2nd argument");
      }
-     resize(48, SLIDINGBAR_HEIGHT);
 -    resize(SLIDINGBAR_WIDTH, SLIDINGBAR_HEIGHT);
++    resize(SLIDINGBAR_WIDTH*2, SLIDINGBAR_HEIGHT);
  }
  
  void PanelSliderBar::paintEvent(QPaintEvent *)
@@@ -27,26 -27,17 +27,24 @@@ UserInfoPanel::UserInfoPanel(QWidget *p
      : QWidget(parent)
  {
      qDebug() << __PRETTY_FUNCTION__;
 +
      m_userPanelVBox = new QVBoxLayout(this);
-     QWidget *panelBase = new QWidget(this);
-     panelBase->setLayout(m_userPanelVBox);
-     panelBase->move(TOP_CORNER_X,PANEL_TOP_Y);
-     panelBase->resize(USERPANEL_WIDTH, USERPANEL_HEIGHT);
 -    setLayout(m_userPanelVBox);
++    m_panelBase = new QWidget(this);
++    m_panelBase->setLayout(m_userPanelVBox);
++    m_panelBase->move(TOP_CORNER_X,PANEL_TOP_Y);
++    m_panelBase->resize(USERPANEL_WIDTH, USERPANEL_HEIGHT);
  
 -    setAutoFillBackground(true);
      QPalette pal = palette();
      pal.setColor(QPalette::Background, QColor(0, 0, 0, 128));
-     panelBase->setPalette(pal);
-     panelBase->setAutoFillBackground(true);
 -    setPalette(pal);
++    m_panelBase->setPalette(pal);
++    m_panelBase->setAutoFillBackground(true);
  
      PanelSliderBar *m_userPanelSlidingBar = new PanelSliderBar(this, LEFT);
      m_userPanelSlidingBar->move(USERPANEL_WIDTH - SLIDINGBAR_WIDTH, PANEL_TOP_Y);
  
++    // set mask to allow clicking zoom button at their default position
 +    setMask(QPixmap(":/res/images/userpanel_mask.png").mask());
 +
- //    setAttribute(Qt::WA_TransparentForMouseEvents, true);
- //    panelBase->setAttribute(Qt::WA_TransparentForMouseEvents, false);
      m_userPanelStateMachine = new QStateMachine(this);
      m_userPanelStateClosed = new QState(m_userPanelStateMachine);
      m_userPanelStateClosed->assignProperty(this, "pos", QPoint(
@@@ -63,6 -63,6 +63,7 @@@ public slots
  private:
      QVBoxLayout *m_userPanelVBox; ///< Vertical layout inside the panel
      PanelSliderBar *m_userPanelSlidingBar; ///< Widget for sidebar tab item
++    QWidget *m_panelBase; ///< Widget for panel base
  
      QStateMachine *m_userPanelStateMachine; ///< State machine for sliding the panel
      QState *m_userPanelStateClosed; ///< State of the closed panel