emit toggleState();
}
-void TabbedPanel::setActiveTab(int index)
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- if(m_activeTab == -1) {
- m_activeTab = index;
- m_panelWidgetStack->setCurrentIndex(index);
- emit tabChanged();
- emit toggleState();
- } else if(m_activeTab == index) {
- m_activeTab = -1;
- emit toggleState();
- } else {
- m_activeTab = index;
- m_panelWidgetStack->setCurrentIndex(index);
- emit tabChanged();
- }
-}
-
void TabbedPanel::resizePanel(const QSize &size)
{
qDebug() << __PRETTY_FUNCTION__;
PANEL_TOP_PADDING));
}
+void TabbedPanel::setActiveTab(int index)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ if(m_activeTab == -1) {
+ m_activeTab = index;
+ m_panelWidgetStack->setCurrentIndex(index);
+ emit tabChanged();
+ emit toggleState();
+ } else if(m_activeTab == index) {
+ m_activeTab = -1;
+ emit toggleState();
+ } else {
+ m_activeTab = index;
+ m_panelWidgetStack->setCurrentIndex(index);
+ emit tabChanged();
+ }
+}
+
void TabbedPanel::stateChanged()
{
qDebug() << __PRETTY_FUNCTION__;
void openPanel();
/**
- * @brief Sets the tab at given index active
- *
- * @param index Index of the tab
- */
- void setActiveTab(int index);
-
- /**
* @brief Slot to redraw the panel after window resize event
*
* @param size Size of the new window
private slots:
/**
+ * @brief Sets the tab at given index active
+ *
+ * @param index Index of the tab
+ */
+ void setActiveTab(int index);
+
+ /**
* @brief Internal slot used to track statemachine state
*/
void stateChanged();
void panelOpened();
/**
- * @brief Signal that is sent when active tab has changed
+ * @brief Signal that is sent when user has clicked another tab active
*/
void tabChanged();