src/generalinfowidgetbase.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 "generalinfowidgetbase.h"
00013
00014
#include <qvariant.h>
00015
#include <kdialog.h>
00016
#include <qcombobox.h>
00017
#include <qlabel.h>
00018
#include <qtextedit.h>
00019
#include <qlineedit.h>
00020
#include <ksqueezedtextlabel.h>
00021
#include <qlayout.h>
00022
#include <qtooltip.h>
00023
#include <qwhatsthis.h>
00024
#include <qimage.h>
00025
#include <qpixmap.h>
00026
00027 static const char*
const img0_generalinfowidgetbase[] = {
00028
"16 16 72 2",
00029
"Qt c None",
00030
".L c #000000",
00031
"#c c #100000",
00032
".B c #180000",
00033
".d c #180400",
00034
"#. c #390000",
00035
".K c #410000",
00036
".m c #4a3839",
00037
"#b c #520000",
00038
".s c #52484a",
00039
"#e c #940400",
00040
"## c #ac0000",
00041
"#d c #b40000",
00042
"#f c #b40408",
00043
".8 c #b40808",
00044
".A c #b43031",
00045
".4 c #bd0408",
00046
".l c #bd4c4a",
00047
".Y c #c50400",
00048
"#a c #c50408",
00049
".T c #cd0c08",
00050
".r c #d56562",
00051
".J c #de1c20",
00052
".9 c #f60000",
00053
".c c #f6797b",
00054
".1 c #ff0000",
00055
".X c #ff0400",
00056
".5 c #ff0808",
00057
".V c #ff0c08",
00058
".Z c #ff1010",
00059
".0 c #ff1410",
00060
".t c #ff1818",
00061
".2 c #ff1c18",
00062
".M c #ff2020",
00063
".U c #ff2420",
00064
".S c #ff2829",
00065
".C c #ff3431",
00066
".R c #ff3839",
00067
".N c #ff4041",
00068
".I c #ff4441",
00069
".H c #ff5052",
00070
".D c #ff5552",
00071
".z c #ff595a",
00072
".y c #ff6d6a",
00073
".v c #ff7173",
00074
".q c #ff7573",
00075
".# c #ff797b",
00076
".x c #ff7d7b",
00077
".u c #ff8183",
00078
".a c #ff8583",
00079
".b c #ff898b",
00080
".p c #ff8d8b",
00081
".E c #ff9194",
00082
".o c #ff999c",
00083
".7 c #ff9d9c",
00084
".w c #ffa1a4",
00085
".k c #ffa5a4",
00086
".n c #ffaaac",
00087
".O c #ffaeac",
00088
".f c #ffb2b4",
00089
".j c #ffb6b4",
00090
".g c #ffbabd",
00091
".i c #ffbebd",
00092
".h c #ffc2c5",
00093
".3 c #ffdade",
00094
".G c #ffdede",
00095
".P c #ffe2e6",
00096
".6 c #ffe6e6",
00097
".W c #fff2f6",
00098
".F c #fff6f6",
00099
".Q c #fffaff",
00100
".e c #ffffff",
00101
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
00102
"QtQtQtQt.#.a.b.b.b.b.c.dQtQtQtQt",
00103
"QtQt.e.b.f.g.h.h.i.j.k.l.mQtQtQt",
00104
"QtQt.j.n.o.b.p.p.b.#.q.q.r.sQtQt",
00105
"Qt.t.o.u.v.w.x.#.y.b.#.z.z.A.BQt",
00106
"Qt.C.b.D.E.e.h.D.v.F.G.H.I.J.K.L",
00107
"Qt.M.D.N.D.g.e.O.P.Q.v.R.S.T.K.L",
00108
"Qt.t.U.V.S.U.w.e.W.H.t.t.X.Y.K.L",
00109
"Qt.Z.0.1.1.2.3.W.e.a.1.1.1.4.K.L",
00110
"Qt.X.5.1.C.6.W.C.u.e.7.X.1.8.K.L",
00111
"Qt.9.1.1.U.h.N.1.1.o.p.X.1.8#..L",
00112
"Qt.B##.1.1.X.1.1.1.1.1.1#a#b.L.L",
00113
"QtQt#c#d.1.1.1.1.1.1.1#a#b.L.L.L",
00114
"QtQtQt#c#e.8.8.8.8.8#f#b.L.L.LQt",
00115
"QtQtQtQt#c.K.K.K.K.K#..L.L.LQtQt",
00116
"QtQtQtQtQt.L.L.L.L.L.L.L.LQtQtQt"};
00117
00118
00119
00120
00121
00122
00123 GeneralInfoWidgetBase::GeneralInfoWidgetBase(
QWidget* parent,
const char* name, WFlags fl )
00124 :
QWidget( parent, name, fl ),
00125 image0( (const char **)
img0_generalinfowidgetbase )
00126 {
00127
if ( !name )
00128 setName(
"general_info_widget" );
00129
general_info_widgetLayout =
new QGridLayout(
this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(),
"general_info_widgetLayout");
00130
00131
project_directory_combo =
new QComboBox( FALSE,
this,
"project_directory_combo" );
00132
00133
general_info_widgetLayout->addWidget(
project_directory_combo, 0, 4 );
00134
spacer1 =
new QSpacerItem( 408, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00135
general_info_widgetLayout->addMultiCell(
spacer1, 4, 4, 3, 4 );
00136
00137
description_label =
new QLabel(
this,
"description_label" );
00138
00139
general_info_widgetLayout->addMultiCellWidget(
description_label, 5, 5, 0, 4 );
00140
00141
description_edit =
new QTextEdit(
this,
"description_edit" );
00142
00143
general_info_widgetLayout->addMultiCellWidget(
description_edit, 6, 6, 0, 4 );
00144
00145
project_directory_label =
new QLabel(
this,
"project_directory_label" );
00146
00147
general_info_widgetLayout->addWidget(
project_directory_label, 0, 0 );
00148
00149
author_label =
new QLabel(
this,
"author_label" );
00150
00151
general_info_widgetLayout->addWidget(
author_label, 2, 0 );
00152
00153
email_label =
new QLabel(
this,
"email_label" );
00154
00155
general_info_widgetLayout->addWidget(
email_label, 3, 0 );
00156
00157
version_label =
new QLabel(
this,
"version_label" );
00158
00159
general_info_widgetLayout->addWidget(
version_label, 4, 0 );
00160
00161
version_edit =
new QLineEdit(
this,
"version_edit" );
00162
version_edit->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0,
version_edit->sizePolicy().hasHeightForWidth() ) );
00163
version_edit->setMaximumSize(
QSize( 100, 32767 ) );
00164
00165
general_info_widgetLayout->addMultiCellWidget(
version_edit, 4, 4, 1, 2 );
00166
00167
email_edit =
new QLineEdit(
this,
"email_edit" );
00168
00169
general_info_widgetLayout->addMultiCellWidget(
email_edit, 3, 3, 1, 4 );
00170
00171
author_edit =
new QLineEdit(
this,
"author_edit" );
00172
00173
general_info_widgetLayout->addMultiCellWidget(
author_edit, 2, 2, 1, 4 );
00174
00175
project_directory_diagnostic_icon =
new QLabel(
this,
"project_directory_diagnostic_icon" );
00176
project_directory_diagnostic_icon->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0,
project_directory_diagnostic_icon->sizePolicy().hasHeightForWidth() ) );
00177
project_directory_diagnostic_icon->setMinimumSize(
QSize( 16, 16 ) );
00178
project_directory_diagnostic_icon->setMaximumSize(
QSize( 16, 16 ) );
00179
QFont project_directory_diagnostic_icon_font(
project_directory_diagnostic_icon->font() );
00180 project_directory_diagnostic_icon_font.setPointSize( 10 );
00181
project_directory_diagnostic_icon->setFont( project_directory_diagnostic_icon_font );
00182
project_directory_diagnostic_icon->setPixmap(
image0 );
00183
00184
general_info_widgetLayout->addWidget(
project_directory_diagnostic_icon, 1, 1 );
00185
00186
project_directory_edit =
new QLineEdit(
this,
"project_directory_edit" );
00187
00188
general_info_widgetLayout->addMultiCellWidget(
project_directory_edit, 0, 0, 1, 3 );
00189
00190
project_directory_diagnostic_label =
new KSqueezedTextLabel(
this,
"project_directory_diagnostic_label" );
00191
QFont project_directory_diagnostic_label_font(
project_directory_diagnostic_label->font() );
00192 project_directory_diagnostic_label_font.setPointSize( 10 );
00193
project_directory_diagnostic_label->setFont( project_directory_diagnostic_label_font );
00194
00195
general_info_widgetLayout->addMultiCellWidget(
project_directory_diagnostic_label, 1, 1, 2, 4 );
00196
languageChange();
00197 resize(
QSize(659, 444).expandedTo(minimumSizeHint()) );
00198 clearWState( WState_Polished );
00199 }
00200
00201
00202
00203
00204 GeneralInfoWidgetBase::~GeneralInfoWidgetBase()
00205 {
00206
00207 }
00208
00209
00210
00211
00212
00213 void GeneralInfoWidgetBase::languageChange()
00214 {
00215 setCaption( tr2i18n(
"General Settings" ) );
00216
project_directory_combo->clear();
00217
project_directory_combo->insertItem( tr2i18n(
"Absolute Path" ) );
00218
project_directory_combo->insertItem( tr2i18n(
"Relative to Project File" ) );
00219
description_label->setText( tr2i18n(
"Description:" ) );
00220
project_directory_label->setText( tr2i18n(
"Project directory:" ) );
00221
author_label->setText( tr2i18n(
"Author:" ) );
00222
email_label->setText( tr2i18n(
"Email:" ) );
00223
version_label->setText( tr2i18n(
"Version:" ) );
00224
project_directory_diagnostic_icon->setText( QString::null );
00225
project_directory_diagnostic_label->
setText( tr2i18n(
"Please select a project directory" ) );
00226 }
00227
00228
#include "generalinfowidgetbase.moc"
This file is part of the documentation for KDevelop Version 3.0.4.