/**************************************************************************** ** Form implementation generated from reading ui file 'modemenu.ui' ** ** Created: Sat Sep 18 18:46:16 2004 ** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.2 edited Nov 24 13:47 $) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ #include "modemenu.h" #include #include #include #include #include #include #include #include #include #include #include "parameter.h" #include "modemenu.ui.h" /* * Constructs a ModeMenu as a child of 'parent', 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. */ ModeMenu::ModeMenu( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "ModeMenu" ); setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth() ) ); setMinimumSize( QSize( 350, 250 ) ); setBaseSize( QSize( 350, 150 ) ); setSizeGripEnabled( TRUE ); QWidget* privateLayoutWidget = new QWidget( this, "layout3" ); privateLayoutWidget->setGeometry( QRect( 30, 190, 300, 50 ) ); layout3 = new QHBoxLayout( privateLayoutWidget, 11, 6, "layout3"); buttonOk = new QPushButton( privateLayoutWidget, "buttonOk" ); buttonOk->setMinimumSize( QSize( 60, 20 ) ); buttonOk->setAutoDefault( TRUE ); buttonOk->setDefault( TRUE ); layout3->addWidget( buttonOk ); Horizontal_Spacing2 = new QSpacerItem( 110, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); layout3->addItem( Horizontal_Spacing2 ); buttonCancel = new QPushButton( privateLayoutWidget, "buttonCancel" ); buttonCancel->setMinimumSize( QSize( 60, 20 ) ); buttonCancel->setAutoDefault( TRUE ); layout3->addWidget( buttonCancel ); Reverse = new QRadioButton( this, "Reverse" ); Reverse->setGeometry( QRect( 260, 30, 80, 31 ) ); Reverse->setChecked( TRUE ); RxMode = new QListBox( this, "RxMode" ); RxMode->setGeometry( QRect( 30, 20, 100, 160 ) ); RxMode->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, RxMode->sizePolicy().hasHeightForWidth() ) ); RxMode->setVScrollBarMode( QListBox::Auto ); RxMode->setHScrollBarMode( QListBox::AlwaysOff ); Parity = new QButtonGroup( this, "Parity" ); Parity->setGeometry( QRect( 250, 90, 80, 90 ) ); Parity->setAlignment( int( QButtonGroup::AlignHCenter ) ); None = new QRadioButton( Parity, "None" ); None->setGeometry( QRect( 10, 15, 60, 20 ) ); None->setChecked( TRUE ); Parity->insert( None, 0 ); Odd = new QRadioButton( Parity, "Odd" ); Odd->setGeometry( QRect( 10, 35, 61, 20 ) ); Parity->insert( Odd, 1 ); Even = new QRadioButton( Parity, "Even" ); Even->setGeometry( QRect( 10, 55, 60, 20 ) ); Parity->insert( Even, 2 ); Stopbits = new QButtonGroup( this, "Stopbits" ); Stopbits->setGeometry( QRect( 150, 89, 80, 90 ) ); Stopbits->setAlignment( int( QButtonGroup::AlignHCenter ) ); Stopbits->setCheckable( FALSE ); Stopbits->setChecked( FALSE ); Stopbits->setExclusive( FALSE ); One = new QRadioButton( Stopbits, "One" ); One->setGeometry( QRect( 10, 20, 80, 22 ) ); Stopbits->insert( One, 0 ); Onepoint5 = new QRadioButton( Stopbits, "Onepoint5" ); Onepoint5->setGeometry( QRect( 10, 40, 81, 21 ) ); Onepoint5->setChecked( TRUE ); Stopbits->insert( Onepoint5, 1 ); Two = new QRadioButton( Stopbits, "Two" ); Two->setGeometry( QRect( 10, 60, 80, 21 ) ); Stopbits->insert( Two, 2 ); Spacing = new QGroupBox( this, "Spacing" ); Spacing->setGeometry( QRect( 145, 20, 100, 60 ) ); Spacing->setAlignment( int( QGroupBox::AlignHCenter ) ); RTTYSpacing = new QSpinBox( Spacing, "RTTYSpacing" ); RTTYSpacing->setEnabled( TRUE ); RTTYSpacing->setGeometry( QRect( 10, 23, 80, 30 ) ); RTTYSpacing->setMaxValue( 999 ); RTTYSpacing->setMinValue( 0 ); RTTYSpacing->setValue( 170 ); languageChange(); resize( QSize(350, 250).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) ); connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); connect( RxMode, SIGNAL( highlighted(int) ), this, SLOT( changeView(int) ) ); init(); } /* * Destroys the object and frees any allocated resources */ ModeMenu::~ModeMenu() { // no need to delete child widgets, Qt does it all for us } /* * Sets the strings of the subwidgets using the current * language. */ void ModeMenu::languageChange() { setCaption( tr( "Change Rx Mode" ) ); buttonOk->setText( tr( "&OK" ) ); buttonOk->setAccel( QKeySequence( QString::null ) ); buttonCancel->setText( tr( "&Cancel" ) ); buttonCancel->setAccel( QKeySequence( QString::null ) ); Reverse->setText( tr( "Reverse" ) ); RxMode->setCurrentItem( -1 ); Parity->setTitle( tr( "Parity" ) ); None->setText( tr( "None" ) ); Odd->setText( tr( "Odd" ) ); Even->setText( tr( "Even" ) ); Stopbits->setTitle( tr( "Stopbits" ) ); One->setText( tr( "1" ) ); Onepoint5->setText( tr( "1.5" ) ); Two->setText( tr( "2" ) ); Spacing->setTitle( tr( "Spacing" ) ); RTTYSpacing->setSuffix( tr( " Hz" ) ); }