Loading...
Searching...
No Matches
GraphicsTabLayout.hpp
1#pragma once
2
3#include <score/graphics/GraphicsLayout.hpp>
4
5#include <functional>
6
7namespace score
8{
9class QGraphicsEnum;
10
11class SCORE_LIB_BASE_EXPORT GraphicsTabLayout : public GraphicsLayout
12{
13public:
14 using GraphicsLayout::GraphicsLayout;
16
17 void addTab(QString tab);
18 int currentIndex() const noexcept { return m_currentIndex; }
19 void setCurrentIndex(int index);
20 void setTabBarVisible(bool visible) noexcept { m_showTabBar = visible; }
21 std::function<void(int)> onCurrentIndexChanged;
22
23 void layout() override;
24
25private:
26 int m_currentIndex{};
27 bool m_showTabBar{true};
28 QGraphicsEnum* m_tabBar{};
29 std::vector<QGraphicsItem*> m_pages;
30 std::vector<QString> m_tabs;
31};
32
33}
Definition GraphicsLayout.hpp:8
Definition GraphicsTabLayout.hpp:12
Definition QGraphicsEnum.hpp:17
Base toolkit upon which the software is built.
Definition Application.cpp:117