languages/cpp/classgeneratorconfigbase.cpp
Go to the documentation of this file.00001
#include <kdialog.h>
00002
#include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
#include "classgeneratorconfigbase.h"
00013
00014
#include <qvariant.h>
00015
#include <kdialog.h>
00016
#include <qpushbutton.h>
00017
#include <qgroupbox.h>
00018
#include <qcombobox.h>
00019
#include <qtextedit.h>
00020
#include <qlabel.h>
00021
#include <qcheckbox.h>
00022
#include <qlayout.h>
00023
#include <qtooltip.h>
00024
#include <qwhatsthis.h>
00025
00026
00027
00028
00029
00030 ClassGeneratorConfigBase::ClassGeneratorConfigBase(
QWidget* parent,
const char* name, WFlags fl )
00031 :
QWidget( parent, name, fl )
00032 {
00033
if ( !name )
00034 setName(
"ClassGeneratorConfigBase" );
00035
ClassGeneratorConfigBaseLayout =
new QGridLayout(
this, 1, 1, 0, KDialog::spacingHint(),
"ClassGeneratorConfigBaseLayout");
00036
00037
groupBox7_2 =
new QGroupBox(
this,
"groupBox7_2" );
00038
groupBox7_2->setColumnLayout(0, Qt::Vertical );
00039
groupBox7_2->layout()->setSpacing( KDialog::spacingHint() );
00040
groupBox7_2->layout()->setMargin( KDialog::marginHint() );
00041
groupBox7_2Layout =
new QGridLayout(
groupBox7_2->layout() );
00042
groupBox7_2Layout->setAlignment( Qt::AlignTop );
00043
00044
templatename_box =
new QComboBox( FALSE,
groupBox7_2,
"templatename_box" );
00045
00046
groupBox7_2Layout->addWidget(
templatename_box, 0, 0 );
00047
00048
template_edit =
new QTextEdit(
groupBox7_2,
"template_edit" );
00049
00050
groupBox7_2Layout->addWidget(
template_edit, 1, 0 );
00051
00052
ClassGeneratorConfigBaseLayout->addWidget(
groupBox7_2, 0, 0 );
00053
00054
groupBox10 =
new QGroupBox(
this,
"groupBox10" );
00055
groupBox10->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0,
groupBox10->sizePolicy().hasHeightForWidth() ) );
00056
groupBox10->setColumnLayout(0, Qt::Vertical );
00057
groupBox10->layout()->setSpacing( KDialog::spacingHint() );
00058
groupBox10->layout()->setMargin( KDialog::marginHint() );
00059
groupBox10Layout =
new QGridLayout(
groupBox10->layout() );
00060
groupBox10Layout->setAlignment( Qt::AlignTop );
00061
00062
textLabel3_2 =
new QLabel(
groupBox10,
"textLabel3_2" );
00063
00064
groupBox10Layout->addWidget(
textLabel3_2, 0, 1 );
00065
00066
textLabel3 =
new QLabel(
groupBox10,
"textLabel3" );
00067
00068
groupBox10Layout->addWidget(
textLabel3, 0, 0 );
00069
00070
filecase_box =
new QComboBox( FALSE,
groupBox10,
"filecase_box" );
00071
00072
groupBox10Layout->addWidget(
filecase_box, 1, 0 );
00073
00074
defcase_box =
new QComboBox( FALSE,
groupBox10,
"defcase_box" );
00075
00076
groupBox10Layout->addWidget(
defcase_box, 1, 1 );
00077
00078
supercase_box =
new QComboBox( FALSE,
groupBox10,
"supercase_box" );
00079
00080
groupBox10Layout->addWidget(
supercase_box, 1, 2 );
00081
00082
textLabel3_3 =
new QLabel(
groupBox10,
"textLabel3_3" );
00083
00084
groupBox10Layout->addWidget(
textLabel3_3, 0, 2 );
00085
00086
ClassGeneratorConfigBaseLayout->addWidget(
groupBox10, 1, 0 );
00087
00088
groupBox9 =
new QGroupBox(
this,
"groupBox9" );
00089
groupBox9->setColumnLayout(0, Qt::Vertical );
00090
groupBox9->layout()->setSpacing( KDialog::spacingHint() );
00091
groupBox9->layout()->setMargin( KDialog::marginHint() );
00092
groupBox9Layout =
new QGridLayout(
groupBox9->layout() );
00093
groupBox9Layout->setAlignment( Qt::AlignTop );
00094
00095
author_box =
new QCheckBox(
groupBox9,
"author_box" );
00096
00097
groupBox9Layout->addWidget(
author_box, 0, 0 );
00098
00099
doc_box =
new QCheckBox(
groupBox9,
"doc_box" );
00100
00101
groupBox9Layout->addWidget(
doc_box, 1, 0 );
00102
00103
ClassGeneratorConfigBaseLayout->addWidget(
groupBox9, 2, 0 );
00104
00105
reformat_box =
new QCheckBox(
this,
"reformat_box" );
00106
00107
ClassGeneratorConfigBaseLayout->addWidget(
reformat_box, 3, 0 );
00108
languageChange();
00109 resize(
QSize(576, 528).expandedTo(minimumSizeHint()) );
00110 clearWState( WState_Polished );
00111
00112
00113 connect(
templatename_box, SIGNAL( activated(
int) ),
this, SLOT(
templateTypeChanged(
int) ) );
00114
00115
00116 setTabOrder(
templatename_box,
template_edit );
00117 setTabOrder(
template_edit,
filecase_box );
00118 setTabOrder(
filecase_box,
defcase_box );
00119 setTabOrder(
defcase_box,
supercase_box );
00120 setTabOrder(
supercase_box,
author_box );
00121 setTabOrder(
author_box,
doc_box );
00122
00123
00124
textLabel3_2->setBuddy(
defcase_box );
00125
textLabel3->setBuddy(
filecase_box );
00126
textLabel3_3->setBuddy(
supercase_box );
00127 }
00128
00129
00130
00131
00132 ClassGeneratorConfigBase::~ClassGeneratorConfigBase()
00133 {
00134
00135 }
00136
00137
00138
00139
00140
00141 void ClassGeneratorConfigBase::languageChange()
00142 {
00143 setCaption( tr2i18n(
"ClassGeneratorConfigBase" ) );
00144
groupBox7_2->setTitle( tr2i18n(
"Class &Templates" ) );
00145
templatename_box->clear();
00146
templatename_box->insertItem( tr2i18n(
"Cpp Header" ) );
00147
templatename_box->insertItem( tr2i18n(
"Cpp Source" ) );
00148
templatename_box->insertItem( tr2i18n(
"Objective-C Header" ) );
00149
templatename_box->insertItem( tr2i18n(
"Objective-C Source" ) );
00150
templatename_box->insertItem( tr2i18n(
"GTK C Header" ) );
00151
templatename_box->insertItem( tr2i18n(
"GTK C Source" ) );
00152
groupBox10->setTitle( tr2i18n(
"Names" ) );
00153
textLabel3_2->setText( tr2i18n(
"#ifndef - #&define names:" ) );
00154
textLabel3->setText( tr2i18n(
"&File names:" ) );
00155
filecase_box->clear();
00156
filecase_box->insertItem( tr2i18n(
"Lowercase" ) );
00157
filecase_box->insertItem( tr2i18n(
"Uppercase" ) );
00158
filecase_box->insertItem( tr2i18n(
"Same as Class Names" ) );
00159
defcase_box->clear();
00160
defcase_box->insertItem( tr2i18n(
"Lowercase" ) );
00161
defcase_box->insertItem( tr2i18n(
"Uppercase" ) );
00162
defcase_box->insertItem( tr2i18n(
"Same as Class Names" ) );
00163
defcase_box->insertItem( tr2i18n(
"Same as File Names" ) );
00164
defcase_box->setCurrentItem( 1 );
00165
supercase_box->clear();
00166
supercase_box->insertItem( tr2i18n(
"Lowercase" ) );
00167
supercase_box->insertItem( tr2i18n(
"Uppercase" ) );
00168
supercase_box->insertItem( tr2i18n(
"Same as Class Names" ) );
00169
textLabel3_3->setText( tr2i18n(
"&Superclass file names:" ) );
00170
groupBox9->setTitle( tr2i18n(
"Class Documentation" ) );
00171
author_box->setText( tr2i18n(
"Include &author name in class documentation" ) );
00172
doc_box->setText( tr2i18n(
"Generate &empty documentation strings" ) );
00173
reformat_box->setText( tr2i18n(
"&Reformat source before creating files" ) );
00174 }
00175
00176 void ClassGeneratorConfigBase::templateTypeChanged(
int)
00177 {
00178 qWarning(
"ClassGeneratorConfigBase::templateTypeChanged(int): Not implemented yet" );
00179 }
00180
00181
#include "classgeneratorconfigbase.moc"
This file is part of the documentation for KDevelop Version 3.0.4.