1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
|
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './menuEdit.ui'
**
** Created: dim. oct. 26 08:56:28 2008
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "menuEdit.h"
#include <qvariant.h>
#include <qlabel.h>
#include <kurlrequester.h>
#include <kcolorbutton.h>
#include <kpushbutton.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qframe.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "kurlrequester.h"
#include "klineedit.h"
#include "kpushbutton.h"
#include "kcolorbutton.h"
/*
* Constructs a menuEdit as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
menuEdit::menuEdit( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
if ( !name )
setName( "menuEdit" );
menuEditLayout = new QGridLayout( this, 1, 1, 2, 6, "menuEditLayout");
textLabel2 = new QLabel( this, "textLabel2" );
textLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, textLabel2->sizePolicy().hasHeightForWidth() ) );
menuEditLayout->addMultiCellWidget( textLabel2, 5, 6, 0, 0 );
textLabel1 = new QLabel( this, "textLabel1" );
textLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
menuEditLayout->addWidget( textLabel1, 4, 0 );
urBackground = new KURLRequester( this, "urBackground" );
menuEditLayout->addMultiCellWidget( urBackground, 4, 4, 1, 5 );
cbColor = new KColorButton( this, "cbColor" );
cbColor->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, cbColor->sizePolicy().hasHeightForWidth() ) );
menuEditLayout->addWidget( cbColor, 6, 1 );
bFont = new KPushButton( this, "bFont" );
bFont->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, bFont->sizePolicy().hasHeightForWidth() ) );
menuEditLayout->addWidget( bFont, 6, 2 );
cbPosTitle = new QComboBox( FALSE, this, "cbPosTitle" );
cbPosTitle->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, cbPosTitle->sizePolicy().hasHeightForWidth() ) );
menuEditLayout->addWidget( cbPosTitle, 6, 3 );
spacer1 = new QSpacerItem( 51, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
menuEditLayout->addMultiCell( spacer1, 6, 6, 4, 5 );
leTitle = new QLineEdit( this, "leTitle" );
menuEditLayout->addMultiCellWidget( leTitle, 5, 5, 1, 4 );
bAddText = new KPushButton( this, "bAddText" );
bAddText->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)4, 0, 0, bAddText->sizePolicy().hasHeightForWidth() ) );
bAddText->setMinimumSize( QSize( 24, 24 ) );
bAddText->setMaximumSize( QSize( 24, 24 ) );
menuEditLayout->addWidget( bAddText, 5, 5 );
lTitle = new QLabel( this, "lTitle" );
lTitle->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, lTitle->sizePolicy().hasHeightForWidth() ) );
QFont lTitle_font( lTitle->font() );
lTitle_font.setBold( TRUE );
lTitle->setFont( lTitle_font );
menuEditLayout->addMultiCellWidget( lTitle, 0, 0, 0, 5 );
textLabel1_2 = new QLabel( this, "textLabel1_2" );
menuEditLayout->addWidget( textLabel1_2, 2, 0 );
cbStart = new QComboBox( FALSE, this, "cbStart" );
menuEditLayout->addMultiCellWidget( cbStart, 2, 2, 1, 5 );
textLabel1_2_2 = new QLabel( this, "textLabel1_2_2" );
menuEditLayout->addWidget( textLabel1_2_2, 3, 0 );
cbEnd = new QComboBox( FALSE, this, "cbEnd" );
menuEditLayout->addMultiCellWidget( cbEnd, 3, 3, 1, 5 );
frame = new QFrame( this, "frame" );
frame->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, frame->sizePolicy().hasHeightForWidth() ) );
frame->setFrameShape( QFrame::StyledPanel );
frame->setFrameShadow( QFrame::Raised );
menuEditLayout->addMultiCellWidget( frame, 1, 1, 0, 5 );
languageChange();
resize( QSize(576, 682).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
// signals and slots connections
connect( bFont, SIGNAL( clicked() ), this, SLOT( bFontClick() ) );
connect( urBackground, SIGNAL( urlSelected(const QString&) ), this, SLOT( urBackgroundSelected(const QString&) ) );
connect( cbColor, SIGNAL( changed(const QColor&) ), this, SLOT( cbColorChanged(const QColor&) ) );
connect( leTitle, SIGNAL( textChanged(const QString&) ), this, SLOT( leTitleChanged(const QString&) ) );
connect( cbPosTitle, SIGNAL( activated(int) ), this, SLOT( cbPosTitleActivated(int) ) );
connect( bAddText, SIGNAL( clicked() ), this, SLOT( bAddTextClick() ) );
connect( cbStart, SIGNAL( activated(int) ), this, SLOT( cbStartActivated(int) ) );
connect( cbEnd, SIGNAL( activated(int) ), this, SLOT( cbEndActivated(int) ) );
// tab order
setTabOrder( cbStart, cbEnd );
setTabOrder( cbEnd, urBackground );
setTabOrder( urBackground, leTitle );
setTabOrder( leTitle, bAddText );
setTabOrder( bAddText, cbColor );
setTabOrder( cbColor, bFont );
setTabOrder( bFont, cbPosTitle );
}
/*
* Destroys the object and frees any allocated resources
*/
menuEdit::~menuEdit()
{
// no need to delete child widgets, Qt does it all for us
}
/*
* Sets the strings of the subwidgets using the current
* language.
*/
void menuEdit::languageChange()
{
setCaption( tr2i18n( "Edit Menu" ) );
textLabel2->setText( tr2i18n( "Text" ) );
textLabel1->setText( tr2i18n( "Background picture" ) );
cbColor->setText( QString::null );
bFont->setText( tr2i18n( "Font" ) );
cbPosTitle->clear();
cbPosTitle->insertItem( tr2i18n( "Bottom" ) );
cbPosTitle->insertItem( tr2i18n( "Right" ) );
bAddText->setText( QString::null );
bAddText->setAccel( QKeySequence( QString::null ) );
lTitle->setText( tr2i18n( "Root Menu" ) );
textLabel1_2->setText( tr2i18n( "At start" ) );
cbStart->clear();
cbStart->insertItem( tr2i18n( "Play menu" ) );
cbStart->insertItem( tr2i18n( "Play title 1" ) );
textLabel1_2_2->setText( tr2i18n( "At End" ) );
cbEnd->clear();
cbEnd->insertItem( tr2i18n( "Play root menu" ) );
cbEnd->insertItem( tr2i18n( "Play title menu" ) );
cbEnd->insertItem( tr2i18n( "Play title 1" ) );
}
void menuEdit::bFontClick()
{
qWarning( "menuEdit::bFontClick(): Not implemented yet" );
}
void menuEdit::urBackgroundSelected(const QString&)
{
qWarning( "menuEdit::urBackgroundSelected(const QString&): Not implemented yet" );
}
void menuEdit::cbColorChanged(const QColor&)
{
qWarning( "menuEdit::cbColorChanged(const QColor&): Not implemented yet" );
}
void menuEdit::leTitleChanged(const QString&)
{
qWarning( "menuEdit::leTitleChanged(const QString&): Not implemented yet" );
}
void menuEdit::cbPosTitleActivated(int)
{
qWarning( "menuEdit::cbPosTitleActivated(int): Not implemented yet" );
}
void menuEdit::bAddTextClick()
{
qWarning( "menuEdit::bAddTextClick(): Not implemented yet" );
}
void menuEdit::cbStartActivated(int)
{
qWarning( "menuEdit::cbStartActivated(int): Not implemented yet" );
}
void menuEdit::cbEndActivated(int)
{
qWarning( "menuEdit::cbEndActivated(int): Not implemented yet" );
}
#include "menuEdit.moc"
|