return m_visible;
}
+void PanelContextButtonBar::move(int x, int y)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ if (m_visible)
+ QWidget::move(x, y - height());
+ else
+ QWidget::move(x, y);
+
+ QPoint hiddenPosition(x, y);
+ m_stateHidden->assignProperty(this, "pos", hiddenPosition);
+
+ QPoint visiblePosition(x, y - height());
+ m_stateVisible->assignProperty(this, "pos", visiblePosition);
+}
+
void PanelContextButtonBar::paintEvent(QPaintEvent *event)
{
qDebug() << __PRETTY_FUNCTION__;
painter.drawPixmap(CONTEXT_BUTTON_BAR_TOP_X, CONTEXT_BUTTON_BAR_TOP_Y, m_barTop);
painter.drawTiledPixmap(m_barRect, m_barTile);
-}
-
-void PanelContextButtonBar::move(int x, int y)
-{
- qDebug() << __PRETTY_FUNCTION__;
+ // Temporary border, REMOVE WHEN NOT NEEDED ANYMORE!
+ painter.setPen(Qt::red);
+ painter.drawRect(this->rect().x(), this->rect().y(),
+ this->rect().width() - 1, this->rect().height() - 1);
- if (m_visible)
- QWidget::move(x, y - height());
- else
- QWidget::move(x, y);
-
- QPoint hiddenPosition(x, y);
- m_stateHidden->assignProperty(this, "pos", hiddenPosition);
-
- QPoint visiblePosition(x, y - height());
- m_stateVisible->assignProperty(this, "pos", visiblePosition);
}
void PanelContextButtonBar::setContextButtons(QWidget *contextButtons)
#include "paneltabbar.h"
+// REMOVE WHEN NOT NEEDED ANYMORE
+#include <QPainter>
+
const int APPEND_INDEX = -1;
const int NO_ACTIVE_TABS = -1;
return index;
}
+// Used to draw temporary border around widget, REMOVE WHEN NOT NEEDED ANYMORE!
+void PanelTabBar::paintEvent(QPaintEvent *event)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ Q_UNUSED(event);
+
+ QPainter painter(this);
+
+ painter.setPen(Qt::red);
+ painter.drawRect(this->rect().x(), this->rect().y(),
+ this->rect().width() - 1, this->rect().height() - 1);
+}
+
void PanelTabBar::removeTab(int index)
{
qDebug() << __PRETTY_FUNCTION__;
PanelTabBar(QWidget *parent = 0);
/*******************************************************************************
+ * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
+ ******************************************************************************/
+protected:
+ // Used to draw temporary border around widget, REMOVE WHEN NOT NEEDED ANYMORE!
+ void paintEvent(QPaintEvent *event);
+
+/*******************************************************************************
* MEMBER FUNCTIONS AND SLOTS
******************************************************************************/
public: