#include "stapelGroupBox.h" #include #include #include #include #include #include StapelGroupBox::StapelGroupBox( QWidget* parent, const char* name ) : QGroupBox( parent, name ) { this->setAlignment( int( QGroupBox::AlignTop ) ); stapelMin1PushButton = new QPushButton( this, "stapelMin1PushButton" ); stapelMin1PushButton->setGeometry( QRect( 11, 21, 51, 27 ) ); stapelMin1PushButton->setText( tr ( "-1" ) ); stapelMin2PushButton = new QPushButton( this, "stapelMin2PushButton" ); stapelMin2PushButton->setGeometry( QRect( 68, 21, 51, 27 ) ); stapelMin2PushButton->setText( tr ( "-2" ) ); stapelProgressBar = new QProgressBar( this, "stapelProgressBar" ); stapelProgressBar->setGeometry( QRect( 125, 23, 161, 22 ) ); stapelProgressBar->setPercentageVisible( false ); stapelLCDNumber = new QLCDNumber( this, "stapelLCDNumber" ); stapelLCDNumber->setGeometry( QRect( 292, 21, 37, 27 ) ); stapelLCDNumber->setNumDigits( 2 ); //connections connect( stapelMin1PushButton, SIGNAL(pressed()), this, SLOT(button1PressedSlot()) ); connect( stapelMin2PushButton, SIGNAL(pressed()), this, SLOT(button2PressedSlot()) ); // tab order setTabOrder( stapelMin1PushButton, stapelMin2PushButton ); } StapelGroupBox::~StapelGroupBox() { } void StapelGroupBox::setXY( int X, int Y ) { this->setGeometry( X, Y, 341, 60 ); } void StapelGroupBox::setCaption( int Number ) { stapelNumber = Number; this->setTitle( tr ( "Stapel " + QString::number( Number , 10 ) ) ); } void StapelGroupBox::setRange( int Min, int Max ) { this->stapelProgressBar->setTotalSteps( Max - Min ); this->stapelProgressBar->setProgress( Max ); this->stapelLCDNumber->display( Max ); } //Acties void StapelGroupBox::button1PressedSlot( ) { emit buttonPressed ( stapelNumber , 1 ); } void StapelGroupBox::button2PressedSlot( ) { emit buttonPressed ( stapelNumber , 2 ); }