QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgstabbarproxystyle.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgstabbarproxystyle.h - QgsTabBarProxyStyle
3
---------------------
4
begin : 25.3.2022
5
copyright : (C) 2022 by Alessandro Pasotti
6
email : elpaso at itopen dot it
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
#ifndef QGSTABBARPROXYSTYLE_H
16
#define QGSTABBARPROXYSTYLE_H
17
18
#include "qgis_gui.h"
19
#include "
qgsattributeeditorelement.h
"
20
#include "
qgsproxystyle.h
"
21
22
#include <QColor>
23
#include <QFont>
24
#include <QMap>
25
#include <QProxyStyle>
26
#include <QTabBar>
27
28
#define SIP_NO_FILE
29
31
36
class
GUI_EXPORT QgsTabBarProxyStyle :
public
QgsProxyStyle
37
{
38
Q_OBJECT
39
public
:
40
QgsTabBarProxyStyle( QTabBar *tabBar );
41
42
void
drawControl( ControlElement element,
const
QStyleOption *option, QPainter *painter,
const
QWidget *widget )
const override
;
43
44
void
addStyle(
int
tabIndex,
const
QgsAttributeEditorElement::LabelStyle
&style );
45
46
const
QMap<int, QgsAttributeEditorElement::LabelStyle> &tabStyles()
const
;
47
48
private
:
49
QMap<int, QgsAttributeEditorElement::LabelStyle> mTabStyles;
50
};
51
52
57
class
QgsTabBar :
public
QTabBar
58
{
59
Q_OBJECT
60
61
public
:
65
QgsTabBar( QWidget *parent );
66
70
void
setTabBarStyle( QgsTabBarProxyStyle *tabStyle );
71
72
protected
:
73
QSize tabSizeHint(
int
index )
const override
;
74
75
private
:
76
QgsTabBarProxyStyle *mTabBarStyle =
nullptr
;
77
};
78
80
81
#endif
// QGSTABBARPROXYSTYLE_H
QgsProxyStyle
A QProxyStyle subclass which correctly sets the base style to match the QGIS application style,...
Definition
qgsproxystyle.h:32
qgsattributeeditorelement.h
qgsproxystyle.h
QgsAttributeEditorElement::LabelStyle
The TabStyle struct defines color and font overrides for form fields, tabs and groups labels.
Definition
qgsattributeeditorelement.h:74
Generated on
for QGIS API Documentation by
1.17.0