Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
LayoutTabs.h
Go to the documentation of this file.
1#pragma once
2
3#include <QTabWidget>
5#include <misc/qt/Macros.h>
6
7namespace sf
8{
9
13class QDESIGNER_WIDGET_EXPORT LayoutTabs : public VariableWidgetBase
14{
15 Q_OBJECT
16 Q_PROPERTY(QStringList tabsConfig READ getTabsConfig WRITE setTabsConfig)
17 Q_PROPERTY(QTabWidget::TabPosition tabPosition READ getTabPosition WRITE setTabPosition)
18 Q_PROPERTY(QTabWidget::TabShape tabShape READ getTabShape WRITE setTabShape)
19 Q_PROPERTY(int currentIndex READ getCurrentIndex WRITE setCurrentIndex)
20
21 // Propagate the 'TabPosition' property.
22 SF_DECL_PROP_GS(QTabWidget::TabPosition, TabPosition)
23 SF_DECL_PROP_GS(QTabWidget::TabShape, TabShape)
24 SF_DECL_PROP_GS(int, CurrentIndex)
25
26 public:
30 explicit LayoutTabs(QWidget* parent = nullptr);
31
39 [[nodiscard]] QStringList getTabsConfig() const;
40
44 void setTabsConfig(const QStringList& sl);
45
46 protected:
50 bool isRequiredProperty(const QString& name) override;
51
55 void applyReadOnly(bool yn) override;
56
57 private:
61 struct Private;
62
63 Q_DISABLE_COPY(LayoutTabs)
64};
65
66}// namespace sf
Widget for editing sf::Variable value types integer, floating point and single line string.
Definition LayoutTabs.h:14
Base class for sf::Variable based widgets.
Definition VariableWidgetBase.h:22
#define SF_DECL_PROP_GS(Type, Name)
Declares unreferenced getter and unreferenced setter for a property.
Definition misc/qt/Macros.h:8
Definition Application.h:10