#include "mixerstrip.h"
MixerStrip
::MixerStrip(QWidget *parent
) :{
volSlider->setMinimum(0);
volSlider->setMaximum(100);
pal.
setColor(volSlider
->backgroundRole
(),
QColor(128,
128,
128));
volSlider->setPalette(pal);
volSlider->setAutoFillBackground(TRUE);
volSlider->setGeometry(0,0,20,220);
volSlider->setParent(this);
Meter *meter = new Meter;
meter->setGeometry(20,0,50,220);
meter->setParent(this);
muteButton->setCheckable(true);
soloButton->setCheckable(true);
pal = muteButton->palette();
pal.
setColor(muteButton
->backgroundRole
(),
QColor(128,
128,
128));
muteButton->setPalette(pal);
muteButton->setAutoFillBackground(TRUE);
pal = soloButton->palette();
pal.
setColor(soloButton
->backgroundRole
(),
QColor(128,
128,
128));
soloButton->setPalette(pal);
soloButton->setAutoFillBackground(TRUE);
muteButton->setGeometry(0,220,70,20);
soloButton->setGeometry(0,240,70,20);
muteButton->setParent(this);
soloButton->setParent(this);
panSlider->setMinimum(-100);
panSlider->setMaximum(100);
panSlider->setValue(0);
pal = panSlider->palette();
pal.
setColor(panSlider
->backgroundRole
(),
QColor(128,
128,
128));
panSlider->setPalette(pal);
panSlider->setAutoFillBackground(TRUE);
panSlider->setGeometry(0,260,70,20);
panSlider->setParent(this);
trackName->setAlignment(Qt::AlignCenter);
trackName->setText("Track");
trackName->setGeometry(0,280,70,20);
trackName->setParent(this);
QObject::connect(volSlider,
SIGNAL(valueChanged
(int)), meter,
SLOT(valueChanged
(int)));
volSlider->setValue(0);
setFixedSize(size());
//setSizeConstraint ( QLayout::SetFixedSize );
}
QSize MixerStrip
::sizeHint() const {
return size;
}
#include "mixerstrip.h"
MixerStrip::MixerStrip(QWidget *parent) :
QWidget(parent)
{
QSlider *volSlider = new QSlider(Qt::Vertical);
volSlider->setMinimum(0);
volSlider->setMaximum(100);
QPalette pal = volSlider->palette();
pal.setColor(volSlider->backgroundRole(), QColor(128, 128, 128));
volSlider->setPalette(pal);
volSlider->setAutoFillBackground(TRUE);
volSlider->setGeometry(0,0,20,220);
volSlider->setParent(this);
Meter *meter = new Meter;
meter->setGeometry(20,0,50,220);
meter->setParent(this);
QPushButton *muteButton = new QPushButton("M");
QPushButton *soloButton = new QPushButton("S");
muteButton->setCheckable(true);
soloButton->setCheckable(true);
pal = muteButton->palette();
pal.setColor(muteButton->backgroundRole(), QColor(128, 128, 128));
muteButton->setPalette(pal);
muteButton->setAutoFillBackground(TRUE);
pal = soloButton->palette();
pal.setColor(soloButton->backgroundRole(), QColor(128, 128, 128));
soloButton->setPalette(pal);
soloButton->setAutoFillBackground(TRUE);
muteButton->setGeometry(0,220,70,20);
soloButton->setGeometry(0,240,70,20);
muteButton->setParent(this);
soloButton->setParent(this);
QSlider *panSlider = new QSlider(Qt::Horizontal);
panSlider->setMinimum(-100);
panSlider->setMaximum(100);
panSlider->setValue(0);
pal = panSlider->palette();
pal.setColor(panSlider->backgroundRole(), QColor(128, 128, 128));
panSlider->setPalette(pal);
panSlider->setAutoFillBackground(TRUE);
panSlider->setGeometry(0,260,70,20);
panSlider->setParent(this);
QLineEdit *trackName = new QLineEdit();
trackName->setAlignment(Qt::AlignCenter);
trackName->setText("Track");
trackName->setGeometry(0,280,70,20);
trackName->setParent(this);
QObject::connect(volSlider, SIGNAL(valueChanged(int)), meter, SLOT(valueChanged(int)));
volSlider->setValue(0);
setFixedSize(size());
//setSizeConstraint ( QLayout::SetFixedSize );
}
QSize MixerStrip::sizeHint() const
{
QSize size(70,300);
return size;
}
To copy to clipboard, switch view to plain text mode
Bookmarks