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);
******************************************************************************/
public:
/**
- * @brief
+ * @brief Sets the panel content widget
*
- * @param
+ * @param widget Widget
*/
void setContentWidget(QWidget *widget);
void PanelTab::mouseMoveEvent(QMouseEvent *event)
{
-// qDebug() << __PRETTY_FUNCTION__;
+ qDebug() << __PRETTY_FUNCTION__;
if(m_tabSelected) {
if(!rect().contains(event->pos()))
void PanelTab::mousePressEvent(QMouseEvent *event)
{
-// qDebug() << __PRETTY_FUNCTION__;
+ qDebug() << __PRETTY_FUNCTION__;
if(event->button() == Qt::LeftButton) {
setDown(true);
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);
}
void PanelTab::paintEvent(QPaintEvent *)
{
-// qDebug() << __PRETTY_FUNCTION__;
+ qDebug() << __PRETTY_FUNCTION__;
QPainter painter(this);
qDebug() << __PRETTY_FUNCTION__;
if(state)
-// m_tabActive = true;
setChecked(true);
else
-// m_tabActive = false;
setChecked(false);
}
#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),
class QStateMachine;
class PanelBar;
-class PanelBase;
class PanelContent;
/**
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
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
};