Changed setActiveTab slot into private slot
authorPekka Nissinen <pekka.nissinen@ixonos.com>
Thu, 12 Aug 2010 09:08:24 +0000 (12:08 +0300)
committerPekka Nissinen <pekka.nissinen@ixonos.com>
Thu, 12 Aug 2010 09:08:24 +0000 (12:08 +0300)
src/ui/tabbedpanel.cpp
src/ui/tabbedpanel.h

index 9304282..4576328 100644 (file)
@@ -147,25 +147,6 @@ void TabbedPanel::openPanel()
         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__;
@@ -190,6 +171,25 @@ void TabbedPanel::resizePanel(const QSize &size)
                                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__;
index 707c5fe..d952a08 100644 (file)
@@ -116,13 +116,6 @@ public slots:
     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
@@ -131,6 +124,13 @@ public slots:
 
 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();
@@ -156,7 +156,7 @@ signals:
     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();