From 8fe6d2ec950ed1ebdedd776bab125dff90e5a20f Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 30 Apr 2017 10:30:47 +0200 Subject: Add support for rotating the tabs using the scroll-wheel. --- plugingui/stackedwidget.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'plugingui/stackedwidget.h') diff --git a/plugingui/stackedwidget.h b/plugingui/stackedwidget.h index 13d764b..24213f7 100644 --- a/plugingui/stackedwidget.h +++ b/plugingui/stackedwidget.h @@ -42,21 +42,29 @@ class StackedWidget : public Widget { public: - StackedWidget(Widget *parent); + StackedWidget(Widget* parent); ~StackedWidget(); //! Add a widget to the stack. - void addWidget(Widget *widget); + void addWidget(Widget* widget); //! Remove a widget from the stack. - void removeWidget(Widget *widget); + void removeWidget(Widget* widget); //! Get currently visible widget. - Widget *getCurrentWidget() const; + Widget* getCurrentWidget() const; //! Show widget. Hide all the others. //! If widget is not in the stack nothing happens. - void setCurrentWidget(Widget *widget); + void setCurrentWidget(Widget* widget); + + //! Returns a pointer to the Widget after the one referenced by 'widget' or + //! nullptr if 'widget' is the last in the list. + Widget* getWidgetAfter(Widget* widget); + + //! Returns a pointer to the Widget beforer the one referenced by 'widget' or + //! nullptr if 'widget' is the first in the list. + Widget* getWidgetBefore(Widget* widget); //! Reports whn a new widget is shown. Notifier currentChanged; -- cgit v1.2.3