PeriDyno 1.0.0
Loading...
Searching...
No Matches
SubGroup.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_SUB_GROUP_H
19#define TT_SUB_GROUP_H
20#include <QFrame>
21#include <QLabel>
22#include <QPixmap>
23#include <QToolButton>
24#include <QVBoxLayout>
25#include <QHBoxLayout>
26#include <QApplication>
27#include <QStyle>
28#include <vector>
29
30#include "API.h"
31
32class QAction;
33class QMenu;
34
35namespace tt
36{
37
38class TT_API SubGroup : public QFrame
39{
40 Q_OBJECT
41public:
42 enum class Align
43 {
46 };
47
49 {
50 QToolButton::ToolButtonPopupMode type;
51 QAction* action;
52 QMenu* menu;
53 };
54
55 SubGroup(Align align, QWidget* parent = nullptr);
56
57 void AddAction(QToolButton::ToolButtonPopupMode type, QAction* action, QMenu* menu = nullptr);
58 void AddHorizontalButtons(const std::vector<ActionParams>& params);
59 void AddWidget(QWidget* widget);
60
61private:
62 QFrame* ConstructInnerFrame(int spacing);
63
64 QVBoxLayout* innerLayout;
65};
66
67}
68#endif
QVBoxLayout * innerLayout
Definition SubGroup.h:64
void AddWidget(QWidget *widget)
Definition SubGroup.cpp:68
void AddAction(QToolButton::ToolButtonPopupMode type, QAction *action, QMenu *menu=nullptr)
Definition SubGroup.cpp:48
SubGroup(Align align, QWidget *parent=nullptr)
Definition SubGroup.cpp:32
void AddHorizontalButtons(const std::vector< ActionParams > &params)
Definition SubGroup.cpp:77
QFrame * ConstructInnerFrame(int spacing)
Definition SubGroup.cpp:101
Definition Builder.h:33
QToolButton::ToolButtonPopupMode type
Definition SubGroup.h:50