00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include "appearancesettings.h"
00011
00012 #include <qvariant.h>
00013 #include <qpushbutton.h>
00014 #include <qtabwidget.h>
00015 #include <qlabel.h>
00016 #include <qbuttongroup.h>
00017 #include <qradiobutton.h>
00018 #include <qlayout.h>
00019 #include <qtooltip.h>
00020 #include <qwhatsthis.h>
00021 #include "appearancesettings.ui.h"
00022
00023
00024
00025
00026
00027 AppearanceSettings::AppearanceSettings( QWidget* parent, const char* name, WFlags fl )
00028 : QWidget( parent, name, fl )
00029 {
00030 if ( !name )
00031 setName( "AppearanceSettings" );
00032 AppearanceSettingsLayout = new QGridLayout( this, 1, 1, 11, 6, "AppearanceSettingsLayout");
00033
00034 tabWidgetTest = new QTabWidget( this, "tabWidgetTest" );
00035
00036 tab = new QWidget( tabWidgetTest, "tab" );
00037 tabLayout = new QGridLayout( tab, 1, 1, 11, 6, "tabLayout");
00038
00039 textLabel3 = new QLabel( tab, "textLabel3" );
00040
00041 tabLayout->addWidget( textLabel3, 1, 1 );
00042 QSpacerItem* spacer = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00043 tabLayout->addItem( spacer, 1, 0 );
00044 QSpacerItem* spacer_2 = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00045 tabLayout->addItem( spacer_2, 1, 2 );
00046 QSpacerItem* spacer_3 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding );
00047 tabLayout->addItem( spacer_3, 0, 1 );
00048 QSpacerItem* spacer_4 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding );
00049 tabLayout->addItem( spacer_4, 2, 1 );
00050 tabWidgetTest->insertTab( tab, QString("") );
00051
00052 tab_2 = new QWidget( tabWidgetTest, "tab_2" );
00053 tabLayout_2 = new QGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2");
00054
00055 textLabel4 = new QLabel( tab_2, "textLabel4" );
00056
00057 tabLayout_2->addMultiCellWidget( textLabel4, 1, 1, 1, 2 );
00058 QSpacerItem* spacer_5 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding );
00059 tabLayout_2->addItem( spacer_5, 0, 2 );
00060 QSpacerItem* spacer_6 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding );
00061 tabLayout_2->addItem( spacer_6, 2, 1 );
00062 QSpacerItem* spacer_7 = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00063 tabLayout_2->addItem( spacer_7, 1, 3 );
00064 QSpacerItem* spacer_8 = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00065 tabLayout_2->addItem( spacer_8, 1, 0 );
00066 tabWidgetTest->insertTab( tab_2, QString("") );
00067
00068 AppearanceSettingsLayout->addMultiCellWidget( tabWidgetTest, 0, 1, 1, 1 );
00069
00070 buttonGroup1 = new QButtonGroup( this, "buttonGroup1" );
00071 buttonGroup1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, buttonGroup1->sizePolicy().hasHeightForWidth() ) );
00072 buttonGroup1->setExclusive( TRUE );
00073
00074 rbBottom = new QRadioButton( buttonGroup1, "rbBottom" );
00075 rbBottom->setGeometry( QRect( 10, 60, 93, 17 ) );
00076
00077 rbTop = new QRadioButton( buttonGroup1, "rbTop" );
00078 rbTop->setGeometry( QRect( 10, 30, 93, 17 ) );
00079 rbTop->setChecked( TRUE );
00080
00081 AppearanceSettingsLayout->addWidget( buttonGroup1, 0, 0 );
00082 QSpacerItem* spacer_9 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding );
00083 AppearanceSettingsLayout->addItem( spacer_9, 1, 0 );
00084 languageChange();
00085 resize( QSize(466, 236).expandedTo(minimumSizeHint()) );
00086 clearWState( WState_Polished );
00087
00088
00089 connect( rbTop, SIGNAL( stateChanged(int) ), this, SLOT( slotTabPosition(int) ) );
00090
00091
00092 setTabOrder( rbTop, tabWidgetTest );
00093 }
00094
00095
00096
00097
00098 AppearanceSettings::~AppearanceSettings()
00099 {
00100
00101 }
00102
00103
00104
00105
00106
00107 void AppearanceSettings::languageChange()
00108 {
00109 setCaption( tr( "Form1" ) );
00110 textLabel3->setText( tr( "Plop" ) );
00111 tabWidgetTest->changeTab( tab, tr( "One Tab" ) );
00112 textLabel4->setText( tr( "Plop again" ) );
00113 tabWidgetTest->changeTab( tab_2, tr( "Another Tab" ) );
00114 buttonGroup1->setTitle( tr( "Tab Position" ) );
00115 rbBottom->setText( tr( "On Bottom" ) );
00116 rbTop->setText( tr( "On Top" ) );
00117 }
00118