Added a few missing comment blocks and cleaned up code a bit
authorPekka Nissinen <pekka.nissinen@ixonos.com>
Wed, 11 Aug 2010 07:34:30 +0000 (10:34 +0300)
committerPekka Nissinen <pekka.nissinen@ixonos.com>
Wed, 11 Aug 2010 07:34:30 +0000 (10:34 +0300)
src/ui/panelcontent.cpp
src/ui/panelcontent.h
src/ui/paneltab.cpp
src/ui/tabbedpanel.cpp
src/ui/tabbedpanel.h

index a09eecb..7bb0cf0 100644 (file)
@@ -39,7 +39,6 @@ PanelContent::PanelContent(QWidget *parent)
     m_panelVBox = new QVBoxLayout(this);
     m_panelVBox->setMargin(0);
     m_panelVBox->setSpacing(0);
-    m_panelVBox->setContentsMargins(USERPANEL_MARGIN_LEFT, 0, USERPANEL_MARGIN_RIGHT, 0);
 
     m_panelBase = new PanelBase(this);
     m_panelBase->setLayout(m_panelVBox);
index de2b10c..608d8ab 100644 (file)
@@ -54,9 +54,9 @@ public:
  ******************************************************************************/
 public:
     /**
-     * @brief
+     * @brief Sets the panel content widget
      *
-     * @param
+     * @param widget Widget
      */
     void setContentWidget(QWidget *widget);
 
index 0a81cb5..8db62d8 100644 (file)
@@ -50,7 +50,7 @@ PanelTab::PanelTab(QWidget *parent)
 
 void PanelTab::mouseMoveEvent(QMouseEvent *event)
 {
-//    qDebug() << __PRETTY_FUNCTION__;
+    qDebug() << __PRETTY_FUNCTION__;
 
     if(m_tabSelected) {
         if(!rect().contains(event->pos()))
@@ -62,7 +62,7 @@ void PanelTab::mouseMoveEvent(QMouseEvent *event)
 
 void PanelTab::mousePressEvent(QMouseEvent *event)
 {
-//    qDebug() << __PRETTY_FUNCTION__;
+    qDebug() << __PRETTY_FUNCTION__;
 
     if(event->button() == Qt::LeftButton) {
         setDown(true);
@@ -72,20 +72,15 @@ void PanelTab::mousePressEvent(QMouseEvent *event)
 
 void PanelTab::mouseReleaseEvent(QMouseEvent *event)
 {
-//    qDebug() << __PRETTY_FUNCTION__;
+    qDebug() << __PRETTY_FUNCTION__;
 
     if(this->rect().contains(event->pos())) {
-//        emit QAbstractButton::clicked();
-//        emit clicked();
         click();
 
-//        if(m_tabActive) {
         if(isChecked()) {
-//            m_tabActive = false;
             setChecked(false);
 //            m_tabRect.setRect(TAB_WIDTH_ACTIVE - TAB_WIDTH, 0, TAB_WIDTH, TAB_HEIGHT);
         } else {
-//            m_tabActive = true;
             setChecked(true);
 //            m_tabRect.setRect(0, 0, TAB_WIDTH_ACTIVE, TAB_HEIGHT);
         }
@@ -97,7 +92,7 @@ void PanelTab::mouseReleaseEvent(QMouseEvent *event)
 
 void PanelTab::paintEvent(QPaintEvent *)
 {
-//    qDebug() << __PRETTY_FUNCTION__;
+    qDebug() << __PRETTY_FUNCTION__;
 
     QPainter painter(this);
 
@@ -122,9 +117,7 @@ void PanelTab::setActive(bool state)
     qDebug() << __PRETTY_FUNCTION__;
 
     if(state)
-//        m_tabActive = true;
         setChecked(true);
     else
-//        m_tabActive = false;
         setChecked(false);
 }
index e14edcf..ecf3f1b 100644 (file)
 #include <QPainter>
 #include <QRegion>
 
-#include "tabbedpanel.h"
-
 #include "panelbar.h"
-#include "panelbase.h"
 #include "panelcontent.h"
 #include "paneltab.h"
 #include "userinfo.h"
 
-enum Tab {USER_INFO, FRIEND_LIST, ROUTING};
+#include "tabbedpanel.h"
 
 TabbedPanel::TabbedPanel(QWidget *parent)
     : QWidget(parent),
index a0063d5..f81c4b6 100644 (file)
@@ -39,7 +39,6 @@ class QState;
 class QStateMachine;
 
 class PanelBar;
-class PanelBase;
 class PanelContent;
 
 /**
@@ -176,7 +175,7 @@ private:
 
     int m_activeTab;    ///< Index of a active tab
 
-    QButtonGroup *m_tabButtonGroup;
+    QButtonGroup *m_tabButtonGroup; ///< Button groub for tab buttons
 
     QSignalTransition *m_panelTransitionClose;  ///< Transition signal for closing the panel
     QSignalTransition *m_panelTransitionOpen;   ///< Transition signal for opening the panel
@@ -189,7 +188,6 @@ private:
     QStateMachine *m_panelStateMachine;         ///< State machine for sliding the panel
 
     PanelBar *m_panelBar;                       ///< Widget for panel bar
-    PanelBase *m_panelBase;                     ///< Widget for panel base
     PanelContent *m_panelContent;               ///< Widget for panel content
 };