forked from martijnkoopman/Qt-Ribbon-Widget
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathribbonbuttongroup.h
60 lines (48 loc) · 1.29 KB
/
ribbonbuttongroup.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* Copyright (C) Martijn Koopman
* All Rights Reserved
*
* This software is distributed WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE.
*
*/
#ifndef RIBBONBUTTONGROUP_H
#define RIBBONBUTTONGROUP_H
#include <QWidget>
#include <QToolButton>
namespace Ui {
class RibbonButtonGroup;
}
class RibbonButtonGroup : public QWidget
{
Q_OBJECT
public:
explicit RibbonButtonGroup(QWidget *parent = 0);
virtual ~RibbonButtonGroup();
/// Set the title of the button group.
/// The title is shown underneath the buttons.
///
/// \param[in] title The title
void setTitle(const QString &title);
/// Get the title of the button group.
///
/// \return The title
QString title() const;
/// Get the number of buttons in the button group.
///
/// \return The number of buttons
int buttonCount() const;
/// Add a button to the group.
///
/// \param[in] button The button
void addButton(QToolButton *button);
/// Remove a button from the group.
///
/// \param[in] button The button
void removeButton(QToolButton *button);
private:
Ui::RibbonButtonGroup *ui;
QString m_title; ///< Title of the button group
};
#endif // RIBBONBUTTONGROUP_H