00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "settingswidget.h"
00013
00014 #include <qvariant.h>
00015 #include <kdialog.h>
00016 #include <qpushbutton.h>
00017 #include <qcheckbox.h>
00018 #include <qgroupbox.h>
00019 #include <qlabel.h>
00020 #include <qbuttongroup.h>
00021 #include <qradiobutton.h>
00022 #include <kurlrequester.h>
00023 #include <qlayout.h>
00024 #include <qtooltip.h>
00025 #include <qwhatsthis.h>
00026 #include "./settingswidget.ui.h"
00027
00028
00029
00030
00031
00032 SettingsWidget::SettingsWidget( QWidget* parent, const char* name, WFlags fl )
00033 : QWidget( parent, name, fl )
00034 {
00035 if ( !name )
00036 setName( "settings_widget" );
00037 settings_widgetLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "settings_widgetLayout");
00038
00039 lastProjectCheckbox = new QCheckBox( this, "lastProjectCheckbox" );
00040
00041 settings_widgetLayout->addWidget( lastProjectCheckbox, 0, 0 );
00042
00043 GroupBox1 = new QGroupBox( this, "GroupBox1" );
00044 GroupBox1->setColumnLayout(0, Qt::Vertical );
00045 GroupBox1->layout()->setSpacing( KDialog::spacingHint() );
00046 GroupBox1->layout()->setMargin( KDialog::marginHint() );
00047 GroupBox1Layout = new QVBoxLayout( GroupBox1->layout() );
00048 GroupBox1Layout->setAlignment( Qt::AlignTop );
00049
00050 Layout9 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "Layout9");
00051
00052 buttonLabel = new QLabel( GroupBox1, "buttonLabel" );
00053 Layout9->addWidget( buttonLabel );
00054
00055 changeMessageFontButton = new QPushButton( GroupBox1, "changeMessageFontButton" );
00056 changeMessageFontButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 0, 0, changeMessageFontButton->sizePolicy().hasHeightForWidth() ) );
00057 Layout9->addWidget( changeMessageFontButton );
00058 Spacer2 = new QSpacerItem( 170, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
00059 Layout9->addItem( Spacer2 );
00060 GroupBox1Layout->addLayout( Layout9 );
00061
00062 Layout9_2 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "Layout9_2");
00063
00064 Layout6 = new QVBoxLayout( 0, 0, KDialog::spacingHint(), "Layout6");
00065
00066 Layout3 = new QVBoxLayout( 0, 0, KDialog::spacingHint(), "Layout3");
00067
00068 lineWrappingCheckBox = new QCheckBox( GroupBox1, "lineWrappingCheckBox" );
00069 Layout3->addWidget( lineWrappingCheckBox );
00070
00071 dirNavigMsgCheckBox = new QCheckBox( GroupBox1, "dirNavigMsgCheckBox" );
00072 Layout3->addWidget( dirNavigMsgCheckBox );
00073 Layout6->addLayout( Layout3 );
00074 Spacer4 = new QSpacerItem( 0, 30, QSizePolicy::Minimum, QSizePolicy::Expanding );
00075 Layout6->addItem( Spacer4 );
00076 Layout9_2->addLayout( Layout6 );
00077
00078 compilerOutputButtonGroup = new QButtonGroup( GroupBox1, "compilerOutputButtonGroup" );
00079 compilerOutputButtonGroup->setColumnLayout(0, Qt::Vertical );
00080 compilerOutputButtonGroup->layout()->setSpacing( KDialog::spacingHint() );
00081 compilerOutputButtonGroup->layout()->setMargin( KDialog::marginHint() );
00082 compilerOutputButtonGroupLayout = new QVBoxLayout( compilerOutputButtonGroup->layout() );
00083 compilerOutputButtonGroupLayout->setAlignment( Qt::AlignTop );
00084
00085 veryShortCompilerOutputRadioButton = new QRadioButton( compilerOutputButtonGroup, "veryShortCompilerOutputRadioButton" );
00086 compilerOutputButtonGroup->insert( veryShortCompilerOutputRadioButton, 0 );
00087 compilerOutputButtonGroupLayout->addWidget( veryShortCompilerOutputRadioButton );
00088
00089 shortCompilerOutputRadioButton = new QRadioButton( compilerOutputButtonGroup, "shortCompilerOutputRadioButton" );
00090 compilerOutputButtonGroup->insert( shortCompilerOutputRadioButton, 1 );
00091 compilerOutputButtonGroupLayout->addWidget( shortCompilerOutputRadioButton );
00092
00093 fullCompilerOutputRadioButton = new QRadioButton( compilerOutputButtonGroup, "fullCompilerOutputRadioButton" );
00094 compilerOutputButtonGroup->insert( fullCompilerOutputRadioButton, 2 );
00095 compilerOutputButtonGroupLayout->addWidget( fullCompilerOutputRadioButton );
00096 Layout9_2->addWidget( compilerOutputButtonGroup );
00097 GroupBox1Layout->addLayout( Layout9_2 );
00098
00099 settings_widgetLayout->addWidget( GroupBox1, 3, 0 );
00100
00101 projects_url = new KURLRequester( this, "projects_url" );
00102 projects_url->setMinimumSize( QSize( 0, 26 ) );
00103 projects_url->setFocusPolicy( KURLRequester::WheelFocus );
00104
00105 settings_widgetLayout->addWidget( projects_url, 2, 0 );
00106
00107 textLabel1 = new QLabel( this, "textLabel1" );
00108
00109 settings_widgetLayout->addWidget( textLabel1, 1, 0 );
00110 Spacer1 = new QSpacerItem( 20, 130, QSizePolicy::Minimum, QSizePolicy::Expanding );
00111 settings_widgetLayout->addItem( Spacer1, 6, 0 );
00112
00113 GroupBox2 = new QGroupBox( this, "GroupBox2" );
00114 GroupBox2->setColumnLayout(0, Qt::Vertical );
00115 GroupBox2->layout()->setSpacing( KDialog::spacingHint() );
00116 GroupBox2->layout()->setMargin( KDialog::marginHint() );
00117 GroupBox2Layout = new QVBoxLayout( GroupBox2->layout() );
00118 GroupBox2Layout->setAlignment( Qt::AlignTop );
00119
00120 Layout10 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "Layout10");
00121
00122 buttonLabel_2 = new QLabel( GroupBox2, "buttonLabel_2" );
00123 Layout10->addWidget( buttonLabel_2 );
00124
00125 changeApplicationFontButton = new QPushButton( GroupBox2, "changeApplicationFontButton" );
00126 Layout10->addWidget( changeApplicationFontButton );
00127 Spacer3 = new QSpacerItem( 190, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
00128 Layout10->addItem( Spacer3 );
00129 GroupBox2Layout->addLayout( Layout10 );
00130
00131 settings_widgetLayout->addWidget( GroupBox2, 4, 0 );
00132
00133 groupBox3 = new QGroupBox( this, "groupBox3" );
00134 groupBox3->setColumnLayout(0, Qt::Vertical );
00135 groupBox3->layout()->setSpacing( KDialog::spacingHint() );
00136 groupBox3->layout()->setMargin( KDialog::marginHint() );
00137 groupBox3Layout = new QGridLayout( groupBox3->layout() );
00138 groupBox3Layout->setAlignment( Qt::AlignTop );
00139
00140 embedDesignerCheckBox = new QCheckBox( groupBox3, "embedDesignerCheckBox" );
00141
00142 groupBox3Layout->addWidget( embedDesignerCheckBox, 0, 0 );
00143
00144 settings_widgetLayout->addWidget( groupBox3, 5, 0 );
00145 languageChange();
00146 resize( QSize(566, 512).expandedTo(minimumSizeHint()) );
00147 clearWState( WState_Polished );
00148
00149
00150 connect( changeMessageFontButton, SIGNAL( clicked() ), this, SLOT( changeMessageFontSlot() ) );
00151 connect( changeApplicationFontButton, SIGNAL( clicked() ), this, SLOT( changeApplicationFontSlot() ) );
00152
00153
00154 setTabOrder( lastProjectCheckbox, projects_url );
00155 setTabOrder( projects_url, changeMessageFontButton );
00156 setTabOrder( changeMessageFontButton, lineWrappingCheckBox );
00157 setTabOrder( lineWrappingCheckBox, dirNavigMsgCheckBox );
00158 setTabOrder( dirNavigMsgCheckBox, veryShortCompilerOutputRadioButton );
00159 setTabOrder( veryShortCompilerOutputRadioButton, shortCompilerOutputRadioButton );
00160 setTabOrder( shortCompilerOutputRadioButton, fullCompilerOutputRadioButton );
00161 setTabOrder( fullCompilerOutputRadioButton, changeApplicationFontButton );
00162
00163
00164 buttonLabel->setBuddy( changeMessageFontButton );
00165 textLabel1->setBuddy( projects_url );
00166 buttonLabel_2->setBuddy( changeApplicationFontButton );
00167 }
00168
00169
00170
00171
00172 SettingsWidget::~SettingsWidget()
00173 {
00174
00175 }
00176
00177
00178
00179
00180
00181 void SettingsWidget::languageChange()
00182 {
00183 setCaption( tr2i18n( "settings_widget" ) );
00184 lastProjectCheckbox->setText( tr2i18n( "&Load last project on startup" ) );
00185 GroupBox1->setTitle( tr2i18n( "&Message Output View" ) );
00186 buttonLabel->setText( tr2i18n( "Window &font:" ) );
00187 changeMessageFontButton->setText( QString::null );
00188 lineWrappingCheckBox->setText( tr2i18n( "Line &wrapping" ) );
00189 dirNavigMsgCheckBox->setText( tr2i18n( "&Directory navigation messages" ) );
00190 compilerOutputButtonGroup->setTitle( tr2i18n( "&Compiler Output" ) );
00191 veryShortCompilerOutputRadioButton->setText( tr2i18n( "&Very short" ) );
00192 QWhatsThis::add( veryShortCompilerOutputRadioButton, tr2i18n( "Display only warnings, errors and the file names which are compiled." ) );
00193 shortCompilerOutputRadioButton->setText( tr2i18n( "&Short" ) );
00194 QWhatsThis::add( shortCompilerOutputRadioButton, tr2i18n( "Suppress all the compiler flags and formats to something readable." ) );
00195 fullCompilerOutputRadioButton->setText( tr2i18n( "F&ull" ) );
00196 QWhatsThis::add( fullCompilerOutputRadioButton, tr2i18n( "Display unmodified compiler output." ) );
00197 textLabel1->setText( tr2i18n( "Default &projects directory:" ) );
00198 GroupBox2->setTitle( tr2i18n( "&Application Output View" ) );
00199 buttonLabel_2->setText( tr2i18n( "Window f&ont:" ) );
00200 changeApplicationFontButton->setText( QString::null );
00201 groupBox3->setTitle( tr2i18n( "&GUI Designer Integration" ) );
00202 embedDesignerCheckBox->setText( tr2i18n( "Use &embedded KDevelop Designer" ) );
00203 }
00204
00205 #include "settingswidget.moc"