Fork me on GitHub
2.15.20
FGx
A cross-platform launcher for FlightGear
toolbargroup.cpp
Go to the documentation of this file.
1 #include "toolbargroup.h"
2 
3 /* \brief A toolbar widgets with a title label on top and widgets underneath
4  * \author pete [at] freeflightsim [dot] org
5  */
6 
8  QWidget(parent)
9 {
10 
11  QVBoxLayout *mainLayout = new QVBoxLayout();
12  mainLayout->setContentsMargins(0,0,0,0);
13  mainLayout->setSpacing(0);
14  this->setLayout(mainLayout);
15 
16  this->lblTitle = new QLabel();
17  this->lblTitle->setStyleSheet("background-color: #dddddd; color: #444444; font-size: 8pt; padding: 2px;");
18  mainLayout->addWidget(this->lblTitle);
19 
20  QWidget *bwid = new QWidget();
21  mainLayout->addWidget(bwid);
22 
23  bottomLayout = new QHBoxLayout();
24  bottomLayout->setContentsMargins(0,0,0,0);
25  bottomLayout->setSpacing(0);
26  bwid->setLayout(bottomLayout);
27 
28 }
29 
30 void ToolBarGroup::setTitle(QString title){
31  this->lblTitle->setText(title);
32 }
33 
35  this->bottomLayout->addWidget(widget);
36 }
38  this->bottomLayout->addWidget(widget);
39 }
void setTitle(QString)
ToolBarGroup(QWidget *parent=0)
Definition: toolbargroup.cpp:7
QLabel * lblTitle
Definition: toolbargroup.h:15
void removeWidget(QWidget *)
void addWidget(QWidget *)
QHBoxLayout * bottomLayout
Definition: toolbargroup.h:16