00001
#include <kdialog.h>
00002
#include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
#include "configproblemreporter.h"
00013
00014
#include <qvariant.h>
00015
#include <kdialog.h>
00016
#include <qpushbutton.h>
00017
#include <qgroupbox.h>
00018
#include <qcheckbox.h>
00019
#include <qlabel.h>
00020
#include <qslider.h>
00021
#include <qheader.h>
00022
#include <klistview.h>
00023
#include <qlayout.h>
00024
#include <qtooltip.h>
00025
#include <qwhatsthis.h>
00026
#include "./configproblemreporter.ui.h"
00027
00028
00029
00030
00031
00032
ConfigureProblemReporter::ConfigureProblemReporter(
QWidget* parent,
const char* name, WFlags fl )
00033 :
QWidget( parent,
name, fl )
00034 {
00035
if ( !
name )
00036 setName(
"ConfigureProblemReporter" );
00037
ConfigureProblemReporterLayout =
new QVBoxLayout(
this, KDialog::marginHint(), KDialog::spacingHint(),
"ConfigureProblemReporterLayout");
00038
00039
groupBox1 =
new QGroupBox(
this,
"groupBox1" );
00040
groupBox1->setFrameShadow( QGroupBox::Sunken );
00041
groupBox1->setColumnLayout(0, Qt::Vertical );
00042
groupBox1->layout()->setSpacing( KDialog::spacingHint() );
00043
groupBox1->layout()->setMargin( KDialog::marginHint() );
00044
groupBox1Layout =
new QVBoxLayout(
groupBox1->layout() );
00045
groupBox1Layout->setAlignment( Qt::AlignTop );
00046
00047
layout2 =
new QHBoxLayout( 0, 0, KDialog::spacingHint(),
"layout2");
00048
00049
bgParserCheckbox =
new QCheckBox( groupBox1,
"bgParserCheckbox" );
00050
layout2->addWidget( bgParserCheckbox );
00051
00052
delayLabel =
new QLabel( groupBox1,
"delayLabel" );
00053
delayLabel->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0,
delayLabel->sizePolicy().hasHeightForWidth() ) );
00054
delayLabel->setAlignment(
int( QLabel::AlignVCenter | QLabel::AlignLeft ) );
00055
layout2->addWidget( delayLabel );
00056
groupBox1Layout->addLayout( layout2 );
00057
00058
delaySlider =
new QSlider( groupBox1,
"delaySlider" );
00059
delaySlider->setMaxValue( 2000 );
00060
delaySlider->setLineStep( 250 );
00061
delaySlider->setPageStep( 500 );
00062
delaySlider->setOrientation( QSlider::Horizontal );
00063
delaySlider->setTickmarks( QSlider::Right );
00064
delaySlider->setTickInterval( 250 );
00065
groupBox1Layout->addWidget( delaySlider );
00066
ConfigureProblemReporterLayout->addWidget( groupBox1 );
00067
00068
groupBox3 =
new QGroupBox(
this,
"groupBox3" );
00069
groupBox3->setColumnLayout(0, Qt::Vertical );
00070
groupBox3->layout()->setSpacing( KDialog::spacingHint() );
00071
groupBox3->layout()->setMargin( KDialog::marginHint() );
00072
groupBox3Layout =
new QGridLayout(
groupBox3->layout() );
00073
groupBox3Layout->setAlignment( Qt::AlignTop );
00074
00075
specialHeaderListView =
new KListView( groupBox3,
"specialHeaderListView" );
00076
specialHeaderListView->
addColumn( QString::null );
00077
specialHeaderListView->setResizeMode( KListView::LastColumn );
00078
00079
groupBox3Layout->addMultiCellWidget( specialHeaderListView, 0, 4, 0, 0 );
00080
spacer2 =
new QSpacerItem( 20, 61, QSizePolicy::Minimum, QSizePolicy::Expanding );
00081
groupBox3Layout->addItem( spacer2, 4, 1 );
00082
00083
pushButton6 =
new QPushButton( groupBox3,
"pushButton6" );
00084
pushButton6->setAutoDefault( TRUE );
00085
00086
groupBox3Layout->addWidget( pushButton6, 3, 1 );
00087
00088
pushButton5 =
new QPushButton( groupBox3,
"pushButton5" );
00089
pushButton5->setAutoDefault( TRUE );
00090
00091
groupBox3Layout->addWidget( pushButton5, 2, 1 );
00092
00093
pushButton3 =
new QPushButton( groupBox3,
"pushButton3" );
00094
pushButton3->setAutoDefault( TRUE );
00095
00096
groupBox3Layout->addWidget( pushButton3, 0, 1 );
00097
00098
pushButton4 =
new QPushButton( groupBox3,
"pushButton4" );
00099
pushButton4->setAutoDefault( TRUE );
00100
00101
groupBox3Layout->addWidget( pushButton4, 1, 1 );
00102
ConfigureProblemReporterLayout->addWidget( groupBox3 );
00103
languageChange();
00104 resize(
QSize(588, 490).expandedTo(minimumSizeHint()) );
00105 clearWState( WState_Polished );
00106
00107
00108 connect( delaySlider, SIGNAL( valueChanged(
int) ),
this, SLOT(
setDelayLabel(
int) ) );
00109 connect( bgParserCheckbox, SIGNAL( toggled(
bool) ),
this, SLOT(
bgParserCheckbox_toggled(
bool) ) );
00110 connect( pushButton3, SIGNAL( clicked() ),
this, SLOT(
addSpecialHeader() ) );
00111 connect( pushButton4, SIGNAL( clicked() ),
this, SLOT(
removeSpecialHeader() ) );
00112 connect( pushButton5, SIGNAL( clicked() ),
this, SLOT(
moveUpSpecialHeader() ) );
00113 connect( pushButton6, SIGNAL( clicked() ),
this, SLOT(
moveDownSpecialHeader() ) );
00114
00115
00116 setTabOrder( bgParserCheckbox, delaySlider );
00117 setTabOrder( delaySlider, specialHeaderListView );
00118 setTabOrder( specialHeaderListView, pushButton3 );
00119 setTabOrder( pushButton3, pushButton4 );
00120 setTabOrder( pushButton4, pushButton5 );
00121 setTabOrder( pushButton5, pushButton6 );
00122
init();
00123 }
00124
00125
00126
00127
00128
ConfigureProblemReporter::~ConfigureProblemReporter()
00129 {
00130
destroy();
00131
00132 }
00133
00134
00135
00136
00137
00138
void ConfigureProblemReporter::languageChange()
00139 {
00140 setCaption( tr2i18n(
"Form1" ) );
00141
groupBox1->setTitle( tr2i18n(
"&Parsing" ) );
00142
bgParserCheckbox->setText( tr2i18n(
"&Enable background parsing" ) );
00143
delayLabel->setText( tr2i18n(
"msec" ) );
00144
groupBox3->setTitle( tr2i18n(
"&Special Headers" ) );
00145
specialHeaderListView->header()->setLabel( 0, QString::null );
00146
pushButton6->setText( tr2i18n(
"Move &Down" ) );
00147
pushButton5->setText( tr2i18n(
"Move &Up" ) );
00148
pushButton3->setText( tr2i18n(
"&Add" ) );
00149
pushButton4->setText( tr2i18n(
"&Remove" ) );
00150 }
00151
00152
#include "configproblemreporter.moc"