* @brief Class for tabbed panels
*
* @author Kaj Wallin - kaj.wallin (at) ixonos.com
- * @author Pekka Nissinen - pekka.nissinen@ixonos.com
+ * @author Pekka Nissinen - pekka.nissinen (at) ixonos.com
*/
class TabbedPanel : public QWidget
{
*/
void removeTab(int index);
+ /**
+ * @brief Sets tabs enabled.
+ *
+ * If disabled tab is currently selected, panel will be closed also
+ * @param tabIndexes tab indexes to set
+ * @param enabled true if should be enabled, false otherwise
+ */
+ void setTabsEnabled(const QList<int> &tabIndexes, bool enabled);
+
public slots:
/**
* @brief Slot that closes the panel
private slots:
/**
+ * @brief Calculates mask for tabbed panel
+ *
+ * Mask is constructed from PanelTabBar, PanelContextButtonBar and panel content sizes
+ */
+ void calculateMask();
+
+ /**
+ * @brief Repositions context button bar
+ */
+ void repositionContextButtonBar();
+
+ /**
* @brief Sets the panel at current index active
*
* @param index Index of the panel
* DATA MEMBERS
******************************************************************************/
private:
- bool m_open; ///< Current state of the panel
- bool m_closeRequestPending;
+ bool m_open; ///< Current state of the panel
+ bool m_closeRequestPending; ///< Indicates wheater the panel is waiting to be closed
- QState *m_stateClosed; ///< State of the closed panel
- QState *m_stateOpened; ///< State of the opened panel
+ QState *m_stateClosed; ///< State of the closed panel
+ QState *m_stateOpened; ///< State of the opened panel
PanelBar *m_panelBar; ///< Widget for panel bar
PanelContentStack *m_panelContentStack; ///< Stack for panel widgets