the two optional pictures should be above each other, the text is next to the pictures
This commit is contained in:
parent
cad2da0d2a
commit
71856d5488
1 changed files with 17 additions and 14 deletions
|
@ -34,16 +34,17 @@ CChannelFader::CChannelFader ( QWidget* pNW,
|
||||||
// create new GUI control objects and store pointers to them (note that
|
// create new GUI control objects and store pointers to them (note that
|
||||||
// QWidget takes the ownership of the pMainGrid so that this only has
|
// QWidget takes the ownership of the pMainGrid so that this only has
|
||||||
// to be created locally in this constructor)
|
// to be created locally in this constructor)
|
||||||
pFrame = new QFrame ( pNW );
|
pFrame = new QFrame ( pNW );
|
||||||
QVBoxLayout* pMainGrid = new QVBoxLayout ( pFrame );
|
QVBoxLayout* pMainGrid = new QVBoxLayout ( pFrame );
|
||||||
pFader = new QSlider ( Qt::Vertical, pFrame );
|
pFader = new QSlider ( Qt::Vertical, pFrame );
|
||||||
pcbMute = new QCheckBox ( "Mute", pFrame );
|
pcbMute = new QCheckBox ( "Mute", pFrame );
|
||||||
pcbSolo = new QCheckBox ( "Solo", pFrame );
|
pcbSolo = new QCheckBox ( "Solo", pFrame );
|
||||||
QGroupBox* pLabelInstBox = new QGroupBox ( pFrame );
|
QGroupBox* pLabelInstBox = new QGroupBox ( pFrame );
|
||||||
plblLabel = new QLabel ( "", pFrame );
|
plblLabel = new QLabel ( "", pFrame );
|
||||||
plblInstrument = new QLabel ( pFrame );
|
plblInstrument = new QLabel ( pFrame );
|
||||||
plblCountryFlag = new QLabel ( pFrame );
|
plblCountryFlag = new QLabel ( pFrame );
|
||||||
QHBoxLayout* pLabelGrid = new QHBoxLayout ( pLabelInstBox );
|
QHBoxLayout* pLabelGrid = new QHBoxLayout ( pLabelInstBox );
|
||||||
|
QVBoxLayout* pLabelPictGrid = new QVBoxLayout();
|
||||||
|
|
||||||
// setup slider
|
// setup slider
|
||||||
pFader->setPageStep ( 1 );
|
pFader->setPageStep ( 1 );
|
||||||
|
@ -60,8 +61,9 @@ CChannelFader::CChannelFader ( QWidget* pNW,
|
||||||
" background-color: white; }" );
|
" background-color: white; }" );
|
||||||
|
|
||||||
// setup fader tag label (black bold text which is centered)
|
// setup fader tag label (black bold text which is centered)
|
||||||
plblLabel->setTextFormat ( Qt::PlainText );
|
plblLabel->setTextFormat ( Qt::PlainText );
|
||||||
plblLabel->setAlignment ( Qt::AlignHCenter );
|
plblLabel->setAlignment ( Qt::AlignHCenter | Qt::AlignVCenter );
|
||||||
|
plblLabel->setMinimumHeight ( 40 ); // maximum hight of the instrument+flag pictures
|
||||||
plblLabel->setStyleSheet (
|
plblLabel->setStyleSheet (
|
||||||
"QLabel { color: black;"
|
"QLabel { color: black;"
|
||||||
" font: bold; }" );
|
" font: bold; }" );
|
||||||
|
@ -72,9 +74,10 @@ CChannelFader::CChannelFader ( QWidget* pNW,
|
||||||
pLabelGrid->setSpacing ( 2 ); // only minimal space between picture and text
|
pLabelGrid->setSpacing ( 2 ); // only minimal space between picture and text
|
||||||
|
|
||||||
// add user controls to the grids
|
// add user controls to the grids
|
||||||
pLabelGrid->addWidget ( plblInstrument );
|
pLabelPictGrid->addWidget ( plblCountryFlag, 0, Qt::AlignHCenter );
|
||||||
|
pLabelPictGrid->addWidget ( plblInstrument, 0, Qt::AlignHCenter );
|
||||||
|
pLabelGrid->addLayout ( pLabelPictGrid );
|
||||||
pLabelGrid->addWidget ( plblLabel, 0, Qt::AlignVCenter );
|
pLabelGrid->addWidget ( plblLabel, 0, Qt::AlignVCenter );
|
||||||
pLabelGrid->addWidget ( plblCountryFlag, 0, Qt::AlignRight );
|
|
||||||
|
|
||||||
pMainGrid->addWidget ( pFader, 0, Qt::AlignHCenter );
|
pMainGrid->addWidget ( pFader, 0, Qt::AlignHCenter );
|
||||||
pMainGrid->addWidget ( pcbMute, 0, Qt::AlignLeft );
|
pMainGrid->addWidget ( pcbMute, 0, Qt::AlignLeft );
|
||||||
|
|
Loading…
Add table
Reference in a new issue