From b12037a5dbb72bf5df66424e0ef6c86e727aa694 Mon Sep 17 00:00:00 2001 From: Pekka Nissinen Date: Wed, 11 Aug 2010 10:34:30 +0300 Subject: [PATCH] Added a few missing comment blocks and cleaned up code a bit --- src/ui/panelcontent.cpp | 1 - src/ui/panelcontent.h | 4 ++-- src/ui/paneltab.cpp | 15 ++++----------- src/ui/tabbedpanel.cpp | 5 +---- src/ui/tabbedpanel.h | 4 +--- 5 files changed, 8 insertions(+), 21 deletions(-) diff --git a/src/ui/panelcontent.cpp b/src/ui/panelcontent.cpp index a09eecb..7bb0cf0 100644 --- a/src/ui/panelcontent.cpp +++ b/src/ui/panelcontent.cpp @@ -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); diff --git a/src/ui/panelcontent.h b/src/ui/panelcontent.h index de2b10c..608d8ab 100644 --- a/src/ui/panelcontent.h +++ b/src/ui/panelcontent.h @@ -54,9 +54,9 @@ public: ******************************************************************************/ public: /** - * @brief + * @brief Sets the panel content widget * - * @param + * @param widget Widget */ void setContentWidget(QWidget *widget); diff --git a/src/ui/paneltab.cpp b/src/ui/paneltab.cpp index 0a81cb5..8db62d8 100644 --- a/src/ui/paneltab.cpp +++ b/src/ui/paneltab.cpp @@ -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); } diff --git a/src/ui/tabbedpanel.cpp b/src/ui/tabbedpanel.cpp index e14edcf..ecf3f1b 100644 --- a/src/ui/tabbedpanel.cpp +++ b/src/ui/tabbedpanel.cpp @@ -25,15 +25,12 @@ #include #include -#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), diff --git a/src/ui/tabbedpanel.h b/src/ui/tabbedpanel.h index a0063d5..f81c4b6 100644 --- a/src/ui/tabbedpanel.h +++ b/src/ui/tabbedpanel.h @@ -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 }; -- 1.7.9.5