YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
customgroupbox.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4 * SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6
7#ifndef CUSTOMGROUPBOX_H
8#define CUSTOMGROUPBOX_H
9
10#include <QWidget>
11#include <QPushButton>
12#include <QVBoxLayout>
13#include <QMenu>
14
15namespace Ui {
16class CustomGroupBox;
17}
18
19class CustomGroupBoxLabel : public QPushButton
20{
21 Q_OBJECT
22
23public:
24
25 explicit CustomGroupBoxLabel(QWidget* parent = nullptr);
26
27 void mouseDoubleClickEvent(QMouseEvent *) override;
28signals:
29
31};
32
33class CustomGroupBox : public QWidget
34{
35 Q_OBJECT
36
37 Ui::CustomGroupBox *ui;
38 QVBoxLayout* m_layout;
39 bool m_visible;
40 QMenu m_contextMenu;
41
42public:
43 explicit CustomGroupBox(QWidget *parent = nullptr);
44 ~CustomGroupBox() override;
45
46 void setTitle(const QString& string);
47
48 void setTitleBackgroundColor(const QColor& backgroundColor);
49
51
52 void setTitleIcon(const QIcon& icon);
53
54 void addWidget(QWidget* widget);
55
56 void toggle(bool visible);
57
58 void enableCollapseAllContextMenu(bool enable);
59
60 bool visible() const;
61
62 void toggleChildren(bool visible);
63
64signals:
65
67
68private slots:
69 void onArrowPressed(bool);
70
71 void onTitleDoubleClick();
72
73 void onExpandAll();
74
75 void onCollapseAll();
76
77 void onShowContextMenu(QPoint pos);
78};
79
80#endif // CUSTOMGROUPBOX_H
void mouseDoubleClickEvent(QMouseEvent *) override
~CustomGroupBox() override
void setTitleIcon(const QIcon &icon)
void sig_titleDoubleClick()
void enableCollapseAllContextMenu(bool enable)
void toggle(bool visible)
void setTitleBackgroundColor(const QColor &backgroundColor)
bool visible() const
void toggleChildren(bool visible)
void addWidget(QWidget *widget)
void setTitle(const QString &string)
void removeTitleBackground()
Definition aboutdlg.h:11