Subversion Repositories Scribus

Rev

Rev 23 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 paul 1
/****************************************************************************
2
** Form implementation generated from reading ui file 'Help.ui'
3
**
4
** Created: Tue Jul 3 21:51:52 2001
5
**      by:  The User Interface Compiler (uic)
6
**
7
** WARNING! All changes made in this file will be lost!
8
****************************************************************************/
9
#include "helpbrowser.h"
10
#include "helpbrowser.moc"
11
#include <qpushbutton.h>
12
#include <qtextbrowser.h>
13
#include <qtoolbutton.h>
14
#include <qlayout.h>
15
#include <qvariant.h>
16
#include <qtooltip.h>
17
#include <qimage.h>
18
#include <qpixmap.h>
19
#include <qtextcodec.h>
20
#include <qfileinfo.h>
21
#include <config.h>
22
extern QPixmap loadIcon(QString nam);
23
 
24
static const char* const image0_data[] = {
25
"16 16 85 2",
26
"Qt c None",
27
".c c #000000",
28
".a c #181418",
29
".K c #201c20",
30
".z c #202020",
31
".p c #292429",
32
".b c #292829",
33
".k c #312829",
34
".2 c #313031",
35
"#q c #313431",
36
".T c #393031",
37
"#r c #393431",
38
"#s c #393439",
39
".# c #393839",
40
"#p c #393c39",
41
".U c #410808",
42
".3 c #413c41",
43
".l c #414441",
44
".G c #4a484a",
45
"#n c #521c08",
46
".F c #524c52",
47
".y c #525052",
48
".g c #525552",
49
".o c #5a595a",
50
".n c #625d62",
51
".d c #626162",
52
".E c #626562",
53
".7 c #6a2400",
54
".0 c #6a2808",
55
"#k c #6a2c00",
56
".u c #6a656a",
57
".r c #6a696a",
58
".H c #6a6d6a",
59
"#h c #732400",
60
".P c #732808",
61
".q c #737173",
62
"#e c #7b4410",
63
"#a c #834818",
64
".j c #838183",
65
".8 c #8b5929",
66
".m c #8b898b",
67
".X c #946941",
68
".O c #946d41",
69
".S c #948d94",
70
".4 c #9c6d4a",
71
".i c #9c959c",
72
".f c #9c999c",
73
".L c #9c9d9c",
74
"#m c #a44000",
75
".t c #a4a1a4",
76
".V c #a4a5a4",
77
"#g c #ac4800",
78
".s c #acaaac",
79
"#l c #b44400",
80
"#d c #b4aeb4",
81
".h c #b4b2b4",
82
".J c #b4b6b4",
83
"#. c #bd5500",
84
".x c #bdb6bd",
85
".I c #bdbabd",
86
".v c #bdbebd",
87
"#c c #c55900",
88
".e c #c5c2c5",
89
".Q c #d5beb4",
90
".N c #d5bebd",
91
".6 c #de6500",
92
"#f c #de7931",
93
"#b c #de955a",
94
"#o c #ded6d5",
95
"#i c #ded6de",
96
"#j c #dedade",
97
".R c #dedede",
98
".9 c #e6a57b",
99
".Z c #e6baa4",
100
".5 c #e6c6b4",
101
".W c #e6dee6",
102
".M c #e6e2e6",
103
".1 c #e6e6e6",
104
"## c #eee2e6",
105
".D c #eee6ee",
106
".w c #eeeaee",
107
".Y c #f6e2d5",
108
".A c #f6f2f6",
109
".B c #fffaff",
110
".C c #ffffff",
111
"QtQtQtQtQtQtQt.#.aQtQtQtQtQtQtQt",
112
"QtQtQt.b.cQt.d.e.f.#QtQtQtQtQtQt",
113
"QtQtQt.b.c.g.e.h.i.j.bQtQtQtQtQt",
114
"QtQtQt.k.l.e.m.n.o.d.j.pQtQtQtQt",
115
"QtQtQt.g.e.q.r.s.t.u.g.j.pQtQtQt",
116
"QtQt.g.e.q.r.v.w.w.x.r.y.j.zQtQt",
117
"Qt.d.e.q.u.v.A.B.C.D.x.E.F.j.pQt",
118
".G.e.H.u.I.A.B.B.B.B.A.J.d.G.j.K",
119
"Qt.b.b.L.M.B.N.O.P.Q.C.R.S.T.UQt",
120
"QtQt.b.V.W.B.X.Y.Z.0.B.1.i.2QtQt",
121
"QtQt.3.s.1.B.4.5.6.7.C.M.s.bQtQt",
122
"QtQt.#.s.M.B.8.9#..7.B##.s.bQtQt",
123
"QtQt.3.s.D.B#a#b#c.7.C.M#d.bQtQt",
124
"QtQt.#.s.M.B#e#f#g#h.B.M.s.bQtQt",
125
"QtQt.3.t#i#j#k#l#m#n#j#o.t.bQtQt",
126
"QtQtQt#p#q#r.b.b.b.b.2#s.b.bQtQt"};
127
 
128
static const char* const image1_data[] = {
129
"16 16 95 2",
130
"Qt c None",
131
"#w c None",
132
".n c None",
133
"#q c None",
134
".k c None",
135
".l c None",
136
".p c None",
137
".r c None",
138
".j c None",
139
".g c None",
140
".w c None",
141
"#b c None",
142
"#e c None",
143
".s c None",
144
"#v c None",
145
".A c None",
146
".d c None",
147
"#B c None",
148
".h c None",
149
".# c None",
150
".B c None",
151
".U c None",
152
"#x c None",
153
"#r c None",
154
"#A c None",
155
"#C c None",
156
".q c None",
157
"#c c None",
158
".b c None",
159
".i c None",
160
".F c None",
161
".a c None",
162
"#d c None",
163
".m c None",
164
".c c None",
165
".f c None",
166
".e c None",
167
".v c None",
168
"#u c None",
169
".G c None",
170
".z c #000000",
171
"#z c #081020",
172
".T c #081829",
173
"#y c #081831",
174
"#a c #081c29",
175
".2 c #081c31",
176
"#f c #082031",
177
"#n c #082439",
178
"#p c #082839",
179
".Y c #0895bd",
180
".3 c #101420",
181
"#o c #102841",
182
".K c #104462",
183
".t c #104c73",
184
".o c #105073",
185
"#s c #105573",
186
".L c #10557b",
187
"#l c #10597b",
188
"#m c #106183",
189
"#k c #1081a4",
190
".0 c #1095bd",
191
".Z c #1099bd",
192
".X c #1099c5",
193
".7 c #10a1cd",
194
".H c #18486a",
195
".C c #184c6a",
196
".x c #184c73",
197
".M c #185573",
198
".4 c #18597b",
199
"#j c #1891b4",
200
".5 c #1891bd",
201
".W c #18b2cd",
202
".O c #18b6d5",
203
".u c #203852",
204
"#h c #2095b4",
205
"#t c #20a5cd",
206
"#i c #2999b4",
207
".8 c #29bede",
208
"## c #29cad5",
209
".6 c #39dae6",
210
".9 c #41d6e6",
211
"#. c #4adae6",
212
"#g c #4adeee",
213
".1 c #5aaec5",
214
".J c #5ac6de",
215
".N c #7bd6e6",
216
".y c #83a1bd",
217
".D c #83a1c5",
218
".S c #83c6e6",
219
".P c #a4e2f6",
220
".Q c #cdeeff",
221
".R c #d5eeff",
222
".V c #deeeff",
223
".E c #e6f2ff",
224
".I c #ffffff",
225
"Qt.#Qt.#.a.b.c.d.e.f.g.d.e.f.g.d",
226
".h.g.i.j.k.l.m.n.oQt.p.n.p.gQt.j",
227
"Qt.#Qt.#.q.r.s.t.u.rQt.rQt.rQt.r",
228
".v.j.w.gQt.j.x.y.z.jQt.gQt.j.A.g",
229
".g.r.B.rQt.C.D.E.zQt.g.r.g.r.F.r",
230
"QtQt.G.B.H.y.I.J.K.L.o.L.o.LQtQt",
231
"Qt.rQt.M.D.I.N.O.P.Q.I.R.S.T.U.#",
232
".GQt.t.y.V.J.W.X.Y.Z.0.Z.1.2Qt.g",
233
".U.#.3.4.5.6.7.X.8.9#.##.8#a#b#c",
234
"#dQt#e#f.L.5#g.7.Z#h#i#j#k.z.p.j",
235
".g.r.g.r.T#l.5.6#m#n#o#p.z.z#qQt",
236
".p.j.p.g#r.T#s#t.zQt.pQt.p#u.pQt",
237
"#v.rQt.r#w#x#y#s.z.r.g.r.g.c.g.r",
238
".p.g.A#c#dQt#e#z.z.g.p.j#A.g.p.j",
239
".g.r#B.r.g.r.g.r.z.r.g.r.g.r.g.r",
240
".p.j.p#C.p.j.p.g#e.j.p.g.p.jQtQt"};
241
 
242
static const char* const image2_data[] = {
243
"16 16 87 2",
244
".b c None",
245
".z c None",
246
"#u c None",
247
".i c None",
248
".j c None",
249
".o c None",
250
".g c None",
251
".e c None",
252
".B c None",
253
".w c None",
254
".E c None",
255
".u c None",
256
".d c None",
257
".c c None",
258
".h c None",
259
".D c None",
260
".q c None",
261
".f c None",
262
".p c None",
263
".v c None",
264
".x c None",
265
".m c None",
266
".a c None",
267
".# c None",
268
".y c None",
269
".t c None",
270
".C c None",
271
".n c None",
272
".G c None",
273
".F c None",
274
".k c None",
275
"Qt c None",
276
"#t c #000000",
277
"## c #000408",
278
"#p c #000810",
279
"#i c #000c18",
280
"#n c #080c10",
281
"#r c #081018",
282
"#k c #081420",
283
"#l c #081820",
284
"#s c #082841",
285
".Y c #088db4",
286
".W c #0895c5",
287
"#j c #103452",
288
".l c #103852",
289
".s c #10385a",
290
"#q c #10405a",
291
"#o c #104462",
292
".K c #104c6a",
293
".r c #104c73",
294
"#m c #10597b",
295
"#h c #10658b",
296
".1 c #10698b",
297
"#. c #106994",
298
".X c #1095bd",
299
"#f c #1099bd",
300
".Z c #1099c5",
301
".U c #109dc5",
302
".7 c #10a1c5",
303
".0 c #10a5cd",
304
".V c #10aecd",
305
"#g c #10c2de",
306
"#a c #18405a",
307
".O c #185073",
308
"#e c #1895b4",
309
".9 c #18a1c5",
310
".6 c #18bad5",
311
".H c #204862",
312
".L c #294c6a",
313
"#c c #2991ac",
314
"#d c #2995b4",
315
".A c #317d9c",
316
".J c #3181a4",
317
".4 c #41d2de",
318
".5 c #4adeee",
319
".8 c #4ae2ee",
320
".T c #5ac2de",
321
"#b c #6aa5c5",
322
".3 c #94ceee",
323
".P c #a4cee6",
324
".M c #acdeee",
325
".S c #c5e2f6",
326
".2 c #d5e6f6",
327
".I c #e6f2ff",
328
".Q c #e6f6ff",
329
".R c #f6f6ff",
330
".N c #ffffff",
331
"Qt.#Qt.a.b.c.d.e.f.c.d.e.b.c.g.e",
332
".b.h.i.h.j.h.k.l.m.h.n.h.o.h.b.h",
333
".f.e.p.c.#.e.q.r.s.e.t.c.u.e.v.c",
334
".w.h.x.h.y.h.z.r.A.l.B.h.C.h.e.h",
335
".D.c.E.e.F.#.G.H.I.J.s.e.D.c.D.e",
336
".e.h.K.r.r.r.H.L.M.N.A.l.e.h.e.h",
337
".D.e.O.P.Q.R.Q.S.T.U.N.J.s.e.D.c",
338
".e.h.r.R.T.V.W.X.Y.Z.0.I.1.l.e.h",
339
".D.c.L.2.3.4.5.6.Z.7.8.9#.##.D.e",
340
".e.h#a#b#c#d#e#f#g.8.9#h#i.h.e.h",
341
".D.e#j#k#k#k#l#m.8.9#.#n.D.e.D.c",
342
".e.h.e.h.e.h.e#o.9#h#p.h.e.h.e.h",
343
".D.c.D.e.D.c.D#q#.#r.D.e.D.c.D.e",
344
".e.h.e.h.e.h.e#s##.h.e.h.e.h.e.h",
345
".D.e.D.c.D.e.D#t.D.e.D.c.D.e.D.c",
346
".e.h#u.h.B.#.B.#.e.h.e.h.e.h.e.h"};
347
 
348
 
349
/*
350
 *  Constructs a HelpBrowser which is a child of 'parent', with the
351
 *  name 'name' and widget flags set to 'f'
352
 *
353
 *  The dialog will by default be modeless, unless you set 'modal' to
354
 *  TRUE to construct a modal dialog.
355
 */
356
HelpBrowser::HelpBrowser( QWidget* parent, QString Capt, QString Datei )
357
    : QWidget( parent, "Help", WType_TopLevel | WDestructiveClose )
358
{
359
    QPixmap image0( ( const char** ) image0_data );
360
    QPixmap image1( ( const char** ) image1_data );
361
    QPixmap image2( ( const char** ) image2_data );
362
    resize( 547, 450 );
363
    setCaption( Capt );
364
        setIcon(loadIcon("AppIcon.xpm"));
365
    HelpBrowserLayout = new QVBoxLayout( this );
366
    HelpBrowserLayout->setSpacing( 2 );
367
    HelpBrowserLayout->setMargin( 2 );
368
 
369
    Layout13 = new QHBoxLayout;
370
    Layout13->setSpacing( 6 );
371
    Layout13->setMargin( 0 );
372
 
373
    HomeB = new QToolButton( this, "HomeB" );
374
    HomeB->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, HomeB->sizePolicy().hasHeightForWidth() ) );
375
    HomeB->setMinimumSize( QSize( 0, 0 ) );
376
    HomeB->setMaximumSize( QSize( 32767, 32767 ) );
377
    HomeB->setText( tr( "" ) );
378
    HomeB->setPixmap( image0 );
379
    Layout13->addWidget( HomeB );
380
 
381
    BackB = new QToolButton( this, "BackB" );
382
    BackB->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, BackB->sizePolicy().hasHeightForWidth() ) );
383
    BackB->setMinimumSize( QSize( 0, 0 ) );
384
    BackB->setMaximumSize( QSize( 32767, 32767 ) );
385
    BackB->setPixmap( image1 );
386
    Layout13->addWidget( BackB );
387
 
388
    ForwB = new QToolButton( this, "ForwB" );
389
    ForwB->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, ForwB->sizePolicy().hasHeightForWidth() ) );
390
    ForwB->setMinimumSize( QSize( 0, 0 ) );
391
    ForwB->setMaximumSize( QSize( 32767, 32767 ) );
392
    ForwB->setPixmap( image2 );
393
    Layout13->addWidget( ForwB );
394
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
395
    Layout13->addItem( spacer );
396
    HelpBrowserLayout->addLayout( Layout13 );
397
 
398
    Anzeige = new QTextBrowser( this, "Anzeige" );
399
    Anzeige->setFrameShape( QTextBrowser::StyledPanel );
400
        QString pfad = PREL;
401
        QString pfad2;
402
        bool Avail = true;
403
                if (Datei == "")
404
                pfad2 = pfad + "/lib/scribus/doc/"+QString(QTextCodec::locale()).left(2)+"/index.html";
405
                else
406
                        pfad2 = Datei;
407
        QFileInfo fi;
408
        fi = QFileInfo(pfad2);
409
        if (!fi.exists())
410
                {
411
                pfad2 = pfad + "/lib/scribus/doc/en/index.html";
412
                fi = QFileInfo(pfad2);
413
                if (!fi.exists())
414
                        {
415
                        Anzeige->setText("<h2>"+tr("Sorry, no Manual available!")+"</h2>");
416
                        Avail = false;
417
                        }
418
                }
419
        if (Avail)
420
        Anzeige->setSource(pfad2);
421
    HelpBrowserLayout->addWidget( Anzeige );
422
 
423
    // signals and slots connections
424
    connect( HomeB, SIGNAL( clicked() ), Anzeige, SLOT( home() ) );
425
    connect( ForwB, SIGNAL( clicked() ), Anzeige, SLOT( forward() ) );
426
    connect( BackB, SIGNAL( clicked() ), Anzeige, SLOT( backward() ) );
427
}
428