#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__;
*/
void mouseReleaseEvent(QMouseEvent *event);
++///< @todo parameter name missing (also in .cpp)
/**
* @brief Draws the tab button
*
* 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
{
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);
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);