summaryrefslogtreecommitdiff
path: root/plugingui/tabwidget.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2019-02-11 10:52:30 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2019-02-11 10:52:30 +0100
commit43c2a51331d3e91d86ef50c5262920bdaa260925 (patch)
treeffc5b03be36537e6f028df935a251493d4557979 /plugingui/tabwidget.h
parent152423c0274887415b50c0d31828036a8fe54708 (diff)
Show/hide drumkit tab depending on if the current kit has a valid image attached or not.
Diffstat (limited to 'plugingui/tabwidget.h')
-rw-r--r--plugingui/tabwidget.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugingui/tabwidget.h b/plugingui/tabwidget.h
index ff239a8..dc69776 100644
--- a/plugingui/tabwidget.h
+++ b/plugingui/tabwidget.h
@@ -43,18 +43,22 @@ public:
//! Add new tab to the tab widget.
//! \param title The title to display on the tab button.
//! \param widget The widget to show in the tab.
- void addTab(const std::string& title, Widget* widget);
+ //! \returns The TabID of the newly added tab.
+ TabID addTab(const std::string& title, Widget* widget);
std::size_t getBarHeight() const;
void setTabWidth(std::size_t width);
std::size_t getTabWidth() const;
+ void setVisible(TabID tab_id, bool visible);
+
private:
//! Callback for Widget::sizeChangeNotifier
void sizeChanged(int width, int height);
private:
+ void relayout();
//! Switch to the next tab if delta is > 0 or previous tab if delta is <= 0.
void rotateTab(float delta);
void switchTab(Widget* tabWidget);