コード例 #1
0
AstroProgressData::AstroProgressData
(
	QWidget* parent,
	const char* name
)
	:
	Inherited( parent, name, TRUE, 0 )
{
	ProgSet = new QButtonGroup( this, "ButtonGroup_1" );
	ProgSet->setGeometry( 10, 130, 220, 90 );
	ProgSet->setMinimumSize( 0, 0 );
	ProgSet->setMaximumSize( 32767, 32767 );
	connect( ProgSet, SIGNAL(clicked(int)), SLOT(progsetslot(int)) );
	ProgSet->setFocusPolicy( QWidget::NoFocus );
	ProgSet->setBackgroundMode( QWidget::PaletteBackground );
	ProgSet->setFontPropagation( QWidget::NoChildren );
	ProgSet->setPalettePropagation( QWidget::NoChildren );
	ProgSet->setFrameStyle( 49 );
	ProgSet->setTitle( transl("Progression settings") );
	ProgSet->setAlignment( 1 );

	DoProg = new QCheckBox( this, "CheckBox_1" );
	DoProg->setGeometry( 10, 10, 140, 20 );
	DoProg->setMinimumSize( 0, 0 );
	DoProg->setMaximumSize( 32767, 32767 );
	DoProg->setFocusPolicy( QWidget::TabFocus );
	DoProg->setBackgroundMode( QWidget::PaletteBackground );
	DoProg->setFontPropagation( QWidget::NoChildren );
	DoProg->setPalettePropagation( QWidget::NoChildren );
	DoProg->setText( transl("Do progression") );
	DoProg->setAutoRepeat( FALSE );
	DoProg->setAutoResize( FALSE );

	QLabel* qtarch_Label_1;
	qtarch_Label_1 = new QLabel( this, "Label_1" );
	qtarch_Label_1->setGeometry( 10, 40, 70, 20 );
	qtarch_Label_1->setMinimumSize( 0, 0 );
	qtarch_Label_1->setMaximumSize( 32767, 32767 );
	qtarch_Label_1->setFocusPolicy( QWidget::NoFocus );
	qtarch_Label_1->setBackgroundMode( QWidget::PaletteBackground );
	qtarch_Label_1->setFontPropagation( QWidget::NoChildren );
	qtarch_Label_1->setPalettePropagation( QWidget::NoChildren );
	qtarch_Label_1->setText( transl("Month") );
	qtarch_Label_1->setAlignment( 289 );
	qtarch_Label_1->setMargin( -1 );

	QLabel* qtarch_Label_2;
	qtarch_Label_2 = new QLabel( this, "Label_2" );
	qtarch_Label_2->setGeometry( 10, 60, 70, 20 );
	qtarch_Label_2->setMinimumSize( 0, 0 );
	qtarch_Label_2->setMaximumSize( 32767, 32767 );
	qtarch_Label_2->setFocusPolicy( QWidget::NoFocus );
	qtarch_Label_2->setBackgroundMode( QWidget::PaletteBackground );
	qtarch_Label_2->setFontPropagation( QWidget::NoChildren );
	qtarch_Label_2->setPalettePropagation( QWidget::NoChildren );
	qtarch_Label_2->setText( transl("Day") );
	qtarch_Label_2->setAlignment( 289 );
	qtarch_Label_2->setMargin( -1 );

	QLabel* qtarch_Label_3;
	qtarch_Label_3 = new QLabel( this, "Label_3" );
	qtarch_Label_3->setGeometry( 10, 80, 70, 20 );
	qtarch_Label_3->setMinimumSize( 0, 0 );
	qtarch_Label_3->setMaximumSize( 32767, 32767 );
	qtarch_Label_3->setFocusPolicy( QWidget::NoFocus );
	qtarch_Label_3->setBackgroundMode( QWidget::PaletteBackground );
	qtarch_Label_3->setFontPropagation( QWidget::NoChildren );
	qtarch_Label_3->setPalettePropagation( QWidget::NoChildren );
	qtarch_Label_3->setText( transl("Year") );
	qtarch_Label_3->setAlignment( 289 );
	qtarch_Label_3->setMargin( -1 );

	QLabel* qtarch_Label_4;
	qtarch_Label_4 = new QLabel( this, "Label_4" );
	qtarch_Label_4->setGeometry( 10, 100, 70, 20 );
	qtarch_Label_4->setMinimumSize( 0, 0 );
	qtarch_Label_4->setMaximumSize( 32767, 32767 );
	qtarch_Label_4->setFocusPolicy( QWidget::NoFocus );
	qtarch_Label_4->setBackgroundMode( QWidget::PaletteBackground );
	qtarch_Label_4->setFontPropagation( QWidget::NoChildren );
	qtarch_Label_4->setPalettePropagation( QWidget::NoChildren );
	qtarch_Label_4->setText( transl("Time") );
	qtarch_Label_4->setAlignment( 289 );
	qtarch_Label_4->setMargin( -1 );

	Month = new QComboBox( FALSE, this, "ComboBox_2" );
	Month->setGeometry( 80, 40, 100, 20 );
	Month->setMinimumSize( 0, 0 );
	Month->setMaximumSize( 32767, 32767 );
	Month->setFocusPolicy( QWidget::StrongFocus );
	Month->setBackgroundMode( QWidget::PaletteBackground );
	Month->setFontPropagation( QWidget::AllChildren );
	Month->setPalettePropagation( QWidget::AllChildren );
	Month->setSizeLimit( 10 );
	Month->setAutoResize( FALSE );

	TheDay = new myLineEdit( this, "LineEdit_2" );
	TheDay->setGeometry( 80, 60, 100, 20 );
	TheDay->setMinimumSize( 0, 0 );
	TheDay->setMaximumSize( 32767, 32767 );
	connect( TheDay, SIGNAL(returnPressed()), SLOT(dayslot()) );
	TheDay->setFocusPolicy( QWidget::StrongFocus );
	TheDay->setBackgroundMode( QWidget::PaletteBase );
	TheDay->setFontPropagation( QWidget::NoChildren );
	TheDay->setPalettePropagation( QWidget::NoChildren );
	TheDay->setText( "" );
	TheDay->setMaxLength( 32767 );
	TheDay->setEchoMode( myLineEdit::Normal );
	TheDay->setFrame( TRUE );

	Year = new myLineEdit( this, "LineEdit_3" );
	Year->setGeometry( 80, 80, 100, 20 );
	Year->setMinimumSize( 0, 0 );
	Year->setMaximumSize( 32767, 32767 );
	connect( Year, SIGNAL(returnPressed()), SLOT(yearslot()) );
	Year->setFocusPolicy( QWidget::StrongFocus );
	Year->setBackgroundMode( QWidget::PaletteBase );
	Year->setFontPropagation( QWidget::NoChildren );
	Year->setPalettePropagation( QWidget::NoChildren );
	Year->setText( "" );
	Year->setMaxLength( 32767 );
	Year->setEchoMode( myLineEdit::Normal );
	Year->setFrame( TRUE );

	Time = new myLineEdit( this, "LineEdit_4" );
	Time->setGeometry( 80, 100, 100, 20 );
	Time->setMinimumSize( 0, 0 );
	Time->setMaximumSize( 32767, 32767 );
	connect( Time, SIGNAL(returnPressed()), SLOT(timeslot()) );
	Time->setFocusPolicy( QWidget::StrongFocus );
	Time->setBackgroundMode( QWidget::PaletteBase );
	Time->setFontPropagation( QWidget::NoChildren );
	Time->setPalettePropagation( QWidget::NoChildren );
	Time->setText( "" );
	Time->setMaxLength( 32767 );
	Time->setEchoMode( myLineEdit::Normal );
	Time->setFrame( TRUE );

	QRadioButton* qtarch_RadioButton_1;
	qtarch_RadioButton_1 = new QRadioButton( this, "RadioButton_1" );
	qtarch_RadioButton_1->setGeometry( 20, 150, 180, 20 );
	qtarch_RadioButton_1->setMinimumSize( 0, 0 );
	qtarch_RadioButton_1->setMaximumSize( 32767, 32767 );
	qtarch_RadioButton_1->setFocusPolicy( QWidget::TabFocus );
	qtarch_RadioButton_1->setBackgroundMode( QWidget::PaletteBackground );
	qtarch_RadioButton_1->setFontPropagation( QWidget::NoChildren );
	qtarch_RadioButton_1->setPalettePropagation( QWidget::NoChildren );
	qtarch_RadioButton_1->setText( transl("Secondary progression") );
	qtarch_RadioButton_1->setAutoRepeat( FALSE );
	qtarch_RadioButton_1->setAutoResize( FALSE );

	QRadioButton* qtarch_RadioButton_2;
	qtarch_RadioButton_2 = new QRadioButton( this, "RadioButton_2" );
	qtarch_RadioButton_2->setGeometry( 20, 170, 180, 20 );
	qtarch_RadioButton_2->setMinimumSize( 0, 0 );
	qtarch_RadioButton_2->setMaximumSize( 32767, 32767 );
	qtarch_RadioButton_2->setFocusPolicy( QWidget::TabFocus );
	qtarch_RadioButton_2->setBackgroundMode( QWidget::PaletteBackground );
	qtarch_RadioButton_2->setFontPropagation( QWidget::NoChildren );
	qtarch_RadioButton_2->setPalettePropagation( QWidget::NoChildren );
	qtarch_RadioButton_2->setText( transl("Solar arc progression") );
	qtarch_RadioButton_2->setAutoRepeat( FALSE );
	qtarch_RadioButton_2->setAutoResize( FALSE );

	QLabel* qtarch_Label_5;
	qtarch_Label_5 = new QLabel( this, "Label_5" );
	qtarch_Label_5->setGeometry( 20, 190, 110, 20 );
	qtarch_Label_5->setMinimumSize( 0, 0 );
	qtarch_Label_5->setMaximumSize( 32767, 32767 );
	qtarch_Label_5->setFocusPolicy( QWidget::NoFocus );
	qtarch_Label_5->setBackgroundMode( QWidget::PaletteBackground );
	qtarch_Label_5->setFontPropagation( QWidget::NoChildren );
	qtarch_Label_5->setPalettePropagation( QWidget::NoChildren );
	qtarch_Label_5->setText( transl("Degrees per day") );
	qtarch_Label_5->setAlignment( 289 );
	qtarch_Label_5->setMargin( -1 );

	DegPerDay = new QComboBox( FALSE, this, "ComboBox_3" );
	DegPerDay->setGeometry( 130, 190, 90, 20 );
	DegPerDay->setMinimumSize( 0, 0 );
	DegPerDay->setMaximumSize( 32767, 32767 );
	connect( DegPerDay, SIGNAL(highlighted(int)), SLOT(degperdayslot(int)) );
	DegPerDay->setFocusPolicy( QWidget::StrongFocus );
	DegPerDay->setBackgroundMode( QWidget::PaletteBackground );
	DegPerDay->setFontPropagation( QWidget::AllChildren );
	DegPerDay->setPalettePropagation( QWidget::AllChildren );
	DegPerDay->setSizeLimit( 3 );
	DegPerDay->setAutoResize( FALSE );
	DegPerDay->insertItem( "365.25" );
	DegPerDay->insertItem( "27.321661" );
	DegPerDay->insertItem( "29.530588" );

	QPushButton* qtarch_PushButton_1;
	qtarch_PushButton_1 = new QPushButton( this, "PushButton_1" );
	qtarch_PushButton_1->setGeometry( 190, 10, 100, 30 );
	qtarch_PushButton_1->setMinimumSize( 0, 0 );
	qtarch_PushButton_1->setMaximumSize( 32767, 32767 );
	connect( qtarch_PushButton_1, SIGNAL(clicked()), SLOT(nowslot()) );
	qtarch_PushButton_1->setFocusPolicy( QWidget::TabFocus );
	qtarch_PushButton_1->setBackgroundMode( QWidget::PaletteBackground );
	qtarch_PushButton_1->setFontPropagation( QWidget::NoChildren );
	qtarch_PushButton_1->setPalettePropagation( QWidget::NoChildren );
	qtarch_PushButton_1->setText( transl("Now") );
	qtarch_PushButton_1->setAutoRepeat( FALSE );
	qtarch_PushButton_1->setAutoResize( FALSE );

	QPushButton* qtarch_PushButton_2;
	qtarch_PushButton_2 = new QPushButton( this, "PushButton_2" );
	qtarch_PushButton_2->setGeometry( 190, 50, 100, 30 );
	qtarch_PushButton_2->setMinimumSize( 0, 0 );
	qtarch_PushButton_2->setMaximumSize( 32767, 32767 );
	connect( qtarch_PushButton_2, SIGNAL(clicked()), SLOT(cancelslot()) );
	qtarch_PushButton_2->setFocusPolicy( QWidget::TabFocus );
	qtarch_PushButton_2->setBackgroundMode( QWidget::PaletteBackground );
	qtarch_PushButton_2->setFontPropagation( QWidget::NoChildren );
	qtarch_PushButton_2->setPalettePropagation( QWidget::NoChildren );
	qtarch_PushButton_2->setText( transl("Cancel") );
	qtarch_PushButton_2->setAutoRepeat( FALSE );
	qtarch_PushButton_2->setAutoResize( FALSE );

	QPushButton* qtarch_PushButton_3;
	qtarch_PushButton_3 = new QPushButton( this, "PushButton_3" );
	qtarch_PushButton_3->setGeometry( 190, 90, 100, 30 );
	qtarch_PushButton_3->setMinimumSize( 0, 0 );
	qtarch_PushButton_3->setMaximumSize( 32767, 32767 );
	connect( qtarch_PushButton_3, SIGNAL(clicked()), SLOT(okslot()) );
	qtarch_PushButton_3->setFocusPolicy( QWidget::TabFocus );
	qtarch_PushButton_3->setBackgroundMode( QWidget::PaletteBackground );
	qtarch_PushButton_3->setFontPropagation( QWidget::NoChildren );
	qtarch_PushButton_3->setPalettePropagation( QWidget::NoChildren );
	qtarch_PushButton_3->setText( transl("OK") );
	qtarch_PushButton_3->setAutoRepeat( FALSE );
	qtarch_PushButton_3->setAutoResize( FALSE );
	qtarch_PushButton_3->setAutoDefault( TRUE );

	ProgSet->insert( qtarch_RadioButton_1 );
	ProgSet->insert( qtarch_RadioButton_2 );

	resize( 300,230 );
	setMinimumSize( 0, 0 );
	setMaximumSize( 32767, 32767 );
}
コード例 #2
0
StarRestrictData::StarRestrictData
(
	QWidget* parent,
	const char* name
)
	:
	Inherited( parent, name, TRUE, 0 )
{
	s[0] = new QCheckBox( this, "CheckBox_1" );
	s[0]->setGeometry( 10, 20, 100, 20 );
	s[0]->setMinimumSize( 0, 0 );
	s[0]->setMaximumSize( 32767, 32767 );
	s[0]->setFocusPolicy( QWidget::TabFocus );
	s[0]->setBackgroundMode( QWidget::PaletteBackground );
	s[0]->setFontPropagation( QWidget::NoChildren );
	s[0]->setPalettePropagation( QWidget::NoChildren );
	s[0]->setText( "" );
	s[0]->setAutoRepeat( FALSE );
	s[0]->setAutoResize( FALSE );

	s[1] = new QCheckBox( this, "CheckBox_2" );
	s[1]->setGeometry( 10, 40, 100, 20 );
	s[1]->setMinimumSize( 0, 0 );
	s[1]->setMaximumSize( 32767, 32767 );
	s[1]->setFocusPolicy( QWidget::TabFocus );
	s[1]->setBackgroundMode( QWidget::PaletteBackground );
	s[1]->setFontPropagation( QWidget::NoChildren );
	s[1]->setPalettePropagation( QWidget::NoChildren );
	s[1]->setText( "" );
	s[1]->setAutoRepeat( FALSE );
	s[1]->setAutoResize( FALSE );

	s[2] = new QCheckBox( this, "CheckBox_3" );
	s[2]->setGeometry( 10, 60, 100, 20 );
	s[2]->setMinimumSize( 0, 0 );
	s[2]->setMaximumSize( 32767, 32767 );
	s[2]->setFocusPolicy( QWidget::TabFocus );
	s[2]->setBackgroundMode( QWidget::PaletteBackground );
	s[2]->setFontPropagation( QWidget::NoChildren );
	s[2]->setPalettePropagation( QWidget::NoChildren );
	s[2]->setText( "" );
	s[2]->setAutoRepeat( FALSE );
	s[2]->setAutoResize( FALSE );

	s[3] = new QCheckBox( this, "CheckBox_4" );
	s[3]->setGeometry( 10, 80, 100, 20 );
	s[3]->setMinimumSize( 0, 0 );
	s[3]->setMaximumSize( 32767, 32767 );
	s[3]->setFocusPolicy( QWidget::TabFocus );
	s[3]->setBackgroundMode( QWidget::PaletteBackground );
	s[3]->setFontPropagation( QWidget::NoChildren );
	s[3]->setPalettePropagation( QWidget::NoChildren );
	s[3]->setText( "" );
	s[3]->setAutoRepeat( FALSE );
	s[3]->setAutoResize( FALSE );

	s[4] = new QCheckBox( this, "CheckBox_5" );
	s[4]->setGeometry( 10, 100, 100, 20 );
	s[4]->setMinimumSize( 0, 0 );
	s[4]->setMaximumSize( 32767, 32767 );
	s[4]->setFocusPolicy( QWidget::TabFocus );
	s[4]->setBackgroundMode( QWidget::PaletteBackground );
	s[4]->setFontPropagation( QWidget::NoChildren );
	s[4]->setPalettePropagation( QWidget::NoChildren );
	s[4]->setText( "" );
	s[4]->setAutoRepeat( FALSE );
	s[4]->setAutoResize( FALSE );

	s[5] = new QCheckBox( this, "CheckBox_6" );
	s[5]->setGeometry( 10, 120, 100, 20 );
	s[5]->setMinimumSize( 0, 0 );
	s[5]->setMaximumSize( 32767, 32767 );
	s[5]->setFocusPolicy( QWidget::TabFocus );
	s[5]->setBackgroundMode( QWidget::PaletteBackground );
	s[5]->setFontPropagation( QWidget::NoChildren );
	s[5]->setPalettePropagation( QWidget::NoChildren );
	s[5]->setText( "" );
	s[5]->setAutoRepeat( FALSE );
	s[5]->setAutoResize( FALSE );

	s[6] = new QCheckBox( this, "CheckBox_7" );
	s[6]->setGeometry( 10, 140, 100, 20 );
	s[6]->setMinimumSize( 0, 0 );
	s[6]->setMaximumSize( 32767, 32767 );
	s[6]->setFocusPolicy( QWidget::TabFocus );
	s[6]->setBackgroundMode( QWidget::PaletteBackground );
	s[6]->setFontPropagation( QWidget::NoChildren );
	s[6]->setPalettePropagation( QWidget::NoChildren );
	s[6]->setText( "" );
	s[6]->setAutoRepeat( FALSE );
	s[6]->setAutoResize( FALSE );

	s[7] = new QCheckBox( this, "CheckBox_8" );
	s[7]->setGeometry( 10, 160, 100, 20 );
	s[7]->setMinimumSize( 0, 0 );
	s[7]->setMaximumSize( 32767, 32767 );
	s[7]->setFocusPolicy( QWidget::TabFocus );
	s[7]->setBackgroundMode( QWidget::PaletteBackground );
	s[7]->setFontPropagation( QWidget::NoChildren );
	s[7]->setPalettePropagation( QWidget::NoChildren );
	s[7]->setText( "" );
	s[7]->setAutoRepeat( FALSE );
	s[7]->setAutoResize( FALSE );

	s[8] = new QCheckBox( this, "CheckBox_9" );
	s[8]->setGeometry( 10, 180, 100, 20 );
	s[8]->setMinimumSize( 0, 0 );
	s[8]->setMaximumSize( 32767, 32767 );
	s[8]->setFocusPolicy( QWidget::TabFocus );
	s[8]->setBackgroundMode( QWidget::PaletteBackground );
	s[8]->setFontPropagation( QWidget::NoChildren );
	s[8]->setPalettePropagation( QWidget::NoChildren );
	s[8]->setText( "" );
	s[8]->setAutoRepeat( FALSE );
	s[8]->setAutoResize( FALSE );

	s[9] = new QCheckBox( this, "CheckBox_10" );
	s[9]->setGeometry( 10, 200, 100, 20 );
	s[9]->setMinimumSize( 0, 0 );
	s[9]->setMaximumSize( 32767, 32767 );
	s[9]->setFocusPolicy( QWidget::TabFocus );
	s[9]->setBackgroundMode( QWidget::PaletteBackground );
	s[9]->setFontPropagation( QWidget::NoChildren );
	s[9]->setPalettePropagation( QWidget::NoChildren );
	s[9]->setText( "" );
	s[9]->setAutoRepeat( FALSE );
	s[9]->setAutoResize( FALSE );

	s[10] = new QCheckBox( this, "CheckBox_11" );
	s[10]->setGeometry( 10, 220, 100, 20 );
	s[10]->setMinimumSize( 0, 0 );
	s[10]->setMaximumSize( 32767, 32767 );
	s[10]->setFocusPolicy( QWidget::TabFocus );
	s[10]->setBackgroundMode( QWidget::PaletteBackground );
	s[10]->setFontPropagation( QWidget::NoChildren );
	s[10]->setPalettePropagation( QWidget::NoChildren );
	s[10]->setText( "" );
	s[10]->setAutoRepeat( FALSE );
	s[10]->setAutoResize( FALSE );

	s[11] = new QCheckBox( this, "CheckBox_12" );
	s[11]->setGeometry( 10, 240, 100, 20 );
	s[11]->setMinimumSize( 0, 0 );
	s[11]->setMaximumSize( 32767, 32767 );
	s[11]->setFocusPolicy( QWidget::TabFocus );
	s[11]->setBackgroundMode( QWidget::PaletteBackground );
	s[11]->setFontPropagation( QWidget::NoChildren );
	s[11]->setPalettePropagation( QWidget::NoChildren );
	s[11]->setText( "" );
	s[11]->setAutoRepeat( FALSE );
	s[11]->setAutoResize( FALSE );

	s[12] = new QCheckBox( this, "CheckBox_13" );
	s[12]->setGeometry( 120, 20, 100, 20 );
	s[12]->setMinimumSize( 0, 0 );
	s[12]->setMaximumSize( 32767, 32767 );
	s[12]->setFocusPolicy( QWidget::TabFocus );
	s[12]->setBackgroundMode( QWidget::PaletteBackground );
	s[12]->setFontPropagation( QWidget::NoChildren );
	s[12]->setPalettePropagation( QWidget::NoChildren );
	s[12]->setText( "" );
	s[12]->setAutoRepeat( FALSE );
	s[12]->setAutoResize( FALSE );

	s[13] = new QCheckBox( this, "CheckBox_14" );
	s[13]->setGeometry( 120, 40, 100, 20 );
	s[13]->setMinimumSize( 0, 0 );
	s[13]->setMaximumSize( 32767, 32767 );
	s[13]->setFocusPolicy( QWidget::TabFocus );
	s[13]->setBackgroundMode( QWidget::PaletteBackground );
	s[13]->setFontPropagation( QWidget::NoChildren );
	s[13]->setPalettePropagation( QWidget::NoChildren );
	s[13]->setText( "" );
	s[13]->setAutoRepeat( FALSE );
	s[13]->setAutoResize( FALSE );

	s[14] = new QCheckBox( this, "CheckBox_15" );
	s[14]->setGeometry( 120, 60, 100, 20 );
	s[14]->setMinimumSize( 0, 0 );
	s[14]->setMaximumSize( 32767, 32767 );
	s[14]->setFocusPolicy( QWidget::TabFocus );
	s[14]->setBackgroundMode( QWidget::PaletteBackground );
	s[14]->setFontPropagation( QWidget::NoChildren );
	s[14]->setPalettePropagation( QWidget::NoChildren );
	s[14]->setText( "" );
	s[14]->setAutoRepeat( FALSE );
	s[14]->setAutoResize( FALSE );

	s[15] = new QCheckBox( this, "CheckBox_16" );
	s[15]->setGeometry( 120, 80, 100, 20 );
	s[15]->setMinimumSize( 0, 0 );
	s[15]->setMaximumSize( 32767, 32767 );
	s[15]->setFocusPolicy( QWidget::TabFocus );
	s[15]->setBackgroundMode( QWidget::PaletteBackground );
	s[15]->setFontPropagation( QWidget::NoChildren );
	s[15]->setPalettePropagation( QWidget::NoChildren );
	s[15]->setText( "" );
	s[15]->setAutoRepeat( FALSE );
	s[15]->setAutoResize( FALSE );

	s[16] = new QCheckBox( this, "CheckBox_17" );
	s[16]->setGeometry( 120, 100, 100, 20 );
	s[16]->setMinimumSize( 0, 0 );
	s[16]->setMaximumSize( 32767, 32767 );
	s[16]->setFocusPolicy( QWidget::TabFocus );
	s[16]->setBackgroundMode( QWidget::PaletteBackground );
	s[16]->setFontPropagation( QWidget::NoChildren );
	s[16]->setPalettePropagation( QWidget::NoChildren );
	s[16]->setText( "" );
	s[16]->setAutoRepeat( FALSE );
	s[16]->setAutoResize( FALSE );

	s[17] = new QCheckBox( this, "CheckBox_18" );
	s[17]->setGeometry( 120, 120, 100, 20 );
	s[17]->setMinimumSize( 0, 0 );
	s[17]->setMaximumSize( 32767, 32767 );
	s[17]->setFocusPolicy( QWidget::TabFocus );
	s[17]->setBackgroundMode( QWidget::PaletteBackground );
	s[17]->setFontPropagation( QWidget::NoChildren );
	s[17]->setPalettePropagation( QWidget::NoChildren );
	s[17]->setText( "" );
	s[17]->setAutoRepeat( FALSE );
	s[17]->setAutoResize( FALSE );

	s[18] = new QCheckBox( this, "CheckBox_19" );
	s[18]->setGeometry( 120, 140, 100, 20 );
	s[18]->setMinimumSize( 0, 0 );
	s[18]->setMaximumSize( 32767, 32767 );
	s[18]->setFocusPolicy( QWidget::TabFocus );
	s[18]->setBackgroundMode( QWidget::PaletteBackground );
	s[18]->setFontPropagation( QWidget::NoChildren );
	s[18]->setPalettePropagation( QWidget::NoChildren );
	s[18]->setText( "" );
	s[18]->setAutoRepeat( FALSE );
	s[18]->setAutoResize( FALSE );

	s[19] = new QCheckBox( this, "CheckBox_20" );
	s[19]->setGeometry( 120, 160, 100, 20 );
	s[19]->setMinimumSize( 0, 0 );
	s[19]->setMaximumSize( 32767, 32767 );
	s[19]->setFocusPolicy( QWidget::TabFocus );
	s[19]->setBackgroundMode( QWidget::PaletteBackground );
	s[19]->setFontPropagation( QWidget::NoChildren );
	s[19]->setPalettePropagation( QWidget::NoChildren );
	s[19]->setText( "" );
	s[19]->setAutoRepeat( FALSE );
	s[19]->setAutoResize( FALSE );

	s[20] = new QCheckBox( this, "CheckBox_21" );
	s[20]->setGeometry( 120, 180, 100, 20 );
	s[20]->setMinimumSize( 0, 0 );
	s[20]->setMaximumSize( 32767, 32767 );
	s[20]->setFocusPolicy( QWidget::TabFocus );
	s[20]->setBackgroundMode( QWidget::PaletteBackground );
	s[20]->setFontPropagation( QWidget::NoChildren );
	s[20]->setPalettePropagation( QWidget::NoChildren );
	s[20]->setText( "" );
	s[20]->setAutoRepeat( FALSE );
	s[20]->setAutoResize( FALSE );

	s[21] = new QCheckBox( this, "CheckBox_22" );
	s[21]->setGeometry( 120, 200, 100, 20 );
	s[21]->setMinimumSize( 0, 0 );
	s[21]->setMaximumSize( 32767, 32767 );
	s[21]->setFocusPolicy( QWidget::TabFocus );
	s[21]->setBackgroundMode( QWidget::PaletteBackground );
	s[21]->setFontPropagation( QWidget::NoChildren );
	s[21]->setPalettePropagation( QWidget::NoChildren );
	s[21]->setText( "" );
	s[21]->setAutoRepeat( FALSE );
	s[21]->setAutoResize( FALSE );

	s[22] = new QCheckBox( this, "CheckBox_23" );
	s[22]->setGeometry( 120, 220, 100, 20 );
	s[22]->setMinimumSize( 0, 0 );
	s[22]->setMaximumSize( 32767, 32767 );
	s[22]->setFocusPolicy( QWidget::TabFocus );
	s[22]->setBackgroundMode( QWidget::PaletteBackground );
	s[22]->setFontPropagation( QWidget::NoChildren );
	s[22]->setPalettePropagation( QWidget::NoChildren );
	s[22]->setText( "" );
	s[22]->setAutoRepeat( FALSE );
	s[22]->setAutoResize( FALSE );

	s[23] = new QCheckBox( this, "CheckBox_24" );
	s[23]->setGeometry( 120, 240, 100, 20 );
	s[23]->setMinimumSize( 0, 0 );
	s[23]->setMaximumSize( 32767, 32767 );
	s[23]->setFocusPolicy( QWidget::TabFocus );
	s[23]->setBackgroundMode( QWidget::PaletteBackground );
	s[23]->setFontPropagation( QWidget::NoChildren );
	s[23]->setPalettePropagation( QWidget::NoChildren );
	s[23]->setText( "" );
	s[23]->setAutoRepeat( FALSE );
	s[23]->setAutoResize( FALSE );

	s[24] = new QCheckBox( this, "CheckBox_25" );
	s[24]->setGeometry( 230, 20, 100, 20 );
	s[24]->setMinimumSize( 0, 0 );
	s[24]->setMaximumSize( 32767, 32767 );
	s[24]->setFocusPolicy( QWidget::TabFocus );
	s[24]->setBackgroundMode( QWidget::PaletteBackground );
	s[24]->setFontPropagation( QWidget::NoChildren );
	s[24]->setPalettePropagation( QWidget::NoChildren );
	s[24]->setText( "" );
	s[24]->setAutoRepeat( FALSE );
	s[24]->setAutoResize( FALSE );

	s[25] = new QCheckBox( this, "CheckBox_26" );
	s[25]->setGeometry( 230, 40, 100, 20 );
	s[25]->setMinimumSize( 0, 0 );
	s[25]->setMaximumSize( 32767, 32767 );
	s[25]->setFocusPolicy( QWidget::TabFocus );
	s[25]->setBackgroundMode( QWidget::PaletteBackground );
	s[25]->setFontPropagation( QWidget::NoChildren );
	s[25]->setPalettePropagation( QWidget::NoChildren );
	s[25]->setText( "" );
	s[25]->setAutoRepeat( FALSE );
	s[25]->setAutoResize( FALSE );

	s[26] = new QCheckBox( this, "CheckBox_27" );
	s[26]->setGeometry( 230, 60, 100, 20 );
	s[26]->setMinimumSize( 0, 0 );
	s[26]->setMaximumSize( 32767, 32767 );
	s[26]->setFocusPolicy( QWidget::TabFocus );
	s[26]->setBackgroundMode( QWidget::PaletteBackground );
	s[26]->setFontPropagation( QWidget::NoChildren );
	s[26]->setPalettePropagation( QWidget::NoChildren );
	s[26]->setText( "" );
	s[26]->setAutoRepeat( FALSE );
	s[26]->setAutoResize( FALSE );

	s[27] = new QCheckBox( this, "CheckBox_28" );
	s[27]->setGeometry( 230, 80, 100, 20 );
	s[27]->setMinimumSize( 0, 0 );
	s[27]->setMaximumSize( 32767, 32767 );
	s[27]->setFocusPolicy( QWidget::TabFocus );
	s[27]->setBackgroundMode( QWidget::PaletteBackground );
	s[27]->setFontPropagation( QWidget::NoChildren );
	s[27]->setPalettePropagation( QWidget::NoChildren );
	s[27]->setText( "" );
	s[27]->setAutoRepeat( FALSE );
	s[27]->setAutoResize( FALSE );

	s[28] = new QCheckBox( this, "CheckBox_29" );
	s[28]->setGeometry( 230, 100, 100, 20 );
	s[28]->setMinimumSize( 0, 0 );
	s[28]->setMaximumSize( 32767, 32767 );
	s[28]->setFocusPolicy( QWidget::TabFocus );
	s[28]->setBackgroundMode( QWidget::PaletteBackground );
	s[28]->setFontPropagation( QWidget::NoChildren );
	s[28]->setPalettePropagation( QWidget::NoChildren );
	s[28]->setText( "" );
	s[28]->setAutoRepeat( FALSE );
	s[28]->setAutoResize( FALSE );

	s[29] = new QCheckBox( this, "CheckBox_30" );
	s[29]->setGeometry( 230, 120, 100, 20 );
	s[29]->setMinimumSize( 0, 0 );
	s[29]->setMaximumSize( 32767, 32767 );
	s[29]->setFocusPolicy( QWidget::TabFocus );
	s[29]->setBackgroundMode( QWidget::PaletteBackground );
	s[29]->setFontPropagation( QWidget::NoChildren );
	s[29]->setPalettePropagation( QWidget::NoChildren );
	s[29]->setText( "" );
	s[29]->setAutoRepeat( FALSE );
	s[29]->setAutoResize( FALSE );

	s[30] = new QCheckBox( this, "CheckBox_31" );
	s[30]->setGeometry( 230, 140, 100, 20 );
	s[30]->setMinimumSize( 0, 0 );
	s[30]->setMaximumSize( 32767, 32767 );
	s[30]->setFocusPolicy( QWidget::TabFocus );
	s[30]->setBackgroundMode( QWidget::PaletteBackground );
	s[30]->setFontPropagation( QWidget::NoChildren );
	s[30]->setPalettePropagation( QWidget::NoChildren );
	s[30]->setText( "" );
	s[30]->setAutoRepeat( FALSE );
	s[30]->setAutoResize( FALSE );

	s[31] = new QCheckBox( this, "CheckBox_32" );
	s[31]->setGeometry( 230, 160, 100, 20 );
	s[31]->setMinimumSize( 0, 0 );
	s[31]->setMaximumSize( 32767, 32767 );
	s[31]->setFocusPolicy( QWidget::TabFocus );
	s[31]->setBackgroundMode( QWidget::PaletteBackground );
	s[31]->setFontPropagation( QWidget::NoChildren );
	s[31]->setPalettePropagation( QWidget::NoChildren );
	s[31]->setText( "" );
	s[31]->setAutoRepeat( FALSE );
	s[31]->setAutoResize( FALSE );

	s[32] = new QCheckBox( this, "CheckBox_33" );
	s[32]->setGeometry( 230, 180, 100, 20 );
	s[32]->setMinimumSize( 0, 0 );
	s[32]->setMaximumSize( 32767, 32767 );
	s[32]->setFocusPolicy( QWidget::TabFocus );
	s[32]->setBackgroundMode( QWidget::PaletteBackground );
	s[32]->setFontPropagation( QWidget::NoChildren );
	s[32]->setPalettePropagation( QWidget::NoChildren );
	s[32]->setText( "" );
	s[32]->setAutoRepeat( FALSE );
	s[32]->setAutoResize( FALSE );

	s[33] = new QCheckBox( this, "CheckBox_34" );
	s[33]->setGeometry( 230, 200, 100, 20 );
	s[33]->setMinimumSize( 0, 0 );
	s[33]->setMaximumSize( 32767, 32767 );
	s[33]->setFocusPolicy( QWidget::TabFocus );
	s[33]->setBackgroundMode( QWidget::PaletteBackground );
	s[33]->setFontPropagation( QWidget::NoChildren );
	s[33]->setPalettePropagation( QWidget::NoChildren );
	s[33]->setText( "" );
	s[33]->setAutoRepeat( FALSE );
	s[33]->setAutoResize( FALSE );

	s[34] = new QCheckBox( this, "CheckBox_35" );
	s[34]->setGeometry( 230, 220, 100, 20 );
	s[34]->setMinimumSize( 0, 0 );
	s[34]->setMaximumSize( 32767, 32767 );
	s[34]->setFocusPolicy( QWidget::TabFocus );
	s[34]->setBackgroundMode( QWidget::PaletteBackground );
	s[34]->setFontPropagation( QWidget::NoChildren );
	s[34]->setPalettePropagation( QWidget::NoChildren );
	s[34]->setText( "" );
	s[34]->setAutoRepeat( FALSE );
	s[34]->setAutoResize( FALSE );

	s[35] = new QCheckBox( this, "CheckBox_36" );
	s[35]->setGeometry( 230, 240, 100, 20 );
	s[35]->setMinimumSize( 0, 0 );
	s[35]->setMaximumSize( 32767, 32767 );
	s[35]->setFocusPolicy( QWidget::TabFocus );
	s[35]->setBackgroundMode( QWidget::PaletteBackground );
	s[35]->setFontPropagation( QWidget::NoChildren );
	s[35]->setPalettePropagation( QWidget::NoChildren );
	s[35]->setText( "" );
	s[35]->setAutoRepeat( FALSE );
	s[35]->setAutoResize( FALSE );

	s[36] = new QCheckBox( this, "CheckBox_37" );
	s[36]->setGeometry( 340, 20, 100, 20 );
	s[36]->setMinimumSize( 0, 0 );
	s[36]->setMaximumSize( 32767, 32767 );
	s[36]->setFocusPolicy( QWidget::TabFocus );
	s[36]->setBackgroundMode( QWidget::PaletteBackground );
	s[36]->setFontPropagation( QWidget::NoChildren );
	s[36]->setPalettePropagation( QWidget::NoChildren );
	s[36]->setText( "" );
	s[36]->setAutoRepeat( FALSE );
	s[36]->setAutoResize( FALSE );

	s[37] = new QCheckBox( this, "CheckBox_38" );
	s[37]->setGeometry( 340, 40, 100, 20 );
	s[37]->setMinimumSize( 0, 0 );
	s[37]->setMaximumSize( 32767, 32767 );
	s[37]->setFocusPolicy( QWidget::TabFocus );
	s[37]->setBackgroundMode( QWidget::PaletteBackground );
	s[37]->setFontPropagation( QWidget::NoChildren );
	s[37]->setPalettePropagation( QWidget::NoChildren );
	s[37]->setText( "" );
	s[37]->setAutoRepeat( FALSE );
	s[37]->setAutoResize( FALSE );

	s[38] = new QCheckBox( this, "CheckBox_39" );
	s[38]->setGeometry( 340, 60, 100, 20 );
	s[38]->setMinimumSize( 0, 0 );
	s[38]->setMaximumSize( 32767, 32767 );
	s[38]->setFocusPolicy( QWidget::TabFocus );
	s[38]->setBackgroundMode( QWidget::PaletteBackground );
	s[38]->setFontPropagation( QWidget::NoChildren );
	s[38]->setPalettePropagation( QWidget::NoChildren );
	s[38]->setText( "" );
	s[38]->setAutoRepeat( FALSE );
	s[38]->setAutoResize( FALSE );

	s[39] = new QCheckBox( this, "CheckBox_40" );
	s[39]->setGeometry( 340, 80, 100, 20 );
	s[39]->setMinimumSize( 0, 0 );
	s[39]->setMaximumSize( 32767, 32767 );
	s[39]->setFocusPolicy( QWidget::TabFocus );
	s[39]->setBackgroundMode( QWidget::PaletteBackground );
	s[39]->setFontPropagation( QWidget::NoChildren );
	s[39]->setPalettePropagation( QWidget::NoChildren );
	s[39]->setText( "" );
	s[39]->setAutoRepeat( FALSE );
	s[39]->setAutoResize( FALSE );

	s[40] = new QCheckBox( this, "CheckBox_41" );
	s[40]->setGeometry( 340, 100, 100, 20 );
	s[40]->setMinimumSize( 0, 0 );
	s[40]->setMaximumSize( 32767, 32767 );
	s[40]->setFocusPolicy( QWidget::TabFocus );
	s[40]->setBackgroundMode( QWidget::PaletteBackground );
	s[40]->setFontPropagation( QWidget::NoChildren );
	s[40]->setPalettePropagation( QWidget::NoChildren );
	s[40]->setText( "" );
	s[40]->setAutoRepeat( FALSE );
	s[40]->setAutoResize( FALSE );

	s[41] = new QCheckBox( this, "CheckBox_42" );
	s[41]->setGeometry( 340, 120, 100, 20 );
	s[41]->setMinimumSize( 0, 0 );
	s[41]->setMaximumSize( 32767, 32767 );
	s[41]->setFocusPolicy( QWidget::TabFocus );
	s[41]->setBackgroundMode( QWidget::PaletteBackground );
	s[41]->setFontPropagation( QWidget::NoChildren );
	s[41]->setPalettePropagation( QWidget::NoChildren );
	s[41]->setText( "" );
	s[41]->setAutoRepeat( FALSE );
	s[41]->setAutoResize( FALSE );

	s[42] = new QCheckBox( this, "CheckBox_43" );
	s[42]->setGeometry( 340, 140, 100, 20 );
	s[42]->setMinimumSize( 0, 0 );
	s[42]->setMaximumSize( 32767, 32767 );
	s[42]->setFocusPolicy( QWidget::TabFocus );
	s[42]->setBackgroundMode( QWidget::PaletteBackground );
	s[42]->setFontPropagation( QWidget::NoChildren );
	s[42]->setPalettePropagation( QWidget::NoChildren );
	s[42]->setText( "" );
	s[42]->setAutoRepeat( FALSE );
	s[42]->setAutoResize( FALSE );

	s[43] = new QCheckBox( this, "CheckBox_44" );
	s[43]->setGeometry( 340, 160, 100, 20 );
	s[43]->setMinimumSize( 0, 0 );
	s[43]->setMaximumSize( 32767, 32767 );
	s[43]->setFocusPolicy( QWidget::TabFocus );
	s[43]->setBackgroundMode( QWidget::PaletteBackground );
	s[43]->setFontPropagation( QWidget::NoChildren );
	s[43]->setPalettePropagation( QWidget::NoChildren );
	s[43]->setText( "" );
	s[43]->setAutoRepeat( FALSE );
	s[43]->setAutoResize( FALSE );

	s[44] = new QCheckBox( this, "CheckBox_45" );
	s[44]->setGeometry( 340, 180, 100, 20 );
	s[44]->setMinimumSize( 0, 0 );
	s[44]->setMaximumSize( 32767, 32767 );
	s[44]->setFocusPolicy( QWidget::TabFocus );
	s[44]->setBackgroundMode( QWidget::PaletteBackground );
	s[44]->setFontPropagation( QWidget::NoChildren );
	s[44]->setPalettePropagation( QWidget::NoChildren );
	s[44]->setText( "" );
	s[44]->setAutoRepeat( FALSE );
	s[44]->setAutoResize( FALSE );

	s[45] = new QCheckBox( this, "CheckBox_46" );
	s[45]->setGeometry( 340, 200, 100, 20 );
	s[45]->setMinimumSize( 0, 0 );
	s[45]->setMaximumSize( 32767, 32767 );
	s[45]->setFocusPolicy( QWidget::TabFocus );
	s[45]->setBackgroundMode( QWidget::PaletteBackground );
	s[45]->setFontPropagation( QWidget::NoChildren );
	s[45]->setPalettePropagation( QWidget::NoChildren );
	s[45]->setText( "" );
	s[45]->setAutoRepeat( FALSE );
	s[45]->setAutoResize( FALSE );

	s[46] = new QCheckBox( this, "CheckBox_47" );
	s[46]->setGeometry( 340, 220, 100, 20 );
	s[46]->setMinimumSize( 0, 0 );
	s[46]->setMaximumSize( 32767, 32767 );
	s[46]->setFocusPolicy( QWidget::TabFocus );
	s[46]->setBackgroundMode( QWidget::PaletteBackground );
	s[46]->setFontPropagation( QWidget::NoChildren );
	s[46]->setPalettePropagation( QWidget::NoChildren );
	s[46]->setText( "" );
	s[46]->setAutoRepeat( FALSE );
	s[46]->setAutoResize( FALSE );

	QPushButton* qtarch_PushButton_1;
	qtarch_PushButton_1 = new QPushButton( this, "PushButton_1" );
	qtarch_PushButton_1->setGeometry( 450, 20, 100, 30 );
	qtarch_PushButton_1->setMinimumSize( 0, 0 );
	qtarch_PushButton_1->setMaximumSize( 32767, 32767 );
	connect( qtarch_PushButton_1, SIGNAL(clicked()), SLOT(restrictslot()) );
	qtarch_PushButton_1->setFocusPolicy( QWidget::TabFocus );
	qtarch_PushButton_1->setBackgroundMode( QWidget::PaletteBackground );
	qtarch_PushButton_1->setFontPropagation( QWidget::NoChildren );
	qtarch_PushButton_1->setPalettePropagation( QWidget::NoChildren );
	qtarch_PushButton_1->setText( transl("Restrict All") );
	qtarch_PushButton_1->setAutoRepeat( FALSE );
	qtarch_PushButton_1->setAutoResize( FALSE );

	QPushButton* qtarch_PushButton_2;
	qtarch_PushButton_2 = new QPushButton( this, "PushButton_2" );
	qtarch_PushButton_2->setGeometry( 450, 60, 100, 30 );
	qtarch_PushButton_2->setMinimumSize( 0, 0 );
	qtarch_PushButton_2->setMaximumSize( 32767, 32767 );
	connect( qtarch_PushButton_2, SIGNAL(clicked()), SLOT(unrestrictslot()) );
	qtarch_PushButton_2->setFocusPolicy( QWidget::TabFocus );
	qtarch_PushButton_2->setBackgroundMode( QWidget::PaletteBackground );
	qtarch_PushButton_2->setFontPropagation( QWidget::NoChildren );
	qtarch_PushButton_2->setPalettePropagation( QWidget::NoChildren );
	qtarch_PushButton_2->setText( transl("Unrestrict All") );
	qtarch_PushButton_2->setAutoRepeat( FALSE );
	qtarch_PushButton_2->setAutoResize( FALSE );

	QPushButton* qtarch_PushButton_3;
	qtarch_PushButton_3 = new QPushButton( this, "PushButton_3" );
	qtarch_PushButton_3->setGeometry( 450, 190, 100, 30 );
	qtarch_PushButton_3->setMinimumSize( 0, 0 );
	qtarch_PushButton_3->setMaximumSize( 32767, 32767 );
	connect( qtarch_PushButton_3, SIGNAL(clicked()), SLOT(cancelslot()) );
	qtarch_PushButton_3->setFocusPolicy( QWidget::TabFocus );
	qtarch_PushButton_3->setBackgroundMode( QWidget::PaletteBackground );
	qtarch_PushButton_3->setFontPropagation( QWidget::NoChildren );
	qtarch_PushButton_3->setPalettePropagation( QWidget::NoChildren );
	qtarch_PushButton_3->setText( transl("Cancel") );
	qtarch_PushButton_3->setAutoRepeat( FALSE );
	qtarch_PushButton_3->setAutoResize( FALSE );

	QPushButton* qtarch_PushButton_4;
	qtarch_PushButton_4 = new QPushButton( this, "PushButton_4" );
	qtarch_PushButton_4->setGeometry( 450, 230, 100, 30 );
	qtarch_PushButton_4->setMinimumSize( 0, 0 );
	qtarch_PushButton_4->setMaximumSize( 32767, 32767 );
	connect( qtarch_PushButton_4, SIGNAL(clicked()), SLOT(okslot()) );
	qtarch_PushButton_4->setFocusPolicy( QWidget::TabFocus );
	qtarch_PushButton_4->setBackgroundMode( QWidget::PaletteBackground );
	qtarch_PushButton_4->setFontPropagation( QWidget::NoChildren );
	qtarch_PushButton_4->setPalettePropagation( QWidget::NoChildren );
	qtarch_PushButton_4->setText( transl("OK") );
	qtarch_PushButton_4->setAutoRepeat( FALSE );
	qtarch_PushButton_4->setAutoResize( FALSE );

	resize( 560,270 );
	setMinimumSize( 0, 0 );
	setMaximumSize( 32767, 32767 );
}
コード例 #3
0
ConnectionProperties::ConnectionProperties(Database *database, MainWin *mainwin)
{
    QPushButton *pBOK;
    QPushButton *pBCancel;
    QWidget *layoutWidget;
    QVBoxLayout *verticalLayout;

    setWindowFlags(Qt::FramelessWindowHint);
    this->setAttribute(Qt::WA_DeleteOnClose);
    resize(256, 288);
    setModal(true);
    setParent(mainwin);
    setWindowFlags(Qt::Window);
    setWindowModality(Qt::WindowModal);
    pBOK = new QPushButton(this);
    pBOK->setObjectName(QString::fromUtf8("pBOK"));
    pBOK->setAutoDefault(false);
    pBOK->setGeometry(QRect(30, 250, 75, 23));
    QFont font;
    font.setFamily(QString::fromUtf8("Verdana"));
    pBOK->setFont(font);
    pBCancel = new QPushButton(this);
    pBCancel->setObjectName(QString::fromUtf8("pBCancel"));
    pBCancel->setGeometry(QRect(140, 250, 75, 23));
    pBCancel->setFont(font);
    pBCancel->setAutoDefault(false);
    setDb(new QLineEdit(this));
    getDb()->setObjectName(QString::fromUtf8("lEDb"));
    getDb()->setGeometry(QRect(100, 90, 133, 20));
    getDb()->setFont(font);
    getDb()->setAutoFillBackground(true);
    getDb()->setInputMethodHints(Qt::ImhNone);
    setSrv(new QLineEdit(this));
    getSrv()->setObjectName(QString::fromUtf8("lESrv"));
    getSrv()->setGeometry(QRect(100, 47, 133, 20));
    getSrv()->setFont(font);
    setPort(new QLineEdit(this));
    getPort()->setObjectName(QString::fromUtf8("lEPort"));
    getPort()->setGeometry(QRect(100, 130, 133, 20));
    getPort()->setFont(font);
    getPort()->setInputMethodHints(Qt::ImhFormattedNumbersOnly);
    getPort()->setInputMask("00000");
    setUser(new QLineEdit(this));
    getUser()->setObjectName(QString::fromUtf8("lEUser"));
    getUser()->setGeometry(QRect(100, 171, 133, 20));
    getUser()->setFont(font);
    setPass(new QLineEdit(this));
    getPass()->setObjectName(QString::fromUtf8("lEPass"));
    getPass()->setGeometry(QRect(100, 213, 133, 20));
    getPass()->setEchoMode(QLineEdit::Password);
    getPass()->setFont(font);
    layoutWidget = new QWidget(this);
    layoutWidget->setObjectName(QString::fromUtf8("layoutWidget"));
    layoutWidget->setGeometry(QRect(20, 40, 71, 201));
    verticalLayout = new QVBoxLayout(layoutWidget);
    verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
    verticalLayout->setContentsMargins(0, 0, 0, 0);
    lSrv = new QLabel(layoutWidget);
    lSrv->setObjectName(QString::fromUtf8("lSrv"));
    lSrv->setFont(font);
    verticalLayout->addWidget(lSrv);
    lDb = new QLabel(layoutWidget);
    lDb->setObjectName(QString::fromUtf8("lDb"));
    lDb->setFont(font);
    verticalLayout->addWidget(lDb);
    lPort = new QLabel(layoutWidget);
    lPort->setObjectName(QString::fromUtf8("lPort"));
    lPort->setFont(font);
    verticalLayout->addWidget(lPort);
    lUser = new QLabel(layoutWidget);
    lUser->setObjectName(QString::fromUtf8("lUser"));
    lUser->setFont(font);
    verticalLayout->addWidget(lUser);
    lPass = new QLabel(layoutWidget);
    lPass->setObjectName(QString::fromUtf8("lPass"));
    lPass->setFont(font);
    verticalLayout->addWidget(lPass);
    lTitle = new QLabel(this);
    lTitle->setObjectName(QString::fromUtf8("lTitle"));
    lTitle->setGeometry(QRect(20, 10, 211, 21));
    lTitle->setAlignment(Qt::AlignHCenter);
    QFont font1;
    font1.setFamily(QString::fromUtf8("Verdana"));
    font1.setPointSize(14);
    lTitle->setFont(font1);
    QWidget::setTabOrder(getSrv(), getDb());
    QWidget::setTabOrder(getDb(), getPort());
    QWidget::setTabOrder(getPort(), getUser());
    QWidget::setTabOrder(getUser(), getPass());
    QWidget::setTabOrder(getPass(), pBOK);
    QWidget::setTabOrder(pBOK, pBCancel);
    QObject::connect(pBCancel, SIGNAL(clicked()), this, SLOT(close()));
    QObject::connect(pBOK, SIGNAL(clicked()), this, SLOT(okslot()));
    QObject::connect(this, SIGNAL(oksignal(QString,qint32,QString,QString,QString)),
                     mainwin, SLOT(newDatabase(QString,qint32,QString,QString,QString)));
    QObject::connect(getSrv(), SIGNAL(returnPressed()), getDb(), SLOT(setFocus()));
    QObject::connect(getDb(), SIGNAL(returnPressed()), getPort(), SLOT(setFocus()));
    QObject::connect(getPort(), SIGNAL(returnPressed()), getUser(), SLOT(setFocus()));
    QObject::connect(getUser(), SIGNAL(returnPressed()), getPass(), SLOT(setFocus()));
    QObject::connect(getPass(), SIGNAL(returnPressed()), pBOK, SLOT(setFocus()));
    setWindowTitle(QApplication::translate("Connection", "Connection", 0, QApplication::UnicodeUTF8));
    pBOK->setText(QApplication::translate("Connection", "OK", 0, QApplication::UnicodeUTF8));
    pBCancel->setText(QApplication::translate("Connection", "Cancel", 0, QApplication::UnicodeUTF8));
    if(!database->getDatabaseStatus()) {
        getSrv()->setText(database->getHost());
        getDb()->setText(database->getName());
        getPort()->setText(database->getPort());
        getUser()->setText(database->getUser());
        getPass()->setText(database->getPassword());
    }
    else {
        QSqlDatabase database_connection = QSqlDatabase::database(QString("base").append(QString::number(database->getId())));
        getSrv()->setText(database_connection.hostName());
        getDb()->setText(database->getName());
        getPort()->setText(QString::number(database_connection.port()));
        getUser()->setText(database_connection.userName());
        getPass()->setText(database_connection.password());
    }
    lTitle->setText(QApplication::translate("Connection", "Connection", 0, QApplication::UnicodeUTF8));
    lSrv->setText(QApplication::translate("Connection", "Server", 0, QApplication::UnicodeUTF8));
    lDb->setText(QApplication::translate("Connection", "Database", 0, QApplication::UnicodeUTF8));
    lPort->setText(QApplication::translate("Connection", "Port", 0, QApplication::UnicodeUTF8));
    lUser->setText(QApplication::translate("Connection", "Username", 0, QApplication::UnicodeUTF8));
    lPass->setText(QApplication::translate("Connection", "Password", 0, QApplication::UnicodeUTF8));
}
コード例 #4
0
ファイル: tableproperties.cpp プロジェクト: awesome/pgXplorer
TableProperties::TableProperties(QMainWindow *parent, QString table_name, QStringList table_names_list, bool oid, QString inherits, QString tablespce, int fill_factr)
{
    setAttribute(Qt::WA_DeleteOnClose);
    setModal(true);
    setParent(parent);
    setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
    setWindowModality(Qt::WindowModal);

    QFont title_font("Helvetica [Cronyx]", 14, QFont::Bold);
    QFont font("Helvetica [Cronyx]");

    title = new QLabel(this);
    title->setAlignment(Qt::AlignHCenter);
    title->setText(tr("Properties"));
    title->setFont(title_font);

    with_oid = new QCheckBox(this);
    with_oid->setChecked(oid);

    /*inherit_like = new QComboBox(this);
    inherit_like->setFont(font);
    inherit_like->addItem("Inherits");
    inherit_like->addItem("Like");*/

    parent_table = new QLineEdit(this);
    parent_table->setText(inherits);
    parent_table->setFont(font);

    completer = new QCompleter(table_names_list, this);

    parent_table->setCompleter(completer);

    tablespace = new QLineEdit(this);
    tablespace->setText(tablespce);
    tablespace->setFont(font);

    fill_factor = new QSpinBox(this);
    fill_factor->setMinimum(10);
    fill_factor->setMaximum(100);
    fill_factor->setSuffix("%");
    fill_factor->setValue(fill_factr);
    fill_factor->setFont(font);

    button_box = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
    button_box->setCenterButtons(true);
    button_box->setFont(font);
    connect(button_box, SIGNAL(accepted()), this, SLOT(okslot()));
    connect(button_box, SIGNAL(rejected()), this, SLOT(close()));

    form_layout = new QFormLayout;
    form_layout->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
    form_layout->setContentsMargins(20,10,20,10);
    form_layout->setVerticalSpacing(20);
    form_layout->addRow(title);
    form_layout->addRow(tr("With oids"), with_oid);
    form_layout->labelForField(with_oid)->setFont(font);
    form_layout->addRow(QLatin1String("Inherits"), parent_table);
    form_layout->labelForField(parent_table)->setFont(font);
    form_layout->addRow(tr("Tablespace"), tablespace);
    form_layout->labelForField(tablespace)->setFont(font);
    form_layout->addRow(tr("Fill factor"), fill_factor);
    form_layout->labelForField(fill_factor)->setFont(font);
    form_layout->addRow(button_box);
    setLayout(form_layout);

#ifdef Q_WS_X11
    move(parent->x()+parent->width()/2-sizeHint().width()/2, parent->y()+parent->height()/2-sizeHint().height()/2);
#endif
}