PeriDyno 1.0.0
Loading...
Searching...
No Matches
ToolButtonStyle.h
Go to the documentation of this file.
1/*
2 TabToolbar - a small utility library for Qt, providing tabbed toolbars
3 Copyright (C) 2018 Oleksii Sierov
4
5 TabToolbar is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 TabToolbar is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with TabToolbar. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef TT_TOOL_BUTTON_STYLE
19#define TT_TOOL_BUTTON_STYLE
20#include <QProxyStyle>
21
22class QStyleOptionToolButton;
23
24namespace tt
25{
26
27//this class uses part of Qt's source code to align text and icon on ToolButton
28class TTToolButtonStyle : public QProxyStyle
29{
30public:
31 void drawControl(ControlElement element, const QStyleOption* opt, QPainter* p, const QWidget* widget) const override;
32 void drawComplexControl(ComplexControl cc, const QStyleOptionComplex* opt, QPainter* p, const QWidget* widget) const override;
33};
34
35}
36#endif
void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget) const override
void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *widget) const override
Definition Builder.h:33