diff options
author | Timothy Pearson <[email protected]> | 2011-07-10 15:17:53 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-07-10 15:17:53 -0500 |
commit | dda8474928bd7276e1fad8fb7a601e7c83ff2bc2 (patch) | |
tree | 7f83910598b33b12730035f086df20b5a53ab99c /tqtinterface/qt4/tools/designer/examples/credit/creditformbase.cpp | |
parent | 6260b6178868c03aab1644bf93b0ef043654bdb0 (diff) | |
download | experimental-dda8474928bd7276e1fad8fb7a601e7c83ff2bc2.tar.gz experimental-dda8474928bd7276e1fad8fb7a601e7c83ff2bc2.zip |
Added TQt4 HEAD
Diffstat (limited to 'tqtinterface/qt4/tools/designer/examples/credit/creditformbase.cpp')
-rw-r--r-- | tqtinterface/qt4/tools/designer/examples/credit/creditformbase.cpp | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/tqtinterface/qt4/tools/designer/examples/credit/creditformbase.cpp b/tqtinterface/qt4/tools/designer/examples/credit/creditformbase.cpp new file mode 100644 index 0000000..07543be --- /dev/null +++ b/tqtinterface/qt4/tools/designer/examples/credit/creditformbase.cpp @@ -0,0 +1,122 @@ +/**************************************************************************** +** Form implementation generated from reading ui file 'creditformbase.ui' +** +** Created: Fri Aug 10 09:48:16 2001 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#include "creditformbase.h" + +#include <tqvariant.h> // first for gcc 2.7.2 +#include <tqbuttongroup.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqspinbox.h> +#include <tqmime.h> +#include <tqdragobject.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include "creditformbase.ui.h" +#include <tqimage.h> +#include <tqpixmap.h> + +static TQPixmap uic_load_pixmap_CreditFormBase( const TQString &name ) +{ + const TQMimeSource *m = TQMimeSourceFactory::defaultFactory()->data( name ); + if ( !m ) + return TQPixmap(); + TQPixmap pix; + TQImageDrag::decode( m, pix ); + return pix; +} +/* + * Constructs a CreditFormBase which is a child of 'tqparent', with the + * name 'name' and widget flags set to 'f'. + * + * The dialog will by default be modeless, unless you set 'modal' to + * TRUE to construct a modal dialog. + */ +CreditFormBase::CreditFormBase( TQWidget* tqparent, const char* name, bool modal, WFlags fl ) + : TQDialog( tqparent, name, modal, fl ) +{ + if ( !name ) + setName( "CreditFormBase" ); + resize( 276, 224 ); + setCaption( trUtf8( "Credit Rating", "" ) ); + CreditFormBaseLayout = new TQVBoxLayout( this ); + CreditFormBaseLayout->setSpacing( 6 ); + CreditFormBaseLayout->setMargin( 11 ); + + creditButtonGroup = new TQButtonGroup( this, "creditButtonGroup" ); + creditButtonGroup->setTitle( trUtf8( "Credit Rating", "" ) ); + creditButtonGroup->setColumnLayout(0, Qt::Vertical ); + creditButtonGroup->tqlayout()->setSpacing( 0 ); + creditButtonGroup->tqlayout()->setMargin( 0 ); + creditButtonGroupLayout = new TQVBoxLayout( creditButtonGroup->tqlayout() ); + creditButtonGroupLayout->tqsetAlignment( TQt::AlignTop ); + creditButtonGroupLayout->setSpacing( 6 ); + creditButtonGroupLayout->setMargin( 11 ); + + stdRadioButton = new TQRadioButton( creditButtonGroup, "stdRadioButton" ); + stdRadioButton->setText( trUtf8( "&Standard", "" ) ); + stdRadioButton->setChecked( TRUE ); + creditButtonGroupLayout->addWidget( stdRadioButton ); + + noneRadioButton = new TQRadioButton( creditButtonGroup, "noneRadioButton" ); + noneRadioButton->setText( trUtf8( "&None", "" ) ); + creditButtonGroupLayout->addWidget( noneRadioButton ); + + specialRadioButton = new TQRadioButton( creditButtonGroup, "specialRadioButton" ); + specialRadioButton->setText( trUtf8( "Sp&ecial", "" ) ); + creditButtonGroupLayout->addWidget( specialRadioButton ); + CreditFormBaseLayout->addWidget( creditButtonGroup ); + + amountSpinBox = new TQSpinBox( this, "amountSpinBox" ); + amountSpinBox->setEnabled( FALSE ); + amountSpinBox->setPrefix( trUtf8( "$ ", "" ) ); + amountSpinBox->setButtonSymbols( TQSpinBox::UpDownArrows ); + amountSpinBox->setMaxValue( 100000 ); + amountSpinBox->setLineStep( 10000 ); + CreditFormBaseLayout->addWidget( amountSpinBox ); + + Layout4 = new TQHBoxLayout; + Layout4->setSpacing( 6 ); + Layout4->setMargin( 0 ); + TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); + Layout4->addItem( spacer ); + + okPushButton = new TQPushButton( this, "okPushButton" ); + okPushButton->setText( trUtf8( "OK", "" ) ); + okPushButton->setDefault( TRUE ); + Layout4->addWidget( okPushButton ); + TQSpacerItem* spacer_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); + Layout4->addItem( spacer_2 ); + + cancelPushButton = new TQPushButton( this, "cancelPushButton" ); + cancelPushButton->setText( trUtf8( "Cancel", "" ) ); + Layout4->addWidget( cancelPushButton ); + TQSpacerItem* spacer_3 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); + Layout4->addItem( spacer_3 ); + CreditFormBaseLayout->addLayout( Layout4 ); + + + + + + // Q_SIGNALS and Q_SLOTS connections + connect( okPushButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( accept() ) ); + connect( cancelPushButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( reject() ) ); + connect( creditButtonGroup, TQT_SIGNAL( clicked(int) ), this, TQT_SLOT( setAmount() ) ); + connect( specialRadioButton, TQT_SIGNAL( toggled(bool) ), amountSpinBox, TQT_SLOT( setEnabled(bool) ) ); +} + +/* + * Destroys the object and frees any allocated resources + */ +CreditFormBase::~CreditFormBase() +{ + // no need to delete child widgets, TQt does it all for us +} + |