Merge branch 'new_panels' of https://vcs.maemo.org/git/situare into new_panels
authorSami Rämö <sami.ramo@ixonos.com>
Mon, 16 Aug 2010 09:02:59 +0000 (12:02 +0300)
committerSami Rämö <sami.ramo@ixonos.com>
Mon, 16 Aug 2010 09:02:59 +0000 (12:02 +0300)
Conflicts:
src/ui/panelbar.cpp
src/ui/paneltab.h
src/ui/tabbedpanel.cpp

1  2 
src/ui/panelbar.cpp
src/ui/panelcontent.h
src/ui/paneltab.cpp
src/ui/paneltab.h
src/ui/tabbedpanel.cpp
src/ui/tabbedpanel.h

@@@ -28,9 -28,7 +28,9 @@@
  
  #include "panelcommon.h"
  
- ///< @todo requires clean-up
++///< @todo requires clean-up, there is some commented code
 +
- PanelBar::PanelBar(QWidget *parent) //, Side side)
+ PanelBar::PanelBar(QWidget *parent)
      : QWidget(parent)
  {
      qDebug() << __PRETTY_FUNCTION__;
Simple merge
Simple merge
@@@ -64,6 -68,6 +68,7 @@@ protected
       */
      void mouseReleaseEvent(QMouseEvent *event);
  
++///< @todo parameter name missing (also in .cpp)
      /**
       * @brief Draws the tab button
       *
@@@ -81,13 -88,12 +89,13 @@@ public
   * DATA MEMBERS
   ******************************************************************************/
  private:
-     bool m_tabActive;
-     bool m_tabSelected;
+     bool m_tabActive;   ///< Boolean used to track whether the tab button is active or not
+     bool m_tabSelected; ///< Boolean used to track whether the tab button is selected or not
  
 +    ///< @todo magic, replace with enum?
-     QPixmap m_tabPixmaps[3];
+     QPixmap m_tabPixmaps[3];    ///< Pixmap table for tab button images
  
-     QRect m_tabRect;
+     QRect m_tabRect;            ///< Rect for the tab button
  };
  
  #endif // PANELTAB_H
@@@ -41,7 -38,6 +38,7 @@@ TabbedPanel::TabbedPanel(QWidget *paren
  {
      qDebug() << __PRETTY_FUNCTION__;
  
-     ///< @todo Do not use this, REMOVE ALL OCCURENCES!
++    ///< @todo Do not use this, REMOVE ALL OCCURENCES IN ALL FILES!
      this->resize(PANEL_BAR_TABBED_WIDTH + PANEL_WIDTH, PANEL_HEIGHT);
      this->move(PANEL_CLOSED_X, PANEL_TOP_PADDING);
  
@@@ -154,6 -139,17 +143,18 @@@ void TabbedPanel::openPanel(
          emit toggleState();
  }
  
+ void TabbedPanel::showTab(int index)
+ {
+     qDebug() << __PRETTY_FUNCTION__;
++///< @todo if ((first) && (second)) {
+     if (index < m_panelWidgetStack->count() && index >= 0) {
+         m_panelWidgetStack->setCurrentIndex(index);
+         openPanel();
+         emit currentChanged(index);
+     }
+ }
  void TabbedPanel::resizePanel(const QSize &size)
  {
      qDebug() << __PRETTY_FUNCTION__;
      this->resize(PANEL_BAR_TABBED_WIDTH + PANEL_WIDTH,
                   size.height() - PANEL_TOP_PADDING - PANEL_BOTTOM_PADDING);
  
-     if(!m_isOpen) {
 -    if(!m_isOpen)
++    if (!m_isOpen) {
          this->move(size.width() - PANEL_TAB_WIDTH - PANEL_BAR_WIDTH, PANEL_TOP_PADDING);
-     }
-     else {
 -    else
++    } else {
          this->move(size.width() - PANEL_TAB_WIDTH - PANEL_BAR_WIDTH - PANEL_WIDTH,
                     PANEL_TOP_PADDING);
 +    }
  
      m_panelBar->resizeBar(size);
  
Simple merge