By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 1819
Collapse All | Expand All

(-)tdegraphics/CMakeLists.txt (-2 / +2 lines)
Lines 80-86 Link Here
80
option( BUILD_TDEFILE_PLUGINS "Build tdefile-plugins" ${BUILD_ALL} )
80
option( BUILD_TDEFILE_PLUGINS "Build tdefile-plugins" ${BUILD_ALL} )
81
option( BUILD_KGAMMA "Build kgamma" ${BUILD_ALL} )
81
option( BUILD_KGAMMA "Build kgamma" ${BUILD_ALL} )
82
option( BUILD_KGHOSTVIEW "Build kghostview" ${BUILD_ALL} )
82
option( BUILD_KGHOSTVIEW "Build kghostview" ${BUILD_ALL} )
83
option( BUILD_KICONEDIT "Build kiconedit" ${BUILD_ALL} )
83
option( BUILD_TDEICONEDIT "Build tdeiconedit" ${BUILD_ALL} )
84
option( BUILD_KMRML "Build kmrml" ${BUILD_ALL} )
84
option( BUILD_KMRML "Build kmrml" ${BUILD_ALL} )
85
option( BUILD_KOLOURPAINT "Build kolourpaint" ${BUILD_ALL} )
85
option( BUILD_KOLOURPAINT "Build kolourpaint" ${BUILD_ALL} )
86
option( BUILD_KOOKA "Build kooka" ${BUILD_ALL} )
86
option( BUILD_KOOKA "Build kooka" ${BUILD_ALL} )
Lines 133-139 Link Here
133
tde_conditional_add_subdirectory( BUILD_TDEFILE_PLUGINS tdefile-plugins )
133
tde_conditional_add_subdirectory( BUILD_TDEFILE_PLUGINS tdefile-plugins )
134
tde_conditional_add_subdirectory( BUILD_KGAMMA kgamma )
134
tde_conditional_add_subdirectory( BUILD_KGAMMA kgamma )
135
tde_conditional_add_subdirectory( BUILD_KGHOSTVIEW kghostview )
135
tde_conditional_add_subdirectory( BUILD_KGHOSTVIEW kghostview )
136
tde_conditional_add_subdirectory( BUILD_KICONEDIT kiconedit )
136
tde_conditional_add_subdirectory( BUILD_TDEICONEDIT tdeiconedit )
137
tde_conditional_add_subdirectory( BUILD_KMRML kmrml )
137
tde_conditional_add_subdirectory( BUILD_KMRML kmrml )
138
tde_conditional_add_subdirectory( BUILD_KOLOURPAINT kolourpaint )
138
tde_conditional_add_subdirectory( BUILD_KOLOURPAINT kolourpaint )
139
tde_conditional_add_subdirectory( BUILD_KOOKA kooka )
139
tde_conditional_add_subdirectory( BUILD_KOOKA kooka )
(-)tdegraphics/README (-1 / +1 lines)
Lines 38-44 Link Here
38
* kghostview
38
* kghostview
39
    Program (and embeddable KPart) to display *.pdf and *.ps
39
    Program (and embeddable KPart) to display *.pdf and *.ps
40
40
41
* kiconedit
41
* tdeiconedit
42
    An icon editor.
42
    An icon editor.
43
43
44
* kmrml
44
* kmrml
(-)tdegraphics/doc/kiconedit/CMakeLists.txt (-12 lines)
Lines 1-12 Link Here
1
#################################################
2
#
3
#  (C) 2010-2011 Serghei Amelian
4
#  serghei (DOT) amelian (AT) gmail.com
5
#
6
#  Improvements and feedback are welcome
7
#
8
#  This file is released under GPL >= 2
9
#
10
#################################################
11
12
tde_create_handbook( DESTINATION kiconedit )
(-)tdegraphics/doc/kiconedit/Makefile.am (-4 lines)
Lines 1-4 Link Here
1
2
KDE_LANG = en
3
KDE_DOCS = AUTO
4
(-)tdegraphics/doc/kiconedit/index.docbook (-1083 lines)
Lines 1-1083 Link Here
1
<?xml version="1.0" ?>
2
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
3
  <!ENTITY kappname "&kiconedit;">
4
  <!ENTITY package "tdegraphics">
5
  <!ENTITY % English "INCLUDE" > <!-- change language only here -->
6
  <!ENTITY % addindex "IGNORE">
7
]>
8
9
<book lang="&language;">
10
<bookinfo>
11
<title>The &kiconedit; Manual</title>
12
<authorgroup>
13
<author>
14
<firstname>Thomas</firstname>
15
<surname>Tanghus</surname>
16
<affiliation>
17
<address>&Thomas.Tanghus.mail;</address>
18
</affiliation>
19
</author>
20
21
<!-- TRANS:ROLES_OF_TRANSLATORS -->
22
23
</authorgroup>
24
25
<copyright>
26
<year>1997</year>
27
<holder>&Thomas.Tanghus;</holder>
28
</copyright>
29
<copyright>
30
<year>2001</year><year>2003</year>
31
<holder>&Lauri.Watts;</holder>
32
</copyright>
33
34
<legalnotice>
35
&FDLNotice;
36
</legalnotice>
37
38
<date>2005-12-10</date>
39
<releaseinfo>3.5.0</releaseinfo>
40
41
<abstract>
42
<para>
43
&kiconedit; is designed to help create icons for &kde; using the
44
standard icon palette.
45
</para>
46
</abstract>
47
48
<keywordset>
49
<keyword>KDE</keyword>
50
<keyword>tdegraphics</keyword>
51
<keyword>TDEIconEdit</keyword>
52
<keyword>icon</keyword>
53
</keywordset>
54
</bookinfo>
55
56
<chapter id="Introduction">
57
<title>Introduction</title>
58
59
<blockquote>
60
<attribution>&Thomas.Tanghus;
61
&Thomas.Tanghus.mail;</attribution>
62
63
<para>
64
&kiconedit; is designed to help create icons for &kde; using the
65
standard icon palette.
66
</para>
67
68
<para>
69
I hope you will find this program somehow useful and I would
70
appreciate any suggestions and comments.
71
</para>
72
73
</blockquote>
74
75
</chapter>
76
77
<chapter id="onscreen-fundamentals">
78
<title>Onscreen Fundamentals</title>
79
80
<para>
81
In this section will be briefly described the Icon Editor user
82
interface.
83
</para>
84
85
<para>
86
The Icon Editor window is separated in five areas: main toolbar, tools
87
toolbar, statusbar, color palette and the grid, where you paint the icon.
88
</para>
89
90
<sect1 id="main-toolbar">
91
<title>Main Toolbar</title>
92
93
<variablelist>
94
95
<varlistentry>
96
<term><guiicon>New</guiicon></term>
97
<listitem>
98
<para>
99
<action>Create a new icon.</action> If the current file has been
100
modified you will be asked if you want to save the changes. After that a
101
dialog will open where you can choose to create the icon from scratch or
102
from a template.
103
</para>
104
</listitem>
105
</varlistentry>
106
107
<varlistentry>
108
<term><guiicon>Open</guiicon></term>
109
<listitem>
110
<para>
111
<action>Open an existing icon file.</action>
112
</para>
113
</listitem>
114
</varlistentry>
115
116
<varlistentry>
117
<term><guiicon>Save</guiicon></term>
118
<listitem>
119
<para>
120
<action>Save the currently open icon.</action>
121
</para>
122
</listitem>
123
</varlistentry>
124
125
<varlistentry>
126
<term><guiicon>Print</guiicon></term>
127
<listitem>
128
<para>
129
<action>Print the icon.</action>
130
</para>
131
</listitem>
132
</varlistentry>
133
134
<varlistentry>
135
<term><guiicon>Undo</guiicon></term>
136
<listitem><para>Undo the last action</para></listitem>
137
</varlistentry>
138
139
<varlistentry>
140
<term><guiicon>Redo</guiicon></term>
141
<listitem><para>Redo the last action undone.  If no actions have been
142
undone, this action is disabled.</para></listitem>
143
</varlistentry>
144
145
<varlistentry>
146
<term><guiicon>Cut</guiicon></term>
147
<listitem>
148
<para>
149
<action>Cuts out the entire icon and put it onto the clipboard.</action>
150
</para>
151
</listitem>
152
</varlistentry>
153
154
<varlistentry>
155
<term><guiicon>Copy</guiicon></term>
156
<listitem>
157
<para>
158
<action>Copies the entire icon to the clipboard.</action>
159
</para>
160
</listitem>
161
</varlistentry>
162
163
<varlistentry>
164
<term><guiicon>Paste</guiicon></term>
165
<listitem>
166
<para>
167
<action>Paste the contents of the clipboard as a new image (if the
168
clipboard contains a valid icon).</action>
169
</para>
170
</listitem>
171
</varlistentry>
172
173
<varlistentry>
174
<term><guiicon>Zoom</guiicon></term>
175
<term><guiicon>Zoom In</guiicon></term>
176
<term><guiicon>Zoom Out</guiicon></term>
177
<listitem>
178
<para>
179
<action>Zoom to predefined zoom factor, zoom in or zoom out.</action>
180
</para>
181
</listitem>
182
</varlistentry>
183
184
<varlistentry>
185
<term><guiicon>Resize</guiicon></term>
186
<listitem>
187
<para>
188
<action>Resize icon to width X height.</action>
189
</para>
190
</listitem>
191
</varlistentry>
192
193
<varlistentry>
194
<term><action>GrayScale</action></term>
195
<listitem>
196
<para>
197
<action>Gray scale the icon image.</action> This may create colors not
198
conformant to the &kde; icon palette.
199
</para>
200
</listitem>
201
</varlistentry>
202
203
<varlistentry>
204
<term><guiicon>Show Grid</guiicon></term>
205
<listitem>
206
<para>
207
<action>Toggle grid on/off.</action>
208
</para>
209
</listitem>
210
</varlistentry>
211
</variablelist>
212
213
</sect1>
214
215
<sect1 id="tools-toolbar">
216
<title>Tools Toolbar</title>
217
218
<para>
219
This toolbar contains the tools you can use to manipulate the
220
icon.
221
</para>
222
223
<variablelist>
224
<varlistentry>
225
<term><guiicon>Freehand</guiicon></term>
226
<listitem>
227
<para>
228
<action>Draw free hand.</action>
229
</para>
230
</listitem>
231
</varlistentry>
232
233
<varlistentry>
234
<term><guiicon>Color Picker</guiicon></term>
235
<listitem>
236
<para>
237
Doesn't change the icon but <action>changes the current drawcolor to the
238
color clicked on.</action>
239
</para>
240
</listitem>
241
</varlistentry>
242
243
<varlistentry>
244
<term><guiicon>Rectangle</guiicon></term>
245
<listitem>
246
<para>
247
<action>Draw a rectangle.</action>
248
</para>
249
</listitem>
250
</varlistentry>
251
252
<varlistentry>
253
<term><guiicon>Filled Rectangle</guiicon></term>
254
<listitem>
255
<para>
256
<action>Draw a filled rectangle.</action>
257
</para>
258
</listitem>
259
</varlistentry>
260
261
<varlistentry>
262
<term><guiicon>Circle</guiicon></term>
263
<listitem>
264
<para>
265
<action>Draw a circle.</action>
266
</para>
267
</listitem>
268
</varlistentry>
269
270
<varlistentry>
271
<term><guiicon>Filled Circle</guiicon></term>
272
<listitem>
273
<para>
274
<action>Draw a filled circle.</action>
275
</para>
276
</listitem>
277
</varlistentry>
278
279
<varlistentry>
280
<term><guiicon>Ellipse</guiicon></term>
281
<listitem>
282
<para>
283
<action>Draw an ellipse</action>
284
</para>
285
</listitem>
286
</varlistentry>
287
288
<varlistentry>
289
<term><guiicon>Filled Ellipse</guiicon></term>
290
<listitem>
291
<para>
292
<action>Draw a filled ellipse</action> (almost the same thing as drawing
293
a circle.)
294
</para>
295
</listitem>
296
</varlistentry>
297
298
<varlistentry>
299
<term><guiicon>Spray</guiicon></term>
300
<listitem>
301
<para>
302
<action>Draws a randow dotted pattern like a spraycan.</action>
303
</para>
304
</listitem>
305
</varlistentry>
306
307
<varlistentry>
308
<term><guiicon>Flood Fill</guiicon></term>
309
<listitem>
310
<para>
311
<action>Fill an area with the current color.</action>
312
</para>
313
</listitem>
314
</varlistentry>
315
316
<varlistentry>
317
<term><guiicon>Line</guiicon></term>
318
<listitem>
319
<para>
320
<action>Draw a line.</action>
321
</para>
322
</listitem>
323
</varlistentry>
324
325
<varlistentry>
326
<term><guiicon>Eraser (Transparent)</guiicon></term>
327
<listitem>
328
<para>
329
<action>Draw transparent (invisible).</action>
330
</para>
331
</listitem>
332
</varlistentry>
333
334
<varlistentry>
335
<term><guiicon>Rectangular Selection</guiicon></term>
336
<term><guiicon>Circular Selection</guiicon></term>
337
<listitem>
338
<para>
339
<action>Select (mark) a part of the icon.</action>
340
</para>
341
</listitem>
342
</varlistentry>
343
</variablelist>
344
345
</sect1>
346
347
<sect1 id="grid">
348
<title>Grid</title>
349
350
<para>
351
The grid is where you manipulate the icon contents.
352
</para>
353
</sect1>
354
355
<sect1 id="statusbar">
356
<title>Statusbar</title>
357
358
<para>
359
The status bar keeps you informed of current operations.  From left to
360
right, it tells you the x,y coordinates of the pixel you are working on,
361
the size of the current canvas, the zoom factor, and the current number
362
of colors in the icon.
363
</para>
364
365
</sect1>
366
</chapter>
367
368
<chapter id="the-menu-entries">
369
<title>The Menu Entries</title>
370
371
<sect1 id="file">
372
<title>The <guimenu>File</guimenu> Menu</title>
373
374
<para>
375
The following functions are available from the <guimenu>File</guimenu>
376
menu:
377
</para>
378
379
<variablelist>
380
<varlistentry>
381
<term>
382
<menuchoice>
383
<shortcut>
384
<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
385
</shortcut>
386
<guimenu>File</guimenu>
387
<guimenuitem>New</guimenuitem>
388
</menuchoice>
389
</term>
390
<listitem>
391
<para>
392
<action>Lets you create a new icon</action>, either from a template or
393
by specifying the size.
394
</para> 
395
</listitem>
396
</varlistentry>
397
398
<varlistentry>
399
<term>
400
<menuchoice>
401
<guimenu>File</guimenu>
402
<guimenuitem>New Window</guimenuitem>
403
</menuchoice>
404
</term>
405
<listitem>
406
<para>
407
<action>Open a new Icon Editor window.</action>
408
</para>
409
</listitem>
410
</varlistentry>
411
412
<varlistentry>
413
<term>
414
<menuchoice>
415
<shortcut>
416
<keycombo action="simul">&Ctrl;<keycap>O</keycap></keycombo>
417
</shortcut>
418
<guimenu>File</guimenu>
419
<guimenuitem>Open...</guimenuitem>
420
</menuchoice>
421
</term>
422
<listitem>
423
<para>
424
<action>Open an existing icon file.</action>
425
</para>
426
</listitem>
427
</varlistentry>
428
429
<varlistentry>
430
<term>
431
<menuchoice>
432
<guimenu>File</guimenu>
433
<guisubmenu>Open Recent</guisubmenu>
434
</menuchoice>
435
</term>
436
<listitem>
437
<para>
438
<action>Displays a list of recently opened icons to choose
439
from.</action>
440
</para>
441
</listitem>
442
</varlistentry>
443
444
<varlistentry>
445
<term>
446
<menuchoice>
447
<shortcut>
448
<keycombo action="simul">&Ctrl;<keycap>S</keycap></keycombo>
449
</shortcut>
450
<guimenu>File</guimenu>
451
<guimenuitem>Save</guimenuitem>
452
</menuchoice>
453
</term>
454
<listitem>
455
<para>
456
<action>Save the currently open icon.</action>
457
</para>
458
</listitem>
459
</varlistentry>
460
461
<varlistentry>
462
<term>
463
<menuchoice>
464
<guimenu>File</guimenu>
465
<guimenuitem>Save As...</guimenuitem>
466
</menuchoice>
467
</term>
468
<listitem>
469
<para>
470
<action>Save the currently open icon under a new name.</action>
471
</para>
472
</listitem>
473
</varlistentry>
474
475
<varlistentry>
476
<term>
477
<menuchoice>
478
<shortcut>
479
<keycombo action="simul">&Ctrl;<keycap>P</keycap></keycombo>
480
</shortcut>
481
<guimenu>File</guimenu>
482
<guimenuitem>Print...</guimenuitem>
483
</menuchoice>
484
</term>
485
<listitem>
486
<para>
487
<action>Print the icon</action>
488
</para>
489
</listitem>
490
</varlistentry>
491
492
<varlistentry>
493
<term>
494
<menuchoice>
495
<shortcut>
496
<keycombo action="simul">&Ctrl;<keycap>W</keycap></keycombo>
497
</shortcut>
498
<guimenu>File</guimenu>
499
<guimenuitem>Close</guimenuitem>
500
</menuchoice>
501
</term>
502
<listitem>
503
<para>
504
<action>Close</action> &kiconedit;.
505
</para>
506
</listitem>
507
</varlistentry>
508
</variablelist>
509
510
</sect1>
511
512
<sect1 id="edit">
513
<title>The <guimenu>Edit</guimenu> Menu</title>
514
515
<para>
516
The <guimenu>Edit</guimenu> menu contains the following entries:
517
</para>
518
519
<variablelist>
520
521
<varlistentry>
522
<term><menuchoice><shortcut><keycombo
523
action="simul">&Ctrl;<keycap>Z</keycap></keycombo></shortcut>
524
<guimenu>Edit</guimenu><guimenuitem>Undo</guimenuitem>
525
</menuchoice></term>
526
<listitem><para>Undo the last action</para></listitem>
527
</varlistentry>
528
529
<varlistentry>
530
<term><menuchoice><shortcut><keycombo action="simul">
531
&Ctrl;&Shift;<keycap>Z</keycap></keycombo></shortcut>
532
<guimenu>Edit</guimenu><guimenuitem>Redo</guimenuitem></menuchoice></term>
533
<listitem><para>Redo the last action undone.  If no actions have been
534
undone, this action is disabled.</para></listitem>
535
</varlistentry>
536
537
<varlistentry>
538
<term>
539
<menuchoice>
540
<shortcut>
541
<keycombo action="simul">&Ctrl;<keycap>X</keycap></keycombo>
542
</shortcut>
543
<guimenu>Edit</guimenu>
544
<guimenuitem>Cut</guimenuitem>
545
</menuchoice>
546
</term>
547
<listitem>
548
<para>
549
<action>Cuts out the entire icon and put it onto the clipboard.</action>
550
</para>
551
</listitem>
552
</varlistentry>
553
554
<varlistentry>
555
<term>
556
<menuchoice>
557
<shortcut>
558
<keycombo action="simul">&Ctrl;<keycap>C</keycap></keycombo>
559
</shortcut>
560
<guimenu>Edit</guimenu>
561
<guimenuitem>Copy</guimenuitem>
562
</menuchoice>
563
</term>
564
<listitem>
565
<para>
566
<action>Copies the entire icon to the clipboard.</action>
567
</para>
568
</listitem>
569
</varlistentry>
570
571
<varlistentry>
572
<term>
573
<menuchoice>
574
<shortcut>
575
<keycombo action="simul">&Ctrl;<keycap>V</keycap></keycombo>
576
</shortcut>
577
<guimenu>Edit</guimenu>
578
<guimenuitem>Paste</guimenuitem>
579
</menuchoice>
580
</term>
581
<listitem>
582
<para>
583
<action>Paste the contents of the clipboard (if the clipboard contains a
584
valid icon).</action>
585
</para>
586
</listitem>
587
</varlistentry>
588
589
<varlistentry>
590
<term>
591
<menuchoice>
592
<guimenu>Edit</guimenu>
593
<guimenuitem>Paste as New</guimenuitem>
594
</menuchoice>
595
</term>
596
<listitem>
597
<para>
598
<action>Paste the contents of the clipboard as a new image into a new Icon Editor window (if the
599
clipboard contains a valid icon).</action>
600
</para>
601
</listitem>
602
</varlistentry>
603
604
<varlistentry>
605
<term>
606
<menuchoice>
607
<guimenu>Edit</guimenu>
608
<guimenuitem>Clear</guimenuitem>
609
</menuchoice>
610
</term>
611
<listitem>
612
<para>
613
<action>Clear the grid and fill it with transparent color.</action>
614
</para>
615
</listitem>
616
</varlistentry>
617
618
<varlistentry>
619
<term>
620
<menuchoice>
621
<shortcut>
622
<keycombo action="simul">&Ctrl;<keycap>A</keycap></keycombo>
623
</shortcut>
624
<guimenu>Edit</guimenu>
625
<guimenuitem>Select All</guimenuitem>
626
</menuchoice>
627
</term>
628
<listitem>
629
<para>
630
<action>Marks the entire icon as selected.</action>
631
</para>
632
</listitem>
633
</varlistentry>
634
635
<varlistentry>
636
<term><menuchoice><guimenu>Edit</guimenu><guimenuitem>Resize...</guimenuitem>
637
</menuchoice></term>
638
<listitem><para>
639
<action>Resize icon to width X height.</action>
640
</para>
641
</listitem>
642
</varlistentry>
643
644
<varlistentry>
645
<term><menuchoice><guimenu>Edit</guimenu><guimenuitem>GrayScale</guimenuitem>
646
</menuchoice></term>
647
<listitem><para><action>Gray scale the icon image.</action> This may
648
create colors not conformant to the &kde; icon palette.</para>
649
</listitem>
650
</varlistentry>
651
652
</variablelist>
653
654
</sect1>
655
656
<sect1 id="view">
657
<title>The <guimenu>View</guimenu> Menu</title>
658
659
<variablelist>
660
<varlistentry>
661
<term>
662
<menuchoice>
663
<shortcut>
664
<keycombo action="simul">&Ctrl;<keycap>+</keycap></keycombo></shortcut>
665
<guimenu>View</guimenu>
666
<guimenuitem>Zoom In</guimenuitem>
667
</menuchoice>
668
</term>
669
<listitem>
670
<para>
671
<action>Magnify the view of the icon</action>.
672
</para>
673
</listitem>
674
</varlistentry>
675
676
<varlistentry>
677
<term>
678
<menuchoice>
679
<shortcut><keycombo action="simul">
680
&Ctrl;<keycap>-</keycap></keycombo></shortcut>
681
<guimenu>View</guimenu>
682
<guimenuitem>Zoom Out</guimenuitem>
683
</menuchoice>
684
</term>
685
<listitem>
686
<para>
687
<action>Shrink the view icon to a smaller screen size</action>
688
</para>
689
</listitem>
690
</varlistentry>
691
692
<varlistentry>
693
<term>
694
<menuchoice>
695
<guimenu>View</guimenu>
696
<guisubmenu>Zoom</guisubmenu>
697
</menuchoice>
698
</term>
699
<listitem>
700
<para>Zoom to a predefined zoom factor</para>
701
</listitem>
702
</varlistentry>
703
</variablelist>
704
705
</sect1>
706
707
<sect1 id="tools">
708
<title>The <guimenu>Tools</guimenu> Menu</title>
709
710
<variablelist>
711
<varlistentry>
712
<term>
713
<menuchoice>
714
<guimenu>Tools</guimenu>
715
<guimenuitem>Freehand</guimenuitem>
716
</menuchoice>
717
</term>
718
<listitem>
719
<para>
720
Draw free hand.
721
</para>
722
</listitem>
723
</varlistentry>
724
725
<varlistentry>
726
<term><menuchoice><guimenu>Tools</guimenu><guimenuitem>Color
727
Picker</guimenuitem></menuchoice></term>
728
<listitem><para>Select a color from the screen to use as the
729
foreground color.</para></listitem>
730
</varlistentry>
731
732
<varlistentry>
733
<term>
734
<menuchoice>
735
<guimenu>Tools</guimenu>
736
<guimenuitem>Rectangle</guimenuitem>
737
</menuchoice>
738
</term>
739
<listitem>
740
<para>
741
Draw a rectangle.
742
</para>
743
</listitem>
744
</varlistentry>
745
746
<varlistentry>
747
<term>
748
<menuchoice>
749
<guimenu>Tools</guimenu>
750
<guimenuitem>Filled Rectangle</guimenuitem>
751
</menuchoice>
752
</term>
753
<listitem>
754
<para>
755
Draw a filled rectangle.
756
</para>
757
</listitem>
758
</varlistentry>
759
760
<varlistentry>
761
<term>
762
<menuchoice>
763
<guimenu>Tools</guimenu>
764
<guimenuitem>Circle</guimenuitem>
765
</menuchoice>
766
</term>
767
<listitem>
768
<para>
769
Draw a circle.
770
</para>
771
</listitem>
772
</varlistentry>
773
774
<varlistentry>
775
<term>
776
<menuchoice>
777
<guimenu>Tools</guimenu>
778
<guimenuitem>Filled Circle</guimenuitem>
779
</menuchoice>
780
</term>
781
<listitem>
782
<para>
783
Draw a filled circle.
784
</para>
785
</listitem>
786
</varlistentry>
787
788
<varlistentry>
789
<term>
790
<menuchoice>
791
<guimenu>Tools</guimenu>
792
<guimenuitem>Ellipse</guimenuitem>
793
</menuchoice>
794
</term>
795
<listitem>
796
<para>
797
Draw an ellipse
798
</para>
799
</listitem>
800
</varlistentry>
801
802
<varlistentry>
803
<term>
804
<menuchoice>
805
<guimenu>Tools</guimenu>
806
<guimenuitem>Filled Ellipse</guimenuitem>
807
</menuchoice>
808
</term>
809
<listitem>
810
<para>
811
<action>Draw a filled ellipse</action> (almost the same thing as drawing
812
a circle.)
813
</para>
814
</listitem>
815
</varlistentry>
816
817
<varlistentry>
818
<term>
819
<menuchoice>
820
<guimenu>Tools</guimenu>
821
<guimenuitem>Spray</guimenuitem>
822
</menuchoice>
823
</term>
824
<listitem>
825
<para>
826
Draws a random dotted pattern like a spraycan.
827
</para>
828
</listitem>
829
</varlistentry>
830
831
<varlistentry>
832
<term>
833
<menuchoice>
834
<guimenu>Tools</guimenu>
835
<guimenuitem>Flood Fill</guimenuitem>
836
</menuchoice>
837
</term>
838
<listitem>
839
<para>
840
Fill an area with the current color.
841
</para>
842
</listitem>
843
</varlistentry>
844
845
<varlistentry>
846
<term>
847
<menuchoice>
848
<guimenu>Tools</guimenu>
849
<guimenuitem>Line</guimenuitem>
850
</menuchoice>
851
</term>
852
<listitem>
853
<para>
854
Draw a line.
855
</para>
856
</listitem>
857
</varlistentry>
858
859
<varlistentry>
860
<term>
861
<menuchoice>
862
<guimenu>Tools</guimenu>
863
<guimenuitem>Eraser (Transparent)</guimenuitem>
864
</menuchoice>
865
</term>
866
<listitem>
867
<para>Draw transparent (invisible).</para>
868
</listitem>
869
</varlistentry>
870
871
<varlistentry>
872
<term><menuchoice><guimenu>Tools</guimenu>
873
<guimenuitem>Rectangular Selection</guimenuitem></menuchoice></term>
874
<term><menuchoice><guimenu>Tools</guimenu>
875
<guimenuitem>Circular Selection</guimenuitem></menuchoice></term>
876
<listitem><para><action>Select (mark) a part of the icon.</action>
877
</para>
878
</listitem>
879
</varlistentry>
880
881
</variablelist>
882
883
</sect1>
884
885
<sect1 id="settings">
886
<title>The <guimenu>Settings</guimenu> Menu</title>
887
888
<variablelist>
889
890
<varlistentry>
891
<term>
892
<menuchoice>
893
<guimenu>Settings</guimenu>
894
<guimenuitem>Toolbars</guimenuitem>
895
</menuchoice>
896
</term>
897
<listitem>
898
<para>
899
<action>Toggle on and off the display of the toolbars.</action>
900
</para>
901
</listitem>
902
</varlistentry>
903
<varlistentry>
904
<term>
905
<menuchoice>
906
<guimenu>Settings</guimenu>
907
<guimenuitem>Show/Hide Statusbar</guimenuitem>
908
</menuchoice>
909
</term>
910
<listitem>
911
<para>
912
<action>Toggle on and off the display of the status bar.</action>
913
</para>
914
</listitem>
915
</varlistentry>
916
<varlistentry>
917
<term>
918
<menuchoice>
919
<guimenu>Settings</guimenu>
920
<guimenuitem>Show/Hide Grid</guimenuitem>
921
</menuchoice>
922
</term>
923
<listitem>
924
<para>
925
<action>Toggle on and off the grid.</action>
926
</para>
927
</listitem>
928
</varlistentry>
929
<varlistentry>
930
<term><menuchoice><guimenu>Settings</guimenu>
931
<guimenuitem>Configure Shortcuts...</guimenuitem>
932
</menuchoice></term>
933
<listitem><para>Opens a dialog where you can customize &kiconedit;'s
934
keyboard shortcuts.</para></listitem>
935
</varlistentry>
936
937
<varlistentry>
938
<term>
939
<menuchoice>
940
<guimenu>Settings</guimenu>
941
<guimenuitem>Configure &kiconedit;...</guimenuitem>
942
</menuchoice>
943
</term>
944
<listitem>
945
<para>
946
Opens the &kiconedit; <link linkend="configuration">configuration
947
dialog</link> configuration dialog, described separately.
948
</para>
949
</listitem>
950
</varlistentry>
951
952
953
</variablelist>
954
955
</sect1>
956
957
<sect1 id="help">
958
<title>The <guimenu>Help</guimenu> Menu</title>
959
960
&help.menu.documentation;
961
962
</sect1>
963
</chapter>
964
965
<chapter id="configuration">
966
<title>Configuration</title>
967
968
<sect1>
969
<title>Configuring &kiconedit;</title>
970
<para>Selecting the <menuchoice><guimenu>Settings</guimenu>
971
<guimenuitem>Configure &kiconedit;...</guimenuitem></menuchoice> menu item will
972
open a configuration dialog with the tree tabs <guilabel>Icon Templates</guilabel>,
973
<guilabel>Background</guilabel> and <guilabel>Icon Grid</guilabel>.</para>
974
975
<screenshot>
976
<screeninfo>&kiconedit; configuration dialog</screeninfo>
977
<mediaobject>
978
<imageobject><imagedata fileref="kiconedit-configuration.png" format="PNG"/></imageobject>
979
<textobject><phrase>&kiconedit; configuration dialog</phrase></textobject>
980
</mediaobject>
981
</screenshot>
982
983
<sect2 id="icon-templates-tab">
984
<title>The <guilabel>Icon Templates</guilabel> Tab</title>
985
<para><guilabel>Add...</guilabel>, <guilabel>Edit...</guilabel> and <guilabel>Remove</guilabel>
986
the templates for <guilabel>Standard File</guilabel>, <guilabel>Source File</guilabel>, 
987
<guilabel>Compressed File</guilabel> &etc;.</para>
988
</sect2>
989
<sect2 id="background-tab">
990
<title>The <guilabel>Background</guilabel> Tab</title>
991
<para>Select to <guibutton>Use color</guibutton> or to <guibutton>Use pixmap</guibutton>
992
as background.  A <guilabel>Preview</guilabel> of your choice is displayed.</para>
993
</sect2>
994
<sect2 id="icon-grid-tab">
995
<title>The <guilabel>Icon Grid</guilabel> Tab</title>
996
<para>Select to <guilabel>Paste transparent pixels</guilabel> or <guilabel>Show rulers</guilabel>
997
and set a <guilabel>Solid Color</guilabel> or a <guilabel>Checkerboard</guilabel> as 
998
<guilabel>Transparency Display</guilabel>.
999
You can set the Checkerboard <guilabel>Size:</guilabel> to <guilabel>Small</guilabel>, 
1000
<guilabel>Medium</guilabel> or <guilabel>Large</guilabel> and choose <guilabel>Color 1:</guilabel> 
1001
and <guilabel>Color 2:</guilabel> of the checkerboard.</para>
1002
</sect2>
1003
</sect1>
1004
1005
</chapter>
1006
1007
<chapter id="credits-and-license">
1008
<title>Credits and Licenses</title>
1009
1010
<para>
1011
&kiconedit;
1012
</para>
1013
1014
<para>
1015
Program copyright &Thomas.Tanghus; <email>tanghus@kde.org</email>
1016
</para>
1017
1018
<itemizedlist>
1019
<title>Contributors</title>
1020
<listitem>
1021
<para>
1022
John Califf <email>jcaliff@compuzone.net</email>
1023
</para>
1024
</listitem>
1025
<listitem>
1026
<para>
1027
Laurent Montel <email>lmontel@mandrakesoft.com</email>
1028
</para>
1029
</listitem>
1030
<listitem><para>Aaron Seigo  &Aaron.J.Seigo.mail;</para></listitem>
1031
<listitem><para>Nadeem Hassan <email>nhasan@nadmm.com</email> - Rewrote UI to use
1032
XMLGUI, Lots of fixes and cleanup</para></listitem>
1033
<listitem><para>Adrian Page <email>Adrian.Page@tesco.net</email> - Bug Fixes and &GUI; tidy up.</para></listitem>
1034
1035
1036
</itemizedlist>
1037
1038
<!-- TRANS:CREDIT_FOR_TRANSLATORS -->
1039
1040
&underFDL; 
1041
&underGPL;
1042
1043
</chapter>
1044
1045
<appendix id="installation">
1046
<title>Installation</title>
1047
1048
<sect1 id="how-to-obtain-the-icon-editor">
1049
<title>How to obtain &kiconedit;</title>
1050
1051
&install.intro.documentation;
1052
1053
</sect1>
1054
1055
<sect1 id="compilation-and-installation">
1056
<title>Compilation and Installation</title>
1057
1058
&install.compile.documentation;
1059
1060
</sect1>
1061
1062
<!-- 
1063
<sect1 id="configuration">
1064
<title>Configuration</title>
1065
1066
</sect1>
1067
1068
-->
1069
</appendix>
1070
1071
1072
</book>
1073
1074
<!--
1075
Local Variables:
1076
mode: sgml
1077
sgml-indent-step:0
1078
sgml-indent-data:nil
1079
sgml-omittag:nil
1080
sgml-shorttag:t
1081
End:
1082
-->
1083
(-)tdegraphics/doc/kiconedit/kiconedit-configuration.png (-165 lines)
Lines 1-165 Link Here
1
‰PNG
2
3
IHDRß³n6y IDATxœì½lÛÕ½ÿÿèWîtŒÂÕÛQ@vÔMqUP•©NËD\QКú’¤%¥W$-¸lڒ2mM7ÝÛdWƒä¢­u«Aݫے Q>º%é4¨‹8èBãêK‰«QÕѨb¢ø­Û}j©ß?ÞoÿJìÄIÓ´MΣªœ÷û}Þç¼ÎyÛïçûuÎëœ÷Š}Ýo#ÇuáÈU
4
…B¡P\7Fz[WX„EàG®Ö=³çFÛ¤P(
5
Œ¦º±óêHoëŠöµ^­{fQýF›¤P(
6
ÅÒF
û|Kf”7ЅB¡P(–ñ•)%¾
7
…B¡˜©Ç“‰ÏW”Ùšcɖ3•¬øÊ䂮P(Š%„Ô‘“	Üëª<ëð¹ã¡-½r
8
ðÿ,x‰
9
…B¡X’\/¡p¯«Îx K­œB(ñU(
10
…b‘¹®â›÷"/œ¾žE(
11
…Bqˑ󖙒͑8.øx"“’]Ÿ¶vÓ P(ŠÅf1Âr…e镓KºÌ…÷|Sà¸ÔËáŸØpŒŸ&zºd"¶àÅ(
12
…b‘YH'm¦ü—Z93²Î˜Gìlòrdçx›„èڃ-™42ÎK?	âËz>Å?و㑖rž—K£i£
·l+!y£Iz>Ô	ë×ï¹ÅV¥±ï®;Àz¢ñ$Îïmäù}ôº•{#	ýÆ	®ŸçA;]ZI&“´Š–3§_,Ò6ÌÄlöM­ÇÔmG•†ïAíǖæuW(šžçò—M¯Íå·3³MÍ{&f.·´rfÊ£”4ÅÊ)Ýó½¬ã|Їãžöœ?ÍÀèöKá¼$ÎQ?‡ŸÛ—ý¾Ç/›:J.b*žMvOÚð~×^ëíà¹ÇŠÿuš˜wÞ³ñÊS6jî0›m%h©l]õóÁëVîÍÀÔúe„÷r‚m­½œ>7ŒLO³Qª}SÓ¥·ûï ~)´à¶)KBâ8Á\H¢g¯ýÞTÌöÜýó)§d§[¦$±sƒÈo¢¥@G×c$ςªS#¼ñ¬
k¤‡žÓ£tOšÂ;O·^ThtÕOÁ!:NF‰Kp®q°ïy/56h}*Aÿ!ëŽW›T›bßðB)Ñ, §$¤Œ')a[ø‚oÒõsך›ˆ±íWƒDRìN Y0ý¢z{`Æã¥Ú'eÏï³Â+e0d“™J",3?1+K,ŝžžæì¢žŒßdè Ñó=űnöüK('÷L¤Ë-”O)å4‰eêÓ󜓦#ÙáÓBõœ©œB”,[6§^D¿ÔˆÞU‹w½ƒÈñ ­ëºãÁ]¥a
÷Ð7§[^›ðx¶7ÊD$Ä®ãМ»FL®C#ô=e¥ûx9*kŒyZ¢BÐúˆï*ÃcMâ?'<™Í7Ý¥è}-Aë#¶LÚáIºOƉÊü®Ì¾ƒMÔüv˜‘«ÉüÆq—ƾ‡mTÛ MÒq"Nàg3wcNµejº†wx؆CÝÝMÇâÓÊJ|“¤÷#žÈõëzw×ÚñoÊ^
ìN„EÈq—Æž‡Œ^ƒd†Î%èxOÏlX¨ë4Q垵N¹ö%¾Ixoú¢æFÙ-Ôüv˜aóšŒ5~ÌKuØA¡X(҂4›Ø^×3ï4yÜìÈۆk«§¥À_Eq¬²“Ð84Ã&ÐØîñà^ô/‡éýPÇ/ëж̿«9M½Ýø<aGh›¡–J²õÐr¨°Þˆf£çYŽ•Ù<ªï²â¯²Ó²?N$•Ÿß³¶LW6@Ëʑdóñ¢"GÃ@MæomQ¡Ñ÷T֛r:­x6»š‰~>ˆ¶Î[t»Øþ7ž´ež—ì–0ú¥öž¼²lwXñ=i%ùU”þë ¿îZ'þM†‘wB†ð®r",!
13
·‘°ç·‡Õ
14
Þ{mØÇ£ìøÜÜ/Ă]§BÏ«¢¬¸wk›bŸí+mÅŸLs¯y.Å®£B±Üi:#úÙ p
âx½ƒ æXÎTNS²ð)§äj&SÐõæ ñ¸NB?Íp†,Uô}åÀ&#OŸ&Š„ï.ÌMÉeÞp{ã*`±eº—…Å
15
NL/Ìó¸qCODFض?LïÅ:Z\V:6ÅØzґß=}a„†×ÃDtØô°£Û*'òž—!ô’áyëΔ“	êŸ5ÒÄÂÃ4½FGÃ÷|-÷ä§Ët[šÛ…"7Œ³u=®
16
@jx͞€®—û8rNǹÎÅÀKZžŒÑûºQ6ç&.Šûa/-6’ß$°Þa£æ'^´óäÂP÷¸acôtˆ¦7#ØÖ¸x©†ê‡èïÅÐì¶½NbM¶]Ó^i!</Góì3®WAËÎ:|îâuÊõ~s¿Å®£B±ÜÉ£\±º•YH7MÉWVm/µÐülMOAÛKPÿx
‘ñ¡òž—$™š=¯’ÊKÿa!`š›c±"4›!ð­2v·ï"šÒšÿq3Zu­9š?Ý©mÿ‘I
ì.†.˜K€­´‚ŒN{Á“¨rìÒl2ÜöCaâ)»Qæ;×Þ%é?!žÒ."¸ ÂAS…i÷K
Œmaà%6»y)º óÕz¶;IÄblýU?í‘$Xm®•0ËXgº=v½A·8‰MBÍKTÿtÆ#ÈÔõ½NÅÐÏã·õæJÛ¡0ñ”š“À‰¹]¯b߅bY0¯´à¸h©ùßdS¦>D„¶”&¼¥M5𙤄ö—$â:z>‡¡ý8‘°ñV¸@O"„gíü§\1‚žš+{ÂKSgqšžòéI`•×L{iV›y³Î6`¸Pº4©é/™(ä夻N‡äy̓à¤{N~©lý¦±Ò©Hçô²|.iO°‰è
û†ˆ£1øNœ=.'ՏÕ⊫(îí¥Û#**Íè•Àf<A¥’×í:Íp5™À±Òh‹°y½˜çõR¯BQ:‹1þ{=™ú‘äJÏ—ñeڎ€ú—Zˆ|áà¥^Noâyx°“À—a¤;ŒöaðÍÛ°þq¨v€÷'{ÿ(ËÚ'4ž-àÿP¼d¸?Ñ+†@m*ƒ!Fd«0ÏI&™w³–+Œ€-øH2½}bWÁ©žZfìÐÓy͐.žÊ·MX²ey›Äö.$ÒDA?D[Wü‡°uß:b•RÐöiÿ½V<®³õCGÑèò´.Q@XLû+²i®çušÍ#Í\¯²Ò®Wq®ß7…b©0ÿñßÅú}Í^N!ï½PÖ|Ê)}žo
17
‚'ƒD>ŒÀ§ÀIŒ;ì§æçàK`Üüû»Ÿ‡N7`›ËÁ6!À"p95ºž±âø®•=èÈIC|F@0/ÖâQ&ð=iŽñ3§Z⻍{Ì@َçÝhòÊÌ%vÅølȎlš eËܼ§~3øÀS.´5n\×3r´…3®ŸQt</ǨÞÈû '‹aô†ðZl!¨Âõ —Z½øyéöØ÷¤áa:œ¡—„~‘ý_ïë$ÊEÿç_/‚–ÇK¿NZ™^Å2ÇRÚÿžf‡Ñ={_]Éç”TN©v̔®„r
18
Žñšui::eÚQ)õ)Pli¤Žoêãê?}{ÜCïGôÿã1‚…$0ÕÀÚk{9qb\§íCI׃6¼W3-ŒëJ’½ÿBêbM
¡	;mØ\Õ¸rÒ%´½á\ðq„ÁIښ­8Ü5Ýéâ’L]Ñ$‡öï‚wûVæ»LÃà‰$¾íVª·xmÉÙ(ˆ¼$ÐÖNÊM#ì΢	‘ö
19
SÐöA’žG¬t<+¹ÿMÐ
20
x¥Û£z‹—áGþ2€~^¢­õ\·ë4sÀU,cŸ¯ÙŠãž‚÷M>á+P³^k1ÆÂÿ“Å‹ÈT(n*
21
àÌLô“Aœ÷ÕÏ!ÿÙËÉÌáSžs/r…7¿MGôl7ƒL‹Ö±xÞ%O5²
22
p:«X‰œ§ÝÀ¸€†ø&™Úk¼A…†b4}¥åA'îU6lVH$’„ÏE	¼&<.a•™’ aë«Ã´>â¤n
k
23
†ÏÐýŸaÂRÀ*
,¥v1 @:©ë4ôÆÙ÷ˆ“j
F΍°ûP˜×šòÒ
¾“ÀQ+©_çÀf‘1zéømÓôL‹”™×i荲g““‡•d"Aÿ‰gu¨p!¥DñʄÝUpÿ¬ä”HF°RíòÐHˆAËô±d©ël=eß#¦—“}¡íx4—±`…Åv}¯Sôsƒhë됺ΏDٷŰ/öUŒÀ›AÚ_šù:t¾Ÿ¤ë>+Nè“}4¶viDq*׋¦£	¢ŸôÏýÄY~ëóÎ÷Ê)öðP’-EÊYaÿQëÕºgö‰ÏÜÕªŸÂ7’f2	F·_‘îeápâØXêÓNqäd9ž©“	oµÃ“ÓÌ@œLŒ4"'cÙ´Bƒ
24
g^:ý¬1!ªÜ-{º¿PºÜ}ÿ[
V ëOAŽœ‚EP{Ÿ‡@³“äå(|AÄ7¢Ì õLæØ¥9!žµÌ©„Y¿¸Ñîa,>R&eŽñÆf*_NF‘"ÆF•MÓÓO³cžv…„Ãb½>×i&ŠÛ' Â5ëu£!ä¤nœ#4Κ¢;
25
ÅREŽGq­çÃ|	DÎGÎ%WN.2!öù`é·km­Özg:^hD™,š!ZÓúêmSn€ÂèbÔfLW¬vêþBér÷ù¿‚¶ïBÛϼ´MÉ+òþ°awÊ(WT¸Œmœ0ws©ÆYÊÌ­v“Žü<,¶ë©|Qæ»4Ž[Œ^Žié-6„ȵšÛtý¯SQ
26
Ùg°Ê•·<Üô2\0©Ï¸äB¡P”Ê-1reD¥–˜Ø"¦{ŒSó+Ò
;u¡t¹ûúßIÀ=:
ëí8mÆ8o"‘$ôY˜½ïè ¹òãÉÙ5eÚÊl]Äsj‹y0kù%´Â6{ñu¾N3g\À¾Ù®ƒ°-éµ¼
27
ÅârKˆïMKJÒû^Œ#LJnñt¼E@™¡‰Âã—
28
…B¡X֔>ÏWQ£;YdÇ7ӘÝÁb^óH
29
…âæC”9ˆœà^·ðã¤ás#v±äÊ)Ĝ^¬ (ÌÔu…B¡X’”iaYhD™Ê´¥YN”ä*
30
…¢tÊ4Ä¢¢Ê)éâ;ÃÊG
31
…B¡P(æAY~€i¾øNÆx^)
32
…B±l=ËàÒ×vV(
33
…B± (ñU(
34
…b‘Qâ«P(
35
Å"£ÄW¡P(ŠEF‰¯B¡P(‹Œ_…B¡P(%¾
36
…B¡P,2J|
37
…B¡Xd”ø*
38
…B±È(ñU(
39
…b‘¹æ+„>	/ü!·n·Ï}žm†B¡PÜô\“ø¦…×Së^({·0¡¡0€`…B¡˜…kß´ðz7m]({·0µ÷yé~µ[‰¯B¡P̂óU(
40
…b‘Q⫸)(/¯¤¼¼òF›Qý|ˆÎÖÜÿƒjÊﬤüÎÕT×xØöóB—dÉù”Zϛ½=
41
ŵqÍW
42
ÅR§ÿwMìØzÊ^I|t”Áу¾ÙË+û˜–µê]Ø
43
…¢4”ç«PÌ@샶ŒðÖÿb§þçc_11öïþ×>\e@Jgo}gIùMLŒ111v-V(·J|7-Ñ÷lõÔP^^IåÝ5lûU€©¼r4È®§·²º²’òïU³¹±P<?UºW^²«>›vks;‘YzŒ3€ëù·9¼·÷žÇ[î£ê¾z¼æ›V^ôjî^Mù«¹ÿ‰¶¼cëyg%ÕžÅæÕ^
44
…âÖAu;›ôõq8íxj«‰~#ôi„úÇk±Þn¥ïŽ
45
σՌDb„?â¾×IµËÁÀÉô„NS£‡D"Iïñ0›4Žß‹ý*FK³Šþ+úùžÞ›Ù–ãq_ßËÖ
46
§v»ÌD!<?ÜÆh*sá¿ôòØ!Þý{OY~ž5žmÄsÒýŸ#l½ääâ_[ŠÚÑ{I`Ïǵ5->÷þ–ƒ™‡…XÜU¸žçülx:ë5Çϱ»þþ¢ö(Š¥ò|M¢ñ¡ÃO0x"„fô2ðNyYŠ|o„ÁÃh·NŸfà䣑8ú¸¤çhˆÞcCØËýo3pb„Á÷†‰žOÜèªÝ’ô=×
€ëÙW¸86ƙÿÞ@øP{&Íà»Mý8ó÷‹Œýýc^xÀr”ÍñfN
ÁÄ×yû_7 ŸõÏhGdÒøôjbÎuÐjåÌŋLüã}Gê¦éi6Ê·ÿÈH;vñcZÖæ\–B¡¸µPž¯IÓS^úß	",ÐøL¶;¬D¿Œ‘”’êµN“I¢â´<ãÅæ°&HÄu¶>"„FµËF,–$x:‚¦Ùhy¶öFWí–ÄÁð8w6¡	Ðð11áËKÓùA€®£í85'G»8¸zñºº¼ôŽtà6uÍû|ün¤â%Ù#SÝÍ&…"‘§Žå¶ôáÔàÀ½®p¾Q³ž¯µâ,3ê°ç`Ý«·•d—B¡¸5Qž¯‰”R๯+ѯ )Pád$º´"ìNb)+#_AÒbC¬r22#—@T8‘ÂÆH°Xñ>è‚T9Yú4E–Q³Ù\38œéñÚº\GQóŸrú’§žÜtGIv¸Í®ëA}î×±®bvo9Ýež×Ež®ƒB¡X²(Ïפçxº-X	Ñ8DÇ
O'íñä~bÒc‡æ¶LÀø¬]®UV\÷8éÚÄÿ§†V¯[•*apx2+€Sq	C€õփÆgÙô1Ö¹wCËZ¡Ïtüû‡iü×ìØ}®—[l>®£„_WºžA¼Së P(–,Êó5ñnr<=W i
47
«n~Ê©Û2»_¦·S0?¥©'	¥é©Â:Š™ñUJÔöJ?2ÑüF¤ð÷²2­íFšíDu‰Ò¹Ýˆ*¶?´gAìð¾Ü@dÿ6Ú^í'rÉ×	"ŸéþՎkÊ߷ƨç®çº:èQ:Ÿk»¦<
48
Å͏ò|MÜë«	‡£$'“È”•D
49
¬@ã3IþvbJ/¤Ìj	ÄÆu4͆{£sñ*±„h8âc·§“ðþ]TîߕÙïڙպ#Ø«wÿè V̞\æ¢çàÂtÝjëÛyã¶½zš#ûvqd_át›ž-r`šŽ´²÷‡{‰¿ß͆ÕFp¥P,u”çkâµ×]¬6kfzHB‚®'‰~“@ÿ&Iì›rÒôŒ-dÒå	oÊ8î¬rà¨tþNu!Îm­3={¨]kx·¢ÂNýÎ}œÚ›íIu‡Þ ña7š„†ûG¼û?E»ªçCÝÞ.ß ug=®5v³,AÕZ7Ï·ònèúº‹OWš	±¦…3ýû¨]cØ×Ö²ï­Sg¼B¡¸)Qž¯‰c•hԈ<Õõ$H‰ËnÃYB،î䔕ȥ‘/cĤ
›¦AJ"n·œL‚ÅŠ”I¢—t"çc8ר%K¡ÐªOÎ->¶ø
50
¤Î"Öx9ðÖÌ^n±¥æ²Ò”¶Þ˞õ^Jé̞)ßBǵ0ð?ùâíS«`)K%¾&MÛ½øÿ4@â›$u­$SV3¨Ê
51
€U)pUÙÐÐ9}r˜ä¸•ø$h2‰¨ªFÊÄuâ+íÈ/ubºNë“^†?ü0BÛ/½ô½3L4ªgþhxR+
52
ÅrB‰¯‰ÿàBX±Ýa%…˜žˆ†7›Jf£œ…Ø¥ Ð,ïC.úÿbÌöÜçdä½0XÀû€‹öß
‚œ«í¿é#¡KjÖ9i{©Ø%÷z5&¬P(Ë
%¾&ÉIpÝcŒ/&Ì +‘i1»¡‰181Ãõ.ÅhÿíVš¶ö^óö_1ËJAô|ŒÞã!Ú^Rs:
53
…b¹¡Ä×Ä÷âVŽÀµÎÕbCZÈ´NBJc2%‘	Iìƒ0¾ç½p%	zzAyKÿçlç̶Î5.HA×Ë´½´uQê¨P(Š›íl2ôÁ	)qØm†f
54
C6ããIâ1‰~ô„D&Õ­Ð4"ŸÇ`¥ÕHl`‘æ§ùs@˜ŸÐÇ%‰I‰§¶úÆTX¡P(7åùš?ŒPÿdMv
	Ãáú¤Ì_áJ&‘z,Ož¯©Î]CIæp*çHLÛ.s*B¡P(–Êó5ñíô2xriŽïŒÆÈÉ$q=‰œÄø”H	ĸŽwS5¬¤“&ã0©“œŒ“Ô%LS—Hé€4Ò!!¥ã\åÀaø©yÀ
55
…B±ÜPž¯I"½f¤9Ö«iP·ÉIω6!ˆÉ„9×HI¤E<=‚g£¨p€Uƒ+ëJWñMÄ£ cØ*4#o³œÈhŒX\Ò±·®ˆE
56
…B¡Xª(Ïפ÷Xï#Õa5DR€½Êʞkh~¶×±q‰Ô%‰¯b8RଲÕe@*—
¡årÄø´$°­²c³;‰ÆMÏ8—q˜t„>‹Þèª+
57
…b‘Qž¯‰w“‹àɜUvÀàôÚTVÎï
58
ô„DHiÅáÐàJ&cfKZ!•î¶ÎvØ%¡c~<š°EbÓ4ôoôÅ«äMȎŸîš=‘B¡P܄þóyŸ«ÄפöjBŸFA‚(˾.ýu—݆œLAW“qBRàŠâ}ÈiŠ©±R7þg‚«’ GÁží¥æA'ÑQcü·i»§€5ˇ¾·ún´	
59
…B1/‰Ø¼ÏUâk²÷w}lzЅ(Ë
60
®0—”´Z@T÷^ƒF©Ò«Äs¯Ð)F)ÆcF×rNT3“9ÝÊRGJIR‚s†(Ë~žïµ|y
61
…âVE‰¯‰k“H$Žç¾jæZÎ`¼ÁÐ,°g§‹ÆÇ]8×X<d8Çû°ˆÃèèqò֐±œm‰î{lD>#ì’èÝX¨C¡P(Ë
62
peÒò\
RBôRÌx•‚
 e®ï,ÁYaŽ£ÑìcKJ‘„UV£{9†o¢†Ë:$âÆçec’õJ}ܜ7\&pTˆb&)
63
…b‰¢Äפë÷A#X*Éx1™$z.Fôl}<O=CŽê8D?‰R÷ˆdÒ`‡ÿo=lo4°&¥Ù
0ó5ò6ޔ”ÄQ¡á¨ô¼¾Á5W(
64
Åb£ºMtiˆcäˑ³:Î*A,.±i‚d
65
ôI‰kÐgqª×4ÍNÿ;Ã8w:°jÂ\j(³Á…ˆˆ%à©fx§Üµ°ÊˆGˆ^Š#¥¤u÷òïU(ŠåŠò|Mvޝ45ÖàÝâD¦-;kñý҃Õ"p­±Ó´½ß³n’)ãŽU6¬°:'`ªÀá6<\	l©ƒ2S”ß;MòlÍ.pTh$tÉà_†oT•
66
…BqƒPž¯‰ï…ì«ÿ¼›œx7eß³ëûeöXµÛFµÛFÛKFsRJ¬+í³‚5#Ñ}-ðeôÂ;¼Û‡áY5›œŒ¤$V!Ình…B¡P,'”øÎ“Ƨ<žÜ$“.¬ØH¦„ùÚ@	?éÆr’ëÆz•)‰8')ìȸ1•©î±ÂïV(
67
ÅÒE‰ï<é~eͮѽ?ˆwS5¡¡VÀåvAX¬xîuüp[…·ÛÁà‰œUnâ)à‡!¢£:þýË{ž¯B¡P,GԘï|±k;»\üûƒ8*Z… ðz—ˁ­L8fsRJüûƒÔ?YC,ž çøõOzÐ*´ô{
68
…B±ŒPžï<éémÉüÝðd¶ë8w¹ÈŒ¿=fǏkîݚówÃõ4Q¡P(7)ÊóU(
69
…b‘Qž¯â†>;LäóHÉé]÷¸p¯/¤V^^9}§T­qQ÷L+;v)O¿o3>ÿ©›&ŸåÆBµ[yy%c`ÑõÉO±4Q⫸¡D>àûY[Ééýê**¾Àô›^J;bwó8EßNgáçÁÞ7#øü7O>ˍ…j7%”ЁêvVÜøú©q×à?è/¾ÿÊ<2¶ë½þë>Nï+]ä
70
…âz¢ÄWqSx=ùL­ÿ ?o2•œwþ¢¢&ó×ÑÜßÎæÖP~g%å•Õl~º°ž=;ÙMey%å啔W®æþ'v0xÁOOwq—›Ç3ç¼`«Çȳú‡[ñŸŒ2…ò)/¯$x¨š»WùüsGÉ6——Wû¤‡†G=TÞiÚ^¾šÎ“ÙW7ÎT¯tÑ~6×TS^^Iµ§ÿûÓëQŠ-Åê1[;ÍVbí_¨}g«Kîù§kh{?ÿ5—±÷Û©~:P²íyçÎÒ֊å‹_ÅMAËÎlôxàõþ׳›9~
«ÉK=ˆŠºÌvd»Þ®·N1ñõc#§ðÝ£¡.ëyohêÆ×s†‰‰1&þ1Â+ÏT±£níªœ˜Ëü­_°a{€úß÷016ÆÀÁzºÿ7ÛBùìxSøÛ?Á—}%Û°ù¹~š~à☑ç™ÝM÷—T¯4÷·¨ïìcâë1^n¢·y3œz”jK¡z”ÚN3Õ£X»b¶ºäÒr´‡¡¶I–ïÿ IDAT~üÂ}G[ædû\ÚZ±<¹îâ»bÅ
71
V¬Xq½‹™i›fû³0{¢öдiáÆ7¯7ÍÏ6Oà4-;[h~¶™š‡Ç „?è§éÑNšîÉìn{eˆ®·ÚqWٚƒúÝôYñ€Ýf¾òÑ"ð<ÕÎØß-ª¯¹›º@-¹Œyàëy»·Žîæ¾9›íëíÀm 9ðÞg+Ùf€–ÿî¡þŒèpni%óŽéëUûÇ>|[Ìz<PÏÛGëè|.[Rm)TRÛi¶z”ÊluÉC¸xû`-
fËö&j¾Ël®¹^ã¹~‡ËpµDYýÏÛè¹Áv̅æg›ÂÂ[*S» …¦áZç¡þøvdöücR	B rvˆàéñzH“7ž­"0Áv,ŠvW
žY!(„ÿ‚Nß#޼}Žûö _hšJ®@‹}ú{žK±ÀW5ó;¢K©Wû“ùnŽûZÑÏ7eêQª-…êQj;ÍVR™­.Sq<ÜAëk5lû÷!†ñ1’ó½™ë5žëwH±|X–_ƒ«W¯æm§½Ê©û‹H
72
Ž;’'¼âægšKêv.5rU?ÀûÄ^¨rSs×ºZöÝÃcž
™4u Ôº›Ž÷‚ŒÆ%Xì¼1¢nUaQ•°áÎâãsA+ðË,Åf€Ù$«”z¹§f"œ GçlK¡z”ÚN#½³×¥MÛÙ}÷.ÿý@Þþ¹^ã¹~‡Ë‡2æ=х÷+V¬Àz‡“†Ÿù™J“ür€–-5ج+°ÞnÃóxÁ¯òS¥»c‘š¶Ô`»ÝHë}ÚÇÈ兵×ã2ìu¸<t½“`‘¶#öžï=¬+­Tojbø2ÄNûñÜå`…ÕJõ#M'¦Ÿ=хç֕fþ³é@ÿ/›p:lFšíú&™Éwjs©ÉÚ½8lVV¬XÍá¤é¥é×h!™*¼S» ;2¿nç"´=ÝIݑþۇý]´>߄g͔D<ÌðÈE.Ÿâpw+m¶ÌÀn3_eÆ!sÿ/šÍ¥PB½¢StdÊ\bËõn§©ÌV—Bô¼ÐAÝî:Ú_Èï;š³ísü)–‹.¾‰H«ŸØÍésqäø(ýûw±ùßrÞk›RýƒÇ8ò—0º9©3ôî6Wo ”˜žgõ£÷/aôI#íéãÙüèÂLœLDüT?±›¡ó†½ñóCì®_M×çÓ
Yýè.NŸ‹#S’Ƚlö4Qýè.†.ÄAJ"ï÷´«¦~7CçâȔ™]5]‘5Ø^Í®W{]|éöÙêé\útüóýt¿yš¸nˆ¥÷•]ÜÿËЬùϗ©ÂÛø“Æ¢cÀÁฤí¡üîHýlñïŒVå¢þ™&âñÓEÓøª4:?ʏ”•£*ï^˜)Nsµ¹ŠÕ«û“)¿ucߨº ¶\ïvšÊlu™JìývºS>ÞøõaZSþ¼èçk±½”ïbù°èâÛû´!®ç0öíU.÷~5ûåíÛÞ¨ûC­|ñõ·|ûõ´>d‡É
Û6<Ôʙ‹\ý¿ßòîŒˆÖøÙŽééæcoc;Ø÷×/¸zõ*_üõ:·÷OKëÜy˜‰ÿ½ÊÅ¿=ú¹^´Ÿ`ì¯rñ¯Æ]/`—øÑ.~ý-ßN\dϏ쀤óéÞ¢6í:>
73
@k¿aÓÄÈ»FÞ£ÆÍ/·ûüêÕ«yÛ¥Ô§ó3CÔߙ0Òü·QŸðë×/J3-´iáòøZ£§â[#hyu]2AèD€­OÉK³ãîÕ´e^~;ÙMngh•€à%‰¼d<86½æ£¿±Àd
74
ô!v<ÑIý‹ßèås-6—ÂlõèmÜFÿ'QãÔôðãæaº^Ë®v-¶Ì·¦Rj»ÍV—<ÒÑÍæÚí-½ùÑÏsµ½”¶V,OVØÔzµî™=DƁÉÏÛJ>Ù(€§ÖwSñWâMOuZW0*á‹o¯Rm-|NÍí+O»߲Õf$J&¸­ü1(ssõòp^Þ¹é¸cÅw*óʜ™Æ|«­+²Ór.®&GòÎÿø¯â¹¸’`ÅwÊ8õ¿WñNٗ.gÚy‰V”?¢Š«Éhqû’1‚ï
75
|o!³'ajÞSëTJ}šVzãQå¦~‹ï›¨{r+Ž"×+cR2I÷«Ýøž/½[­÷Xu—þ‚‰Á}4>S8PfNËúéÃìhÞÍàG¤EàZï¥ùÅVv7mÎä!Gƒìx¡“àgƍ­=³g‹pzeÛ^íGO	&¾¾@ô„Ÿû„/ÄÑìU4þ¢‹Žž"FP0Ÿ¢õ(ÁæbçæîŸ­^åå•þu#¯÷3ªƒk£—=/¿Bݺœ{Ã5ØRJ;•RBí_(ýluÉÍ3ðt
‘çèÊ	²Š½ßÎæ×œŒ¼Õ2gÛgkkÅòa롔9—ÂÄ>\|ñ-%¸©pš$+VÜV0¯o¯^Å:ëùř)ýLS|f²c¦}sµêvìt5u»‰ÑÙÚ¹”ú$¿ìãÇOïbðl<{PØÙs4DÇSŧ/ÍG|rmg۔Ö&^JuQÜÚLßEv®FÄàðe¨¹½pw„'a ‘Ìñ|ƒÆÁ2÷´ô³8d×DÚދß^Å9KA…—bÛà7Iî0S¦ë)Š„ì¨ßK\BÝΨ]ç¡n‹—
w—YJ}¬w50n ñå0ƒ§ƒßïçÈñ!:›èxjæ.¾¹â^_³¬ÅtêÔ(%
76
Åò`ÑÇ|ÛÖhìØ×Cò
77
Dßë0"roÏvÛ´n´iê÷ý&Iò›({ëwPõð¾Eµ×WeØÛ°§‡Ä9ÙnFiÏmÞæLìªßËH,	—ctüÔðµuÅÇ¿‚f Tãóí´ï¬#vº½hڑËIbßdã”g¯O2!Ý}^Ðô\{M[älQ؊¹²Ñ¾
78
…âæcÑÅ·±×Þye·}g«Ý€ûÅì|ºúÞØ-ÿ ›ÕwÞÆmw®¦ûƒ8”¹è9Z¼‹ûzÐÒkOøÕm”g߯3Ət-Xò“n¾_y+þ©’½ÇGÁ"èêm,š~Ï:C@·ÕT²â¶rûéÄ*cß@ÂÚMšÔñýºjo6xköúXÙwŸñðÓùÄ÷Y±b•?ø1UåÏyT,M–ÒCÀRª‹bi±èâk»§‹ÿý
79
µk¼¨¨¢þÅWøø÷Ù®G«£‘ÿï]šT‹&€2Úǚùøïg²I‹e¯»/Þڗ±W³»xᏧ<¾pCo°i,ûúMþëEZî*ÞaÝ:Eócn„¡Ù©Û¹‘a#
80
|×ύ¨åÀ}¸ì,­,;E¨”ú´ÿm„¿nÆezÉé2†ßZ8o_¡P(–3×=àJQœ¥¶²Ö|®
81
…b905àJ½ÕH¡P(ŠEF‰¯B¡P(‹Ì²|±ÂÍÂRénV(
82
ÅÜPž¯B¡P(‹Œ_…B¡P(%¾
83
…B¡P,2J|
84
…B¡Xd”ø*
85
…B±È(ñU(
86
…b‘Qâ«P(
87
Å"£ÄW¡P(ŠEF‰¯B¡P(‹ŒZáJqC	Ÿ&òy¤äô®{\¸××=}¿‡Î×z	~AŸ”hš×zõÏúhÙâʤ+/¯¼å_7·ê P,W”ø*n(‘Ï#ø~ÖVrzÿŸºŠŠ¯~¶›Í¿rà÷]t­w¡	z‚á¡Aºµ•Ó—xc§«à¹
88
…B±˜(ñÍ!ú0„°$ÁÂ}NE"¨¼ëíÅßÝ»\ðôx=@ËÎ|/ø
89
ïßé›!ð?ç§ïoqç4·Ðlx¶4Qs¯Ê삝§®W
90
…¢d”øšŒDFˆÆiÚ¾x/ŒOÄôë¥eg¬\´boJ¯ò>};}ø_÷çío~¶yæ<F%θÄ]5ýaGTÔ11V—·/ôf7û{_ˆ#S‚ÖžÙ³Å‘I=ég×¾CâØ«Üøþõ¾-N6¯’Õ.n2Dùê]\F³äì«îdâm./¯äíÎfÚ^íeT—Ø×¾ÀÈßڋv)ÏÔÕ{?ÀŽßúÚ:SY±“Ýlhê6…ÀµÑ˞ÿ8@ݚéí¨P(pe2ôáÞ-ÞE-Óæ°át9	}ZÔroFZv¶dþ¼ÈÞÌñÔÌyôu7ÒöÏ[	œ.©Ìÿ.HÓ¿õpñcLLŒq¦ÇGwÓý™ãú9?÷·ôÐôrccüG½-›ñŸK6­Ò\JdÒGþ³±Fg×{±lŽ UeëVˆoJaâïg8ðòÌÞ}1ô6lPÿûÃփ-ôþt3þrÖ²64uãë9ÃÄÄÿá•gªØQ·k^v(ŠÒPž¯‰Ù§üØW1†ÏGÁ"°
91
ÉT«Åì6[LX@Â" %Á")‰Ó‹Â8+ÉTÒØ‘’ %Î5Nªï2¼+§ÝIp(ˆçAÏâTô&%íÕNõ€ÁÞæg›‘R<7û™.NÑÎÖyŒ½UÔ=â¥vc
NgÂbÃsŸ3/}ë`9ޝsK+НÙîiöSwô˜×êzÞ>äþçzñ…|¸Ÿrà?‡_ÛèÞáÀ`»ê°¥€è±œ?iÑn_on»xï›1iQúš»©œ¢å!Ó֍õ¼Ýäþæ>|Ëöæ*Kv›Ùç©vƞšŸ
92
…¢4”øšäÞØ#b<ö›.·ÍžÀ&X’ˆ2+Â"eV‚M㦕LIH	dRB
93
t)AZ‘2IRùK	áO£´>%è2Å7™JÎêÑ-¦
94
0d…·T\Ïtpñ'­„?b8%òQÝ¿:M\BãŸ?æÀSYöÍÒ­¸¤Ó÷€#oŸãVô
€ç“µÄžÁ¯]Èñ~-õ^SO(ÕFÿxõ‚Á÷âÔ¾è,\@ºŽökïÞõ_Ðé{dŠ­÷í1m͊o¡²Þx¶ŠÀdÛ±(Ú]5x6ºêΠP\WÔOÌ$×óÅ"°¯²£Uh‹,æqK6°’“yÄJóøJA|R7„ØÌ7™’a’؝Ό`Yz¹“‚#ǎä	/d…¸ù™æÒR,6ÜÕá~ÀG—?Aød'[Þ΁§z2Éf“¼Q	Ω‰„RqãO{ú¥& …È~?î݇ðívѰo˜ú?zÄ%¯š¹$m~…£6ÜY9kºBeÕýa€Pën:Þ2—`±óÆpˆºYìV(óGù@X@˜ÈÒôLe*Ç£MLJô„¤ºÚ±a½¢#“’xB§þAã½»ÄtcLPʤÑm­ÌÜ+¦ç«¦	ïÔ1à#ǎ×`ªï¬$\(‰Å†{ˤ~zN6U	ˆNÍOFAT'›Ä(A]Ò~,J‡éU;ŸÚÇèñ6ôx²¬ÇB]ßêo·À™¯±ë©ÿgÅb£ã‡¹ÈÅáSîn¥íљǩ
95
ŵ¡Ä×DXr=_°æŒá¦»†¥”ˆè“F2)‰½L`/a…ø¸Ž×)¨_o£¦Ê†>™D`™ó͔’L’O¨.g“©ÂÛø“Æi<­ë5ڏG“ú¢¢~N6µ¬Òèü$–·/öI'ÚªœnÜ5Ý'ۉh>ÜeæÎ²Z+â´;‚¶®qNe΄õ=æ«Òèü(ßV9 òîÒçPhU.êŸi"ŸÛƒŠB¡˜J|MÒón
¬$&yžnR¬OJœw€@G×%ÑqÈ8Ē*Mà^c#‡ö7GˆM$‘˜cÊf~2I)IÿSd=Ý´ðy\J´sÓÑ.b{è>$7®ŸœL~¿‡&o¾#{ædSÓk-66ÐûQRý¤Ÿ7ñ½–T×Oœý¼÷¿æ‹lã^7§ÿ=‚óٙÇ{‹!€Î“¦˜¦$áúix¢øHÓk>ú|A¦@¿bǝÔÿqæ`/€w¯¦ýxˆtØCìd7³wÊ+ŠkAuxšˆ•¹7›$ò²!˜Z™fzÀ63jي½LP[¥qät™ÒˆéIœwh8í)¡ïÓ(±q£û:í1ƒ4º ±hšâq/S¢Ñ(u[ê¨ÛbÌÃÕu=s,wÿlÝÎÂ^G(¤Ñ±ÏOÿ‡ëMõÑKËÁlÔr©hë[ùØ/Øñ˭캠c_ã¦åϧh]oˤq<â…Ö]S‚œwÀO7SW;·2Ó|ÜÓÊýMŒØk‹ j}-¾×N1ôĆ"¶ú8ógØñR»/ÄÑìU4þâ
:¶Ì^þ¿fÇ{Yí‹äÍwV(×%¾+ú¤_YÁ©AV©„¹bU’¡/!ò$ͱ`=%p®hÂJTO¹dx»Lšu*ÇóO@ÊA.¼ÖrÁu‹Á}sJ?b•‡Ž?{è˜%Ÿbc¡S÷;ŸôqêÉâsoŪV&&
96
x—ÂUÒxk±4Î-­ŒÈ·%'ý4[÷qêñâ¶+KTyycpqç¸+Ë%¾&yÑΩ®' jÃᡙ°°¢ãæ!‹@¦ ¡K¤¢Ì†«J¢ë DÎÅÐSݖ_%Èô2[2¥g–²\®¸××Ìø¢„¥Lyyáèdõ²…bé£Ä·f°,¥@³Iœkí8Öhh+!6ša¯´X‰ÆâD¿xÜVªïr02£f•Føl”ĸ$þ)¼)	–lªLIÕõ¼LQ"«P,_TÀ•‰•Üù¶YAeÆü]™„è…8ѳQ@b+H]¢i­l·NCN&©Z5kôŸŽJâ±"•]AˆFWszÌWE<+
97
ŲB‰¯I’dv#-¼™…5¬S›#_ÆÐc÷½F ‹”ÒXj2)†#:ҌrŠ$‰f
98
xv)Êì¼ain+
99
…bù nû&¹+M	WšÕ𷲕CÓpÞ¥Q»Î†Ó.ˆÅ%CC14›†ïY'RBðÓáÏbDã:öÛm•2iç¬ý¬ºœ
100
…bù¡Ä×$óò0<_h+󗖴Z@”C„ÏÅа©Ö£†Î%
EqÞ¥a³	t)Í(éô{}¬FpՔ1_…B¡P,/”øšØ„-gK¢Y­HÀ–ÛelôŒLJ\ßÕ¨qZë„Ï'ˆ^JšQÑfú” )%ZÊfo:?Pó|
101
…b™¢Ä×$ßÍÜÌgZP-Æö2¡HœÄ¤F|2‰f·™h„%ÝÕ,±
102
HÊ´Ð&1âT¡r
103
…B±Pâk’?ÏWbµ’Þfd֌Ä'ѰnxΉÕb5–¢, ót)±Z i‘h";¶œñ
104
…B±¬PÑÎ&S=Ф)Àí";,ҟDÎØpY:1µ×ðœ%c-iŽ1+ÏW¡P(–Êó5Éõ@vÀ‹ncÃ"ȝ÷›!·åÌW¯|ÓÌiDÉôüݔlHiˆ­Ó.Œ‰ÃjÌW¡P(–%J|MÒ/?àŠÑµìu›ÝÃÉ$ H¦À
105
$3QÊFДœ¶m¾À䴇›^dÌïÉt´ZáJ¡P(–ªÛÙ$)“$¾IÀJŒÿW‹•$Æ<à$KO‚¹&sñm™	ª²’LALOØX’RŽU"ŸGp8ç÷æ…B¡Pܚ(Ï×d돶8Àù]'v»=ó¶!‰ù™^‰*'JY˜k@§Ó9]ÐùùOÍOOé

<=‹XS…B¡PÜh”ø¦Y	-Í-„†B„χó^ó—Ì…Æ}¯›šõ5YO[¡P(Ë%¾SðÔzð <ћb¯ßËE½%èæ øµ´ö|̞-ŽiéúÚ]<Š…D‰¯â–`êTÝ\on
106
]›èÉnîÿ—ûá¿òX]GÅrD‰¯B¡Xœ[Zùø¿((À
107
ÅrCE;+–å啵Ss÷jÊﬤúŸ;2Ç÷·³ù‡5”ßYIye5›Ÿn#¬çŸû¤‡†G=TÞYIyy%åå«é<ˤ‰ì¦²Ü<V¹šûŸØÁà™—Gô„ŸÍ5Ք—WRíiÀÿ~tš¥ØR¬±÷lõçVÿp+þ“ùù—R€ØÙ45ÞüïgŽÉñ*«Û¶qè綛^§R0ØGwÓýyöæÙµ@mœËLí}½êªP̄_ŒcǛ’ÀßF˜øû¼ì ²¿]ï@×[§˜øzŒ±‘SøîÑPçÏ;wósý4ý6Àű1&&Æ8ӓ/šºñõœabbŒ‰ŒðÊ3Uì¨Û•—Çý-ê;û˜øzŒ—›èmÞL G<Jµ¥P=ô6lPÿû&ÆÆ8ØBïO7㿐¿RÚlõÐ/ØÐè§î¸86Fðè"¯nc‡)4¢¢‰Fz	MNm]Éîwât=å,ý‚LÁ¹¥(¾²ÛB´q.³µ÷õ¬«BQ%¾Š%‡¯··]€æÀ{Ÿñ¶ª¶W†èz«w•±-4õ»èò¯å¿{¨À…0d¦
108
…ì63òÝ"ð<ÕÎØßçåQûÇ>|[\`çõ¼}´ŽÎçú2ÇKµ¥P=úš»©ôÑò™ÿÆzÞî­£»¹/ïÜÙêÑ×ÜMÝÑ>Z¶Ô , ­ª¡«¿‹þßµeËßë¦ó|¯Oÿ¬Øš}¸®ãº0ÑÆ¹”ÒÞ7ª®Šå‹óUÜpBŸ„‡#ùžo™s~-öéwˁŒA*Aèý ñoDÎ<‚”ž—ÎW5óög«LF°‹¢ÝUƒgcVàÒ´?™ï)9îkE?ß4ÍɖBõð_Ðé{$¬Ôqßô
™üK©‡ÿ‚NßùùˆŠ:&.Öe¶OvõôÃ3­™}}/
Rÿ{fÌûZYˆ6Î¥”öžK]ý‡×T?Å­ÛíÂsߵ͊Q⫸¡¤…w>"[­À·Z?ÀûÄ^¨rSs×ºZöÝÃcž
yéfsrêþ0@¨u7ïK°Øyc8Dݪì™î©™'ÈÑ9ÛR¨£6Ü9û´«Ùê1*Á9["á¤ÃÞCX¶u’ö^ppq½m–¯…hã\Jjï9Ôu!¿«Š[“ôص°_Å
e¡…·mOwRwäc:Îñ˜R±â'Ãb£ã‡éôÑÁ‡i{´…º‘žL’h
109
œ¹¿,2ׂØb·ÀÀØX~þó J@´öþG
‡†9õ‹ÂûÛ°?¹ï𗛉ìfÆÇƒhã\JmïëQWÅÒÄ÷|þCkߛjÌwŊÓÿ¯´âpVÓò۞Ù3¸Ær—˩ރ㒶‡ò»*õ³þ"©KC«rQÿLñøé¼ýݟL‰*þ¨ûÆlwæµØâ«Òèü(?9 òî¶"g¦¥J£û³)¤)ÿ^CÞ.mmìßF(>LÃ+aÚöÖÌ©œ©ÄNv³á_ü´ö|\Rúù¶q.¥¶÷B×U¡˜‰›J|’’ÄG#Ù·
ÏoB7ÚÅ-Šo åÕAt	È¡¶>qdÎùì¸{5íÇC¤_‚UȋëmÜFÿ'QHAäƒ~Ü<L×kÞ±¥é5ý
>ˆ S _±ã‰NêÿXXxŠæsÄGã6z?2ÆÚõÑaڞÞŦ_wLKÛõŒƒmÛZ=ó÷ÓÂë›eŽïB´q.si«B17¥ø^½z5ûÿÿ~Ë©?70ôêŽl™âVeÏ_߯6ÔMõ÷*)_½Ý‡†hœšs>þz˜ÑÿÜËêïóP¿ß4݋;ü¢›Ží›)¯\͎—O³gðu97òk±E[ïã̟›è}©É˜ŸûDU/¾Á9.X¡­õññ‘Fz~ÓdÌ®Û[ºè{~z×­û{ÐÏê¸÷–.ðåéyº9ÿ¿ß4»ð´q.siïùÔU¡˜+ì?j½Z÷Ì"ãÀdŒçK¦ð
110
à©uãÝ´uaŒ1»@¯^½šàJ‚ß)‹àê•d΁$þ_î ëÍAFã:¢LÃýP=]Gà¹ÃšI=ÑEËoº9}.ލ¨¢î'm¼ñ'éSË9êãûÿrÊ\œºx¯™WôDM/u3tAÇõ@=‡ß:Ìýwޖwn:¯‹oíaëÏüDt‰ë¾FFNôÉ/Øõ³½ôFZ{;Àûݬ½ÅÚaêþôöÄÈ»ìúå^?
111
#ѨÝÒȁ€ŸêÛ³çFOøiùMCçãhk7Ññ§vx+·÷<I&“t¿Ú=§1\ÿ¡À’
112
`YŠË^êºYí䋋§pÜQ"׳o¶º*n^æzïÚz(eä¥0±Ïo€«Ë	ú¯¨hÌ;4°½š]ÇF3ÛrRgèÝ#lõ8H|itŸ%"]¬~bw6Íø(ýûw±¹¢–Ðo§éd„×bçá3›ø<?ŸÈ½lþ>íü4ÕOwffUÆ.™ÞD"Hõc43ÝÒ°wóC|ü<ó"­þÁcÄ3¯0Ô9}ü ›¿ª&6d,̐çÛ?wš®ž_aŠeƒ.AÈ(ۼл´Åh9ÕUqspSv;ç\ýS9?þU?uÝùKÀí:>
113
@kÿ\½z•‰‘wÐG³Á½Owàzþcß^åbpáW§¨Œô¶Â‹à•à0MweÕ°·ÑÈÇþØ>.N|Ë·__¤uÝð´<Òhï1ÒMŒ1ð–ñtÔ·½…Q	ö‡Zùâëoùöë/h}ȓ¶^  $jåÌÅ	®þßoy÷Æ<ÍøÙìØ] c{Ú¦‹ìù‘6ÿò˂šÕ•¬þAò©t<°´×a^NuUÜܔÝÎE)«âðÿÓâʱ1#øî ÒoÈ IDATÁ¡Á÷:²]©Në
114
F%|ñíUª­…2-\îÛßÒ`˞ÎçÔÄU¼fñÉÄ·•?–W^:¯cßâsäXsû
115
“ðîÄ·l5óÎäQææêåá¼<JívÎ͏+1V|'¿;9mûÇÿ{Oº+:1ÀŠ)¶_+ªÛY¡P,®µÛù¦ô|ó®®21v‘ûkar”]f½ßØé.å•l~z¯Éo.é.ÞbÂ;×#h£íçCóñæè¾ÕV8º ¾bzasíØ­9¢žÉc2<‹eÉ¢G¼9ù±rúS{ÚvOÎ0¶…y`R(
116
ÅܹùG6V‚Íᤥs€¯”#/Œnåõ{‰K¨Ûùµë<Ômñ²áîüÕª„!>סæöùçPû‹·9õÛ¾·ƒÑ7›ˆb8VæçLãù‹æ•>/w™!À‰dŽçkæQ枖>v%'ŸËÅÅy¶çŠ´í	ؚ~x˜Áv…b©½%zI½¥H1ç*'Î5‹÷›_|d"F:èJ«Íìê†K×ø|;MkǦã¶­ÑØuNgǾ>îl"þA«Ýeµ\½œ?o8ôƯllc÷gqšŽE	6£m­Æ®³:-͏¶cŸaoãܦ>µn´³íƒ8;ê÷zkvâì}ÚÈ£êá}™ti±Üu(ÈÏ{‘ñaº_˜¾fm©¤mßÑØþÿ·wÿ¡m\‰¾À¿?˜”¼‡lBM(–É-‘·)–š[b%y»¼Èíò"§HI/µœ”TNKWJ—®Wº¶[¶±¶lk%´²¼$V ÜÇíZ~´µÚDKk…MÖ*{eJ°ÄÞ`^X<AÞ²-Ë֏я,ûû“xtfæè‡ç«3çÌøÝP"‚SþÛ#*GóÁkø…!{aZw¼ßx@¶^•ᛩï×àHLjÞñ´gîGqT[ƒ£s˄­
117
ˆ¢­K“»íϜFàìQ<qö躚S}i÷a½ÖÓu§1bkZ ¾úӘüßgP÷ßÎÛMܒŸ—ÑÝ哇¹é@ÝGâMjô_JœîÜ¥DÛÍÞhÂoÌ-¬È€”éZ7ìOµ#òzPWÕSðöˆÊÑ|ðбô·3¤õK¿OßMŸlá»*û|“TÂ&µ
èøä6<­‰¦Ó?ŒÖ4@P(a8ޅ±Ñø¨áö7â#¤+wØ1ñïgѸ]	6×Âxê,n¿—~긍*;:žV@ŒzaÌÄ·£¶ãoý]ÐÔ*€
118
šÿñnÿeî6gƒlcuÆþúg´þ÷F(›h|¡·ÿþCR¬Åë‡íÈ~(6	€ €f¾úŠ-Sù/VŒyûâ¯A |º}Þ±¼·GDD…YU-ߜGÝþW-\_Žbé
¾–nGõ¢þÓÏ}›j¿Ý÷f°x¢½6@Ð÷í¬?Wÿw¾ÏãۉWٞC¥º®¡æeuN²Q…^·½K[–l;ݾR-W°ÂÀš´ÌZ¤QÎDå¨íÕöRWJÌs̓™™¹yÂc™ËÛª
119
ßÕ¬wŸí7#hß[‡¥²šS+{S"ZœK¿âɃá+‘õ«Q̼Ñ÷—>Äg¶R(k¡ÉŽ+)fÊ¢•¼DàÞòIN4;´P7¤¾µÜR¡oúÑó©¾ïƒˆ>¡P(¡nÐÁøŠ–Ò¶1oñ”‡R§?”k*ʵ8å%Q¹cøJõ_ªÑy΃Îs¥®¹/Ço/i8`€ê_ꖇþcÞ!/÷Fa:–y4wô®Mï…Ð÷^/zÔP€Á舎ß4ãÆƒA\9ž[ÏcЭflE«Ã—ÊŠûr<tkçB÷ÿ%SÕÖÃz²¡É1¸/÷g`ç	'<ßN@³èF8‚¢ºfhÿµ5Ï´Çs¿ë‘«´3ќàÝø½g‚7ùÇç˧⚌¤n	›
˜žJÞАÍ:müö{Ï5Ã9”~¢†ªªšeË·úѲ7¾~]}:ÏK»7uøf?Z~©‹ß>PßçËOµçR7)嫪jà;ß	íSuñ2{»“#¢Â1|©lîÂpÀ€ÙØlÖÃCÊ>áy‡	ö½Íp
¥/3/z߉ݖ~˜?ð`zj
120
ƒ°Àmi‚óþŒ¤z‹“ýØmº˜Xÿ\+¼]‡²ïw܅gMNÞìÃÄÔ|—:üð(Ú.'Â2׺I-ßvU„ëÛ1Lÿýô}%_î§ÔE™G´¥S”ÓÎT½xì‹`ƒ^É×ñ¿Pveÿ°H¹UÚðÙÊiŽõbhþ·pfs-ÏëѸS•ªBE%t»ë÷·:a¸4ÓÜÝnT{Œ¸~ɇÝ'ܰú­©w°ÈÀ‰ÜÃ0¯ÞgÆ ë~föf\ÏÓê€áÒ0,¿ˆ¯'lÕ¢w 5ÏÙqá˜'¯ºI-ouwC£TC¿+ëS$¢µåûØá¿ëôß
úø$&åD}¬SÃà¹N4n¯Fð–í‡_À†Ýhÿ<Ѻt=ˆ¢cÉmæª÷ØÏxµöçý(l;—¬¿ß–}½ñåû60=‘¸ýd®u“ZÞ¢°fÅ û5´Š•èóP”–ïüA˜Ö¯Ç¾H†û.Q±ÿH**¡Ùg€fXÑëœA`¨Íot¢ï¥ø¨êIP-Í"AĤ}îƒ)×Ï>’:å~¥”ÉP7©åŠI´¢ŠÒò-ÇV—\ŸHDÚi²•«ßRƒ@ªñV•Ð耽±°¨VBKˊ!@¨•Tuªõcá¬ë¥Ü¯”2êVès!Z«äžó»(á˖/ÉñÐìÐÂ;䅳þx‡¼ÐìH?ù‰­AÎÏS´°Ù¸ð»e«=w’Ã2|§Š­ÒîekPâ̍äõ£ß;ҔN°Ô*àø~IHG}¨z²%ïºú\ˆ¨8Øò¥¢ã30?sUôaæVãüã™fº2_êE¸£ŽË>„"3@Í ðM?Ìz;¬S†š?µÀkjûVˆ¡;8dòÁú©IR½
;áµ®›Á…õ[g¿–ù¢¦£pߊ_2…ýp;ö¿¸ô'׺ú\ˆ¨8Øç[ꭞÇÙޔ¹ú|MÇÌI3\)6'E†áò.”ËDPà÷+ÐÝåDËûLF¢
121
¨wêa9—
Šn;´ýºíãQ(·i`ùd¶†JIu”FŒ–·,8}w‚²­ïþÛ×Sl·âöEí¿5£ýDŽ͵0ï…çdâKE®u+ô¹pªJ¢â(Î¥Fó—šPVê˜ø£‚Æ1Ɔº3k"€7è•ø§Lw)43#x7¸´‹å2·³°U‡îOtIw¯JGuЊáƒé/+ZH©ÂI±ÓÏ˜´¬û•ì!¦ú…ƒ¿°­nù”—úIǖ¯Œ6Ô9ðO—	wh€€8؁	ÖDË6ÚyŽºA-9d—Êe–&†ÍÚ广É^ˆh…°å+“
u<hÀ÷^ÌþèEèýB›K]µ¢³å[(*ÀÌfqN´RØò•Á†:ûº€Z5pw¸±Q!`仼ãRW¯(änù•3¶|WXRðþèî¹A€kDDø‘€I±ìO9åÕò¥õIµUßMt»t¥®
122
­Bþ;~¨$N_[lùÎY<9©a™¼÷½À½‹¸¾zôÜYÁ°åK«Ÿj[üÀê¿#íŽR´¾¨¶ª>#r`Ëw‘¥A¸¡ÎéíjTþ˜¸5݉ÛJ¼±D‹w-/À–/•Õ6y°Dép†«,‚w³Bò:˂70¼ß‰E3k,xµý "*6Îp%Õè¤b)ƒœ7æ[¼kgbÅÖÅg€ˆ¨HØò-¢…ˉjÕÀ}ßBðº¾×f‹w?DDÒ±Ïw‘Tƒ®Rõñ¦œõO—)~ïݹoÅÚíã]Š}¾DDÒq´ó"'®'ý¾¡î_Kžp~Ãa7¿;÷Ë6# j„õÄiØ_1b£ZŒß»ÅÚ՜G;IÇ>ßBü1ÀòæY¨´ß
`v.x×zïRëö3@D”öùæKm”ø¾öy",
123
FôÞXû}¼K­ËÏQžØò-D…a»ˆ‰ÝbôQ5|3DÖQ‹wÞºýå}¾‹l¨;´|YŠ›ž·ŒÐ@ñÒ
t|t¡nøo‡1#†E(6ÉQãՃ}¾DDÒq´ó"ßNú}ÆÝxüK–½ïÂ&£‚÷ÃðÝB܅ ¡ÛÜx_Ɗ¯íLD$[¾92þ#„Mø¾Ž¢óã~¨¶V"4†áÅ(*€Pˆ±R×R~lùIÇ>ß¼?ô£þi–SATobã\ð
124
›°îN9ëñ3@D”?¶|s4ð¿`ûõt€®1¾LP,
125
ÜuØêäoùï¸7ºl¹f‡êµäíDïûÐ{Þï&#Q(”µÐ=o€íL'4›åªªj0==UŒªgµ’û’óyäj5׍¨ØØç»È†
»S,[^n÷ÞåËn|“b{)fÂZ«# åìóu_î ú—ú…å¡ÿƒwȋÀ½Q˜Ž™³n'xَ¦w°õt`ð]ª7£aø‡ÜhÑ6áÂè ô›…{D´~±å»Èí%®voØ
,p…
¾]²l/€w—,{'Ͳ5J®–¯ûr<tkçB÷ÿ%SÕÖÃz²¡É1¸/÷g`ñ¡MþušE7¬ÕбÁóÀ‡–Ã.Lø¬+ôLˆh=cŸ/…ŸàÝøíçƒ×ù™Úç´?ÎϜIÏ—OÅÿz'4ï^H
126
ÞÅ4§ú`}%ùôµÿªÍ:-j¶Ô ªªUUuè
127
'•	ãB³N‹ª-5¨®Î¡Ð²m‡oö£å—:Ôl©VßçËOŸ/åû°
-ïû$離ª¾óÐ>U/³·;±­Ï:±û™zTm©ƒö—f¸n&?
9³>ïǝhz.^¦ª¦M‡í,ºùW¦:„oõ£eo|ݺú&tžç
îi}áWTr|÷Fa8`ÀllÎϜp}æJzÜõ™ÎϜ˜ÍÂpÀ²OxžóNփnª.¨`;¦OZtèÌ¿ëÇÄOS˜žžÂýV8̉®Šè¸Ï¾ì‚ñ½~LOMaðœîW›à“˘œ0¼Ù‡‰©)ø.u øáQ´]^nóü¶Á)šày[/y?ÐvU„ëÛ1Lÿýô}hÁêð¢õLOMÀó?[pñåÝpM.ªã}'v[úaþÀßþ,p[šà¼?³P&øqÚ¿z¯
cúS˜†õ_Ãh18³ÖAœìÇnÓÅÄöϵÂÛµü{¢µŒ-_*
128
¹>Ê­ñÀ\¼óæ—Ï—Kg$
129
èÓ´zÓ±y=0ýB
a®XuÀ ZžV.,ûÔ@ ÚiÄu·ŽVOr™KXh!TŠ­Zôôbà{Ê}ú?nƒcQðJÝXÝÝÐ(@Q
ý®Ê…å× ,¿˜[w×/гhÝþV'—<0íQ%•qœHL8c?;‚ÞkÐÔÆ·+(ªa<íBt<9|SÕaàDî+0îŠo_½ÏŒA—AÊ[@´f°Ïw‘Ý)\¥¼§`ŠW)ûs×pïRewoŸ|ë¶Ìƒ¯œãQxž¯NZV½«ÑñæD™=Ée„ÍLO,ÿÇm8tvS?%·À¥ì,ÊÔõíZ¶®
ÑÍëº,¯cõÛÜöã­×ÁŸ¦€ØüßøùÏïŽÀwÃÄ¢I륪ƒó~Wv.Ùþ~oÊú­Eí¼Èío“GWíÞ»]ïN0ßÂ9óN€ÛKÖÜ
àÂÜÿŹòmº–”KÝZ[dí,åR.	eô›ø¢"
130
飙³•œg·Ôd-£’°Kÿùvô<4âÂÁn´}…E§È¥ìiþº—í_Pâdæ:
131
* –øÞuAÿ«3@­Új¨ŸnD×¥¼ {6k‚)·/ýò0¢µ€-_)b" iæªùà³\säjùF"!(•*XŽ[Ržz¶·,”Ëäµ}Jô…a8’þô´ïòônj’리§¦ ÊðWU+!	Ü1`ð] ªÑY߆ð‹Ã¨®¾ŸLB1$¯+“Â/eÅ Ô.üj?ÜÃÅÛèþÅ¢×/¶|àV*êTۗ¸.ÑZÁ>_)æTBE¦#æ|ðÙÛHkŸÍ-¼C^ˆ1¦#¦… g9néˆ	bL„wÈÍmÚmi?°#ð›vÓ|O
132
Ùqf²6§úYk蹕"â¤5O%ús-µ
133
8¾_4QªžlIZ4øîÜihAÏ%½“
,e?™8ïÎ$ýþÚeCb@–e«=w–Œâ¾ÓÅÖÄ)mïCö}É_\¢w“û{Ó±5(qæFòö£ß/¿&žh-ãhg	Z¼±L-ÚÅ-ÞtåÖn‹XŽÏÀüÌUчñ·éˆ	þá…ÓSÒã™fº6qýMš´Íp^õ!ü0þÞD'ƒpŸµ£é}ƒo§ïT̟Z1`jëfbˆŽûÑö«ÿ˜˜XÅ|ъÓQ¸oçö7
134
ûávì»;Ýf¡z¥ê/Úà«£”ýdrÑxwB@ÞìG³Õî‹‰>gó§xM-pߊ—	ÝÀ!“ÖOMe¬ÛX>ô"*gàÿ҅æ_]”´ÃÅNø_×~û-)îF´–±Ïw‘Ý{—®Š÷ñ.+™bY[Šeg
135
­Rِ«Ï×t̜4ÕbsbàNôaÞ!ïB¹ltoöcx›=ç{à°E­†ƒ­ðûÌiûLÓQ4XñÃ'@Û[fœ@¡¬…éÍ+è>¨£b»·/
136
hÿ­í?F l®…éx/<'3÷yöº-К\˜øÊ*i?™÷ìGû‰f´EDÔ64¢óßoøh`”¢Á†ÛNm¿nFûxÊmX>†­!1bºã«ëhk=ú³m+¨ôhu
ã´¹)ëþ¥£€å-Nߝ„ ¬Eë»FÀö‚¤ú­”ÿÝöØp¬Á‡…1x²2ëJóœç]Ð5j ¯½±r5¤²1«ì‚ãC¬'-ÙÏqžwåT~^±æv&"ÊG®Ç®æó3À¦jˆßó²åKÅ!÷ý|Õ
j†lŽªª²æ
ˆäÁÑÎTewï:Ä`%Z=8ڙŠ‚Ÿ""é8ڙŠ‚Ÿ""éØò¥¢àg€ˆH:¶|©(ø "’®¬G;o¨‹ÏŠóxBÚär›Áñ§Q|A("B T* kTÁvªº­%mGêó,åë!÷hg"¢rÆÑÎ+¤ÿ}Ž~6¹lyäAŸ0ðE¼­°l“À«G;IÇ>ßþλ¼Æ“ûñƒ¯ÿü»
Ç^Ãmç~¨1í/K›œäñ„mÕ¶îçñ3@D$ݚkù†nŒÂòþnŒ‹q匋ۗ³“!´ÿΏ;ˆ4;Uè~o?ôÊD©ùS¸Ó_Ñþ;?¼ßG B@ã>5úþ G}†{'xߏßQGýŠžÓ‹&Ÿ¯ØÝ-nÿ ýmÝo6.ÛßÄ5hî
137
 Ô;ÕsRžN݅åìFÆE(¶)Ñ}¦´7#g˗ˆHº²îó]jf|u–DkRŒŠøÓ
4)ªá?57ïí£ê9€É…ÛŠ¹D“>ŒÛ±@·)y›õ†D•½ñhŠ(H?é¾ëA|ü®S©[ƒ•Û´]K½ný…Û/„#©×Ÿùя:ËÈÂï‘#h3K›Ô~¥°Ï—ˆHº55ÚÙýz<ÔÇöcj̆‰þxË2ðYâvlž×½˜ŒÊ]ümô5üs´¶] FÑòzpùFwjð÷¯áñß_ß߮Dî,/·HàQü_ƒ"÷þ\Å®FLŒ¾†þµƒçROŸèz=Pî›+;ڊŽ}¥½ájù•ƒ5Õò흌·¯¿­Eµ Q‡Çº¤2=wâe.œkD½b#€è:g€C;€È?€äÀ»ði#´›â!ÚüŠxÿb–[&ˆ@ÒéîùÓNj-íËíüHÕ\½tÛSo×9÷<=é ÚÑý‘=ÏHª×J`˗֣ÀÝQï¥øÒNeG½C
MCn·-ĚêóË¤Œý±¹2͋Z¥s§wÅè²òúM‹â³Bڟ77Þè,Ì9¶~Êϟ2O:E¾I•²¬\ØçKëÍ|ðZOZK]šã<ïÌûýpžw€l¼¦Z¾µB<€GE@›&€5B<€£³<«» XV>Ÿ,Ûܸ+¢ç|æ·¡¸¸•›ªÕޑùç9øhžàG¡<jZ<lùÒz¼„õ¸³¢´3a´²ÄGs§0+ñìäb¦—ZàþÜ#[ø®©>_ûÖxâ¶}Ä,€ÐˆêØðLÿB[Ã\™×FŠÎb6:ƒ3¯ÅoÀ^»O_”z~?uül–óAŒEæÚ„â,ƾ¡ûOAÛ·o›{¯ûžCçëނ¶Y¨Õò ’Ïö¬>åòž¬©–¯é#
Ú
#|æÅŸ%ÂHs,ªÆôP꼈Ü	 NH¬,(ÐÿAqNÝV>­ÇõS38ôñ$.žõââÙÔåöٟ×öM5®¿ÈÍÔiçU”vÀ[¾DDÒ­©>ßÊí:L|˜Ï02.BØ,Àðb#®œ®^(³q³c^ö÷â×ùF! q
138
½ïí_v™Q!ZÞlÁÔó!8?Âû]¡ˆˆ(€Ú­Jè÷«`~I}ž³[UÖj1ö¿sWü:_å6%:ÏÐþo¥»Üˆ}¾´~ñ´ój .º$´Þ“²nù¦šõIõ¼þçu)J'TnSÁuQWŽÛδ<•ê§Uè~Z…n	e3m7åóü¹þ¯’û&¬%œ‹-_ZŸD –½ÉaÑ×ÿ<ÞQæ÷qMõùRéð3ú¦m‡›QWW‡ª-5¨{J‹æÃíp
%_’RUUS¢ÒJªÛÛÇåьe—hÞ[œ=O,ú=ÁÏT_†ä=wǹ©(øˆ‹Þu é½Ý‹Ñ±	Lÿc
139
cFÇ+ðþ¦G?KðôôT	kJE‘â@¹?‚ÐÙ6„Ò…@,„æŽÜ¸_ü/¬ÿägªl¬©>_*öùÆ9O8áùvšEãßE%tÌÐþk%jžiŽ—®‚Tt©NWZßV¡íjƒG–â]µ£ú•³ˆ~üBÑNuÊ}ÊtUZôäõz”ãig¶zˆŸ8פˆ`$õ`a³ÓS‰à]|Ú¹ªª&åO¶3iáo\hÖiQµ¥õÏ5Ã9´üúnžÎ.=ÕÁ^„ÞO}-OWgß\~Ê9|Ӆæ½ZTÕÔ ^—ú½
ßêG‹>^¦î™&t.š:ª¶Ôdü=Õòª-5}éDÓÜçªî¹f8oÍ ø…MÏÕ£jK
ª¶Ô¡çëpÖçMÒ±åKEÁ–oœÇaBóÞfÌ~r–ÒûôR‚öŸ5#r$¾Ñqž}م.w?÷¨º;€£Æ&À7ë6!ã¶h%¥ø²UQîm~8ÌÀº5qUƒøÀŸÒ†›Ä¤uãïm?º.]Ààžz„îzqôpðÕmX·UέۏÝ/»Ñ{­ž%‚·`~ùPŠ:,­Oº‘¿‰åM]\¹än›¾ÏÚpèðn8¶ëá¹6Mm%BC½xÖ¼ÿ(—Q•‰çVµ¥.m©éLÈQ™”ŠÚòå¿ëû_4Çz1Üӈž{5õ:´½Ñ	×åønÂGú,dÑ;NœÛÜ	ãÖD¨zZ0¸<°ìS€j§×Ý8Z›´…
140
[ò3·LÿžÎ·F’ó½å‚ñcR9ÄÏ	'Ÿôò§ j0àú%'¼eN8`¸tƀPï1cй?¹K듪~K—°ºÏB·­ÀFè_ébQt»» ÙZ	ÄÕóv,Œì^¥?I_1-ŸžJ°ÓSéחAqZ¾!ûÜ¿à¿ëø_̲íêcݘ8bCàÖFƒ!oyàøÍ
DDÀôÉmô½”e2—G£°üð\K¾É‡s<
141
ÏóÕI˪wu :ÞÀ\ägA…Rl³Cý½á˜?>ml,û÷ÕkX>G¼s<
142
Ïþ%ïíN¢ãfÌ¿·ÎûQ\iXRf¿
À
ʲuñöñ}˜6ç7AÉd˜RrzjU5uI¿ç²þJ(JøÑ•Ðì3@³¬èuÎ 0ԃæ7:Ñ÷R†E؍=èþ÷å­ÙIx6M•H–v÷ñJ´†ç`5B_ÚQy¼+e¹IxöÉô§G (ª¥Ù	õ¹Ô6-ÅZJ‚4ïÉ|§k	Ëm-½äD%W¿¥ý?M%vãÿíg×÷v´ ú½+P§˜-TYNMAÅ¿ÚU%ÕÈÚùeªW:0¢wB|±Ž® Îúê“ÊÏÿ_Yþ}"åUæË¨ øhIÇÂËê°´>Ëê›ÉºN.ËV£tõœúibÕ<‡¢ôùQœ­AÎÏS÷íŠÑ›i×
Ó
·¢¶©o]i­U çVòˆSq҅š§ìùW˜VÖ&l›¼èï‡Wiƒ6Ͷ–Zz¾[òÞ>p¡N›xo­O//3s7õˆêLÄîœ×)…†jҎL¢IDAT9^jDDqæK½w´ÀqهPd&>ãÑßôì·Ãz±#åzâC?z:\9~jTó§V˜Zຄ¢ã~´ýªÆ?–nZQâ3#-þI^f|O‡3/÷Àô>m9ÓG&¼jFÿw£c³˜÷¡Ýè€ñ÷օ2†sð¿/ƒØ,Bß{pèå%ûKÞ·Àñu(þ{lÁý0]×ÉmÙjúÉôžäºþÊã	,¢"”øý
143
tw9Ñò~“‘(…êzXÎ
ô§:åzcÜ÷£p¿¿ü±ùK‡
Vüð	Ðö–§Ç#P(kazó
144
º$o³ªª†—­"Õ»º gй}ùýÂçU>mÅí?nDû;m8=…BYãÉ>t?Ÿ¸’@PpÛ-¢ý¶ãôÝe-Zß¾‚`ÇÑ´Û½íz
»-Mp@…€Ú§5°žó`äpSŸ!åƒáKTdÂVº?Ñe½¡Æâ€ìøv©ÛÄÉT/Z1ü¢Uòvie‰À²Ó•S[²LÀð_.d-§z¾ƒÏ·&Z²NåÓFô$w]tIlgé6«÷[11±üóbžH¿N.ËV“ù¶kª÷DÒú2?7†/Ñ*mV*ê*µŠÃhÝ)ø½à¥FDëÕ¨PsáY&_ˆ¾DDyWÍ¥+”Pï	G;ђçécöù•¹g¦”’Âsõ¿'_"¢<¨w¨á¾êÁþŸ§¿6›ä~ß­o|ç‡z‡:{Á"aøåAÓ¿eäïüYJ’œò}?Ô;Ô奄DDyÒ4he=`ÓÚÁWDDD2cøÉŒáKDD$3†/‘̾DDD2ãhg"¢<îŽ"x/XêjPðR#"¢20¼Ö“™oñHåÁyÞ	²0׈(Á{AX[1+FK]*ӑ¸¯zd_öùåi6{*¼±Q¹ÚG_m/mU(gžkÌÎä7t¡¾DDEâ¹æ)u¨Lð´3Ñ
145
ˆÞ÷¡Ój†¶¾UU5¨«×áèÝ<Ì}[UU5ů`*±0šž”i_D«ŒÜ7!døYð²õ¿êAå¿ÅôôÆü´îڈm|Wá½Fca؍m<*uEʌÌý„´‚d~/¾DE$>ô¢©#€ÁÑa؎èQ½YŠjèØà9% í°«ÄµLº5€]´\)uUʒ‹ÿPyJ¼òŸcø‘ÿõNhÞ½"õãšS}°¾’|ÃîАÍ:-ª¶Ô þ¹f8‡B÷‘­|UU
|ç;¡}ª.^fowÆí=kì„þ˜¶W¦-#Û©ï²$Bþ“–T<¥yÿ8àŠ¨ˆœw"°žS¥/ ¨`;–x<z߉ݖ~ô^ó`p—
146
¡;8z¸	øêXŸ^†RË·]áùva¾…Œu¾î…~[æ2ÓÓS'¢Ü°åKTD#Q@Ÿ¦Õ›J«†K˜ö¨€
147
@µÇˆë—pœpTÞêî†F)Šjèw¥oÑȼDëû|‰ÊXŽç’\¢èØS´¬z
ÑñÔýÂRË[”TYÄæ®óeŸoù*ÑûÇð%*"ý&¾¨ôþ£IP-ÍIAÄ"•W°C‰hUcøÑkû”pež1Çwy`áÿµZšÕbjS®›ky"’†×ù•1ív~ӎ`š¿äðg&k~·lU çNrX‡ïô@±Õœrý\ËÓÊã¥FåmáýcŸ/Qù6qýMš´Íp^õ!<7¡Ft2÷Y;šÞ1øvâ®)æO-ðšZà¾b@èΙ|°~jJ¹ý\ˑTò¶}Ù3DTdº7û1¼Í…žó=p؂ˆŠ€¢V
ÃÁVø}æ¤þXEƒ
·Ú~݌öñ(”Û4°|2[Cêʹ–/–ªª^n”BüpÍ{•·Ò¼_¢ ~т+/Z$•U´bø`ú²/
½\Ëç"ݺÞ4xº™òÄð%Z§¤ÌZÅЕ`.€yG£2[ò¯L¾D냵ý„áÐX	ëA冮ˆˆˆdƖ/QÔ;Ôp_õÀð¼¾ÔU¡"ð~íƒz‡:{Á"aøåAÓ¿dÌûµ¯Ä5¡bPïP/¼§r`øåIÓ •õ€Mkû|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆÑÎDDy
148
ÜEð^°ÔÕ "à¥FDDe`>x­'Óßä‚ʇó¼d`†/Q‚÷‚°·bVŒ–º*T¦#-p_õȾìó%"Êï仆ð®FDDåB\8h}µ½´U¡œy®y0;.ɾ¾DDE¢Þ.ßÄüTÞxڙhDïûÐi5C[_ªªÔÕëpônæ¾-)7½/„ïãNì~f®žÏ4Áþ±wE÷G´‰Ù‹Ã—¨È‚—í¨ÿU*÷X0øí(¦§§0æ÷ u×F´h›à{(÷Ÿyzá/ÛÑ~èÆôôn_ë@äOíhù˜—ÏH"s?!­ öù•/ñ¡MþuEb¹ ¨†þˆ
ž>´va·:.O9cóÂó×	¨…øïÕÛõ¸àíEÍsvàÔ`i+W&DpYK¼òŸc˗¨ˆü¯wBóà]LsªÖW’ûCCN4ë´¨ÚRƒúçšá
149
eÜG¶òUU5ðï„ö©ºx™½Ýi·uáï‰à'(À£À²mR:"ä?iIÅSš÷-_¢"rމÀzN•¾€ ‚íXâñè}'v[úÑ{̓Á]*„îàèá&à«`}ºrÙêRË·]áùva¾…eÛÉ(ꃰ٘´hzz*·mQFlùÑHЧiõ¦Òßê„á’¦=* Pí1âú%'ܕ·º»¡Q
150
€¢ú]ËC<“àgèßµå´Qٓ¹û€áKTL9žKr=ˆ¢cOuÒ²ê=6DÇ]•·(slí΋úÑöWŽdh½SBlî:_öû–¯½_¢"Òoà‹Jï?šÕҜT@,RPyE^J"즋¸r­^¢•Æð%*¢×ö)áÊ<cŽïòÀÂÿk ´4«Å Ô¦\7×ò¹pYÍНë[îDë¯ó%*cÚìü¦Á4Éá!;ÎLÖ.ünÙª@ϝä°ßéb«9åú¹–—B|8
151
»±•§.ÀXËä͕ãåFåláýcŸ/Qù6qýMš´Íp^õ!<7¡Ft2÷Y;šÞ1øvâ®)æO-ðšZà¾b@èΙ|°~jJ¹ý\Ëg½ã‚noŒçúaܞÛÀ,¢µEÞ¶//5"*2ݛýÞæBÏù8lADE@Q«†á`+ü>sR¬¢Á†ÛNm¿nFûxÊmX>†­!uæZ>›–Ãg0ùx¡¾nÙc‹//ªªªáåF)Ä×¼·Qy+ÍûÇð%Zê-¸ò¢ERYÕA+†¦ŸñjièåZ>“៤•eð¦ÁÓ͔'†/Ñ:%eÖ*†®sì¹æ)m=(?±%ÿʄáK´N1X‹!ÑO•°Tn8àŠˆˆHflùåA½C
÷UÏëK]*ï×>¨w¨³,†/Q4
ñKƼ_ûJ\*õõÂ{*†/Qž4
ZYØ´v°Ï—ˆˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’×JJ£QÃyÞUêjIæ<ï‚FSØT”œáŠJJ·K`"*záØ•/†/•œn—®à2Q9áig"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™U²²F£†$€Æ]úbՇʘãC4u©«AD´ê¾º]:ñƒ.‘F£^øLQz…/`p‰ˆˆ¤cŸ/‘̾DDD2cøÉŒáKDD$3†/‘Ì
152
íÜöj{±êADDTV.|җ÷º…¯çš§Õ‰ˆˆÊÖÌL8ïu
153
ßBvLDD´^±Ï—ˆˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHfßÕ(pwÁ{ÁbÔeÕSïPCÓ -u5ˆ$‹Fg0–º«T( PTf,³žŽERH9^ñ5ËO1²  ðã¬'­U¢\8Ï;€Lea>xƒÁ ÂÊ÷²Àê­ÕP«Õ6€×Û±HŠlÇ+¾fù+F¾Á{AX[1+–ÿ7k)LGZà¾êaøRYX¼öS¶RW'o½;jµ:mø®·c‘ÙŽW|ÍòWŒ,(ø´óº+uˆr~†õ”
³±ò=ÀZŽ™áºÜ¿Ðú%‰x¼Z9ExmßÙÂë@D+J\b‹rÇ׬tŠÐò]ØD´ÚñX”;¾f¥ÂKˆÖº2?¸Še^¢T¾9K]¢u‰'GóÁãÕÊ)Æk[xøæù­ô‰ªš‚/´|^ø
œÊ”Ëï'øM?šPód
ªêê±ûWí¸øMhY¹'ªjÒoGãÌoºó«ƒdEøûŒÞïÄU5°ßŸ)|c¬šãU¯Yô¾v«õõõx¢ª5õ:z£‡…mw¥üú¯†W@þ§…²­—ëvWþô¿S¹Êý»zà|;šÏ‡Ñõû.ôý\
"‚ßûà:g†÷^/®œZz™EŠ}ˆ!ôœõÂú®ŠŠ•o‹zp½6£Ã÷	7º¿]Ùë_WËñ*ßz¯ÚÑôN¶ž¾«CµB€
Ã?äF³¶	þ2ýf!¿Ë °×¿ð,(Ò¥FùþQe[/×íòDQ1ˆšÏ†1<æzáø¹š}-èÛ×W«îÈ Lʍé7òh=簝±B¾Cpǀ¨=Ԙ:֋æ®zx£&ž_ÁVËñ*÷zˆ½hê`ptEb;‚¢ú#Vx"^´˜\˜øÊRԚWi_ÿ²éó
ßt¡y¯U5u¨×µÀ9J[¶jKB_:ѤբjKê÷¶ÀùuùÎðC$7ÿ[4þ¾wQð&3¿×‚î·FÒo :
154
ǟ&ÑqÚ\xðÊÔÝã¿êS€Þ7Õèì,+#娒ËñG|èAÍ3Ý©ëó†ÍWÓçJÉÿënhÎô-
155
Þdš“}°S%-ó~܍¦çâÇðª'µh2و&ZU[ê¾ãA‹Ašš:Tm©CՖzô,yíÂ7ûÑòËxí/Íp~1ºlÿ¹äE©”EøFÇ]xöå~wÓ?M`ð#ÜÖf8ÇÓ÷Ëì~ÕcÏLOM`ðܯ6Á5ÉÓÆ´Åæ.'ÉáÇy'
156
Ë~eÚDžMDïô'–!ñ˜øÀf½¶“†œ÷›òG±´_ ïx=@ýJ"_¶#œbÿRŽ-R?Âæ˜à†ÿÑÒGfqúËzª–­³8ïD`=¨L_@PÁvL¿ðkðc3Ú¿Ñ{mÓS˜úë ¬š´üêbÒjM¯
ÀüÛ>Lü4éLà‡ÿÕ
157
‡¹iáñx¸`x³?MÀwцàÇmh»ZR&·¼(…’†oü›MêŸÅ<'œ0|Ò˾z Pí4àºÛÇ	oÚm7þÑ끹ò»Zpý¢=ÊKÂW´NŒ<¡Û”ᔫ „øhyËWœôÁñ…ëΎ~Q>g›ÂCvˆ;»-}¡};…¤ƒú<)ǖ\Ž?Ö3ô|™¼Ÿè÷gÞ֑ö̃$+x¼‰úNÉÛ?A¯»šÚøô ‚¢ÆÓ}ˆŽ»’ÊY.À¸§Â\‡¨ê€‹O{N8apõÃr@¡PlÕ¢÷Z7º:“Ëä˜9[-®ò­ÈôÔDÚǪjê¶ëÂ³¿:i?Õ
6DÇÍ@̜²TÉåwÚýÑÄZò«,ÑzÃÂ0S™Å¢?zÑûµ€îSz@¼»¶
Ñ¡sÛ<E=#°ô%­oøÀŒ¶_vÇú“ÊJ9¶H:þÌ=®:ЍÞ¼d_xÈó–Æ:äùŸÏ>*r[oðï@lþ¡ˆDg¼€ï;‹&mǺucêí.΂Æä,L
158
ʋR(üÏ"¶òÖ“"ðì“uÙ.¢YúQPâdÑêD´–5nüý¦4¢#€B“´¨ûk½§æN5
159
õè?´|8ŠáӅ݈Dò¨Ô<EâÜÐý=)·ßAoCâ†RŽ-9º•ˆöøzâÎL*0ѐùŠE‘çk¦ß$À•< -z·úÃg€Z
´j5ÔO7¢ë˜
/èw'•ËÖПU–BùäE)”ō”ÀàÄT9Ô6CryqØÄ‰Ùi}Êõ²
160
Ë.%C!èÒô9†¾tA¹Ó’´Ýî“ú¤ßÕ'¯Úføû¡M⫀÷×.>¹+/V/{,ü¥»_w£wÑeGRŽ-¹ôïÐòÙ(†Oi8Ê»e!ž»×ö)Ðóu†—Ò÷Iû®z ?oéÛ_îÁ9Œî畏åÞ-Q+¡,œO^”BY¸²Ö*Ðó]ò%NºPóŒ=̀ãû%#ä¾;åήÛ[-å"ŸÏ­îí.àÑÚº°½×˜y#•¸Ð£Eû[…öµ­à_ž8ûÝj\H¼PýbT&KI9¶äzüQlïηÁEˇAØßÖ¤-+ÕJ¯´¿ëD ÃŽ`š„¿îęÉDÐzаïOêè]gÎûµÔ*฻$´£>T=•8ŸO^äjuÌp%ó9,f¸nŒAŒÑq?ڌéïQê~¹
߇€¼ÕCÖQôžÛ_XE8àŠÊQˆO
161
 ýGØlÀõ7UhÖ· ÿk?DqÃýº-úCP¼³rñvSï£úųÐ~oÇÀٜ됼í•<ê·{3´27¢ï´Ý¿M.“rlÉçøÓ{¤G_nƒ¨0´¹×¯àñJØlÀõS
162
4éZàü܇ðܗ“èäÜv¢é}ƒ‹º¬ÛX>ö"*gàr¡ù°;çýšÏY1ðrÜwBsû…ÝdÇþÓ½‹Êäž9[-®Vz†+a»·ÿ´¿Ó†Óã(”µ0ž¼€îýÕIÛXüÿ'ÕènmF[PïÔÃ60ý¦Îj¶/­Úãg1¼}Ž{ÐóF"¨žÖ¡õ÷×aÞ/ý˜®‹­Øý²FïÊÎäz,šEûŸfqá/ªŒë©ŽõA<ÛŒà£øõ¤RŽ-RÊ,ݧú¤
Ñómhü½µH³_I;^å»/íIk]p|æ€ã7ADE@±U
ÃA†½ñë»ç·m¸‚ö×ΠþÃvˆÔO7Âäü3ÎX^Èøš,].l³`Ø	ØkFûxÂæZ_éFÿ+ª‚ò"w…gAÁá¯BîßN§~ú[Æõ–>®:ЊÁ­KJͦ-o8Õé®´å‰Ö•<4ªF#úY·75ñ·´û¨ÜnÅØ¿ç_©ëås,̾N…£c·ÊI9¶d+“êø'>6©Ñ÷’2{Š$ßã÷<õ.0¥xdÉ6jô¹¯/+eYô:¤Ë„eY°ßÏþ¥ûL^/×¼(…’tI×<ù3Éeã/å/·oé5uÒÿ>¹à-S«áX4#źO\ÄkŸ£z•Êå5xO§—å¾
163
ߢիlôLE»ŸùÄ
164
'ûÐ÷ó4ó5®”2}Íւ’N²±R2+È*{žDëAN'WøoTʱ%×ãÏØØ¢0+fý%_]Ä}®«cÀ!­j19n_·‚$םǢÜñ5+•²¸Ôˆˆˆh-Yå]ûDTˆê­Õp]î‡á€¡ÔUɛwȋꭩ'Á *W…¯z‡î«ž×g/¼x¿öA½ƒSTRy¨T( VÇ?¯Þ¡"ÞÑEfÕ[«¡V«Q©H?i½‹¤Èv¼âk–¿bdAAá«iÐ.Td=PïP/<g¢ÕN¡ˆO̯V«B¸\U*Ï'•õv,’"ÛñНYþŠ‘ŸvÖ4hHD«”BQ™1´Ö‹rÇ׬t8àŠˆˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™%O/¹©ÍçÃ%ª
165
ѵ)ùÎ\ËçvÞÄ[w­¤…ðJY""¢ucÃ×t~|\ꊭcnۆÿ/j„ÍÆÜIEND®B`‚
(-)tdegraphics/doc/tdeiconedit/CMakeLists.txt (+12 lines)
Line 0 Link Here
1
#################################################
2
#
3
#  (C) 2010-2011 Serghei Amelian
4
#  serghei (DOT) amelian (AT) gmail.com
5
#
6
#  Improvements and feedback are welcome
7
#
8
#  This file is released under GPL >= 2
9
#
10
#################################################
11
12
tde_create_handbook( DESTINATION tdeiconedit )
(-)tdegraphics/doc/tdeiconedit/Makefile.am (+4 lines)
Line 0 Link Here
1
2
KDE_LANG = en
3
KDE_DOCS = AUTO
4
(-)tdegraphics/doc/tdeiconedit/index.docbook (+1083 lines)
Line 0 Link Here
1
<?xml version="1.0" ?>
2
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
3
  <!ENTITY kappname "&kiconedit;">
4
  <!ENTITY package "tdegraphics">
5
  <!ENTITY % English "INCLUDE" > <!-- change language only here -->
6
  <!ENTITY % addindex "IGNORE">
7
]>
8
9
<book lang="&language;">
10
<bookinfo>
11
<title>The &kiconedit; Manual</title>
12
<authorgroup>
13
<author>
14
<firstname>Thomas</firstname>
15
<surname>Tanghus</surname>
16
<affiliation>
17
<address>&Thomas.Tanghus.mail;</address>
18
</affiliation>
19
</author>
20
21
<!-- TRANS:ROLES_OF_TRANSLATORS -->
22
23
</authorgroup>
24
25
<copyright>
26
<year>1997</year>
27
<holder>&Thomas.Tanghus;</holder>
28
</copyright>
29
<copyright>
30
<year>2001</year><year>2003</year>
31
<holder>&Lauri.Watts;</holder>
32
</copyright>
33
34
<legalnotice>
35
&FDLNotice;
36
</legalnotice>
37
38
<date>2005-12-10</date>
39
<releaseinfo>3.5.0</releaseinfo>
40
41
<abstract>
42
<para>
43
&kiconedit; is designed to help create icons for &kde; using the
44
standard icon palette.
45
</para>
46
</abstract>
47
48
<keywordset>
49
<keyword>KDE</keyword>
50
<keyword>tdegraphics</keyword>
51
<keyword>TDEIconEdit</keyword>
52
<keyword>icon</keyword>
53
</keywordset>
54
</bookinfo>
55
56
<chapter id="Introduction">
57
<title>Introduction</title>
58
59
<blockquote>
60
<attribution>&Thomas.Tanghus;
61
&Thomas.Tanghus.mail;</attribution>
62
63
<para>
64
&kiconedit; is designed to help create icons for &kde; using the
65
standard icon palette.
66
</para>
67
68
<para>
69
I hope you will find this program somehow useful and I would
70
appreciate any suggestions and comments.
71
</para>
72
73
</blockquote>
74
75
</chapter>
76
77
<chapter id="onscreen-fundamentals">
78
<title>Onscreen Fundamentals</title>
79
80
<para>
81
In this section will be briefly described the Icon Editor user
82
interface.
83
</para>
84
85
<para>
86
The Icon Editor window is separated in five areas: main toolbar, tools
87
toolbar, statusbar, color palette and the grid, where you paint the icon.
88
</para>
89
90
<sect1 id="main-toolbar">
91
<title>Main Toolbar</title>
92
93
<variablelist>
94
95
<varlistentry>
96
<term><guiicon>New</guiicon></term>
97
<listitem>
98
<para>
99
<action>Create a new icon.</action> If the current file has been
100
modified you will be asked if you want to save the changes. After that a
101
dialog will open where you can choose to create the icon from scratch or
102
from a template.
103
</para>
104
</listitem>
105
</varlistentry>
106
107
<varlistentry>
108
<term><guiicon>Open</guiicon></term>
109
<listitem>
110
<para>
111
<action>Open an existing icon file.</action>
112
</para>
113
</listitem>
114
</varlistentry>
115
116
<varlistentry>
117
<term><guiicon>Save</guiicon></term>
118
<listitem>
119
<para>
120
<action>Save the currently open icon.</action>
121
</para>
122
</listitem>
123
</varlistentry>
124
125
<varlistentry>
126
<term><guiicon>Print</guiicon></term>
127
<listitem>
128
<para>
129
<action>Print the icon.</action>
130
</para>
131
</listitem>
132
</varlistentry>
133
134
<varlistentry>
135
<term><guiicon>Undo</guiicon></term>
136
<listitem><para>Undo the last action</para></listitem>
137
</varlistentry>
138
139
<varlistentry>
140
<term><guiicon>Redo</guiicon></term>
141
<listitem><para>Redo the last action undone.  If no actions have been
142
undone, this action is disabled.</para></listitem>
143
</varlistentry>
144
145
<varlistentry>
146
<term><guiicon>Cut</guiicon></term>
147
<listitem>
148
<para>
149
<action>Cuts out the entire icon and put it onto the clipboard.</action>
150
</para>
151
</listitem>
152
</varlistentry>
153
154
<varlistentry>
155
<term><guiicon>Copy</guiicon></term>
156
<listitem>
157
<para>
158
<action>Copies the entire icon to the clipboard.</action>
159
</para>
160
</listitem>
161
</varlistentry>
162
163
<varlistentry>
164
<term><guiicon>Paste</guiicon></term>
165
<listitem>
166
<para>
167
<action>Paste the contents of the clipboard as a new image (if the
168
clipboard contains a valid icon).</action>
169
</para>
170
</listitem>
171
</varlistentry>
172
173
<varlistentry>
174
<term><guiicon>Zoom</guiicon></term>
175
<term><guiicon>Zoom In</guiicon></term>
176
<term><guiicon>Zoom Out</guiicon></term>
177
<listitem>
178
<para>
179
<action>Zoom to predefined zoom factor, zoom in or zoom out.</action>
180
</para>
181
</listitem>
182
</varlistentry>
183
184
<varlistentry>
185
<term><guiicon>Resize</guiicon></term>
186
<listitem>
187
<para>
188
<action>Resize icon to width X height.</action>
189
</para>
190
</listitem>
191
</varlistentry>
192
193
<varlistentry>
194
<term><action>GrayScale</action></term>
195
<listitem>
196
<para>
197
<action>Gray scale the icon image.</action> This may create colors not
198
conformant to the &kde; icon palette.
199
</para>
200
</listitem>
201
</varlistentry>
202
203
<varlistentry>
204
<term><guiicon>Show Grid</guiicon></term>
205
<listitem>
206
<para>
207
<action>Toggle grid on/off.</action>
208
</para>
209
</listitem>
210
</varlistentry>
211
</variablelist>
212
213
</sect1>
214
215
<sect1 id="tools-toolbar">
216
<title>Tools Toolbar</title>
217
218
<para>
219
This toolbar contains the tools you can use to manipulate the
220
icon.
221
</para>
222
223
<variablelist>
224
<varlistentry>
225
<term><guiicon>Freehand</guiicon></term>
226
<listitem>
227
<para>
228
<action>Draw free hand.</action>
229
</para>
230
</listitem>
231
</varlistentry>
232
233
<varlistentry>
234
<term><guiicon>Color Picker</guiicon></term>
235
<listitem>
236
<para>
237
Doesn't change the icon but <action>changes the current drawcolor to the
238
color clicked on.</action>
239
</para>
240
</listitem>
241
</varlistentry>
242
243
<varlistentry>
244
<term><guiicon>Rectangle</guiicon></term>
245
<listitem>
246
<para>
247
<action>Draw a rectangle.</action>
248
</para>
249
</listitem>
250
</varlistentry>
251
252
<varlistentry>
253
<term><guiicon>Filled Rectangle</guiicon></term>
254
<listitem>
255
<para>
256
<action>Draw a filled rectangle.</action>
257
</para>
258
</listitem>
259
</varlistentry>
260
261
<varlistentry>
262
<term><guiicon>Circle</guiicon></term>
263
<listitem>
264
<para>
265
<action>Draw a circle.</action>
266
</para>
267
</listitem>
268
</varlistentry>
269
270
<varlistentry>
271
<term><guiicon>Filled Circle</guiicon></term>
272
<listitem>
273
<para>
274
<action>Draw a filled circle.</action>
275
</para>
276
</listitem>
277
</varlistentry>
278
279
<varlistentry>
280
<term><guiicon>Ellipse</guiicon></term>
281
<listitem>
282
<para>
283
<action>Draw an ellipse</action>
284
</para>
285
</listitem>
286
</varlistentry>
287
288
<varlistentry>
289
<term><guiicon>Filled Ellipse</guiicon></term>
290
<listitem>
291
<para>
292
<action>Draw a filled ellipse</action> (almost the same thing as drawing
293
a circle.)
294
</para>
295
</listitem>
296
</varlistentry>
297
298
<varlistentry>
299
<term><guiicon>Spray</guiicon></term>
300
<listitem>
301
<para>
302
<action>Draws a randow dotted pattern like a spraycan.</action>
303
</para>
304
</listitem>
305
</varlistentry>
306
307
<varlistentry>
308
<term><guiicon>Flood Fill</guiicon></term>
309
<listitem>
310
<para>
311
<action>Fill an area with the current color.</action>
312
</para>
313
</listitem>
314
</varlistentry>
315
316
<varlistentry>
317
<term><guiicon>Line</guiicon></term>
318
<listitem>
319
<para>
320
<action>Draw a line.</action>
321
</para>
322
</listitem>
323
</varlistentry>
324
325
<varlistentry>
326
<term><guiicon>Eraser (Transparent)</guiicon></term>
327
<listitem>
328
<para>
329
<action>Draw transparent (invisible).</action>
330
</para>
331
</listitem>
332
</varlistentry>
333
334
<varlistentry>
335
<term><guiicon>Rectangular Selection</guiicon></term>
336
<term><guiicon>Circular Selection</guiicon></term>
337
<listitem>
338
<para>
339
<action>Select (mark) a part of the icon.</action>
340
</para>
341
</listitem>
342
</varlistentry>
343
</variablelist>
344
345
</sect1>
346
347
<sect1 id="grid">
348
<title>Grid</title>
349
350
<para>
351
The grid is where you manipulate the icon contents.
352
</para>
353
</sect1>
354
355
<sect1 id="statusbar">
356
<title>Statusbar</title>
357
358
<para>
359
The status bar keeps you informed of current operations.  From left to
360
right, it tells you the x,y coordinates of the pixel you are working on,
361
the size of the current canvas, the zoom factor, and the current number
362
of colors in the icon.
363
</para>
364
365
</sect1>
366
</chapter>
367
368
<chapter id="the-menu-entries">
369
<title>The Menu Entries</title>
370
371
<sect1 id="file">
372
<title>The <guimenu>File</guimenu> Menu</title>
373
374
<para>
375
The following functions are available from the <guimenu>File</guimenu>
376
menu:
377
</para>
378
379
<variablelist>
380
<varlistentry>
381
<term>
382
<menuchoice>
383
<shortcut>
384
<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
385
</shortcut>
386
<guimenu>File</guimenu>
387
<guimenuitem>New</guimenuitem>
388
</menuchoice>
389
</term>
390
<listitem>
391
<para>
392
<action>Lets you create a new icon</action>, either from a template or
393
by specifying the size.
394
</para> 
395
</listitem>
396
</varlistentry>
397
398
<varlistentry>
399
<term>
400
<menuchoice>
401
<guimenu>File</guimenu>
402
<guimenuitem>New Window</guimenuitem>
403
</menuchoice>
404
</term>
405
<listitem>
406
<para>
407
<action>Open a new Icon Editor window.</action>
408
</para>
409
</listitem>
410
</varlistentry>
411
412
<varlistentry>
413
<term>
414
<menuchoice>
415
<shortcut>
416
<keycombo action="simul">&Ctrl;<keycap>O</keycap></keycombo>
417
</shortcut>
418
<guimenu>File</guimenu>
419
<guimenuitem>Open...</guimenuitem>
420
</menuchoice>
421
</term>
422
<listitem>
423
<para>
424
<action>Open an existing icon file.</action>
425
</para>
426
</listitem>
427
</varlistentry>
428
429
<varlistentry>
430
<term>
431
<menuchoice>
432
<guimenu>File</guimenu>
433
<guisubmenu>Open Recent</guisubmenu>
434
</menuchoice>
435
</term>
436
<listitem>
437
<para>
438
<action>Displays a list of recently opened icons to choose
439
from.</action>
440
</para>
441
</listitem>
442
</varlistentry>
443
444
<varlistentry>
445
<term>
446
<menuchoice>
447
<shortcut>
448
<keycombo action="simul">&Ctrl;<keycap>S</keycap></keycombo>
449
</shortcut>
450
<guimenu>File</guimenu>
451
<guimenuitem>Save</guimenuitem>
452
</menuchoice>
453
</term>
454
<listitem>
455
<para>
456
<action>Save the currently open icon.</action>
457
</para>
458
</listitem>
459
</varlistentry>
460
461
<varlistentry>
462
<term>
463
<menuchoice>
464
<guimenu>File</guimenu>
465
<guimenuitem>Save As...</guimenuitem>
466
</menuchoice>
467
</term>
468
<listitem>
469
<para>
470
<action>Save the currently open icon under a new name.</action>
471
</para>
472
</listitem>
473
</varlistentry>
474
475
<varlistentry>
476
<term>
477
<menuchoice>
478
<shortcut>
479
<keycombo action="simul">&Ctrl;<keycap>P</keycap></keycombo>
480
</shortcut>
481
<guimenu>File</guimenu>
482
<guimenuitem>Print...</guimenuitem>
483
</menuchoice>
484
</term>
485
<listitem>
486
<para>
487
<action>Print the icon</action>
488
</para>
489
</listitem>
490
</varlistentry>
491
492
<varlistentry>
493
<term>
494
<menuchoice>
495
<shortcut>
496
<keycombo action="simul">&Ctrl;<keycap>W</keycap></keycombo>
497
</shortcut>
498
<guimenu>File</guimenu>
499
<guimenuitem>Close</guimenuitem>
500
</menuchoice>
501
</term>
502
<listitem>
503
<para>
504
<action>Close</action> &kiconedit;.
505
</para>
506
</listitem>
507
</varlistentry>
508
</variablelist>
509
510
</sect1>
511
512
<sect1 id="edit">
513
<title>The <guimenu>Edit</guimenu> Menu</title>
514
515
<para>
516
The <guimenu>Edit</guimenu> menu contains the following entries:
517
</para>
518
519
<variablelist>
520
521
<varlistentry>
522
<term><menuchoice><shortcut><keycombo
523
action="simul">&Ctrl;<keycap>Z</keycap></keycombo></shortcut>
524
<guimenu>Edit</guimenu><guimenuitem>Undo</guimenuitem>
525
</menuchoice></term>
526
<listitem><para>Undo the last action</para></listitem>
527
</varlistentry>
528
529
<varlistentry>
530
<term><menuchoice><shortcut><keycombo action="simul">
531
&Ctrl;&Shift;<keycap>Z</keycap></keycombo></shortcut>
532
<guimenu>Edit</guimenu><guimenuitem>Redo</guimenuitem></menuchoice></term>
533
<listitem><para>Redo the last action undone.  If no actions have been
534
undone, this action is disabled.</para></listitem>
535
</varlistentry>
536
537
<varlistentry>
538
<term>
539
<menuchoice>
540
<shortcut>
541
<keycombo action="simul">&Ctrl;<keycap>X</keycap></keycombo>
542
</shortcut>
543
<guimenu>Edit</guimenu>
544
<guimenuitem>Cut</guimenuitem>
545
</menuchoice>
546
</term>
547
<listitem>
548
<para>
549
<action>Cuts out the entire icon and put it onto the clipboard.</action>
550
</para>
551
</listitem>
552
</varlistentry>
553
554
<varlistentry>
555
<term>
556
<menuchoice>
557
<shortcut>
558
<keycombo action="simul">&Ctrl;<keycap>C</keycap></keycombo>
559
</shortcut>
560
<guimenu>Edit</guimenu>
561
<guimenuitem>Copy</guimenuitem>
562
</menuchoice>
563
</term>
564
<listitem>
565
<para>
566
<action>Copies the entire icon to the clipboard.</action>
567
</para>
568
</listitem>
569
</varlistentry>
570
571
<varlistentry>
572
<term>
573
<menuchoice>
574
<shortcut>
575
<keycombo action="simul">&Ctrl;<keycap>V</keycap></keycombo>
576
</shortcut>
577
<guimenu>Edit</guimenu>
578
<guimenuitem>Paste</guimenuitem>
579
</menuchoice>
580
</term>
581
<listitem>
582
<para>
583
<action>Paste the contents of the clipboard (if the clipboard contains a
584
valid icon).</action>
585
</para>
586
</listitem>
587
</varlistentry>
588
589
<varlistentry>
590
<term>
591
<menuchoice>
592
<guimenu>Edit</guimenu>
593
<guimenuitem>Paste as New</guimenuitem>
594
</menuchoice>
595
</term>
596
<listitem>
597
<para>
598
<action>Paste the contents of the clipboard as a new image into a new Icon Editor window (if the
599
clipboard contains a valid icon).</action>
600
</para>
601
</listitem>
602
</varlistentry>
603
604
<varlistentry>
605
<term>
606
<menuchoice>
607
<guimenu>Edit</guimenu>
608
<guimenuitem>Clear</guimenuitem>
609
</menuchoice>
610
</term>
611
<listitem>
612
<para>
613
<action>Clear the grid and fill it with transparent color.</action>
614
</para>
615
</listitem>
616
</varlistentry>
617
618
<varlistentry>
619
<term>
620
<menuchoice>
621
<shortcut>
622
<keycombo action="simul">&Ctrl;<keycap>A</keycap></keycombo>
623
</shortcut>
624
<guimenu>Edit</guimenu>
625
<guimenuitem>Select All</guimenuitem>
626
</menuchoice>
627
</term>
628
<listitem>
629
<para>
630
<action>Marks the entire icon as selected.</action>
631
</para>
632
</listitem>
633
</varlistentry>
634
635
<varlistentry>
636
<term><menuchoice><guimenu>Edit</guimenu><guimenuitem>Resize...</guimenuitem>
637
</menuchoice></term>
638
<listitem><para>
639
<action>Resize icon to width X height.</action>
640
</para>
641
</listitem>
642
</varlistentry>
643
644
<varlistentry>
645
<term><menuchoice><guimenu>Edit</guimenu><guimenuitem>GrayScale</guimenuitem>
646
</menuchoice></term>
647
<listitem><para><action>Gray scale the icon image.</action> This may
648
create colors not conformant to the &kde; icon palette.</para>
649
</listitem>
650
</varlistentry>
651
652
</variablelist>
653
654
</sect1>
655
656
<sect1 id="view">
657
<title>The <guimenu>View</guimenu> Menu</title>
658
659
<variablelist>
660
<varlistentry>
661
<term>
662
<menuchoice>
663
<shortcut>
664
<keycombo action="simul">&Ctrl;<keycap>+</keycap></keycombo></shortcut>
665
<guimenu>View</guimenu>
666
<guimenuitem>Zoom In</guimenuitem>
667
</menuchoice>
668
</term>
669
<listitem>
670
<para>
671
<action>Magnify the view of the icon</action>.
672
</para>
673
</listitem>
674
</varlistentry>
675
676
<varlistentry>
677
<term>
678
<menuchoice>
679
<shortcut><keycombo action="simul">
680
&Ctrl;<keycap>-</keycap></keycombo></shortcut>
681
<guimenu>View</guimenu>
682
<guimenuitem>Zoom Out</guimenuitem>
683
</menuchoice>
684
</term>
685
<listitem>
686
<para>
687
<action>Shrink the view icon to a smaller screen size</action>
688
</para>
689
</listitem>
690
</varlistentry>
691
692
<varlistentry>
693
<term>
694
<menuchoice>
695
<guimenu>View</guimenu>
696
<guisubmenu>Zoom</guisubmenu>
697
</menuchoice>
698
</term>
699
<listitem>
700
<para>Zoom to a predefined zoom factor</para>
701
</listitem>
702
</varlistentry>
703
</variablelist>
704
705
</sect1>
706
707
<sect1 id="tools">
708
<title>The <guimenu>Tools</guimenu> Menu</title>
709
710
<variablelist>
711
<varlistentry>
712
<term>
713
<menuchoice>
714
<guimenu>Tools</guimenu>
715
<guimenuitem>Freehand</guimenuitem>
716
</menuchoice>
717
</term>
718
<listitem>
719
<para>
720
Draw free hand.
721
</para>
722
</listitem>
723
</varlistentry>
724
725
<varlistentry>
726
<term><menuchoice><guimenu>Tools</guimenu><guimenuitem>Color
727
Picker</guimenuitem></menuchoice></term>
728
<listitem><para>Select a color from the screen to use as the
729
foreground color.</para></listitem>
730
</varlistentry>
731
732
<varlistentry>
733
<term>
734
<menuchoice>
735
<guimenu>Tools</guimenu>
736
<guimenuitem>Rectangle</guimenuitem>
737
</menuchoice>
738
</term>
739
<listitem>
740
<para>
741
Draw a rectangle.
742
</para>
743
</listitem>
744
</varlistentry>
745
746
<varlistentry>
747
<term>
748
<menuchoice>
749
<guimenu>Tools</guimenu>
750
<guimenuitem>Filled Rectangle</guimenuitem>
751
</menuchoice>
752
</term>
753
<listitem>
754
<para>
755
Draw a filled rectangle.
756
</para>
757
</listitem>
758
</varlistentry>
759
760
<varlistentry>
761
<term>
762
<menuchoice>
763
<guimenu>Tools</guimenu>
764
<guimenuitem>Circle</guimenuitem>
765
</menuchoice>
766
</term>
767
<listitem>
768
<para>
769
Draw a circle.
770
</para>
771
</listitem>
772
</varlistentry>
773
774
<varlistentry>
775
<term>
776
<menuchoice>
777
<guimenu>Tools</guimenu>
778
<guimenuitem>Filled Circle</guimenuitem>
779
</menuchoice>
780
</term>
781
<listitem>
782
<para>
783
Draw a filled circle.
784
</para>
785
</listitem>
786
</varlistentry>
787
788
<varlistentry>
789
<term>
790
<menuchoice>
791
<guimenu>Tools</guimenu>
792
<guimenuitem>Ellipse</guimenuitem>
793
</menuchoice>
794
</term>
795
<listitem>
796
<para>
797
Draw an ellipse
798
</para>
799
</listitem>
800
</varlistentry>
801
802
<varlistentry>
803
<term>
804
<menuchoice>
805
<guimenu>Tools</guimenu>
806
<guimenuitem>Filled Ellipse</guimenuitem>
807
</menuchoice>
808
</term>
809
<listitem>
810
<para>
811
<action>Draw a filled ellipse</action> (almost the same thing as drawing
812
a circle.)
813
</para>
814
</listitem>
815
</varlistentry>
816
817
<varlistentry>
818
<term>
819
<menuchoice>
820
<guimenu>Tools</guimenu>
821
<guimenuitem>Spray</guimenuitem>
822
</menuchoice>
823
</term>
824
<listitem>
825
<para>
826
Draws a random dotted pattern like a spraycan.
827
</para>
828
</listitem>
829
</varlistentry>
830
831
<varlistentry>
832
<term>
833
<menuchoice>
834
<guimenu>Tools</guimenu>
835
<guimenuitem>Flood Fill</guimenuitem>
836
</menuchoice>
837
</term>
838
<listitem>
839
<para>
840
Fill an area with the current color.
841
</para>
842
</listitem>
843
</varlistentry>
844
845
<varlistentry>
846
<term>
847
<menuchoice>
848
<guimenu>Tools</guimenu>
849
<guimenuitem>Line</guimenuitem>
850
</menuchoice>
851
</term>
852
<listitem>
853
<para>
854
Draw a line.
855
</para>
856
</listitem>
857
</varlistentry>
858
859
<varlistentry>
860
<term>
861
<menuchoice>
862
<guimenu>Tools</guimenu>
863
<guimenuitem>Eraser (Transparent)</guimenuitem>
864
</menuchoice>
865
</term>
866
<listitem>
867
<para>Draw transparent (invisible).</para>
868
</listitem>
869
</varlistentry>
870
871
<varlistentry>
872
<term><menuchoice><guimenu>Tools</guimenu>
873
<guimenuitem>Rectangular Selection</guimenuitem></menuchoice></term>
874
<term><menuchoice><guimenu>Tools</guimenu>
875
<guimenuitem>Circular Selection</guimenuitem></menuchoice></term>
876
<listitem><para><action>Select (mark) a part of the icon.</action>
877
</para>
878
</listitem>
879
</varlistentry>
880
881
</variablelist>
882
883
</sect1>
884
885
<sect1 id="settings">
886
<title>The <guimenu>Settings</guimenu> Menu</title>
887
888
<variablelist>
889
890
<varlistentry>
891
<term>
892
<menuchoice>
893
<guimenu>Settings</guimenu>
894
<guimenuitem>Toolbars</guimenuitem>
895
</menuchoice>
896
</term>
897
<listitem>
898
<para>
899
<action>Toggle on and off the display of the toolbars.</action>
900
</para>
901
</listitem>
902
</varlistentry>
903
<varlistentry>
904
<term>
905
<menuchoice>
906
<guimenu>Settings</guimenu>
907
<guimenuitem>Show/Hide Statusbar</guimenuitem>
908
</menuchoice>
909
</term>
910
<listitem>
911
<para>
912
<action>Toggle on and off the display of the status bar.</action>
913
</para>
914
</listitem>
915
</varlistentry>
916
<varlistentry>
917
<term>
918
<menuchoice>
919
<guimenu>Settings</guimenu>
920
<guimenuitem>Show/Hide Grid</guimenuitem>
921
</menuchoice>
922
</term>
923
<listitem>
924
<para>
925
<action>Toggle on and off the grid.</action>
926
</para>
927
</listitem>
928
</varlistentry>
929
<varlistentry>
930
<term><menuchoice><guimenu>Settings</guimenu>
931
<guimenuitem>Configure Shortcuts...</guimenuitem>
932
</menuchoice></term>
933
<listitem><para>Opens a dialog where you can customize &kiconedit;'s
934
keyboard shortcuts.</para></listitem>
935
</varlistentry>
936
937
<varlistentry>
938
<term>
939
<menuchoice>
940
<guimenu>Settings</guimenu>
941
<guimenuitem>Configure &kiconedit;...</guimenuitem>
942
</menuchoice>
943
</term>
944
<listitem>
945
<para>
946
Opens the &kiconedit; <link linkend="configuration">configuration
947
dialog</link> configuration dialog, described separately.
948
</para>
949
</listitem>
950
</varlistentry>
951
952
953
</variablelist>
954
955
</sect1>
956
957
<sect1 id="help">
958
<title>The <guimenu>Help</guimenu> Menu</title>
959
960
&help.menu.documentation;
961
962
</sect1>
963
</chapter>
964
965
<chapter id="configuration">
966
<title>Configuration</title>
967
968
<sect1>
969
<title>Configuring &kiconedit;</title>
970
<para>Selecting the <menuchoice><guimenu>Settings</guimenu>
971
<guimenuitem>Configure &kiconedit;...</guimenuitem></menuchoice> menu item will
972
open a configuration dialog with the tree tabs <guilabel>Icon Templates</guilabel>,
973
<guilabel>Background</guilabel> and <guilabel>Icon Grid</guilabel>.</para>
974
975
<screenshot>
976
<screeninfo>&kiconedit; configuration dialog</screeninfo>
977
<mediaobject>
978
<imageobject><imagedata fileref="tdeiconedit-configuration.png" format="PNG"/></imageobject>
979
<textobject><phrase>&kiconedit; configuration dialog</phrase></textobject>
980
</mediaobject>
981
</screenshot>
982
983
<sect2 id="icon-templates-tab">
984
<title>The <guilabel>Icon Templates</guilabel> Tab</title>
985
<para><guilabel>Add...</guilabel>, <guilabel>Edit...</guilabel> and <guilabel>Remove</guilabel>
986
the templates for <guilabel>Standard File</guilabel>, <guilabel>Source File</guilabel>, 
987
<guilabel>Compressed File</guilabel> &etc;.</para>
988
</sect2>
989
<sect2 id="background-tab">
990
<title>The <guilabel>Background</guilabel> Tab</title>
991
<para>Select to <guibutton>Use color</guibutton> or to <guibutton>Use pixmap</guibutton>
992
as background.  A <guilabel>Preview</guilabel> of your choice is displayed.</para>
993
</sect2>
994
<sect2 id="icon-grid-tab">
995
<title>The <guilabel>Icon Grid</guilabel> Tab</title>
996
<para>Select to <guilabel>Paste transparent pixels</guilabel> or <guilabel>Show rulers</guilabel>
997
and set a <guilabel>Solid Color</guilabel> or a <guilabel>Checkerboard</guilabel> as 
998
<guilabel>Transparency Display</guilabel>.
999
You can set the Checkerboard <guilabel>Size:</guilabel> to <guilabel>Small</guilabel>, 
1000
<guilabel>Medium</guilabel> or <guilabel>Large</guilabel> and choose <guilabel>Color 1:</guilabel> 
1001
and <guilabel>Color 2:</guilabel> of the checkerboard.</para>
1002
</sect2>
1003
</sect1>
1004
1005
</chapter>
1006
1007
<chapter id="credits-and-license">
1008
<title>Credits and Licenses</title>
1009
1010
<para>
1011
&kiconedit;
1012
</para>
1013
1014
<para>
1015
Program copyright &Thomas.Tanghus; <email>tanghus@kde.org</email>
1016
</para>
1017
1018
<itemizedlist>
1019
<title>Contributors</title>
1020
<listitem>
1021
<para>
1022
John Califf <email>jcaliff@compuzone.net</email>
1023
</para>
1024
</listitem>
1025
<listitem>
1026
<para>
1027
Laurent Montel <email>lmontel@mandrakesoft.com</email>
1028
</para>
1029
</listitem>
1030
<listitem><para>Aaron Seigo  &Aaron.J.Seigo.mail;</para></listitem>
1031
<listitem><para>Nadeem Hassan <email>nhasan@nadmm.com</email> - Rewrote UI to use
1032
XMLGUI, Lots of fixes and cleanup</para></listitem>
1033
<listitem><para>Adrian Page <email>Adrian.Page@tesco.net</email> - Bug Fixes and &GUI; tidy up.</para></listitem>
1034
1035
1036
</itemizedlist>
1037
1038
<!-- TRANS:CREDIT_FOR_TRANSLATORS -->
1039
1040
&underFDL; 
1041
&underGPL;
1042
1043
</chapter>
1044
1045
<appendix id="installation">
1046
<title>Installation</title>
1047
1048
<sect1 id="how-to-obtain-the-icon-editor">
1049
<title>How to obtain &kiconedit;</title>
1050
1051
&install.intro.documentation;
1052
1053
</sect1>
1054
1055
<sect1 id="compilation-and-installation">
1056
<title>Compilation and Installation</title>
1057
1058
&install.compile.documentation;
1059
1060
</sect1>
1061
1062
<!-- 
1063
<sect1 id="configuration">
1064
<title>Configuration</title>
1065
1066
</sect1>
1067
1068
-->
1069
</appendix>
1070
1071
1072
</book>
1073
1074
<!--
1075
Local Variables:
1076
mode: sgml
1077
sgml-indent-step:0
1078
sgml-indent-data:nil
1079
sgml-omittag:nil
1080
sgml-shorttag:t
1081
End:
1082
-->
1083
(-)tdegraphics/doc/tdeiconedit/tdeiconedit-configuration.png (+165 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRß³n6y IDATxœì½lÛÕ½ÿÿèWîtŒÂÕÛQ@vÔMqUP•©NËD\QКú’¤%¥W$-¸lڒ2mM7ÝÛdWƒä¢­u«Aݫے Q>º%é4¨‹8èBãêK‰«QÕѨb¢ø­Û}j©ß?ÞoÿJìÄIÓ´MΣªœ÷û}Þç¼ÎyÛïçûuÎëœ÷Š}Ýo#ÇuáÈU
4
…B¡P\7Fz[WX„EàG®Ö=³çFÛ¤P(
5
Œ¦º±óêHoëŠöµ^­{fQýF›¤P(
6
ÅÒF
û|Kf”7ЅB¡P(–ñ•)%¾
7
…B¡˜©Ç“‰ÏW”Ùšcɖ3•¬øÊ䂮P(Š%„Ô‘“	Üëª<ëð¹ã¡-½r
8
ðÿ,x‰
9
…B¡X’\/¡p¯«Îx K­œB(ñU(
10
…b‘¹®â›÷"/œ¾žE(
11
…Bqˑ󖙒͑8.øx"“’]Ÿ¶vÓ P(ŠÅf1Âr…e镓KºÌ…÷|Sà¸ÔËáŸØpŒŸ&zºd"¶àÅ(
12
…b‘YH'm¦ü—Z93²Î˜Gìlòrdçx›„èڃ-™42ÎK?	âËz>Å?و㑖rž—K£i£
·l+!y£Iz>Ô	ë×ï¹ÅV¥±ï®;Àz¢ñ$Îïmäù}ôº•{#	ýÆ	®ŸçA;]ZI&“´Š–3§_,Ò6ÌÄlöM­ÇÔmG•†ïAíǖæuW(šžçò—M¯Íå·3³MÍ{&f.·´rfÊ£”4ÅÊ)Ýó½¬ã|Їãžöœ?ÍÀèöKá¼$ÎQ?‡ŸÛ—ý¾Ç/›:J.b*žMvOÚð~×^ëíà¹ÇŠÿuš˜wÞ³ñÊS6jî0›m%h©l]õóÁëVîÍÀÔúe„÷r‚m­½œ>7ŒLO³Qª}SÓ¥·ûï ~)´à¶)KBâ8Á\H¢g¯ýÞTÌöÜýó)§d§[¦$±sƒÈo¢¥@G×c$ςªS#¼ñ¬
k¤‡žÓ£tOšÂ;O·^ThtÕOÁ!:NF‰Kp®q°ïy/56h}*Aÿ!ëŽW›T›bßðB)Ñ, §$¤Œ')a[ø‚oÒõsך›ˆ±íWƒDRìN Y0ý¢z{`Æã¥Ú'eÏï³Â+e0d“™J",3?1+K,ŝžžæì¢žŒßdè Ñó=űnöüK('÷L¤Ë-”O)å4‰eêÓ󜓦#ÙáÓBõœ©œB”,[6§^D¿ÔˆÞU‹w½ƒÈñ ­ëºãÁ]¥a
÷Ð7§[^›ðx¶7ÊD$Ä®ãМ»FL®C#ô=e¥ûx9*kŒyZ¢BÐúˆï*ÃcMâ?'<™Í7Ý¥è}-Aë#¶LÚáIºOƉÊü®Ì¾ƒMÔüv˜‘«ÉüÆq—ƾ‡mTÛ MÒq"Nàg3wcNµejº†wx؆CÝÝMÇâÓÊJ|“¤÷#žÈõëzw×ÚñoÊ^
ìN„EÈq—Æž‡Œ^ƒd†Î%èxOÏlX¨ë4Q垵N¹ö%¾Ixoú¢æFÙ-Ôüv˜aóšŒ5~ÌKuØA¡X(҂4›Ø^×3ï4yÜìÈۆk«§¥À_Eq¬²“Ð84Ã&ÐØîñà^ô/‡éýPÇ/ëж̿«9M½Ýø<aGh›¡–J²õÐr¨°Þˆf£çYŽ•Ù<ªï²â¯²Ó²?N$•Ÿß³¶LW6@Ëʑdóñ¢"GÃ@MæomQ¡Ñ÷T֛r:­x6»š‰~>ˆ¶Î[t»Øþ7ž´ež—ì–0ú¥öž¼²lwXñ=i%ùU”þë ¿îZ'þM†‘wB†ð®r",!
13
·‘°ç·‡Õ
14
Þ{mØÇ£ìøÜÜ/Ă]§BÏ«¢¬¸wk›bŸí+mÅŸLs¯y.Å®£B±Üi:#úÙ p
âx½ƒ æXÎTNS²ð)§äj&SÐõæ ñ¸NB?Íp†,Uô}åÀ&#OŸ&Š„ï.ÌMÉeÞp{ã*`±eº—…Å
15
NL/Ìó¸qCODFض?LïÅ:Z\V:6ÅØzґß=}a„†×ÃDtØô°£Û*'òž—!ô’áyëΔ“	êŸ5ÒÄÂÃ4½FGÃ÷|-÷ä§Ët[šÛ…"7Œ³u=®
16
@jx͞€®—û8rNǹÎÅÀKZžŒÑûºQ6ç&.Šûa/-6’ß$°Þa£æ'^´óäÂP÷¸acôtˆ¦7#ØÖ¸x©†ê‡èïÅÐì¶½NbM¶]Ó^i!</Góì3®WAËÎ:|îâuÊõ~s¿Å®£B±ÜÉ£\±º•YH7MÉWVm/µÐülMOAÛKPÿx
‘ñ¡òž—$™š=¯’ÊKÿa!`š›c±"4›!ð­2v·ï"šÒšÿq3Zu­9š?Ý©mÿ‘I
ì.†.˜K€­´‚ŒN{Á“¨rìÒl2ÜöCaâ)»Qæ;×Þ%é?!žÒ."¸ ÂAS…i÷K
Œmaà%6»y)º óÕz¶;IÄblýU?í‘$Xm®•0ËXgº=v½A·8‰MBÍKTÿtÆ#ÈÔõ½NÅÐÏã·õæJÛ¡0ñ”š“À‰¹]¯b߅bY0¯´à¸h©ùßdS¦>D„¶”&¼¥M5𙤄ö—$â:z>‡¡ý8‘°ñV¸@O"„gíü§\1‚žš+{ÂKSgqšžòéI`•×L{iV›y³Î6`¸Pº4©é/™(ä夻N‡äy̓à¤{N~©lý¦±Ò©Hçô²|.iO°‰è
û†ˆ£1øNœ=.'ՏÕ⊫(îí¥Û#**Íè•Àf<A¥’×í:Íp5™À±Òh‹°y½˜çõR¯BQ:‹1þ{=™ú‘äJÏ—ñeڎ€ú—Zˆ|áà¥^Noâyx°“À—a¤;ŒöaðÍÛ°þq¨v€÷'{ÿ(ËÚ'4ž-àÿP¼d¸?Ñ+†@m*ƒ!Fd«0ÏI&™w³–+Œ€-øH2½}bWÁ©žZfìÐÓy͐.žÊ·MX²ey›Äö.$ÒDA?D[Wü‡°uß:b•RÐöiÿ½V<®³õCGÑèò´.Q@XLû+²i®çušÍ#Í\¯²Ò®Wq®ß7…b©0ÿñßÅú}Í^N!ï½PÖ|Ê)}žo
17
‚'ƒD>ŒÀ§ÀIŒ;ì§æçàK`Üüû»Ÿ‡N7`›ËÁ6!À"p95ºž±âø®•=èÈIC|F@0/ÖâQ&ð=iŽñ3§Z⻍{Ì@َçÝhòÊÌ%vÅølȎlš eËܼ§~3øÀS.´5n\×3r´…3®ŸQt</ǨÞÈû '‹aô†ðZl!¨Âõ —Z½øyéöØ÷¤áa:œ¡—„~‘ý_ïë$ÊEÿç_/‚–ÇK¿NZ™^Å2ÇRÚÿžf‡Ñ={_]Éç”TN©v̔®„r
18
Žñšui::eÚQ)õ)Pli¤Žoêãê?}{ÜCïGôÿã1‚…$0ÕÀÚk{9qb\§íCI׃6¼W3-ŒëJ’½ÿBêbM
¡	;mØ\Õ¸rÒ%´½á\ðq„ÁIښ­8Ü5Ýéâ’L]Ñ$‡öï‚wûVæ»LÃà‰$¾íVª·xmÉÙ(ˆ¼$ÐÖNÊM#ì΢	‘ö
19
SÐöA’žG¬t<+¹ÿMÐ
20
x¥Û£z‹—áGþ2€~^¢­õ\·ë4sÀU,cŸ¯ÙŠãž‚÷M>á+P³^k1ÆÂÿ“Å‹ÈT(n*
21
àÌLô“Aœ÷ÕÏ!ÿÙËÉÌáSžs/r…7¿MGôl7ƒL‹Ö±xÞ%O5²
22
p:«X‰œ§ÝÀ¸€†ø&™Úk¼A…†b4}¥åA'îU6lVH$’„ÏE	¼&<.a•™’ aë«Ã´>â¤n
k
23
†ÏÐýŸaÂRÀ*
,¥v1 @:©ë4ôÆÙ÷ˆ“j
F΍°ûP˜×šòÒ
¾“ÀQ+©_çÀf‘1zéømÓôL‹”™×i荲g““‡•d"Aÿ‰gu¨p!¥DñʄÝUpÿ¬ä”HF°RíòÐHˆAËô±d©ël=eß#¦—“}¡íx4—±`…Åv}¯Sôsƒhë됺ΏDٷŰ/öUŒÀ›AÚ_šù:t¾Ÿ¤ë>+Nè“}4¶viDq*׋¦£	¢ŸôÏýÄY~ëóÎ÷Ê)öðP’-EÊYaÿQëÕºgö‰ÏÜÕªŸÂ7’f2	F·_‘îeápâØXêÓNqäd9ž©“	oµÃ“ÓÌ@œLŒ4"'cÙ´Bƒ
24
g^:ý¬1!ªÜ-{º¿PºÜ}ÿ[
V ëOAŽœ‚EP{Ÿ‡@³“äå(|AÄ7¢Ì õLæØ¥9!žµÌ©„Y¿¸Ñîa,>R&eŽñÆf*_NF‘"ÆF•MÓÓO³cžv…„Ãb½>×i&ŠÛ' Â5ëu£!ä¤nœ#4Κ¢;
25
ÅREŽGq­çÃ|	DÎGÎ%WN.2!öù`é·km­Özg:^hD™,š!ZÓúêmSn€ÂèbÔfLW¬vêþBér÷ù¿‚¶ïBÛϼ´MÉ+òþ°awÊ(WT¸Œmœ0ws©ÆYÊÌ­v“Žü<,¶ë©|Qæ»4Ž[Œ^Žié-6„ȵšÛtý¯SQ
26
Ùg°Ê•·<Üô2\0©Ï¸äB¡P”Ê-1reD¥–˜Ø"¦{ŒSó+Ò
;u¡t¹ûúßIÀ=:
ëí8mÆ8o"‘$ôY˜½ïè ¹òãÉÙ5eÚÊl]Äsj‹y0kù%´Â6{ñu¾N3g\À¾Ù®ƒ°-éµ¼
27
ÅârKˆïMKJÒû^Œ#LJnñt¼E@™¡‰Âã—
28
…B¡X֔>ÏWQ£;YdÇ7ӘÝÁb^óH
29
…âæC”9ˆœà^·ðã¤ás#v±äÊ)Ĝ^¬ (ÌÔu…B¡X’”iaYhD™Ê´¥YN”ä*
30
…¢tÊ4Ä¢¢Ê)éâ;ÃÊG
31
…B¡P(æAY~€i¾øNÆx^)
32
…B±l=ËàÒ×vV(
33
…B± (ñU(
34
…b‘Qâ«P(
35
Å"£ÄW¡P(ŠEF‰¯B¡P(‹Œ_…B¡P(%¾
36
…B¡P,2J|
37
…B¡Xd”ø*
38
…B±È(ñU(
39
…b‘¹æ+„>	/ü!·n·Ï}žm†B¡PÜô\“ø¦…×Së^({·0¡¡0€`…B¡˜…kß´ðz7m]({·0µ÷yé~µ[‰¯B¡P̂óU(
40
…b‘Q⫸)(/¯¤¼¼òF›Qý|ˆÎÖÜÿƒjÊﬤüÎÕT×xØöóB—dÉù”Zϛ½=
41
ŵqÍW
42
ÅR§ÿwMìØzÊ^I|t”Áу¾ÙË+û˜–µê]Ø
43
…¢4”ç«PÌ@샶ŒðÖÿb§þçc_11öïþ×>\e@Jgo}gIùMLŒ111v-V(·J|7-Ñ÷lõÔP^^IåÝ5lûU€©¼r4È®§·²º²’òïU³¹±P<?UºW^²«>›vks;‘YzŒ3€ëù·9¼·÷žÇ[î£ê¾z¼æ›V^ôjî^Mù«¹ÿ‰¶¼cëyg%ÕžÅæÕ^
44
…âÖAu;›ôõq8íxj«‰~#ôi„úÇk±Þn¥ïŽ
45
σՌDb„?â¾×IµËÁÀÉô„NS£‡D"Iïñ0›4Žß‹ý*FK³Šþ+úùžÞ›Ù–ãq_ßËÖ
46
§v»ÌD!<?ÜÆh*sá¿ôòØ!Þý{OY~ž5žmÄsÒýŸ#l½ääâ_[ŠÚÑ{I`Ïǵ5->÷þ–ƒ™‡…XÜU¸žçülx:ë5Çϱ»þþ¢ö(Š¥ò|M¢ñ¡ÃO0x"„fô2ðNyYŠ|o„ÁÃh·NŸfà䣑8ú¸¤çhˆÞcCØËýo3pb„Á÷†‰žOÜèªÝ’ô=×
€ëÙW¸86ƙÿÞ@øP{&Íà»Mý8ó÷‹Œýýc^xÀr”ÍñfN
ÁÄ×yû_7 ŸõÏhGdÒøôjbÎuÐjåÌŋLüã}Gê¦éi6Ê·ÿÈH;vñcZÖæ\–B¡¸µPž¯IÓS^úß	",ÐøL¶;¬D¿Œ‘”’êµN“I¢â´<ãÅæ°&HÄu¶>"„FµËF,–$x:‚¦Ùhy¶öFWí–ÄÁð8w6¡	Ðð11áËKÓùA€®£í85'G»8¸zñºº¼ôŽtà6uÍû|ün¤â%Ù#SÝÍ&…"‘§Žå¶ôáÔàÀ½®p¾Q³ž¯µâ,3ê°ç`Ý«·•d—B¡¸5Qž¯‰”R๯+ѯ )Pád$º´"ìNb)+#_AÒbC¬r22#—@T8‘ÂÆH°Xñ>è‚T9Yú4E–Q³Ù\38œéñÚº\GQóŸrú’§žÜtGIv¸Í®ëA}î×±®bvo9Ýež×Ež®ƒB¡X²(Ïפçxº-X	Ñ8DÇ
O'íñä~bÒc‡æ¶LÀø¬]®UV\÷8éÚÄÿ§†V¯[•*apx2+€Sq	C€õփÆgÙô1Ö¹wCËZ¡Ïtüû‡iü×ìØ}®—[l>®£„_WºžA¼Së P(–,Êó5ñnr<=W i
47
«n~Ê©Û2»_¦·S0?¥©'	¥é©Â:Š™ñUJÔöJ?2ÑüF¤ð÷²2­íFšíDu‰Ò¹Ýˆ*¶?´gAìð¾Ü@dÿ6Ú^í'rÉ×	"ŸéþՎkÊ߷ƨç®çº:èQ:Ÿk»¦<
48
Å͏ò|MÜë«	‡£$'“È”•D
49
¬@ã3IþvbJ/¤Ìj	ÄÆu4͆{£sñ*±„h8âc·§“ðþ]TîߕÙïڙպ#Ø«wÿè V̞\æ¢çàÂtÝjëÛyã¶½zš#ûvqd_át›ž-r`šŽ´²÷‡{‰¿ß͆ÕFp¥P,u”çkâµ×]¬6kfzHB‚®'‰~“@ÿ&Iì›rÒôŒ-dÒå	oÊ8î¬rà¨tþNu!Îm­3={¨]kx·¢ÂNýÎ}œÚ›íIu‡Þ ña7š„†ûG¼û?E»ªçCÝÞ.ß ug=®5v³,AÕZ7Ï·ònèúº‹OWš	±¦…3ýû¨]cØ×Ö²ï­Sg¼B¡¸)Qž¯‰c•hԈ<Õõ$H‰ËnÃYB،î䔕ȥ‘/cĤ
›¦AJ"n·œL‚ÅŠ”I¢—t"çc8ר%K¡ÐªOÎ->¶ø
50
¤Î"Öx9ðÖÌ^n±¥æ²Ò”¶Þ˞õ^Jé̞)ßBǵ0ð?ùâíS«`)K%¾&MÛ½øÿ4@â›$u­$SV3¨Ê
51
€U)pUÙÐÐ9}r˜ä¸•ø$h2‰¨ªFÊÄuâ+íÈ/ubºNë“^†?ü0BÛ/½ô½3L4ªgþhxR+
52
ÅrB‰¯‰ÿàBX±Ýa%…˜žˆ†7›Jf£œ…Ø¥ Ð,ïC.úÿbÌöÜçdä½0XÀû€‹öß
‚œ«í¿é#¡KjÖ9i{©Ø%÷z5&¬P(Ë
%¾&ÉIpÝcŒ/&Ì +‘i1»¡‰181Ãõ.ÅhÿíVš¶ö^óö_1ËJAô|ŒÞã!Ú^Rs:
53
…b¹¡Ä×Ä÷âVŽÀµÎÕbCZÈ´NBJc2%‘	Iìƒ0¾ç½p%	zzAyKÿçlç̶Î5.HA×Ë´½´uQê¨P(Š›íl2ôÁ	)qØm†f
54
C6ããIâ1‰~ô„D&Õ­Ð4"ŸÇ`¥ÕHl`‘æ§ùs@˜ŸÐÇ%‰I‰§¶úÆTX¡P(7åùš?ŒPÿdMv
	Ãáú¤Ì_áJ&‘z,Ož¯©Î]CIæp*çHLÛ.s*B¡P(–Êó5ñíô2xriŽïŒÆÈÉ$q=‰œÄø”H	ĸŽwS5¬¤“&ã0©“œŒ“Ô%LS—Hé€4Ò!!¥ã\åÀaø©yÀ
55
…B±ÜPž¯I"½f¤9Ö«iP·ÉIω6!ˆÉ„9×HI¤E<=‚g£¨p€Uƒ+ëJWñMÄ£ cØ*4#o³œÈhŒX\Ò±·®ˆE
56
…B¡Xª(Ïפ÷Xï#Õa5DR€½Êʞkh~¶×±q‰Ô%‰¯b8RଲÕe@*—
¡årÄø´$°­²c³;‰ÆMÏ8—q˜t„>‹Þèª+
57
…b‘Qž¯‰w“‹àɜUvÀàôÚTVÎï
58
ô„DHiÅáÐàJ&cfKZ!•î¶ÎvØ%¡c~<š°EbÓ4ôoôÅ«äMȎŸîš=‘B¡P܄þóyŸ«ÄפöjBŸFA‚(˾.ýu—݆œLAW“qBRàŠâ}ÈiŠ©±R7þg‚«’ GÁží¥æA'ÑQcü·i»§€5ˇ¾·ún´	
59
…B1/‰Ø¼ÏUâk²÷w}lzЅ(Ë
60
®0—”´Z@T÷^ƒF©Ò«Äs¯Ð)F)ÆcF×rNT3“9ÝÊRGJIR‚s†(Ë~žïµ|y
61
…âVE‰¯‰k“H$Žç¾jæZÎ`¼ÁÐ,°g§‹ÆÇ]8×X<d8Çû°ˆÃèèqò֐±œm‰î{lD>#ì’èÝX¨C¡P(Ë
62
peÒò\
RBôRÌx•‚
 e®ï,ÁYaŽ£ÑìcKJ‘„UV£{9†o¢†Ë:$âÆçec’õJ}ܜ7\&pTˆb&)
63
…b‰¢Äפë÷A#X*Éx1™$z.Fôl}<O=CŽê8D?‰R÷ˆdÒ`‡ÿo=lo4°&¥Ù
0ó5ò6ޔ”ÄQ¡á¨ô¼¾Á5W(
64
Åb£ºMtiˆcäˑ³:Î*A,.±i‚d
65
ôI‰kÐgqª×4ÍNÿ;Ã8w:°jÂ\j(³Á…ˆˆ%à©fx§Üµ°ÊˆGˆ^Š#¥¤u÷òïU(ŠåŠò|Mvޝ45ÖàÝâD¦-;kñý҃Õ"p­±Ó´½ß³n’)ãŽU6¬°:'`ªÀá6<\	l©ƒ2S”ß;MòlÍ.pTh$tÉà_†oT•
66
…BqƒPž¯‰ï…ì«ÿ¼›œx7eß³ëûeöXµÛFµÛFÛKFsRJ¬+í³‚5#Ñ}-ðeôÂ;¼Û‡áY5›œŒ¤$V!Ình…B¡P,'”øÎ“Ƨ<žÜ$“.¬ØH¦„ùÚ@	?éÆr’ëÆz•)‰8')ìȸ1•©î±ÂïV(
67
ÅÒE‰ï<é~eͮѽ?ˆwS5¡¡VÀåvAX¬xîuüp[…·ÛÁà‰œUnâ)à‡!¢£:þýË{ž¯B¡P,GԘï|±k;»\üûƒ8*Z… ðz—ˁ­L8fsRJüûƒÔ?YC,ž çøõOzÐ*´ô{
68
…B±ŒPžï<éémÉüÝðd¶ë8w¹ÈŒ¿=fǏkîݚówÃõ4Q¡P(7)ÊóU(
69
…b‘Qž¯â†>;LäóHÉé]÷¸p¯/¤V^^9}§T­qQ÷L+;v)O¿o3>ÿ©›&ŸåÆBµ[yy%c`ÑõÉO±4Q⫸¡D>àûY[Ééýê**¾Àô›^J;bwó8EßNgáçÁÞ7#øü7O>ˍ…j7%”ЁêvVÜøú©q×à?è/¾ÿÊ<2¶ë½þë>Nï+]ä
70
…âz¢ÄWqSx=ùL­ÿ ?o2•œwþ¢¢&ó×ÑÜßÎæÖP~g%å•Õl~º°ž=;ÙMey%å啔W®æþ'v0xÁOOwq—›Ç3ç¼`«Çȳú‡[ñŸŒ2…ò)/¯$x¨š»WùüsGÉ6——Wû¤‡†G=TÞiÚ^¾šÎ“ÙW7ÎT¯tÑ~6×TS^^Iµ§ÿûÓëQŠ-Åê1[;ÍVbí_¨}g«Kîù§kh{?ÿ5—±÷Û©~:P²íyçÎÒ֊å‹_ÅMAËÎlôxàõþ׳›9~
«ÉK=ˆŠºÌvd»Þ®·N1ñõc#§ðÝ£¡.ëyohêÆ×s†‰‰1&þ1Â+ÏT±£níªœ˜Ëü­_°a{€úß÷016ÆÀÁzºÿ7ÛBùìxSøÛ?Á—}%Û°ù¹~š~à☑ç™ÝM÷—T¯4÷·¨ïìcâë1^n¢·y3œz”jK¡z”ÚN3Õ£X»b¶ºäÒr´‡¡¶I–ïÿ IDAT~üÂ}G[ædû\ÚZ±<¹îâ»bÅ
71
V¬Xq½‹™i›fû³0{¢öдiáÆ7¯7ÍÏ6Oà4-;[h~¶™š‡Ç „?è§éÑNšîÉìn{eˆ®·ÚqWٚƒúÝôYñ€Ýf¾òÑ"ð<ÕÎØß-ª¯¹›º@-¹Œyàëy»·Žîæ¾9›íëíÀm 9ðÞg+Ùf€–ÿî¡þŒèpni%óŽéëUûÇ>|[Ìz<PÏÛGëè|.[Rm)TRÛi¶z”ÊluÉC¸xû`-
fËö&j¾Ël®¹^ã¹~‡ËpµDYýÏÛè¹Áv̅æg›ÂÂ[*S» …¦áZç¡þøvdöücR	B rvˆàéñzH“7ž­"0Áv,ŠvW
žY!(„ÿ‚Nß#޼}Žûö _hšJ®@‹}ú{žK±ÀW5ó;¢K©Wû“ùnŽûZÑÏ7eêQª-…êQj;ÍVR™­.Sq<ÜAëk5lû÷!†ñ1’ó½™ë5žëwH±|X–_ƒ«W¯æm§½Ê©û‹H
72
Ž;’'¼âægšKêv.5rU?ÀûÄ^¨rSs×ºZöÝÃcž
™4u Ôº›Ž÷‚ŒÆ%Xì¼1¢nUaQ•°áÎâãsA+ðË,Åf€Ù$«”z¹§f"œ GçlK¡z”ÚN#½³×¥MÛÙ}÷.ÿý@Þþ¹^ã¹~‡Ë‡2æ=х÷+V¬Àz‡“†Ÿù™J“ür€–-5ج+°ÞnÃóxÁ¯òS¥»c‘š¶Ô`»ÝHë}ÚÇÈ兵×ã2ìu¸<t½“`‘¶#öžï=¬+­Tojbø2ÄNûñÜå`…ÕJõ#M'¦Ÿ=хç֕fþ³é@ÿ/›p:lFšíú&™Éwjs©ÉÚ½8lVV¬XÍá¤é¥é×h!™*¼S» ;2¿nç"´=ÝIݑþۇý]´>߄g͔D<ÌðÈE.Ÿâpw+m¶ÌÀn3_eÆ!sÿ/šÍ¥PB½¢StdÊ\bËõn§©ÌV—Bô¼ÐAÝî:Ú_Èï;š³ísü)–‹.¾‰H«ŸØÍésqäø(ýûw±ùßrÞk›RýƒÇ8ò—0º9©3ôî6Wo ”˜žgõ£÷/aôI#íéãÙüèÂLœLDüT?±›¡ó†½ñóCì®_M×çÓ
Yýè.NŸ‹#S’Ƚlö4Qýè.†.ÄAJ"ï÷´«¦~7CçâȔ™]5]‘5Ø^Í®W{]|éöÙêé\útüóýt¿yš¸nˆ¥÷•]ÜÿËЬùϗ©ÂÛø“Æ¢cÀÁฤí¡üîHýlñïŒVå¢þ™&âñÓEÓøª4:?ʏ”•£*ï^˜)Nsµ¹ŠÕ«û“)¿ucߨº ¶\ïvšÊlu™JìývºS>ÞøõaZSþ¼èçk±½”ïbù°èâÛû´!®ç0öíU.÷~5ûåíÛÞ¨ûC­|ñõ·|ûõ´>d‡É
Û6<Ôʙ‹\ý¿ßòîŒˆÖøÙŽééæcoc;Ø÷×/¸zõ*_üõ:·÷OKëÜy˜‰ÿ½ÊÅ¿=ú¹^´Ÿ`ì¯rñ¯Æ]/`—øÑ.~ý-ßN\dϏ쀤óéÞ¢6í:>
73
@k¿aÓÄÈ»FÞ£ÆÍ/·ûüêÕ«yÛ¥Ô§ó3CÔߙ0Òü·QŸðë×/J3-´iáòøZ£§â[#hyu]2AèD€­OÉK³ãîÕ´e^~;ÙMngh•€à%‰¼d<86½æ£¿±Àd
74
ô!v<ÑIý‹ßèås-6—ÂlõèmÜFÿ'QãÔôðãæaº^Ë®v-¶Ì·¦Rj»ÍV—<ÒÑÍæÚí-½ùÑÏsµ½”¶V,OVØÔzµî™=DƁÉÏÛJ>Ù(€§ÖwSñWâMOuZW0*á‹o¯Rm-|NÍí+O»߲Õf$J&¸­ü1(ssõòp^Þ¹é¸cÅw*óʜ™Æ|«­+²Ór.®&GòÎÿø¯â¹¸’`ÅwÊ8õ¿WñNٗ.gÚy‰V”?¢Š«Éhqû’1‚ï
75
|o!³'ajÞSëTJ}šVzãQå¦~‹ï›¨{r+Ž"×+cR2I÷«Ýøž/½[­÷Xu—þ‚‰Á}4>S8PfNËúéÃìhÞÍàG¤EàZï¥ùÅVv7mÎä!Gƒìx¡“àgƍ­=³g‹pzeÛ^íGO	&¾¾@ô„Ÿû„/ÄÑìU4þ¢‹Žž"FP0Ÿ¢õ(ÁæbçæîŸ­^åå•þu#¯÷3ªƒk£—=/¿Bݺœ{Ã5ØRJ;•RBí_(ýluÉÍ3ðt
‘çèÊ	²Š½ßÎæ×œŒ¼Õ2gÛgkkÅòa롔9—ÂÄ>\|ñ-%¸©pš$+VÜV0¯o¯^Å:ëùř)ýLS|f²c¦}sµêvìt5u»‰ÑÙÚ¹”ú$¿ìãÇOïbðl<{PØÙs4DÇSŧ/ÍG|rmg۔Ö&^JuQÜÚLßEv®FÄàðe¨¹½pw„'a ‘Ìñ|ƒÆÁ2÷´ô³8d×DÚދß^Å9KA…—bÛà7Iî0S¦ë)Š„ì¨ßK\BÝΨ]ç¡n‹—
w—YJ}¬w50n ñå0ƒ§ƒßïçÈñ!:›èxjæ.¾¹â^_³¬ÅtêÔ(%
76
Åò`ÑÇ|ÛÖhìØ×Cò
77
Dßë0"roÏvÛ´n´iê÷ý&Iò›({ëwPõð¾Eµ×WeØÛ°§‡Ä9ÙnFiÏmÞæLìªßËH,	—ctüÔðµuÅÇ¿‚f Tãóí´ï¬#vº½hڑËIbßdã”g¯O2!Ý}^Ðô\{M[älQ؊¹²Ñ¾
78
…âæcÑÅ·±×Þye·}g«Ý€ûÅì|ºúÞØ-ÿ ›ÕwÞÆmw®¦ûƒ8”¹è9Z¼‹ûzÐÒkOøÕm”g߯3Ət-Xò“n¾_y+þ©’½ÇGÁ"èêm,š~Ï:C@·ÕT²â¶rûéÄ*cß@ÂÚMšÔñýºjo6xköúXÙwŸñðÓùÄ÷Y±b•?ø1UåÏyT,M–ÒCÀRª‹bi±èâk»§‹ÿý
79
µk¼¨¨¢þÅWøø÷Ù®G«£‘ÿï]šT‹&€2Úǚùøïg²I‹e¯»/Þڗ±W³»xᏧ<¾pCo°i,ûúMþëEZî*ÞaÝ:Eócn„¡Ù©Û¹‘a#
80
|×ύ¨åÀ}¸ì,­,;E¨”ú´ÿm„¿nÆezÉé2†ßZ8o_¡P(–3×=àJQœ¥¶²Ö|®
81
…b905àJ½ÕH¡P(ŠEF‰¯B¡P(‹Ì²|±ÂÍÂRénV(
82
ÅÜPž¯B¡P(‹Œ_…B¡P(%¾
83
…B¡P,2J|
84
…B¡Xd”ø*
85
…B±È(ñU(
86
…b‘Qâ«P(
87
Å"£ÄW¡P(ŠEF‰¯B¡P(‹ŒZáJqC	Ÿ&òy¤äô®{\¸××=}¿‡Î×z	~AŸ”hš×zõÏúhÙâʤ+/¯¼å_7·ê P,W”ø*n(‘Ï#ø~ÖVrzÿŸºŠŠ¯~¶›Í¿rà÷]t­w¡	z‚á¡Aºµ•Ó—xc§«à¹
88
…B±˜(ñÍ!ú0„°$ÁÂ}NE"¨¼ëíÅßÝ»\ðôx=@ËÎ|/ø
89
ïßé›!ð?ç§ïoqç4·Ðlx¶4Qs¯Ê삝§®W
90
…¢d”øšŒDFˆÆiÚ¾x/ŒOÄôë¥eg¬\´boJ¯ò>};}ø_÷çío~¶yæ<F%θÄ]5ýaGTÔ11V—·/ôf7û{_ˆ#S‚ÖžÙ³Å‘I=ég×¾CâØ«Üøþõ¾-N6¯’Õ.n2Dùê]\F³äì«îdâm./¯äíÎfÚ^íeT—Ø×¾ÀÈßڋv)ÏÔÕ{?ÀŽßúÚ:SY±“Ýlhê6…ÀµÑ˞ÿ8@ݚéí¨P(pe2ôáÞ-ÞE-Óæ°át9	}ZÔroFZv¶dþ¼ÈÞÌñÔÌyôu7ÒöÏ[	œ.©Ìÿ.HÓ¿õpñcLLŒq¦ÇGwÓý™ãú9?÷·ôÐôrccüG½-›ñŸK6­Ò\JdÒGþ³±Fg×{±lŽ UeëVˆoJaâïg8ðòÌÞ}1ô6lPÿûÃփ-ôþt3þrÖ²64uãë9ÃÄÄÿá•gªØQ·k^v(ŠÒPž¯‰Ù§üØW1†ÏGÁ"°
91
ÉT«Åì6[LX@Â" %Á")‰Ó‹Â8+ÉTÒØ‘’ %Î5Nªï2¼+§ÝIp(ˆçAÏâTô&%íÕNõ€ÁÞæg›‘R<7û™.NÑÎÖyŒ½UÔ=â¥vc
NgÂbÃsŸ3/}ë`9ޝsK+НÙîiöSwô˜×êzÞ>äþçzñ…|¸Ÿrà?‡_ÛèÞáÀ`»ê°¥€è±œ?iÑn_on»xï›1iQúš»©œ¢å!Ó֍õ¼Ýäþæ>|Ëöæ*Kv›Ùç©vƞšŸ
92
…¢4”øšäÞØ#b<ö›.·ÍžÀ&X’ˆ2+Â"eV‚M㦕LIH	dRB
93
t)AZ‘2IRùK	áO£´>%è2Å7™JÎêÑ-¦
94
0d…·T\Ïtpñ'­„?b8%òQÝ¿:M\BãŸ?æÀSYöÍÒ­¸¤Ó÷€#oŸãVô
€ç“µÄžÁ¯]Èñ~-õ^SO(ÕFÿxõ‚Á÷âÔ¾è,\@ºŽökïÞõ_Ðé{dŠ­÷í1m͊o¡²Þx¶ŠÀdÛ±(Ú]5x6ºêΠP\WÔOÌ$×óÅ"°¯²£Uh‹,æqK6°’“yÄJóøJA|R7„ØÌ7™’a’؝Ό`Yz¹“‚#ǎä	/d…¸ù™æÒR,6ÜÕá~ÀG—?Aød'[Þ΁§z2Éf“¼Q	Ω‰„RqãO{ú¥& …È~?î݇ðívѰo˜ú?zÄ%¯š¹$m~…£6ÜY9kºBeÕýa€Pën:Þ2—`±óÆpˆºYìV(óGù@X@˜ÈÒôLe*Ç£MLJô„¤ºÚ±a½¢#“’xB§þAã½»ÄtcLPʤÑm­ÌÜ+¦ç«¦	ïÔ1à#ǎ×`ªï¬$\(‰Å†{ˤ~zN6U	ˆNÍOFAT'›Ä(A]Ò~,J‡éU;ŸÚÇèñ6ôx²¬ÇB]ßêo·À™¯±ë©ÿgÅb£ã‡¹ÈÅáSîn¥íљǩ
95
ŵ¡Ä×DXr=_°æŒá¦»†¥”ˆè“F2)‰½L`/a…ø¸Ž×)¨_o£¦Ê†>™D`™ó͔’L’O¨.g“©ÂÛø“Æi<­ë5ڏG“ú¢¢~N6µ¬Òèü$–·/öI'ÚªœnÜ5Ý'ۉh>ÜeæÎ²Z+â´;‚¶®qNe΄õ=æ«Òèü(ßV9 òîÒçPhU.êŸi"ŸÛƒŠB¡˜J|MÒón
¬$&yžnR¬OJœw€@G×%ÑqÈ8Ē*Mà^c#‡ö7GˆM$‘˜cÊf~2I)IÿSd=Ý´ðy\J´sÓÑ.b{è>$7®ŸœL~¿‡&o¾#{ædSÓk-66ÐûQRý¤Ÿ7ñ½–T×Oœý¼÷¿æ‹lã^7§ÿ=‚óٙÇ{‹!€Î“¦˜¦$áúix¢øHÓk>ú|A¦@¿bǝÔÿqæ`/€w¯¦ýxˆtØCìd7³wÊ+ŠkAuxšˆ•¹7›$ò²!˜Z™fzÀ63jي½LP[¥qät™ÒˆéIœwh8í)¡ïÓ(±q£û:í1ƒ4º ±hšâq/S¢Ñ(u[ê¨ÛbÌÃÕu=s,wÿlÝÎÂ^G(¤Ñ±ÏOÿ‡ëMõÑKËÁlÔr©hë[ùØ/Øñ˭캠c_ã¦åϧh]oˤq<â…Ö]S‚œwÀO7SW;·2Ó|ÜÓÊýMŒØk‹ j}-¾×N1ôĆ"¶ú8ógØñR»/ÄÑìU4þâ
:¶Ì^þ¿fÇ{Yí‹äÍwV(×%¾+ú¤_YÁ©AV©„¹bU’¡/!ò$ͱ`=%p®hÂJTO¹dx»Lšu*ÇóO@ÊA.¼ÖrÁu‹Á}sJ?b•‡Ž?{è˜%Ÿbc¡S÷;ŸôqêÉâsoŪV&&
96
x—ÂUÒxk±4Î-­ŒÈ·%'ý4[÷qêñâ¶+KTyycpqç¸+Ë%¾&yÑΩ®' jÃᡙ°°¢ãæ!‹@¦ ¡K¤¢Ì†«J¢ë DÎÅÐSݖ_%Èô2[2¥g–²\®¸××Ìø¢„¥Lyyáèdõ²…bé£Ä·f°,¥@³Iœkí8Öhh+!6ša¯´X‰ÆâD¿xÜVªïr02£f•Føl”ĸ$þ)¼)	–lªLIÕõ¼LQ"«P,_TÀ•‰•Üù¶YAeÆü]™„è…8ѳQ@b+H]¢i­l·NCN&©Z5kôŸŽJâ±"•]AˆFWszÌWE<+
97
ŲB‰¯I’dv#-¼™…5¬S›#_ÆÐc÷½F ‹”ÒXj2)†#:ҌrŠ$‰f
98
xv)Êì¼ain+
99
…bù nû&¹+M	WšÕ𷲕CÓpÞ¥Q»Î†Ó.ˆÅ%CC14›†ïY'RBðÓáÏbDã:öÛm•2iç¬ý¬ºœ
100
…bù¡Ä×$óò0<_h+󗖴Z@”C„ÏÅа©Ö£†Î%
EqÞ¥a³	t)Í(éô{}¬FpՔ1_…B¡P,/”øšØ„-gK¢Y­HÀ–ÛelôŒLJ\ßÕ¨qZë„Ï'ˆ^JšQÑfú” )%ZÊfo:?Pó|
101
…b™¢Ä×$ßÍÜÌgZP-Æö2¡HœÄ¤F|2‰f·™h„%ÝÕ,±
102
HÊ´Ð&1âT¡r
103
…B±Pâk’?ÏWbµ’Þfd֌Ä'ѰnxΉÕb5–¢, ót)±Z i‘h";¶œñ
104
…B±¬PÑÎ&S=Ф)Àí";,ҟDÎØpY:1µ×ðœ%c-iŽ1+ÏW¡P(–Êó5Éõ@vÀ‹ncÃ"ȝ÷›!·åÌW¯|ÓÌiDÉôüݔlHiˆ­Ó.Œ‰ÃjÌW¡P(–%J|MÒ/?àŠÑµìu›ÝÃÉ$ H¦À
105
$3QÊFДœ¶m¾À䴇›^dÌïÉt´ZáJ¡P(–ªÛÙ$)“$¾IÀJŒÿW‹•$Æ<à$KO‚¹&sñm™	ª²’LALOØX’RŽU"ŸGp8ç÷æ…B¡Pܚ(Ï×d돶8Àù]'v»=ó¶!‰ù™^‰*'JY˜k@§Ó9]ÐùùOÍOOé

<=‹XS…B¡PÜh”ø¦Y	-Í-„†B„χó^ó—Ì…Æ}¯›šõ5YO[¡P(Ë%¾SðÔzð <ћb¯ßËE½%èæ øµ´ö|̞-ŽiéúÚ]<Š…D‰¯â–`êTÝ\on
106
]›èÉnîÿ—ûá¿òX]GÅrD‰¯B¡Xœ[Zùø¿((À
107
ÅrCE;+–å啵Ss÷jÊﬤúŸ;2Ç÷·³ù‡5”ßYIye5›Ÿn#¬çŸû¤‡†G=TÞYIyy%åå«é<ˤ‰ì¦²Ü<V¹šûŸØÁà™—Gô„ŸÍ5Ք—WRíiÀÿ~tš¥ØR¬±÷lõçVÿp+þ“ùù—R€ØÙ45ÞüïgŽÉñ*«Û¶qè綛^§R0ØGwÓýyöæÙµ@mœËLí}½êªP̄_ŒcǛ’ÀßF˜øû¼ì ²¿]ï@×[§˜øzŒ±‘SøîÑPçÏ;wósý4ý6Àű1&&Æ8ӓ/šºñõœabbŒ‰ŒðÊ3Uì¨Û•—Çý-ê;û˜øzŒ—›èmÞL G<Jµ¥P=ô6lPÿû&ÆÆ8ØBïO7㿐¿RÚlõÐ/ØÐè§î¸86Fðè"¯nc‡)4¢¢‰Fz	MNm]Éîwât=å,ý‚LÁ¹¥(¾²ÛB´q.³µ÷õ¬«BQ%¾Š%‡¯··]€æÀ{Ÿñ¶ª¶W†èz«w•±-4õ»èò¯å¿{¨À…0d¦
108
…ì63òÝ"ð<ÕÎØßçåQûÇ>|[\`çõ¼}´ŽÎçú2ÇKµ¥P=úš»©ôÑò™ÿÆzÞî­£»¹/ïÜÙêÑ×ÜMÝÑ>Z¶Ô , ­ª¡«¿‹þßµeËßë¦ó|¯Oÿ¬Øš}¸®ãº0ÑÆ¹”ÒÞ7ª®Šå‹óUÜpBŸ„‡#ùžo™s~-öéwˁŒA*Aèý ñoDÎ<‚”ž—ÎW5óög«LF°‹¢ÝUƒgcVàÒ´?™ï)9îkE?ß4ÍɖBõð_Ðé{$¬Ôqßô
™üK©‡ÿ‚NßùùˆŠ:&.Öe¶OvõôÃ3­™}}/
Rÿ{fÌûZYˆ6Î¥”öžK]ý‡×T?Å­ÛíÂsߵ͊Q⫸¡¤…w>"[­À·Z?ÀûÄ^¨rSs×ºZöÝÃcž
yéfsrêþ0@¨u7ïK°Øyc8Dݪì™î©™'ÈÑ9ÛR¨£6Ü9û´«Ùê1*Á9["á¤ÃÞCX¶u’ö^ppq½m–¯…hã\Jjï9Ôu!¿«Š[“ôص°_Å
e¡…·mOwRwäc:Îñ˜R±â'Ãb£ã‡éôÑÁ‡i{´…º‘žL’h
109
œ¹¿,2ׂØb·ÀÀØX~þó J@´öþG
‡†9õ‹ÂûÛ°?¹ï𗛉ìfÆÇƒhã\JmïëQWÅÒÄ÷|þCkߛjÌwŊÓÿ¯´âpVÓò۞Ù3¸Ær—˩ރ㒶‡ò»*õ³þ"©KC«rQÿLñøé¼ýݟL‰*þ¨ûÆlwæµØâ«Òèü(?9 òî¶"g¦¥J£û³)¤)ÿ^CÞ.mmìßF(>LÃ+aÚöÖÌ©œ©ÄNv³á_ü´ö|\Rúù¶q.¥¶÷B×U¡˜‰›J|’’ÄG#Ù·
ÏoB7ÚÅ-Šo åÕAt	È¡¶>qdÎùì¸{5íÇC¤_‚UȋëmÜFÿ'QHAäƒ~Ü<L×kÞ±¥é5ý
>ˆ S _±ã‰NêÿXXxŠæsÄGã6z?2ÆÚõÑaڞÞŦ_wLKÛõŒƒmÛZ=ó÷ÓÂë›eŽïB´q.si«B17¥ø^½z5ûÿÿ~Ë©?70ôêŽl™âVeÏ_߯6ÔMõ÷*)_½Ý‡†hœšs>þz˜ÑÿÜËêïóP¿ß4݋;ü¢›Ží›)¯\͎—O³gðu97òk±E[ïã̟›è}©É˜ŸûDU/¾Á9.X¡­õññ‘Fz~ÓdÌ®Û[ºè{~z×­û{ÐÏê¸÷–.ðåéyº9ÿ¿ß4»ð´q.siïùÔU¡˜+ì?j½Z÷Ì"ãÀdŒçK¦ð
110
à©uãÝ´uaŒ1»@¯^½šàJ‚ß)‹àê•d΁$þ_î ëÍAFã:¢LÃýP=]Gà¹ÃšI=ÑEËoº9}.ލ¨¢î'm¼ñ'éSË9êãûÿrÊ\œºx¯™WôDM/u3tAÇõ@=‡ß:Ìýwޖwn:¯‹oíaëÏüDt‰ë¾FFNôÉ/Øõ³½ôFZ{;Àûݬ½ÅÚaêþôöÄÈ»ìúå^?
111
#ѨÝÒȁ€ŸêÛ³çFOøiùMCçãhk7Ññ§vx+·÷<I&“t¿Ú=§1\ÿ¡À’
112
`YŠË^êºYí䋋§pÜQ"׳o¶º*n^æzïÚz(eä¥0±Ïo€«Ë	ú¯¨hÌ;4°½š]ÇF3ÛrRgèÝ#lõ8H|itŸ%"]¬~bw6Íø(ýûw±¹¢–Ðo§éd„×bçá3›ø<?ŸÈ½lþ>íü4ÕOwffUÆ.™ÞD"Hõc43ÝÒ°wóC|ü<ó"­þÁcÄ3¯0Ô9}ü ›¿ª&6d,̐çÛ?wš®ž_aŠeƒ.AÈ(ۼл´Åh9ÕUqspSv;ç\ýS9?þU?uÝùKÀí:>
113
@kÿ\½z•‰‘wÐG³Á½Owàzþcß^åbpáW§¨Œô¶Â‹à•à0MweÕ°·ÑÈÇþØ>.N|Ë·__¤uÝð´<Òhï1ÒMŒ1ð–ñtÔ·½…Q	ö‡Zùâëoùöë/h}ȓ¶^  $jåÌÅ	®þßoy÷Æ<ÍøÙìØ] c{Ú¦‹ìù‘6ÿò˂šÕ•¬þAò©t<°´×a^NuUÜܔÝÎE)«âðÿÓâʱ1#øî ÒoÈ IDATÁ¡Á÷:²]©Në
114
F%|ñíUª­…2-\îÛßÒ`˞ÎçÔÄU¼fñÉÄ·•?–W^:¯cßâsäXsû
115
“ðîÄ·l5óÎäQææêåá¼<JívÎ͏+1V|'¿;9mûÇÿ{Oº+:1ÀŠ)¶_+ªÛY¡P,®µÛù¦ô|ó®®21v‘ûkar”]f½ßØé.å•l~z¯Éo.é.ÞbÂ;×#h£íçCóñæè¾ÕV8º ¾bzasíØ­9¢žÉc2<‹eÉ¢G¼9ù±rúS{ÚvOÎ0¶…y`R(
116
ÅܹùG6V‚Íᤥs€¯”#/Œnåõ{‰K¨Ûùµë<Ômñ²áîüÕª„!>סæöùçPû‹·9õÛ¾·ƒÑ7›ˆb8VæçLãù‹æ•>/w™!À‰dŽçkæQ枖>v%'ŸËÅÅy¶çŠ´í	ؚ~x˜Áv…b©½%zI½¥H1ç*'Î5‹÷›_|d"F:èJ«Íìê†K×ø|;MkǦã¶­ÑØuNgǾ>îl"þA«Ýeµ\½œ?o8ôƯllc÷gqšŽE	6£m­Æ®³:-͏¶cŸaoãܦ>µn´³íƒ8;ê÷zkvâì}ÚÈ£êá}™ti±Üu(ÈÏ{‘ñaº_˜¾fm©¤mßÑØþÿ·wÿ¡m\‰¾À¿?˜”¼‡lBM(–É-‘·)–š[b%y»¼Èíò"§HI/µœ”TNKWJ—®Wº¶[¶±¶lk%´²¼$V ÜÇíZ~´µÚDKk…MÖ*{eJ°ÄÞ`^X<AÞ²-Ë֏я,ûû“xtfæè‡ç«3çÌøÝP"‚SþÛ#*GóÁkø…!{aZw¼ßx@¶^•ᛩï×àHLjÞñ´gîGqT[ƒ£s˄­
117
ˆ¢­K“»íϜFàìQ<qö躚S}i÷a½ÖÓu§1bkZ ¾úӘüßgP÷ßÎÛMܒŸ—ÑÝ哇¹é@ÝGâMjô_JœîÜ¥DÛÍÞhÂoÌ-¬È€”éZ7ìOµ#òzPWÕSðöˆÊÑ|ðбô·3¤õK¿OßMŸlá»*û|“TÂ&µ
èøä6<­‰¦Ó?ŒÖ4@P(a8ޅ±Ñø¨áö7â#¤+wØ1ñïgѸ]	6×Âxê,n¿—~긍*;:žV@ŒzaÌÄ·£¶ãoý]ÐÔ*€
118
šÿñnÿeî6gƒlcuÆþúg´þ÷F(›h|¡·ÿþCR¬Åë‡íÈ~(6	€ €f¾úŠ-Sù/VŒyûâ¯A |º}Þ±¼·GDD…YU-ߜGÝþW-\_Žbé
¾–nGõ¢þÓÏ}›j¿Ý÷f°x¢½6@Ð÷í¬?Wÿw¾ÏãۉWٞC¥º®¡æeuN²Q…^·½K[–l;ݾR-W°ÂÀš´ÌZ¤QÎDå¨íÕöRWJÌs̓™™¹yÂc™ËÛª
119
ßÕ¬wŸí7#hß[‡¥²šS+{S"ZœK¿âɃá+‘õ«Q̼Ñ÷—>Äg¶R(k¡ÉŽ+)fÊ¢•¼DàÞòIN4;´P7¤¾µÜR¡oúÑó©¾ïƒˆ>¡P(¡nÐÁøŠ–Ò¶1oñ”‡R§?”k*ʵ8å%Q¹cøJõ_ªÑy΃Îs¥®¹/Ço/i8`€ê_ꖇþcÞ!/÷Fa:–y4wô®Mï…Ð÷^/zÔP€Á舎ß4ãÆƒA\9ž[ÏcЭflE«Ã—ÊŠûr<tkçB÷ÿ%SÕÖÃz²¡É1¸/÷g`ç	'<ßN@³èF8‚¢ºfhÿµ5Ï´Çs¿ë‘«´3ќàÝø½g‚7ùÇç˧⚌¤n	›
˜žJÞАÍ:müö{Ï5Ã9”~¢†ªªšeË·úѲ7¾~]}:ÏK»7uøf?Z~©‹ß>PßçËOµçR7)嫪jà;ß	íSuñ2{»“#¢Â1|©lîÂpÀ€ÙØlÖÃCÊ>áy‡	ö½Íp
¥/3/z߉ݖ~˜?ð`zj
120
ƒ°Àmi‚óþŒ¤z‹“ýØmº˜Xÿ\+¼]‡²ïw܅gMNÞìÃÄÔ|—:üð(Ú.'Â2׺I-ßvU„ëÛ1Lÿýô}%_î§ÔE™G´¥S”ÓÎT½xì‹`ƒ^É×ñ¿Pveÿ°H¹UÚðÙÊiŽõbhþ·pfs-ÏëѸS•ªBE%t»ë÷·:a¸4ÓÜÝnT{Œ¸~ɇÝ'ܰú­©w°ÈÀ‰ÜÃ0¯ÞgÆ ë~föf\ÏÓê€áÒ0,¿ˆ¯'lÕ¢w 5ÏÙqá˜'¯ºI-ouwC£TC¿+ëS$¢µåûØá¿ëôß
úø$&åD}¬SÃà¹N4n¯Fð–í‡_À†Ýhÿ<Ѻt=ˆ¢cÉmæª÷ØÏxµöçý(l;—¬¿ß–}½ñåû60=‘¸ýd®u“ZÞ¢°fÅ û5´Š•èóP”–ïüA˜Ö¯Ç¾H†û.Q±ÿH**¡Ùg€fXÑëœA`¨Íot¢ï¥ø¨êIP-Í"AĤ}îƒ)×Ï>’:å~¥”ÉP7©åŠI´¢ŠÒò-ÇV—\ŸHDÚi²•«ßRƒ@ªñV•Ð耽±°¨VBKˊ!@¨•Tuªõcá¬ë¥Ü¯”2êVès!Z«äžó»(á˖/ÉñÐìÐÂ;䅳þx‡¼ÐìH?ù‰­AÎÏS´°Ù¸ð»e«=w’Ã2|§Š­ÒîekPâ̍äõ£ß;ҔN°Ô*àø~IHG}¨z²%ïºú\ˆ¨8Øò¥¢ã30?sUôaæVãüã™fº2_êE¸£ŽË>„"3@Í ðM?Ìz;¬S†š?µÀkjûVˆ¡;8dòÁú©IR½
;áµ®›Á…õ[g¿–ù¢¦£pߊ_2…ýp;ö¿¸ô'׺ú\ˆ¨8Øç[ꭞÇÙޔ¹ú|MÇÌI3\)6'E†áò.”ËDPà÷+ÐÝåDËûLF¢
121
¨wêa9—
Šn;´ýºíãQ(·i`ùd¶†JIu”FŒ–·,8}w‚²­ïþÛ×Sl·âöEí¿5£ýDŽ͵0ï…çdâKE®u+ô¹pªJ¢â(Î¥Fó—šPVê˜ø£‚Æ1Ɔº3k"€7è•ø§Lw)43#x7¸´‹å2·³°U‡îOtIw¯JGuЊáƒé/+ZH©ÂI±ÓÏ˜´¬û•ì!¦ú…ƒ¿°­nù”—úIǖ¯Œ6Ô9ðO—	wh€€8؁	ÖDË6ÚyŽºA-9d—Êe–&†ÍÚ广É^ˆh…°å+“
u<hÀ÷^ÌþèEèýB›K]µ¢³å[(*ÀÌfqN´RØò•Á†:ûº€Z5pw¸±Q!`仼ãRW¯(änù•3¶|WXRðþèî¹A€kDDø‘€I±ìO9åÕò¥õIµUßMt»t¥®
122
­Bþ;~¨$N_[lùÎY<9©a™¼÷½À½‹¸¾zôÜYÁ°åK«Ÿj[üÀê¿#íŽR´¾¨¶ª>#r`Ëw‘¥A¸¡ÎéíjTþ˜¸5݉ÛJ¼±D‹w-/À–/•Õ6y°Dép†«,‚w³Bò:˂70¼ß‰E3k,xµý "*6Îp%Õè¤b)ƒœ7æ[¼kgbÅÖÅg€ˆ¨HØò-¢…ˉjÕÀ}ßBðº¾×f‹w?DDÒ±Ïw‘Tƒ®Rõñ¦œõO—)~ïݹoÅÚíã]Š}¾DDÒq´ó"'®'ý¾¡î_Kžp~Ãa7¿;÷Ë6# j„õÄiØ_1b£ZŒß»ÅÚ՜G;IÇ>ßBü1ÀòæY¨´ß
`v.x×zïRëö3@D”öùæKm”ø¾öy",
123
FôÞXû}¼K­ËÏQžØò-D…a»ˆ‰ÝbôQ5|3DÖQ‹wÞºýå}¾‹l¨;´|YŠ›ž·ŒÐ@ñÒ
t|t¡nøo‡1#†E(6ÉQãՃ}¾DDÒq´ó"ßNú}ÆÝxüK–½ïÂ&£‚÷ÃðÝB܅ ¡ÛÜx_Ɗ¯íLD$[¾92þ#„Mø¾Ž¢óã~¨¶V"4†áÅ(*€Pˆ±R×R~lùIÇ>ß¼?ô£þi–SATobã\ð
124
›°îN9ëñ3@D”?¶|s4ð¿`ûõt€®1¾LP,
125
ÜuØêäoùï¸7ºl¹f‡êµäíDïûÐ{Þï&#Q(”µÐ=o€íL'4›åªªj0==UŒªgµ’û’óyäj5׍¨ØØç»È†
»S,[^n÷ÞåËn|“b{)fÂZ«# åìóu_î ú—ú…å¡ÿƒwȋÀ½Q˜Ž™³n'xَ¦w°õt`ð]ª7£aø‡ÜhÑ6áÂè ô›…{D´~±å»Èí%®voØ
,p…
¾]²l/€w—,{'Ͳ5J®–¯ûr<tkçB÷ÿ%SÕÖÃz²¡É1¸/÷g`ñ¡MþušE7¬ÕбÁóÀ‡–Ã.Lø¬+ôLˆh=cŸ/…ŸàÝøíçƒ×ù™Úç´?ÎϜIÏ—OÅÿz'4ï^H
126
ÞÅ4§ú`}%ùôµÿªÍ:-j¶Ô ªªUUuè
127
'•	ãB³N‹ª-5¨®Î¡Ð²m‡oö£å—:Ôl©VßçËOŸ/åû°
-ïû$離ª¾óÐ>U/³·;±­Ï:±û™zTm©ƒö—f¸n&?
9³>ïǝhz.^¦ª¦M‡í,ºùW¦:„oõ£eo|ݺú&tžç
îi}áWTr|÷Fa8`ÀllÎϜp}æJzÜõ™ÎϜ˜ÍÂpÀ²OxžóNփnª.¨`;¦OZtèÌ¿ëÇÄOS˜žžÂýV8̉®Šè¸Ï¾ì‚ñ½~LOMaðœîW›à“˘œ0¼Ù‡‰©)ø.u øáQ´]^nóü¶Á)šày[/y?ÐvU„ëÛ1Lÿýô}hÁêð¢õLOMÀó?[pñåÝpM.ªã}'v[úaþÀßþ,p[šà¼?³P&øqÚ¿z¯
cúS˜†õ_Ãh18³ÖAœìÇnÓÅÄöϵÂÛµü{¢µŒ-_*
128
¹>Ê­ñÀ\¼óæ—Ï—Kg$
129
èÓ´zÓ±y=0ýB
a®XuÀ ZžV.,ûÔ@ ÚiÄu·ŽVOr™KXh!TŠ­Zôôbà{Ê}ú?nƒcQðJÝXÝÝÐ(@Q
ý®Ê…å× ,¿˜[w×/гhÝþV'—<0íQ%•qœHL8c?;‚ÞkÐÔÆ·+(ªa<íBt<9|SÕaàDî+0îŠo_½ÏŒA—AÊ[@´f°Ïw‘Ý)\¥¼§`ŠW)ûs×pïRewoŸ|ë¶Ìƒ¯œãQxž¯NZV½«ÑñæD™=Ée„ÍLO,ÿÇm8tvS?%·À¥ì,ÊÔõíZ¶®
ÑÍëº,¯cõÛÜöã­×ÁŸ¦€ØüßøùÏïŽÀwÃÄ¢I륪ƒó~Wv.Ùþ~oÊú­Eí¼Èío“GWíÞ»]ïN0ßÂ9óN€ÛKÖÜ
àÂÜÿŹòmº–”KÝZ[dí,åR.	eô›ø¢"
130
飙³•œg·Ôd-£’°Kÿùvô<4âÂÁn´}…E§È¥ìiþº—í_Pâdæ:
131
* –øÞuAÿ«3@­Új¨ŸnD×¥¼ {6k‚)·/ýò0¢µ€-_)b" iæªùà³\säjùF"!(•*XŽ[Ržz¶·,”Ëäµ}Jô…a8’þô´ïòônj’리§¦ ÊðWU+!	Ü1`ð] ªÑY߆ð‹Ã¨®¾ŸLB1$¯+“Â/eÅ Ô.üj?ÜÃÅÛèþÅ¢×/¶|àV*êTۗ¸.ÑZÁ>_)æTBE¦#æ|ðÙÛHkŸÍ-¼C^ˆ1¦#¦… g9néˆ	bL„wÈÍmÚmi?°#ð›vÓ|O
132
Ùqf²6§úYk蹕"â¤5O%ús-µ
133
8¾_4QªžlIZ4øîÜihAÏ%½“
,e?™8ïÎ$ýþÚeCb@–e«=w–Œâ¾ÓÅÖÄ)mïCö}É_\¢w“û{Ó±5(qæFòö£ß/¿&žh-ãhg	Z¼±L-ÚÅ-ÞtåÖn‹XŽÏÀüÌUчñ·éˆ	þá…ÓSÒã™fº6qýMš´Íp^õ!ü0þÞD'ƒpŸµ£é}ƒo§ïT̟Z1`jëfbˆŽûÑö«ÿ˜˜XÅ|ъÓQ¸oçö7
134
ûávì»;Ýf¡z¥ê/Úà«£”ýdrÑxwB@ÞìG³Õî‹‰>gó§xM-pߊ—	ÝÀ!“ÖOMe¬ÛX>ô"*gàÿ҅æ_]”´ÃÅNø_×~û-)îF´–±Ïw‘Ý{—®Š÷ñ.+™bY[Šeg
135
­Rِ«Ï×t̜4ÕbsbàNôaÞ!ïB¹ltoöcx›=ç{à°E­†ƒ­ðûÌiûLÓQ4XñÃ'@Û[fœ@¡¬…éÍ+è>¨£b»·/
136
hÿ­í?F l®…éx/<'3÷yöº-К\˜øÊ*i?™÷ìGû‰f´EDÔ64¢óßoøh`”¢Á†ÛNm¿nFûxÊmX>†­!1bºã«ëhk=ú³m+¨ôhu
ã´¹)ëþ¥£€å-Nߝ„ ¬Eë»FÀö‚¤ú­”ÿÝöØp¬Á‡…1x²2ëJóœç]Ð5j ¯½±r5¤²1«ì‚ãC¬'-ÙÏqžwåT~^±æv&"ÊG®Ç®æó3À¦jˆßó²åKÅ!÷ý|Õ
j†lŽªª²æ
ˆäÁÑÎTewï:Ä`%Z=8ڙŠ‚Ÿ""é8ڙŠ‚Ÿ""éØò¥¢àg€ˆH:¶|©(ø "’®¬G;o¨‹ÏŠóxBÚär›Áñ§Q|A("B T* kTÁvªº­%mGêó,åë!÷hg"¢rÆÑÎ+¤ÿ}Ž~6¹lyäAŸ0ðE¼­°l“À«G;IÇ>ßþλ¼Æ“ûñƒ¯ÿü»
Ç^Ãmç~¨1í/K›œäñ„mÕ¶îçñ3@D$ݚkù†nŒÂòþnŒ‹q匋ۗ³“!´ÿΏ;ˆ4;Uè~o?ôÊD©ùS¸Ó_Ñþ;?¼ßG B@ã>5úþ G}†{'xߏßQGýŠžÓ‹&Ÿ¯ØÝ-nÿ ýmÝo6.ÛßÄ5hî
137
 Ô;ÕsRžN݅åìFÆE(¶)Ñ}¦´7#g˗ˆHº²îó]jf|u–DkRŒŠøÓ
4)ªá?57ïí£ê9€É…ÛŠ¹D“>ŒÛ±@·)y›õ†D•½ñhŠ(H?é¾ëA|ü®S©[ƒ•Û´]K½ný…Û/„#©×Ÿùя:ËÈÂï‘#h3K›Ô~¥°Ï—ˆHº55ÚÙýz<ÔÇöcj̆‰þxË2ðYâvlž×½˜ŒÊ]ümô5üs´¶] FÑòzpùFwjð÷¯áñß_ß߮Dî,/·HàQü_ƒ"÷þ\Å®FLŒ¾†þµƒçROŸèz=Pî›+;ڊŽ}¥½ájù•ƒ5Õò흌·¯¿­Eµ Q‡Çº¤2=wâe.œkD½b#€è:g€C;€È?€äÀ»ði#´›â!ÚüŠxÿb–[&ˆ@ÒéîùÓNj-íËíüHÕ\½tÛSo×9÷<=é ÚÑý‘=ÏHª×J`˗֣ÀÝQï¥øÒNeG½C
MCn·-ĚêóË¤Œý±¹2͋Z¥s§wÅè²òúM‹â³Bڟ77Þè,Ì9¶~Êϟ2O:E¾I•²¬\ØçKëÍ|ðZOZK]šã<ïÌûýpžw€l¼¦Z¾µB<€GE@›&€5B<€£³<«» XV>Ÿ,Ûܸ+¢ç|æ·¡¸¸•›ªÕޑùç9øhžàG¡<jZ<lùÒz¼„õ¸³¢´3a´²ÄGs§0+ñìäb¦—ZàþÜ#[ø®©>_ûÖxâ¶}Ä,€ÐˆêØðLÿB[Ã\™×FŠÎb6:ƒ3¯ÅoÀ^»O_”z~?uül–óAŒEæÚ„â,ƾ¡ûOAÛ·o›{¯ûžCçëނ¶Y¨Õò ’Ïö¬>åòž¬©–¯é#
Ú
#|æÅŸ%ÂHs,ªÆôP꼈Ü	 NH¬,(ÐÿAqNÝV>­ÇõS38ôñ$.žõââÙÔåöٟ×öM5®¿ÈÍÔiçU”vÀ[¾DDÒ­©>ßÊí:L|˜Ï02.BØ,Àðb#®œ®^(³q³c^ö÷â×ùF! q
138
½ïí_v™Q!ZÞlÁÔó!8?Âû]¡ˆˆ(€Ú­Jè÷«`~I}ž³[UÖj1ö¿sWü:_å6%:ÏÐþo¥»Üˆ}¾´~ñ´ój .º$´Þ“²nù¦šõIõ¼þçu)J'TnSÁuQWŽÛδ<•ê§Uè~Z…n	e3m7åóü¹þ¯’û&¬%œ‹-_ZŸD –½ÉaÑ×ÿ<ÞQæ÷qMõùRéð3ú¦m‡›QWW‡ª-5¨{J‹æÃíp
%_’RUUS¢ÒJªÛÛÇåьe—hÞ[œ=O,ú=ÁÏT_†ä=wǹ©(øˆ‹Þu é½Ý‹Ñ±	Lÿc
139
cFÇ+ðþ¦G?KðôôT	kJE‘â@¹?‚ÐÙ6„Ò…@,„æŽÜ¸_ü/¬ÿägªl¬©>_*öùÆ9O8áùvšEãßE%tÌÐþk%jžiŽ—®‚Tt©NWZßV¡íjƒG–â]µ£ú•³ˆ~üBÑNuÊ}ÊtUZôäõz”ãig¶zˆŸ8פˆ`$õ`a³ÓS‰à]|Ú¹ªª&åO¶3iáo\hÖiQµ¥õÏ5Ã9´üúnžÎ.=ÕÁ^„ÞO}-OWgß\~Ê9|Ӆæ½ZTÕÔ ^—ú½
ßêG‹>^¦î™&t.š:ª¶Ôdü=Õòª-5}éDÓÜçªî¹f8oÍ ø…MÏÕ£jK
ª¶Ô¡çëpÖçMÒ±åKEÁ–oœÇaBóÞfÌ~r–ÒûôR‚öŸ5#r$¾Ñqž}م.w?÷¨º;€£Æ&À7ë6!ã¶h%¥ø²UQîm~8ÌÀº5qUƒøÀŸÒ†›Ä¤uãïm?º.]Ààžz„îzqôpðÕmX·UέۏÝ/»Ñ{­ž%‚·`~ùPŠ:,­Oº‘¿‰åM]\¹än›¾ÏÚpèðn8¶ëá¹6Mm%BC½xÖ¼ÿ(—Q•‰çVµ¥.m©éLÈQ™”ŠÚòå¿ëû_4Çz1Üӈž{5õ:´½Ñ	×åønÂGú,dÑ;NœÛÜ	ãÖD¨zZ0¸<°ìS€j§×Ý8Z›´…
140
[ò3·LÿžÎ·F’ó½å‚ñcR9ÄÏ	'Ÿôò§ j0àú%'¼eN8`¸tƀPï1cй?¹K듪~K—°ºÏB·­ÀFè_ébQt»» ÙZ	ÄÕóv,Œì^¥?I_1-ŸžJ°ÓSéחAqZ¾!ûÜ¿à¿ëø_̲íêcݘ8bCàÖFƒ!oyàøÍ
DDÀôÉmô½”e2—G£°üð\K¾É‡s<
141
ÏóÕI˪wu :ÞÀ\ägA…Rl³Cý½á˜?>ml,û÷ÕkX>G¼s<
142
Ïþ%ïíN¢ãfÌ¿·ÎûQ\iXRf¿
À
ʲuñöñ}˜6ç7AÉd˜RrzjU5uI¿ç²þJ(JøÑ•Ðì3@³¬èuÎ 0ԃæ7:Ñ÷R†E؍=èþ÷å­ÙIx6M•H–v÷ñJ´†ç`5B_ÚQy¼+e¹IxöÉô§G (ª¥Ù	õ¹Ô6-ÅZJ‚4ïÉ|§k	Ëm-½äD%W¿¥ý?M%vãÿíg×÷v´ ú½+P§˜-TYNMAÅ¿ÚU%ÕÈÚùeªW:0¢wB|±Ž® Îúê“ÊÏÿ_Yþ}"åUæË¨ øhIÇÂËê°´>Ëê›ÉºN.ËV£tõœúibÕ<‡¢ôùQœ­AÎÏS÷íŠÑ›i×
Ó
·¢¶©o]i­U çVòˆSq҅š§ìùW˜VÖ&l›¼èï‡Wiƒ6Ͷ–Zz¾[òÞ>p¡N›xo­O//3s7õˆêLÄîœ×)…†jҎL¢IDAT9^jDDqæK½w´ÀqهPd&>ãÑßôì·Ãz±#åzâC?z:\9~jTó§V˜Zຄ¢ã~´ýªÆ?–nZQâ3#-þI^f|O‡3/÷Àô>m9ÓG&¼jFÿw£c³˜÷¡Ýè€ñ÷օ2†sð¿/ƒØ,Bß{pèå%ûKÞ·Àñu(þ{lÁý0]×ÉmÙjúÉôžäºþÊã	,¢"”øý
143
tw9Ñò~“‘(…êzXÎ
ô§:åzcÜ÷£p¿¿ü±ùK‡
Vüð	Ðö–§Ç#P(kazó
144
º$o³ªª†—­"Õ»º gй}ùýÂçU>mÅí?nDû;m8=…BYãÉ>t?Ÿ¸’@PpÛ-¢ý¶ãôÝe-Zß¾‚`ÇÑ´Û½íz
»-Mp@…€Ú§5°žó`äpSŸ!åƒáKTdÂVº?Ñe½¡Æâ€ìøv©ÛÄÉT/Z1ü¢Uòvie‰À²Ó•S[²LÀð_.d-§z¾ƒÏ·&Z²NåÓFô$w]tIlgé6«÷[11±üóbžH¿N.ËV“ù¶kª÷DÒú2?7†/Ñ*mV*ê*µŠÃhÝ)ø½à¥FDëÕ¨PsáY&_ˆ¾DDyWÍ¥+”Pï	G;ђçécöù•¹g¦”’Âsõ¿'_"¢<¨w¨á¾êÁþŸ§¿6›ä~ß­o|ç‡z‡:{Á"aøåAÓ¿eäïüYJ’œò}?Ô;Ô奄DDyÒ4he=`ÓÚÁWDDD2cøÉŒáKDD$3†/‘̾DDD2ãhg"¢<îŽ"x/XêjPðR#"¢20¼Ö“™oñHåÁyÞ	²0׈(Á{AX[1+FK]*ӑ¸¯zd_öùåi6{*¼±Q¹ÚG_m/mU(gžkÌÎä7t¡¾DDEâ¹æ)u¨Lð´3Ñ
145
ˆÞ÷¡Ój†¶¾UU5¨«×áèÝ<Ì}[UU5ů`*±0šž”i_D«ŒÜ7!døYð²õ¿êAå¿ÅôôÆü´îڈm|Wá½Fca؍m<*uEʌÌý„´‚d~/¾DE$>ô¢©#€ÁÑa؎èQ½YŠjèØà9% í°«ÄµLº5€]´\)uUʒ‹ÿPyJ¼òŸcø‘ÿõNhÞ½"õãšS}°¾’|ÃîАÍ:-ª¶Ô þ¹f8‡B÷‘­|UU
|ç;¡}ª.^fowÆí=kì„þ˜¶W¦-#Û©ï²$Bþ“–T<¥yÿ8àŠ¨ˆœw"°žS¥/ ¨`;–x<z߉ݖ~ô^ó`p—
146
¡;8z¸	øêXŸ^†RË·]áùva¾…Œu¾î…~[æ2ÓÓS'¢Ü°åKTD#Q@Ÿ¦Õ›J«†K˜ö¨€
147
@µÇˆë—pœpTÞêî†F)Šjèw¥oÑȼDëû|‰ÊXŽç’\¢èØS´¬z
ÑñÔýÂRË[”TYÄæ®óeŸoù*ÑûÇð%*"ý&¾¨ôþ£IP-ÍIAÄ"•W°C‰hUcøÑkû”pež1Çwy`áÿµZšÕbjS®›ky"’†×ù•1ív~ӎ`š¿äðg&k~·lU çNrX‡ïô@±Õœrý\ËÓÊã¥FåmáýcŸ/Qù6qýMš´Íp^õ!<7¡Ft2÷Y;šÞ1øvâ®)æO-ðšZà¾b@èΙ|°~jJ¹ý\ˑTò¶}Ù3DTdº7û1¼Í…žó=p؂ˆŠ€¢V
ÃÁVø}æ¤þXEƒ
·Ú~݌öñ(”Û4°|2[Cêʹ–/–ªª^n”BüpÍ{•·Ò¼_¢ ~т+/Z$•U´bø`ú²/
½\Ëç"ݺÞ4xº™òÄð%Z§¤ÌZÅЕ`.€yG£2[ò¯L¾D냵ý„áÐX	ëA冮ˆˆˆdƖ/QÔ;Ôp_õÀð¼¾ÔU¡"ð~íƒz‡:{Á"aøåAÓ¿dÌûµ¯Ä5¡bPïP/¼§r`øåIÓ •õ€Mkû|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆÑÎDDy
148
ÜEð^°ÔÕ "à¥FDDe`>x­'Óßä‚ʇó¼d`†/Q‚÷‚°·bVŒ–º*T¦#-p_õȾìó%"Êï仆ð®FDDåB\8h}µ½´U¡œy®y0;.ɾ¾DDE¢Þ.ßÄüTÞxڙhDïûÐi5C[_ªªÔÕëpônæ¾-)7½/„ïãNì~f®žÏ4Áþ±wE÷G´‰Ù‹Ã—¨È‚—í¨ÿU*÷X0øí(¦§§0æ÷ u×F´h›à{(÷Ÿyzá/ÛÑ~èÆôôn_ë@äOíhù˜—ÏH"s?!­ öù•/ñ¡MþuEb¹ ¨†þˆ
ž>´va·:.O9cóÂó×	¨…øïÕÛõ¸àíEÍsvàÔ`i+W&DpYK¼òŸc˗¨ˆü¯wBóà]LsªÖW’ûCCN4ë´¨ÚRƒúçšá
149
eÜG¶òUU5ðï„ö©ºx™½Ýi·uáï‰à'(À£À²mR:"ä?iIÅSš÷-_¢"rމÀzN•¾€ ‚íXâñè}'v[úÑ{̓Á]*„îàèá&à«`}ºrÙêRË·]áùva¾…eÛÉ(ꃰ٘´hzz*·mQFlùÑHЧiõ¦Òßê„á’¦=* Pí1âú%'ܕ·º»¡Q
150
€¢ú]ËC<“àgèßµå´Qٓ¹û€áKTL9žKr=ˆ¢cOuÒ²ê=6DÇ]•·(slí΋úÑöWŽdh½SBlî:_öû–¯½_¢"Òoà‹Jï?šÕҜT@,RPyE^J"즋¸r­^¢•Æð%*¢×ö)áÊ<cŽïòÀÂÿk ´4«Å Ô¦\7×ò¹pYÍНë[îDë¯ó%*cÚìü¦Á4Éá!;ÎLÖ.ünÙª@ϝä°ßéb«9åú¹–—B|8
151
»±•§.ÀXËä͕ãåFåláýcŸ/Qù6qýMš´Íp^õ!<7¡Ft2÷Y;šÞ1øvâ®)æO-ðšZà¾b@èΙ|°~jJ¹ý\Ëg½ã‚noŒçúaܞÛÀ,¢µEÞ¶//5"*2ݛýÞæBÏù8lADE@Q«†á`+ü>sR¬¢Á†ÛNm¿nFûxÊmX>†­!uæZ>›–Ãg0ùx¡¾nÙc‹//ªªªáåF)Ä×¼·Qy+ÍûÇð%Zê-¸ò¢ERYÕA+†¦ŸñjièåZ>“៤•eð¦ÁÓ͔'†/Ñ:%eÖ*†®sì¹æ)m=(?±%ÿʄáK´N1X‹!ÑO•°Tn8àŠˆˆHflùåA½C
÷UÏëK]*ï×>¨w¨³,†/Q4
ñKƼ_ûJ\*õõÂ{*†/Qž4
ZYØ´v°Ï—ˆˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’×JJ£QÃyÞUêjIæ<ï‚FSØT”œáŠJJ·K`"*záØ•/†/•œn—®à2Q9áig"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™U²²F£†$€Æ]úbՇʘãC4u©«AD´ê¾º]:ñƒ.‘F£^øLQz…/`p‰ˆˆ¤cŸ/‘̾DDD2cøÉŒáKDD$3†/‘Ì
152
íÜöj{±êADDTV.|җ÷º…¯çš§Õ‰ˆˆÊÖÌL8ïu
153
ßBvLDD´^±Ï—ˆˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHfßÕ(pwÁ{ÁbÔeÕSïPCÓ -u5ˆ$‹Fg0–º«T( PTf,³žŽERH9^ñ5ËO1²  ðã¬'­U¢\8Ï;€Lea>xƒÁ ÂÊ÷²Àê­ÕP«Õ6€×Û±HŠlÇ+¾fù+F¾Á{AX[1+–ÿ7k)LGZà¾êaøRYX¼öS¶RW'o½;jµ:mø®·c‘ÙŽW|ÍòWŒ,(ø´óº+uˆr~†õ”
³±ò=ÀZŽ™áºÜ¿Ðú%‰x¼Z9ExmßÙÂë@D+J\b‹rÇ׬tŠÐò]ØD´ÚñX”;¾f¥ÂKˆÖº2?¸Še^¢T¾9K]¢u‰'GóÁãÕÊ)Æk[xøæù­ô‰ªš‚/´|^ø
œÊ”Ëï'øM?šPód
ªêê±ûWí¸øMhY¹'ªjÒoGãÌoºó«ƒdEøûŒÞïÄU5°ßŸ)|c¬šãU¯Yô¾v«õõõx¢ª5õ:z£‡…mw¥üú¯†W@þ§…²­—ëvWþô¿S¹Êý»zà|;šÏ‡Ñõû.ôý\
"‚ßûà:g†÷^/®œZz™EŠ}ˆ!ôœõÂú®ŠŠ•o‹zp½6£Ã÷	7º¿]Ùë_WËñ*ßz¯ÚÑôN¶ž¾«CµB€
Ã?äF³¶	þ2ýf!¿Ë °×¿ð,(Ò¥FùþQe[/×íòDQ1ˆšÏ†1<æzáø¹š}-èÛ×W«îÈ Lʍé7òh=簝±B¾Cpǀ¨=Ԙ:֋æ®zx£&ž_ÁVËñ*÷zˆ½hê`ptEb;‚¢ú#Vx"^´˜\˜øÊRԚWi_ÿ²éó
ßt¡y¯U5u¨×µÀ9J[¶jKB_:ѤբjKê÷¶ÀùuùÎðC$7ÿ[4þ¾wQð&3¿×‚î·FÒo :
154
ǟ&ÑqÚ\xðÊÔÝã¿êS€Þ7Õèì,+#娒ËñG|èAÍ3Ý©ëó†ÍWÓçJÉÿënhÎô-
155
Þdš“}°S%-ó~܍¦çâÇðª'µh2و&ZU[ê¾ãA‹Ašš:Tm©CՖzô,yíÂ7ûÑòËxí/Íp~1ºlÿ¹äE©”EøFÇ]xöå~wÓ?M`ð#ÜÖf8ÇÓ÷Ëì~ÕcÏLOM`ðܯ6Á5ÉÓÆ´Åæ.'ÉáÇy'
156
Ë~eÚDžMDïô'–!ñ˜øÀf½¶“†œ÷›òG±´_ ïx=@ýJ"_¶#œbÿRŽ-R?Âæ˜à†ÿÑÒGfqúËzª–­³8ïD`=¨L_@PÁvL¿ðkðc3Ú¿Ñ{mÓS˜úë ¬š´üêbÒjM¯
ÀüÛ>Lü4éLà‡ÿÕ
157
‡¹iáñx¸`x³?MÀwцàÇmh»ZR&·¼(…’†oü›MêŸÅ<'œ0|Ò˾z Pí4àºÛÇ	oÚm7þÑ끹ò»Zpý¢=ÊKÂW´NŒ<¡Û”ᔫ „øhyËWœôÁñ…ëΎ~Q>g›ÂCvˆ;»-}¡};…¤ƒú<)ǖ\Ž?Ö3ô|™¼Ÿè÷gÞ֑ö̃$+x¼‰úNÉÛ?A¯»šÚøô ‚¢ÆÓ}ˆŽ»’ÊY.À¸§Â\‡¨ê€‹O{N8apõÃr@¡PlÕ¢÷Z7º:“Ëä˜9[-®ò­ÈôÔDÚǪjê¶ëÂ³¿:i?Õ
6DÇÍ@̜²TÉåwÚýÑÄZò«,ÑzÃÂ0S™Å¢?zÑûµ€îSz@¼»¶
Ñ¡sÛ<E=#°ô%­oøÀŒ¶_vÇú“ÊJ9¶H:þÌ=®:ЍÞ¼d_xÈó–Æ:äùŸÏ>*r[oðï@lþ¡ˆDg¼€ï;‹&mǺucêí.΂Æä,L
158
ʋR(üÏ"¶òÖ“"ðì“uÙ.¢YúQPâdÑêD´–5nüý¦4¢#€B“´¨ûk½§æN5
159
õè?´|8ŠáӅ݈Dò¨Ô<EâÜÐý=)·ßAoCâ†RŽ-9º•ˆöøzâÎL*0ѐùŠE‘çk¦ß$À•< -z·úÃg€Z
´j5ÔO7¢ë˜
/èw'•ËÖПU–BùäE)”ō”ÀàÄT9Ô6CryqØÄ‰Ùi}Êõ²
160
Ë.%C!èÒô9†¾tA¹Ó’´Ýî“ú¤ßÕ'¯Úføû¡M⫀÷×.>¹+/V/{,ü¥»_w£wÑeGRŽ-¹ôïÐòÙ(†Oi8Ê»e!ž»×ö)Ðóu†—Ò÷Iû®z ?oéÛ_îÁ9Œî畏åÞ-Q+¡,œO^”BY¸²Ö*Ðó]ò%NºPóŒ=̀ãû%#ä¾;åήÛ[-å"ŸÏ­îí.àÑÚº°½×˜y#•¸Ð£Eû[…öµ­à_ž8ûÝj\H¼PýbT&KI9¶äzüQlïηÁEˇAØßÖ¤-+ÕJ¯´¿ëD ÃŽ`š„¿îęÉDÐzаïOêè]gÎûµÔ*฻$´£>T=•8ŸO^äjuÌp%ó9,f¸nŒAŒÑq?ڌéïQê~¹
߇€¼ÕCÖQôžÛ_XE8àŠÊQˆO
161
 ýGØlÀõ7UhÖ· ÿk?DqÃýº-úCP¼³rñvSï£úųÐ~oÇÀٜ됼í•<ê·{3´27¢ï´Ý¿M.“rlÉçøÓ{¤G_nƒ¨0´¹×¯àñJØlÀõS
162
4éZàü܇ðܗ“èäÜv¢é}ƒ‹º¬ÛX>ö"*gàr¡ù°;çýšÏY1ðrÜwBsû…ÝdÇþÓ½‹Êäž9[-®Vz†+a»·ÿ´¿Ó†Óã(”µ0ž¼€îýÕIÛXüÿ'ÕènmF[PïÔÃ60ý¦Îj¶/­Úãg1¼}Ž{ÐóF"¨žÖ¡õ÷×aÞ/ý˜®‹­Øý²FïÊÎäz,šEûŸfqá/ªŒë©ŽõA<ÛŒà£øõ¤RŽ-RÊ,ݧú¤
Ñómhü½µH³_I;^å»/íIk]p|æ€ã7ADE@±U
ÃA†½ñë»ç·m¸‚ö×ΠþÃvˆÔO7Âäü3ÎX^Èøš,].l³`Ø	ØkFûxÂæZ_éFÿ+ª‚ò"w…gAÁá¯BîßN§~ú[Æõ–>®:ЊÁ­KJͦ-o8Õé®´å‰Ö•<4ªF#úY·75ñ·´û¨ÜnÅØ¿ç_©ëås,̾N…£c·ÊI9¶d+“êø'>6©Ñ÷’2{Š$ßã÷<õ.0¥xdÉ6jô¹¯/+eYô:¤Ë„eY°ßÏþ¥ûL^/×¼(…’tI×<ù3Éeã/å/·oé5uÒÿ>¹à-S«áX4#źO\ÄkŸ£z•Êå5xO§—å¾
163
ߢիlôLE»ŸùÄ
164
'ûÐ÷ó4ó5®”2}Íւ’N²±R2+È*{žDëAN'WøoTʱ%×ãÏØØ¢0+fý%_]Ä}®«cÀ!­j19n_·‚$םǢÜñ5+•²¸Ôˆˆˆh-Yå]ûDTˆê­Õp]î‡á€¡ÔUɛwȋꭩ'Á *W…¯z‡î«ž×g/¼x¿öA½ƒSTRy¨T( VÇ?¯Þ¡"ÞÑEfÕ[«¡V«Q©H?i½‹¤Èv¼âk–¿bdAAá«iÐ.Td=PïP/<g¢ÕN¡ˆO̯V«B¸\U*Ï'•õv,’"ÛñНYþŠ‘ŸvÖ4hHD«”BQ™1´Ö‹rÇ׬t8àŠˆˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™1|‰ˆˆdÆð%""’׈ˆHf_"""™%O/¹©ÍçÃ%ª
165
ѵ)ùÎ\ËçvÞÄ[w­¤…ðJY""¢ucÃ×t~|\ꊭcnۆÿ/j„ÍÆÜIEND®B`‚
(-)tdegraphics/kiconedit/AUTHORS (-10 lines)
Lines 1-10 Link Here
1
Copyright 1998 by Thomas Tanghus <tanghus@kde.org>
2
Copyright 2000 by John Califf <jcaliff@compuzone.net>
3
4
Original Author:  
5
    Thomas Tanghus
6
    
7
Current Maintainers:
8
    John Califf <jcaliff@compuzone.net>
9
    Laurent Montel <lmontel@mandrakesoft.com>
10
(-)tdegraphics/kiconedit/CMakeLists.txt (-42 lines)
Lines 1-42 Link Here
1
#################################################
2
#
3
#  (C) 2010-2011 Calvin Morrison
4
#  mutantturkey@gmail.com
5
#
6
#  Improvements and feedback are welcome
7
#
8
#  This file is released under GPL >= 2
9
#
10
#################################################
11
12
add_subdirectory ( pics )
13
14
include_directories(
15
  ${CMAKE_CURRENT_BINARY_DIR}
16
  ${CMAKE_BINARY_DIR}
17
  ${TDE_INCLUDE_DIR}
18
  ${TQT_INCLUDE_DIRS}
19
)
20
21
link_directories(
22
  ${TQT_LIBRARY_DIRS}
23
)
24
25
26
#### other data #################################
27
28
install( FILES kiconedit.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
29
install( FILES kiconeditui.rc DESTINATION ${DATA_INSTALL_DIR}/kiconedit )
30
31
32
#### kiconedit (executable) #####################
33
34
tde_add_executable( kiconedit AUTOMOC
35
  SOURCES
36
    utils.cpp main.cpp kiconedit.cpp kicongrid.cpp
37
    kiconcolors.cpp kcolorgrid.cpp palettetoolbar.cpp
38
    kicon.cpp kresize.cpp knew.cpp properties.cpp
39
    kiconeditslots.cpp kiconconfig.cpp
40
  LINK tdeio-shared tdeprint-shared
41
  DESTINATION ${BIN_INSTALL_DIR}
42
)
(-)tdegraphics/kiconedit/Makefile.am (-26 lines)
Lines 1-26 Link Here
1
INCLUDES = $(all_includes)
2
SUBDIRS = pics
3
4
bin_PROGRAMS = kiconedit
5
6
kiconedit_SOURCES = utils.cpp main.cpp kiconedit.cpp kicongrid.cpp \
7
    kiconcolors.cpp kcolorgrid.cpp palettetoolbar.cpp\
8
    kicon.cpp kresize.cpp knew.cpp properties.cpp \
9
    kiconeditslots.cpp kiconconfig.cpp 
10
11
kiconedit_METASOURCES = AUTO
12
13
# the library search path. 
14
kiconedit_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor
15
kiconedit_LDADD = $(LIB_TDEFILE) -ltdeprint
16
17
DISTCLEANFILES = *~ .deps/* .libs/*
18
19
rcdir = $(kde_datadir)/kiconedit
20
rc_DATA = kiconeditui.rc
21
22
xdg_apps_DATA = kiconedit.desktop
23
24
messages: rc.cpp
25
	$(XGETTEXT) rc.cpp $(kiconedit_SOURCES) -o $(podir)/kiconedit.pot
26
(-)tdegraphics/kiconedit/NEWS (-68 lines)
Lines 1-68 Link Here
1
KDE Icon Editor
2
_______________
3
4
------------------------------------------------------------------------------
5
   News and fixes in version 0.4.0:
6
------------------------------------------------------------------------------
7
 - Enabled loading other image types than XPM.
8
 - Repainting large pictures is very much faster now.
9
 - Added drop site indication when using XDND.
10
 - Added QWhatsThis help (this is great!).
11
 - Started playing with XDND. The toolbar now has a drag source and the grid
12
   supports both XDND and KDND.
13
 - Added rulers (can be toggled from the configuration dialog).
14
 - Circular selection.
15
 - Configuration dialog:
16
   - Shortcut keys.
17
   - Appearance.
18
   - Templates.
19
   - Miscellaneous (paste mode, show rulers etc.).
20
21
------------------------------------------------------------------------------
22
   News and fixes in version 0.3.2:
23
------------------------------------------------------------------------------
24
 - German translations. (thanks to Gregor Zumstein <zumste98@cui.unige.ch>)
25
 - Solaris didn't like TRANSPARENT definition. (thanks to Alastair Burt <burt@dfki.de>)
26
 - Crashed on empty string in strlen. (thanks to Alastair Burt <burt@dfki.de>)
27
 - Russian translations (thanks to Andy Pershin <apa@penza.com.ru>)
28
29
------------------------------------------------------------------------------
30
   News and fixes in version 0.3.1:
31
------------------------------------------------------------------------------
32
 - Icon templates installed in the wrong directory.
33
 - Templates didn't load.
34
35
------------------------------------------------------------------------------
36
   News and fixes in version 0.3:
37
------------------------------------------------------------------------------
38
 - Complete rewrite of the drawing grid. Should now be faster and more flexible.
39
 - New class TDEIcon for file manipulation.
40
 - The "Line" tool can now draw 45 dgr. angles.
41
 - Smooth resizing of icons if linked with QT >= 1.40.
42
 - Improved loading/saving images with transparent pixels.
43
 - Loading and saving should now work on non-local files.
44
45
------------------------------------------------------------------------------
46
   News and fixes in version 0.2:
47
------------------------------------------------------------------------------
48
 - Saves restore file when closed by session management or by crash.
49
 - Fixed multi instance handling.
50
 - Added toolbar button for creating new instances.
51
 - Added danish translation.
52
 - Added statusbar field for messages.
53
 - Saves window size.
54
 - Couldn't toggle grid from the menu.
55
 - Added "Toggle toolbar", "Toggle drawing tools" and "Toggle statusbar" to the
56
   "View" menu. This as well as the *Bar positions is saved between sessions.
57
 - Grid state and zoom factor saved between sessions.
58
 - The clipboard is checked with short intervals to check if there's a pixmap.
59
 - The cursor hotspots are now correct.
60
 - Cursor position is shown in the statusbar.
61
 - Removed a lot of memory leaks and made the general memory footprint some smaller.
62
 - New tools: "Find pixel", "Flood Fill", "Filled Circle" and "Filled Ellipse".
63
 - Clipboard now supports selection of regions and inserting into existing image.
64
 - Speeded up loading of pixmaps by some thousand percents ;-)
65
 - Preview has scrollbars if it doesn't fit.
66
 
67
68
(-)tdegraphics/kiconedit/kcolorgrid.cpp (-335 lines)
Lines 1-335 Link Here
1
/*
2
    kiconedit - a small graphics drawing program for creating KDE icons
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#include <tqpainter.h>
22
23
#include <kdebug.h>
24
25
#include "kcolorgrid.h"
26
27
void KColorArray::remove(int idx)
28
{
29
  int oldsize = size();
30
  if(idx >= (int)size())
31
  {
32
    kdWarning() << "KColorArray::remove: Index " << idx << " out of range" << endl;
33
    return;
34
  }
35
  KColorArray tmp(*this);
36
  tmp.detach();
37
  resize(size()-1);
38
  for(int i = idx; i < oldsize-1; i++)
39
    at(i) = tmp[i+1];
40
  //kdDebug(4640) << "KColorArray::remove() " << at(idx) << "\t-\tsize: " << size() << endl;
41
}
42
43
void KColorArray::append(uint c)
44
{
45
  resize(size()+1);
46
  at(size()-1) = c;
47
  //kdDebug(4640) << "KColorArray::append() " << c << "\t-\tsize: " << size() << endl;
48
}
49
50
uint KColorArray::closestMatch(uint color)
51
{
52
  //kdDebug(4640) << "KColorArray: " << c << endl;
53
  uint c = color & ~OPAQUE_MASK, d = 0xffffff, t;
54
  //kdDebug(4640) << "KColorArray: " << c << endl;
55
  //kdDebug(4640) << "KColorArray: " << c|OPAQUE_MASK << endl;
56
  uint cb = c;
57
  for(uint i = 0; i < size(); i++)
58
  {
59
    if (at(i) > cb)
60
      t = at(i) - cb;
61
    else
62
      t = cb - at(i);
63
    if( t < d )
64
    {
65
      d = t;
66
      c = at(i);
67
    }
68
  }
69
  return c|OPAQUE_MASK;
70
}
71
72
KColorGrid::KColorGrid(TQWidget *parent, const char *name, int space)
73
 : TQWidget(parent, name, TQt::WResizeNoErase|TQt::WRepaintNoErase)
74
{
75
  //kdDebug(4640) << "KColorGrid - constructor" << endl;
76
  s = space;
77
  rows = cols = totalwidth = totalheight = 0;
78
  setCellSize(10);
79
  setGridState(Plain);
80
  setGrid(true);
81
  numcolors.resize(0);
82
  gridcolors.resize(0);
83
84
  //kdDebug(4640) << "KColorGrid - constructor - done" << endl;
85
}
86
/*
87
void KColorGrid::show()
88
{
89
  //updateScrollBars();
90
  TQWidget::show();
91
}
92
*/
93
void KColorGrid::paintEvent(TQPaintEvent *e)
94
{
95
  //kdDebug(4640) << "KColorGrid::paintEvent" << endl;
96
97
  //updateScrollBars();
98
  //TQWidget::paintEvent(e);
99
100
  const TQRect urect = e->rect();
101
102
  //kdDebug(4640) << "Update rect = ( " << //urect.left() << ", " << urect.top() << ", " << urect.width() << ", " << urect.height() << " )" << endl;
103
104
105
  int firstcol = getX(urect.x())-1;
106
  int firstrow = getY(urect.y())-1;
107
  int lastcol  = getX(urect.right())+1;
108
  int lastrow  = getY(urect.bottom())+1;
109
110
  TQWMatrix matrix;
111
  TQPixmap pm(urect.width(),urect.height());
112
  pm.fill(paletteBackgroundColor());
113
  TQPainter p;
114
  p.begin( &pm );
115
116
  firstrow = (firstrow < 0) ? 0 : firstrow;
117
  firstcol = (firstcol < 0) ? 0 : firstcol;
118
  lastrow = (lastrow >= rows) ? rows : lastrow;
119
  lastcol = (lastcol >= cols) ? cols : lastcol;
120
  //kdDebug(4640) << urect.x() << " x " << urect.y() << "  -  row: " << urect.width() << " x " << urect.height() << endl;
121
  //kdDebug(4640) << "col: " << firstcol << " -> " << lastcol << "  -  row: " << firstrow << " -> " << lastrow << endl;
122
123
/*
124
  if(this->isA("KDrawGrid"))
125
    kdDebug(4640) << "KDrawGrid\n   firstcol: " << firstcol << "\n   lastcol: " << lastcol << "\n   firstrow: " << firstrow << "\n   lastrow: " << lastrow << endl;
126
*/
127
  for(int i = firstrow; i < lastrow; i++)
128
  {
129
    //if(this->isA("KDrawGrid"))
130
    //  kdDebug(4640) << "Updating row " << i << endl;
131
    for(int j = firstcol; j < lastcol; j++)
132
    {
133
      matrix.translate( (j*cellsize)-urect.x(), (i*cellsize)-urect.y() );
134
      p.setWorldMatrix( matrix );
135
      //p.setClipRect(j*cellsize, i*cellsize, cellsize, cellsize);
136
      paintCell(&p, i, j);
137
      //p.setClipping(FALSE);
138
      matrix.reset();
139
      p.setWorldMatrix( matrix );
140
    }
141
    //kapp->processEvents();
142
  }
143
144
  matrix.translate(-urect.x(),-urect.y());
145
  p.setWorldMatrix( matrix );
146
  paintForeground(&p,e);
147
  
148
  p.end();
149
150
  bitBlt(this,urect.topLeft(),&pm,TQRect(0,0,pm.width(),pm.height()));
151
152
}
153
154
void KColorGrid::paintForeground(TQPainter* , TQPaintEvent* )
155
{
156
}
157
158
/*
159
void KColorGrid::resizeEvent(TQResizeEvent *)
160
{
161
  //kdDebug(4640) << "resize: width:  " << width() << " - total: " << totalwidth << endl;
162
  //kdDebug(4640) << "resize: height: " << height() << " - total: " << totalheight << endl;
163
}
164
*/
165
166
TQSize KColorGrid::sizeHint() const
167
{
168
  return TQSize(totalwidth, totalheight);
169
}
170
171
int KColorGrid::getY( int y )
172
{
173
  if(y > (totalheight-1))
174
    y = totalheight;
175
  if(cellsize == 1)
176
    return y;
177
  return (y/cellsize);
178
}
179
180
int KColorGrid::getX( int x )
181
{
182
  if( x > totalwidth-1)
183
    x = totalwidth;
184
  if(cellsize == 1)
185
    return x;
186
  return (x/cellsize);
187
}
188
189
const TQRect KColorGrid::viewRect()
190
{
191
  //kdDebug(4640) << "viewRect" << endl;
192
  const TQRect r(0, 0, width(), height());
193
  //kdDebug(4640) << "viewRect - " << x << " x " << y << " - " << w << " x " << h << endl;
194
  return r;
195
}
196
197
void KColorGrid::setNumRows(int n)
198
{
199
  //kdDebug(4640) << "setNumRows" << endl;
200
  if(n < 0 || n == rows)
201
    return;
202
203
  rows = n;
204
205
  gridcolors.resize(n*numCols());  
206
  //TQTableView::setNumRows(n);
207
  totalheight = (n * cellsize) + 1;
208
  resize(totalwidth, totalheight);
209
  //kdDebug(4640) << "setNumRows() - gridcolors: " << gridcolors.size() << "  size: " << numCols()*numRows() << endl;
210
}
211
212
void KColorGrid::setNumCols(int n)
213
{
214
  //kdDebug(4640) << "setNumCols" << endl;
215
  if(n < 0)
216
    return;
217
  int on = numCols();
218
  KColorArray gc(gridcolors);
219
  gc.detach();
220
  //kdDebug(4640) << "gc size: " << gc.size() << " numrows: " << numRows() << endl;
221
  gridcolors.resize(n*numRows());
222
  cols = n;
223
224
  totalwidth = (n * cellsize) + 1;
225
  resize(totalwidth, totalheight);
226
  //kdDebug(4640) << "numRows: " << numRows() << endl;
227
  //kdDebug(4640) << "gridcolor: " << gridcolors.size() << "  grid: " << numRows()*numCols() << endl;
228
  if(numRows() == 0)
229
    return;
230
231
  for(int i = 0; i < numRows(); i++)
232
  {
233
    for(int j = 0; j < n; j++)
234
    {
235
      //kdDebug(4640) << "row " << i << " , col " << j << endl;
236
      if(j < on ) //If there's something to read here -- i.e. we're within the original grid
237
      {
238
        //kdDebug(4640) << (i*numCols())+j << " " << (i*on)+j << endl;
239
        gridcolors.at((i*numCols())+j) = gc.at((i*on)+j);
240
      }
241
      else //Initialize to something..
242
      {
243
        if (gc.size()) //Have some pixels originally..
244
            gridcolors.at((i*numCols())+j) = gc.at(0);
245
        else 
246
            gridcolors.at((i*numCols())+j) = 0; //Picks something #### Update numcolors?
247
      } 
248
    }
249
  }
250
251
  //kdDebug(4640) << "setNumCols() - gridcolors: " << gridcolors.size() << "  size: " << numCols()*numRows() << endl;
252
}
253
254
void KColorGrid::fill( uint color)
255
{
256
  gridcolors.fill(color);
257
  numcolors.resize(1);
258
  numcolors.at(0) = color;
259
  emit colorschanged(numcolors.size(), numcolors.data());
260
}
261
262
void KColorGrid::setColor( int colNum, uint col, bool update )
263
{
264
  //kdDebug(4640) << "KColorGrid::setColor" << endl;
265
  uint oldcolor = gridcolors[colNum];
266
  gridcolors[colNum] = col;
267
268
  if(!update)
269
    return;
270
271
  //kdDebug(4640) << "KColorGrid::setColor - before adding" << endl;
272
  if(!numcolors.contains(col))
273
  {
274
    //kdDebug(4640) << "KColorGrid::setColor() - adding " << //  col << " - " << tqRed(col) << " " << tqGreen(col) << " " << tqBlue(col) << endl;
275
    numcolors.append(col);
276
    //kdDebug(4640) << "KColorGrid::setColor() - adding done " << numcolors.size()-1 << endl;
277
    //numcolors++;
278
    emit addingcolor(col);
279
  }  
280
281
  //kdDebug(4640) << "KColorGrid::setColor - before removing" << endl;
282
  if(!gridcolors.contains(oldcolor))
283
  {
284
    int idx = numcolors.find(oldcolor);
285
    if(idx != -1)
286
    {
287
      //kdDebug(4640) << "KColorGrid::setColor() - removing " << //  oldcolor << " - " << tqRed(oldcolor) << " " << tqGreen(oldcolor) << " " << tqBlue(oldcolor) << endl;
288
      numcolors.remove(idx);
289
      //kdDebug(4640) << "KColorGrid::setColor() - removing done" << endl;
290
      emit colorschanged(numcolors.size(), numcolors.data());
291
    }
292
    //numcolors--;
293
  }
294
295
  //kdDebug(4640) << "KColorGrid::setColor - before updateCell" << endl;
296
  repaint((colNum%numCols())*cellsize,(colNum/numCols())*cellsize,  cellsize, cellsize);
297
  //updateCell( colNum/numCols(), colNum%numCols(), false );
298
  //kdDebug(4640) << "KColorGrid::setColor - after updateCell" << endl;
299
}
300
301
void KColorGrid::updateCell( int row, int col, bool  )
302
{
303
    //kdDebug(4640) << "updateCell - before repaint" << endl;
304
  TQWMatrix matrix;
305
  TQPainter p;
306
  p.begin( this );
307
  matrix.translate( (col*cellsize), (row*cellsize) );
308
  p.setWorldMatrix( matrix );
309
  paintCell(&p, row, col);
310
  p.end();
311
312
}
313
314
void KColorGrid::updateColors()
315
{
316
  numcolors.resize(0);
317
  for(int i = 0; i < (int)gridcolors.size(); i++)
318
  {
319
    uint col = gridcolors.at(i);
320
    if(!numcolors.contains(col))
321
      numcolors.append(col);
322
  }
323
  emit colorschanged(numcolors.size(), numcolors.data());
324
}
325
326
void KColorGrid::setCellSize( int s )
327
{
328
  cellsize = s;
329
  totalwidth = (numCols() * s) + 1;
330
  totalheight = (numRows() * s) + 1;
331
  resize(totalwidth, totalheight);
332
  if ( isVisible() )
333
    repaint(viewRect(), false);
334
}
335
#include "kcolorgrid.moc"
(-)tdegraphics/kiconedit/kcolorgrid.h (-105 lines)
Lines 1-105 Link Here
1
/*
2
    kiconedit - a small graphics drawing program for creating KDE icons
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#ifndef __KCOLORGRID_H__
22
#define __KCOLORGRID_H__
23
24
#include <tqwidget.h>
25
#include <tqsize.h>
26
#include <tqrect.h>
27
28
#include "utils.h"
29
30
#define KArrayUint TQMemArray<uint>
31
32
class KColorArray : public KArrayUint
33
{
34
public:
35
  void remove(int idx);
36
  void append(uint);
37
  uint closestMatch(uint);
38
};
39
40
class KColorGrid : public TQWidget
41
{
42
private:
43
    Q_OBJECT
44
  
45
public:
46
  KColorGrid( TQWidget * parent = 0, const char *name = 0, int spacing = 0);
47
  virtual ~KColorGrid() {};
48
49
  enum GridState { Plain, Shaded };
50
51
  void setSpacing(int space) { s = space; update(); }
52
  void setGridState(GridState state) { gridstate = state;}
53
  GridState gridState() { return gridstate; }
54
  void setGrid(bool state) { hasgrid = state; }
55
  int spacing() { return s; }
56
  bool hasGrid() { return hasgrid; }
57
  uint numColors() { return numcolors.size(); }
58
  uint colors( uint *c ) { c = numcolors.data(); return numcolors.size(); }
59
  bool contains(uint c) { return numcolors.contains(c); }
60
  uint colorAt(int idx) { return gridcolors.at(idx); }
61
  uint *data() {return numcolors.data(); }
62
  void fill(uint color);
63
  int numCols() { return cols; }
64
  int numRows() { return rows; }
65
66
  virtual void setCellSize( int s );
67
  virtual int cellSize() { return cellsize; }
68
  virtual TQSize sizeHint() const;
69
70
  void setSize(const TQSize s) { setNumRows(s.height()); setNumCols(s.width()); }
71
72
public slots:
73
  //virtual void show();
74
75
signals:
76
  void addingcolor(uint);
77
  void colorschanged(uint, uint*);
78
79
protected:
80
  void updateCell(int row, int col, bool f);
81
  virtual void paintForeground( TQPainter* p, TQPaintEvent* e);
82
  virtual void paintCell( TQPainter *p, int row, int col) = 0;
83
  virtual void paintEvent(TQPaintEvent *);
84
  //virtual void resizeEvent(TQResizeEvent *);
85
  void setColor(int colNum, uint, bool update = true );
86
  void updateColors();
87
  virtual void setNumRows(int);
88
  virtual void setNumCols(int);
89
  virtual int totalWidth() { return totalwidth; }
90
  virtual int totalHeight() { return totalheight; }
91
  int findRow(int y) { return getY(y); }
92
  int getY(int y);
93
  int findCol(int x) { return getX(x); }
94
  int getX(int x);
95
  const TQRect viewRect();
96
97
//private:
98
  int s, cellsize, totalwidth, totalheight;
99
  int rows, cols, ypos, xpos;
100
  GridState gridstate;
101
  bool hasgrid;
102
  KColorArray gridcolors, numcolors;
103
};
104
105
#endif //__KCOLORGRID_H__
(-)tdegraphics/kiconedit/kicon.cpp (-279 lines)
Lines 1-279 Link Here
1
/*
2
    TDE Icon Editor - a small graphics drawing program for the TDE
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#include <stdlib.h>
22
23
#include <tqimage.h>
24
25
#include <tdemessagebox.h>
26
#include <tdefiledialog.h>
27
#include <tdeio/netaccess.h>
28
#include <kimageio.h>
29
#include <kdebug.h>
30
#include <tdelocale.h>
31
32
#include "kicon.h"
33
#include "utils.h"
34
35
TDEIconEditIcon::TDEIconEditIcon(TQObject *parent, const TQImage *img, KURL url) 
36
   : TQObject(parent)
37
{
38
    f = 0;
39
    _lastdir = "/";
40
    //checkUnNamedBackup(img);
41
42
    if(!url.isEmpty())
43
    {
44
        open(img, url);
45
    }
46
}
47
48
49
TDEIconEditIcon::~TDEIconEditIcon()
50
{
51
}
52
53
54
bool TDEIconEditIcon::open(const TQImage *image, KURL url)
55
{
56
    TQImage *img = (TQImage*)image;
57
58
    if(url.isEmpty())
59
        return false;
60
61
    kdDebug(4640) << "TDEIconEditIcon::open " << url.prettyURL() << endl;
62
    
63
    if(!url.isValid()) // try to see if it is a relative filename
64
    {
65
        kdDebug(4640) << "TDEIconEditIcon::open (malformed) " << url.prettyURL() << endl;
66
67
        TQFileInfo fi(url.url());
68
        if(fi.isRelative())
69
            url = "file:" + fi.absFilePath();
70
71
        if(!url.isValid()) // Giving up
72
        {
73
            TQString msg = i18n("The URL: %1 \nseems to be malformed.\n").arg(url.url());
74
            KMessageBox::sorry((TQWidget*)parent(), msg);
75
            return false;
76
        }
77
    }
78
79
    TQString filename;
80
81
    if(url.isLocalFile())
82
    {
83
        filename = url.path();
84
    }
85
    else
86
    {
87
        if(!TDEIO::NetAccess::download( url, filename, (TQWidget*)parent() ))
88
        {
89
            TQString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL());
90
            KMessageBox::error((TQWidget*)parent(), msg);
91
            return false;
92
        }
93
    }
94
95
    bool loadedOk = img->load(filename);
96
97
    if(!url.isLocalFile())
98
    {
99
        TDEIO::NetAccess::removeTempFile( filename );
100
    }
101
102
    if(!loadedOk) 
103
    {
104
          TQString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL());
105
          KMessageBox::error((TQWidget*)parent(), msg);
106
    }
107
    else
108
    {
109
        kdDebug(4640) << "TDEIconEditIcon::open - Image loaded" << endl;
110
        
111
        // _url is saved off for use in saving the image to the same 
112
        // file later - should include full path
113
        if(url.isLocalFile())
114
        {
115
            _url = url.path();
116
        }
117
        else
118
        {
119
            _url = "";
120
        }
121
        
122
        kdDebug(4640) << "TDEIcon: _url: " << _url << endl;
123
        
124
        // this causes updates of preview, color palettes, etc.    
125
        emit loaded(img);
126
        kdDebug(4640) << "loaded(img)" <<  endl;    
127
        
128
        // this is the name that shows up in status bar - 
129
        // should be filename with path
130
        emit newname(url.prettyURL()); 
131
        kdDebug(4640) << "newname(_url) : " << url.prettyURL() << endl;    
132
        
133
        emit addrecent(url.prettyURL());
134
        
135
        kdDebug(4640) << "TDEIconEditIcon::open - done" << endl;
136
    }
137
138
    return loadedOk;
139
}
140
141
142
143
bool TDEIconEditIcon::promptForFile(const TQImage *img)
144
{
145
    kdDebug(4640) << "TDEIconEditIcon::promptForFile(const TQImage *img)" << endl;
146
    /*
147
    TQString filter = i18n("*|All Files (*)\n"
148
                        "*.xpm|XPM (*.xpm)\n"
149
                        "*.png|PNG (*.png)\n"
150
                        "*.gif|GIF files (*.gif)\n"
151
                        "*.jpg|JPEG files (*.jpg)\n"
152
                        "*.ico|Icon files (*.ico)\n");
153
154
  
155
    KURL url = KFileDialog::getOpenURL( TQString(), filter );
156
    */
157
    bool loaded = false;
158
    KURL url = KFileDialog::getImageOpenURL( TQString(), TQT_TQWIDGET(parent()) );
159
160
    if( !url.isEmpty() )
161
    {
162
        loaded = open( img, url );
163
    }
164
165
    return loaded;
166
}
167
168
169
170
bool TDEIconEditIcon::saveAs(const TQImage *image)
171
{
172
    kdDebug(4640) << "TDEIconEditIcon::saveAs" << endl;
173
174
    TQString file;
175
176
    //Get list of file types..
177
    KFileDialog *dialog=new KFileDialog(TQString(), TQString(), TQT_TQWIDGET(parent()), "file dialog", true);
178
    dialog->setCaption( i18n("Save Icon As") );
179
    dialog->setKeepLocation( true );
180
    dialog->setMimeFilter( KImageIO::mimeTypes(KImageIO::Writing), "image/png" );
181
    dialog->setOperationMode( KFileDialog::Saving );
182
183
    if(dialog->exec()==TQDialog::Accepted)
184
    {
185
        file = dialog->selectedFile();
186
        if( file.isNull() )
187
        {
188
            delete dialog;
189
            return false;
190
        }
191
        if ( !KImageIO::canWrite(KImageIO::type(file)) )
192
        {
193
            if ( KImageIO::canWrite(KImageIO::typeForMime(dialog->currentFilter())) )
194
                file += "."+KImageIO::suffix(KImageIO::typeForMime(dialog->currentFilter()));
195
            else
196
                file += ".png";
197
        }
198
    }
199
    else
200
    {
201
        delete dialog;
202
        return false;
203
    }
204
        
205
    delete dialog;
206
207
    if(TQFile::exists(file))
208
    {
209
        int r=KMessageBox::warningContinueCancel(TQT_TQWIDGET(parent()),
210
            i18n( "A file named \"%1\" already exists. "
211
                  "Overwrite it?" ).arg(file),
212
            i18n( "Overwrite File?" ),
213
            i18n( "&Overwrite" ) );
214
  
215
        if(r==KMessageBox::Cancel)
216
        {
217
            return false;
218
        }
219
    }
220
221
    return save( image, file );
222
}
223
224
225
226
bool TDEIconEditIcon::save(const TQImage *image, const TQString &_filename)
227
{
228
    kdDebug(4640) << "TDEIconEditIcon::save" << endl;
229
    TQString filename = _filename;
230
231
    if(filename.isEmpty())
232
    {
233
        if(_url.isEmpty())
234
        {
235
            return saveAs(image);
236
        }
237
        else
238
        {
239
            KURL turl(_url);
240
            filename = turl.path();
241
        }    
242
    }
243
244
    TQImage *img = (TQImage*)image;
245
    img->setAlphaBuffer(true);
246
    
247
    KURL turl(filename);
248
    TQString str = turl.path();
249
    bool savedOk = false;
250
251
    /* base image type on file extension - let kimageio
252
    take care of this determination */
253
    
254
    if(img->save(str, KImageIO::type(str).ascii()))    
255
    {
256
        kdDebug(4640) << "img->save()) successful" << endl;
257
        emit saved();    
258
        _url = filename;
259
        
260
        // emit signal to change title bar to reflect new name
261
        emit newname(filename); 
262
        kdDebug(4640) << "newname(filenamme) : " << _url << endl;    
263
        savedOk = true;
264
        emit addrecent(filename);
265
    }
266
    else 
267
    {
268
        TQString msg = i18n("There was an error saving:\n%1\n").arg(str);
269
        KMessageBox::error((TQWidget*)parent(), msg);
270
        kdDebug(4640) << "TDEIconEditIcon::save - " << msg << endl;
271
    }
272
273
    kdDebug(4640) << "TDEIconEditIcon::save - done" << endl;    
274
275
    return savedOk;
276
}
277
278
279
#include "kicon.moc"
(-)tdegraphics/kiconedit/kicon.h (-79 lines)
Lines 1-79 Link Here
1
/*
2
    KDE Icon Editor - a small icon drawing program for the KDE.
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#ifndef __KICON_H__
22
#define __KICON_H__
23
24
#include <stdio.h>
25
#include <errno.h>
26
#include <assert.h>
27
#include <unistd.h>
28
29
#ifdef HAVE_CONFIG_H
30
#include "config.h"
31
#endif
32
33
#if defined(HAVE_FCNTL_H) && !defined(HAVE_FLOCK)
34
#include <fcntl.h>
35
#endif
36
37
#ifdef HAVE_STDC_HEADERS
38
#include <stdlib.h>
39
#endif
40
#include <sys/types.h>
41
#include <sys/stat.h>
42
#include <sys/file.h>
43
44
class TQImage;
45
46
class TDEIconEditIcon : public TQObject
47
{
48
  Q_OBJECT
49
  
50
public:
51
  TDEIconEditIcon(TQObject*, const TQImage*, KURL url = KURL() );
52
  ~TDEIconEditIcon();
53
54
  bool isLocal() { return local; }
55
  TQString url() { return _url; }
56
  void setUrl( const TQString & u ) { _url = u; };
57
58
public slots:
59
  bool open(const TQImage*, KURL url = KURL());
60
  bool promptForFile(const TQImage*);
61
  bool save(const TQImage*, const TQString &filename=TQString());
62
  bool saveAs(const TQImage*);
63
64
signals:
65
  void newmessage( const TQString &);
66
  void newname(const TQString &);
67
  void addrecent(const TQString &);
68
  void opennewwin(const TQString &);
69
  void loaded(TQImage *);
70
  void saved();
71
72
protected:
73
    bool local;
74
    TQString _url;
75
    TQString _lastdir;
76
    FILE *f;
77
};
78
79
#endif //__KICON_H__
(-)tdegraphics/kiconedit/kiconcolors.cpp (-170 lines)
Lines 1-170 Link Here
1
/*
2
    TDE Icon Editor - a small graphics drawing program for the TDE
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#include <tqpainter.h>
22
#include <tqdrawutil.h>
23
24
#include <kdebug.h>
25
26
#include "kiconcolors.h"
27
28
KDrawColors::KDrawColors(TQWidget *parent) : KColorGrid(parent, 0, 3)
29
{
30
  kdDebug(4640) << "KDrawColors - constructor" << endl;
31
  setCellSize(17);
32
  setGrid(true);
33
  setGridState(KColorGrid::Shaded);
34
  selected = 0;
35
  kdDebug(4640) << "KDrawColors - constructor - done" << endl;
36
}
37
38
void KDrawColors::paintCell( TQPainter *painter, int row, int col )
39
{
40
  //KColorGrid::paintCell(painter, row, col);
41
  uint c = colorAt( row * numCols() + col );
42
  TQBrush brush(c);
43
  int d = spacing();
44
45
  qDrawShadePanel( painter, d, d, cellSize()-d, cellSize()-d,
46
                colorGroup(), true, 1, &brush);
47
  if ( row * numCols() + col == selected)
48
     painter->drawWinFocusRect( d+1, d+1, cellSize()-(2*d)+1, cellSize()-(2*d)+1 );
49
}
50
51
void KDrawColors::mouseReleaseEvent( TQMouseEvent *e )
52
{
53
  int row = findRow( e->pos().y() );
54
  int col = findCol( e->pos().x() );
55
  int cell = row * numCols() + col;
56
57
  if ( selected != cell )
58
  {
59
    int prevSel = selected;
60
    selected = cell;
61
    updateCell( prevSel/numCols(), prevSel%numCols(), FALSE );
62
    updateCell( row, col, FALSE );
63
  }
64
65
  emit newColor(colorAt(cell)|OPAQUE_MASK);
66
}
67
68
KSysColors::KSysColors(TQWidget *parent) : KDrawColors(parent)
69
{
70
  kdDebug(4640) << "KSysColors - constructor" << endl;
71
72
  setNumRows(7);
73
  setNumCols(6);
74
  //fill(backgroundColor().rgb()|OPAQUE_MASK);
75
  setFixedSize(numCols()*cellSize(), numRows()*cellSize());
76
  fill(TRANSPARENT|OPAQUE_MASK);
77
78
  int numcells = 42;
79
80
  kdDebug(4640) << "KSysColors - constructor - before setColor" << endl;
81
  for(int i = 0; i < numcells; i++)
82
  {
83
    setColor(i, iconpalette[i]|OPAQUE_MASK);
84
  }
85
  kdDebug(4640) << "KSysColors - constructor - done" << endl;
86
}
87
88
KCustomColors::KCustomColors(TQWidget *parent) : KDrawColors(parent)
89
{
90
  kdDebug(4640) << "KCustomColors - constructor" << endl;
91
  setNumRows(3);
92
  setNumCols(6);
93
  fill(TRANSPARENT|OPAQUE_MASK);
94
  setFixedSize(numCols()*cellSize(), numRows()*cellSize());
95
  freecells = new bool[numRows()*numCols()];
96
  for(int i = 0; i < numRows()*numCols(); i++)
97
    freecells[i] = true;
98
  kdDebug(4640) << "KCustomColors - constructor - done" << endl;
99
}
100
101
KCustomColors::~KCustomColors()
102
{
103
  delete [] freecells;
104
}
105
106
void KCustomColors::mouseDoubleClickEvent(TQMouseEvent *e)
107
{
108
  int row = findRow( e->pos().y() );
109
  int col = findCol( e->pos().x() );
110
  int cell = row * numCols() + col;
111
  TQColor color=colorAt(cell);
112
  if(KColorDialog::getColor(color))
113
  {
114
    setColor(cell, color.rgb());
115
    emit newColor(color.rgb()|OPAQUE_MASK);
116
    freecells[cell] = false;
117
  }
118
}
119
120
void KCustomColors::addColor(uint c)
121
{
122
  if(!contains(c))
123
  {
124
    int f = getFreeCell();
125
    if(f != -1)
126
    {
127
      TQColor color(c);
128
      if(!color.isValid())
129
      {
130
        kdDebug(4640) << "KCustomColors::addColor: Not a valid color: " << c << endl;
131
        return;
132
      }
133
      //kdDebug(4640) << "KCustomColors::addColor: Adding color: " << c << " - " << tqRed(c) << " " << tqGreen(c) << " " << tqBlue(c) << endl;
134
      setColor(f, c);
135
      freecells[f] = false;
136
    }
137
  }
138
}
139
140
int KCustomColors::getFreeCell()
141
{
142
  for (int i = 0; i < numRows()*numCols(); i++)
143
  {
144
    if(freecells[i])
145
    {
146
      if(i+1 < numRows()*numCols())
147
        freecells[i+1] = true;
148
      else
149
        freecells[0] = true;
150
      return i;
151
      break;
152
    }
153
  }
154
  freeAllCells(); // start over again - not very elegant
155
  return 0;
156
}
157
158
void KCustomColors::freeAllCells()
159
{
160
  for (int i = 0; i < numRows()*numCols(); i++)
161
    freecells[i] = true;
162
}
163
164
void KCustomColors::clear()
165
{
166
  fill(TRANSPARENT);
167
  freeAllCells();
168
  update();
169
}
170
#include "kiconcolors.moc"
(-)tdegraphics/kiconedit/kiconcolors.h (-86 lines)
Lines 1-86 Link Here
1
/*
2
    kiconedit - a small graphics drawing program for creating KDE icons
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#ifndef __KDRAWCOLORS_H__
22
#define __KDRAWCOLORS_H__
23
24
#include <tqpopupmenu.h>
25
26
#include <kcolordialog.h>
27
28
#include "kcolorgrid.h"
29
#include "utils.h"
30
31
class KDrawColors : public KColorGrid
32
{
33
  Q_OBJECT
34
  
35
public:
36
  KDrawColors(TQWidget *parent);
37
38
  //bool hasColor(uint);
39
40
signals:
41
  void newColor(uint);
42
43
protected:
44
  virtual void paintCell( TQPainter*, int, int );
45
  virtual void mouseReleaseEvent(TQMouseEvent*);
46
47
  int selected;
48
};
49
50
class KCustomColors : public KDrawColors
51
{
52
  Q_OBJECT
53
  
54
public:
55
  KCustomColors(TQWidget *parent);
56
  ~KCustomColors();
57
58
  void addColor(uint);
59
  void clear();
60
61
protected:
62
  virtual void mouseDoubleClickEvent(TQMouseEvent*);
63
  int getFreeCell();
64
  void freeAllCells();
65
66
protected:
67
  bool *freecells;
68
  TQPopupMenu *popup;
69
};
70
71
class KSysColors : public KDrawColors
72
{
73
  Q_OBJECT
74
  
75
public:
76
77
  KSysColors(TQWidget *parent);
78
79
};
80
81
82
83
#endif //__KDRAWCOLORS_H__
84
85
86
(-)tdegraphics/kiconedit/kiconconfig.cpp (-589 lines)
Lines 1-589 Link Here
1
/*
2
    TDE Icon Editor - a small graphics drawing program for the TDE
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/
20
21
#include <stdlib.h>
22
23
#include <tqcheckbox.h>
24
#include <tqlayout.h>
25
#include <tqlineedit.h>
26
#include <tqvbox.h>
27
#include <tqbuttongroup.h>
28
#include <tqradiobutton.h>
29
30
#include <tdeaccel.h>
31
#include <kbuttonbox.h>
32
#include <tdeapplication.h>
33
#include <tdelocale.h>
34
#include <kcolorbutton.h>
35
#include <tdefiledialog.h>
36
#include <tdemessagebox.h>
37
#include <kdebug.h>
38
#include <kurlrequester.h>
39
40
#include "kiconconfig.h"
41
#include "kiconedit.h"
42
43
#ifndef PICS_INCLUDED
44
#define PICS_INCLUDED
45
#include "pics/logo.xpm"
46
#endif
47
48
// little helper:
49
static inline TQPixmap loadIcon( const char * name )
50
{
51
  return TDEGlobal::instance()->iconLoader()
52
    ->loadIcon( TQString::fromLatin1(name), TDEIcon::NoGroup, TDEIcon::SizeMedium );
53
}
54
55
KTemplateEditDlg::KTemplateEditDlg(TQWidget *parent) 
56
    : KDialogBase(parent, "KTemplateEditDlg", true, i18n( "Icon Template" ),
57
      Ok|Cancel )
58
{
59
  TQFrame *frame = makeMainWidget();
60
  TQVBoxLayout *ml = new TQVBoxLayout(frame);
61
  TQGroupBox *grp = new TQGroupBox(i18n("Template"), frame);
62
  grp->setColumnLayout(0, Qt::Vertical);
63
  grp->layout()->setSpacing(spacingHint());
64
  grp->layout()->setMargin(marginHint());
65
  TQGridLayout *l = new TQGridLayout(grp->layout());
66
67
  ln_name = new TQLineEdit( grp );
68
  connect( ln_name, TQT_SIGNAL( textChanged( const TQString & ) ), 
69
      TQT_SLOT( slotTextChanged() ) );
70
  TQLabel* lb_name = new TQLabel( ln_name, i18n( "Description:" ), grp );
71
72
  ln_path = new KURLRequester(grp);
73
  connect( ln_path, TQT_SIGNAL( textChanged( const TQString & ) ), 
74
      TQT_SLOT( slotTextChanged() ) );
75
  TQLabel* lb_path = new TQLabel( ln_path, i18n( "Path:" ), grp );
76
77
  l->addWidget(lb_name, 0, 0);
78
  l->addWidget(ln_name, 0, 1);
79
  l->addWidget(lb_path, 1, 0);
80
  l->addWidget(ln_path, 1, 1);
81
82
  ml->addWidget( grp, 1);
83
84
  slotTextChanged();
85
86
  setMinimumSize( 400, 150 );
87
}
88
89
void KTemplateEditDlg::slotTextChanged()
90
{
91
  TQString name = ln_name->text(), path = ln_path->url();
92
  enableButtonOK(name.length() && path.length());
93
}
94
95
void KTemplateEditDlg::setName(const TQString & name)
96
{
97
  ln_name->setText(name);
98
}
99
100
TQString KTemplateEditDlg::name()
101
{
102
  return ln_name->text();
103
}
104
105
void KTemplateEditDlg::setPath(const TQString & path)
106
{
107
  ln_path->setURL(path);
108
}
109
110
TQString KTemplateEditDlg::path()
111
{
112
  return ln_path->url();
113
}
114
115
KTemplateConfig::KTemplateConfig(TQWidget *parent) : TQWidget(parent)
116
{
117
  kdDebug(4640) << "KTemplateConfig constructor" << endl;
118
119
  btadd = btremove = btedit = 0L;
120
121
  TQGroupBox* grp = new TQGroupBox( i18n( "Templates" ), this );
122
  grp->setColumnLayout( 0, Qt::Horizontal );
123
124
  templates = new TDEIconListBox( grp );
125
  connect( templates, TQT_SIGNAL( highlighted( int ) ), 
126
      TQT_SLOT( checkSelection( int ) ) );
127
  connect( templates, TQT_SIGNAL(doubleClicked( TQListBoxItem * ) ), 
128
      TQT_SLOT( edit() ) );
129
130
  TQVBoxLayout* ml = new TQVBoxLayout( this );
131
  ml->addWidget( grp );
132
133
  TQVBoxLayout* l = new  TQVBoxLayout( grp->layout(), KDialog::spacingHint() );
134
  l->addWidget( templates );
135
136
  for( unsigned int i = 0; i <  TDEIconTemplateContainer::self()->count(); i++ )
137
    templates->insertItem( new TDEIconListBoxItem( *TDEIconTemplateContainer::self()->at( i ) ) ) ;
138
139
  KButtonBox *bbox = new KButtonBox( grp );
140
141
  btadd = bbox->addButton( i18n( "&Add..." ) );
142
  connect( btadd, TQT_SIGNAL( clicked() ), TQT_SLOT( add() ) );
143
144
  btedit = bbox->addButton( i18n( "&Edit..." ) );
145
  connect( btedit, TQT_SIGNAL( clicked() ), TQT_SLOT( edit() ) );
146
  btedit->setEnabled( false );
147
148
  btremove = bbox->addButton( i18n( "&Remove" ) );
149
  connect( btremove, TQT_SIGNAL( clicked() ), TQT_SLOT( remove() ) );
150
  btremove->setEnabled( false );
151
	
152
  bbox->addStretch( 1 );
153
	
154
  bbox->layout();
155
  l->addWidget( bbox );
156
}
157
158
KTemplateConfig::~KTemplateConfig()
159
{
160
}
161
162
void KTemplateConfig::saveSettings()
163
{
164
  kdDebug(4640) << "KTemplateConfig::saveSettings" << endl;
165
  
166
  TDEIconTemplateContainer::self()->clear();
167
168
  for(int i = 0; i < (int)templates->count(); i++)
169
  {
170
      TDEIconTemplateContainer::self()->append(templates->iconTemplate(i));
171
  }
172
  TDEIconTemplateContainer::self()->save();
173
  kdDebug(4640) << "KTemplateConfig::saveSettings - done" << endl;
174
175
}
176
177
void KTemplateConfig::checkSelection(int)
178
{
179
  kdDebug(4640) << "KTemplateConfig::checkSelection" << endl;
180
  if(templates->currentItem() != -1)
181
  {
182
    if(btremove) btremove->setEnabled(true);
183
    if(btedit) btedit->setEnabled(true);
184
  }
185
  else
186
  {
187
    if(btremove) btremove->setEnabled(false);
188
    if(btedit) btedit->setEnabled(false);
189
  }
190
  kdDebug(4640) << "KTemplateConfig::checkSelection - done" << endl;
191
}
192
193
void KTemplateConfig::remove()
194
{
195
  templates->removeItem(templates->currentItem());
196
}
197
198
void KTemplateConfig::add()
199
{
200
  KTemplateEditDlg dlg(this);
201
  if(dlg.exec())
202
  {
203
    TDEIconTemplate it;
204
    it.path = dlg.path();
205
    it.title = dlg.name();
206
    templates->insertItem(new TDEIconListBoxItem(it));
207
  }
208
}
209
210
void KTemplateConfig::edit()
211
{
212
  KTemplateEditDlg dlg(this);
213
  dlg.setPath(templates->path(templates->currentItem()));
214
  dlg.setName(templates->text(templates->currentItem()));
215
  templates->item(templates->currentItem());
216
  if(dlg.exec())
217
  {
218
    //Edit the entry
219
    TDEIconTemplate &it=templates->iconTemplate(templates->currentItem());
220
    it.path = dlg.path();
221
    it.title = dlg.name();
222
    static_cast<TDEIconListBoxItem*>(templates->item(templates->currentItem()))->reloadIcon();
223
    templates->update();
224
  }
225
}
226
227
KBackgroundConfig::KBackgroundConfig( TQWidget* parent )
228
  : TQWidget( parent )
229
{
230
  kdDebug(4640) << "KBackgroundConfig - constructor" << endl;
231
232
  lb_ex = 0L;
233
234
  TDEIconEditProperties *props = TDEIconEditProperties::self();
235
236
  pixpath = props->bgPixmap();
237
  pix.load(pixpath);
238
  if(pix.isNull())
239
  {
240
    kdDebug(4640) << "BGPIX: " << pixpath << " not valid!" << endl;
241
    TQPixmap pmlogo((const char**)logo);
242
    pix = pmlogo;
243
  }
244
245
  TQVBoxLayout *mainLayout = new TQVBoxLayout( this );
246
247
  TQGroupBox *grp1 = new TQGroupBox( i18n( "Select Background" ), this );
248
  grp1->setColumnLayout(0, Qt::Vertical );
249
  grp1->layout()->setSpacing( KDialog::spacingHint() );
250
  grp1->layout()->setMargin( KDialog::marginHint() );
251
  mainLayout->addWidget( grp1 );
252
253
  TQGridLayout *grp1Layout = new TQGridLayout( grp1->layout(), 3, 2 );
254
255
  TQButtonGroup* btngrp = new TQButtonGroup( grp1 );
256
  btngrp->setExclusive( true );
257
  btngrp->setFrameStyle( TQFrame::NoFrame );
258
  connect( btngrp, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( slotBackgroundMode( int ) ) );
259
  grp1Layout->addWidget( btngrp, 0, 0 );
260
261
  TQVBoxLayout *bgl = new TQVBoxLayout( btngrp, 5 );
262
263
  TQRadioButton *rbc = new TQRadioButton( i18n( "Use co&lor" ), btngrp );
264
  btngrp->insert( rbc, 0 );
265
  bgl->addWidget( rbc );
266
267
  TQRadioButton *rbp = new TQRadioButton( i18n( "Use pix&map" ), btngrp );
268
  btngrp->insert( rbp, 1 );
269
  bgl->addWidget( rbp );
270
271
  bgl->addStretch( 1 );
272
273
  TQVBox *bbox = new TQVBox( grp1 );
274
  grp1Layout->addWidget( bbox, 0, 1 );
275
276
  btcolor = new KColorButton(props->bgColor(), bbox) ;
277
  connect(btcolor, TQT_SIGNAL(changed(const TQColor &)), 
278
      TQT_SLOT( selectColor(const TQColor &)));
279
280
  btpix = new TQPushButton(i18n( "Choose..." ), bbox);
281
  connect( btpix, TQT_SIGNAL( clicked() ), TQT_SLOT( selectPixmap() ) );
282
283
  TQGroupBox *grp2 = new TQGroupBox( i18n( "Preview" ), this );
284
  mainLayout->addWidget( grp2, 1 );
285
286
  TQBoxLayout *l2 = new TQVBoxLayout( grp2, 15 );
287
288
  l2->addSpacing( 10 );
289
290
  lb_ex = new TQLabel( grp2 );
291
  lb_ex->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
292
  l2->addWidget( lb_ex );
293
294
/*
295
  l1->addWidget( btngrp, 0, AlignLeft );
296
  l1->addLayout( l1r );
297
*/
298
  bgmode = props->bgMode();
299
300
  if( bgmode == TQWidget::FixedPixmap )
301
  {
302
    btngrp->setButton( 1 );
303
    btcolor->setEnabled( false );
304
    lb_ex->setBackgroundPixmap( pix );
305
  }
306
  else
307
  {
308
    btngrp->setButton( 0 );
309
    btpix->setEnabled( false );
310
    lb_ex->setBackgroundColor(btcolor->color());
311
  }
312
}
313
314
KBackgroundConfig::~KBackgroundConfig()
315
{
316
}
317
318
void KBackgroundConfig::slotBackgroundMode(int id)
319
{
320
  if(id == 0)
321
  {
322
    bgmode = TQWidget::FixedColor;
323
    btpix->setEnabled(false);
324
    btcolor->setEnabled(true);
325
    if(lb_ex)
326
      lb_ex->setBackgroundColor(btcolor->color());
327
  }
328
  else
329
  {
330
    bgmode = TQWidget::FixedPixmap;
331
    btpix->setEnabled(true);
332
    btcolor->setEnabled(false);
333
    if(lb_ex)
334
      lb_ex->setBackgroundPixmap(pix);
335
  }
336
}
337
338
void KBackgroundConfig::saveSettings()
339
{
340
  kdDebug(4640) << "KBackgroundConfig::saveSettings" << endl;
341
  TDEIconEditProperties *props = TDEIconEditProperties::self();
342
  props->setBgMode( bgmode );
343
  props->setBgPixmap( pixpath );
344
  props->setBgColor( btcolor->color() );
345
  kdDebug(4640) << "KBackgroundConfig::saveSettings - done" << endl;
346
}
347
348
void KBackgroundConfig::selectColor(const TQColor & newColor)
349
{
350
  lb_ex->setBackgroundColor(newColor);
351
}
352
353
void KBackgroundConfig::selectPixmap()
354
{
355
  //  KURL url = KFileDialog::getOpenURL("/", "*.xpm");
356
  KURL url = KFileDialog::getImageOpenURL("/");
357
358
  if( url.isEmpty() )
359
    return;
360
361
  if( !url.isLocalFile() )
362
  {
363
    KMessageBox::sorry( 0L, i18n( "Only local files are supported yet." ) );
364
    return;
365
  }
366
367
  TQPixmap p(url.path());
368
369
  if( !p.isNull() )
370
  {
371
    lb_ex->setBackgroundPixmap( p );
372
    pixpath = url.path();
373
  }
374
}
375
376
KMiscConfig::KMiscConfig(TQWidget *parent) : TQWidget(parent)
377
{
378
  kdDebug(4640) << "KMiscConfig - constructor" << endl;
379
380
  TDEIconEditProperties* props = TDEIconEditProperties::self();
381
382
  TQBoxLayout *ml = new TQVBoxLayout( this, 0, 5 );
383
384
  TQCheckBox *cbp = new TQCheckBox( i18n( "Paste &transparent pixels" ), this );
385
  connect( cbp, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( pasteMode( bool ) ) );
386
  ml->addWidget(cbp);
387
388
  TQCheckBox *cbr = new TQCheckBox( i18n( "Show &rulers" ), this );
389
  connect( cbr, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( showRulers( bool ) ) );
390
  ml->addWidget(cbr);
391
392
  TQButtonGroup* btngrp = new TQButtonGroup( i18n( "Transparency Display" ), this);
393
  btngrp->setExclusive( true );
394
  connect( btngrp, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( slotTransparencyDisplayType( int ) ) );
395
  ml->addWidget( btngrp );
396
397
  TQVBoxLayout *tgl = new TQVBoxLayout( btngrp, KDialog::marginHint(), KDialog::spacingHint() );
398
  tgl->insertSpacing(0, 10);
399
400
  TQHBoxLayout *hl = new TQHBoxLayout(tgl);
401
402
  TQRadioButton *solidColorRButton = new TQRadioButton( i18n( "&Solid color:" ), btngrp );
403
  btngrp->insert( solidColorRButton, 0 );
404
  hl->addWidget( solidColorRButton );
405
406
  m_solidColorButton = new KColorButton(props->transparencySolidColor(), btngrp);
407
  btngrp->insert( m_solidColorButton, 2 );
408
  hl->addWidget(m_solidColorButton);
409
  //connect(btcolor, TQT_SIGNAL(changed(const TQColor &)), 
410
    //  TQT_SLOT( selectColor(const TQColor &)));
411
412
  TQRadioButton *checkerboardRButton = new TQRadioButton( i18n( "Checker&board" ), btngrp );
413
  btngrp->insert( checkerboardRButton, 1 );
414
  tgl->addWidget( checkerboardRButton );
415
416
  TQGridLayout *grid = new TQGridLayout(tgl, 3, 3);
417
  grid->addColSpacing(0, 40);
418
  grid->setColStretch(1, 1);
419
  grid->setColStretch(2, 1);
420
421
  m_checkerboardSizeCombo = new TQComboBox(btngrp);
422
  m_checkerboardSizeCombo->insertItem( i18n( "Small" ) );
423
  m_checkerboardSizeCombo->insertItem( i18n( "Medium" ) );
424
  m_checkerboardSizeCombo->insertItem( i18n( "Large" ) );
425
  m_checkerboardSizeCombo->setCurrentItem(props->checkerboardSize());
426
427
  TQLabel *label = new TQLabel(m_checkerboardSizeCombo, i18n("Si&ze:"), btngrp);
428
429
  grid->addWidget(label, 0, 1);
430
  grid->addWidget(m_checkerboardSizeCombo, 0, 2);
431
432
  m_checkerboardColor1Button = new KColorButton(props->checkerboardColor1(), btngrp);
433
  label = new TQLabel(m_checkerboardColor1Button, i18n("Color &1:"), btngrp);
434
435
  grid->addWidget(label, 1, 1);
436
  grid->addWidget(m_checkerboardColor1Button, 1, 2);
437
438
  m_checkerboardColor2Button = new KColorButton(props->checkerboardColor2(), btngrp);
439
  label = new TQLabel(m_checkerboardColor2Button, i18n("Color &2:"), btngrp);
440
441
  grid->addWidget(label, 2, 1);
442
  grid->addWidget(m_checkerboardColor2Button, 2, 2);
443
444
  if(props->transparencyDisplayType() == TDEIconEditGrid::TRD_CHECKERBOARD)
445
  {
446
    checkerboardRButton->setChecked(true);
447
    m_checkerboardColor1Button->setEnabled(true);
448
    m_checkerboardColor2Button->setEnabled(true);
449
    m_checkerboardSizeCombo->setEnabled(true);
450
451
    solidColorRButton->setChecked(false);
452
    m_solidColorButton->setEnabled(false);
453
  }
454
  else
455
  {
456
    checkerboardRButton->setChecked(false);
457
    m_checkerboardColor1Button->setEnabled(false);
458
    m_checkerboardColor2Button->setEnabled(false);
459
    m_checkerboardSizeCombo->setEnabled(false);
460
461
    solidColorRButton->setChecked(true);
462
    m_solidColorButton->setEnabled(true);
463
  }
464
465
  ml->addStretch(1);
466
467
  cbp->setChecked( props->pasteTransparent() );
468
  cbr->setChecked( props->showRulers() );
469
}
470
471
KMiscConfig::~KMiscConfig()
472
{
473
474
}
475
476
void KMiscConfig::saveSettings()
477
{
478
  kdDebug(4640) << "KMiscConfig::saveSettings" << endl;
479
  TDEIconEditProperties* props =  TDEIconEditProperties::self();
480
  props->setPasteTransparent( pastemode );
481
  props->setShowRulers( showrulers );
482
  if(m_solidColorButton->isEnabled())
483
  {
484
    props->setTransparencyDisplayType(TDEIconEditGrid::TRD_SOLIDCOLOR);
485
    props->setTransparencySolidColor(m_solidColorButton->color());
486
  }
487
  else
488
  {
489
    props->setTransparencyDisplayType(TDEIconEditGrid::TRD_CHECKERBOARD);
490
    props->setCheckerboardColor1(m_checkerboardColor1Button->color());
491
    props->setCheckerboardColor2(m_checkerboardColor2Button->color());
492
    props->setCheckerboardSize((TDEIconEditGrid::CheckerboardSize)m_checkerboardSizeCombo->currentItem());
493
  }
494
}
495
496
void KMiscConfig::pasteMode(bool mode)
497
{
498
  pastemode = mode;
499
}
500
501
void KMiscConfig::showRulers(bool mode)
502
{
503
  showrulers = mode;
504
}
505
506
void KMiscConfig::slotTransparencyDisplayType(int id)
507
{
508
  if(id == 0)
509
  {
510
    m_checkerboardColor1Button->setEnabled(false);
511
    m_checkerboardColor2Button->setEnabled(false);
512
    m_checkerboardSizeCombo->setEnabled(false);
513
514
    m_solidColorButton->setEnabled(true);
515
  }
516
  else
517
  if(id == 1)
518
  {
519
    m_checkerboardColor1Button->setEnabled(true);
520
    m_checkerboardColor2Button->setEnabled(true);
521
    m_checkerboardSizeCombo->setEnabled(true);
522
523
    m_solidColorButton->setEnabled(false);
524
  }
525
}
526
527
TDEIconConfig::TDEIconConfig(TQWidget *parent)
528
  : KDialogBase(KDialogBase::IconList, i18n("Configure"),
529
                         KDialogBase::Help |
530
                         KDialogBase::Ok |
531
                         KDialogBase::Apply |
532
                         KDialogBase::Cancel,
533
                         KDialogBase::Ok,
534
                         parent, "configDialog", true, true)
535
{
536
  setHelp(TQString());
537
  //KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
538
  connect(this, TQT_SIGNAL(finished()), this, TQT_SLOT(finis()));
539
540
  TQVBox* page = addVBoxPage(i18n("Icon Templates"), TQString(), loadIcon("icons"));
541
  temps = new KTemplateConfig(page);
542
543
  page = addVBoxPage(i18n("Background"), TQString(), loadIcon("background"));
544
  backs = new KBackgroundConfig(page);
545
546
  page = addVBoxPage(i18n("Icon Grid"), TQString(), loadIcon("kiconedit"));
547
  misc = new KMiscConfig(page);
548
549
  TQSize min(300, 400);
550
551
  if (300 < sizeHint().width()) { min.setWidth(sizeHint().width()); }
552
  if (400 < sizeHint().height()) { min.setHeight(sizeHint().height()); }
553
554
  resize(min);
555
}
556
557
TDEIconConfig::~TDEIconConfig()
558
{
559
  //delete dict;
560
}
561
562
void TDEIconConfig::slotApply()
563
{
564
  kdDebug(4640) << "TDEIconEditConfig::saveSettings" << endl;
565
566
  temps->saveSettings();
567
  backs->saveSettings();
568
  misc->saveSettings();
569
570
  for (TDEIconEdit* window = TDEIconEdit::windowList.first();
571
         window;
572
         window = TDEIconEdit::windowList.next())
573
  {
574
    window->updateProperties();
575
  }
576
}
577
578
void TDEIconConfig::slotOk()
579
{
580
    slotApply();
581
    KDialogBase::slotOk();
582
}
583
584
void TDEIconConfig::finis()
585
{
586
    delayedDestruct();
587
}
588
589
#include "kiconconfig.moc"
(-)tdegraphics/kiconedit/kiconconfig.h (-158 lines)
Lines 1-158 Link Here
1
/*
2
    KDE Icon Editor - a small icon drawing program for the KDE.
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#ifndef __KICONCONFIG_H__
22
#define __KICONCONFIG_H__
23
24
#include <tqpixmap.h>
25
#include <kdialogbase.h>
26
27
#include "knew.h"
28
#include "utils.h"
29
#include "properties.h"
30
31
#ifdef HAVE_CONFIG_H
32
#include "config.h"
33
#endif
34
35
class TDEAccel;
36
class KKeyChooser;
37
class KColorButton;
38
class KURLRequester;
39
class TQComboBox;
40
41
class KTemplateEditDlg : public KDialogBase
42
{
43
  Q_OBJECT
44
  
45
public:
46
  KTemplateEditDlg(TQWidget *);
47
  ~KTemplateEditDlg() {};
48
49
  TQString name();
50
  TQString path();
51
  void setName(const TQString &);
52
  void setPath(const TQString &);
53
  
54
public slots:
55
  void slotTextChanged();
56
57
protected:
58
  TQLineEdit *ln_name;
59
  KURLRequester *ln_path;
60
};
61
62
class KTemplateConfig : public TQWidget
63
{
64
  Q_OBJECT
65
  
66
public:
67
  KTemplateConfig(TQWidget*);
68
  ~KTemplateConfig();
69
70
  void saveSettings();
71
72
protected slots:
73
  void add();
74
  void edit();
75
  void remove();
76
  void checkSelection(int);
77
78
protected:
79
  TDEIconListBox *templates;
80
  TQPushButton *btadd, *btedit, *btremove;
81
};
82
83
class KBackgroundConfig : public TQWidget
84
{
85
  Q_OBJECT
86
  
87
public:
88
  KBackgroundConfig(TQWidget *parent);
89
  ~KBackgroundConfig();
90
91
public slots:
92
  void saveSettings();
93
  void selectColor(const TQColor & newColor);
94
  void selectPixmap();
95
96
signals:
97
98
protected slots:
99
  void slotBackgroundMode(int);
100
101
protected:
102
  KColorButton *btcolor;
103
  TQPushButton *btpix;
104
  TQPixmap pix;
105
  TQString pixpath;
106
  TQWidget::BackgroundMode bgmode;
107
  TQLabel *lb_ex;
108
};
109
110
class KMiscConfig : public TQWidget
111
{
112
  Q_OBJECT
113
  
114
public:
115
  KMiscConfig(TQWidget *parent);
116
  ~KMiscConfig();
117
118
public slots:
119
  void saveSettings();
120
  void pasteMode(bool);
121
  void showRulers(bool);
122
123
protected slots:
124
  void slotTransparencyDisplayType(int);
125
126
signals:
127
128
protected:
129
  bool pastemode, showrulers;
130
  TQRadioButton *rbp;
131
  KColorButton *m_solidColorButton;
132
  KColorButton *m_checkerboardColor1Button;
133
  KColorButton *m_checkerboardColor2Button;
134
  TQComboBox *m_checkerboardSizeCombo;
135
};
136
137
class TDEIconConfig : public KDialogBase
138
{
139
  Q_OBJECT
140
  
141
142
public:
143
  
144
  TDEIconConfig(TQWidget *parent);
145
  ~TDEIconConfig();
146
147
protected slots:
148
  void slotApply();
149
  void slotOk();
150
  void finis();
151
152
protected:
153
  KTemplateConfig *temps;
154
  KBackgroundConfig *backs;
155
  KMiscConfig *misc;
156
};
157
158
#endif //__KICONCONFIG_H__
(-)tdegraphics/kiconedit/kiconedit.cpp (-497 lines)
Lines 1-497 Link Here
1
/*
2
    kiconedit - a small graphics drawing program for the KDE
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/
20
21
#include <tqwhatsthis.h>
22
#include <tqtooltip.h>
23
24
#include <tdepopupmenu.h>
25
#include <kstdaction.h>
26
#include <tdeconfig.h>
27
#include <tdelocale.h>
28
#include <tdemessagebox.h>
29
#include <kdebug.h>
30
31
#include "kiconedit.h"
32
#include "palettetoolbar.h"
33
34
WindowList TDEIconEdit::windowList;
35
36
TDEIconEdit::TDEIconEdit(const TQImage image, const char *name)
37
 : TDEMainWindow(0, name)
38
{
39
    init();
40
    img = image;
41
    img.detach();
42
    grid->load(&img);
43
    grid->setModified(true);
44
}
45
46
TDEIconEdit::TDEIconEdit(KURL url, const char *name)
47
 : TDEMainWindow(0, name)
48
{
49
    init();
50
    icon->open(&img, url);
51
}
52
53
void TDEIconEdit::init()
54
{
55
  setMinimumSize( 600, 540 );
56
57
  windowList.append(this);
58
  setCaption(kapp->caption());
59
60
  m_paletteToolBar = 0L;
61
  statusbar = 0L;
62
63
  history = new KCommandHistory( actionCollection(), true );
64
65
  gridview = new KGridView(&img, history, this);
66
  grid = gridview->grid();
67
  icon = new TDEIconEditIcon(TQT_TQOBJECT(this), &grid->image());
68
69
  setAcceptDrops(true);
70
71
  setupActions();
72
  setupStatusBar();
73
  setStandardToolBarMenuEnabled( true );
74
75
  createGUI();
76
77
  connect(this, TQT_SIGNAL(newname(const TQString &)),
78
           TQT_SLOT( slotUpdateStatusName(const TQString &)));
79
80
  connect( icon, TQT_SIGNAL( saved()), TQT_SLOT(slotSaved()));
81
  connect( icon, TQT_SIGNAL( loaded(TQImage *)), grid, TQT_SLOT(load(TQImage *)));
82
  connect( icon, TQT_SIGNAL(opennewwin(const TQString &)),
83
           TQT_SLOT(slotNewWin(const TQString &)));
84
  connect(icon, TQT_SIGNAL(newname(const TQString &)),
85
           TQT_SLOT( slotUpdateStatusName(const TQString &)));
86
  connect(icon, TQT_SIGNAL(newmessage(const TQString &)),
87
           TQT_SLOT( slotUpdateStatusMessage(const TQString &)));
88
  connect(icon, TQT_SIGNAL(addrecent(const TQString &)),
89
           TQT_SLOT( addRecent(const TQString &)));
90
91
  connect( m_paletteToolBar, TQT_SIGNAL( newColor(uint)),
92
     grid, TQT_SLOT(setColorSelection(uint)));
93
94
  connect( grid, TQT_SIGNAL( changed(const TQPixmap &) ),
95
      m_paletteToolBar, TQT_SLOT( previewChanged(const TQPixmap &) ) );
96
  connect( grid, TQT_SIGNAL( addingcolor(uint) ),
97
      m_paletteToolBar, TQT_SLOT(addColor(uint)));
98
  connect( grid, TQT_SIGNAL( colorschanged(uint, uint*) ),
99
      m_paletteToolBar, TQT_SLOT(addColors(uint, uint*)));
100
101
  connect(grid, TQT_SIGNAL(sizechanged(int, int)),
102
           TQT_SLOT( slotUpdateStatusSize(int, int)));
103
  connect(grid, TQT_SIGNAL(poschanged(int, int)),
104
           TQT_SLOT( slotUpdateStatusPos(int, int)));
105
  connect(grid, TQT_SIGNAL(scalingchanged(int)),
106
           TQT_SLOT( slotUpdateStatusScaling(int)));
107
  connect(grid, TQT_SIGNAL(scalingchanged(int)),
108
           TQT_SLOT( slotUpdateZoom(int)));
109
  connect( grid, TQT_SIGNAL( addingcolor(uint) ),
110
           TQT_SLOT(slotUpdateStatusColors(uint)));
111
  connect(grid, TQT_SIGNAL(colorschanged(uint, uint*)),
112
           TQT_SLOT( slotUpdateStatusColors(uint, uint*)));
113
  connect(grid, TQT_SIGNAL(newmessage(const TQString &)),
114
           TQT_SLOT( slotUpdateStatusMessage(const TQString &)));
115
  connect(grid, TQT_SIGNAL(clipboarddata(bool)),
116
           TQT_SLOT( slotUpdatePaste(bool)));
117
  connect(grid, TQT_SIGNAL(colorSelected(uint)),
118
           m_paletteToolBar, TQT_SLOT(currentColorChanged(uint)));
119
  connect(grid, TQT_SIGNAL(modifiedchanged(bool)),
120
           TQT_SLOT( slotUpdateStatusModified(bool)));
121
  gridview->checkClipboard(); //Not very elegant, but fixes a buglet
122
123
  connect(grid, TQT_SIGNAL(selecteddata(bool)), TQT_SLOT( slotUpdateCopy(bool)));
124
125
  kdDebug(4640) << "Updating statusbar" << endl;
126
  slotUpdateStatusSize(grid->cols(), grid->rows());
127
  slotUpdateStatusScaling(grid->scaling());
128
129
  slotUpdateZoom( grid->scaling() );
130
131
  if(icon->url().length())
132
    slotUpdateStatusName(icon->url());
133
  else
134
    slotUpdateStatusName(i18n("Untitled"));
135
136
  slotUpdateCopy(false);
137
138
  uint *c = 0, n = 0;
139
  n = grid->getColors(c);
140
  slotUpdateStatusColors(n, c);
141
142
  setCentralWidget(gridview);
143
144
  applyMainWindowSettings( kapp->config(), "MainWindowSettings" );
145
  updateProperties();
146
147
  updateAccels();
148
  show();
149
  moveDockWindow( m_paletteToolBar, TQt::DockRight, true, 0 );
150
}
151
152
TDEIconEdit::~TDEIconEdit()
153
{
154
    windowList.remove(this);
155
156
    if (windowList.count() < 1)
157
    {
158
        kapp->quit();
159
    }
160
}
161
162
bool TDEIconEdit::queryClose()
163
{
164
    bool cancel = false;
165
    if (grid->isModified())
166
    {
167
        int r = KMessageBox::warningYesNoCancel(this,
168
	    i18n("The current file has been modified.\nDo you want to save it?"), TQString(), KStdGuiItem::save(), KStdGuiItem::discard());
169
170
        switch(r)
171
        {
172
            case KMessageBox::Yes:
173
                if (!icon->save(&grid->image()))
174
                {
175
                    cancel = true;
176
                }
177
                break;
178
            case KMessageBox::Cancel:
179
                cancel = true;
180
                break;
181
            case KMessageBox::No:
182
            default:
183
                break;
184
        }
185
    }
186
187
    if(!cancel)
188
    {
189
        writeConfig();
190
    }
191
    return (!cancel);
192
}
193
194
// this is for exit by request of the session manager
195
void TDEIconEdit::saveProperties(TDEConfig *config )
196
{
197
    kdDebug(4640) << "TDEIconEdit::saveProperties" << endl;
198
199
    config->writePathEntry("Name", icon->url());
200
}
201
202
// this is for instances opened by the session manager
203
void TDEIconEdit::readProperties(TDEConfig *config)
204
{
205
    kdDebug(4640) << "TDEIconEdit::readProperties" << endl;
206
207
    TQString entry = config->readPathEntry("Name"); // no default
208
    if (entry.isEmpty())  return;
209
    icon->open(&grid->image(), KURL::fromPathOrURL( entry ));
210
}
211
212
/*
213
    this is for normal exits or request from "Options->Save options".
214
*/
215
void TDEIconEdit::writeConfig()
216
{
217
    TDEConfig *config = kapp->config();
218
    m_actRecent->saveEntries( kapp->config() );
219
220
    TDEIconEditProperties::self()->save();
221
222
    saveMainWindowSettings( config, "MainWindowSettings" );
223
}
224
225
TQSize TDEIconEdit::sizeHint() const
226
{
227
    if(gridview)
228
        return gridview->sizeHint();
229
    else
230
        return TQSize(-1, -1);
231
}
232
233
void TDEIconEdit::setupActions()
234
{
235
  kdDebug(4640) << "setupActions" << endl;
236
237
  TDEAction *action;
238
  TDERadioAction *toolAction;
239
  TDEShortcut cut;
240
241
  // File Menu
242
  action = new TDEAction(i18n("New &Window"), "window_new", cut,
243
      TQT_TQOBJECT(this),  TQT_SLOT(slotNewWin()), actionCollection(), "file_new_window");
244
  action->setWhatsThis(i18n("New window\n\nOpens a new icon editor window."));
245
246
  action = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(slotNew()), actionCollection());
247
  action->setWhatsThis(i18n("New\n\nCreate a new icon, either from a"
248
      " template or by specifying the size"));
249
250
  action = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(slotOpen()), actionCollection());
251
  action->setWhatsThis(i18n("Open\n\nOpen an existing icon"));
252
253
  m_actRecent = KStdAction::openRecent(TQT_TQOBJECT(this),
254
      TQT_SLOT(slotOpenRecent(const KURL&)), actionCollection());
255
  m_actRecent->setMaxItems(15); // FIXME should be configurable!
256
  m_actRecent->loadEntries(kapp->config());
257
258
  action = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotSave()), actionCollection());
259
  action->setWhatsThis(i18n("Save\n\nSave the current icon"));
260
261
  KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(slotSaveAs()), actionCollection());
262
263
  action = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotPrint()), actionCollection());
264
  action->setWhatsThis(i18n("Print\n\nOpens a print dialog to let you print"
265
      " the current icon."));
266
267
  KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), actionCollection());
268
269
  // Edit Menu
270
271
  m_actCut = KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(slotCut()), actionCollection());
272
  m_actCut->setWhatsThis(i18n("Cut\n\nCut the current selection out of the"
273
      " icon.\n\n(Tip: You can make both rectangular and circular selections)"));
274
275
  m_actCopy = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), actionCollection());
276
  m_actCopy->setWhatsThis(i18n("Copy\n\nCopy the current selection out of the"
277
      " icon.\n\n(Tip: You can make both rectangular and circular selections)"));
278
279
  m_actPaste = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(slotPaste()), actionCollection());
280
  m_actPaste->setWhatsThis(i18n("Paste\n\n"
281
       "Paste the contents of the clipboard into the current icon.\n\n"
282
       "If the contents are larger than the current icon you can paste them"
283
       " in a new window.\n\n"
284
       "(Tip: Select \"Paste transparent pixels\" in the configuration dialog"
285
       " if you also want to paste transparency.)"));
286
287
  m_actPasteNew = new TDEAction( i18n( "Paste as &New" ), cut, TQT_TQOBJECT(grid),
288
      TQT_SLOT( editPasteAsNew() ), actionCollection(), "edit_paste_as_new" );
289
290
  KStdAction::clear(TQT_TQOBJECT(this), TQT_SLOT(slotClear()), actionCollection());
291
  KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), actionCollection());
292
293
  action = new TDEAction(i18n("Resi&ze..."), "transform", cut,
294
      TQT_TQOBJECT(grid),  TQT_SLOT(editResize()), actionCollection(), "edit_resize");
295
  action->setWhatsThis(i18n("Resize\n\nSmoothly resizes the icon while"
296
      " trying to preserve the contents"));
297
298
  action = new TDEAction(i18n("&GrayScale"), "grayscale", cut,
299
      TQT_TQOBJECT(grid),  TQT_SLOT(grayScale()), actionCollection(), "edit_grayscale");
300
  action->setWhatsThis(i18n("Gray scale\n\nGray scale the current icon.\n"
301
      "(Warning: The result is likely to contain colors not in the icon"
302
      " palette"));
303
304
  // View Menu
305
  m_actZoomIn = KStdAction::zoomIn(TQT_TQOBJECT(this), TQT_SLOT(slotZoomIn()),
306
      actionCollection());
307
  m_actZoomIn->setWhatsThis(i18n("Zoom in\n\nZoom in by one."));
308
309
  m_actZoomOut = KStdAction::zoomOut(TQT_TQOBJECT(this), TQT_SLOT(slotZoomOut()),
310
      actionCollection());
311
  m_actZoomOut->setWhatsThis(i18n("Zoom out\n\nZoom out by one."));
312
313
  TDEActionMenu *actMenu = new TDEActionMenu( i18n( "&Zoom" ), "viewmag",
314
      actionCollection(), "view_zoom" );
315
316
  // xgettext:no-c-format
317
  action = new TDEAction( i18n( "100%" ), cut, TQT_TQOBJECT(this), TQT_SLOT( slotZoom1() ),
318
      actionCollection(), "view_zoom_1" );
319
  actMenu->insert( action );
320
  // xgettext:no-c-format
321
  action = new TDEAction( i18n( "200%" ), cut, TQT_TQOBJECT(this), TQT_SLOT( slotZoom2() ),
322
      actionCollection(), "view_zoom_2" );
323
  actMenu->insert( action );
324
  // xgettext:no-c-format
325
  action = new TDEAction( i18n( "500%" ), cut, TQT_TQOBJECT(this), TQT_SLOT( slotZoom5() ),
326
      actionCollection(), "view_zoom_5" );
327
  actMenu->insert( action );
328
  // xgettext:no-c-format
329
  action = new TDEAction( i18n( "1000%" ), cut, TQT_TQOBJECT(this), TQT_SLOT( slotZoom10() ),
330
      actionCollection(), "view_zoom_10" );
331
  actMenu->insert( action );
332
333
  // Settings Menu
334
  KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureKeys()),
335
      actionCollection());
336
  KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureSettings()),
337
      actionCollection());
338
339
  createStandardStatusBarAction();
340
341
  TDEToggleAction *toggle;
342
343
  toggle = new TDEToggleAction( i18n( "Show &Grid" ), "grid",
344
      cut, TQT_TQOBJECT(this), TQT_SLOT( slotShowGrid() ), actionCollection(),
345
      "options_show_grid" );
346
  toggle->setCheckedState(i18n("Hide &Grid"));
347
  toggle->setWhatsThis( i18n( "Show grid\n\nToggles the grid in the icon"
348
      " edit grid on/off" ) );
349
  toggle->setChecked( TDEIconEditProperties::self()->showGrid() );
350
351
  // Tools Menu
352
  toolAction = new TDERadioAction(i18n("Color Picker"), "colorpicker",
353
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolPointer()), actionCollection(),
354
      "tool_find_pixel");
355
  toolAction->setExclusiveGroup("toolActions");
356
  toolAction->setWhatsThis(i18n("Color Picker\n\nThe color of the pixel clicked"
357
      " on will be the current draw color"));
358
359
  toolAction = new TDERadioAction(i18n("Freehand"), "paintbrush",
360
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFreehand()), actionCollection(),
361
      "tool_freehand");
362
  toolAction->setExclusiveGroup("toolActions");
363
  toolAction->setWhatsThis(i18n("Free hand\n\nDraw non-linear lines"));
364
365
  toolAction->setChecked( true );
366
  grid->setTool(TDEIconEditGrid::Freehand);
367
368
  toolAction = new TDERadioAction(i18n("Rectangle"), "rectangle",
369
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolRectangle()), actionCollection(),
370
      "tool_rectangle");
371
  toolAction->setExclusiveGroup("toolActions");
372
  toolAction->setWhatsThis(i18n("Rectangle\n\nDraw a rectangle"));
373
374
  toolAction = new TDERadioAction(i18n("Filled Rectangle"), "filledrectangle",
375
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFilledRectangle()), actionCollection(),
376
      "tool_filled_rectangle");
377
  toolAction->setExclusiveGroup("toolActions");
378
  toolAction->setWhatsThis(i18n("Filled rectangle\n\nDraw a filled rectangle"));
379
380
  toolAction = new TDERadioAction(i18n("Circle"), "circle",
381
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolCircle()), actionCollection(),
382
      "tool_circle");
383
  toolAction->setExclusiveGroup("toolActions");
384
  toolAction->setWhatsThis(i18n("Circle\n\nDraw a circle"));
385
386
  toolAction = new TDERadioAction(i18n("Filled Circle"), "filledcircle",
387
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFilledCircle()), actionCollection(),
388
      "tool_filled_circle");
389
  toolAction->setExclusiveGroup("toolActions");
390
  toolAction->setWhatsThis(i18n("Filled circle\n\nDraw a filled circle"));
391
392
  toolAction = new TDERadioAction(i18n("Ellipse"), "ellipse",
393
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolEllipse()), actionCollection(),
394
      "tool_ellipse");
395
  toolAction->setExclusiveGroup("toolActions");
396
  toolAction->setWhatsThis(i18n("Ellipse\n\nDraw an ellipse"));
397
398
  toolAction = new TDERadioAction(i18n("Filled Ellipse"), "filledellipse",
399
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFilledEllipse()), actionCollection(),
400
      "tool_filled_ellipse");
401
  toolAction->setExclusiveGroup("toolActions");
402
  toolAction->setWhatsThis(i18n("Filled ellipse\n\nDraw a filled ellipse"));
403
404
  toolAction = new TDERadioAction(i18n("Spray"), "airbrush",
405
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolSpray()), actionCollection(),
406
      "tool_spray");
407
  toolAction->setExclusiveGroup("toolActions");
408
  toolAction->setWhatsThis(i18n("Spray\n\nDraw scattered pixels in the"
409
      " current color"));
410
411
  toolAction = new TDERadioAction(i18n("Flood Fill"), "fill",
412
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFlood()), actionCollection(),
413
      "tool_flood_fill");
414
  toolAction->setExclusiveGroup("toolActions");
415
  toolAction->setWhatsThis(i18n("Flood fill\n\nFill adjoining pixels with"
416
      " the same color with the current color"));
417
418
  toolAction = new TDERadioAction(i18n("Line"), "line",
419
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolLine()), actionCollection(),
420
      "tool_line");
421
  toolAction->setExclusiveGroup("toolActions");
422
  toolAction->setWhatsThis(i18n("Line\n\nDraw a straight line vertically,"
423
      " horizontally or at 45 deg. angles"));
424
425
  toolAction = new TDERadioAction(i18n("Eraser (Transparent)"), "eraser",
426
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolEraser()), actionCollection(),
427
      "tool_eraser");
428
  toolAction->setExclusiveGroup("toolActions");
429
  toolAction->setWhatsThis(i18n("Erase\n\nErase pixels. Set the pixels to"
430
      " be transparent\n\n(Tip: If you want to draw transparency with a"
431
      " different tool, first click on \"Erase\" then on the tool you want"
432
      " to use)"));
433
434
  toolAction = new TDERadioAction(i18n("Rectangular Selection"),
435
      "selectrect", cut, TQT_TQOBJECT(this),  TQT_SLOT(slotToolSelectRect()),
436
      actionCollection(), "edit_select_rectangle");
437
  toolAction->setExclusiveGroup( "toolActions" );
438
  toolAction->setWhatsThis(i18n("Select\n\nSelect a rectangular section"
439
      " of the icon using the mouse."));
440
441
  toolAction = new TDERadioAction(i18n("Circular Selection"),
442
      "selectcircle", cut, TQT_TQOBJECT(this),  TQT_SLOT(slotToolSelectCircle()),
443
      actionCollection(), "edit_select_circle");
444
  toolAction->setExclusiveGroup( "toolActions" );
445
  toolAction->setWhatsThis(i18n("Select\n\nSelect a circular section of the"
446
      " icon using the mouse."));
447
}
448
449
void TDEIconEdit::updateAccels()
450
{
451
    actionCollection()->readShortcutSettings();
452
}
453
454
TQWidget *TDEIconEdit::createContainer( TQWidget *parent, int index,
455
        const TQDomElement &element, int &id )
456
{
457
    if ( element.attribute( "name" ) == "paletteToolBar" )
458
    {
459
        m_paletteToolBar = new PaletteToolBar( this, "paletteToolBar" );
460
        m_paletteToolBar->setText( i18n( "Palette Toolbar" ) );
461
        return m_paletteToolBar;
462
    }
463
464
    return KXMLGUIBuilder::createContainer( parent, index, element, id );
465
}
466
467
bool TDEIconEdit::setupStatusBar()
468
{
469
    statusbar = statusBar();
470
471
    TQString str = i18n("Statusbar\n\nThe statusbar gives information on"
472
        " the status of the current icon. The fields are:\n\n"
473
        "\t- Application messages\n\t- Cursor position\n\t- Size\n\t- Zoom factor\n"
474
        "\t- Number of colors");
475
    TQWhatsThis::add(statusBar(), str);
476
477
    statusbar->insertFixedItem("99999,99999", 0, true);
478
    statusbar->insertFixedItem("99999 x 99999", 1, true);
479
    statusbar->insertFixedItem(" 1:999", 2, true);
480
    str = i18n("Colors: %1").arg(9999999);
481
    statusbar->insertFixedItem(str, 3, true);
482
    statusbar->insertItem("", 4);
483
484
    statusbar->changeItem( "", 0);
485
    statusbar->changeItem( "", 1);
486
    statusbar->changeItem( "", 2);
487
    statusbar->changeItem( "", 3);
488
489
    return true;
490
}
491
492
void TDEIconEdit::addRecent(const TQString & path)
493
{
494
  m_actRecent->addURL(KURL( path ));
495
}
496
497
#include "kiconedit.moc"
(-)tdegraphics/kiconedit/kiconedit.desktop (-95 lines)
Lines 1-95 Link Here
1
[Desktop Entry]
2
GenericName=Icon Editor
3
GenericName[af]=Ikoon Redigeerder
4
GenericName[ar]=محرر الإيقونات
5
GenericName[bg]=Редактор на икони
6
GenericName[br]=Aozer arlunioù
7
GenericName[bs]=Editor ikona
8
GenericName[ca]=Editor d'icones
9
GenericName[cs]=Editor ikon
10
GenericName[cy]=Golygydd Eiconau
11
GenericName[da]=Ikoneditor
12
GenericName[de]=Editor für Arbeitsflächensymbole
13
GenericName[el]=Επεξεργαστής εικονιδίων
14
GenericName[eo]=Ilo por pentri kaj redakti piktogramojn
15
GenericName[es]=Editor de iconos
16
GenericName[et]=Ikoonide redaktor
17
GenericName[eu]=Ikono editorea
18
GenericName[fa]=ویرایشگر شمایل
19
GenericName[fi]=Kuvakemuokkain
20
GenericName[fr]=Éditeur d'icônes
21
GenericName[ga]=Eagarthóir Deilbhíní
22
GenericName[gl]=Editor de iconas
23
GenericName[he]=עורך סמלים
24
GenericName[hi]=प्रतीक (आइकॉन) संपादक
25
GenericName[hr]=Uređivač ikona
26
GenericName[hu]=Ikonszerkesztő
27
GenericName[is]=Táknmyndaritill
28
GenericName[it]=Editor di icone
29
GenericName[ja]=アイコンエディタ
30
GenericName[kk]=Таңбаша өңдегіші
31
GenericName[km]=កម្មវិធី​និពន្ធ​រូបតំណាង
32
GenericName[lt]=Ženkliukų redaktorius
33
GenericName[lv]=Ikonu Redaktors
34
GenericName[ms]=Editor Ikon
35
GenericName[nb]=Ikonredigerer
36
GenericName[nds]=Lüttbildeditor
37
GenericName[ne]=प्रतिमा सम्पादक
38
GenericName[nl]=Pictogrambewerker
39
GenericName[nn]=Ikonredigering
40
GenericName[nso]=Mofetosi wa Seemedi
41
GenericName[pa]=ਆਈਕਾਨ ਸੰਪਾਦਕ
42
GenericName[pl]=Edytor ikon
43
GenericName[pt]=Editor de Ícones
44
GenericName[pt_BR]=Editor de Ícones
45
GenericName[ro]=Editor de iconiţe
46
GenericName[ru]=Редактор пиктограмм
47
GenericName[se]=Govašdoaimmaheaddji
48
GenericName[sk]=Editor ikon
49
GenericName[sl]=Urejevalnik ikon
50
GenericName[sr]=Уређивач икона
51
GenericName[sr@Latn]=Uređivač ikona
52
GenericName[sv]=Ikoneditor
53
GenericName[ta]= கேசின்னம் திருத்தி
54
GenericName[tg]=Муҳаррири ишорот
55
GenericName[th]=เครื่องมือแก้ไขไอคอน
56
GenericName[tr]=Simge Düzenleyici
57
GenericName[uk]=Редактор піктограм
58
GenericName[uz]=Nishoncha tahrirchi
59
GenericName[uz@cyrillic]=Нишонча таҳрирчи
60
GenericName[ven]=Musengulusi wa Aikhono
61
GenericName[wa]=Aspougneu d' imådjetes
62
GenericName[xh]=Umhleli we Icon
63
GenericName[zh_CN]=图标编辑器
64
GenericName[zh_HK]=圖示編輯器
65
GenericName[zh_TW]=圖示編輯器
66
GenericName[zu]=Umhleli we Icon
67
Name=TDEIconEdit
68
Name[af]=K-ikoon-redigeer
69
Name[ar]=برنامج TDEIconEdit
70
Name[cy]=KGolyguEicon
71
Name[eo]=Piktogramredaktilo
72
Name[hi]=के-आइकॉन-एडिट
73
Name[hr]=Uređivač ikona
74
Name[is]=Táknmyndaritill
75
Name[lv]=KIkonuRedaktors
76
Name[ms]=KIkonEdit
77
Name[ne]=केडीई प्रतिमा सम्पादन
78
Name[pl]=Edytor ikon
79
Name[pt_BR]=KEditor de Ícones
80
Name[ro]=Editor iconiţe
81
Name[sv]=Kiconedit
82
Name[ta]=கேசின்னம் திருத்து
83
Name[tr]=K Icon Düzenleyici
84
Name[ven]=U sengulusa ha aikhono ya K
85
Name[zh_TW]=TDEIconEdit 圖示編輯器
86
MimeType=image/x-xpm;image/x-ico;image/png;image/jpeg;
87
Exec=kiconedit -caption "%c" %i %m %u
88
Icon=kiconedit
89
Path=
90
DocPath=kiconedit/index.html
91
Type=Application
92
Terminal=false
93
94
X-DCOP-ServiceType=Multi
95
Categories=Qt;TDE;Graphics;
(-)tdegraphics/kiconedit/kiconedit.h (-158 lines)
Lines 1-158 Link Here
1
/*
2
    kiconedit - a small graphics drawing program for creating KDE icons
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#ifndef __KICONEDIT_H__
22
#define __KICONEDIT_H__
23
24
#include <tqwidget.h>
25
#include <tqpixmap.h>
26
#include <tqptrlist.h>
27
28
#include <tdemainwindow.h>
29
#include <kiconloader.h>
30
#include <tdemenubar.h>
31
#include <kstatusbar.h>
32
#include <tdetoolbar.h>
33
#include <tdeaccel.h>
34
#include <kurl.h>
35
#include <tdeaction.h>
36
37
#include "knew.h"
38
#include "kicon.h"
39
#include "kiconconfig.h"
40
#include "kicongrid.h"
41
#include "kresize.h"
42
#include "properties.h"
43
44
class TDEIconEdit;
45
class KCommandHistory;
46
typedef TQPtrList<TDEIconEdit> WindowList;
47
48
class TQWhatsThis;
49
class TQToolButton;
50
class TQLabel;
51
class PaletteToolBar;
52
53
/**
54
* TDEIconEdit
55
* @short TDEIconEdit
56
* @author Thomas Tanghus <tanghus@kde.org>
57
* @version 0.4
58
*/
59
class TDEIconEdit : public TDEMainWindow
60
{
61
    Q_OBJECT
62
  
63
public:
64
  TDEIconEdit( KURL url = KURL(), const char *name = "kiconedit");
65
  TDEIconEdit( const TQImage image, const char *name = "kiconedit");
66
  ~TDEIconEdit();
67
68
  virtual TQSize sizeHint() const;
69
  static WindowList windowList;
70
71
signals:
72
  void newname(const TQString &);
73
74
public slots:
75
  virtual void saveProperties(TDEConfig*);
76
  virtual void readProperties(TDEConfig*);
77
  void updateProperties();
78
79
protected slots:
80
  void slotNewWin(const TQString & url = 0);
81
  void slotNew();
82
  void slotOpen();
83
  void slotClose();
84
  void slotSave();
85
  void slotSaveAs();
86
  void slotPrint();
87
  void slotZoomIn();
88
  void slotZoomOut();
89
  void slotZoom1();
90
  void slotZoom2();
91
  void slotZoom5();
92
  void slotZoom10();
93
  void slotCopy();
94
  void slotCut();
95
  void slotPaste();
96
  void slotClear();
97
  void slotSaved();
98
  void slotSelectAll();
99
  void slotOpenRecent(const KURL&);
100
  void slotToolPointer();
101
  void slotToolFreehand();
102
  void slotToolRectangle();
103
  void slotToolFilledRectangle();
104
  void slotToolCircle();
105
  void slotToolFilledCircle();
106
  void slotToolEllipse();
107
  void slotToolFilledEllipse();
108
  void slotToolSpray();
109
  void slotToolFlood();
110
  void slotToolLine();
111
  void slotToolEraser();
112
  void slotToolSelectRect();
113
  void slotToolSelectCircle();
114
  void slotConfigureSettings();
115
  void slotConfigureKeys();
116
  void slotShowGrid();
117
  void slotUpdateZoom( int );
118
  void slotUpdateStatusColors(uint);
119
  void slotUpdateStatusColors(uint, uint*);
120
  void slotUpdateStatusPos(int, int);
121
  void slotUpdateStatusSize(int, int);
122
  void slotUpdateStatusMessage(const TQString &);
123
  void slotUpdateStatusName(const TQString &);
124
  void slotUpdateStatusModified(bool);
125
  void slotUpdateStatusScaling(int);
126
  void slotUpdatePaste(bool);
127
  void slotUpdateCopy(bool);
128
  void slotOpenBlank(const TQSize);
129
  void addRecent(const TQString &);
130
131
  virtual void dragEnterEvent(TQDragEnterEvent* event);
132
  virtual void dropEvent(TQDropEvent *e);
133
134
protected:
135
  void init();
136
  void setupActions();
137
  bool setupStatusBar();
138
  void writeConfig();
139
  void updateAccels();
140
141
  virtual bool queryClose();
142
  virtual TQWidget *createContainer( TQWidget*, int, const TQDomElement&, int& );
143
144
  KCommandHistory* history;
145
  PaletteToolBar *m_paletteToolBar;
146
  KStatusBar *statusbar;
147
  TDEIconEditGrid *grid;
148
  KGridView *gridview;
149
  TDEIconEditIcon *icon;
150
  TQImage img;
151
  TQString m_name;
152
153
  TDEAction *m_actCopy, *m_actPaste, *m_actCut, *m_actPasteNew;
154
  TDEAction *m_actZoomIn, *m_actZoomOut;
155
  TDERecentFilesAction *m_actRecent;
156
};
157
158
#endif //__KICONEDIT_H__
(-)tdegraphics/kiconedit/kiconeditslots.cpp (-543 lines)
Lines 1-543 Link Here
1
/*
2
    TDE Icon Editor - a small graphics drawing program for the TDE
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/
20
21
#include <tqpaintdevicemetrics.h>
22
#include <tqpainter.h>
23
24
#include <kkeydialog.h>
25
#include <tdelocale.h>
26
#include <tdemessagebox.h>
27
#include <kdebug.h>
28
#include <kprinter.h>
29
#include <kurldrag.h>
30
31
#include "kiconedit.h"
32
#include "kiconcolors.h"
33
#include "palettetoolbar.h"
34
35
#ifndef PICS_INCLUDED
36
#define PICS_INCLUDED
37
#include "pics/logo.xpm"
38
#endif
39
40
void TDEIconEdit::updateProperties()
41
{
42
    TDEIconEditProperties *props = TDEIconEditProperties::self();
43
    gridview->setShowRulers(props->showRulers());
44
    if(props->bgMode() == TQWidget::FixedPixmap)
45
    {
46
        TQPixmap pix(props->bgPixmap());
47
        if(pix.isNull())
48
        {
49
            TQPixmap pmlogo((const char**)logo);
50
            pix = pmlogo;
51
        }
52
        gridview->viewPortWidget()->viewport()->setBackgroundPixmap(pix);
53
        m_paletteToolBar->setPreviewBackground(pix);
54
    }
55
    else
56
    {
57
        gridview->viewPortWidget()->viewport()
58
            ->setBackgroundColor(props->bgColor());
59
        m_paletteToolBar->setPreviewBackground(props->bgColor());
60
    }
61
    grid->setTransparencyDisplayType(props->transparencyDisplayType());
62
    grid->setTransparencySolidColor(props->transparencySolidColor());
63
    grid->setCheckerboardColor1(props->checkerboardColor1());
64
    grid->setCheckerboardColor2(props->checkerboardColor2());
65
    grid->setCheckerboardSize(props->checkerboardSize());
66
    grid->update();
67
}
68
69
void TDEIconEdit::slotNewWin(const TQString & url)
70
{
71
    //kdDebug(4640) << "TDEIconEdit::openNewWin() - " << url << endl;
72
73
    TDEIconEdit *w = new TDEIconEdit(KURL(url), "kiconedit");
74
    TQ_CHECK_PTR(w);
75
}
76
77
78
void TDEIconEdit::slotNew()
79
{
80
    bool cancel = false;
81
    if (grid->isModified())
82
    {
83
        int r = KMessageBox::warningYesNoCancel(this,
84
        i18n("The current file has been modified.\nDo you want to save it?"), TQString(), KStdGuiItem::save(), KStdGuiItem::discard());
85
86
        switch(r)
87
        {
88
            case KMessageBox::Yes:
89
                if(!icon->save(&grid->image()))
90
                {
91
                    cancel = true;
92
                }
93
                break;
94
95
            case KMessageBox::No:
96
                break;
97
98
            case KMessageBox::Cancel:
99
                cancel = true;
100
                break;
101
102
            default:
103
                break;
104
        }
105
    }
106
    if(!cancel)
107
    {
108
        KNewIcon newicon(this);
109
        if(newicon.exec())
110
        {
111
            int r = newicon.openStyle();
112
            if(r == KNewIcon::Blank)
113
            {
114
                grid->editClear();
115
                const TQSize s = newicon.templateSize();
116
                //kdDebug(4640) << "Size: " << s.width() << " x " << s.height() << endl;
117
                grid->setSize(s);
118
                grid->setModified(false);
119
            }
120
            else if(r == KNewIcon::Template)
121
            {
122
                TQString str = newicon.templatePath();
123
                icon->open(&grid->image(), KURL( str ));
124
            }
125
            icon->setUrl("");
126
            emit newname(i18n("Untitled"));
127
        }
128
    }
129
}
130
131
132
void TDEIconEdit::slotOpen()
133
{
134
    bool cancel = false;
135
136
    if( grid->isModified() )
137
    {
138
        int r = KMessageBox::warningYesNoCancel(this,
139
      i18n("The current file has been modified.\nDo you want to save it?"),TQString(), KStdGuiItem::save(), KStdGuiItem::discard());
140
141
        switch( r )
142
        {
143
            case KMessageBox::Yes:
144
                if(!icon->save( &grid->image() ))
145
                {
146
                    cancel = true;
147
                }
148
                break;
149
150
            case KMessageBox::No:
151
                break;
152
153
            case KMessageBox::Cancel:
154
                cancel = true;
155
                break;
156
157
            default:
158
                break;
159
        }
160
    }
161
162
    if( !cancel )
163
    {
164
        if (icon->promptForFile( &grid->image() ))
165
        {
166
            grid->setModified(false);
167
        }
168
    }
169
}
170
171
/*
172
    close only the current window
173
*/
174
void TDEIconEdit::slotClose()
175
{
176
    //kdDebug(4640) << "TDEIconEdit: Closing " <<  endl;
177
    close();
178
}
179
180
void TDEIconEdit::slotSave()
181
{
182
    //kdDebug(4640) << "TDEIconEdit: slotSave() " << endl;
183
    icon->save(&grid->image());
184
}
185
186
187
void TDEIconEdit::slotSaveAs()
188
{
189
    //kdDebug(4640) << "TDEIconEdit: slotSaveAs() " << endl;
190
    icon->saveAs(&grid->image());
191
}
192
193
194
void TDEIconEdit::slotPrint()
195
{
196
    KPrinter printer;
197
198
    if ( printer.setup(this, i18n("Print %1").arg(icon->url().section('/', -1))) )
199
    {
200
        int margin = 10, yPos = 0;
201
        printer.setCreator("TDE Icon Editor");
202
203
        TQPainter p;
204
        p.begin( &printer );
205
        TQFontMetrics fm = p.fontMetrics();
206
        // need width/height
207
        TQPaintDeviceMetrics metrics( &printer );
208
209
        p.drawText( margin, margin + yPos, metrics.width(), fm.lineSpacing(),
210
                        ExpandTabs | DontClip, icon->url() );
211
        yPos = yPos + fm.lineSpacing();
212
        p.drawPixmap( margin, margin + yPos, grid->pixmap() );
213
        p.end();
214
  }
215
}
216
217
void TDEIconEdit::slotZoomIn()
218
{
219
    grid->zoom(DirIn);
220
}
221
222
void TDEIconEdit::slotZoomOut()
223
{
224
    grid->zoom(DirOut);
225
}
226
227
void TDEIconEdit::slotZoom1()
228
{
229
    grid->zoomTo(1);
230
}
231
232
void TDEIconEdit::slotZoom2()
233
{
234
    grid->zoomTo(2);
235
}
236
237
void TDEIconEdit::slotZoom5()
238
{
239
    grid->zoomTo(5);
240
}
241
242
void TDEIconEdit::slotZoom10()
243
{
244
    grid->zoomTo(10);
245
}
246
247
void TDEIconEdit::slotCopy()
248
{
249
    grid->editCopy();
250
}
251
252
void TDEIconEdit::slotCut()
253
{
254
    grid->editCopy(true);
255
}
256
257
void TDEIconEdit::slotPaste()
258
{
259
    static_cast<TDERadioAction*>(actionCollection()
260
        ->action("tool_find_pixel"))->setChecked(true);
261
    grid->setTool(TDEIconEditGrid::Find);
262
    grid->editPaste();
263
}
264
265
void TDEIconEdit::slotClear()
266
{
267
    grid->editClear();
268
}
269
270
void TDEIconEdit::slotSelectAll()
271
{
272
    grid->setTool(TDEIconEditGrid::SelectRect);
273
    grid->editSelectAll();
274
}
275
276
void TDEIconEdit::slotOpenRecent(const KURL& iconFile)
277
{
278
    bool cancel = false;
279
280
    if( grid->isModified() )
281
    {
282
        int r = KMessageBox::warningYesNoCancel(this,
283
      i18n("The current file has been modified.\nDo you want to save it?"),TQString(), KStdGuiItem::save(), KStdGuiItem::discard());
284
285
        switch( r )
286
        {
287
            case KMessageBox::Yes:
288
                if (!icon->save( &grid->image() ))
289
                {
290
                    cancel = true;
291
                }
292
                break;
293
294
            case KMessageBox::No:
295
                break;
296
297
            case KMessageBox::Cancel:
298
                cancel = true;
299
                break;
300
301
            default:
302
                break;
303
        }
304
    }
305
306
    if( !cancel )
307
    {
308
        if(icon->open(&grid->image(), iconFile))
309
        {
310
            grid->setModified(false);
311
        }
312
    }
313
}
314
315
void TDEIconEdit::slotConfigureSettings()
316
{
317
    TDEIconConfig* c = new TDEIconConfig(this);
318
    c->exec();
319
    delete c;
320
}
321
322
void TDEIconEdit::slotConfigureKeys()
323
{
324
    KKeyDialog::configure(actionCollection());
325
326
    TDEIconEdit *ki = 0L;
327
    for (ki = windowList.first(); ki; ki = windowList.next())
328
    {
329
        if (ki != this)
330
        {
331
            ki->updateAccels();
332
        }
333
    }
334
}
335
336
void TDEIconEdit::slotShowGrid()
337
{
338
  bool b = TDEIconEditProperties::self()->showGrid();
339
  grid->setGrid( !b );
340
  TDEIconEditProperties::self()->setShowGrid( !b );
341
}
342
343
void TDEIconEdit::slotToolPointer()
344
{
345
    grid->setTool(TDEIconEditGrid::Find);
346
}
347
348
void TDEIconEdit::slotToolFreehand()
349
{
350
    grid->setTool(TDEIconEditGrid::Freehand);
351
}
352
353
void TDEIconEdit::slotToolRectangle()
354
{
355
    grid->setTool(TDEIconEditGrid::Rect);
356
}
357
358
void TDEIconEdit::slotToolFilledRectangle()
359
{
360
    grid->setTool(TDEIconEditGrid::FilledRect);
361
}
362
363
void TDEIconEdit::slotToolCircle()
364
{
365
    grid->setTool(TDEIconEditGrid::Circle);
366
}
367
368
void TDEIconEdit::slotToolFilledCircle()
369
{
370
    grid->setTool(TDEIconEditGrid::FilledCircle);
371
}
372
373
void TDEIconEdit::slotToolEllipse()
374
{
375
    grid->setTool(TDEIconEditGrid::Ellipse);
376
}
377
378
void TDEIconEdit::slotToolFilledEllipse()
379
{
380
    grid->setTool(TDEIconEditGrid::FilledEllipse);
381
}
382
383
void TDEIconEdit::slotToolSpray()
384
{
385
    grid->setTool(TDEIconEditGrid::Spray);
386
}
387
388
void TDEIconEdit::slotToolFlood()
389
{
390
    grid->setTool(TDEIconEditGrid::FloodFill);
391
}
392
393
void TDEIconEdit::slotToolLine()
394
{
395
    grid->setTool(TDEIconEditGrid::Line);
396
}
397
398
void TDEIconEdit::slotToolEraser()
399
{
400
    grid->setTool(TDEIconEditGrid::Eraser);
401
}
402
403
void TDEIconEdit::slotToolSelectRect()
404
{
405
    grid->setTool(TDEIconEditGrid::SelectRect);
406
}
407
408
void TDEIconEdit::slotToolSelectCircle()
409
{
410
    grid->setTool(TDEIconEditGrid::SelectCircle);
411
}
412
413
void TDEIconEdit::slotSaved()
414
{
415
    grid->setModified(false);
416
}
417
418
void TDEIconEdit::slotUpdateZoom( int s )
419
{
420
    m_actZoomOut->setEnabled( s>1 );
421
}
422
423
void TDEIconEdit::slotUpdateStatusPos(int x, int y)
424
{
425
    TQString str = i18n("Status Position", "%1, %2").arg(x).arg(y);
426
    statusbar->changeItem( str, 0);
427
}
428
429
void TDEIconEdit::slotUpdateStatusSize(int x, int y)
430
{
431
    TQString str = i18n("Status Size", "%1 x %2").arg(x).arg(y);
432
    statusbar->changeItem( str, 1);
433
}
434
435
void TDEIconEdit::slotUpdateStatusScaling(int s)
436
{
437
    TDEIconEditProperties::self()->setGridScale( s );
438
    TQString str;
439
440
    str.sprintf("1:%d", s);
441
    statusbar->changeItem( str, 2);
442
}
443
444
void TDEIconEdit::slotUpdateStatusColors(uint)
445
{
446
    TQString str = i18n("Colors: %1").arg(grid->numColors());
447
    statusbar->changeItem( str, 3);
448
}
449
450
void TDEIconEdit::slotUpdateStatusColors(uint n, uint *)
451
{
452
    TQString str = i18n("Colors: %1").arg(n);
453
    statusbar->changeItem( str, 3);
454
}
455
456
457
void TDEIconEdit::slotUpdateStatusMessage(const TQString & msg)
458
{
459
    statusbar->changeItem( msg, 4);
460
}
461
462
463
void TDEIconEdit::slotUpdateStatusName(const TQString & name)
464
{
465
    m_name = name;
466
467
    TQString text = m_name;
468
469
    if(grid->isModified())
470
    {
471
        text += " ["+i18n("modified")+"]";
472
    }
473
474
    setCaption(text);
475
}
476
477
478
void TDEIconEdit::slotUpdateStatusModified(bool)
479
{
480
    slotUpdateStatusName(m_name);
481
}
482
483
void TDEIconEdit::slotUpdatePaste(bool state)
484
{
485
    m_actPaste->setEnabled(state);
486
    m_actPasteNew->setEnabled(state);
487
}
488
489
490
void TDEIconEdit::slotUpdateCopy(bool state)
491
{
492
    m_actCopy->setEnabled(state);
493
    m_actCut->setEnabled(state);
494
}
495
496
497
void TDEIconEdit::slotOpenBlank(const TQSize s)
498
{
499
    grid->loadBlank( s.width(), s.height());
500
}
501
502
503
void TDEIconEdit::dragEnterEvent(TQDragEnterEvent* e)
504
{
505
  e->accept(KURLDrag::canDecode(e));
506
}
507
508
509
/*
510
    accept drop of a file - opens file in current window
511
    old code to drop image, as image, should be removed
512
*/
513
void TDEIconEdit::dropEvent( TQDropEvent *e )
514
{
515
    //kdDebug(4640) << "Got TQDropEvent!" << endl;
516
517
    KURL::List fileList;
518
    bool loadedinthis = false;
519
520
    if(KURLDrag::decode(e, fileList))
521
    {
522
        for(KURL::List::ConstIterator it = fileList.begin(); 
523
            it != fileList.end(); ++it)
524
        {
525
            //kdDebug(4640) << "In dropEvent for "  <<  (*it).prettyURL() << endl;
526
            const KURL &url = *it;
527
            if(url.isValid())
528
            {
529
                if (!grid->isModified() && !loadedinthis)
530
                {
531
                    icon->open(&grid->image(), url);
532
                    loadedinthis = true;
533
                }
534
                else
535
                {
536
                    slotNewWin(url.url());
537
                }
538
            }
539
        }
540
    }
541
}
542
543
(-)tdegraphics/kiconedit/kiconeditui.rc (-66 lines)
Lines 1-66 Link Here
1
<!DOCTYPE kpartgui>
2
<kpartgui version="2" name="kiconedit">
3
<MenuBar>
4
  <Menu name="file"><text>&amp;File</text>
5
    <Action name="file_new_window" append="new_merge"/>
6
  </Menu>
7
  <Menu name="edit"><text>&amp;Edit</text>
8
    <Action name="edit_paste_as_new" append="edit_paste_merge"/>
9
    <Separator/>
10
    <Action name="edit_resize"/>
11
    <Action name="edit_grayscale"/>
12
  </Menu>
13
  <Menu name="tools"><text>&amp;Tools</text>
14
    <Action name="tool_freehand"/>
15
    <Action name="tool_find_pixel"/>
16
    <Action name="tool_rectangle"/>
17
    <Action name="tool_filled_rectangle"/>
18
    <Action name="tool_circle"/>
19
    <Action name="tool_filled_circle"/>
20
    <Action name="tool_ellipse"/>
21
    <Action name="tool_filled_ellipse"/>
22
    <Action name="tool_spray"/>
23
    <Action name="tool_flood_fill"/>
24
    <Action name="tool_line"/>
25
    <Action name="tool_eraser"/>
26
    <Separator/>
27
    <Action name="edit_select_rectangle"/>
28
    <Action name="edit_select_circle"/>
29
  </Menu>
30
  <Menu name="settings"><text>&amp;Settings</text>
31
    <Action name="options_show_grid" append="show_merge"/>
32
  </Menu>
33
</MenuBar>
34
<ToolBar name="mainToolBar" newline="true" fullwidth="true">
35
  <text>Main Toolbar</text>
36
  <Action name="view_zoom_in"/>
37
  <Action name="view_zoom_out"/>
38
  <Separator/>
39
  <Action name="edit_resize"/>
40
  <Action name="edit_grayscale"/>
41
  <Separator/>
42
  <Action name="options_show_grid"/>
43
</ToolBar>
44
<ToolBar name="toolsToolBar" position="left" noEdit="true">
45
  <text>Tools Toolbar</text>
46
  <Action name="tool_freehand"/>
47
  <Action name="tool_find_pixel"/>
48
  <Action name="tool_rectangle"/>
49
  <Action name="tool_filled_rectangle"/>
50
  <Action name="tool_circle"/>
51
  <Action name="tool_filled_circle"/>
52
  <Action name="tool_ellipse"/>
53
  <Action name="tool_filled_ellipse"/>
54
  <Action name="tool_spray"/>
55
  <Action name="tool_flood_fill"/>
56
  <Action name="tool_line"/>
57
  <Action name="tool_eraser"/>
58
  <Separator/>
59
  <Action name="edit_select_rectangle"/>
60
  <Action name="edit_select_circle"/>
61
</ToolBar>
62
<ToolBar name="paletteToolBar" position="right" noEdit="true">
63
  <text>Pallette Toolbar</text>
64
</ToolBar>
65
</kpartgui>
66
(-)tdegraphics/kiconedit/kicongrid.cpp (-2263 lines)
Lines 1-2263 Link Here
1
/*
2
    TDE Icon Editor - a small graphics drawing program for the TDE.
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    Includes portions of code from TQt,
6
    Copyright (C) 1992-2000 Trolltech AS.
7
8
    This program is free software; you can redistribute it and/or
9
    modify it under the terms of the GNU General Public
10
    License as published by the Free Software Foundation; either
11
    version 2 of the License, or (at your option) any later version.
12
13
    This program is distributed in the hope that it will be useful,
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
    General Public License for more details.
17
18
    You should have received a copy of the GNU Library General Public License
19
    along with this library; see the file COPYING.LIB.  If not, write to
20
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
    Boston, MA 02110-1301, USA.
22
*/
23
24
#include <stdlib.h>
25
26
#include <tqpainter.h>
27
#include <tqwhatsthis.h>
28
#include <tqscrollview.h>
29
#include <tqbitmap.h>
30
#include <tqclipboard.h>
31
#include <tqdatetime.h>
32
33
#include <kiconloader.h>
34
#include <kruler.h>
35
#include <tdelocale.h>
36
#include <tdemessagebox.h>
37
#include <kdebug.h>
38
39
#include "kresize.h"
40
#include "properties.h"
41
#include "kicongrid.h"
42
#include "kiconedit.h"
43
#ifndef PICS_INCLUDED
44
#include "pics/logo.xpm"
45
#define PICS_INCLUDED
46
#endif
47
48
#include <X11/Xos.h>
49
50
void DrawCommand::execute()
51
{
52
	oldcolor = *((uint*)image->scanLine(y) + x);
53
	*((uint*)image->scanLine(y) + x) = newcolor; 
54
        int cell = y * grid->numCols() + x;
55
        grid->setUndoColor( cell, newcolor, false );
56
}
57
58
void DrawCommand::unexecute()
59
{
60
	*((uint*)image->scanLine(y) + x) = oldcolor; 
61
        int cell = y * grid->numCols() + x;
62
        grid->setUndoColor( cell, oldcolor, false );
63
}
64
65
void RepaintCommand::execute()
66
{
67
        grid->update( area);
68
}
69
70
KGridView::KGridView(TQImage *image, KCommandHistory* history, TQWidget *parent, const char *name)
71
: TQFrame(parent, name)
72
{
73
  _corner = 0L;
74
  _hruler = _vruler = 0L;
75
  _grid = 0L;
76
77
  acceptdrop = false;
78
79
  TDEIconEditProperties *props = TDEIconEditProperties::self();
80
81
  viewport = new TQScrollView(this);
82
  TQ_CHECK_PTR(viewport);
83
84
  _grid = new TDEIconEditGrid(image, history, viewport->viewport());
85
  TQ_CHECK_PTR(_grid);
86
  viewport->addChild(_grid);
87
  _grid->setGrid(props->showGrid());
88
  _grid->setCellSize(props->gridScale());
89
90
  TQString str = i18n( "Icon draw grid\n\nThe icon grid is the area where"
91
      " you draw the icons.\nYou can zoom in and out using the magnifying"
92
      " glasses on the toolbar.\n(Tip: Hold the magnify button down for a"
93
      " few seconds to zoom to a predefined scale)" );
94
  TQWhatsThis::add( _grid, str );
95
96
  if(props->bgMode() == FixedPixmap)
97
  {
98
    TQPixmap pix(props->bgPixmap());
99
    if(pix.isNull())
100
    {
101
      TQPixmap pmlogo((const char **)logo);
102
      pix = pmlogo;
103
    }
104
    viewport->viewport()->setBackgroundPixmap(pix);
105
    _grid->setBackgroundPixmap(pix);
106
  }
107
  else
108
  {
109
    viewport->viewport()->setBackgroundColor(props->bgColor());
110
  }
111
112
  _corner = new TQFrame(this);
113
  _corner->setFrameStyle(TQFrame::WinPanel | TQFrame::Raised);
114
115
  _hruler = new KRuler(Qt::Horizontal, this);
116
  _hruler->setEndLabel(i18n("width"));
117
  _hruler->setOffset( -2 );
118
  _hruler->setRange(0, 1000);
119
120
  _vruler = new KRuler(Qt::Vertical, this);
121
  _vruler->setEndLabel(i18n("height"));
122
  _vruler->setOffset( -2 );
123
  _vruler->setRange(0, 1000);
124
125
  str = i18n( "Rulers\n\nThis is a visual representation of the current"
126
      " cursor position" );
127
  TQWhatsThis::add( _hruler, str );
128
  TQWhatsThis::add( _vruler, str );
129
130
  connect(_grid, TQT_SIGNAL(scalingchanged(int)), TQT_SLOT(scalingChange(int)));
131
  connect(_grid, TQT_SIGNAL(sizechanged(int, int)), TQT_SLOT(sizeChange(int, int)));
132
  connect(_grid, TQT_SIGNAL(needPainting()), TQT_SLOT(paintGrid()));
133
  connect( _grid, TQT_SIGNAL(xposchanged(int)), _hruler, TQT_SLOT(slotNewValue(int)) );
134
  connect( _grid, TQT_SIGNAL(yposchanged(int)), _vruler, TQT_SLOT(slotNewValue(int)) );
135
  connect(viewport, TQT_SIGNAL(contentsMoving(int, int)), TQT_SLOT(moving(int, int)));
136
  
137
  setSizes();
138
  TQResizeEvent e(size(), size());
139
  resizeEvent(&e);
140
}
141
142
void KGridView::paintGrid()
143
{
144
  _grid->update(viewRect());
145
}
146
147
void KGridView::setSizes()
148
{
149
  if(TDEIconEditProperties::self()->showRulers())
150
  {
151
    _hruler->setLittleMarkDistance(_grid->scaling());
152
    _vruler->setLittleMarkDistance(_grid->scaling());
153
154
    _hruler->setMediumMarkDistance(5);
155
    _vruler->setMediumMarkDistance(5);
156
157
    _hruler->setBigMarkDistance(10);
158
    _vruler->setBigMarkDistance(10);
159
160
    _hruler->setShowTinyMarks(true);
161
    _hruler->setShowLittleMarks(false);
162
    _hruler->setShowMediumMarks(true);
163
    _hruler->setShowBigMarks(true);
164
    _hruler->setShowEndMarks(true);
165
166
    _vruler->setShowTinyMarks(true);
167
    _vruler->setShowLittleMarks(false);
168
    _vruler->setShowMediumMarks(true);
169
    _vruler->setShowBigMarks(true);
170
    _vruler->setShowEndMarks(true);
171
172
    _hruler->setPixelPerMark(_grid->scaling());
173
    _vruler->setPixelPerMark(_grid->scaling());
174
175
    _hruler->setMaxValue(_grid->width()+20);
176
    _vruler->setMaxValue(_grid->height()+20);
177
178
    _hruler->show();
179
    _vruler->show();
180
181
    _corner->show();
182
    //resize(_grid->width()+_vruler->width(), _grid->height()+_hruler->height());
183
  }
184
  else
185
  {
186
    _hruler->hide();
187
    _vruler->hide();
188
    _corner->hide();
189
    //resize(_grid->size());
190
  }
191
}
192
193
void KGridView::sizeChange(int, int)
194
{
195
    setSizes();
196
}
197
198
void KGridView::moving(int x, int y)
199
{
200
    _hruler->setOffset(abs(x));
201
    _vruler->setOffset(abs(y));
202
}
203
204
void KGridView::scalingChange(int)
205
{
206
    setSizes();
207
}
208
209
void KGridView::setShowRulers(bool mode)
210
{
211
    TDEIconEditProperties::self()->setShowRulers( mode );
212
    setSizes();
213
    TQResizeEvent e(size(), size());
214
    resizeEvent(&e);
215
}
216
217
void KGridView::setAcceptDrop(bool a)
218
{
219
    if(a == acceptdrop) return;
220
    acceptdrop = a;
221
    paintDropSite();
222
}
223
224
void KGridView::checkClipboard()
225
{
226
     _grid->checkClipboard();
227
}
228
229
const TQRect KGridView::viewRect()
230
{
231
    int x, y, cx, cy;
232
    if(viewport->horizontalScrollBar()->isVisible())
233
    {
234
        x = viewport->contentsX();
235
        cx = viewport->viewport()->width();
236
    }
237
    else
238
    {
239
        x = 0;
240
        cx = viewport->contentsWidth();
241
    }
242
243
    if(viewport->verticalScrollBar()->isVisible())
244
    {
245
        y = viewport->contentsY();
246
        cy = viewport->viewport()->height();
247
    }
248
    else
249
    {
250
        y = 0;
251
        cy = viewport->contentsHeight();
252
    }
253
254
    return TQRect(x, y, cx, cy);
255
}
256
257
void KGridView::paintDropSite()
258
{
259
    TQPainter p;
260
    p.begin( _grid );
261
    p.setRasterOp (NotROP);
262
    p.drawRect(viewRect());
263
    p.end();
264
}
265
266
void KGridView::paintEvent(TQPaintEvent *)
267
{
268
  if(acceptdrop)
269
    paintDropSite();
270
}
271
272
273
void KGridView::resizeEvent(TQResizeEvent*)
274
{
275
  kdDebug(4640) << "KGridView::resizeEvent" << endl;
276
277
  setSizes();
278
279
  if(TDEIconEditProperties::self()->showRulers())
280
  {
281
    _hruler->setGeometry(_vruler->width(), 0, width(), _hruler->height());
282
    _vruler->setGeometry(0, _hruler->height(), _vruler->width(), height());
283
284
    _corner->setGeometry(0, 0, _vruler->width(), _hruler->height());
285
    viewport->setGeometry(_corner->width(), _corner->height(),
286
                   width()-_corner->width(), height()-_corner->height());
287
  }
288
  else
289
    viewport->setGeometry(0, 0, width(), height());
290
}
291
292
293
TDEIconEditGrid::TDEIconEditGrid(TQImage *image, KCommandHistory* h, TQWidget *parent, const char *name)
294
 : KColorGrid(parent, name, 1)
295
{
296
    img = image;
297
    history = h;
298
    selected = 0;
299
    m_command = 0;
300
301
    // the 42 normal kde colors - there can be an additional
302
    // 18 custom colors in the custom colors palette
303
    for(uint i = 0; i < 42; i++)
304
        iconcolors.append(iconpalette[i]);
305
306
    setupImageHandlers();
307
    btndown = isselecting = ispasting = modified = false;
308
309
    img->create(32, 32, 32);
310
    img->setAlphaBuffer(true);
311
    clearImage(img);
312
313
    currentcolor = tqRgb(0,0,0)|OPAQUE_MASK;
314
    emit colorSelected(currentcolor);
315
316
    setMouseTracking(true);
317
318
    setNumRows(32);
319
    setNumCols(32);
320
    fill(TRANSPARENT);
321
322
    connect( kapp->clipboard(), TQT_SIGNAL(dataChanged()), TQT_SLOT(checkClipboard()));
323
    connect( h, TQT_SIGNAL(commandExecuted()), this, TQT_SLOT(updatePreviewPixmap() ));    
324
    createCursors();
325
326
    TDEIconEditProperties *props = TDEIconEditProperties::self();
327
328
    setTransparencyDisplayType(props->transparencyDisplayType());
329
    setTransparencySolidColor(props->transparencySolidColor());
330
    setCheckerboardColor1(props->checkerboardColor1());
331
    setCheckerboardColor2(props->checkerboardColor2());
332
    setCheckerboardSize(props->checkerboardSize());
333
}
334
335
TDEIconEditGrid::~TDEIconEditGrid()
336
{
337
    kdDebug(4640) << "TDEIconEditGrid - destructor: done" << endl;
338
}
339
340
void TDEIconEditGrid::paintEvent(TQPaintEvent *e)
341
{
342
  const TQRect cellsRect(0, 0, numCols() * cellSize(), numRows() * cellSize());
343
  const TQRect paintCellsRect = cellsRect.intersect(e->rect());
344
345
  if(!paintCellsRect.isEmpty())
346
  {
347
    //TQTime time;
348
349
    //time.start();
350
351
    TQRgb *imageBuffer = new TQRgb[paintCellsRect.width() * paintCellsRect.height()];
352
    const int cellsize = cellSize();
353
    const int firstCellPixelsRemaining = cellsize - paintCellsRect.left() % cellsize;
354
355
    if(transparencyDisplayType() == TRD_SOLIDCOLOR)
356
    {
357
      const TQRgb backgroundColor = transparencySolidColor().rgb();
358
      const int backgroundRed = transparencySolidColor().red();
359
      const int backgroundGreen = transparencySolidColor().green();
360
      const int backgroundBlue = transparencySolidColor().blue();
361
      const int firstCellX = paintCellsRect.left() / cellsize;
362
363
      for(int y = paintCellsRect.top(); y <= paintCellsRect.bottom(); y++)
364
      {
365
        TQRgb *dest = imageBuffer + (y - paintCellsRect.top()) * paintCellsRect.width();
366
        
367
        if(y % cellsize == 0 || dest == imageBuffer)
368
        {
369
          // Paint the first scanline in each block of cellSize() identical lines.
370
          // The remaineder can just be copied from this one.
371
          const int cellY = y / cellsize;
372
          TQRgb *src = gridcolors.data() + cellY * numCols() + firstCellX;
373
374
          TQRgb sourcePixel = *src++;
375
          int sourceAlpha = tqAlpha(sourcePixel);
376
          
377
          TQRgb c;
378
379
          if(sourceAlpha == 255)
380
          {
381
            c = sourcePixel;
382
          }
383
          else
384
          if(sourceAlpha == 0)
385
          {
386
            c = backgroundColor;
387
          }
388
          else
389
          {
390
            const int sourceRed = tqRed(sourcePixel);
391
            const int sourceGreen = tqGreen(sourcePixel);
392
            const int sourceBlue = tqBlue(sourcePixel);
393
394
            int r = (sourceAlpha * (sourceRed - backgroundRed)) + 0x80;
395
            r = backgroundRed + ((r + (r >> 8)) >> 8);
396
397
            int g = (sourceAlpha * (sourceGreen - backgroundGreen)) + 0x80;
398
            g = backgroundGreen + ((g + (g >> 8)) >> 8);
399
400
            int b = (sourceAlpha * (sourceBlue - backgroundBlue)) + 0x80;
401
            b = backgroundBlue + ((b + (b >> 8)) >> 8);
402
403
            c = tqRgb(r, g, b);
404
          }
405
406
          int cellPixelsRemaining = firstCellPixelsRemaining;
407
408
          for(int x = paintCellsRect.left(); x <= paintCellsRect.right(); x++)
409
          {
410
            if(cellPixelsRemaining == 0)
411
            {
412
              cellPixelsRemaining = cellsize;
413
414
              // Fetch the next source pixel
415
              sourcePixel = *src++;
416
              sourceAlpha = tqAlpha(sourcePixel);
417
418
              if(sourceAlpha == 255)
419
              {
420
                c = sourcePixel;
421
              }
422
              else
423
              if(sourceAlpha == 0)
424
              {
425
                c = backgroundColor;
426
              }
427
              else
428
              {
429
                const int sourceRed = tqRed(sourcePixel);
430
                const int sourceGreen = tqGreen(sourcePixel);
431
                const int sourceBlue = tqBlue(sourcePixel);
432
433
                //int r = backgroundRed + (sourceAlpha * (sourceRed - backgroundRed)) / 255;
434
                //int g = backgroundGreen + (sourceAlpha * (sourceGreen - backgroundGreen)) / 255;
435
                //int b = backgroundBlue + (sourceAlpha * (sourceBlue - backgroundBlue)) / 255;
436
437
                int r = (sourceAlpha * (sourceRed - backgroundRed)) + 0x80;
438
                r = backgroundRed + ((r + (r >> 8)) >> 8);
439
440
                int g = (sourceAlpha * (sourceGreen - backgroundGreen)) + 0x80;
441
                g = backgroundGreen + ((g + (g >> 8)) >> 8);
442
443
                int b = (sourceAlpha * (sourceBlue - backgroundBlue)) + 0x80;
444
                b = backgroundBlue + ((b + (b >> 8)) >> 8);
445
446
                c = tqRgb(r, g, b);
447
              }
448
            }
449
450
            cellPixelsRemaining--;
451
452
            *dest++ = c;
453
          }
454
        }
455
        else
456
        {
457
          // Copy the scanline above.
458
          memcpy(dest, dest - paintCellsRect.width(), paintCellsRect.width() * sizeof(TQRgb));
459
        }
460
      }
461
    }
462
    else
463
    {
464
      int squareSize;
465
      const int fixedPointMultiplier = 4;
466
467
      if(checkerboardSize() == CHK_SMALL)
468
      {
469
        squareSize = (cellSize() * fixedPointMultiplier) / 4;
470
      }
471
      else
472
      if(checkerboardSize() == CHK_MEDIUM)
473
      {
474
        squareSize = (cellSize() * fixedPointMultiplier) / 2;
475
      }
476
      else
477
      {
478
        squareSize = (2 * cellSize() * fixedPointMultiplier) / 2;
479
      }
480
481
      TQRgb *color1ScanLine = new TQRgb[paintCellsRect.width()];
482
      TQRgb *color2ScanLine = new TQRgb[paintCellsRect.width()];
483
      TQRgb *color1Buffer = color1ScanLine;
484
      TQRgb *color2Buffer = color2ScanLine;
485
486
      for(int x = paintCellsRect.left(); x <= paintCellsRect.right(); x++)
487
      {
488
        if((((x * fixedPointMultiplier) / squareSize) & 1) == 0)
489
        {
490
          *color1Buffer++ = checkerboardColor1().rgb();
491
          *color2Buffer++ = checkerboardColor2().rgb();
492
        }
493
        else
494
        {
495
          *color1Buffer++ = checkerboardColor2().rgb();
496
          *color2Buffer++ = checkerboardColor1().rgb();
497
        }
498
      }
499
500
      const int firstCellX = paintCellsRect.left() / cellsize;
501
      const int firstCellPixelsRemaining = cellsize - paintCellsRect.left() % cellsize;
502
      int lastCellY = -1;
503
      int lastLineFirstSquareColour = 0;
504
505
      for(int y = paintCellsRect.top(); y <= paintCellsRect.bottom(); y++)
506
      {
507
        TQRgb *dest = imageBuffer + (y - paintCellsRect.top()) * paintCellsRect.width();
508
        const int cellY = y / cellsize;
509
510
        int firstSquareColour;
511
        const TQRgb *checkerboardSrc;
512
513
        if((((y * fixedPointMultiplier) / squareSize) & 1) == 0)
514
        {
515
          firstSquareColour = 1;
516
          checkerboardSrc = color1ScanLine;
517
        }
518
        else
519
        {
520
          firstSquareColour = 2;
521
          checkerboardSrc = color2ScanLine;
522
        }
523
524
        if(cellY == lastCellY && firstSquareColour == lastLineFirstSquareColour)
525
        {
526
          // Copy the scanline above.
527
          memcpy(dest, dest - paintCellsRect.width(), paintCellsRect.width() * sizeof(TQRgb));
528
        }
529
        else
530
        {
531
          TQRgb *src = gridcolors.data() + cellY * numCols() + firstCellX;
532
533
          TQRgb sourcePixel = *src++;
534
          int sourceRed = tqRed(sourcePixel);
535
          int sourceGreen = tqGreen(sourcePixel);
536
          int sourceBlue = tqBlue(sourcePixel);
537
          int sourceAlpha = tqAlpha(sourcePixel);
538
539
          int cellPixelsRemaining = firstCellPixelsRemaining;
540
541
          for(int x = paintCellsRect.left(); x <= paintCellsRect.right(); x++)
542
          {
543
            if(cellPixelsRemaining == 0)
544
            {
545
              cellPixelsRemaining = cellsize;
546
547
              // Fetch the next source pixel
548
              sourcePixel = *src++;
549
              sourceRed = tqRed(sourcePixel);
550
              sourceGreen = tqGreen(sourcePixel);
551
              sourceBlue = tqBlue(sourcePixel);
552
              sourceAlpha = tqAlpha(sourcePixel);
553
            }
554
555
            cellPixelsRemaining--;
556
557
            TQRgb c;
558
559
            if(sourceAlpha == 255)
560
            {
561
              c = sourcePixel;
562
            }
563
            else
564
            if(sourceAlpha == 0)
565
            {
566
              c = *checkerboardSrc;
567
            }
568
            else
569
            {
570
              const int backgroundColor = *checkerboardSrc;
571
              const int backgroundRed = tqRed(backgroundColor);
572
              const int backgroundGreen = tqGreen(backgroundColor);
573
              const int backgroundBlue = tqBlue(backgroundColor);
574
575
              //int r = backgroundRed + (sourceAlpha * (sourceRed - backgroundRed)) / 255;
576
              //int g = backgroundGreen + (sourceAlpha * (sourceGreen - backgroundGreen)) / 255;
577
              //int b = backgroundBlue + (sourceAlpha * (sourceBlue - backgroundBlue)) / 255;
578
579
              int r = (sourceAlpha * (sourceRed - backgroundRed)) + 0x80;
580
              r = backgroundRed + ((r + (r >> 8)) >> 8);
581
582
              int g = (sourceAlpha * (sourceGreen - backgroundGreen)) + 0x80;
583
              g = backgroundGreen + ((g + (g >> 8)) >> 8);
584
585
              int b = (sourceAlpha * (sourceBlue - backgroundBlue)) + 0x80;
586
              b = backgroundBlue + ((b + (b >> 8)) >> 8);
587
588
              c = tqRgb(r, g, b);
589
            }
590
591
            *dest++ = c;
592
            checkerboardSrc++;
593
          }
594
        }
595
596
        lastCellY = cellY;
597
        lastLineFirstSquareColour = firstSquareColour;
598
      }
599
600
      delete [] color1ScanLine;
601
      delete [] color2ScanLine;
602
    }
603
604
    TQImage image((uchar *)(imageBuffer), paintCellsRect.width(), paintCellsRect.height(), 32, 0, 0,
605
#if X_BYTE_ORDER == X_LITTLE_ENDIAN
606
      TQImage::LittleEndian);
607
#else
608
      TQImage::BigEndian);
609
#endif
610
    Q_ASSERT(!image.isNull());
611
612
    TQPixmap _pixmap;
613
    _pixmap.convertFromImage(image);
614
615
    TQPainter p;
616
    p.begin(&_pixmap);
617
    paintForeground(&p, e);
618
    p.end();
619
620
    bitBlt(this, paintCellsRect.left(), paintCellsRect.top(), &_pixmap);
621
622
    //kdDebug(4640) << "Image render elapsed: " << time.elapsed() << endl;
623
624
    delete [] imageBuffer;
625
  }
626
}
627
628
void TDEIconEditGrid::paintForeground(TQPainter* p, TQPaintEvent* e)
629
{
630
    TQWMatrix matrix;
631
632
    matrix.translate(-e->rect().x(), -e->rect().y());
633
    p->setWorldMatrix( matrix );
634
635
    TQRect cellsRect(0, 0, numCols() * cellSize(), numRows() * cellSize());
636
    TQRect paintCellsRect = cellsRect.intersect(e->rect());
637
638
    if(!paintCellsRect.isEmpty())
639
    {
640
      int firstColumn = paintCellsRect.left() / cellSize();
641
      int lastColumn = paintCellsRect.right() / cellSize();
642
643
      int firstRow = paintCellsRect.top() / cellSize();
644
      int lastRow = paintCellsRect.bottom() / cellSize();
645
646
      p->setPen(TQColor(0, 0, 0));
647
      p->setBrush(TQColor(0, 0, 0));
648
649
      for(int column = firstColumn; column <= lastColumn; column++)
650
      {
651
        for(int row = firstRow; row <= lastRow; row++)
652
        {
653
          int x = column * cellSize();
654
          int y = row * cellSize();
655
656
          if((ispasting || isselecting) && isMarked(column, row))
657
          {
658
            p->drawWinFocusRect(x + 1, y + 1, cellSize() - 2, cellSize() - 2);
659
          }
660
          else
661
          {
662
            switch( tool )
663
            {
664
              case FilledRect:
665
              case Rect:
666
              case Ellipse:
667
              case Circle:
668
              case FilledEllipse:
669
              case FilledCircle:
670
              case Line:
671
                if(btndown && isMarked(column, row))
672
                {
673
                  if(cellSize() > 1)
674
                  {
675
                    p->drawWinFocusRect( x + 1, y + 1, cellSize() - 2, cellSize() - 2);
676
                  }
677
                  else
678
                  {
679
                    p->drawPoint(x, y);
680
                  }
681
                }
682
                break;
683
684
              default:
685
                break;
686
            }
687
          }
688
        }
689
      }
690
    }
691
692
    if(hasGrid()&& !(cellSize()==1))
693
    {
694
        p->setPen(TQColor(0, 0, 0));
695
        int x = e->rect().x() - ((e->rect().x() % cellSize()) + cellSize());
696
        if(x < 0) x = 0;
697
        int y = e->rect().y() - ((e->rect().y() % cellSize()) + cellSize());
698
        if(y < 0) y = 0;
699
        int cx = e->rect().right() + cellSize();
700
        int cy = e->rect().bottom() + cellSize();
701
702
        // draw grid lines
703
        for(int i = x; i < cx; i += cellSize())
704
            p->drawLine(i, y, i, cy);
705
706
        for(int i = y; i < cy; i += cellSize())
707
            p->drawLine(x, i, cx, i);
708
    }
709
}
710
711
void TDEIconEditGrid::mousePressEvent( TQMouseEvent *e )
712
{
713
    if(!e || (e->button() != Qt::LeftButton))
714
        return;
715
716
    int row = findRow( e->pos().y() );
717
    int col = findCol( e->pos().x() );
718
    //int cell = row * numCols() + col;
719
720
    if(!img->valid(col, row))
721
        return;
722
723
    btndown = true;
724
    start.setX(col);
725
    start.setY(row);
726
727
    if(ispasting)
728
    {
729
        ispasting = false;
730
        editPaste(true);
731
    }
732
733
    if(isselecting)
734
    {
735
        TQPointArray a(pntarray.copy());
736
        pntarray.resize(0);
737
        drawPointArray(a, Mark);
738
        emit selecteddata(false);
739
    }
740
741
    switch( tool )
742
    {
743
        case SelectRect:
744
        case SelectCircle:
745
            isselecting = true;
746
            break;
747
        default:
748
            break;
749
    }
750
}
751
752
void TDEIconEditGrid::mouseMoveEvent( TQMouseEvent *e )
753
{
754
    if(!e) return;
755
756
    int row = findRow( e->pos().y() );
757
    int col = findCol( e->pos().x() );
758
    int cell = row * numCols() + col;
759
760
    if(img->valid(col, row))
761
    {
762
        //kdDebug(4640) << col << " X " << row << endl;
763
        emit poschanged(col, row);
764
        // for the rulers
765
        emit xposchanged((col*scaling())+scaling()/2);
766
        emit yposchanged((row*scaling())+scaling()/2);
767
    }
768
769
    TQPoint tmpp(col, row);
770
    if(tmpp == end) return;
771
772
    // need to use intersection of rectangles to allow pasting
773
    // only that part of clip image which intersects -jwc-
774
    if(ispasting && !btndown && img->valid(col, row))
775
    {
776
        if( (col + cbsize.width()) > (numCols()-1) )
777
            insrect.setX(numCols()-insrect.width());
778
        else
779
            insrect.setX(col);
780
        if( (row + cbsize.height()) > (numRows()-1) )
781
            insrect.setY(numRows()-insrect.height());
782
        else
783
            insrect.setY(row);
784
785
        insrect.setSize(cbsize);
786
        start = insrect.topLeft();
787
        end = insrect.bottomRight();
788
        drawRect(false);
789
        return;
790
    }
791
792
    if(!img->valid(col, row) || !btndown)
793
        return;
794
795
    end.setX(col);
796
    end.setY(row);
797
798
    if(isselecting)
799
    {
800
        if(tool == SelectRect)
801
            drawRect(false);
802
        else
803
            drawEllipse(false);
804
        return;
805
    }
806
807
    bool erase=false;
808
    switch( tool )
809
    {
810
        case Eraser:
811
            erase=true;
812
813
        case Freehand:
814
        {
815
            if( !m_command )
816
                m_command = new KMacroCommand( i18n("Free Hand") );
817
            
818
            if(erase)
819
                setColor( cell, TRANSPARENT );
820
            else
821
                setColor( cell, currentcolor );
822
823
            if ( selected != cell )
824
            {
825
                setModified( true );
826
                int prevSel = selected;
827
                selected = cell;
828
                TQRect area = TQRect( col*cellsize,row*cellsize, cellsize, cellsize ).unite( 
829
                    TQRect ( (prevSel%numCols())*cellsize,(prevSel/numCols())*cellsize, cellsize, cellsize ) );
830
                    
831
                m_command->addCommand( new RepaintCommand( area, this ) );
832
                DrawCommand* dc = new DrawCommand( col, row, colorAt(cell), img, this );
833
                RepaintCommand* rp = new RepaintCommand( area, this );
834
                dc->execute();
835
                rp->execute();
836
                m_command->addCommand( dc );
837
                m_command->addCommand( rp );
838
            }
839
            break;
840
        }
841
        case Find:
842
        {
843
            iconcolors.closestMatch(colorAt(cell));
844
            if ( selected != cell )
845
            {
846
                int prevSel = selected;
847
                selected = cell;
848
                update((prevSel%numCols())*cellsize,(prevSel/numCols())*cellsize, cellsize, cellsize);
849
                update(col*cellsize,row*cellsize, cellsize, cellsize);
850
                emit colorSelected(colorAt(selected));
851
            }
852
            break;
853
        }
854
        case Ellipse:
855
        case Circle:
856
        case FilledEllipse:
857
        case FilledCircle:
858
        {
859
            drawEllipse(false);
860
            break;
861
        }
862
        case FilledRect:
863
        case Rect:
864
        {
865
            drawRect(false);
866
            break;
867
        }
868
        case Line:
869
        {
870
            drawLine(false, false);
871
            break;
872
        }
873
        case Spray:
874
        {
875
            drawSpray(TQPoint(col, row));
876
            setModified(true);
877
            break;
878
        }
879
        default:
880
            break;
881
    }
882
883
    p = *img;
884
    emit changed(TQPixmap(p));
885
}
886
887
void TDEIconEditGrid::mouseReleaseEvent( TQMouseEvent *e )
888
{
889
  if(!e || (e->button() != Qt::LeftButton))
890
    return;
891
892
  int row = findRow( e->pos().y() );
893
  int col = findCol( e->pos().x() );
894
  btndown = false;
895
  end.setX(col);
896
  end.setY(row);
897
  int cell = row * numCols() + col;
898
  bool erase=false;
899
  switch( tool )
900
  {
901
    case Eraser:
902
        erase=true;
903
      //currentcolor = TRANSPARENT;
904
    case Freehand:
905
    {
906
      if(!img->valid(col, row))
907
        return;
908
      if(erase)
909
        setColor( cell, TRANSPARENT );
910
      else
911
        setColor( cell, currentcolor );
912
      //if ( selected != cell )
913
      //{
914
        setModified( true );
915
        int prevSel = selected;
916
        selected = cell;
917
        update((prevSel%numCols())*cellsize,(prevSel/numCols())*cellsize, cellsize, cellsize);
918
        update(col*cellsize,row*cellsize, cellsize, cellsize);
919
        //updateCell( prevSel/numCols(), prevSel%numCols(), FALSE );
920
        //updateCell( row, col, FALSE );
921
        *((uint*)img->scanLine(row) + col) = colorAt(cell);
922
        p = *img;
923
      //}
924
      
925
        if( m_command ) {
926
            history->addCommand( m_command, false );
927
            m_command = 0;
928
        }
929
        
930
      break;
931
    }
932
    case Ellipse:
933
    case Circle:
934
    case FilledEllipse:
935
    case FilledCircle:
936
    {
937
      drawEllipse(true);
938
      break;
939
    }
940
    case FilledRect:
941
    case Rect:
942
    {
943
      drawRect(true);
944
      break;
945
    }
946
    case Line:
947
    {
948
      drawLine(true, false);
949
      break;
950
    }
951
    case Spray:
952
    {
953
      drawSpray(TQPoint(col, row));
954
      break;
955
    }
956
    case FloodFill:
957
    {
958
      TQApplication::setOverrideCursor(waitCursor);
959
      drawFlood(col, row, colorAt(cell));
960
      TQApplication::restoreOverrideCursor();
961
      updateColors();
962
      emit needPainting();
963
      p = *img;
964
      break;
965
    }
966
    case Find:
967
    {
968
      currentcolor = colorAt(cell);
969
      if ( selected != cell )
970
      {
971
        int prevSel = selected;
972
        selected = cell;
973
        update((prevSel%numCols())*cellsize,(prevSel/numCols())*cellsize, cellsize, cellsize);
974
        update(col*cellsize,row*cellsize, cellsize, cellsize);
975
        emit colorSelected(currentcolor);
976
        //updateCell( prevSel/numCols(), prevSel%numCols(), FALSE );
977
        //updateCell( row, col, FALSE );
978
      }
979
980
      break;
981
    }
982
    default:
983
      break;
984
  }
985
  
986
  emit changed(TQPixmap(p));
987
  //emit colorschanged(numColors(), data());
988
}
989
990
//void TDEIconEditGrid::setColorSelection( const TQColor &color )
991
void TDEIconEditGrid::setColorSelection( uint c )
992
{
993
  currentcolor = c;
994
  emit colorSelected(currentcolor);
995
}
996
997
void TDEIconEditGrid::loadBlank( int w, int h )
998
{
999
  img->create(w, h, 32);
1000
  img->setAlphaBuffer(true);
1001
  clearImage(img);
1002
  setNumRows(h);
1003
  setNumCols(w);
1004
  fill(TRANSPARENT);
1005
  emit sizechanged(numCols(), numRows());
1006
  emit colorschanged(numColors(), data());
1007
  history->clear();
1008
}
1009
1010
1011
1012
void TDEIconEditGrid::load( TQImage *image)
1013
{
1014
    kdDebug(4640) << "TDEIconEditGrid::load" << endl;
1015
1016
    setUpdatesEnabled(false);
1017
1018
    if(image == 0L)
1019
    {
1020
        TQString msg = i18n("There was an error loading a blank image.\n");
1021
        KMessageBox::error(this, msg);
1022
        return;
1023
    }
1024
1025
    *img = image->convertDepth(32);
1026
    img->setAlphaBuffer(true);
1027
    setNumRows(img->height());
1028
    setNumCols(img->width());
1029
1030
    for(int y = 0; y < numRows(); y++)
1031
    {
1032
        uint *l = (uint*)img->scanLine(y);
1033
        for(int x = 0; x < numCols(); x++, l++)
1034
        {
1035
            setColor((y*numCols())+x, *l, false);
1036
        }
1037
        //kdDebug(4640) << "Row: " << y << endl;
1038
        kapp->processEvents(200);
1039
    }
1040
1041
    updateColors();
1042
    emit sizechanged(numCols(), numRows());
1043
    emit colorschanged(numColors(), data());
1044
    emit changed(pixmap());
1045
    setUpdatesEnabled(true);
1046
    emit needPainting();
1047
    //repaint(viewRect(), false);
1048
    history->clear();
1049
}
1050
1051
const TQPixmap &TDEIconEditGrid::pixmap()
1052
{
1053
    if(!img->isNull())
1054
        p = *img;
1055
    //p.convertFromImage(*img, 0);
1056
    return(p);
1057
}
1058
1059
void TDEIconEditGrid::getImage(TQImage *image)
1060
{
1061
    kdDebug(4640) << "TDEIconEditGrid::getImage" << endl;
1062
    *image = *img;
1063
}
1064
1065
bool TDEIconEditGrid::zoomTo(int scale)
1066
{
1067
    TQApplication::setOverrideCursor(waitCursor);
1068
    setUpdatesEnabled(false);
1069
    setCellSize( scale );
1070
    setUpdatesEnabled(true);
1071
    emit needPainting();
1072
    TQApplication::restoreOverrideCursor();
1073
    emit scalingchanged(cellSize());
1074
1075
    if(scale == 1)
1076
        return false;
1077
    return true;
1078
}
1079
1080
bool TDEIconEditGrid::zoom(Direction d)
1081
{
1082
    int f = (d == DirIn) ? (cellSize()+1) : (cellSize()-1);
1083
    TQApplication::setOverrideCursor(waitCursor);
1084
    setUpdatesEnabled(false);
1085
    setCellSize( f );
1086
    setUpdatesEnabled(true);
1087
    //emit needPainting();
1088
    TQApplication::restoreOverrideCursor();
1089
1090
    emit scalingchanged(cellSize());
1091
    if(d == DirOut && cellSize() <= 1)
1092
        return false;
1093
    return true;
1094
}
1095
1096
void TDEIconEditGrid::checkClipboard()
1097
{
1098
  bool ok = false;
1099
  TQImage tmp = clipboardImage(ok);
1100
  if(ok)
1101
    emit clipboarddata(true);
1102
  else
1103
  {
1104
    emit clipboarddata(false);
1105
  }
1106
}
1107
1108
TQImage TDEIconEditGrid::clipboardImage(bool &ok)
1109
{
1110
  //###### Remove me later.
1111
  //Workaround TQt bug -- check whether format provided first.
1112
  //Code below is from TQDragObject, to match the mimetype list....
1113
1114
  TQStrList fileFormats = TQImageIO::inputFormats();
1115
  fileFormats.first();
1116
  bool oneIsSupported = false;
1117
  while ( fileFormats.current() )
1118
  {
1119
    TQCString format = fileFormats.current();
1120
    TQCString type = "image/" + format.lower();
1121
    if (kapp->clipboard()->data()->provides(type ) )
1122
    {
1123
      oneIsSupported = true;
1124
    }
1125
    fileFormats.next();
1126
  }
1127
  if (!oneIsSupported)
1128
  {
1129
     ok = false;
1130
     return TQImage();
1131
  }
1132
1133
  TQImage image = kapp->clipboard()->image();
1134
  ok = !image.isNull();
1135
  if ( ok )
1136
  {
1137
      image = image.convertDepth(32);
1138
      image.setAlphaBuffer(true);
1139
  }
1140
  return image;
1141
}
1142
1143
1144
void TDEIconEditGrid::editSelectAll()
1145
{
1146
    start.setX(0);
1147
    start.setY(0);
1148
    end.setX(numCols()-1);
1149
    end.setY(numRows()-1);
1150
    isselecting = true;
1151
    drawRect(false);
1152
    emit newmessage(i18n("All selected"));
1153
}
1154
1155
void TDEIconEditGrid::editClear()
1156
{
1157
    clearImage(img);
1158
    fill(TRANSPARENT);
1159
    update();
1160
    setModified(true);
1161
    p = *img;
1162
    emit changed(p);
1163
    emit newmessage(i18n("Cleared"));
1164
}
1165
1166
TQImage TDEIconEditGrid::getSelection(bool cut)
1167
{
1168
    const TQRect rect = pntarray.boundingRect();
1169
    int nx = 0, ny = 0, nw = 0, nh = 0;
1170
    rect.rect(&nx, &ny, &nw, &nh);
1171
1172
    TQImage tmp(nw, nh, 32);
1173
    tmp.setAlphaBuffer(true);
1174
    clearImage(&tmp);
1175
1176
    int s = pntarray.size();
1177
1178
    for(int i = 0; i < s; i++)
1179
    {
1180
        int x = pntarray[i].x();
1181
        int y = pntarray[i].y();
1182
        if(img->valid(x, y) && rect.contains(TQPoint(x, y)))
1183
        {
1184
            *((uint*)tmp.scanLine(y-ny) + (x-nx)) = *((uint*)img->scanLine(y) + x);
1185
            if(cut)
1186
            {
1187
                *((uint*)img->scanLine(y) + x) = TRANSPARENT;
1188
                setColor( (y*numCols()) + x, TRANSPARENT, false );
1189
            }
1190
        }
1191
    }
1192
1193
    TQPointArray a(pntarray.copy());
1194
    pntarray.resize(0);
1195
    drawPointArray(a, Mark);
1196
    emit selecteddata(false);
1197
    if(cut)
1198
    {
1199
        updateColors();
1200
        update(rect.x()*cellSize(), rect.y()*cellSize(),
1201
            rect.width()*cellSize(), rect.height()*cellSize());
1202
        p = *img;
1203
        emit changed(p);
1204
        emit colorschanged(numColors(), data());
1205
        emit newmessage(i18n("Selected area cut"));
1206
        setModified(true);
1207
    }
1208
    else
1209
        emit newmessage(i18n("Selected area copied"));
1210
1211
    return tmp;
1212
}
1213
1214
void TDEIconEditGrid::editCopy(bool cut)
1215
{
1216
    kapp->clipboard()->setImage(getSelection(cut));
1217
    isselecting = false;
1218
}
1219
1220
1221
void TDEIconEditGrid::editPaste(bool paste)
1222
{
1223
    bool ok = false;
1224
    TQImage tmp = clipboardImage(ok);
1225
1226
    TDEIconEditProperties *props = TDEIconEditProperties::self();
1227
1228
    if(ok)
1229
    {
1230
        if( (tmp.size().width() > img->size().width())
1231
        || (tmp.size().height() > img->size().height()) )
1232
        {
1233
            if(KMessageBox::warningYesNo(this,
1234
                i18n("The clipboard image is larger than the current"
1235
                " image!\nPaste as new image?"),TQString(),i18n("Paste"), i18n("Do Not Paste")) == 0)
1236
            {
1237
                editPasteAsNew();
1238
            }
1239
            return;
1240
        }
1241
        else if(!paste)
1242
        {
1243
            ispasting = true;
1244
            cbsize = tmp.size();
1245
            return;
1246
            // emit newmessage(i18n("Pasting"));
1247
        }
1248
        else
1249
        {
1250
            //kdDebug(4640) << "TDEIconEditGrid: Pasting at: " << insrect.x() << " x " << insrect.y() << endl;
1251
            TQApplication::setOverrideCursor(waitCursor);
1252
1253
            for(int y = insrect.y(), ny = 0; y < numRows() && ny < insrect.height(); y++, ny++)
1254
            {
1255
                uint *l = ((uint*)img->scanLine(y)+insrect.x());
1256
                uint *cl = (uint*)tmp.scanLine(ny);
1257
                for(int x = insrect.x(), nx = 0; x < numCols() && nx < insrect.width(); x++, nx++, l++, cl++)
1258
                {
1259
                    if(props->pasteTransparent())
1260
                    {
1261
                        *l = *cl;
1262
                    }
1263
                    else
1264
                    {
1265
                        // Porter-Duff Over composition
1266
                        double alphaS = tqAlpha(*cl) / 255.0;
1267
                        double alphaD = tqAlpha(*l) / 255.0;
1268
  
1269
                        double r = tqRed(*cl) * alphaS + (1 - alphaS) * tqRed(*l) * alphaD;
1270
                        double g = tqGreen(*cl) * alphaS + (1 - alphaS) * tqGreen(*l) * alphaD;
1271
                        double b = tqBlue(*cl) * alphaS + (1 - alphaS) * tqBlue(*l) * alphaD;
1272
                        double a = alphaS + (1 - alphaS) * alphaD;
1273
  
1274
                        // Remove multiplication by alpha
1275
1276
                        if(a > 0)
1277
                        {
1278
                            r /= a;
1279
                            g /= a;
1280
                            b /= a;
1281
                        }
1282
                        else
1283
                        {
1284
                            r = 0;
1285
                            g = 0;
1286
                            b = 0;
1287
                        }
1288
                        
1289
                        int ir = (int)(r + 0.5);
1290
1291
                        if(ir < 0)
1292
                        {
1293
                            ir = 0;
1294
                        }
1295
                        else
1296
                        if(ir > 255)
1297
                        {
1298
                            ir = 255;
1299
                        }
1300
                        
1301
                        int ig = (int)(g + 0.5);
1302
1303
                        if(ig < 0)
1304
                        {
1305
                            ig = 0;
1306
                        }
1307
                        else
1308
                        if(ig > 255)
1309
                        {
1310
                            ig = 255;
1311
                        }
1312
                        
1313
                        int ib = (int)(b + 0.5);
1314
1315
                        if(ib < 0)
1316
                        {
1317
                            ib = 0;
1318
                        }
1319
                        else
1320
                        if(ib > 255)
1321
                        {
1322
                            ib = 255;
1323
                        }
1324
                        
1325
                        int ia = (int)((a * 255) + 0.5);
1326
1327
                        if(ia < 0)
1328
                        {
1329
                            ia = 0;
1330
                        }
1331
                        else
1332
                        if(ia > 255)
1333
                        {
1334
                            ia = 255;
1335
                        }
1336
                        
1337
                        *l = tqRgba(ir, ig, ib, ia);
1338
                    }
1339
1340
                    setColor((y*numCols())+x, (uint)*l, false);
1341
                }
1342
            }
1343
            updateColors();
1344
            update(insrect.x()*cellSize(), insrect.y()*cellSize(),
1345
                insrect.width()*cellSize(), insrect.height()*cellSize());
1346
1347
            TQApplication::restoreOverrideCursor();
1348
1349
            setModified(true);
1350
            p = *img;
1351
            emit changed(TQPixmap(p));
1352
            emit sizechanged(numCols(), numRows());
1353
            emit colorschanged(numColors(), data());
1354
            emit newmessage(i18n("Done pasting"));
1355
        }
1356
    }
1357
    else
1358
    {
1359
        TQString msg = i18n("Invalid pixmap data in clipboard!\n");
1360
        KMessageBox::sorry(this, msg);
1361
    }
1362
}
1363
1364
1365
void TDEIconEditGrid::editPasteAsNew()
1366
{
1367
    bool ok = false;
1368
    TQImage tmp = clipboardImage(ok);
1369
1370
    if(ok)
1371
    {
1372
        if(isModified())
1373
        {
1374
            TDEIconEdit *w = new TDEIconEdit(tmp);
1375
            TQ_CHECK_PTR(w);
1376
        }
1377
        else
1378
        {
1379
            *img = tmp;
1380
            load(img);
1381
            setModified(true);
1382
            //repaint(viewRect(), false);
1383
  
1384
            p = *img;
1385
            emit changed(TQPixmap(p));
1386
            emit sizechanged(numCols(), numRows());
1387
            emit colorschanged(numColors(), data());
1388
            emit newmessage(i18n("Done pasting"));
1389
            history->clear();
1390
        }
1391
    }
1392
    else
1393
    {
1394
        TQString msg = i18n("Invalid pixmap data in clipboard!\n");
1395
        KMessageBox::error(this, msg);
1396
    }
1397
}
1398
1399
1400
void TDEIconEditGrid::editResize()
1401
{
1402
    kdDebug(4640) << "TDEIconGrid::editResize" << endl;
1403
    KResizeDialog *rs = new KResizeDialog(this, 0, TQSize(numCols(), numRows()));
1404
    if(rs->exec())
1405
    {
1406
        const TQSize s = rs->getSize();
1407
        *img = img->smoothScale(s.width(), s.height());
1408
        load(img);
1409
1410
        setModified(true);
1411
    }
1412
    delete rs;
1413
}
1414
1415
1416
void TDEIconEditGrid::setSize(const TQSize s)
1417
{
1418
    kdDebug(4640) << "::setSize: " << s.width() << " x " << s.height() << endl;
1419
1420
    img->create(s.width(), s.height(), 32);
1421
    img->setAlphaBuffer(true);
1422
    clearImage(img);
1423
    load(img);
1424
}
1425
1426
1427
void TDEIconEditGrid::createCursors()
1428
{
1429
  TQBitmap mask(22, 22);
1430
  TQPixmap pix;
1431
1432
  cursor_normal = TQCursor(arrowCursor);
1433
1434
  pix = BarIcon("colorpicker-cursor");
1435
  if(pix.isNull())
1436
  {
1437
    cursor_colorpicker = cursor_normal;
1438
    kdDebug(4640) << "TDEIconEditGrid: Error loading colorpicker-cursor.xpm" << endl;
1439
  }
1440
  else
1441
  {
1442
    mask = TQPixmap(pix.createHeuristicMask());
1443
    pix.setMask(mask);
1444
    cursor_colorpicker = TQCursor(pix, 1, 21);
1445
  }
1446
1447
  pix = BarIcon("paintbrush-cursor");
1448
  if(pix.isNull())
1449
  {
1450
    cursor_paint = cursor_normal;
1451
    kdDebug(4640) << "TDEIconEditGrid: Error loading paintbrush.xpm" << endl;
1452
  }
1453
  else
1454
  {
1455
    mask = TQPixmap(pix.createHeuristicMask());
1456
    pix.setMask(mask);
1457
    cursor_paint = TQCursor(pix, 0, 19);
1458
  }
1459
1460
  pix = BarIcon("fill-cursor");
1461
  if(pix.isNull())
1462
  {
1463
    cursor_flood = cursor_normal;
1464
    kdDebug(4640) << "TDEIconEditGrid: Error loading fill-cursor.xpm" << endl;
1465
  }
1466
  else
1467
  {
1468
    mask = TQPixmap(pix.createHeuristicMask());
1469
    pix.setMask(mask);
1470
    cursor_flood = TQCursor(pix, 3, 20);
1471
  }
1472
1473
  pix = BarIcon("aim-cursor");
1474
  if(pix.isNull())
1475
  {
1476
    cursor_aim = cursor_normal;
1477
    kdDebug(4640) << "TDEIconEditGrid: Error loading aim-cursor.xpm" << endl;
1478
  }
1479
  else
1480
  {
1481
    mask = TQPixmap(pix.createHeuristicMask());
1482
    pix.setMask(mask);
1483
    cursor_aim = TQCursor(pix, 10, 10);
1484
  }
1485
1486
  pix = BarIcon("airbrush-cursor");
1487
  if(pix.isNull())
1488
  {
1489
    cursor_spray = cursor_normal;
1490
    kdDebug(4640) << "TDEIconEditGrid: Error loading airbrush-cursor.xpm" << endl;
1491
  }
1492
  else
1493
  {
1494
    mask = TQPixmap(pix.createHeuristicMask(true));
1495
    pix.setMask(mask);
1496
    cursor_spray = TQCursor(pix, 0, 20);
1497
  }
1498
1499
  pix = BarIcon("eraser-cursor");
1500
  if(pix.isNull())
1501
  {
1502
    cursor_erase = cursor_normal;
1503
    kdDebug(4640) << "TDEIconEditGrid: Error loading eraser-cursor.xpm" << endl;
1504
  }
1505
  else
1506
  {
1507
    mask = TQPixmap(pix.createHeuristicMask(true));
1508
    pix.setMask(mask);
1509
    cursor_erase = TQCursor(pix, 1, 16);
1510
  }
1511
}
1512
1513
1514
1515
void TDEIconEditGrid::setTool(DrawTool t)
1516
{
1517
    btndown = false;
1518
    tool = t;
1519
1520
    if(tool != SelectRect && tool != SelectCircle)
1521
        isselecting = false;
1522
1523
    switch( tool )
1524
    {
1525
        case SelectRect:
1526
            isselecting = true;
1527
            setCursor(cursor_aim);
1528
            break;
1529
        case SelectCircle:
1530
            isselecting = true;
1531
            setCursor(cursor_aim);
1532
            break;
1533
        case Line:
1534
        case Ellipse:
1535
        case Circle:
1536
        case FilledEllipse:
1537
        case FilledCircle:
1538
        case FilledRect:
1539
        case Rect:
1540
            setCursor(cursor_aim);
1541
            break;
1542
        case Freehand:
1543
            setCursor(cursor_paint);
1544
            break;
1545
        case Spray:
1546
            setCursor(cursor_spray);
1547
            break;
1548
        case Eraser:
1549
            setCursor(cursor_erase);
1550
            break;
1551
        case FloodFill:
1552
            setCursor(cursor_flood);
1553
            break;
1554
        case Find:
1555
            setCursor(cursor_colorpicker);
1556
            break;
1557
        default:
1558
            break;
1559
    }
1560
}
1561
1562
1563
void TDEIconEditGrid::drawFlood(int x, int y, uint oldcolor)
1564
{
1565
    if((!img->valid(x, y))
1566
    || (colorAt((y * numCols())+x) != oldcolor)
1567
    || (colorAt((y * numCols())+x) == currentcolor))
1568
        return;
1569
1570
    *((uint*)img->scanLine(y) + x) = currentcolor;
1571
    setColor((y*numCols())+x, currentcolor, false);
1572
1573
    setModified(true);
1574
1575
    drawFlood(x, y-1, oldcolor);
1576
    drawFlood(x, y+1, oldcolor);
1577
    drawFlood(x-1, y, oldcolor);
1578
    drawFlood(x+1, y, oldcolor);
1579
    //TODO: add undo 
1580
}
1581
1582
1583
void TDEIconEditGrid::drawSpray(TQPoint point)
1584
{
1585
    int x = (point.x()-5);
1586
    int y = (point.y()-5);
1587
1588
    //kdDebug(4640) << "drawSpray() - " << x << " X " << y << endl;
1589
1590
    pntarray.resize(0);
1591
    int points = 0;
1592
    for(int i = 1; i < 4; i++, points++)
1593
    {
1594
        int dx = (rand() % 10);
1595
        int dy = (rand() % 10);
1596
        pntarray.putPoints(points, 1, x+dx, y+dy);
1597
    }
1598
1599
    drawPointArray(pntarray, Draw);
1600
}
1601
1602
1603
//This routine is from TQt sources -- it's the branch of TQPointArray::makeEllipse( int x, int y, int w, int h ) that's not normally compiled
1604
//It seems like TDEIconEdit relied on the TQt1 semantics for makeEllipse, which broke
1605
//the tool with reasonably recent TQt versions.
1606
//Thankfully, TQt includes the old code #ifdef'd, which is hence included here
1607
static void TQPA_makeEllipse(TQPointArray& ar, int x, int y, int w, int h )
1608
{						// midpoint, 1/4 ellipse
1609
    if ( w <= 0 || h <= 0 ) {
1610
	if ( w == 0 || h == 0 ) {
1611
	    ar.resize( 0 );
1612
	    return;
1613
	}
1614
	if ( w < 0 ) {				// negative width
1615
	    w = -w;
1616
	    x -= w;
1617
	}
1618
	if ( h < 0 ) {				// negative height
1619
	    h = -h;
1620
	    y -= h;
1621
	}
1622
    }
1623
    int s = (w+h+2)/2;				// max size of xx,yy array
1624
    int *px = new int[s];			// 1/4th of ellipse
1625
    int *py = new int[s];
1626
    int xx, yy, i=0;
1627
    double d1, d2;
1628
    double a2=(w/2)*(w/2),  b2=(h/2)*(h/2);
1629
    xx = 0;
1630
    yy = int(h/2);
1631
    d1 = b2 - a2*(h/2) + 0.25*a2;
1632
    px[i] = xx;
1633
    py[i] = yy;
1634
    i++;
1635
    while ( a2*(yy-0.5) > b2*(xx+0.5) ) {		// region 1
1636
	if ( d1 < 0 ) {
1637
	    d1 = d1 + b2*(3.0+2*xx);
1638
	    xx++;
1639
	} else {
1640
	    d1 = d1 + b2*(3.0+2*xx) + 2.0*a2*(1-yy);
1641
	    xx++;
1642
	    yy--;
1643
	}
1644
	px[i] = xx;
1645
	py[i] = yy;
1646
	i++;
1647
    }
1648
    d2 = b2*(xx+0.5)*(xx+0.5) + a2*(yy-1)*(yy-1) - a2*b2;
1649
    while ( yy > 0 ) {				// region 2
1650
	if ( d2 < 0 ) {
1651
	    d2 = d2 + 2.0*b2*(xx+1) + a2*(3-2*yy);
1652
	    xx++;
1653
	    yy--;
1654
	} else {
1655
	    d2 = d2 + a2*(3-2*yy);
1656
	    yy--;
1657
	}
1658
	px[i] = xx;
1659
	py[i] = yy;
1660
	i++;
1661
    }
1662
    s = i;
1663
    ar.resize( 4*s );				// make full point array
1664
    x += w/2;
1665
    y += h/2;
1666
    for ( i=0; i<s; i++ ) {			// mirror
1667
	xx = px[i];
1668
	yy = py[i];
1669
	ar.setPoint( s-i-1, x+xx, y-yy );
1670
	ar.setPoint( s+i, x-xx, y-yy );
1671
	ar.setPoint( 3*s-i-1, x-xx, y+yy );
1672
	ar.setPoint( 3*s+i, x+xx, y+yy );
1673
    }
1674
    delete[] px;
1675
    delete[] py;
1676
}
1677
1678
1679
1680
void TDEIconEditGrid::drawEllipse(bool drawit)
1681
{
1682
    if(drawit)
1683
    {
1684
        drawPointArray(pntarray, Draw);
1685
        p = *img;
1686
        emit changed(p);
1687
        return;
1688
    }
1689
1690
    TQPointArray a(pntarray.copy());
1691
    int x = start.x(), y = start.y(), cx, cy;
1692
1693
    if(x > end.x())
1694
    {
1695
        cx = x - end.x();
1696
        x = x - cx;
1697
    }
1698
    else
1699
        cx = end.x() - x;
1700
    if(y > end.y())
1701
    {
1702
        cy = y - end.y();
1703
        y = y - cy;
1704
    }
1705
    else
1706
        cy = end.y() - y;
1707
1708
    int d = (cx > cy) ? cx : cy;
1709
1710
    //kdDebug(4640) << x << ", " << y << " - " << d << " " << d << endl;
1711
    pntarray.resize(0);
1712
    drawPointArray(a, Mark);
1713
1714
    if(tool == Circle || tool == FilledCircle || tool == SelectCircle)
1715
        TQPA_makeEllipse(pntarray, x, y, d, d);
1716
    else if(tool == Ellipse || tool == FilledEllipse)
1717
        TQPA_makeEllipse(pntarray, x, y, cx, cy);
1718
1719
    if((tool == FilledEllipse) || (tool == FilledCircle)
1720
    || (tool == SelectCircle))
1721
    {
1722
        int s = pntarray.size();
1723
        int points = s;
1724
        for(int i = 0; i < s; i++)
1725
        {
1726
            int x = pntarray[i].x();
1727
            int y = pntarray[i].y();
1728
            for(int j = 0; j < s; j++)
1729
            {
1730
                if((pntarray[j].y() == y) && (pntarray[j].x() > x))
1731
                {
1732
                    for(int k = x; k < pntarray[j].x(); k++, points++)
1733
                        pntarray.putPoints(points, 1, k, y);
1734
                    break;
1735
                }
1736
            }
1737
        }
1738
    }
1739
1740
    drawPointArray(pntarray, Mark);
1741
1742
    if(tool == SelectCircle && pntarray.size() > 0 && !ispasting)
1743
        emit selecteddata(true);
1744
}
1745
1746
1747
void TDEIconEditGrid::drawRect(bool drawit)
1748
{
1749
    if(drawit)
1750
    {
1751
        drawPointArray(pntarray, Draw);
1752
        p = *img;
1753
        emit changed(p);
1754
        return;
1755
    }
1756
1757
    TQPointArray a(pntarray.copy());
1758
    int x = start.x(), y = start.y(), cx, cy;
1759
1760
    if(x > end.x())
1761
    {
1762
        cx = x - end.x();
1763
        x = x - cx;
1764
    }
1765
    else
1766
        cx = end.x() - x;
1767
    if(y > end.y())
1768
    {
1769
        cy = y - end.y();
1770
        y = y - cy;
1771
    }
1772
    else
1773
        cy = end.y() - y;
1774
1775
    //kdDebug(4640) << x << ", " << y << " - " << cx << " " << cy << endl;
1776
    pntarray.resize(0);
1777
    drawPointArray(a, Mark); // remove previous marking
1778
1779
    int points = 0;
1780
    bool pasting = ispasting;
1781
1782
    if(tool == FilledRect || (tool == SelectRect))
1783
    {
1784
        for(int i = x; i <= x + (pasting ? cx + 1 : cx); i++)
1785
        {
1786
            for(int j = y; j <= y+cy; j++, points++)
1787
            pntarray.putPoints(points, 1, i, j);
1788
        }
1789
    }
1790
    else
1791
    {
1792
        for(int i = x; i <= x+cx; i++, points++)
1793
            pntarray.putPoints(points, 1, i, y);
1794
        for(int i = y; i <= y+cy; i++, points++)
1795
            pntarray.putPoints(points, 1, x, i);
1796
        for(int i = x; i <= x+cx; i++, points++)
1797
            pntarray.putPoints(points, 1, i, y+cy);
1798
        for(int i = y; i <= y+cy; i++, points++)
1799
            pntarray.putPoints(points, 1, x+cx, i);
1800
    }
1801
1802
    drawPointArray(pntarray, Mark);
1803
1804
    if(tool == SelectRect && pntarray.size() > 0 && !ispasting)
1805
        emit selecteddata(true);
1806
}
1807
1808
1809
void TDEIconEditGrid::drawLine(bool drawit, bool drawStraight)
1810
{
1811
    if(drawit)
1812
    {
1813
        drawPointArray(pntarray, Draw);
1814
        p = *img;
1815
        emit changed(p);
1816
        return;
1817
    }
1818
1819
    TQPointArray a(pntarray.copy());
1820
    pntarray.resize(0);
1821
1822
    // remove previous marking
1823
    drawPointArray(a, Mark);
1824
1825
    int x, y, dx, dy, delta;
1826
1827
    dx = end.x() - start.x();
1828
    dy = end.y() - start.y();
1829
    x = start.x();
1830
    y = start.y();
1831
1832
    delta = TQMAX(abs(dx), abs(dy));
1833
    int deltaX = abs(dx);
1834
    int deltaY = abs(dy);
1835
1836
    if ((drawStraight) && (delta > 0))
1837
    {
1838
        dx /= delta;
1839
        dy /= delta;
1840
1841
        for(int i = 0; i <= delta; i++)
1842
        {
1843
            pntarray.putPoints(i, 1, x, y);
1844
            x += dx;
1845
            y += dy;
1846
        }
1847
    }
1848
1849
    else if ((delta > 0) && (deltaX >= deltaY))
1850
    {
1851
        for(int i = 0; i <= deltaX; i++)
1852
        {
1853
            pntarray.putPoints(i, 1, x, y);
1854
1855
            if(dx > 0)
1856
               x++;
1857
            else
1858
               x--;
1859
1860
            if(dy >= 0)
1861
                y = start.y() + (abs(start.x() - x) * deltaY) / deltaX;
1862
            else
1863
                y = start.y() - (abs(start.x() - x) * deltaY) / deltaX;
1864
        }
1865
    }
1866
1867
    else if ((delta > 0) && (deltaY > deltaX))
1868
    {
1869
        for(int i = 0; i <= deltaY; i++)
1870
        {
1871
            pntarray.putPoints(i, 1, x, y);
1872
1873
            if(dy > 0)
1874
                y++;
1875
            else
1876
                y--;
1877
1878
            if(dx >= 0)
1879
                x = start.x() + (abs(start.y() - y) * deltaX) / deltaY;
1880
            else
1881
                x = start.x() - (abs(start.y() - y) * deltaX) / deltaY;
1882
        }
1883
    }
1884
1885
    drawPointArray(pntarray, Mark);
1886
}
1887
1888
1889
void TDEIconEditGrid::drawPointArray(TQPointArray a, DrawAction action)
1890
{
1891
    TQRect area( a.boundingRect().x()*cellSize()-1, a.boundingRect().y()*cellSize()-1,
1892
                a.boundingRect().width()*cellSize()+1, a.boundingRect().height()*cellSize()+1 );
1893
    
1894
    KMacroCommand* macro = 0;
1895
    bool doupdate = false;
1896
1897
    if( a.size() > 0 && action == Draw ) {
1898
	// might cause a memmory leak, if
1899
	// macro is never used and never 
1900
	// added to the history! TODO: Fix this
1901
        macro = new KMacroCommand( i18n("Drawn Array") );
1902
	RepaintCommand* rc = new RepaintCommand( area, this );
1903
	macro->addCommand( rc );	
1904
    }
1905
    
1906
    int s = a.size(); //((rect.size().width()) * (rect.size().height()));
1907
    for(int i = 0; i < s; i++)
1908
    {
1909
        int x = a[i].x();
1910
        int y = a[i].y();
1911
1912
        if(img->valid(x, y) && TQT_TQRECT_OBJECT(a.boundingRect()).contains(a[ i ]))
1913
        {
1914
            //kdDebug(4640) << "x: " << x << " - y: " << y << endl;
1915
            switch( action )
1916
            {
1917
                case Draw:
1918
                {
1919
		    DrawCommand* dc = new DrawCommand( x, y, currentcolor, img, this );
1920
		    dc->execute();
1921
                    //*((uint*)img->scanLine(y) + x) = currentcolor; //colors[cell]|OPAQUE;
1922
                    //int cell = y * numCols() + x;
1923
                    //setColor( cell, currentcolor, false );
1924
                    doupdate = true;
1925
                    //updateCell( y, x, FALSE );
1926
		    macro->addCommand( dc );
1927
                    break;
1928
                }
1929
1930
                case Mark:
1931
                case UnMark:
1932
                    update(x*cellsize,y*cellsize, cellsize, cellsize);
1933
                    //updateCell( y, x, true );
1934
                    break;
1935
1936
                default:
1937
                    break;
1938
            }
1939
        }
1940
    }
1941
1942
    
1943
    if(doupdate)
1944
    {
1945
        setModified( true );
1946
        updateColors();
1947
	RepaintCommand* rc = new RepaintCommand( area, this );
1948
        rc->execute();
1949
	macro->addCommand( rc );
1950
	pntarray.resize(0);
1951
	// add to undo/redo history	
1952
	history->addCommand( macro, false );    }
1953
}
1954
1955
void TDEIconEditGrid::updatePreviewPixmap()
1956
{
1957
    p = *img;
1958
    emit changed(TQPixmap(p));
1959
}
1960
1961
1962
bool TDEIconEditGrid::isMarked(TQPoint point)
1963
{
1964
    return isMarked(point.x(), point.y());
1965
}
1966
1967
1968
bool TDEIconEditGrid::isMarked(int x, int y)
1969
{
1970
    if(((y * numCols()) + x) == selected)
1971
        return true;
1972
1973
    int s = pntarray.size();
1974
    for(int i = 0; i < s; i++)
1975
    {
1976
        if(y == pntarray[i].y() && x == pntarray[i].x())
1977
            return true;
1978
    }
1979
1980
    return false;
1981
}
1982
1983
1984
// Fast diffuse dither to 3x3x3 color cube
1985
// Based on TQt's image conversion functions
1986
static bool kdither_32_to_8( const TQImage *src, TQImage *dst )
1987
{
1988
    register TQRgb *p;
1989
    uchar  *b;
1990
    int	    y;
1991
1992
	//printf("kconvert_32_to_8\n");
1993
1994
    if ( !dst->create(src->width(), src->height(), 8, 256) ) {
1995
		kdWarning() << "OImage: destination image not valid" << endl;
1996
		return FALSE;
1997
	}
1998
1999
    int ncols = 256;
2000
2001
    static uint bm[16][16];
2002
    static int init=0;
2003
    if (!init)
2004
    {
2005
		// Build a Bayer Matrix for dithering
2006
		init = 1;
2007
		int n, i, j;
2008
2009
		bm[0][0]=0;
2010
2011
		for (n=1; n<16; n*=2)
2012
        {
2013
	    	for (i=0; i<n; i++)
2014
            {
2015
			    for (j=0; j<n; j++)
2016
                {
2017
		    	    bm[i][j]*=4;
2018
		    	    bm[i+n][j]=bm[i][j]+2;
2019
		    	    bm[i][j+n]=bm[i][j]+3;
2020
		    	    bm[i+n][j+n]=bm[i][j]+1;
2021
			    }
2022
	    	}
2023
		}
2024
2025
		for (i=0; i<16; i++)
2026
	    	for (j=0; j<16; j++)
2027
			    bm[i][j]<<=8;
2028
    }
2029
2030
    dst->setNumColors( ncols );
2031
2032
#define MAX_R 2
2033
#define MAX_G 2
2034
#define MAX_B 2
2035
#define INDEXOF(r,g,b) (((r)*(MAX_G+1)+(g))*(MAX_B+1)+(b))
2036
2037
	int rc, gc, bc;
2038
2039
	for ( rc=0; rc<=MAX_R; rc++ )		// build 2x2x2 color cube
2040
	    for ( gc=0; gc<=MAX_G; gc++ )
2041
		    for ( bc=0; bc<=MAX_B; bc++ )
2042
            {
2043
		        dst->setColor( INDEXOF(rc,gc,bc),
2044
			    tqRgb( rc*255/MAX_R, gc*255/MAX_G, bc*255/MAX_B ) );
2045
		    }
2046
2047
	int sw = src->width();
2048
	int* line1[3];
2049
	int* line2[3];
2050
	int* pv[3];
2051
2052
	line1[0] = new int[src->width()];
2053
	line2[0] = new int[src->width()];
2054
	line1[1] = new int[src->width()];
2055
	line2[1] = new int[src->width()];
2056
	line1[2] = new int[src->width()];
2057
	line2[2] = new int[src->width()];
2058
	pv[0] = new int[sw];
2059
	pv[1] = new int[sw];
2060
	pv[2] = new int[sw];
2061
2062
	for ( y=0; y < src->height(); y++ )
2063
    {
2064
	    p = (TQRgb *)src->scanLine(y);
2065
	    b = dst->scanLine(y);
2066
		int endian = (TQImage::systemByteOrder() == TQImage::BigEndian);
2067
		int x;
2068
		uchar* q = const_cast<TQImage*>(src)->scanLine(y);
2069
		uchar* q2 = const_cast<TQImage*>(src)->scanLine(y+1 < src->height() ? y + 1 : 0);
2070
		for (int chan = 0; chan < 3; chan++)
2071
        {
2072
		    b = dst->scanLine(y);
2073
		    int *l1 = (y&1) ? line2[chan] : line1[chan];
2074
		    int *l2 = (y&1) ? line1[chan] : line2[chan];
2075
		    if ( y == 0 )
2076
            {
2077
			    for (int i=0; i<sw; i++)
2078
			        l1[i] = q[i*4+chan+endian];
2079
		    }
2080
		    if ( y+1 < src->height() )
2081
            {
2082
			    for (int i=0; i<sw; i++)
2083
			        l2[i] = q2[i*4+chan+endian];
2084
		    }
2085
		    // Bi-directional error diffusion
2086
		    if ( y&1 )
2087
            {
2088
			    for (x=0; x<sw; x++)
2089
                {
2090
			        int pix = TQMAX(TQMIN(2, (l1[x] * 2 + 128)/ 255), 0);
2091
			        int err = l1[x] - pix * 255 / 2;
2092
			        pv[chan][x] = pix;
2093
2094
			        // Spread the error around...
2095
			        if ( x+1<sw )
2096
                    {
2097
				        l1[x+1] += (err*7)>>4;
2098
				        l2[x+1] += err>>4;
2099
			        }
2100
			        l2[x]+=(err*5)>>4;
2101
			        if (x>1)
2102
				        l2[x-1]+=(err*3)>>4;
2103
			    }
2104
		    }
2105
            else
2106
            {
2107
			    for (x=sw; x-->0; )
2108
                {
2109
			        int pix = TQMAX(TQMIN(2, (l1[x] * 2 + 128)/ 255), 0);
2110
			        int err = l1[x] - pix * 255 / 2;
2111
			        pv[chan][x] = pix;
2112
2113
			        // Spread the error around...
2114
			        if ( x > 0 )
2115
                    {
2116
				        l1[x-1] += (err*7)>>4;
2117
				        l2[x-1] += err>>4;
2118
			        }
2119
			        l2[x]+=(err*5)>>4;
2120
			        if (x+1 < sw)
2121
				        l2[x+1]+=(err*3)>>4;
2122
			    }
2123
		    }
2124
		}
2125
		if (endian)
2126
        {
2127
		    for (x=0; x<sw; x++)
2128
            {
2129
			    *b++ = INDEXOF(pv[2][x],pv[1][x],pv[0][x]);
2130
		    }
2131
		}
2132
        else
2133
        {
2134
		    for (x=0; x<sw; x++)
2135
            {
2136
			    *b++ = INDEXOF(pv[0][x],pv[1][x],pv[2][x]);
2137
		    }
2138
		}
2139
	}
2140
2141
	delete [] line1[0];
2142
	delete [] line2[0];
2143
	delete [] line1[1];
2144
	delete [] line2[1];
2145
	delete [] line1[2];
2146
	delete [] line2[2];
2147
	delete [] pv[0];
2148
	delete [] pv[1];
2149
	delete [] pv[2];
2150
2151
#undef MAX_R
2152
#undef MAX_G
2153
#undef MAX_B
2154
#undef INDEXOF
2155
2156
    return TRUE;
2157
}
2158
2159
// this doesn't work the way it should but the way KPixmap does.
2160
void TDEIconEditGrid::mapToKDEPalette()
2161
{
2162
    TQImage dest;
2163
2164
    kdither_32_to_8(img, &dest);
2165
    *img = dest.convertDepth(32);
2166
2167
    for(int y = 0; y < img->height(); y++)
2168
    {
2169
        uint *l = (uint*)img->scanLine(y);
2170
        for(int x = 0; x < img->width(); x++, l++)
2171
        {
2172
            if(*l < 0xff000000)
2173
            {
2174
                *l = *l | 0xff000000;
2175
            }
2176
        }
2177
    }
2178
2179
    load(img);
2180
    return;
2181
2182
/*
2183
#if [[[TQT_VERSION IS DEPRECATED]]] > 140
2184
  *img = img->convertDepthWithPalette(32, iconpalette, 42);
2185
  load(img);
2186
  return;
2187
#endif
2188
*/
2189
2190
    TQApplication::setOverrideCursor(waitCursor);
2191
    for(int y = 0; y < numRows(); y++)
2192
    {
2193
        uint *l = (uint*)img->scanLine(y);
2194
        for(int x = 0; x < numCols(); x++, l++)
2195
        {
2196
            if(*l != TRANSPARENT)
2197
            {
2198
                if(!iconcolors.contains(*l))
2199
                    *l = iconcolors.closestMatch(*l);
2200
            }
2201
        }
2202
    }
2203
2204
    load(img);
2205
    setModified(true);
2206
    TQApplication::restoreOverrideCursor();
2207
}
2208
2209
2210
void TDEIconEditGrid::grayScale()
2211
{
2212
    for(int y = 0; y < numRows(); y++)
2213
    {
2214
        uint *l = (uint*)img->scanLine(y);
2215
        for(int x = 0; x < numCols(); x++, l++)
2216
        {
2217
            if(*l != TRANSPARENT)
2218
            {
2219
                uint c = tqGray(*l);
2220
                *l = tqRgba(c, c, c, tqAlpha(*l));
2221
            }
2222
        }
2223
    }
2224
2225
    load(img);
2226
    setModified(true);
2227
}
2228
2229
2230
void TDEIconEditGrid::clearImage(TQImage *image)
2231
{
2232
    if(image->depth() != 32)
2233
    {
2234
        image->fill(TRANSPARENT);
2235
    }
2236
    else
2237
    {
2238
        // TQImage::fill() does not set the alpha channel so do it
2239
        // manually.
2240
        for(int y = 0; y < image->height(); y++)
2241
        {
2242
            uint *l = (uint*)image->scanLine(y);
2243
            for(int x = 0; x < image->width(); x++, l++)
2244
            {
2245
                *l = TRANSPARENT;
2246
            }
2247
        }
2248
    }
2249
}
2250
2251
2252
void TDEIconEditGrid::setModified(bool m)
2253
{
2254
    if(m != modified)
2255
    {
2256
        modified = m;
2257
        emit modifiedchanged(m);
2258
    }
2259
}
2260
2261
2262
#include "kicongrid.moc"
2263
// vim: set ts=4:
(-)tdegraphics/kiconedit/kicongrid.h (-265 lines)
Lines 1-265 Link Here
1
/*
2
    TDE Icon Editor - a small graphics drawing program for the TDE.
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#ifndef __KICONEDITGRID_H__
22
#define __KICONEDITGRID_H__
23
24
#include <tqpixmap.h>
25
#include <tqimage.h>
26
#include <tqcursor.h>
27
#include <tqpointarray.h>
28
#include <tqframe.h>
29
#include <kcommand.h>
30
#include <tdelocale.h>
31
32
#include "kcolorgrid.h"
33
34
class KCommandHistory;
35
class KRuler;
36
class TDEIconEditGrid;
37
class TQScrollView;
38
39
enum Direction {
40
    DirIn = 0, DirOut = 1,
41
    DirUp = DirIn, DirDown = DirOut,
42
    DirLeft, DirRight
43
};
44
45
class DrawCommand : public KCommand {
46
    public:
47
        DrawCommand( int xx, int yy, uint newcol, TQImage* img, TDEIconEditGrid* g ) {
48
            x = xx;
49
	    y = yy;
50
	    newcolor = newcol;
51
	    image = img;
52
	    grid = g;
53
        }
54
        
55
        void execute();
56
        void unexecute();
57
        TQString name() const {
58
            return i18n("Drawed Something");
59
        }
60
61
    protected:
62
        int x;
63
	int y;
64
        uint newcolor;
65
        uint oldcolor;
66
	TQImage* image;
67
	TDEIconEditGrid* grid;
68
};
69
70
class RepaintCommand : public KCommand {
71
    public:
72
	RepaintCommand( TQRect a, TDEIconEditGrid* g ) {
73
		area = a;
74
		grid = g;
75
	}
76
	
77
	void execute();
78
	void unexecute() {
79
		execute();
80
	}
81
	
82
	TQString name() const {
83
		return "repainted";
84
	}
85
    protected:
86
	TDEIconEditGrid* grid;
87
	TQRect area;
88
};
89
90
class KGridView : public TQFrame
91
{
92
    Q_OBJECT
93
  
94
public:
95
  KGridView( TQImage *image, KCommandHistory* history, TQWidget * parent = 0, const char *name = 0);
96
97
  KRuler *hruler() { return _hruler;}
98
  KRuler *vruler() { return _vruler;}
99
  TQFrame *corner() { return _corner;}
100
  TDEIconEditGrid *grid() { return _grid; }
101
  void setShowRulers(bool mode);
102
  void setAcceptDrop(bool a);
103
  const TQRect viewRect();
104
  TQScrollView *viewPortWidget() { return viewport;}
105
106
public slots:
107
  void sizeChange(int, int);
108
  void moving(int, int);
109
  void scalingChange(int);
110
  void paintGrid();
111
  void checkClipboard();
112
113
protected:
114
  virtual void paintEvent(TQPaintEvent*);
115
  virtual void resizeEvent(TQResizeEvent*);
116
  void paintDropSite();
117
  void setSizes();
118
119
  TQFrame *_corner;
120
  TDEIconEditGrid *_grid;
121
  KRuler *_hruler, *_vruler;
122
  TQScrollView *viewport;
123
  bool acceptdrop;
124
};
125
126
/**
127
* TDEIconEditGrid
128
* @short TDEIconEditGrid
129
* @author Thomas Tanghus <tanghus@kde.org>
130
* @version 0.3
131
*/
132
class TDEIconEditGrid : public KColorGrid
133
{
134
    Q_OBJECT
135
  
136
public:
137
  TDEIconEditGrid( TQImage *image, KCommandHistory* h, TQWidget * parent = 0, const char *name = 0);
138
  virtual ~TDEIconEditGrid();
139
140
  enum DrawTool { Line, Freehand, FloodFill, Spray, Rect, FilledRect, Circle,
141
        FilledCircle, Ellipse, FilledEllipse, Eraser, SelectRect, SelectCircle, Find };
142
  enum DrawAction { Mark, UnMark, Draw };
143
144
  void setGrid(bool g) { KColorGrid::setGrid(g); emit needPainting(); }
145
  bool isModified() { return modified; };
146
  void setModified(bool m);
147
  const TQPixmap &pixmap();
148
  const TQImage &image() { return *img; }
149
  TQImage clipboardImage(bool &ok);
150
  TQImage getSelection(bool);
151
  int rows() { return numRows(); };
152
  int cols() { return numCols(); };
153
  uint getColors( uint *_colors) { return colors(_colors); }
154
  bool isMarked(TQPoint p);
155
  bool isMarked(int x, int y);
156
  int scaling() { return cellSize(); }
157
  void loadBlank( int w = 0, int h = 0);
158
  void setUndoColor( int colNum, uint v, bool update = true ) {
159
  	setColor( colNum, v, update );
160
  };
161
162
  enum TransparencyDisplayType
163
  {
164
    TRD_SOLIDCOLOR,
165
    TRD_CHECKERBOARD
166
  };
167
  enum CheckerboardSize
168
  {
169
    CHK_SMALL = 0,
170
    CHK_MEDIUM = 1,
171
    CHK_LARGE = 2
172
  };
173
174
  TransparencyDisplayType transparencyDisplayType() const { return m_transparencyDisplayType; }
175
  TQColor checkerboardColor1() const { return m_checkerboardColor1; }
176
  TQColor checkerboardColor2() const { return m_checkerboardColor2; }
177
  CheckerboardSize checkerboardSize() const { return m_checkerboardSize; }
178
  TQColor transparencySolidColor() const { return m_transparencySolidColor; }
179
180
  void setTransparencyDisplayType(TransparencyDisplayType t) { m_transparencyDisplayType = t; }
181
  void setCheckerboardColor1(const TQColor& c) { m_checkerboardColor1 = c; }
182
  void setCheckerboardColor2(const TQColor& c) { m_checkerboardColor2 = c; }
183
  void setCheckerboardSize(CheckerboardSize size) { m_checkerboardSize = size; }
184
  void setTransparencySolidColor(const TQColor& c) { m_transparencySolidColor = c; }
185
186
public slots:
187
  void load( TQImage *);
188
  void editCopy(bool cut = false);
189
  void editPaste(bool paste = false);
190
  void editPasteAsNew();
191
  void editSelectAll();
192
  void editClear();
193
  void getImage(TQImage *image);
194
//#if [[[TQT_VERSION IS DEPRECATED]]] <= 140
195
  void editResize();
196
//#endif
197
  void setSize(const TQSize s);
198
  void grayScale();
199
  void mapToKDEPalette();
200
  void setTool(DrawTool tool);
201
  bool zoom(Direction direct);
202
  bool zoomTo(int);
203
  
204
  void checkClipboard();
205
206
signals:
207
  void scalingchanged(int);
208
  void changed( const TQPixmap & );
209
  void sizechanged( int, int );
210
  void poschanged( int, int );
211
  void xposchanged( int );
212
  void yposchanged( int );
213
  void newmessage(const TQString &);
214
  void clipboarddata(bool);
215
  void selecteddata(bool);
216
  void needPainting();
217
  void modifiedchanged(bool);
218
  void colorSelected(uint);
219
220
protected slots:
221
  void setColorSelection( uint );
222
  void updatePreviewPixmap();
223
224
protected:
225
  virtual void paintEvent(TQPaintEvent*);
226
  virtual void paintCell( TQPainter*, int, int ) {}
227
  virtual void paintForeground(TQPainter* p, TQPaintEvent* e);
228
  virtual void mousePressEvent(TQMouseEvent*);
229
  virtual void mouseReleaseEvent(TQMouseEvent*);
230
  virtual void mouseMoveEvent(TQMouseEvent*);
231
  void createCursors();
232
  void drawPointArray(TQPointArray, DrawAction);
233
  void drawEllipse(bool);
234
  void drawLine(bool drawIt, bool drawStraight);
235
  void drawRect(bool);
236
  void drawSpray(TQPoint);
237
  void drawFlood(int x, int y, uint oldcolor);
238
  static void clearImage(TQImage *image);
239
240
  uint currentcolor;
241
  TQPoint start, end;
242
  TQRect insrect;
243
  TQSize cbsize;
244
  TQImage *img;
245
  TQPixmap p;
246
  int selected, tool; //, numrows, numcols;
247
  bool modified, btndown, ispasting, isselecting;
248
  TQPointArray pntarray;
249
  KColorArray iconcolors;
250
  KCommandHistory* history;
251
  KMacroCommand* m_command;
252
  TQCursor cursor_normal, cursor_aim, cursor_flood, cursor_spray, cursor_erase, cursor_paint, cursor_colorpicker;
253
  TransparencyDisplayType m_transparencyDisplayType;
254
  TQColor m_checkerboardColor1;
255
  TQColor m_checkerboardColor2;
256
  CheckerboardSize m_checkerboardSize;
257
  TQColor m_transparencySolidColor;
258
};
259
260
261
262
#endif //__KICONEDITGRID_H__
263
264
265
(-)tdegraphics/kiconedit/knew.cpp (-326 lines)
Lines 1-326 Link Here
1
/*
2
    KDE Draw - a small graphics drawing program for the KDE
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#include <tqlayout.h>
22
#include <tqpainter.h>
23
#include <tqbuttongroup.h>
24
#include <tqradiobutton.h>
25
#include <tqpushbutton.h>
26
27
#include <tdeconfig.h>
28
#include <tdelocale.h>
29
#include <tdeglobal.h>
30
#include <kiconloader.h>
31
#include <kdebug.h>
32
#include <tdeapplication.h>
33
34
#include "knew.h"
35
36
TDEIconTemplateContainer* TDEIconTemplateContainer::instance = 0;
37
38
void createStandardTemplates(TDEIconTemplateContainer *list)
39
{
40
    TDEIconLoader *kil = TDEGlobal::iconLoader();
41
42
    TDEIconTemplate it;
43
    it.path = kil->iconPath("standard", TDEIcon::User);
44
    it.title = i18n("Standard File");
45
    list->append(it);
46
    
47
    it.path = kil->iconPath("source", TDEIcon::User);
48
    it.title = i18n("Source File");
49
    list->append(it);
50
51
    it.path = kil->iconPath("compressed", TDEIcon::User);
52
    it.title = i18n("Compressed File");
53
    list->append(it);
54
55
    it.path = kil->iconPath("folder", TDEIcon::User);
56
    it.title = i18n("Standard Folder");
57
    list->append(it);
58
59
    it.path = kil->iconPath("package", TDEIcon::User);
60
    it.title = i18n("Standard Package");
61
    list->append(it);
62
63
    it.path = kil->iconPath("mini-folder", TDEIcon::User);
64
    it.title = i18n("Mini Folder");
65
    list->append(it);
66
67
    it.path = kil->iconPath("mini-package", TDEIcon::User);
68
    it.title = i18n("Mini Package");
69
    list->append(it);
70
}
71
72
void TDEIconTemplateContainer::save()
73
{
74
  TDEConfig *k = kapp->config();
75
  k->setGroup("Templates");
76
  
77
  TQStringList names;
78
  for (TQValueListIterator<TDEIconTemplate> iter = begin(); iter != end(); iter++)
79
  {
80
      names.append((*iter).title);
81
  }
82
  
83
  k->writeEntry("Names",  names);
84
  
85
  for(unsigned int i = 0; i < names.count(); i++)
86
  {    
87
    k->writePathEntry(names[i], (*this)[i].path);
88
  }
89
}
90
91
TDEIconTemplateContainer::TDEIconTemplateContainer() : TQValueList<TDEIconTemplate>()
92
{  
93
  TQStrList names;
94
  TDEConfig *k = kapp->config();
95
  k->setGroup("Templates");
96
  k->readListEntry("Names", names);
97
  for(int i = 0; i < (int)names.count(); i++)
98
  {
99
    TDEIconTemplate it;
100
    it.path = k->readPathEntry(names.at(i));
101
    it.title = names.at(i);
102
    //kdDebug(4640) << "Template: " << names.at(i) << "\n" << path.data() << endl;
103
    append(it);
104
  }
105
106
  if(count() == 0)
107
  {
108
    createStandardTemplates(this);
109
  }
110
}
111
112
TDEIconTemplateContainer::~TDEIconTemplateContainer()
113
{
114
  clear();
115
}
116
117
TDEIconListBoxItem::TDEIconListBoxItem( TDEIconTemplate t )
118
   : TQListBoxItem(), icontemplate(t)
119
{
120
  //kdDebug(4640) << "TDEIconListBoxItem - " << t->path.data() << ", " << t->title.data() << endl;
121
 
122
  pm.load(t.path);
123
  setText( t.title );
124
}
125
126
void TDEIconListBoxItem::reloadIcon()
127
{
128
  pm.load(icontemplate.path);
129
  setText( icontemplate.title );
130
}
131
 
132
133
134
void TDEIconListBoxItem::paint( TQPainter *p )
135
{
136
  p->drawPixmap( 3, 0, pm );
137
  TQFontMetrics fm = p->fontMetrics();
138
  int yPos;                       // vertical text position
139
  if ( pm.height() < fm.height() )
140
    yPos = fm.ascent() + fm.leading()/2;
141
  else
142
    yPos = pm.height()/2 - fm.height()/2 + fm.ascent();
143
  p->drawText( pm.width() + 5, yPos, text() );
144
}
145
146
int TDEIconListBoxItem::height(const TQListBox *lb ) const
147
{
148
  return TQMAX( pm.height(), lb->fontMetrics().lineSpacing() + 1 );
149
}
150
    
151
int TDEIconListBoxItem::width(const TQListBox *lb ) const
152
{
153
  return pm.width() + lb->fontMetrics().width( text() ) + 6;
154
}
155
156
NewSelect::NewSelect(TQWidget *parent) : TQWidget( parent )
157
{
158
  wiz = (KWizard*) parent;
159
  grp = new TQButtonGroup( this );
160
  connect( grp, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( buttonClicked( int ) ) );
161
  grp->setExclusive( true );
162
  
163
  TQVBoxLayout* ml = new TQVBoxLayout( this );
164
  ml->addWidget( grp, 1 );
165
  //ml->addWidget(grp, 10, AlignLeft);
166
  TQVBoxLayout* l = new TQVBoxLayout( grp, 10 );
167
  
168
  rbscratch = new TQRadioButton( i18n( "Create from scratch" ), grp );
169
  l->addWidget( rbscratch, 1 );
170
  //l->addWidget(rbscratch, 5, AlignLeft);
171
  
172
  rbtempl = new TQRadioButton( i18n( "Create from template" ), grp );
173
  l->addWidget( rbtempl, 1 );
174
  //l->addWidget(rbtempl, 5, AlignLeft);
175
  
176
  //grp->setMinimumSize(grp->childrenRect().size());
177
  
178
  grp->setButton( 0 );
179
}
180
181
NewSelect::~NewSelect()
182
{
183
}
184
185
void NewSelect::buttonClicked(int id)
186
{
187
  //kdDebug(4640) << "Button: " << id << endl;
188
189
  emit iconopenstyle(id);
190
}
191
192
NewFromTemplate::NewFromTemplate( TQWidget* parent )
193
  : TQWidget( parent )
194
{
195
  wiz = (KWizard*) parent;
196
  
197
  TQVBoxLayout* ml = new TQVBoxLayout(this);
198
  
199
  grp = new TQGroupBox( i18n( "Templates" ), this );
200
  ml->addWidget( grp, 1 );
201
  //ml->addWidget(grp, 10, AlignLeft);
202
  
203
  TQHBoxLayout* l = new TQHBoxLayout( grp, 15 );
204
  
205
  templates = new TDEIconListBox( grp );
206
  connect( templates, TQT_SIGNAL( highlighted( int ) ), TQT_SLOT( checkSelection( int ) ) );
207
  l->addWidget( templates );
208
    
209
  for( int i = 0; i < (int) TDEIconTemplateContainer::self()->count(); i++ )
210
    templates->insertItem( new TDEIconListBoxItem( *TDEIconTemplateContainer::self()->at( i ) ) );
211
}
212
213
NewFromTemplate::~NewFromTemplate()
214
{
215
}
216
217
void NewFromTemplate::checkSelection( int )
218
{
219
  //kdDebug(4640) << "checkSelection(int) " << templates->currentItem()  << endl;
220
  if( templates->currentItem() != -1 )
221
    wiz->finishButton()->setEnabled( true );
222
  else
223
    wiz->finishButton()->setEnabled( false );
224
}
225
226
KNewIcon::KNewIcon( TQWidget* parent )
227
  : KWizard( parent, 0, true )
228
{
229
  //kdDebug(4640) << "KNewIcon" << endl;
230
  setCaption( i18n( "Create New Icon" ) );
231
  resize( 400, 250 );
232
  
233
  openstyle = 0;
234
235
  finishButton()->setEnabled( true );
236
  cancelButton()->setEnabled( true );
237
  nextButton()->setEnabled( false );
238
239
  select = new NewSelect( this );
240
  connect( select, TQT_SIGNAL( iconopenstyle( int ) ), TQT_SLOT( iconOpenStyle( int ) ) );
241
242
  scratch = new KResizeWidget( this, 0, TQSize( 32, 32 ) );
243
  // this doesn't accept default valid size, besides spin buttons won't allow 
244
  // an invalid size to be set by the user - forces user to change valid default 
245
  // size to create the new icon object -
246
  connect( scratch, TQT_SIGNAL( validSize( bool ) ), TQT_SLOT( checkPage( bool ) ) );
247
  connect(this, TQT_SIGNAL(selected(const TQString &)), this, TQT_SLOT(checkPage(const TQString &)));
248
  templ = new NewFromTemplate(this);
249
  templ->hide();
250
251
  addPage(select, i18n("Select Icon Type"));
252
  addPage(scratch, i18n("Create From Scratch"));
253
  act = scratch;
254
  //addPage(templ, i18n("Create From Template"));
255
}
256
257
KNewIcon::~KNewIcon()
258
{
259
  delete select;
260
  delete scratch;
261
  delete templ;
262
}
263
264
void KNewIcon::okClicked()
265
{
266
  if(openstyle == Blank)
267
    emit newicon(scratch->getSize());
268
  else
269
    emit newicon(templ->path());
270
  hide();
271
  setResult(1);
272
  accept();
273
}
274
275
void KNewIcon::cancelClicked()
276
{
277
  hide();
278
  setResult(0);
279
  reject();
280
}
281
282
void KNewIcon::iconOpenStyle(int style)
283
{
284
  openstyle = style;
285
286
  if( act )
287
    removePage( act );
288
289
  if(openstyle == Blank)
290
  {
291
    act = scratch;
292
    setNextEnabled( act, true );
293
    addPage( scratch, i18n( "Create From Scratch" ) );
294
  }
295
  else if( openstyle == Template )
296
  {
297
    act = templ;
298
    setNextEnabled( act, true );
299
    addPage( templ, i18n( "Create From Template" ) );
300
  }
301
}
302
303
void KNewIcon::checkPage( bool b)
304
{
305
    //kdDebug(4640) << "checkPage(int) " << openstyle << " " << p << endl;
306
    if(openstyle == Blank)
307
        finishButton()->setEnabled(true);
308
    else if( !b )
309
        finishButton()->setEnabled(false);
310
    else
311
        templ->checkSelection(0);
312
}
313
314
void KNewIcon::checkPage(const TQString &)
315
{
316
  if(currentPage() == select || openstyle == Blank)
317
    finishButton()->setEnabled(true);
318
  else
319
    finishButton()->setEnabled(false);
320
}
321
#include "knew.moc"
322
323
324
325
326
(-)tdegraphics/kiconedit/knew.h (-168 lines)
Lines 1-168 Link Here
1
/*
2
    KDE Draw - a small graphics drawing program for the KDE.
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#ifndef __KNEWICON_H__
22
#define __KNEWICON_H__
23
24
#include <tqwidget.h>
25
#include <tqpixmap.h>
26
#include <tqimage.h>
27
#include <tqlistbox.h>
28
29
#include <kwizard.h>
30
31
#include "kresize.h"
32
33
class TDEIconListBox;
34
class TDEIconTemplateContainer;
35
class TQButtonGroup;
36
class TQRadioButton;
37
class TQGroupBox;
38
39
struct TDEIconTemplate
40
{
41
  TQString path;
42
  TQString title;
43
};
44
45
class TDEIconListBoxItem : public TQListBoxItem    
46
{
47
public:
48
  TDEIconListBoxItem( TDEIconTemplate ); 
49
50
51
  const TQString path() { return icontemplate.path; }
52
  TDEIconTemplate& iconTemplate() { return icontemplate; }
53
  void reloadIcon();
54
55
protected:
56
  virtual void paint( TQPainter * );      
57
  virtual int height( const TQListBox * ) const;      
58
  virtual int width( const TQListBox * ) const;      
59
private:
60
  TQPixmap pm;
61
  TDEIconTemplate icontemplate;
62
};
63
64
class TDEIconListBox : public TQListBox    
65
{
66
  Q_OBJECT
67
  
68
public:
69
  TDEIconListBox( TQWidget *parent ) : TQListBox(parent) {} ;
70
  const TQString path(int idx) { return ((TDEIconListBoxItem*)item(idx))->path(); }
71
  TDEIconTemplate& iconTemplate(int idx) { return ((TDEIconListBoxItem*)item(idx))->iconTemplate(); }
72
73
};
74
75
class TDEIconTemplateContainer : public TQValueList<TDEIconTemplate>
76
{
77
public:
78
   static TDEIconTemplateContainer* self()
79
   {
80
      if (!instance)
81
         instance = new TDEIconTemplateContainer;
82
      return instance;
83
   }
84
85
   void save();
86
87
private:
88
   static TDEIconTemplateContainer* instance;
89
90
  const TDEIconTemplateContainer operator = (const TDEIconTemplateContainer&);
91
  TDEIconTemplateContainer(const TDEIconTemplateContainer&);
92
93
  TDEIconTemplateContainer();  
94
  ~TDEIconTemplateContainer();
95
};
96
97
class NewSelect : public TQWidget
98
{
99
  Q_OBJECT
100
  
101
public:
102
  NewSelect(TQWidget *parent);
103
  ~NewSelect();
104
105
signals:
106
  void iconopenstyle(int);
107
108
protected slots:
109
  void buttonClicked(int);
110
111
protected:
112
  KWizard *wiz;
113
  TQButtonGroup *grp;
114
  TQRadioButton *rbscratch, *rbtempl;
115
};
116
117
class NewFromTemplate : public TQWidget
118
{
119
  Q_OBJECT
120
  
121
public:
122
  NewFromTemplate(TQWidget *parent);
123
  ~NewFromTemplate();
124
125
  const TQString path() { return TQString(templates->path(templates->currentItem())); }
126
127
public slots:
128
  void checkSelection(int);
129
 
130
protected:
131
  TDEIconListBox *templates;
132
  KWizard *wiz;
133
  TQGroupBox *grp;
134
};
135
136
class KNewIcon : public KWizard
137
{
138
  Q_OBJECT
139
  
140
public:
141
  KNewIcon(TQWidget *parent);
142
  ~KNewIcon();
143
144
  enum { Blank = 0, Template = 1};
145
  int openStyle() { return openstyle; }
146
  const TQString templatePath() { return TQString(templ->path()); }
147
  const TQSize templateSize() { return scratch->getSize(); }
148
149
protected slots:
150
  void okClicked();
151
  void cancelClicked();
152
  void iconOpenStyle(int);
153
  void checkPage(bool);
154
  void checkPage(const TQString &);
155
156
signals:
157
  void newicon(const TQSize);
158
  void newicon(const TQString);
159
160
protected:
161
  NewSelect       *select;
162
  KResizeWidget   *scratch;
163
  NewFromTemplate *templ;
164
  TQWidget         *act;
165
  int              openstyle;
166
};
167
168
#endif // __KNEWICON_H__
(-)tdegraphics/kiconedit/kresize.cpp (-83 lines)
Lines 1-83 Link Here
1
/*
2
    KDE Draw - a small graphics drawing program for the KDE
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
    Copyright (C) 2002  Nadeem Hasan ( nhasan@kde.org )
5
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public
8
    License as published by the Free Software Foundation; either
9
    version 2 of the License, or (at your option) any later version.
10
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
    General Public License for more details.
15
16
    You should have received a copy of the GNU Library General Public License
17
    along with this library; see the file COPYING.LIB.  If not, write to
18
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
    Boston, MA 02110-1301, USA.
20
*/
21
22
#include <tqlabel.h>
23
#include <tqlayout.h>
24
#include <tqgroupbox.h>
25
26
#include <tdelocale.h>
27
#include <knuminput.h>
28
29
#include "kresize.h"
30
31
KResizeWidget::KResizeWidget( TQWidget* parent, const char* name, 
32
    const TQSize& size ) : TQWidget( parent, name )
33
{
34
  TQHBoxLayout* genLayout = new TQHBoxLayout( this );
35
36
  TQGroupBox* group = new TQGroupBox( i18n( "Size" ), this );
37
  group->setColumnLayout( 0, Qt::Horizontal );
38
  genLayout->addWidget( group );
39
40
  TQHBoxLayout* layout = new TQHBoxLayout( group->layout(), 6 );
41
42
  m_width = new KIntSpinBox( 1, 200, 1, 1, 10, group );
43
  m_width->setValue( size.width() );
44
  layout->addWidget( m_width, 1 );
45
46
  TQLabel* label = new TQLabel( "X", group );
47
  layout->addWidget( label );
48
49
  m_height = new KIntSpinBox( 1, 200, 1, 1, 10, group);
50
  m_height->setValue( size.height() );
51
  layout->addWidget( m_height, 1 );
52
53
  setMinimumSize( 200, 100 );
54
}
55
56
KResizeWidget::~KResizeWidget()
57
{
58
}
59
60
const TQSize KResizeWidget::getSize()
61
{
62
  return TQSize( m_width->value(), m_height->value() );
63
}
64
65
KResizeDialog::KResizeDialog( TQWidget* parent, const char* name, 
66
    const TQSize size )
67
    : KDialogBase( parent, name, true, i18n( "Select Size" ), Ok|Cancel )
68
{
69
  m_resize = new KResizeWidget( this, "resize widget", size );
70
71
  setMainWidget( m_resize );
72
}
73
74
KResizeDialog::~KResizeDialog()
75
{
76
}
77
78
const TQSize KResizeDialog::getSize()
79
{
80
  return m_resize->getSize();
81
}
82
83
#include "kresize.moc"
(-)tdegraphics/kiconedit/kresize.h (-64 lines)
Lines 1-64 Link Here
1
/*
2
    KDE Draw - a small graphics drawing program for the KDE.
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
    Copyright ( C ) 2002  Nadeem Hasan (  nhasan@kde.org )
5
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public
8
    License as published by the Free Software Foundation; either
9
    version 2 of the License, or (at your option) any later version.
10
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
    General Public License for more details.
15
16
    You should have received a copy of the GNU Library General Public License
17
    along with this library; see the file COPYING.LIB.  If not, write to
18
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
    Boston, MA 02110-1301, USA.
20
*/  
21
22
#ifndef __KRESIZE_H__
23
#define __KRESIZE_H__
24
25
#include <kdialogbase.h>
26
27
class KIntSpinBox;
28
29
class KResizeWidget : public TQWidget
30
{
31
  Q_OBJECT
32
  
33
34
public:
35
36
  KResizeWidget( TQWidget* parent, const char* name, const TQSize& );
37
  ~KResizeWidget();
38
39
  const TQSize getSize();
40
41
private:
42
43
  KIntSpinBox *m_width;
44
  KIntSpinBox *m_height;
45
};
46
47
class KResizeDialog : public KDialogBase
48
{
49
  Q_OBJECT
50
  
51
  
52
public:
53
54
  KResizeDialog( TQWidget* parent, const char* name, const TQSize s );
55
  ~KResizeDialog();
56
57
  const TQSize getSize();
58
59
private:
60
61
  KResizeWidget* m_resize;
62
};
63
64
#endif //__KRESIZE_H__
(-)tdegraphics/kiconedit/main.cpp (-89 lines)
Lines 1-89 Link Here
1
/*
2
    KDE Draw - a small graphics drawing program for the KDE.
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or modify
6
    it under the terms of the GNU General Public License as published by
7
    the Free Software Foundation; either version 2 of the License, or
8
    (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
    GNU General Public License for more details.
14
15
    You should have received a copy of the GNU General Public License
16
    along with this program; if not, write to the Free Software
17
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18
*/
19
20
// A lot of this code is lifted from KMail. Thanks, guys!
21
22
#include <stdlib.h>
23
24
#include <tdelocale.h>
25
#include <tdeconfig.h>
26
#include <tdeaboutdata.h>
27
#include <tdecmdlineargs.h>
28
#include <kdebug.h>
29
30
#include "kiconedit.h"
31
#include "config.h"
32
#include "properties.h"
33
34
static const char description[] =
35
	I18N_NOOP("TDE Icon Editor");
36
37
static TDECmdLineOptions options[] =
38
{
39
  { "+[file(s)]" , I18N_NOOP("Icon file(s) to open"), 0 },
40
  TDECmdLineLastOption
41
};
42
43
int main(int argc, char **argv)
44
{
45
  TDEAboutData aboutData( "kiconedit", I18N_NOOP("TDEIconEdit"),
46
    VERSION, description, TDEAboutData::License_GPL,
47
    "(c) 1998, Thomas Tanghus");
48
49
  aboutData.addAuthor("Thomas Tanghus",0, "tanghus@kde.org");
50
  aboutData.addAuthor("John Califf",0, "jcaliff@compuzone.net");
51
  aboutData.addAuthor("Laurent Montel",0, "lmontel@mandrakesoft.com");
52
  aboutData.addAuthor("Aaron J. Seigo",0, "aseigo@olympusproject.org");
53
  aboutData.addCredit( "Nadeem Hasan", "Rewrote UI to use XMLGUI\n"
54
      "Lots of fixes and cleanup", "nhasan@nadmm.com" );
55
  aboutData.addCredit( "Adrian Page", I18N_NOOP("Bug fixes and GUI tidy up"),
56
      "Adrian.Page@tesco.net" );
57
  TDECmdLineArgs::init( argc, argv, &aboutData );
58
  TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
59
60
  TDEApplication a;
61
62
//  setSignalHandler(signalHandler);
63
64
  if (a.isRestored())
65
  {
66
    RESTORE(TDEIconEdit);
67
  }
68
  else
69
  {
70
    TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
71
    for(int i = 0; i < args->count(); i++)
72
    {
73
        TDEIconEdit *ki = new TDEIconEdit(args->url(i), "kiconedit");
74
        TQ_CHECK_PTR(ki);
75
    }
76
77
    if (args->count() == 0)
78
    {
79
        TDEIconEdit *ki = new TDEIconEdit;
80
        TQ_CHECK_PTR(ki);
81
    }
82
    args->clear();
83
  }
84
85
  int rc = a.exec();
86
  delete TDEIconEditProperties::self();
87
  return rc;
88
}
89
(-)tdegraphics/kiconedit/palettetoolbar.cpp (-178 lines)
Lines 1-178 Link Here
1
/*
2
    kiconedit - a small graphics drawing program for the KDE
3
    Copyright ( C ) 1998  Thomas Tanghus (  tanghus@kde.org )
4
    Copyright ( C ) 2002  Nadeem Hasan (  nhasan@kde.org )
5
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public
8
    License as published by the Free Software Foundation; either
9
    version 2 of the License, or (  at your option ) any later version.
10
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
    General Public License for more details.
15
16
    You should have received a copy of the GNU Library General Public License
17
    along with this library; see the file COPYING.LIB.  If not, write to
18
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
    Boston, MA 02110-1301, USA.
20
*/
21
22
#include <tqlabel.h>
23
#include <tqlayout.h>
24
#include <tqwhatsthis.h>
25
#include <tqpainter.h>
26
27
#include <tdelocale.h>
28
#include <kdebug.h>
29
30
#include "kiconcolors.h"
31
#include "palettetoolbar.h"
32
33
PaletteToolBar::PaletteToolBar( TQWidget *parent, const char *name )
34
    : TDEToolBar( parent, name )
35
{
36
  TQWidget *base = new TQWidget( this );
37
38
  TQBoxLayout::Direction d = orientation() == Qt::Horizontal? 
39
      TQBoxLayout::LeftToRight : TQBoxLayout::TopToBottom;
40
  m_layout = new TQBoxLayout( base, d, 2, 6 );
41
42
  m_lblPreview = new TQLabel( base );
43
  m_lblPreview->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
44
  m_lblPreview->setFixedHeight( 64 );
45
  m_lblPreview->setAlignment( TQt::AlignHCenter|TQt::AlignVCenter );
46
  TQWhatsThis::add(m_lblPreview, i18n( "Preview\n\nThis is a 1:1 preview"
47
      " of the current icon" ) );
48
  m_layout->addWidget( m_lblPreview );
49
50
  m_currentColorView = new TQLabel( base );
51
  m_currentColorView->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
52
  m_currentColorView->setFixedHeight( 24 );
53
  m_currentColorView->setAlignment( TQt::AlignHCenter|TQt::AlignVCenter );
54
  TQWhatsThis::add(m_currentColorView, i18n( "Current color\n\nThis is the currently selected color" ) );
55
  m_layout->addWidget( m_currentColorView );
56
57
  TQVBoxLayout *vlayout = new TQVBoxLayout( m_layout, 0 );
58
  TQLabel *l = new TQLabel( i18n( "System colors:" ), base );
59
  vlayout->addWidget( l );
60
  m_sysColors = new KSysColors( base );
61
  TQWhatsThis::add(m_sysColors, i18n( "System colors\n\nHere you can select"
62
      " colors from the TDE icon palette" ) );
63
64
  vlayout->addWidget( m_sysColors );
65
66
  connect( m_sysColors, TQT_SIGNAL( newColor(uint) ), 
67
      TQT_SIGNAL( newColor(uint) ) );
68
69
  vlayout = new TQVBoxLayout( m_layout, 0 );
70
  l = new TQLabel( i18n( "Custom colors:" ), base );
71
  vlayout->addWidget( l );
72
  m_customColors = new KCustomColors( base );
73
  TQWhatsThis::add(m_customColors, i18n( "Custom colors\n\nHere you can"
74
      " build a palette of custom colors.\nDouble-click on a box to edit"
75
      " the color" ) );
76
77
  vlayout->addWidget( m_customColors );
78
79
  connect( m_customColors, TQT_SIGNAL( newColor(uint) ), 
80
      TQT_SIGNAL( newColor(uint) ) );
81
  connect( this, TQT_SIGNAL( newColor(uint)),
82
      this, TQT_SLOT(currentColorChanged(uint)));
83
  currentColorChanged(OPAQUE_MASK|0);
84
85
  setEnableContextMenu( false );
86
  setMovingEnabled( false );
87
}
88
89
void PaletteToolBar::setOrientation( Qt::Orientation o )
90
{
91
   if(  barPos() == Floating )
92
     o = o == Qt::Vertical ? Qt::Horizontal : Qt::Vertical;
93
94
  TQBoxLayout::Direction d = o == Qt::Horizontal? TQBoxLayout::LeftToRight
95
        : TQBoxLayout::TopToBottom;
96
  m_layout->setDirection( d );
97
98
  TQDockWindow::setOrientation( o );
99
}
100
101
void PaletteToolBar::previewChanged(  const TQPixmap &p )
102
{
103
  m_lblPreview->setPixmap( p );
104
}
105
106
void PaletteToolBar::addColors( uint n, uint *c )
107
{
108
    m_customColors->clear();
109
    for( uint i = 0; i < n; i++ )
110
        addColor( c[ i ] );
111
}
112
113
void PaletteToolBar::addColor( uint color )
114
{
115
    if( !m_sysColors->contains( color ) )
116
        m_customColors->addColor( color );
117
}
118
119
void PaletteToolBar::setPreviewBackground( TQPixmap pixmap )
120
{
121
    m_lblPreview->setBackgroundPixmap(pixmap);
122
}
123
124
void PaletteToolBar::setPreviewBackground( const TQColor& colour )
125
{
126
    m_lblPreview->setBackgroundColor(colour);
127
}
128
129
void PaletteToolBar::currentColorChanged(uint color)
130
{
131
  if(tqAlpha(color) == 255)
132
  {
133
    m_currentColorView->setBackgroundColor(color);
134
  }
135
  else
136
  {
137
    // Show the colour as if drawn over a checkerboard pattern
138
    const int squareWidth = 8;
139
    const uint lightColour = tqRgb(255, 255, 255);
140
    const uint darkColour = tqRgb(127, 127, 127);
141
142
    TQPixmap pm(2 * squareWidth, 2 * squareWidth);
143
    TQPainter p(&pm);
144
145
    double alpha = tqAlpha(color) / 255.0;
146
147
    int r = int(tqRed(color) * alpha + (1 - alpha) * tqRed(lightColour) + 0.5);
148
    int g = int(tqGreen(color) * alpha + (1 - alpha) * tqGreen(lightColour) + 0.5);
149
    int b = int(tqBlue(color) * alpha + (1 - alpha) * tqBlue(lightColour) + 0.5);
150
151
    uint squareColour = tqRgb(r, g, b);
152
153
    p.setPen(TQt::NoPen);
154
    p.setBrush(TQColor(squareColour));
155
    p.drawRect(0, 0, squareWidth, squareWidth);
156
    p.drawRect(squareWidth, squareWidth, squareWidth, squareWidth);
157
158
    r = int(tqRed(color) * alpha + (1 - alpha) * tqRed(darkColour) + 0.5);
159
    g = int(tqGreen(color) * alpha + (1 - alpha) * tqGreen(darkColour) + 0.5);
160
    b = int(tqBlue(color) * alpha + (1 - alpha) * tqBlue(darkColour) + 0.5);
161
162
    squareColour = tqRgb(r, g, b);
163
164
    p.setBrush(TQColor(squareColour));
165
    p.drawRect(squareWidth, 0, squareWidth, squareWidth);
166
    p.drawRect(0, squareWidth, squareWidth, squareWidth);
167
168
    p.end();
169
170
    m_currentColorView->setBackgroundPixmap(pm);
171
  }
172
}
173
174
#include "palettetoolbar.moc"
175
176
/* vim: et sw=2 ts=2
177
*/
178
(-)tdegraphics/kiconedit/palettetoolbar.h (-64 lines)
Lines 1-64 Link Here
1
/*
2
    kiconedit - a small graphics drawing program for the KDE
3
    Copyright ( C ) 1998  Thomas Tanghus ( tanghus@kde.org )
4
    Copyright ( C ) 2002  Nadeem Hasan ( nhasan@kde.org )
5
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public
8
    License as published by the Free Software Foundation; either
9
    version 2 of the License, or ( at your option ) any later version.
10
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
    General Public License for more details.
15
16
    You should have received a copy of the GNU Library General Public License
17
    along with this library; see the file COPYING.LIB.  If not, write to
18
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
    Boston, MA 02110-1301, USA.
20
*/
21
22
#ifndef PALLETTETOOLBAR_H
23
#define PALLETTETOOLBAR_H
24
25
#include <tdetoolbar.h>
26
27
class TQBoxLayout;
28
class TQLabel;
29
class KSysColors;
30
class KCustomColors;
31
32
class PaletteToolBar : public TDEToolBar
33
{
34
  Q_OBJECT
35
  
36
37
  public:
38
    PaletteToolBar( TQWidget *parent, const char *name = 0L );
39
40
  signals:
41
    void newColor( uint c );
42
43
  public slots:
44
    virtual void setOrientation( Qt::Orientation o );
45
    void previewChanged( const TQPixmap &p );
46
    void addColors( uint n, uint *c );
47
    void addColor( uint color );
48
    void setPreviewBackground( TQPixmap pixmap );
49
    void setPreviewBackground( const TQColor& colour );
50
    void currentColorChanged(uint color);
51
52
  private:
53
    TQBoxLayout *m_layout;
54
    TQLabel *m_lblPreview;
55
    TQLabel *m_currentColorView;
56
    KSysColors *m_sysColors;
57
    KCustomColors *m_customColors;
58
};
59
60
#endif // PALLETTETOOLBAR_H
61
62
/* vim: et sw=2 ts=2
63
*/
64
(-)tdegraphics/kiconedit/pics/CMakeLists.txt (-15 lines)
Lines 1-15 Link Here
1
#################################################
2
#
3
#  (C) 2010-2011 Calvin Morrison
4
#  mutantturkey@gmail.com
5
#
6
#  Improvements and feedback are welcome
7
#
8
#  This file is released under GPL >= 2
9
#
10
#################################################
11
12
add_subdirectory( icons )
13
add_subdirectory( toolbar )
14
15
tde_install_icons( kiconedit )
(-)tdegraphics/kiconedit/pics/Makefile.am (-5 lines)
Lines 1-5 Link Here
1
2
SUBDIRS = icons toolbar 
3
4
KDE_ICON = kiconedit
5
(-)tdegraphics/kiconedit/pics/hi16-app-kiconedit.png (-6 lines)
Lines 1-6 Link Here
1
‰PNG
2
3
IHDRóÿabKGD½½½iBÕ¨ÆIDATxڕ“Áƒ D?y–‘ì‚-!GÊ¡˜8ZÜS@) ]l«F™È³óÐÑ]ÌÝ¥•œh
4
h
5
Ú" úJø[ ék¡…Ìc€§‘]´â6=-áþ‘§A5g;*²dÎ9€ïù!tgҖ´Ú_µm×·­"ÐtÇêLàªÖ·Ô2(EðJ±S4±â¤›ˆ'°ëÄZðv•	ÅMÝ
6
È9Ç!æÑH<0†@d¬ûZ¦Ôžr3ãß F+ÕuCtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comkÃ*tEXtSignature061696e793d83d89f2d332b61b03e37còZfIEND®B`‚
(-)tdegraphics/kiconedit/pics/hi22-app-kiconedit.png (-9 lines)
Lines 1-9 Link Here
1
‰PNG
2
3
IHDRÄ´l;gAMA±üabKGDÿÿÿ ½§“	pHYsd_‘ÝIDAT8Ë­“[O\U€¿}ΙÎ00´\l"áR
4
‘¶™p‰šÚ¦ÚjLjb…D‘4ñÁ„Æ? /Æ_Õ´EžŒÆÄBLZª¢RJ(0\Š(¡(w†™3ÃÌ0Üs|à@*—ú`W²’½³W¾µóíµáÙEPðy Ú¤Š.V|øÖ…a—S}ù™A?i83n½búo֙µÕ^ _ù_P»TÑ\_ÝrýÒ1Ïúàm:½“ãÎ$`(@&pÞª*J 4˜‹C`ì†:íRÅGuU-×/{â£mtެrÃËHÏlø0P\
5
²z·{|:;ۜó"t³Õd÷M+?m8=œh{Ï\ÿ8Ûüþua¾š'†AåvͶ
6
0
¤¥9/(*¯×ò2èú§ÍuU·š^+ñ$ÆÚ¹ÛïçËAFºfÍw“&ƒO‚M!D‰$D•niAI¤>Êp£——t³¸xFRÒ0ŒXŠM’›ë«¿hº\쉏¶Óñp(€<Mï\è¨=_‘¹ªEÍ¡ž>åÊ©
7
))»ùiÈkœÈu$S²òéíŠ=o…ß®)ɍß¡k8ÀWCûCwn|¢4_©©yÑðkhÓc”ç&ѝÏáO”JçNªvSÍ&/ÃmÏM	»nÒ󇯭‘ƒ¡;Žý+sS󬬮ã_1=;¢Èj.ëJ&ÚrˆŒœf¦Féû;›ÍuÏïÝ?jܟYdM‹ñ؜¦7µŸ´ôVÎââß:ο†ééý…©pE—‘¶i ó”P^:u’7¯ÖhH¶6®6ÆÑõeZZÆÅ‹i½ÛI<0‡šµHÖ:y¨}#8Ló?À‰x‚ÍD„X4J2aˆlMYxm‰%q›¢Ò	fæuÔÈH¿¬ù–Ðw"àރG¬:"¡
î
…ùFL˜½Ä•Dv@ÀFl>ˆúPÌB>#•5âÈLñ9:?ì;í¡ºñ!_ˆï\whXÙê¿x—U²€)$ŽSF!ànð-‘«$I  ¡ÈB²ÚÉÖ©ÍJù‰”¬°9ùùO¤nb¡(É9KǦ@ë
8
°ñ›ìL‡@—@U@ÛaÀ˜bIˆw+Þg½ÂÙÂÖ4Q´úB´/~ÍøD%
9
t*L ­@t/8Õåäp–!'p88݇BG¶©@º%YœÖ:HZûȾ>@÷z
‚"¢Q͜œìCÓâaö[¯ãF-Ùn`ذÎÂ2lnì«ýQ«ÉSFþÀÀ¼åd'þÒ̤­Z³ÙIEND®B`‚
(-)tdegraphics/kiconedit/pics/hi32-app-kiconedit.png (-6 lines)
Lines 1-6 Link Here
1
‰PNG
2
3
IHDR"":GÂgAMA±üa	pHYsÒÝ~ü÷IDATxœÍ—MHadznP–¶I""K¬`/"R[—„xȃЭKv7tuˆ<%(mˆD®&±&Ѫøº›•¹•nn®J²¥î¼Ü]wöÓYmós˜ç}æ}óÌÿ}˜v‰¤ÿ°¦ˆµ¾.ݓ
—qõ6ãl®„J„·©Bû=á{X.„{X8›kEFŸ.¥½
4
ŠdVí¬¿ëaÈù	wni(! B¼0#òÏÀH{t††ì“<ïš%ýk„ ¤‰n¤	~}-v‰™EÕt­Ólu§mBŒv¢8Ÿ ¬‚¸ÓïWÍ^)âÂ]XHÐMí­‚Àñ8!Døˆñ¦"´xN,,’UdÓã݈±V”õÄ[Q''Q“	~%ƒÆ^ó>%.ì¬Y…Ò^µ1ւh±KI!@½}£l穘vñ6U@‘Œ°i¬
¶;’A„
5
1զȯD´Uªc•mˆúÀMG‹©®¾Å«eœ<wÕétÃt´AÀ4´+ÕfNœ7âëªG¸GٛÁ£>ßW’Žp¥æ‘@5zžPZVŽâõàù“cAOc¯¤¶Y‘ýg‹Xó-ñÙñÇb.®e#_–¹?"4A„'o¹_ɲŒÑh„Ñ~n6Üf¡ï¯_
05çÅóûÓÞYÞ¸`e%E!lêÉÕH$	ÆÇe²²Šé·Ìâóx‘ægèu~d1ó'‡N¯a0@Ã]ÕÜ[’¦O#˶—¿07urìÈ>¾~ùÁÅK^ŽÖ2S´R2ëœç-§
6
–¹VýCž—ƒCde¦¢©"V«•š+%%PR²ËÉÙ\ÜïO
Rû
؎’·x[„YM’)Ol1P«K ýC‹×Pç(ývzÜ6NIQ 묧>[¤4€íB³ÚÔ,&“D][3›óˆíÖ±ëD»³pÅ%Lã‘3qÑÓ}ö«4‚(	GwYwþÕRKzÎњIEND®B`‚
(-)tdegraphics/kiconedit/pics/hi48-app-kiconedit.png (-5 lines)
Lines 1-5 Link Here
1
‰PNG
2
3
IHDR00Wù‡gAMA±üa	pHYsÒÝ~üEIDATxœí˜_L[UÇ?·÷Ú*´´!ÁÖ¸*S”¸³§ÅŠ‹Ì8âÃ6@Ý«1ÆEM4cYôÁÄ£Ks™›³ñÅ}0ÆA`„©3NÌDíøÓ9B	“Rh)ýw}¸£pזõÏÝڙ~“æ69çö|>çœû˹…rŠ¡ØYD^÷=…WwAò‰<öþ3OrñØ[ –J{äùž]PۈqɃñ‰·	Mý†iÛ°Ž»TW@N¸÷blxSžÅónÂgQéhNY‰Rî½–û1l~˜ð7]H",žwÓóâ&¦¯ª:—ÚJÂËÎ&bÇv‹C,_ŒJø—àR@¦g4רKiTð|¶II\ƒ_ˆ©á¤âñª"˧;aþóÎdÃñŸ×àß=§†µ@J‰Ê!…lE¾æÁø£#ÃCê
4
d‘3Ùø¥‡Ç²‚‡\žíەv)hæW“½€Í¦\µ‘È<ógÉr­BÚH¨áOt(4‡m³>ÙX,Êu½Dî")ðñ„R=ò‡\˨Å~ÿšDnQÁÇz;DH$àÓ!/xHÈXJ·]¸€Éd"¦…Û`ázøð'íH¢@ïùçȞÓé	œîkñ>¨¶_ñà_o‹ˆ¡½ÕËóÊ}½Ä‘VInßõ,áê͜M,}¼AÐéàèpað)7L|œøJ5¢Á‚h°$%ðûÐ[ 2"i•xü©V¨mD¬ÿG{ÐédNý*Ÿ» ®À`	Ñ&“	*ë@/ 7êØ÷üs¼w¸JG3ááp_ƒpÿ®
<äs˜‹CÀ‰ èL˜Íf"U
DõÉn;]mT:š‰ÎMž"Qد.jùæâãªíØl6ôF=ê•Ù¯°òÚËoòÁɯ‰ÎM
.2s×f‚Íü5r\SøüV%–uTUUA…¾dÓÓ[šY	ÌZXäŸÑs\ñxù{n†å;]\š>ƒ/$kýätmii¡®®§Ó	€ÃáÀjµ2ôáÚì
}Ÿ„ŸñßAxÁËÜÜeúþL¤¿pYîOßIpe<Žvt´ÓÝý$’då—wN‘Øô(÷ÿrÅãeÐs5	>ÿ€îtBw·6¿Ð¸Ýî¤ÀO¦»™þî,™ñ\žÅ?;©€×(àZ§`»ÝN8<…ÑèàW{éûò[šïåZ3Ãã´µ¥‚›Í…ŽºM^)C¡1ŒFG~ÇÎI†ÕðZ‚¯¦`¯×K4jÇç;Áþý“lݪîs3ÀW£É
5
C´µ¥¶ÝLx( ŒÞ‚äþ>П¡ŒºWf=H›rTíÊÐÖuƒ¶,SJl啲@±S(vþge´?½ƒË%pà€/mÛÁƒ66®£‡3´½‚uô¶ßBeb§,PìÜöe´œbç?¼ø™Í²žIEND®B`‚
(-)tdegraphics/kiconedit/pics/icons/CMakeLists.txt (-12 lines)
Lines 1-12 Link Here
1
#################################################
2
#
3
#  (C) 2010-2011 Calvin Morrison
4
#  mutantturkey@gmail.com
5
#
6
#  Improvements and feedback are welcome
7
#
8
#  This file is released under GPL >= 2
9
#
10
#################################################
11
12
install( FILES source.png standard.png compressed.png DESTINATION ${DATA_INSTALL_DIR}/kiconedit/pics )
(-)tdegraphics/kiconedit/pics/icons/Makefile.am (-5 lines)
Lines 1-5 Link Here
1
pics_DATA = source.png \
2
	standard.png \
3
	compressed.png
4
5
picsdir = $(kde_datadir)/kiconedit/pics
(-)tdegraphics/kiconedit/pics/icons/compressed.png (-4 lines)
Lines 1-4 Link Here
1
‰PNG
2
3
IHDR  szzôbKGD½½½iBÕ¨BIDATxÚí–}ƒ Å_—ÝKÆÑÊɺ?壒e‹MšŒý½Ò§xâÇCöì­A#p‘At܆*õ©Hr3"Xu‹§
4
@Èw	ÞR@$š"â6\Bð²àw;'¢¸Óf¼gÃsæ×ÅÝ?,8e®î…+@ˆHf÷#pMH.à­O6pÎÖmF£	›K–ðe_ú!xíD_úžñÝpï	Þ·ÝODpÎÕr‘y}[ëÁaÖÿ ιªßöì‡[À¼Þ‚#l8ElàuE|ñ.dnç‰]Š“˜ÙySˆî9·l+›9ø(x¿–%Ô>ªŸ¯b‹L>Ô§"A8Ô¨Î9 H ïK	縚©NŽ}®x›™Ï|~IÃ͂7…Àpûl¸*7ŸóiB¾	â?âc½è|FÛØhCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturee93b73a5e466da157cb2558e6fa50c14wî µIEND®B`‚
(-)tdegraphics/kiconedit/pics/icons/source.png (-4 lines)
Lines 1-4 Link Here
1
‰PNG
2
3
IHDR  szzôbKGD½½½iBÕ¨	IDATxÚí”[„ E¯³1peº´º²Î‡¨Ø)ÚVþƛ=§$
4
¼yó¦O¸w†pæ•={9sݧ;üTÔ!òD@…{E¢'ø²¬eR҅®D"ÍÎ#"^Sç@¸ó	3Ÿ™‰·‰À2­u™œ}ÿ
‰Ùe""9¯{Vþƒsu€“'йsRà¬IQO8	‘v÷­õ;øG7¼–2R™QÍúùq0Ï@Ο\-Àóly ºÉlbÇþ8æ[¸Ü`"€ÊLSë%$ü’©sU8ì"µ\ðց°ˆõÙïB"¸õà­Hî=¬Š!]"@¾T‹t¨óçùûQDóÛ>CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature19c861f09a8f9b0bd8500ca716d9500cƒ!®IEND®B`‚
(-)tdegraphics/kiconedit/pics/icons/standard.png (-5 lines)
Lines 1-5 Link Here
1
‰PNG
2
3
IHDR  szzôbKGD½½½iBÕ¨“IDATxÚí–ɍÃ0E?ӘUÈRŠKÑÁ…P•q–¬%¤{æÒû\ÄøÚ×î™>1b¦½îÀE¤^>†ë݄çˆÐúÊØˆ³R%øy`½"=xeš¯o|kF8OÂÙøžÅÏ
4
1à¬b{1MÌHÄBÙùŠ¥ìúB–àŸegN»%¶žsu0¸ÁŒá<d!zæ¤À+‘kžZ°Å™±Ö¬Pî~úBHç,xŽÕ‚®Ë՝ðÊqÛ&Uð,L³Ïj4Ë	ÅEc^^¨ežDlÛڎIm‘}ßS…DâÎ5ÓÎâ\ûšùŽƒ9c‰{UÎr^šá<òPH¯Z¤UÎÞµúÍ
5
9w€÷ǰW¥ÊÁÅ#!õ>™W"ÒÚÅs™ó•¹UvS@9€zo-=½Ì©7•…à¤g—–ͦ<Ç"ï¼ß?Kÿ¾â r÷c÷<ÿH­ô\5!EÙÝzÏy2pÓB¼?úð?Ì|¹"ÿ•¹-$f›Ö“{\‘»ð_—×)U??mCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturece7250189698bca9d2ddeab5c2c142afÏùaIEND®B`‚
(-)tdegraphics/kiconedit/pics/logo.xpm (-137 lines)
Lines 1-137 Link Here
1
/* XPM */
2
static const char *logo[]={
3
"260 87 47 1",
4
"J c #9e9e9e",
5
"b c #9f9f9f",
6
"f c #a0a0a0",
7
"I c #a1a1a1",
8
"c c #a2a2a2",
9
"B c #a3a3a3",
10
"G c #a4a4a4",
11
"O c #a5a5a5",
12
"a c #a6a6a6",
13
"v c #a7a7a7",
14
"N c #a8a8a8",
15
"R c #a9a9a9",
16
"z c #aaaaaa",
17
"p c #ababab",
18
"w c #acacac",
19
"t c #adadad",
20
"Q c #aeaeae",
21
"P c #afafaf",
22
"o c #b0b0b0",
23
"S c #b1b1b1",
24
"K c #b2b2b2",
25
"C c #b3b3b3",
26
"M c #b4b4b4",
27
"s c #b5b5b5",
28
"k c #b6b6b6",
29
"n c #b7b7b7",
30
"H c #b8b8b8",
31
"A c #b9b9b9",
32
"d c #bababa",
33
"u c #bbbbbb",
34
"x c #bcbcbc",
35
"l c #bdbdbd",
36
"q c #bebebe",
37
"r c #bfbfbf",
38
"e c #c0c0c0",
39
"D c #c1c1c1",
40
"E c #c2c2c2",
41
"L c #c3c3c3",
42
"F c #c4c4c4",
43
"i c #c5c5c5",
44
"h c #c6c6c6",
45
"# c #c7c7c7",
46
"j c #c8c8c8",
47
"y c #c9c9c9",
48
"g c #cacaca",
49
"m c #cbcbcb",
50
". c #cccccc",
51
"....................#abcdebfg.hbijklm...................................#abcdebfg.hbijklm...................................#abcdebfg.hbijklm...................................#abcdebfg.hbijklm...................................#abcdebfg.hbijklm...............",
52
"................gni.opqrcstbu..vd...................................gni.opqrcstbu..vd...................................gni.opqrcstbu..vd...................................gni.opqrcstbu..vd...................................gni.opqrcstbu..vd...................",
53
"................qbu.wk..qbxbv..y....................................qbu.wk..qbxbv..y....................................qbu.wk..qbxbv..y....................................qbu.wk..qbxbv..y....................................qbu.wk..qbxbv..y....................",
54
"........iszA....qB..svm..vsCbr.........Dd.sE................iszA....qB..svm..vsCbr.........Dd.sE................iszA....qB..svm..vsCbr.........Dd.sE................iszA....qB..svm..vsCbr.........Dd.sE................iszA....qB..svm..vsCbr.........Dd.sE........",
55
"........sbbl.#..Ffg.jGog.zp.l#.........jh.Hp................sbbl.#..Ffg.jGog.zp.l#.........jh.Hp................sbbl.#..Ffg.jGog.zp.l#.........jh.Hp................sbbl.#..Ffg.jGog.zp.l#.........jh.Hp................sbbl.#..Ffg.jGog.zp.l#.........jh.Hp........",
56
".....dm.obbFmfH.mBu..iaIvbq...............yIE............dm.obbFmfH.mBu..iaIvbq...............yIE............dm.obbFmfH.mBu..iaIvbq...............yIE............dm.obbFmfH.mBu..iaIvbq...............yIE............dm.obbFmfH.mBu..iaIvbq...............yIE.......",
57
"...#pbu.pbJg.CbE.sGg.AKunL.................MNrKj.......#pbu.pbJg.CbE.sGg.AKunL.................MNrKj.......#pbu.pbJg.CbE.sGg.AKunL.................MNrKj.......#pbu.pbJg.CbE.sGg.AKunL.................MNrKj.......#pbu.pbJg.CbE.sGg.AKunL.................MNrKj....",
58
"...EJbGmabB..ycp.#ONHBE....................#ffHg.......EJbGmabB..ycp.#ONHBE....................#ffHg.......EJbGmabB..ycp.#ONHBE....................#ffHg.......EJbGmabB..ycp.#ONHBE....................#ffHg.......EJbGmabB..ycp.#ONHBE....................#ffHg....",
59
"....PbbHfbGh..xbHDOswq..............NF......acg.........PbbHfbGh..xbHDOswq..............NF......acg.........PbbHfbGh..xbHDOswq..............NF......acg.........PbbHfbGh..xbHDOswq..............NF......acg.........PbbHfbGh..xbHDOswq..............NF......acg.....",
60
".hDixfbcbbbbwD.nbbz.................pp......jGC......hDixfbcbbbbwD.nbbz.................pp......jGC......hDixfbcbbbbwD.nbbz.................pp......jGC......hDixfbcbbbbwD.nbbz.................pp......jGC......hDixfbcbbbbwD.nbbz.................pp......jGC.....",
61
".KbbpsbbfBbbbbNuLqg.................lbr..CF..rfE.....KbbpsbbfBbbbbNuLqg.................lbr..CF..rfE.....KbbpsbbfBbbbbNuLqg.................lbr..CF..rfE.....KbbpsbbfBbbbbNuLqg.................lbr..CF..rfE.....KbbpsbbfBbbbbNuLqg.................lbr..CF..rfE....",
62
".QbbAgGbbuAObbbQm...................gBOm.PB#..KOg....QbbAgGbbuAObbbQm...................gBOm.PB#..KOg....QbbAgGbbuAObbbQm...................gBOm.PB#..KOg....QbbAgGbbuAObbbQm...................gBOm.PB#..KOg....QbbAgGbbuAObbbQm...................gBOm.PB#..KOg...",
63
"..qIF.lbbOgmlNzg....................yvbn.hfP..#ONg....qIF.lbbOgmlNzg....................yvbn.hfP..#ONg....qIF.lbbOgmlNzg....................yvbn.hfP..#ONg....qIF.lbbOgmlNzg....................yvbn.hfP..#ONg....qIF.lbbOgmlNzg....................yvbn.hfP..#ONg..",
64
"...vx..Rbbn.npwA....................MGGIj.MfFmvqbL.....vx..Rbbn.npwA....................MGGIj.MfFmvqbL.....vx..Rbbn.npwA....................MGGIj.MfFmvqbL.....vx..Rbbn.npwA....................MGGIj.MfFmvqbL.....vx..Rbbn.npwA....................MGGIj.MfFmvqbL..",
65
"..HJo..LbbNmObbr................#y..anebS.gRcSbyrm....HJo..LbbNmObbr................#y..anebS.gRcSbyrm....HJo..LbbNmObbr................#y..anebS.gRcSbyrm....HJo..LbbNmObbr................#y..anebS.gRcSbyrm....HJo..LbbNmObbr................#y..anebS.gRcSbyrm..",
66
".Lbbbl..SMyQQEqy...............sbBj.Od.nJA.gKvn......Lbbbl..SMyQQEqy...............sbBj.Od.nJA.gKvn......Lbbbl..SMyQQEqy...............sbBj.Od.nJA.gKvn......Lbbbl..SMyQQEqy...............sbBj.Od.nJA.gKvn......Lbbbl..SMyQQEqy...............sbBj.Od.nJA.gKvn.....",
67
"..wpMGPrLdNbL.................yflad.to.ibbvRq.........wpMGPrLdNbL.................yflad.to.ibbvRq.........wpMGPrLdNbL.................yflad.to.ibbvRq.........wpMGPrLdNbL.................yflad.to.ibbvRq.........wpMGPrLdNbL.................yflad.to.ibbvRq.......",
68
".....ubbNpbbM..............Dnhibmwn.lfEhbsul.............ubbNpbbM..............Dnhibmwn.lfEhbsul.............ubbNpbbM..............Dnhibmwn.lfEhbsul.............ubbNpbbM..............Dnhibmwn.lfEhbsul.............ubbNpbbM..............Dnhibmwn.lfEhbsul........",
69
".....sbBg.KJC...........DFiIQBEbjOq..PINOm...............sbBg.KJC...........DFiIQBEbjOq..PINOm...............sbBg.KJC...........DFiIQBEbjOq..PINOm...............sbBg.KJC...........DFiIQBEbjOq..PINOm...............sbBg.KJC...........DFiIQBEbjOq..PINOm..........",
70
".....Fkd..mxF...........qzAz.Cazvcg..QtKh................Fkd..mxF...........qzAz.Cazvcg..QtKh................Fkd..mxF...........qzAz.Cazvcg..QtKh................Fkd..mxF...........qzAz.Cazvcg..QtKh................Fkd..mxF...........qzAz.Cazvcg..QtKh...........",
71
"...........rL...........gbvQ.gGHBOiiwOy........................rL...........gbvQ.gGHBOiiwOy........................rL...........gbvQ.gGHBOiiwOy........................rL...........gbvQ.gGHBOiiwOy........................rL...........gbvQ.gGHBOiiwOy.............",
72
".....................LHL.wbO..dOiNbfoj...................................LHL.wbO..dOiNbfoj...................................LHL.wbO..dOiNbfoj...................................LHL.wbO..dOiNbfoj...................................LHL.wbO..dOiNbfoj..............",
73
"....................EIbcPFfJ#.yfD.E#....................................EIbcPFfJ#.yfD.E#....................................EIbcPFfJ#.yfD.E#....................................EIbcPFfJ#.yfD.E#....................................EIbcPFfJ#.yfD.E#................",
74
"................jwe.QKyjvwKbk..Pr...................................jwe.QKyjvwKbk..Pr...................................jwe.QKyjvwKbk..Pr...................................jwe.QKyjvwKbk..Pr...................................jwe.QKyjvwKbk..Pr...................",
75
"..........mj....lbD.tM..FbxbBm................................mj....lbD.tM..FbxbBm................................mj....lbD.tM..FbxbBm................................mj....lbD.tM..FbxbBm................................mj....lbD.tM..FbxbBm......................",
76
"........ezfH....rB..ABy..RKlfl.........qs.Pl................ezfH....rB..ABy..RKlfl.........qs.Pl................ezfH....rB..ABy..RKlfl.........qs.Pl................ezfH....rB..ABy..RKlfl.........qs.Pl................ezfH....rB..ABy..RKlfl.........qs.Pl........",
77
"........Mbbrmxm.#bj.mpvEyvw.#m..........m.la................Mbbrmxm.#bj.mpvEyvw.#m..........m.la................Mbbrmxm.#bj.mpvEyvw.#m..........m.la................Mbbrmxm.#bj.mpvEyvw.#m..........m.la................Mbbrmxm.#bj.mpvEyvw.#m..........m.la........",
78
"....jQy.Qbbi.BQ..as..htfbci...............mOx...........jQy.Qbbi.BQ..as..htfbci...............mOx...........jQy.Qbbi.BQ..as..htfbci...............mOx...........jQy.Qbbi.BQ..as..htfbci...............mOx...........jQy.Qbbi.BQ..as..htfbci...............mOx.......",
79
"...LBbs.Rbfg.dbx.xfF.ssiEm.................AGMa#.......LBbs.Rbfg.dbx.xfF.ssiEm.................AGMa#.......LBbs.Rbfg.dbx.xfF.ssiEm.................AGMa#.......LBbs.Rbfg.dbx.xfF.ssiEm.................AGMa#.......LBbs.Rbfg.dbx.xfF.ssiEm.................AGMa#....",
80
"...hIbIjGbO..mvOmhNIwBh.............#......gfIE........hIbIjGbO..mvOmhNIwBh.............#......gfIE........hIbIjGbO..mvOmhNIwBh.............#......gfIE........hIbIjGbO..mvOmhNIwBh.............#......gfIE........hIbIjGbO..mvOmhNIwBh.............#......gfIE.....",
81
"....kbbKfbcum.LftABDnh..............Bq......wIh.........kbbKfbcum.LftABDnh..............Bq......wIh.........kbbKfbcum.LftABDnh..............Bq......wIh.........kbbKfbcum.LftABDnh..............Bq......wIh.........kbbKfbcum.LftABDnh..............Bq......wIh.....",
82
".DkAkGbbbbbbBkjeGbC.................Qam.....gRw......DkAkGbbbbbbBkjeGbC.................Qam.....gRw......DkAkGbbbbbbBkjeGbC.................Qam.....gRw......DkAkGbbbbbbBkjeGbC.................Qam.....gRw......DkAkGbbbbbbBkjeGbC.................Qam.....gRw.....",
83
".PbbQxbbfzJbbbfomy..................DbH..zx..iIu.....PbbQxbbfzJbbbfomy..................DbH..zx..iIu.....PbbQxbbfzJbbbfomy..................DbH..zx..iIu.....PbbQxbbfzJbbbfomy..................DbH..zx..iIu.....PbbQxbbfzJbbbfomy..................DbH..zx..iIu....",
84
".kIbl.zbbkFofbbn.....................vIj.MbE..AIi....kIbl.zbbkFofbbn.....................vIj.MbE..AIi....kIbl.zbbkFofbbn.....................vIj.MbE..AIi....kIbl.zbbkFofbbn.....................vIj.MbE..AIi....kIbl.zbbkFofbbn.....................vIj.MbE..AIi...",
85
"..#BF.LbbI#.FCCy....................hBbK.yBz..Epcy....#BF.LbbI#.FCCy....................hBbK.yBz..Epcy....#BF.LbbI#.FCCy....................hBbK.yBz..Epcy....#BF.LbbI#.FCCy....................hBbK.yBz..Epcy....#BF.LbbI#.FCCy....................hBbK.yBz..Epcy..",
86
"..mOA..obbo.KIOH....................QRRbL.ubxgBLfF....mOA..obbo.KIOH....................QRRbL.ubxgBLfF....mOA..obbo.KIOH....................QRRbL.ubxgBLfF....mOA..obbo.KIOH....................QRRbL.ubxgBLfF....mOA..obbo.KIOH....................QRRbL.ubxgBLfF..",
87
".gQbp..#IbojcfbD...............mlD..OAiBz..Kbvfyy....gQbp..#IbojcfbD...............mlD..OAiBz..Kbvfyy....gQbp..#IbojcfbD...............mlD..OAiBz..Kbvfyy....gQbp..#IbojcfbD...............mlD..OAiBz..Kbvfyy....gQbp..#IbojcfbD...............mlD..OAiBz..Kbvfyy...",
88
".LbbbKm.dr#ak.ym...............pcbF.OA.ubQygxKD......LbbbKm.dr#ak.ym...............pcbF.OA.ubQygxKD......LbbbKm.dr#ak.ym...............pcbF.OA.ubQygxKD......LbbbKm.dr#ak.ym...............pcbF.OA.ubQygxKD......LbbbKm.dr#ak.ym...............pcbF.OA.ubQygxKD.....",
89
"..nkrpGMnPIbD.................#bFRA.Sw.#bfbIe.........nkrpGMnPIbD.................#bFRA.Sw.#bfbIe.........nkrpGMnPIbD.................#bFRA.Sw.#bfbIe.........nkrpGMnPIbD.................#bFRA.Sw.#bfbIe.........nkrpGMnPIbD.................#bFRA.Sw.#bfbIe.......",
90
".....dbbCkfbS..............kpqib.wH.EfdLbeh#.............dbbCkfbS..............kpqib.wH.EfdLbeh#.............dbbCkfbS..............kpqib.wH.EfdLbeh#.............dbbCkfbS..............kpqib.wH.EfdLbeh#.............dbbCkfbS..............kpqib.wH.EfdLbeh#........",
91
".....Mbv..xBx...........xqEIdIlfLBD..kJfp................Mbv..xBx...........xqEIdIlfLBD..kJfp................Mbv..xBx...........xqEIdIlfLBD..kJfp................Mbv..xBx...........xqEIdIlfLBD..kJfp................Mbv..xBx...........xqEIdIlfLBD..kJfp...........",
92
".....gDE...ur...........EOnw.uBofGm.yakqm................gDE...ur...........EOnw.uBofGm.yakqm................gDE...ur...........EOnw.uBofGm.yakqm................gDE...ur...........EOnw.uBofGm.yakqm................gDE...ur...........EOnw.uBofGm.yakqm...........",
93
"...........hj...........mIcw..NsRcAABtm........................hj...........mIcw..NsRcAABtm........................hj...........mIcw..NsRcAABtm........................hj...........mIcw..NsRcAABtm........................hj...........mIcw..NsRcAABtm.............",
94
".....................dtngCbB..rByMfvx....................................dtngCbB..rByMfvx....................................dtngCbB..rByMfvx....................................dtngCbB..rByMfvx....................................dtngCbB..rByMfvx...............",
95
".................m..uINROFBbL.gIl....................................m..uINROFBbL.gIl....................................m..uINROFBbL.gIl....................................m..uINROFBbL.gIl....................................m..uINROFBbL.gIl...................",
96
"................FId.ws.mPOkbK..AL...................................FId.ws.mPOkbK..AL...................................FId.ws.mPOkbK..AL...................................FId.ws.mPOkbK..AL...................................FId.ws.mPOkbK..AL...................",
97
".........gDL....lI#.oS..jIdcIj.........gj.Fg.................gDL....lI#.oS..jIdcIj.........gj.Fg.................gDL....lI#.oS..jIdcIj.........gj.Fg.................gDL....lI#.oS..jIdcIj.........gj.Fg.................gDL....lI#.oS..jIdcIj.........gj.Fg........",
98
"........dfbd....Dc..qfL..pPivr.........rH.ok................dfbd....Dc..qfL..pPivr.........rH.ok................dfbd....Dc..qfL..pPivr.........rH.ok................dfbd....Dc..qfL..pPivr.........rH.ok................dfbd....Dc..qfL..pPivr.........rH.ok........",
99
".....m..Cbbemoj.ybi..sInlGP...............Dcg............m..Cbbemoj.ybi..sInlGP...............Dcg............m..Cbbemoj.ybi..sInlGP...............Dcg............m..Cbbemoj.ybi..sInlGP...............Dcg............m..Cbbemoj.ybi..sInlGP...............Dcg.......",
100
"....eGh.Qbb#.vvg.zP..LoOfwy................Rs.j.........eGh.Qbb#.vvg.zP..LoOfwy................Rs.j.........eGh.Qbb#.vvg.zP..LoOfwy................Rs.j.........eGh.Qbb#.vvg.zP..LoOfwy................Rs.j.........eGh.Qbb#.vvg.zP..LoOfwy................Rs.j.....",
101
"...rbbP.RbI..ebk.Ebx.QH....................qfNB#.......rbbP.RbI..ebk.Ebx.QH....................qfNB#.......rbbP.RbI..ebk.Ebx.QH....................qfNB#.......rbbP.RbI..ebk.Ebx.QH....................qfNB#.......rbbP.RbI..ebk.Ebx.QH....................qfNB#....",
102
"...gGbbFBbv...tcjiRIcRg.............lm.....mIBy........gGbbFBbv...tcjiRIcRg.............lm.....mIBy........gGbbFBbv...tcjiRIcRg.............lm.....mIBy........gGbbFBbv...tcjiRIcRg.............lm.....mIBy........gGbbFBbv...tcjiRIcRg.............lm.....mIBy.....",
103
"....ubbpbbbPL.jGGPByLm..............GH......kbD.........ubbpbbbPL.jGGPByLm..............GH......kbD.........ubbpbbbPL.jGGPByLm..............GH......kbD.........ubbpbbbPL.jGGPByLm..............GH......kbD.........ubbpbbbPL.jGGPByLm..............GH......kbD.....",
104
".uzQQRbbbbbbbzq#PNx.................Ccj..#...oag.....uzQQRbbbbbbbzq#PNx.................Ccj..#...oag.....uzQQRbbbbbbbzq#PNx.................Ccj..#...oag.....uzQQRbbbbbbbzq#PNx.................Ccj..#...oag.....uzQQRbbbbbbbzq#PNx.................Ccj..#...oag....",
105
".wbbSEJbfCBbbbbvm...................ibS..vK..yGC.....wbbSEJbfCBbbbbvm...................ibS..vK..yGC.....wbbSEJbfCBbbbbvm...................ibS..vK..yGC.....wbbSEJbfCBbbbbvm...................ibS..vK..yGC.....wbbSEJbfCBbbbbvm...................ibS..vK..yGC....",
106
".rNbD.obbSmuabbe.....................pbF.dbx..ebl....rNbD.obbSmuabbe.....................pbF.dbx..ebl....rNbD.obbSmuabbe.....................pbF.dbx..ebl....rNbD.obbSmuabbe.....................pbF.dbx..ebl....rNbD.obbSmuabbe.....................pbF.dbx..ebl...",
107
"...OD.#IbbL.LnnL....................ebbp.mvOmmdKb#.....OD.#IbbL.LnnL....................ebbp.mvOmmdKb#.....OD.#IbbL.LnnL....................ebbp.mvOmmdKb#.....OD.#IbbL.LnnL....................ebbp.mvOmmdKb#.....OD.#IbbL.LnnL....................ebbp.mvOmmdKb#..",
108
"..jBk..nbbz.Qbbd....................pPobq.EbK#fhRh....jBk..nbbz.Qbbd....................pPobq.EbK#fhRh....jBk..nbbz.Qbbd....................pPobq.EbK#fhRh....jBk..nbbz.Qbbd....................pPobq.EbK#fhRh....jBk..nbbz.Qbbd....................pPobq.EbK#fhRh..",
109
".#abay.gOIxEBpvF...............hSn..GdyROy.xIbGg.....#abay.gOIxEBpvF...............hSn..GdyROy.xIbGg.....#abay.gOIxEBpvF...............hSn..GdyROy.xIbGg.....#abay.gOIxEBpvF...............hSn..GdyROy.xIbGg.....#abay.gOIxEBpvF...............hSn..GdyROy.xIbGg....",
110
".#IbbRF.EhqIq.................mOzfe.Nk.rbOqeDqy......#IbbRF.EhqIq.................mOzfe.Nk.rbOqeDqy......#IbbRF.EhqIq.................mOzfe.Nk.rbOqeDqy......#IbbRF.EhqIq.................mOzfe.Nk.rbOqeDqy......#IbbRF.EhqIq.................mOzfe.Nk.rbOqeDqy.....",
111
"..eEgKbNpGbbl...............m.hbjpH.MvmjbOOaF.........eEgKbNpGbbl...............m.hbjpH.MvmjbOOaF.........eEgKbNpGbbl...............m.hbjpH.MvmjbOOaF.........eEgKbNpGbbl...............m.hbjpH.MvmjbOOaF.........eEgKbNpGbbl...............m.hbjpH.MvmjbOOaF.......",
112
".....HbbqDBbt...........m.mpfMhbmpA.#cPdbi...............HbbqDBbt...........m.mpfMhbmpA.#cPdbi...............HbbqDBbt...........m.mpfMhbmpA.#cPdbi...............HbbqDBbt...........m.mpfMhbmpA.#cPdbi...............HbbqDBbt...........m.mpfMhbmpA.#cPdbi..........",
113
".....Hfw..Lti...........dkqGiOsIAfF..AfbM................Hfw..Lti...........dkqGiOsIAfF..AfbM................Hfw..Lti...........dkqGiOsIAfF..AfbM................Hfw..Lti...........dkqGiOsIAfF..AfbM................Hfw..Lti...........dkqGiOsIAfF..AfbM...........",
114
"......gj...nx...........hIKQ.Efkbv..Ecey..................gj...nx...........hIKQ.Efkbv..Ecey..................gj...nx...........hIKQ.Efkbv..Ecey..................gj...nx...........hIKQ.Efkbv..Ecey..................gj...nx...........hIKQ.Efkbv..Ecey............",
115
"...........m............mBbz..QoCbQQfH.........................m............mBbz..QoCbQQfH.........................m............mBbz..QoCbQQfH.........................m............mBbz..QoCbQQfH.........................m............mBbz..QoCbQQfH..............",
116
"....................mPIwFdbIm.EfjrpKh...................................mPIwFdbIm.EfjrpKh...................................mPIwFdbIm.EfjrpKh...................................mPIwFdbIm.EfjrpKh...................................mPIwFdbIm.EfjrpKh...............",
117
".................Eg.saCMfqvbr.mBd....................................Eg.saCMfqvbr.mBd....................................Eg.saCMfqvbr.mBd....................................Eg.saCMfqvbr.mBd....................................Eg.saCMfqvbr.mBd...................",
118
"................ebH.pn..ncdbw..Dy...................................ebH.pn..ncdbw..Dy...................................ebH.pn..ncdbw..Dy...................................ebH.pn..ncdbw..Dy...................................ebH.pn..ncdbw..Dy...................",
119
"........gekq....lcm.Kw..mGHNbL.........hD.l#................gekq....lcm.Kw..mGHNbL.........hD.l#................gekq....lcm.Kw..mGHNbL.........hD.l#................gekq....lcm.Kw..mGHNbL.........hD.l#................gekq....lcm.Kw..mGHNbL.........hD.l#........",
120
"........nbbx....Lfm.Ffd..ptmKL.........Lr.Co................nbbx....Lfm.Ffd..ptmKL.........Lr.Co................nbbx....Lfm.Ffd..ptmKL.........Lr.Co................nbbx....Lfm.Ffd..ptmKL.........Lr.Co................nbbx....Lfm.Ffd..ptmKL.........Lr.Co........",
121
".....F..SbbEmOD.gfe..rIpKfk...............hf#............F..SbbEmOD.gfe..rIpKfk...............hf#............F..SbbEmOD.gfe..rIpKfk...............hf#............F..SbbEmOD.gfe..rIpKfk...............hf#............F..SbbEmOD.gfe..rIpKfk...............hf#.......",
122
"...msbD.wbbj.tc#.PR..qoowHm................PPylg.......msbD.wbbj.tc#.PR..qoowHm................PPylg.......msbD.wbbj.tc#.PR..qoowHm................PPylg.......msbD.wbbj.tc#.PR..qoowHm................PPylg.......msbD.wbbj.tc#.PR..qoowHm................PPylg....",
123
"...rbbR.vbc..hfo.hcSLNl....................Lbfwj.......rbbR.vbc..hfo.hcSLNl....................Lbfwj.......rbbR.vbc..hfo.hcSLNl....................Lbfwj.......rbbR.vbc..hfo.hcSLNl....................Lbfwj.......rbbR.vbc..hfo.hcSLNl....................Lbfwj....",
124
"....Nbbqcbvm..MbELNzIM..............Kj......BBm.........Nbbqcbvm..MbELNzIM..............Kj......BBm.........Nbbqcbvm..MbELNzIM..............Kj......BBm.........Nbbqcbvm..MbELNzIM..............Kj......BBm.........Nbbqcbvm..MbELNzIM..............Kj......BBm.....",
125
".g..qJbObbbOAymwbaO.................vS......rfd......g..qJbObbbOAymwbaO.................vS......rfd......g..qJbObbbOAymwbaO.................vS......rfd......g..qJbObbbOAymwbaO.................vS......rfd......g..qJbObbbOAymwbaO.................vS......rfd.....",
126
".sbcpobbJbbbbICidCi.................HbF..ly..nI#.....sbcpobbJbbbbICidCi.................HbF..ly..nI#.....sbcpobbJbbbbICidCi.................HbF..ly..nI#.....sbcpobbJbbbbICidCi.................HbF..ly..nI#.....sbcpobbJbbbbICidCi.................HbF..ly..nI#....",
127
".zbbkjIbbdQbbbbvm...................jfp..zRg.mzp.....zbbkjIbbdQbbbbvm...................jfp..zRg.mzp.....zbbkjIbbdQbbbbvm...................jfp..zRg.mzp.....zbbkjIbbdQbbbbvm...................jfp..zRg.mzp.....zbbkjIbbdQbbbbvm...................jfp..zRg.mzp....",
128
".jCfL.kbbz.hSfGh....................mzbq.Dbs..hIK....jCfL.kbbz.hSfGh....................mzbq.Dbs..hIK....jCfL.kbbz.hSfGh....................mzbq.Dbs..hIK....jCfL.kbbz.hSfGh....................mzbq.Dbs..hIK....jCfL.kbbz.hSfGh....................mzbq.Dbs..hIK...",
129
"...vq.gGbbq.qMCl....................dffOm.tIjmoAbi.....vq.gGbbq.qMCl....................dffOm.tIjmoAbi.....vq.gGbbq.qMCl....................dffOm.tIjmoAbi.....vq.gGbbq.qMCl....................dffOm.tIjmoAbi.....vq.gGbbq.qMCl....................dffOm.tIjmoAbi..",
130
"..EIM..lbbv.Rbbl....................NMHbn.#cRxb#Mj....EIM..lbbv.Rbbl....................NMHbn.#cRxb#Mj....EIM..lbbv.Rbbl....................NMHbn.#cRxb#Mj....EIM..lbbv.Rbbl....................NMHbn.#cRxb#Mj....EIM..lbbv.Rbbl....................NMHbn.#cRxb#Mj..",
131
".iIbIL..zNiAvnKj...............qapm.GumoIL.Fvbwm.....iIbIL..zNiAvnKj...............qapm.GumoIL.Fvbwm.....iIbIL..zNiAvnKj...............qapm.GumoIL.Fvbwm.....iIbIL..zNiAvnKj...............qapm.GumoIL.Fvbwm.....iIbIL..zNiAvnKj...............qapm.GumoIL.Fvbwm....",
132
".gGIRBdgjiCbE.................gICBx.zM.EbfKsDy.......gGIRBdgjiCbE.................gICBx.zM.EbfKsDy.......gGIRBdgjiCbE.................gICBx.zM.EbfKsDy.......gGIRBdgjiCbE.................gICBx.zM.EbfKsDy.......gGIRBdgjiCbE.................gICBx.zM.EbfKsDy......",
133
"..jm.HbbIIbbA..............jEmibgwn.HBjjbwoKy.........jm.HbbIIbbA..............jEmibgwn.HBjjbwoKy.........jm.HbbIIbbA..............jEmibgwn.HBjjbwoKy.........jm.HbbIIbbA..............jEmibgwn.HBjjbwoKy.........jm.HbbIIbbA..............jEmibgwn.HBjjbwoKy.......",
134
".....kbIygRbt...........hyyBGRFbgRu.gvvoIy...............kbIygRbt...........hyyBGRFbgRu.gvvoIy...............kbIygRbt...........hyyBGRFbgRu.gvvoIy...............kbIygRbt...........hyyBGRFbgRu.gvvoIy...............kbIygRbt...........hyyBGRFbgRu.gvvoIy..........",
135
".....qzK..ykj...........uouvmptOPf#..kvvl................qzK..ykj...........uouvmptOPf#..kvvl................qzK..ykj...........uouvmptOPf#..kvvl................qzK..ykj...........uouvmptOPf#..kvvl................qzK..ykj...........uouvmptOPf#..kvvl...........",
136
"...........Aq...........ybtQ.#fHfvmmnIi........................Aq...........ybtQ.#fHfvmmnIi........................Aq...........ybtQ.#fHfvmmnIi........................Aq...........ybtQ.#fHfvmmnIi........................Aq...........ybtQ.#fHfvmmnIi.............",
137
".....................yLmmvbN..MplIBBaE...................................yLmmvbN..MplIBBaE...................................yLmmvbN..MplIBBaE...................................yLmmvbN..MplIBBaE...................................yLmmvbN..MplIBBaE.............."};
(-)tdegraphics/kiconedit/pics/toolbar/CMakeLists.txt (-20 lines)
Lines 1-20 Link Here
1
#################################################
2
#
3
#  (C) 2010-2011 Calvin Morrison
4
#  mutantturkey@gmail.com
5
#
6
#  Improvements and feedback are welcome
7
#
8
#  This file is released under GPL >= 2
9
#
10
#################################################
11
12
install( FILES
13
    fileclose.png circle.png filledcircle.png line.png
14
    paintbrush-cursor.xpm airbrush-cursor.xpm ellipse.png
15
    filledellipse.png rectangle.png filledrectangle.png areaselect.png
16
    selectrect.png selectcircle.png fill-cursor.xpm grid.png pointer.png
17
    aim.png aim-cursor.xpm window_new.png grayscale.png kdepalette.png
18
    transform.png eraser-cursor.xpm colorpicker-cursor.xpm
19
  DESTINATION ${DATA_INSTALL_DIR}/kiconedit/pics
20
)
(-)tdegraphics/kiconedit/pics/toolbar/Makefile.am (-28 lines)
Lines 1-28 Link Here
1
toolbar_DATA =	fileclose.png \
2
	circle.png \
3
	filledcircle.png \
4
	line.png \
5
	paintbrush-cursor.xpm \
6
	airbrush-cursor.xpm \
7
	ellipse.png \
8
	filledellipse.png \
9
	rectangle.png \
10
	filledrectangle.png \
11
	areaselect.png \
12
	selectrect.png \
13
	selectcircle.png \
14
	fill-cursor.xpm \
15
	grid.png \
16
	pointer.png \
17
	aim.png \
18
    aim-cursor.xpm \
19
	window_new.png \
20
	grayscale.png \
21
	kdepalette.png \
22
	transform.png \
23
    eraser-cursor.xpm \
24
	colorpicker-cursor.xpm
25
26
27
28
toolbardir = $(kde_datadir)/kiconedit/pics
(-)tdegraphics/kiconedit/pics/toolbar/aim-cursor.xpm (-28 lines)
Lines 1-28 Link Here
1
/* XPM */
2
static char *aim[]={
3
"22 22 3 1",
4
". c None",
5
"a c #000000",
6
"# c #ffffff",
7
"......................",
8
"..........#...........",
9
".........#a#..........",
10
".........#a#..........",
11
".........#a#..........",
12
".........#a#..........",
13
".........#a#..........",
14
".........#a#..........",
15
".........#a#..........",
16
"..#######...#######...",
17
".#aaaaaaa...aaaaaaa#..",
18
"..#######...#######...",
19
"..........a...........",
20
".........#a#..........",
21
".........#a#..........",
22
".........#a#..........",
23
".........#a#..........",
24
".........#a#..........",
25
".........#a#..........",
26
"..........#...........",
27
"......................",
28
"......................"};
(-)tdegraphics/kiconedit/pics/toolbar/aim.png (-3 lines)
Lines 1-3 Link Here
1
‰PNG
2
3
IHDRÄ´l;bKGD½½½iBÕ¨_IDATxÚc`¶àÀÿÚ
¤–ÐÌÅ$ÌD+W0’áZbõøO¢8ÀÖN¡±ÿŸÍÿþÃR©éœlӊT182Ñ744ÐÊ
4C¯<4M#&ÄuCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature7739b802f8b8b6e63dca2996176cc6c4Œ>ÈIEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/airbrush-cursor.xpm (-35 lines)
Lines 1-35 Link Here
1
/* XPM */
2
static char *airbrush[]={
3
"22 22 10 1",
4
". c None",
5
"a c #000000",
6
"d c #2a2a2a",
7
"g c #303030",
8
"c c #444444",
9
"h c #555555",
10
"f c #808080",
11
"b c #aaaaaa",
12
"e c #c8c8c8",
13
"# c #ffffff",
14
"..................#aa#",
15
".................#abca",
16
"................#abcca",
17
"...####........#abccda",
18
"..#aaaa#......#abccda#",
19
".#a####a#....#abccda#.",
20
".#a#eeba#...#abccda#..",
21
".#a#eeba#..#abccda#...",
22
".#a#eeba#.#abccda#....",
23
".#a#eeba##abccda#.....",
24
".#a#ebba#abccda#......",
25
".#a#bbbfaeccda#.......",
26
"..#a#bfgaebda#.#####..",
27
"..#a#bfaebffa##ddddd#.",
28
"...#afaebbfa##ddaaada#",
29
"..#a#eebbfadddda###da#",
30
".#a#eebbfa#aaaa#..#da#",
31
"#a#eebbfa#.####..#da#.",
32
"#aeebbfa#.......#da#..",
33
".#ebbfa#.......#da#...",
34
"dhfffa#.......#da#....",
35
"hd.aa#........#da#...."};
(-)tdegraphics/kiconedit/pics/toolbar/areaselect.png (-6 lines)
Lines 1-6 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ìVIDATxÚc` 0øoðFPˆŸO®õ¤‰Sj.¦yügøO„[…Õ1HÎøìF6£È
4
&˜É´
5
gì¦`˜úƒ7Ցï$bCI9î¤)ÃO6˜
6
áCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature9bb6753630c58aa0d1ccde38f8734c57þ=¥$IEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/circle.png (-4 lines)
Lines 1-4 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ìFIDATxÚc`€‹Ø¼²(
4
ÿãäá4¿nalâx,„É1‘*ÿ‰‘'ÉäA¢˜8/RtøÌ&!Âñ&%<©Ž¢ôL=4éù³ñhÅCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature61e1f4b809628c44e7faf33dcdd57122YÓ^LIEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/colorpicker-cursor.xpm (-36 lines)
Lines 1-36 Link Here
1
/* XPM */
2
static char *colorpicker[]={
3
"22 22 11 1",
4
". c None",
5
"# c #000000",
6
"f c #151515",
7
"e c #2a2a2a",
8
"c c #333333",
9
"d c #3a3a3a",
10
"i c #808080",
11
"g c #aaaaaa",
12
"b c #d5d5d5",
13
"h c #dcdcdc",
14
"a c #ffffff",
15
"..................##a.",
16
".................#bc#a",
17
"................#bdcc#",
18
"...............#bddce#",
19
"..............#bddcef#",
20
"............##bddcef#a",
21
"...........#bdddcef#a.",
22
"............#becef#a..",
23
"...........#agbee#a...",
24
"..........#ahgibf#a...",
25
".........#ahgi#.#a....",
26
"........#ahgi#........",
27
".......#ahgi#.........",
28
"......#ahgi#..........",
29
".....#ahgi#...........",
30
"....#ahgi#............",
31
"...#ahgi#.............",
32
"..#ahgi#..............",
33
".#ahgi#...............",
34
".#hgi#................",
35
"#ig##.................",
36
"#i#..................."};
(-)tdegraphics/kiconedit/pics/toolbar/ellipse.png (-3 lines)
Lines 1-3 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ì5IDATxÚc`ÀˆÂûO@IáâD±+Ä*‹O!Š&R<H;Å${ŸQ2#e00?J÷œµTCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature017bcd7cfbbcc49b20344a91ebcd0f22DÁIEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/eraser-cursor.xpm (-32 lines)
Lines 1-32 Link Here
1
/* XPM */
2
static char *eraser[]={
3
"22 22 7 1",
4
"b c #000080",
5
"e c #800000",
6
"a c #8080ff",
7
"d c #c00000",
8
"# c #c0c0ff",
9
"c c #ffc0c0",
10
". c #ffffff",
11
"......................",
12
"...............#aa....",
13
"..............#aaaa...",
14
".............#aaaaaa..",
15
"............#aaaaaaaa.",
16
"...........#aaaaaaaaa.",
17
"..........#aaaaaaaaab.",
18
".........#aaaaaaaaab..",
19
"........#aaaaaaaaab...",
20
".......c##aaaaaaab....",
21
"......cdd##aaaaab.....",
22
".....cdddd##aaab......",
23
"....cdddddd##ab.......",
24
"...cdddddddd#b........",
25
"..cddddddddde.........",
26
".cddddddddde..........",
27
".ccddddddde...........",
28
".cccddddde............",
29
"..cccddde.............",
30
"...cccde..............",
31
"....cce...............",
32
"......................"};
(-)tdegraphics/kiconedit/pics/toolbar/fileclose.png (-3 lines)
Lines 1-3 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ìqIDATxÚc`dF8ë?†`B0ïÀ4¡Bì&ÿg`„i`x¥PlB2ù.œõ„A†3”‘L„Ðp+¾ËÀÀ ƒdî܊à	TéBŠaæ:gò¨k1MfA0—@1VÏ¡…3v€'F‡ˆûÀ¤‘CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature342d125f0e7c4e11510dd910c10c507b¥Í»ŽIEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/fill-cursor.xpm (-36 lines)
Lines 1-36 Link Here
1
/* XPM */
2
static char *fill[]={
3
"22 22 11 1",
4
". c None",
5
"a c #000000",
6
"i c #222222",
7
"c c #2a2a2a",
8
"e c #333333",
9
"g c #3a3a3a",
10
"d c #404040",
11
"h c #555555",
12
"f c #aaaaaa",
13
"b c #d5d5d5",
14
"# c #ffffff",
15
"......................",
16
"............#.........",
17
"...........#a#........",
18
"..........#aba#.......",
19
".........#abcca#......",
20
"........#adceca#......",
21
".......#afdcecca#.....",
22
"......#abcedcecca#....",
23
".....#afcgeedeeca#....",
24
"...##fddcggeeeecca#...",
25
"..#fdccddcggeeeecca#..",
26
".#ddcdcdddcggeeeeca#..",
27
".#dccbdddddcggeeecca#.",
28
".#ddcddbbdddgggeeccba#",
29
".#ddhadddbddggggeebia#",
30
".#fda#adddbdddggebca#.",
31
".#fda##aaddbbddgbca#..",
32
".#fda#.##adddbdbca#...",
33
"..#da#...#aaddbca#....",
34
"..#fa#....##abca#.....",
35
"..#f#.......#aa#......",
36
"...#.........##......."};
(-)tdegraphics/kiconedit/pics/toolbar/filledcircle.png (-4 lines)
Lines 1-4 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ìKIDATxÚc`€‹Ø\²Œ8bQÁH@)ŠF‚J‘T1¡®Ž‰œÐøOŒJ’L$ŠitøÍfÄTLRÚÀ®gªC׀M–&d!LÓTCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturefb99c93ab91fc8bdbd37fb9335795624g
4
ôkIEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/filledellipse.png (-3 lines)
Lines 1-3 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ì:IDATxÚc`ÀˆÂû_žB5Œ¢¨c$J)T%)¤b’=È@@#‡F†Q€Gò»I¬CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignatureb84f3734aaa52671933e8ee605d20200툄œIEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/filledrectangle.png (-3 lines)
Lines 1-3 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ì"IDATxÚc`ÀÈÀÀÀÀðŸ8uL¤˜<ª˜>ŠG2óx‚v$õCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature68ebf235d2fbf113d48af269e80ac0e8U¡Ó/IEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/flood-cursor.xpm (-32 lines)
Lines 1-32 Link Here
1
/* XPM */
2
static char *flood[]={
3
"22 22 7 1",
4
"b c #000000",
5
"c c #303030",
6
"# c #808080",
7
"e c #a0a0a4",
8
"a c #c0c0c0",
9
"d c #dcdcdc",
10
". c #ffffff",
11
"......................",
12
"......................",
13
"...........##.........",
14
"..........####........",
15
".........##aa##.......",
16
".........##ba##.......",
17
".........##.b##.......",
18
".......cc##..b#.......",
19
".....cccd##d..b.......",
20
"....cccdd#b.d..b......",
21
"...ccceddbdb.d..b.....",
22
"..eccceeddbdd.d..b....",
23
"..ecccceeddddd.d..b...",
24
"..ecccebeeddddd.d.b...",
25
"..eccceebeeddddd.b....",
26
"..eccc.eebeeddd.b.....",
27
"..eecc..eebeeddb......",
28
"...eec...eebeeb.......",
29
"....e.....eebb........",
30
"...........ee.........",
31
"......................",
32
"......................"};
(-)tdegraphics/kiconedit/pics/toolbar/flood.png (-4 lines)
Lines 1-4 Link Here
1
‰PNG
2
3
IHDRÄ´l;bKGD½½½iBÕ¨èIDATxÚÝÒ±
ƒ0Ðï(›Øx Œ@‘n€Â%c¤ÈçY~Œè’sÊ|	!°yœ¾üuD„"BÏÞЃîžÝߺ'õL~êü‡«†n˜¤?ZÌ9’!@Dúá-8Ï3J)€Z+bŒ+ÞUÅmÄQkí®9g¶kš
4
U•ªJë$U•-¾N<Må°áñxT)%¨êZÇ·ÉÍSq¿ßx‹7áq¼b.oø6{Ü=ñR_NHpÁÃp	ßp=ÀãxíÂ-ô
nˆO)™¨Õ+­÷˚yvÎÿüÒ$¹üÙõ)‡CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturee19919f4d333b5d3520edb8e9ecb0c5b4 gðIEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/grayscale.png (-4 lines)
Lines 1-4 Link Here
1
‰PNG
2
3
IHDRÄ´l;bKGD½½½iBÕ¨ñIDATxÚ퓱
ƒ0E¿#ÆHá‚XéJŠ!êŒà’)PÄ'±962VpŒH‘‚ßœÏg?Ÿïlà’‘pÆ:˲èó<‹P|ff0˜±-«ZㄺÌwá7׉2Sԍ×9
4
ÆIÛ±Ÿýl¡D$˜¡CÐOe°Õe.?hZ©€‚í§R¯ui²F@‰%“X×u¨PUÈú¾GQ< åÝìaH™¢ižûà¶Ýžµ¾+÷Ub§ÓP¼Ñ(›¦Á¶ÛG R¦ñ~«ñÏ Að(àÿ<Gþ»¼ôzF—`¹š(CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturef95156cb189463f2cddf79b92d5dbd55¢¢êIEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/grid.png (-3 lines)
Lines 1-3 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ì IDATxÚc`æ€Jÿ'R’bü$Ó¨3F¢3†ÏŠö^²¬ýCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturef670d781c7e54539c281ea40a5faa83aÛéÚIEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/kdepalette.png (-7 lines)
Lines 1-7 Link Here
1
‰PNG
2
3
IHDRKÖûltRNSn¦‘bKGD½½½iBÕ¨¾IDATxÚ½”Ñ
Ã0D)#2J>úÑ1<Hwi‘¯>Q×&ªÊŠ,îÌ%"?ã3®èŸ{)…9êôE„Ï»«ƒæ<o¦gÞ¥P÷{
4
'JLq¥è­Zô­Iw) ·ì7²{£]ž"Í)
5
»`ö¾ð5ß,‡
6
­“käˆÑuӍ„€ê¹Ú¡å`®YR«¥ØM™[Æ)M¯$Bw1zÔë;ÊÂ)3Êø¯æ)9=)ÝÉÍý‡Ž(ú¿ÆÇßy-M.3CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturec32add3ce8cbc879554b3d9b333edb70o
7
ûIIEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/line.png (-3 lines)
Lines 1-3 Link Here
1
‰PNG
2
3
IHDRÄ´l;gAMA±üabKGDÿÿÿ ½§“	pHYsÒÝ~ütIMEÐ/2/‚—[IDATxœc`¶ÀÀÀà?5Ԑ¬‰,C	i$ÛP|š)2—ŠÍªŠnÕE6Œª†Â¤º¡0ƒIQÏDC‰4	[š¤š¤[šä2š”	4)ÁhVÞßê5VYŠIEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/paintbrush-cursor.xpm (-36 lines)
Lines 1-36 Link Here
1
/* XPM */
2
static char *paintbrush[]={
3
"22 22 11 1",
4
". c None",
5
"a c #000000",
6
"d c #272727",
7
"i c #2c2c2c",
8
"h c #303030",
9
"c c #3b3b3b",
10
"g c #aaaaaa",
11
"e c #c8c8c8",
12
"b c #d5d5d5",
13
"f c #ececec",
14
"# c #ffffff",
15
".................#abcc",
16
"................#abccc",
17
"...............#abcccd",
18
"..............#abcccdd",
19
".............#abcccdda",
20
"............#abcccdda#",
21
"...........#abcccdda#.",
22
"..........#abcccdda#..",
23
"..........abcccdda#...",
24
".........##cccdda#....",
25
".........#eecdda#.....",
26
"......##f#eegda#......",
27
".....#aabeggga#.......",
28
"....#abbchgaa#........",
29
"...#abcccda##.........",
30
"...abcccdda#..........",
31
"..#abccddia#..........",
32
".#abccdiaa#...........",
33
"#abdddaa##............",
34
"aaaaaa##..............",
35
"######................",
36
"......................"};
(-)tdegraphics/kiconedit/pics/toolbar/paintbrush.png (-3 lines)
Lines 1-3 Link Here
1
‰PNG
2
3
IHDRÄ´l;bKGD½½½iBÕ¨¦IDATxÚ픱
Â0DˆM’±Rx4%C\f9ªD‚üC”«íçç³õáLc,ɒ8çÑÛ×_ü
ؒèûžœÇÃÀoIi¸´‚C¶‡ïÙÖ‚Ã¶ÍÆŸlnQÛÅ(ÚF-‰¥†ˆmlÛt]W]S¨ãyž™¦ûa`Û^¡)
@¬ßR,i0ë°Ù8UPÛMн—}Ùü|õÒO(ÙšÕÿ7WãgÁ÷ºÇ©CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature426890f90f64395ee7c80e2549632116¾™"IEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/pointer.png (-3 lines)
Lines 1-3 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ì^IDATxÚÍÒÁÀ Phöÿ¿Ü̃=ÊÍúB$q_‘ätÿ1câ¨ÁÄÑ#Ï¡BÇ¡{hn°æ+>àΗÊ<|s¥3ܯ Ó¯ßvÀE3Ç}jý›
¬üÖzI¼#ÎÿCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature1b33aaff61d83f1bfdabf2d1ccd5cef4e†ÖIEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/rectangle.png (-3 lines)
Lines 1-3 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ì*IDATxÚc`ÀÈÀÀÀÀðŸHuD)†Ê3‘âŒQÅȀJŽ–Q€7ğ·¥KCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature8f88fb0716fc60cc5393776b6a088503}6 IEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/selectcircle.png (-3 lines)
Lines 1-3 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ìFIDATxÚc` ügø'	(ÄÏ'(ñŸx¥dø‚6æ¢F´¹L乛Šºþ“¢˜\»©hö‚x	©»"2‘9…š¬F=ÀDœCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturedf7a26941c2a465c8a6847baa1829b18R-ÉPIEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/selectrect.png (-4 lines)
Lines 1-4 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ì'IDATxÚc`à?Â$’bB†‘ï¢ä™hCÑøcp`£<éƒÁ
4
zCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature738f2b081df0d73debe9f3ac2dff60f1üžÀIEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/spraycan-cursor.xpm (-30 lines)
Lines 1-30 Link Here
1
/* XPM */
2
static char *spraycan[]={
3
"22 22 5 1",
4
"# c #000000",
5
"c c #808080",
6
"b c #a0a0a4",
7
"a c #c0c0c0",
8
". c #ffffff",
9
"......................",
10
"......................",
11
"......................",
12
"......................",
13
"........##............",
14
"#.#..#..#a####........",
15
".........#a.#.#.......",
16
"......#..#b#a..#......",
17
".#.......##aaa..#.....",
18
"....#....#cbaaa..#....",
19
".........b#cbaaa..#...",
20
"..#...#..bc#cbaaa..#..",
21
"..........bc#cbaaa..#.",
22
".....#.....bc#cbaaa..#",
23
"............bc#cbaaa#.",
24
".............bc#cba#..",
25
"..............bc#c#...",
26
"...............bc#....",
27
"................b.....",
28
"......................",
29
"......................",
30
"......................"};
(-)tdegraphics/kiconedit/pics/toolbar/spraycan.png (-4 lines)
Lines 1-4 Link Here
1
‰PNG
2
3
IHDRÄ´l;bKGD½½½iBÕ¨ÇIDATxÚíÓ±
à Й#Eö€Ñn
4
rÞÅ÷¸¶Áà@DEù’eQðîë,ÿ|CtºrK.i†ÅˆH:à£AÕÖ"¢ªªâû]ã«Ä„°‚ˆŽöØì:N	B¨G“•¬µ@„ÒÝ£1åHfFk<Ïó|Ù¼´ŠÓtï§^šñΧ¾œ™¹¿ÚkÞZCXâc0æ^Ýy
.~̼¹q+îœëÚÄ	gf Ì¬ÞO*"cþȂ–ðahŠG+O¶•CtåGŠCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature031f8f72f4de59a1e836f7fc7fcbaff4G©ÈIEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/transform.png (-5 lines)
Lines 1-5 Link Here
1
‰PNG
2
3
IHDRÄ´l;bKGD½½½iBÕ¨ÉIDATxÚ퓱
Ä E?эâ!R0J
4
FsÁ(»pMˆCtÒUyCd¾¿x¹pÍ9?È}&Ì»¤0G5Ž
5
~Vx¿CDàŽ•øº°÷ûý," ¢Qj;>·ì8¥óvÙ¾¯
˜cáppiMDÒiáPjŽsÌÞï ¢á¥‚ö¡ÛÈñ¯t£°\ÔÌ:R—Ù¦t‚ˆÔXoж1Öߔg3®EK¡k·Ý6½¹ º4ã'X™Â–£–°cŽyYéåï|kÑaÚ?CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature2bb07f9a20164549f4ee45cda20ec70eᐾ}IEND®B`‚
(-)tdegraphics/kiconedit/pics/toolbar/window_new.png (-9 lines)
Lines 1-9 Link Here
1
‰PNG
2
3
IHDRÄ´l;gAMA¯È7ŠétEXtSoftwareAdobe ImageReadyqÉe<±IDATxÚbüÿÿ?-@±XM{6Ÿ›ƒ9™‰áÏï¿~ýâ¿¿¡4ˆÿýýËo¸Ú¿¿ÿ1üû¤~fø÷ëӂÿg£ˆd¨»‘8ÃÏ_?00üø	Ä? ø;Ãw ýý;#±ýb gæ2üg‚¸’‘ñP`W™@,œl,?†ýúÁ¿Aø75ÿb c ‰ýŠQB’™•‘
Ì >Öÿ֒
 ƒþ@
ùƒ„#³C\ýû÷°P<,øôÂâuç?;ƒƒé‘óïß þ¥ÿƒ
ÿõó?þ#ƒˆ‰œT҂n(Œ
€bbø÷ŸdC‘
BfCøuÄôŸƒñ
4
bÿúDtP úΆDª8Ñ.FuÜP–…jXƒ €ˆr1ªF„Ë@†rd‹2p,Õ@ñAƒÑ
ý?G‰qž
5
$€	\ÈFC†#69`>@á
6
l†rds„-Ûbu0ÍÀ`¦yWiƒiü©rÿˆ—‹Q„…o & f=} *- càЛ	ä_²/åå1ÖtŒ;þcø{¬ùÇ¥‰`CŒÁ4ˆ·><l@1¡;Ÿ¡À8C
7
[ü €XþƒT4ô?ÔÐà
8
PP¼â³`šC/Ž2äùþÄòïï`)õ¢ù/$)ý†VȀØ|kô ‘séÃáÈÒ«ò[|”È –ëO¿1ÄN¿¬€5ÀŸ¿hœ
¤ÿÁåf3읚
9
ö(,Á®Ó;6Æÿq˜yurð÷)²@Êè?„F• ŠFŽ)`øgOu×üÜIEND®B`‚
(-)tdegraphics/kiconedit/properties.cpp (-147 lines)
Lines 1-147 Link Here
1
/*
2
    TDE Icon Editor - a small graphics drawing program for the TDE
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/
20
21
#include <tdeconfig.h>
22
#include <kdebug.h>
23
#include <tdeapplication.h>
24
25
#include "properties.h"
26
27
TDEIconEditProperties* TDEIconEditProperties::m_self = 0;
28
29
TDEIconEditProperties* TDEIconEditProperties::self()
30
{
31
    if (!m_self)
32
        m_self = new TDEIconEditProperties();
33
    return m_self;
34
}
35
36
TDEIconEditProperties::TDEIconEditProperties() : TQObject()
37
{
38
    TDEConfig *config = kapp->config();
39
40
    config->setGroup( "Appearance" );
41
42
    m_bgMode = (TQWidget::BackgroundMode)config->readNumEntry( "BackgroundMode", TQWidget::FixedPixmap);
43
    m_bgColor = config->readColorEntry( "BackgroundColor", &gray);
44
    m_bgPixmap = config->readPathEntry("BackgroundPixmap");
45
46
    config->setGroup( "Grid" );
47
    m_pasteTransparent = config->readBoolEntry( "PasteTransparent", false );
48
    m_showGrid = config->readBoolEntry( "ShowGrid", true );
49
    m_gridScale = config->readNumEntry( "GridScaling", 10 );
50
    m_showRulers = config->readBoolEntry( "ShowRulers", true );
51
52
    if(config->readEntry( "TransparencyDisplayType", "Checkerboard" ) == "Checkerboard")
53
    {
54
      m_transparencyDisplayType = TDEIconEditGrid::TRD_CHECKERBOARD;
55
    }
56
    else
57
    {
58
      m_transparencyDisplayType = TDEIconEditGrid::TRD_SOLIDCOLOR;
59
    }
60
61
    TQColor checkColor1(255, 255, 255);
62
    TQColor checkColor2(127, 127, 127);
63
64
    m_checkerboardColor1 = config->readColorEntry( "CheckerboardColor1", &checkColor1);
65
    m_checkerboardColor2 = config->readColorEntry( "CheckerboardColor2", &checkColor2);
66
67
    TQString checkerboardSize = config->readEntry( "CheckerboardSize", "Medium" );
68
69
    if(checkerboardSize == "Small")
70
    {
71
      m_checkerboardSize = TDEIconEditGrid::CHK_SMALL;
72
    }
73
    else
74
    if(checkerboardSize == "Medium")
75
    {
76
      m_checkerboardSize = TDEIconEditGrid::CHK_MEDIUM;
77
    }
78
    else
79
    {
80
      m_checkerboardSize = TDEIconEditGrid::CHK_LARGE;
81
    }
82
83
    TQColor solidColor(255, 255, 255);
84
    m_transparencySolidColor = config->readColorEntry( "TransparencySolidColor", &solidColor);
85
}
86
87
TDEIconEditProperties::~TDEIconEditProperties()
88
{
89
  kdDebug(4640) << "TDEIconEditProperties: Deleting properties" << endl;
90
  m_self = 0;
91
}
92
93
void TDEIconEditProperties::save()
94
{
95
    TDEConfig *config = kapp->config();
96
97
    config->setGroup( "Appearance" );
98
99
    config->writeEntry("BackgroundMode", m_bgMode );
100
    config->writeEntry("BackgroundColor", m_bgColor );
101
    config->writePathEntry("BackgroundPixmap", m_bgPixmap );
102
103
    config->setGroup( "Grid" );
104
    config->writeEntry("PasteTransparent", m_pasteTransparent );
105
    config->writeEntry("ShowGrid", m_showGrid );
106
    config->writeEntry("GridScaling", m_gridScale );
107
    config->writeEntry("ShowRulers", m_showRulers );
108
109
    TQString transparencyDisplayType;
110
111
    switch(m_transparencyDisplayType)
112
    {
113
      case TDEIconEditGrid::TRD_SOLIDCOLOR:
114
        transparencyDisplayType = "SolidColor";
115
        break;
116
      case TDEIconEditGrid::TRD_CHECKERBOARD:
117
      default:
118
        transparencyDisplayType = "Checkerboard";
119
        break;
120
    }
121
122
    config->writeEntry( "TransparencyDisplayType", transparencyDisplayType );
123
    config->writeEntry( "CheckerboardColor1", m_checkerboardColor1 );
124
    config->writeEntry( "CheckerboardColor2", m_checkerboardColor2 );
125
126
    TQString checkerboardSize;
127
128
    switch(m_checkerboardSize)
129
    {
130
      case TDEIconEditGrid::CHK_SMALL:
131
        checkerboardSize = "Small";
132
        break;
133
      case TDEIconEditGrid::CHK_MEDIUM:
134
        checkerboardSize = "Medium";
135
        break;
136
      case TDEIconEditGrid::CHK_LARGE:
137
      default:
138
        checkerboardSize = "Large";
139
        break;
140
    }
141
142
    config->writeEntry( "CheckerboardSize", checkerboardSize );
143
    config->writeEntry( "TransparencySolidColor", m_transparencySolidColor );
144
145
    config->sync();
146
}
147
(-)tdegraphics/kiconedit/properties.h (-82 lines)
Lines 1-82 Link Here
1
/*
2
    kiconedit - a small graphics drawing program the KDE.
3
4
    Copyright (C) 1998 Thomas Tanghus (tanghus@kde.org)
5
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public
8
    License as published by the Free Software Foundation; either
9
    version 2 of the License, or (at your option) any later version.
10
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
    General Public License for more details.
15
16
    You should have received a copy of the GNU Library General Public License
17
    along with this library; see the file COPYING.LIB.  If not, write to
18
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
    Boston, MA 02110-1301, USA.
20
*/
21
22
#ifndef __PROPS_H__
23
#define __PROPS_H__
24
25
#include <tqwidget.h>
26
27
#include "kicongrid.h"
28
29
class TDEIconEditProperties : public TQObject
30
{
31
public:
32
  static TDEIconEditProperties* self();
33
  ~TDEIconEditProperties();
34
35
  TQString bgPixmap() { return m_bgPixmap; }
36
  TQColor bgColor() { return m_bgColor; }
37
  TQWidget::BackgroundMode bgMode() { return m_bgMode; }
38
  bool showGrid() { return m_showGrid; }
39
  bool pasteTransparent() { return m_pasteTransparent; }
40
  bool showRulers() { return m_showRulers; }
41
  int gridScale() { return m_gridScale; }
42
  
43
  TDEIconEditGrid::TransparencyDisplayType transparencyDisplayType() const { return m_transparencyDisplayType; }
44
  TQColor checkerboardColor1() const { return m_checkerboardColor1; }
45
  TQColor checkerboardColor2() const { return m_checkerboardColor2; }
46
  TDEIconEditGrid::CheckerboardSize checkerboardSize() const { return m_checkerboardSize; }
47
  TQColor transparencySolidColor() const { return m_transparencySolidColor; }
48
49
  void setBgPixmap( const TQString &p ) { m_bgPixmap = p; }
50
  void setBgColor( const TQColor &c ) { m_bgColor = c; }
51
  void setBgMode( TQWidget::BackgroundMode m ) { m_bgMode = m; }
52
  void setShowGrid( bool b ) { m_showGrid = b; }
53
  void setPasteTransparent( bool b ) { m_pasteTransparent = b; }
54
  void setShowRulers( bool b ) { m_showRulers = b; }
55
  void setGridScale( int s ) { m_gridScale = s; }
56
  void setTransparencyDisplayType(TDEIconEditGrid::TransparencyDisplayType t) { m_transparencyDisplayType = t; }
57
  void setCheckerboardColor1(const TQColor& c) { m_checkerboardColor1 = c; }
58
  void setCheckerboardColor2(const TQColor& c) { m_checkerboardColor2 = c; }
59
  void setCheckerboardSize(TDEIconEditGrid::CheckerboardSize size) { m_checkerboardSize = size; }
60
  void setTransparencySolidColor(const TQColor& c) { m_transparencySolidColor = c; }
61
62
  void save();
63
64
protected:
65
  TDEIconEditProperties();
66
  TQString m_bgPixmap;
67
  TQColor m_bgColor;
68
  TQWidget::BackgroundMode m_bgMode;
69
  bool m_showGrid;
70
  bool m_pasteTransparent;
71
  bool m_showRulers;
72
  int m_gridScale;
73
  TDEIconEditGrid::TransparencyDisplayType m_transparencyDisplayType;
74
  TQColor m_checkerboardColor1;
75
  TQColor m_checkerboardColor2;
76
  TDEIconEditGrid::CheckerboardSize m_checkerboardSize;
77
  TQColor m_transparencySolidColor;
78
79
  static TDEIconEditProperties* m_self;
80
};
81
82
#endif //__PROPS_H__
(-)tdegraphics/kiconedit/utils.cpp (-134 lines)
Lines 1-134 Link Here
1
/*
2
    TDE Icon Editor - a small graphics drawing program for the TDE
3
4
    Copyright (C) 1998 Thomas Tanghus (tanghus@kde.org)
5
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public
8
    License as published by the Free Software Foundation; either
9
    version 2 of the License, or (at your option) any later version.
10
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
    General Public License for more details.
15
16
    You should have received a copy of the GNU Library General Public License
17
    along with this library; see the file COPYING.LIB.  If not, write to
18
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
    Boston, MA 02110-1301, USA.
20
*/
21
22
#include <kimageio.h>
23
#include <tdelocale.h>
24
#include <kdebug.h>
25
26
#include "utils.h"
27
#include "config.h"
28
29
imageFormats *formats = 0L;
30
31
void setupImageHandlers()
32
{
33
  if(formats != 0L)
34
    return;
35
36
  KImageIO::registerFormats();
37
38
  kdDebug(4640) << "Initializing formats" << endl;
39
  formats = new imageFormats;
40
  TQ_CHECK_PTR(formats);
41
  formats->setAutoDelete(true);
42
  formats->append(new imageFormat("GIF", "GIF",  "gif"));
43
#ifdef HAVE_LIBJPEG
44
  formats->append(new imageFormat("JFIF", "JPEG", "jpg"));
45
#endif
46
  formats->append(new imageFormat("XPM", "XPM",  "xpm"));
47
  formats->append(new imageFormat("ICO", "Windows Icon File",  "ico"));
48
/*
49
#ifdef HAVE_LIBJPEG
50
  TQImageIO::defineIOHandler("JFIF","^\377\330\377\340", 0, read_jpeg_jfif, NULL);
51
#endif
52
*/
53
}
54
55
// Simple copy operation on local files (isn't there something like this in the libs?)
56
bool copyFile(const TQString &src, const TQString &dest)
57
{
58
  TQFile f_src(src);
59
  TQFile f_dest(dest);
60
  TQFileInfo fi(f_src);
61
  uint src_size = fi.size();
62
  kdDebug(4640) << "Size: " << src_size << endl;
63
64
  if ( f_src.open(IO_ReadOnly) )
65
  {    // file opened successfully
66
    if ( !f_dest.open(IO_WriteOnly) )
67
    {
68
      kdDebug(4640) << "copyFile - There was an error opening destination file: " << dest << endl;
69
      f_src.close();
70
      return false;
71
    }
72
    char *data = new char[src_size];
73
    if(f_src.readBlock(data, src_size) == -1)
74
    {
75
      kdDebug(4640) << "copyFile - There was an error reading source file: " << src << endl;
76
      f_src.close();
77
      f_dest.close();
78
      delete [] data;
79
      return false;
80
    }
81
    if(f_dest.writeBlock(data, src_size) == -1)
82
    {
83
      kdDebug(4640) << "copyFile - There was an error writing to destination file: " << dest << endl;
84
      f_src.close();
85
      f_dest.close();
86
      delete [] data;
87
      return false;
88
    }
89
90
    f_src.close();
91
    f_dest.close();
92
    delete [] data;
93
    return true;
94
  }
95
  kdDebug(4640) << "copyFile - There was an error opening source file: " << src << endl;
96
  return false;
97
}
98
99
bool removeFile(const TQString &file)
100
{
101
  if(file.length() > 0 && TQFile::exists(file))
102
  {
103
    TQDir d;
104
    kdDebug(4640) << "Removing " << file << endl;
105
    if(!d.remove(file))
106
    {
107
      kdDebug(4640) << "removeFile - There was an error removing the file: " << file << endl;
108
      return false;
109
    }
110
    return true;
111
  }
112
  return false;
113
}
114
115
bool moveFile(const TQString &src, const TQString &dest)
116
{
117
  if(copyFile(src, dest))
118
    return removeFile(src);
119
  return false;
120
}
121
122
uint kdeColor(uint color)
123
{
124
  uint c = iconpalette[0]|OPAQUE_MASK;
125
126
  for(uint i = 0; i < 42; i++)
127
  {
128
    //kdDebug(4640) << "Color #" << i << " " << iconpalette[i] << endl;
129
    if( (iconpalette[i]|OPAQUE_MASK) - c < (iconpalette[i]|OPAQUE_MASK) - color)
130
      c = iconpalette[i]|OPAQUE_MASK;
131
  }
132
  //kdDebug(4640) << color << " -> " << c << endl;
133
  return c;
134
}
(-)tdegraphics/kiconedit/utils.h (-73 lines)
Lines 1-73 Link Here
1
/*  
2
    kiconedit - a small graphics drawing program for the KDE
3
4
    Copyright (C) 1998 Thomas Tanghus (tanghus@kde.org)
5
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public
8
    License as published by the Free Software Foundation; either
9
    version 2 of the License, or (at your option) any later version.
10
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
    General Public License for more details.
15
16
    You should have received a copy of the GNU Library General Public License
17
    along with this library; see the file COPYING.LIB.  If not, write to
18
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
    Boston, MA 02110-1301, USA.
20
*/  
21
22
#ifndef __UTILS_H__
23
#define __UTILS_H__
24
25
#include <tqimage.h>
26
27
#ifdef HAVE_CONFIG_H
28
#include "config.h"
29
#endif // HAVE_CONFIG_H
30
31
#include <tqdir.h>
32
#include <tqfile.h>
33
#include <tqfileinfo.h>
34
#include <tdeapplication.h>
35
36
#define OPAQUE_MASK 0xff000000
37
38
#ifdef TRANSPARENT
39
#undef TRANSPARENT
40
#endif
41
#define TRANSPARENT 0x00000000
42
43
const uint iconpalette[42] = {  // kde palette
44
	0x303030,0x585858,0x808080,0xa0a0a0,0xc3c3c3,0xdcdcdc,
45
	0x000040,0x004000,0x000000,0x004040,0x404000,0x000000,
46
	0x000080,0x008000,0x800000,0x008080,0x808000,0x800080,
47
	0x0000c0,0x00c000,0xc00000,0x00c0c0,0xc0c000,0xc000c0,
48
	0x0000ff,0x00ff00,0xff0000,0x00ffff,0xffff00,0xff00ff,
49
	0xc0c0ff,0xc0ffc0,0xffc0c0,0xc0ffff,0xffffc0,0xffc0ff,
50
	0x0080ff,0x0058c0,0x58a8ff,0xa8dcff,0xffffff,0x000000};
51
52
struct imageFormat
53
{
54
  imageFormat(const char *f, const char *t, const char *e) { format = f; title = t, extension = e;}
55
  const char *format;
56
  const char *title;
57
  const char *extension;
58
};
59
60
typedef TQPtrList<struct imageFormat> imageFormats;
61
extern imageFormats *formats;
62
63
void setupImageHandlers();
64
65
bool copyFile(const TQString &src, const TQString &dest);
66
bool removeFile(const TQString &file);
67
bool moveFile(const TQString &src, const TQString &dest);
68
uint kdeColor(uint c);
69
70
#endif //__UTILS_H__
71
72
73
(-)tdegraphics/kiconedit/version.h (-36 lines)
Lines 1-36 Link Here
1
/*  
2
    kiconedit - a small graphics drawing program for the KDE
3
4
    Copyright (C) 1998 Thomas Tanghus (tanghus@kde.org)
5
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public
8
    License as published by the Free Software Foundation; either
9
    version 2 of the License, or (at your option) any later version.
10
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
    General Public License for more details.
15
16
    You should have received a copy of the GNU Library General Public License
17
    along with this library; see the file COPYING.LIB.  If not, write to
18
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
    Boston, MA 02110-1301, USA.
20
*/  
21
22
#ifndef __KIE_VERSION_H__
23
#define __KIE_VERSION_H__
24
25
#define KIE_VERSION_MAJOR 0
26
#define KIE_VERSION_MINOR 4
27
#define KIE_VERSION_RELEASE 0
28
#define KIE_VERSION ((KIE_VERSION_MAJOR * 100) + (KIE_VERSION_MINOR *10) + KIE_VERSION_RELEASE)
29
#define KIE_VERSION_STRING "0.4.0"
30
31
32
33
#endif // __KIE_VERSION_H__
34
35
36
(-)tdegraphics/tdeiconedit/AUTHORS (+10 lines)
Line 0 Link Here
1
Copyright 1998 by Thomas Tanghus <tanghus@kde.org>
2
Copyright 2000 by John Califf <jcaliff@compuzone.net>
3
4
Original Author:  
5
    Thomas Tanghus
6
    
7
Current Maintainers:
8
    John Califf <jcaliff@compuzone.net>
9
    Laurent Montel <lmontel@mandrakesoft.com>
10
(-)tdegraphics/tdeiconedit/CMakeLists.txt (+42 lines)
Line 0 Link Here
1
#################################################
2
#
3
#  (C) 2010-2011 Calvin Morrison
4
#  mutantturkey@gmail.com
5
#
6
#  Improvements and feedback are welcome
7
#
8
#  This file is released under GPL >= 2
9
#
10
#################################################
11
12
add_subdirectory ( pics )
13
14
include_directories(
15
  ${CMAKE_CURRENT_BINARY_DIR}
16
  ${CMAKE_BINARY_DIR}
17
  ${TDE_INCLUDE_DIR}
18
  ${TQT_INCLUDE_DIRS}
19
)
20
21
link_directories(
22
  ${TQT_LIBRARY_DIRS}
23
)
24
25
26
#### other data #################################
27
28
install( FILES tdeiconedit.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
29
install( FILES tdeiconeditui.rc DESTINATION ${DATA_INSTALL_DIR}/tdeiconedit )
30
31
32
#### tdeiconedit (executable) #####################
33
34
tde_add_executable( tdeiconedit AUTOMOC
35
  SOURCES
36
    utils.cpp main.cpp tdeiconedit.cpp tdeicongrid.cpp
37
    tdeiconcolors.cpp kcolorgrid.cpp palettetoolbar.cpp
38
    tdeicon.cpp kresize.cpp knew.cpp properties.cpp
39
    tdeiconeditslots.cpp tdeiconconfig.cpp
40
  LINK tdeio-shared tdeprint-shared
41
  DESTINATION ${BIN_INSTALL_DIR}
42
)
(-)tdegraphics/tdeiconedit/Makefile.am (+26 lines)
Line 0 Link Here
1
INCLUDES = $(all_includes)
2
SUBDIRS = pics
3
4
bin_PROGRAMS = tdeiconedit
5
6
tdeiconedit_SOURCES = utils.cpp main.cpp tdeiconedit.cpp tdeicongrid.cpp \
7
    tdeiconcolors.cpp kcolorgrid.cpp palettetoolbar.cpp\
8
    tdeicon.cpp kresize.cpp knew.cpp properties.cpp \
9
    tdeiconeditslots.cpp tdeiconconfig.cpp 
10
11
tdeiconedit_METASOURCES = AUTO
12
13
# the library search path. 
14
tdeiconedit_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor
15
tdeiconedit_LDADD = $(LIB_TDEFILE) -ltdeprint
16
17
DISTCLEANFILES = *~ .deps/* .libs/*
18
19
rcdir = $(kde_datadir)/tdeiconedit
20
rc_DATA = tdeiconeditui.rc
21
22
xdg_apps_DATA = tdeiconedit.desktop
23
24
messages: rc.cpp
25
	$(XGETTEXT) rc.cpp $(tdeiconedit_SOURCES) -o $(podir)/tdeiconedit.pot
26
(-)tdegraphics/tdeiconedit/NEWS (+68 lines)
Line 0 Link Here
1
KDE Icon Editor
2
_______________
3
4
------------------------------------------------------------------------------
5
   News and fixes in version 0.4.0:
6
------------------------------------------------------------------------------
7
 - Enabled loading other image types than XPM.
8
 - Repainting large pictures is very much faster now.
9
 - Added drop site indication when using XDND.
10
 - Added QWhatsThis help (this is great!).
11
 - Started playing with XDND. The toolbar now has a drag source and the grid
12
   supports both XDND and KDND.
13
 - Added rulers (can be toggled from the configuration dialog).
14
 - Circular selection.
15
 - Configuration dialog:
16
   - Shortcut keys.
17
   - Appearance.
18
   - Templates.
19
   - Miscellaneous (paste mode, show rulers etc.).
20
21
------------------------------------------------------------------------------
22
   News and fixes in version 0.3.2:
23
------------------------------------------------------------------------------
24
 - German translations. (thanks to Gregor Zumstein <zumste98@cui.unige.ch>)
25
 - Solaris didn't like TRANSPARENT definition. (thanks to Alastair Burt <burt@dfki.de>)
26
 - Crashed on empty string in strlen. (thanks to Alastair Burt <burt@dfki.de>)
27
 - Russian translations (thanks to Andy Pershin <apa@penza.com.ru>)
28
29
------------------------------------------------------------------------------
30
   News and fixes in version 0.3.1:
31
------------------------------------------------------------------------------
32
 - Icon templates installed in the wrong directory.
33
 - Templates didn't load.
34
35
------------------------------------------------------------------------------
36
   News and fixes in version 0.3:
37
------------------------------------------------------------------------------
38
 - Complete rewrite of the drawing grid. Should now be faster and more flexible.
39
 - New class TDEIcon for file manipulation.
40
 - The "Line" tool can now draw 45 dgr. angles.
41
 - Smooth resizing of icons if linked with QT >= 1.40.
42
 - Improved loading/saving images with transparent pixels.
43
 - Loading and saving should now work on non-local files.
44
45
------------------------------------------------------------------------------
46
   News and fixes in version 0.2:
47
------------------------------------------------------------------------------
48
 - Saves restore file when closed by session management or by crash.
49
 - Fixed multi instance handling.
50
 - Added toolbar button for creating new instances.
51
 - Added danish translation.
52
 - Added statusbar field for messages.
53
 - Saves window size.
54
 - Couldn't toggle grid from the menu.
55
 - Added "Toggle toolbar", "Toggle drawing tools" and "Toggle statusbar" to the
56
   "View" menu. This as well as the *Bar positions is saved between sessions.
57
 - Grid state and zoom factor saved between sessions.
58
 - The clipboard is checked with short intervals to check if there's a pixmap.
59
 - The cursor hotspots are now correct.
60
 - Cursor position is shown in the statusbar.
61
 - Removed a lot of memory leaks and made the general memory footprint some smaller.
62
 - New tools: "Find pixel", "Flood Fill", "Filled Circle" and "Filled Ellipse".
63
 - Clipboard now supports selection of regions and inserting into existing image.
64
 - Speeded up loading of pixmaps by some thousand percents ;-)
65
 - Preview has scrollbars if it doesn't fit.
66
 
67
68
(-)tdegraphics/tdeiconedit/kcolorgrid.cpp (+335 lines)
Line 0 Link Here
1
/*
2
    tdeiconedit - a small graphics drawing program for creating KDE icons
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#include <tqpainter.h>
22
23
#include <kdebug.h>
24
25
#include "kcolorgrid.h"
26
27
void KColorArray::remove(int idx)
28
{
29
  int oldsize = size();
30
  if(idx >= (int)size())
31
  {
32
    kdWarning() << "KColorArray::remove: Index " << idx << " out of range" << endl;
33
    return;
34
  }
35
  KColorArray tmp(*this);
36
  tmp.detach();
37
  resize(size()-1);
38
  for(int i = idx; i < oldsize-1; i++)
39
    at(i) = tmp[i+1];
40
  //kdDebug(4640) << "KColorArray::remove() " << at(idx) << "\t-\tsize: " << size() << endl;
41
}
42
43
void KColorArray::append(uint c)
44
{
45
  resize(size()+1);
46
  at(size()-1) = c;
47
  //kdDebug(4640) << "KColorArray::append() " << c << "\t-\tsize: " << size() << endl;
48
}
49
50
uint KColorArray::closestMatch(uint color)
51
{
52
  //kdDebug(4640) << "KColorArray: " << c << endl;
53
  uint c = color & ~OPAQUE_MASK, d = 0xffffff, t;
54
  //kdDebug(4640) << "KColorArray: " << c << endl;
55
  //kdDebug(4640) << "KColorArray: " << c|OPAQUE_MASK << endl;
56
  uint cb = c;
57
  for(uint i = 0; i < size(); i++)
58
  {
59
    if (at(i) > cb)
60
      t = at(i) - cb;
61
    else
62
      t = cb - at(i);
63
    if( t < d )
64
    {
65
      d = t;
66
      c = at(i);
67
    }
68
  }
69
  return c|OPAQUE_MASK;
70
}
71
72
KColorGrid::KColorGrid(TQWidget *parent, const char *name, int space)
73
 : TQWidget(parent, name, TQt::WResizeNoErase|TQt::WRepaintNoErase)
74
{
75
  //kdDebug(4640) << "KColorGrid - constructor" << endl;
76
  s = space;
77
  rows = cols = totalwidth = totalheight = 0;
78
  setCellSize(10);
79
  setGridState(Plain);
80
  setGrid(true);
81
  numcolors.resize(0);
82
  gridcolors.resize(0);
83
84
  //kdDebug(4640) << "KColorGrid - constructor - done" << endl;
85
}
86
/*
87
void KColorGrid::show()
88
{
89
  //updateScrollBars();
90
  TQWidget::show();
91
}
92
*/
93
void KColorGrid::paintEvent(TQPaintEvent *e)
94
{
95
  //kdDebug(4640) << "KColorGrid::paintEvent" << endl;
96
97
  //updateScrollBars();
98
  //TQWidget::paintEvent(e);
99
100
  const TQRect urect = e->rect();
101
102
  //kdDebug(4640) << "Update rect = ( " << //urect.left() << ", " << urect.top() << ", " << urect.width() << ", " << urect.height() << " )" << endl;
103
104
105
  int firstcol = getX(urect.x())-1;
106
  int firstrow = getY(urect.y())-1;
107
  int lastcol  = getX(urect.right())+1;
108
  int lastrow  = getY(urect.bottom())+1;
109
110
  TQWMatrix matrix;
111
  TQPixmap pm(urect.width(),urect.height());
112
  pm.fill(paletteBackgroundColor());
113
  TQPainter p;
114
  p.begin( &pm );
115
116
  firstrow = (firstrow < 0) ? 0 : firstrow;
117
  firstcol = (firstcol < 0) ? 0 : firstcol;
118
  lastrow = (lastrow >= rows) ? rows : lastrow;
119
  lastcol = (lastcol >= cols) ? cols : lastcol;
120
  //kdDebug(4640) << urect.x() << " x " << urect.y() << "  -  row: " << urect.width() << " x " << urect.height() << endl;
121
  //kdDebug(4640) << "col: " << firstcol << " -> " << lastcol << "  -  row: " << firstrow << " -> " << lastrow << endl;
122
123
/*
124
  if(this->isA("KDrawGrid"))
125
    kdDebug(4640) << "KDrawGrid\n   firstcol: " << firstcol << "\n   lastcol: " << lastcol << "\n   firstrow: " << firstrow << "\n   lastrow: " << lastrow << endl;
126
*/
127
  for(int i = firstrow; i < lastrow; i++)
128
  {
129
    //if(this->isA("KDrawGrid"))
130
    //  kdDebug(4640) << "Updating row " << i << endl;
131
    for(int j = firstcol; j < lastcol; j++)
132
    {
133
      matrix.translate( (j*cellsize)-urect.x(), (i*cellsize)-urect.y() );
134
      p.setWorldMatrix( matrix );
135
      //p.setClipRect(j*cellsize, i*cellsize, cellsize, cellsize);
136
      paintCell(&p, i, j);
137
      //p.setClipping(FALSE);
138
      matrix.reset();
139
      p.setWorldMatrix( matrix );
140
    }
141
    //kapp->processEvents();
142
  }
143
144
  matrix.translate(-urect.x(),-urect.y());
145
  p.setWorldMatrix( matrix );
146
  paintForeground(&p,e);
147
  
148
  p.end();
149
150
  bitBlt(this,urect.topLeft(),&pm,TQRect(0,0,pm.width(),pm.height()));
151
152
}
153
154
void KColorGrid::paintForeground(TQPainter* , TQPaintEvent* )
155
{
156
}
157
158
/*
159
void KColorGrid::resizeEvent(TQResizeEvent *)
160
{
161
  //kdDebug(4640) << "resize: width:  " << width() << " - total: " << totalwidth << endl;
162
  //kdDebug(4640) << "resize: height: " << height() << " - total: " << totalheight << endl;
163
}
164
*/
165
166
TQSize KColorGrid::sizeHint() const
167
{
168
  return TQSize(totalwidth, totalheight);
169
}
170
171
int KColorGrid::getY( int y )
172
{
173
  if(y > (totalheight-1))
174
    y = totalheight;
175
  if(cellsize == 1)
176
    return y;
177
  return (y/cellsize);
178
}
179
180
int KColorGrid::getX( int x )
181
{
182
  if( x > totalwidth-1)
183
    x = totalwidth;
184
  if(cellsize == 1)
185
    return x;
186
  return (x/cellsize);
187
}
188
189
const TQRect KColorGrid::viewRect()
190
{
191
  //kdDebug(4640) << "viewRect" << endl;
192
  const TQRect r(0, 0, width(), height());
193
  //kdDebug(4640) << "viewRect - " << x << " x " << y << " - " << w << " x " << h << endl;
194
  return r;
195
}
196
197
void KColorGrid::setNumRows(int n)
198
{
199
  //kdDebug(4640) << "setNumRows" << endl;
200
  if(n < 0 || n == rows)
201
    return;
202
203
  rows = n;
204
205
  gridcolors.resize(n*numCols());  
206
  //TQTableView::setNumRows(n);
207
  totalheight = (n * cellsize) + 1;
208
  resize(totalwidth, totalheight);
209
  //kdDebug(4640) << "setNumRows() - gridcolors: " << gridcolors.size() << "  size: " << numCols()*numRows() << endl;
210
}
211
212
void KColorGrid::setNumCols(int n)
213
{
214
  //kdDebug(4640) << "setNumCols" << endl;
215
  if(n < 0)
216
    return;
217
  int on = numCols();
218
  KColorArray gc(gridcolors);
219
  gc.detach();
220
  //kdDebug(4640) << "gc size: " << gc.size() << " numrows: " << numRows() << endl;
221
  gridcolors.resize(n*numRows());
222
  cols = n;
223
224
  totalwidth = (n * cellsize) + 1;
225
  resize(totalwidth, totalheight);
226
  //kdDebug(4640) << "numRows: " << numRows() << endl;
227
  //kdDebug(4640) << "gridcolor: " << gridcolors.size() << "  grid: " << numRows()*numCols() << endl;
228
  if(numRows() == 0)
229
    return;
230
231
  for(int i = 0; i < numRows(); i++)
232
  {
233
    for(int j = 0; j < n; j++)
234
    {
235
      //kdDebug(4640) << "row " << i << " , col " << j << endl;
236
      if(j < on ) //If there's something to read here -- i.e. we're within the original grid
237
      {
238
        //kdDebug(4640) << (i*numCols())+j << " " << (i*on)+j << endl;
239
        gridcolors.at((i*numCols())+j) = gc.at((i*on)+j);
240
      }
241
      else //Initialize to something..
242
      {
243
        if (gc.size()) //Have some pixels originally..
244
            gridcolors.at((i*numCols())+j) = gc.at(0);
245
        else 
246
            gridcolors.at((i*numCols())+j) = 0; //Picks something #### Update numcolors?
247
      } 
248
    }
249
  }
250
251
  //kdDebug(4640) << "setNumCols() - gridcolors: " << gridcolors.size() << "  size: " << numCols()*numRows() << endl;
252
}
253
254
void KColorGrid::fill( uint color)
255
{
256
  gridcolors.fill(color);
257
  numcolors.resize(1);
258
  numcolors.at(0) = color;
259
  emit colorschanged(numcolors.size(), numcolors.data());
260
}
261
262
void KColorGrid::setColor( int colNum, uint col, bool update )
263
{
264
  //kdDebug(4640) << "KColorGrid::setColor" << endl;
265
  uint oldcolor = gridcolors[colNum];
266
  gridcolors[colNum] = col;
267
268
  if(!update)
269
    return;
270
271
  //kdDebug(4640) << "KColorGrid::setColor - before adding" << endl;
272
  if(!numcolors.contains(col))
273
  {
274
    //kdDebug(4640) << "KColorGrid::setColor() - adding " << //  col << " - " << tqRed(col) << " " << tqGreen(col) << " " << tqBlue(col) << endl;
275
    numcolors.append(col);
276
    //kdDebug(4640) << "KColorGrid::setColor() - adding done " << numcolors.size()-1 << endl;
277
    //numcolors++;
278
    emit addingcolor(col);
279
  }  
280
281
  //kdDebug(4640) << "KColorGrid::setColor - before removing" << endl;
282
  if(!gridcolors.contains(oldcolor))
283
  {
284
    int idx = numcolors.find(oldcolor);
285
    if(idx != -1)
286
    {
287
      //kdDebug(4640) << "KColorGrid::setColor() - removing " << //  oldcolor << " - " << tqRed(oldcolor) << " " << tqGreen(oldcolor) << " " << tqBlue(oldcolor) << endl;
288
      numcolors.remove(idx);
289
      //kdDebug(4640) << "KColorGrid::setColor() - removing done" << endl;
290
      emit colorschanged(numcolors.size(), numcolors.data());
291
    }
292
    //numcolors--;
293
  }
294
295
  //kdDebug(4640) << "KColorGrid::setColor - before updateCell" << endl;
296
  repaint((colNum%numCols())*cellsize,(colNum/numCols())*cellsize,  cellsize, cellsize);
297
  //updateCell( colNum/numCols(), colNum%numCols(), false );
298
  //kdDebug(4640) << "KColorGrid::setColor - after updateCell" << endl;
299
}
300
301
void KColorGrid::updateCell( int row, int col, bool  )
302
{
303
    //kdDebug(4640) << "updateCell - before repaint" << endl;
304
  TQWMatrix matrix;
305
  TQPainter p;
306
  p.begin( this );
307
  matrix.translate( (col*cellsize), (row*cellsize) );
308
  p.setWorldMatrix( matrix );
309
  paintCell(&p, row, col);
310
  p.end();
311
312
}
313
314
void KColorGrid::updateColors()
315
{
316
  numcolors.resize(0);
317
  for(int i = 0; i < (int)gridcolors.size(); i++)
318
  {
319
    uint col = gridcolors.at(i);
320
    if(!numcolors.contains(col))
321
      numcolors.append(col);
322
  }
323
  emit colorschanged(numcolors.size(), numcolors.data());
324
}
325
326
void KColorGrid::setCellSize( int s )
327
{
328
  cellsize = s;
329
  totalwidth = (numCols() * s) + 1;
330
  totalheight = (numRows() * s) + 1;
331
  resize(totalwidth, totalheight);
332
  if ( isVisible() )
333
    repaint(viewRect(), false);
334
}
335
#include "kcolorgrid.moc"
(-)tdegraphics/tdeiconedit/kcolorgrid.h (+105 lines)
Line 0 Link Here
1
/*
2
    tdeiconedit - a small graphics drawing program for creating KDE icons
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#ifndef __KCOLORGRID_H__
22
#define __KCOLORGRID_H__
23
24
#include <tqwidget.h>
25
#include <tqsize.h>
26
#include <tqrect.h>
27
28
#include "utils.h"
29
30
#define KArrayUint TQMemArray<uint>
31
32
class KColorArray : public KArrayUint
33
{
34
public:
35
  void remove(int idx);
36
  void append(uint);
37
  uint closestMatch(uint);
38
};
39
40
class KColorGrid : public TQWidget
41
{
42
private:
43
    Q_OBJECT
44
  
45
public:
46
  KColorGrid( TQWidget * parent = 0, const char *name = 0, int spacing = 0);
47
  virtual ~KColorGrid() {};
48
49
  enum GridState { Plain, Shaded };
50
51
  void setSpacing(int space) { s = space; update(); }
52
  void setGridState(GridState state) { gridstate = state;}
53
  GridState gridState() { return gridstate; }
54
  void setGrid(bool state) { hasgrid = state; }
55
  int spacing() { return s; }
56
  bool hasGrid() { return hasgrid; }
57
  uint numColors() { return numcolors.size(); }
58
  uint colors( uint *c ) { c = numcolors.data(); return numcolors.size(); }
59
  bool contains(uint c) { return numcolors.contains(c); }
60
  uint colorAt(int idx) { return gridcolors.at(idx); }
61
  uint *data() {return numcolors.data(); }
62
  void fill(uint color);
63
  int numCols() { return cols; }
64
  int numRows() { return rows; }
65
66
  virtual void setCellSize( int s );
67
  virtual int cellSize() { return cellsize; }
68
  virtual TQSize sizeHint() const;
69
70
  void setSize(const TQSize s) { setNumRows(s.height()); setNumCols(s.width()); }
71
72
public slots:
73
  //virtual void show();
74
75
signals:
76
  void addingcolor(uint);
77
  void colorschanged(uint, uint*);
78
79
protected:
80
  void updateCell(int row, int col, bool f);
81
  virtual void paintForeground( TQPainter* p, TQPaintEvent* e);
82
  virtual void paintCell( TQPainter *p, int row, int col) = 0;
83
  virtual void paintEvent(TQPaintEvent *);
84
  //virtual void resizeEvent(TQResizeEvent *);
85
  void setColor(int colNum, uint, bool update = true );
86
  void updateColors();
87
  virtual void setNumRows(int);
88
  virtual void setNumCols(int);
89
  virtual int totalWidth() { return totalwidth; }
90
  virtual int totalHeight() { return totalheight; }
91
  int findRow(int y) { return getY(y); }
92
  int getY(int y);
93
  int findCol(int x) { return getX(x); }
94
  int getX(int x);
95
  const TQRect viewRect();
96
97
//private:
98
  int s, cellsize, totalwidth, totalheight;
99
  int rows, cols, ypos, xpos;
100
  GridState gridstate;
101
  bool hasgrid;
102
  KColorArray gridcolors, numcolors;
103
};
104
105
#endif //__KCOLORGRID_H__
(-)tdegraphics/tdeiconedit/knew.cpp (+326 lines)
Line 0 Link Here
1
/*
2
    KDE Draw - a small graphics drawing program for the KDE
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#include <tqlayout.h>
22
#include <tqpainter.h>
23
#include <tqbuttongroup.h>
24
#include <tqradiobutton.h>
25
#include <tqpushbutton.h>
26
27
#include <tdeconfig.h>
28
#include <tdelocale.h>
29
#include <tdeglobal.h>
30
#include <kiconloader.h>
31
#include <kdebug.h>
32
#include <tdeapplication.h>
33
34
#include "knew.h"
35
36
TDEIconTemplateContainer* TDEIconTemplateContainer::instance = 0;
37
38
void createStandardTemplates(TDEIconTemplateContainer *list)
39
{
40
    TDEIconLoader *kil = TDEGlobal::iconLoader();
41
42
    TDEIconTemplate it;
43
    it.path = kil->iconPath("standard", TDEIcon::User);
44
    it.title = i18n("Standard File");
45
    list->append(it);
46
    
47
    it.path = kil->iconPath("source", TDEIcon::User);
48
    it.title = i18n("Source File");
49
    list->append(it);
50
51
    it.path = kil->iconPath("compressed", TDEIcon::User);
52
    it.title = i18n("Compressed File");
53
    list->append(it);
54
55
    it.path = kil->iconPath("folder", TDEIcon::User);
56
    it.title = i18n("Standard Folder");
57
    list->append(it);
58
59
    it.path = kil->iconPath("package", TDEIcon::User);
60
    it.title = i18n("Standard Package");
61
    list->append(it);
62
63
    it.path = kil->iconPath("mini-folder", TDEIcon::User);
64
    it.title = i18n("Mini Folder");
65
    list->append(it);
66
67
    it.path = kil->iconPath("mini-package", TDEIcon::User);
68
    it.title = i18n("Mini Package");
69
    list->append(it);
70
}
71
72
void TDEIconTemplateContainer::save()
73
{
74
  TDEConfig *k = kapp->config();
75
  k->setGroup("Templates");
76
  
77
  TQStringList names;
78
  for (TQValueListIterator<TDEIconTemplate> iter = begin(); iter != end(); iter++)
79
  {
80
      names.append((*iter).title);
81
  }
82
  
83
  k->writeEntry("Names",  names);
84
  
85
  for(unsigned int i = 0; i < names.count(); i++)
86
  {    
87
    k->writePathEntry(names[i], (*this)[i].path);
88
  }
89
}
90
91
TDEIconTemplateContainer::TDEIconTemplateContainer() : TQValueList<TDEIconTemplate>()
92
{  
93
  TQStrList names;
94
  TDEConfig *k = kapp->config();
95
  k->setGroup("Templates");
96
  k->readListEntry("Names", names);
97
  for(int i = 0; i < (int)names.count(); i++)
98
  {
99
    TDEIconTemplate it;
100
    it.path = k->readPathEntry(names.at(i));
101
    it.title = names.at(i);
102
    //kdDebug(4640) << "Template: " << names.at(i) << "\n" << path.data() << endl;
103
    append(it);
104
  }
105
106
  if(count() == 0)
107
  {
108
    createStandardTemplates(this);
109
  }
110
}
111
112
TDEIconTemplateContainer::~TDEIconTemplateContainer()
113
{
114
  clear();
115
}
116
117
TDEIconListBoxItem::TDEIconListBoxItem( TDEIconTemplate t )
118
   : TQListBoxItem(), icontemplate(t)
119
{
120
  //kdDebug(4640) << "TDEIconListBoxItem - " << t->path.data() << ", " << t->title.data() << endl;
121
 
122
  pm.load(t.path);
123
  setText( t.title );
124
}
125
126
void TDEIconListBoxItem::reloadIcon()
127
{
128
  pm.load(icontemplate.path);
129
  setText( icontemplate.title );
130
}
131
 
132
133
134
void TDEIconListBoxItem::paint( TQPainter *p )
135
{
136
  p->drawPixmap( 3, 0, pm );
137
  TQFontMetrics fm = p->fontMetrics();
138
  int yPos;                       // vertical text position
139
  if ( pm.height() < fm.height() )
140
    yPos = fm.ascent() + fm.leading()/2;
141
  else
142
    yPos = pm.height()/2 - fm.height()/2 + fm.ascent();
143
  p->drawText( pm.width() + 5, yPos, text() );
144
}
145
146
int TDEIconListBoxItem::height(const TQListBox *lb ) const
147
{
148
  return TQMAX( pm.height(), lb->fontMetrics().lineSpacing() + 1 );
149
}
150
    
151
int TDEIconListBoxItem::width(const TQListBox *lb ) const
152
{
153
  return pm.width() + lb->fontMetrics().width( text() ) + 6;
154
}
155
156
NewSelect::NewSelect(TQWidget *parent) : TQWidget( parent )
157
{
158
  wiz = (KWizard*) parent;
159
  grp = new TQButtonGroup( this );
160
  connect( grp, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( buttonClicked( int ) ) );
161
  grp->setExclusive( true );
162
  
163
  TQVBoxLayout* ml = new TQVBoxLayout( this );
164
  ml->addWidget( grp, 1 );
165
  //ml->addWidget(grp, 10, AlignLeft);
166
  TQVBoxLayout* l = new TQVBoxLayout( grp, 10 );
167
  
168
  rbscratch = new TQRadioButton( i18n( "Create from scratch" ), grp );
169
  l->addWidget( rbscratch, 1 );
170
  //l->addWidget(rbscratch, 5, AlignLeft);
171
  
172
  rbtempl = new TQRadioButton( i18n( "Create from template" ), grp );
173
  l->addWidget( rbtempl, 1 );
174
  //l->addWidget(rbtempl, 5, AlignLeft);
175
  
176
  //grp->setMinimumSize(grp->childrenRect().size());
177
  
178
  grp->setButton( 0 );
179
}
180
181
NewSelect::~NewSelect()
182
{
183
}
184
185
void NewSelect::buttonClicked(int id)
186
{
187
  //kdDebug(4640) << "Button: " << id << endl;
188
189
  emit iconopenstyle(id);
190
}
191
192
NewFromTemplate::NewFromTemplate( TQWidget* parent )
193
  : TQWidget( parent )
194
{
195
  wiz = (KWizard*) parent;
196
  
197
  TQVBoxLayout* ml = new TQVBoxLayout(this);
198
  
199
  grp = new TQGroupBox( i18n( "Templates" ), this );
200
  ml->addWidget( grp, 1 );
201
  //ml->addWidget(grp, 10, AlignLeft);
202
  
203
  TQHBoxLayout* l = new TQHBoxLayout( grp, 15 );
204
  
205
  templates = new TDEIconListBox( grp );
206
  connect( templates, TQT_SIGNAL( highlighted( int ) ), TQT_SLOT( checkSelection( int ) ) );
207
  l->addWidget( templates );
208
    
209
  for( int i = 0; i < (int) TDEIconTemplateContainer::self()->count(); i++ )
210
    templates->insertItem( new TDEIconListBoxItem( *TDEIconTemplateContainer::self()->at( i ) ) );
211
}
212
213
NewFromTemplate::~NewFromTemplate()
214
{
215
}
216
217
void NewFromTemplate::checkSelection( int )
218
{
219
  //kdDebug(4640) << "checkSelection(int) " << templates->currentItem()  << endl;
220
  if( templates->currentItem() != -1 )
221
    wiz->finishButton()->setEnabled( true );
222
  else
223
    wiz->finishButton()->setEnabled( false );
224
}
225
226
KNewIcon::KNewIcon( TQWidget* parent )
227
  : KWizard( parent, 0, true )
228
{
229
  //kdDebug(4640) << "KNewIcon" << endl;
230
  setCaption( i18n( "Create New Icon" ) );
231
  resize( 400, 250 );
232
  
233
  openstyle = 0;
234
235
  finishButton()->setEnabled( true );
236
  cancelButton()->setEnabled( true );
237
  nextButton()->setEnabled( false );
238
239
  select = new NewSelect( this );
240
  connect( select, TQT_SIGNAL( iconopenstyle( int ) ), TQT_SLOT( iconOpenStyle( int ) ) );
241
242
  scratch = new KResizeWidget( this, 0, TQSize( 32, 32 ) );
243
  // this doesn't accept default valid size, besides spin buttons won't allow 
244
  // an invalid size to be set by the user - forces user to change valid default 
245
  // size to create the new icon object -
246
  connect( scratch, TQT_SIGNAL( validSize( bool ) ), TQT_SLOT( checkPage( bool ) ) );
247
  connect(this, TQT_SIGNAL(selected(const TQString &)), this, TQT_SLOT(checkPage(const TQString &)));
248
  templ = new NewFromTemplate(this);
249
  templ->hide();
250
251
  addPage(select, i18n("Select Icon Type"));
252
  addPage(scratch, i18n("Create From Scratch"));
253
  act = scratch;
254
  //addPage(templ, i18n("Create From Template"));
255
}
256
257
KNewIcon::~KNewIcon()
258
{
259
  delete select;
260
  delete scratch;
261
  delete templ;
262
}
263
264
void KNewIcon::okClicked()
265
{
266
  if(openstyle == Blank)
267
    emit newicon(scratch->getSize());
268
  else
269
    emit newicon(templ->path());
270
  hide();
271
  setResult(1);
272
  accept();
273
}
274
275
void KNewIcon::cancelClicked()
276
{
277
  hide();
278
  setResult(0);
279
  reject();
280
}
281
282
void KNewIcon::iconOpenStyle(int style)
283
{
284
  openstyle = style;
285
286
  if( act )
287
    removePage( act );
288
289
  if(openstyle == Blank)
290
  {
291
    act = scratch;
292
    setNextEnabled( act, true );
293
    addPage( scratch, i18n( "Create From Scratch" ) );
294
  }
295
  else if( openstyle == Template )
296
  {
297
    act = templ;
298
    setNextEnabled( act, true );
299
    addPage( templ, i18n( "Create From Template" ) );
300
  }
301
}
302
303
void KNewIcon::checkPage( bool b)
304
{
305
    //kdDebug(4640) << "checkPage(int) " << openstyle << " " << p << endl;
306
    if(openstyle == Blank)
307
        finishButton()->setEnabled(true);
308
    else if( !b )
309
        finishButton()->setEnabled(false);
310
    else
311
        templ->checkSelection(0);
312
}
313
314
void KNewIcon::checkPage(const TQString &)
315
{
316
  if(currentPage() == select || openstyle == Blank)
317
    finishButton()->setEnabled(true);
318
  else
319
    finishButton()->setEnabled(false);
320
}
321
#include "knew.moc"
322
323
324
325
326
(-)tdegraphics/tdeiconedit/knew.h (+168 lines)
Line 0 Link Here
1
/*
2
    KDE Draw - a small graphics drawing program for the KDE.
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#ifndef __KNEWICON_H__
22
#define __KNEWICON_H__
23
24
#include <tqwidget.h>
25
#include <tqpixmap.h>
26
#include <tqimage.h>
27
#include <tqlistbox.h>
28
29
#include <kwizard.h>
30
31
#include "kresize.h"
32
33
class TDEIconListBox;
34
class TDEIconTemplateContainer;
35
class TQButtonGroup;
36
class TQRadioButton;
37
class TQGroupBox;
38
39
struct TDEIconTemplate
40
{
41
  TQString path;
42
  TQString title;
43
};
44
45
class TDEIconListBoxItem : public TQListBoxItem    
46
{
47
public:
48
  TDEIconListBoxItem( TDEIconTemplate ); 
49
50
51
  const TQString path() { return icontemplate.path; }
52
  TDEIconTemplate& iconTemplate() { return icontemplate; }
53
  void reloadIcon();
54
55
protected:
56
  virtual void paint( TQPainter * );      
57
  virtual int height( const TQListBox * ) const;      
58
  virtual int width( const TQListBox * ) const;      
59
private:
60
  TQPixmap pm;
61
  TDEIconTemplate icontemplate;
62
};
63
64
class TDEIconListBox : public TQListBox    
65
{
66
  Q_OBJECT
67
  
68
public:
69
  TDEIconListBox( TQWidget *parent ) : TQListBox(parent) {} ;
70
  const TQString path(int idx) { return ((TDEIconListBoxItem*)item(idx))->path(); }
71
  TDEIconTemplate& iconTemplate(int idx) { return ((TDEIconListBoxItem*)item(idx))->iconTemplate(); }
72
73
};
74
75
class TDEIconTemplateContainer : public TQValueList<TDEIconTemplate>
76
{
77
public:
78
   static TDEIconTemplateContainer* self()
79
   {
80
      if (!instance)
81
         instance = new TDEIconTemplateContainer;
82
      return instance;
83
   }
84
85
   void save();
86
87
private:
88
   static TDEIconTemplateContainer* instance;
89
90
  const TDEIconTemplateContainer operator = (const TDEIconTemplateContainer&);
91
  TDEIconTemplateContainer(const TDEIconTemplateContainer&);
92
93
  TDEIconTemplateContainer();  
94
  ~TDEIconTemplateContainer();
95
};
96
97
class NewSelect : public TQWidget
98
{
99
  Q_OBJECT
100
  
101
public:
102
  NewSelect(TQWidget *parent);
103
  ~NewSelect();
104
105
signals:
106
  void iconopenstyle(int);
107
108
protected slots:
109
  void buttonClicked(int);
110
111
protected:
112
  KWizard *wiz;
113
  TQButtonGroup *grp;
114
  TQRadioButton *rbscratch, *rbtempl;
115
};
116
117
class NewFromTemplate : public TQWidget
118
{
119
  Q_OBJECT
120
  
121
public:
122
  NewFromTemplate(TQWidget *parent);
123
  ~NewFromTemplate();
124
125
  const TQString path() { return TQString(templates->path(templates->currentItem())); }
126
127
public slots:
128
  void checkSelection(int);
129
 
130
protected:
131
  TDEIconListBox *templates;
132
  KWizard *wiz;
133
  TQGroupBox *grp;
134
};
135
136
class KNewIcon : public KWizard
137
{
138
  Q_OBJECT
139
  
140
public:
141
  KNewIcon(TQWidget *parent);
142
  ~KNewIcon();
143
144
  enum { Blank = 0, Template = 1};
145
  int openStyle() { return openstyle; }
146
  const TQString templatePath() { return TQString(templ->path()); }
147
  const TQSize templateSize() { return scratch->getSize(); }
148
149
protected slots:
150
  void okClicked();
151
  void cancelClicked();
152
  void iconOpenStyle(int);
153
  void checkPage(bool);
154
  void checkPage(const TQString &);
155
156
signals:
157
  void newicon(const TQSize);
158
  void newicon(const TQString);
159
160
protected:
161
  NewSelect       *select;
162
  KResizeWidget   *scratch;
163
  NewFromTemplate *templ;
164
  TQWidget         *act;
165
  int              openstyle;
166
};
167
168
#endif // __KNEWICON_H__
(-)tdegraphics/tdeiconedit/kresize.cpp (+83 lines)
Line 0 Link Here
1
/*
2
    KDE Draw - a small graphics drawing program for the KDE
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
    Copyright (C) 2002  Nadeem Hasan ( nhasan@kde.org )
5
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public
8
    License as published by the Free Software Foundation; either
9
    version 2 of the License, or (at your option) any later version.
10
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
    General Public License for more details.
15
16
    You should have received a copy of the GNU Library General Public License
17
    along with this library; see the file COPYING.LIB.  If not, write to
18
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
    Boston, MA 02110-1301, USA.
20
*/
21
22
#include <tqlabel.h>
23
#include <tqlayout.h>
24
#include <tqgroupbox.h>
25
26
#include <tdelocale.h>
27
#include <knuminput.h>
28
29
#include "kresize.h"
30
31
KResizeWidget::KResizeWidget( TQWidget* parent, const char* name, 
32
    const TQSize& size ) : TQWidget( parent, name )
33
{
34
  TQHBoxLayout* genLayout = new TQHBoxLayout( this );
35
36
  TQGroupBox* group = new TQGroupBox( i18n( "Size" ), this );
37
  group->setColumnLayout( 0, Qt::Horizontal );
38
  genLayout->addWidget( group );
39
40
  TQHBoxLayout* layout = new TQHBoxLayout( group->layout(), 6 );
41
42
  m_width = new KIntSpinBox( 1, 200, 1, 1, 10, group );
43
  m_width->setValue( size.width() );
44
  layout->addWidget( m_width, 1 );
45
46
  TQLabel* label = new TQLabel( "X", group );
47
  layout->addWidget( label );
48
49
  m_height = new KIntSpinBox( 1, 200, 1, 1, 10, group);
50
  m_height->setValue( size.height() );
51
  layout->addWidget( m_height, 1 );
52
53
  setMinimumSize( 200, 100 );
54
}
55
56
KResizeWidget::~KResizeWidget()
57
{
58
}
59
60
const TQSize KResizeWidget::getSize()
61
{
62
  return TQSize( m_width->value(), m_height->value() );
63
}
64
65
KResizeDialog::KResizeDialog( TQWidget* parent, const char* name, 
66
    const TQSize size )
67
    : KDialogBase( parent, name, true, i18n( "Select Size" ), Ok|Cancel )
68
{
69
  m_resize = new KResizeWidget( this, "resize widget", size );
70
71
  setMainWidget( m_resize );
72
}
73
74
KResizeDialog::~KResizeDialog()
75
{
76
}
77
78
const TQSize KResizeDialog::getSize()
79
{
80
  return m_resize->getSize();
81
}
82
83
#include "kresize.moc"
(-)tdegraphics/tdeiconedit/kresize.h (+64 lines)
Line 0 Link Here
1
/*
2
    KDE Draw - a small graphics drawing program for the KDE.
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
    Copyright ( C ) 2002  Nadeem Hasan (  nhasan@kde.org )
5
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public
8
    License as published by the Free Software Foundation; either
9
    version 2 of the License, or (at your option) any later version.
10
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
    General Public License for more details.
15
16
    You should have received a copy of the GNU Library General Public License
17
    along with this library; see the file COPYING.LIB.  If not, write to
18
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
    Boston, MA 02110-1301, USA.
20
*/  
21
22
#ifndef __KRESIZE_H__
23
#define __KRESIZE_H__
24
25
#include <kdialogbase.h>
26
27
class KIntSpinBox;
28
29
class KResizeWidget : public TQWidget
30
{
31
  Q_OBJECT
32
  
33
34
public:
35
36
  KResizeWidget( TQWidget* parent, const char* name, const TQSize& );
37
  ~KResizeWidget();
38
39
  const TQSize getSize();
40
41
private:
42
43
  KIntSpinBox *m_width;
44
  KIntSpinBox *m_height;
45
};
46
47
class KResizeDialog : public KDialogBase
48
{
49
  Q_OBJECT
50
  
51
  
52
public:
53
54
  KResizeDialog( TQWidget* parent, const char* name, const TQSize s );
55
  ~KResizeDialog();
56
57
  const TQSize getSize();
58
59
private:
60
61
  KResizeWidget* m_resize;
62
};
63
64
#endif //__KRESIZE_H__
(-)tdegraphics/tdeiconedit/main.cpp (+89 lines)
Line 0 Link Here
1
/*
2
    KDE Draw - a small graphics drawing program for the KDE.
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or modify
6
    it under the terms of the GNU General Public License as published by
7
    the Free Software Foundation; either version 2 of the License, or
8
    (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
    GNU General Public License for more details.
14
15
    You should have received a copy of the GNU General Public License
16
    along with this program; if not, write to the Free Software
17
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18
*/
19
20
// A lot of this code is lifted from KMail. Thanks, guys!
21
22
#include <stdlib.h>
23
24
#include <tdelocale.h>
25
#include <tdeconfig.h>
26
#include <tdeaboutdata.h>
27
#include <tdecmdlineargs.h>
28
#include <kdebug.h>
29
30
#include "tdeiconedit.h"
31
#include "config.h"
32
#include "properties.h"
33
34
static const char description[] =
35
	I18N_NOOP("TDE Icon Editor");
36
37
static TDECmdLineOptions options[] =
38
{
39
  { "+[file(s)]" , I18N_NOOP("Icon file(s) to open"), 0 },
40
  TDECmdLineLastOption
41
};
42
43
int main(int argc, char **argv)
44
{
45
  TDEAboutData aboutData( "tdeiconedit", I18N_NOOP("TDEIconEdit"),
46
    VERSION, description, TDEAboutData::License_GPL,
47
    "(c) 1998, Thomas Tanghus");
48
49
  aboutData.addAuthor("Thomas Tanghus",0, "tanghus@kde.org");
50
  aboutData.addAuthor("John Califf",0, "jcaliff@compuzone.net");
51
  aboutData.addAuthor("Laurent Montel",0, "lmontel@mandrakesoft.com");
52
  aboutData.addAuthor("Aaron J. Seigo",0, "aseigo@olympusproject.org");
53
  aboutData.addCredit( "Nadeem Hasan", "Rewrote UI to use XMLGUI\n"
54
      "Lots of fixes and cleanup", "nhasan@nadmm.com" );
55
  aboutData.addCredit( "Adrian Page", I18N_NOOP("Bug fixes and GUI tidy up"),
56
      "Adrian.Page@tesco.net" );
57
  TDECmdLineArgs::init( argc, argv, &aboutData );
58
  TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
59
60
  TDEApplication a;
61
62
//  setSignalHandler(signalHandler);
63
64
  if (a.isRestored())
65
  {
66
    RESTORE(TDEIconEdit);
67
  }
68
  else
69
  {
70
    TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
71
    for(int i = 0; i < args->count(); i++)
72
    {
73
        TDEIconEdit *ki = new TDEIconEdit(args->url(i), "tdeiconedit");
74
        TQ_CHECK_PTR(ki);
75
    }
76
77
    if (args->count() == 0)
78
    {
79
        TDEIconEdit *ki = new TDEIconEdit;
80
        TQ_CHECK_PTR(ki);
81
    }
82
    args->clear();
83
  }
84
85
  int rc = a.exec();
86
  delete TDEIconEditProperties::self();
87
  return rc;
88
}
89
(-)tdegraphics/tdeiconedit/palettetoolbar.cpp (+178 lines)
Line 0 Link Here
1
/*
2
    tdeiconedit - a small graphics drawing program for the KDE
3
    Copyright ( C ) 1998  Thomas Tanghus (  tanghus@kde.org )
4
    Copyright ( C ) 2002  Nadeem Hasan (  nhasan@kde.org )
5
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public
8
    License as published by the Free Software Foundation; either
9
    version 2 of the License, or (  at your option ) any later version.
10
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
    General Public License for more details.
15
16
    You should have received a copy of the GNU Library General Public License
17
    along with this library; see the file COPYING.LIB.  If not, write to
18
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
    Boston, MA 02110-1301, USA.
20
*/
21
22
#include <tqlabel.h>
23
#include <tqlayout.h>
24
#include <tqwhatsthis.h>
25
#include <tqpainter.h>
26
27
#include <tdelocale.h>
28
#include <kdebug.h>
29
30
#include "tdeiconcolors.h"
31
#include "palettetoolbar.h"
32
33
PaletteToolBar::PaletteToolBar( TQWidget *parent, const char *name )
34
    : TDEToolBar( parent, name )
35
{
36
  TQWidget *base = new TQWidget( this );
37
38
  TQBoxLayout::Direction d = orientation() == Qt::Horizontal? 
39
      TQBoxLayout::LeftToRight : TQBoxLayout::TopToBottom;
40
  m_layout = new TQBoxLayout( base, d, 2, 6 );
41
42
  m_lblPreview = new TQLabel( base );
43
  m_lblPreview->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
44
  m_lblPreview->setFixedHeight( 64 );
45
  m_lblPreview->setAlignment( TQt::AlignHCenter|TQt::AlignVCenter );
46
  TQWhatsThis::add(m_lblPreview, i18n( "Preview\n\nThis is a 1:1 preview"
47
      " of the current icon" ) );
48
  m_layout->addWidget( m_lblPreview );
49
50
  m_currentColorView = new TQLabel( base );
51
  m_currentColorView->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
52
  m_currentColorView->setFixedHeight( 24 );
53
  m_currentColorView->setAlignment( TQt::AlignHCenter|TQt::AlignVCenter );
54
  TQWhatsThis::add(m_currentColorView, i18n( "Current color\n\nThis is the currently selected color" ) );
55
  m_layout->addWidget( m_currentColorView );
56
57
  TQVBoxLayout *vlayout = new TQVBoxLayout( m_layout, 0 );
58
  TQLabel *l = new TQLabel( i18n( "System colors:" ), base );
59
  vlayout->addWidget( l );
60
  m_sysColors = new KSysColors( base );
61
  TQWhatsThis::add(m_sysColors, i18n( "System colors\n\nHere you can select"
62
      " colors from the TDE icon palette" ) );
63
64
  vlayout->addWidget( m_sysColors );
65
66
  connect( m_sysColors, TQT_SIGNAL( newColor(uint) ), 
67
      TQT_SIGNAL( newColor(uint) ) );
68
69
  vlayout = new TQVBoxLayout( m_layout, 0 );
70
  l = new TQLabel( i18n( "Custom colors:" ), base );
71
  vlayout->addWidget( l );
72
  m_customColors = new KCustomColors( base );
73
  TQWhatsThis::add(m_customColors, i18n( "Custom colors\n\nHere you can"
74
      " build a palette of custom colors.\nDouble-click on a box to edit"
75
      " the color" ) );
76
77
  vlayout->addWidget( m_customColors );
78
79
  connect( m_customColors, TQT_SIGNAL( newColor(uint) ), 
80
      TQT_SIGNAL( newColor(uint) ) );
81
  connect( this, TQT_SIGNAL( newColor(uint)),
82
      this, TQT_SLOT(currentColorChanged(uint)));
83
  currentColorChanged(OPAQUE_MASK|0);
84
85
  setEnableContextMenu( false );
86
  setMovingEnabled( false );
87
}
88
89
void PaletteToolBar::setOrientation( Qt::Orientation o )
90
{
91
   if(  barPos() == Floating )
92
     o = o == Qt::Vertical ? Qt::Horizontal : Qt::Vertical;
93
94
  TQBoxLayout::Direction d = o == Qt::Horizontal? TQBoxLayout::LeftToRight
95
        : TQBoxLayout::TopToBottom;
96
  m_layout->setDirection( d );
97
98
  TQDockWindow::setOrientation( o );
99
}
100
101
void PaletteToolBar::previewChanged(  const TQPixmap &p )
102
{
103
  m_lblPreview->setPixmap( p );
104
}
105
106
void PaletteToolBar::addColors( uint n, uint *c )
107
{
108
    m_customColors->clear();
109
    for( uint i = 0; i < n; i++ )
110
        addColor( c[ i ] );
111
}
112
113
void PaletteToolBar::addColor( uint color )
114
{
115
    if( !m_sysColors->contains( color ) )
116
        m_customColors->addColor( color );
117
}
118
119
void PaletteToolBar::setPreviewBackground( TQPixmap pixmap )
120
{
121
    m_lblPreview->setBackgroundPixmap(pixmap);
122
}
123
124
void PaletteToolBar::setPreviewBackground( const TQColor& colour )
125
{
126
    m_lblPreview->setBackgroundColor(colour);
127
}
128
129
void PaletteToolBar::currentColorChanged(uint color)
130
{
131
  if(tqAlpha(color) == 255)
132
  {
133
    m_currentColorView->setBackgroundColor(color);
134
  }
135
  else
136
  {
137
    // Show the colour as if drawn over a checkerboard pattern
138
    const int squareWidth = 8;
139
    const uint lightColour = tqRgb(255, 255, 255);
140
    const uint darkColour = tqRgb(127, 127, 127);
141
142
    TQPixmap pm(2 * squareWidth, 2 * squareWidth);
143
    TQPainter p(&pm);
144
145
    double alpha = tqAlpha(color) / 255.0;
146
147
    int r = int(tqRed(color) * alpha + (1 - alpha) * tqRed(lightColour) + 0.5);
148
    int g = int(tqGreen(color) * alpha + (1 - alpha) * tqGreen(lightColour) + 0.5);
149
    int b = int(tqBlue(color) * alpha + (1 - alpha) * tqBlue(lightColour) + 0.5);
150
151
    uint squareColour = tqRgb(r, g, b);
152
153
    p.setPen(TQt::NoPen);
154
    p.setBrush(TQColor(squareColour));
155
    p.drawRect(0, 0, squareWidth, squareWidth);
156
    p.drawRect(squareWidth, squareWidth, squareWidth, squareWidth);
157
158
    r = int(tqRed(color) * alpha + (1 - alpha) * tqRed(darkColour) + 0.5);
159
    g = int(tqGreen(color) * alpha + (1 - alpha) * tqGreen(darkColour) + 0.5);
160
    b = int(tqBlue(color) * alpha + (1 - alpha) * tqBlue(darkColour) + 0.5);
161
162
    squareColour = tqRgb(r, g, b);
163
164
    p.setBrush(TQColor(squareColour));
165
    p.drawRect(squareWidth, 0, squareWidth, squareWidth);
166
    p.drawRect(0, squareWidth, squareWidth, squareWidth);
167
168
    p.end();
169
170
    m_currentColorView->setBackgroundPixmap(pm);
171
  }
172
}
173
174
#include "palettetoolbar.moc"
175
176
/* vim: et sw=2 ts=2
177
*/
178
(-)tdegraphics/tdeiconedit/palettetoolbar.h (+64 lines)
Line 0 Link Here
1
/*
2
    tdeiconedit - a small graphics drawing program for the KDE
3
    Copyright ( C ) 1998  Thomas Tanghus ( tanghus@kde.org )
4
    Copyright ( C ) 2002  Nadeem Hasan ( nhasan@kde.org )
5
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public
8
    License as published by the Free Software Foundation; either
9
    version 2 of the License, or ( at your option ) any later version.
10
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
    General Public License for more details.
15
16
    You should have received a copy of the GNU Library General Public License
17
    along with this library; see the file COPYING.LIB.  If not, write to
18
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
    Boston, MA 02110-1301, USA.
20
*/
21
22
#ifndef PALLETTETOOLBAR_H
23
#define PALLETTETOOLBAR_H
24
25
#include <tdetoolbar.h>
26
27
class TQBoxLayout;
28
class TQLabel;
29
class KSysColors;
30
class KCustomColors;
31
32
class PaletteToolBar : public TDEToolBar
33
{
34
  Q_OBJECT
35
  
36
37
  public:
38
    PaletteToolBar( TQWidget *parent, const char *name = 0L );
39
40
  signals:
41
    void newColor( uint c );
42
43
  public slots:
44
    virtual void setOrientation( Qt::Orientation o );
45
    void previewChanged( const TQPixmap &p );
46
    void addColors( uint n, uint *c );
47
    void addColor( uint color );
48
    void setPreviewBackground( TQPixmap pixmap );
49
    void setPreviewBackground( const TQColor& colour );
50
    void currentColorChanged(uint color);
51
52
  private:
53
    TQBoxLayout *m_layout;
54
    TQLabel *m_lblPreview;
55
    TQLabel *m_currentColorView;
56
    KSysColors *m_sysColors;
57
    KCustomColors *m_customColors;
58
};
59
60
#endif // PALLETTETOOLBAR_H
61
62
/* vim: et sw=2 ts=2
63
*/
64
(-)tdegraphics/tdeiconedit/pics/CMakeLists.txt (+15 lines)
Line 0 Link Here
1
#################################################
2
#
3
#  (C) 2010-2011 Calvin Morrison
4
#  mutantturkey@gmail.com
5
#
6
#  Improvements and feedback are welcome
7
#
8
#  This file is released under GPL >= 2
9
#
10
#################################################
11
12
add_subdirectory( icons )
13
add_subdirectory( toolbar )
14
15
tde_install_icons( tdeiconedit )
(-)tdegraphics/tdeiconedit/pics/Makefile.am (+5 lines)
Line 0 Link Here
1
2
SUBDIRS = icons toolbar 
3
4
KDE_ICON = tdeiconedit
5
(-)tdegraphics/tdeiconedit/pics/hi16-app-kiconedit.png (+6 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRóÿabKGD½½½iBÕ¨ÆIDATxڕ“Áƒ D?y–‘ì‚-!GÊ¡˜8ZÜS@) ]l«F™È³óÐÑ]ÌÝ¥•œh
4
h
5
Ú" úJø[ ék¡…Ìc€§‘]´â6=-áþ‘§A5g;*²dÎ9€ïù!tgҖ´Ú_µm×·­"ÐtÇêLàªÖ·Ô2(EðJ±S4±â¤›ˆ'°ëÄZðv•	ÅMÝ
6
È9Ç!æÑH<0†@d¬ûZ¦Ôžr3ãß F+ÕuCtEXtSoftware@(#)ImageMagick 4.2.7 99/07/01 cristy@mystic.es.dupont.comkÃ*tEXtSignature061696e793d83d89f2d332b61b03e37còZfIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/hi22-app-kiconedit.png (+9 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRÄ´l;gAMA±üabKGDÿÿÿ ½§“	pHYsd_‘ÝIDAT8Ë­“[O\U€¿}ΙÎ00´\l"áR
4
‘¶™p‰šÚ¦ÚjLjb…D‘4ñÁ„Æ? /Æ_Õ´EžŒÆÄBLZª¢RJ(0\Š(¡(w†™3ÃÌ0Üs|à@*—ú`W²’½³W¾µóíµáÙEPðy Ú¤Š.V|øÖ…a—S}ù™A?i83n½búo֙µÕ^ _ù_P»TÑ\_ÝrýÒ1Ïúàm:½“ãÎ$`(@&pÞª*J 4˜‹C`ì†:íRÅGuU-×/{â£mtެrÃËHÏlø0P\
5
²z·{|:;ۜó"t³Õd÷M+?m8=œh{Ï\ÿ8Ûüþua¾š'†AåvͶ
6
0
¤¥9/(*¯×ò2èú§ÍuU·š^+ñ$ÆÚ¹ÛïçËAFºfÍw“&ƒO‚M!D‰$D•niAI¤>Êp£——t³¸xFRÒ0ŒXŠM’›ë«¿hº\쉏¶Óñp(€<Mï\è¨=_‘¹ªEÍ¡ž>åÊ©
7
))»ùiÈkœÈu$S²òéíŠ=o…ß®)ɍß¡k8ÀWCûCwn|¢4_©©yÑðkhÓc”ç&ѝÏáO”JçNªvSÍ&/ÃmÏM	»nÒ󇯭‘ƒ¡;Žý+sS󬬮ã_1=;¢Èj.ëJ&ÚrˆŒœf¦Féû;›ÍuÏïÝ?jܟYdM‹ñ؜¦7µŸ´ôVÎââß:ο†ééý…©pE—‘¶i ó”P^:u’7¯ÖhH¶6®6ÆÑõeZZÆÅ‹i½ÛI<0‡šµHÖ:y¨}#8Ló?À‰x‚ÍD„X4J2aˆlMYxm‰%q›¢Ò	fæuÔÈH¿¬ù–Ðw"àރG¬:"¡
î
…ùFL˜½Ä•Dv@ÀFl>ˆúPÌB>#•5âÈLñ9:?ì;í¡ºñ!_ˆï\whXÙê¿x—U²€)$ŽSF!ànð-‘«$I  ¡ÈB²ÚÉÖ©ÍJù‰”¬°9ùùO¤nb¡(É9KǦ@ë
8
°ñ›ìL‡@—@U@ÛaÀ˜bIˆw+Þg½ÂÙÂÖ4Q´úB´/~ÍøD%
9
t*L ­@t/8Õåäp–!'p88݇BG¶©@º%YœÖ:HZûȾ>@÷z
‚"¢Q͜œìCÓâaö[¯ãF-Ùn`ذÎÂ2lnì«ýQ«ÉSFþÀÀ¼åd'þÒ̤­Z³ÙIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/hi32-app-kiconedit.png (+6 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDR"":GÂgAMA±üa	pHYsÒÝ~ü÷IDATxœÍ—MHadznP–¶I""K¬`/"R[—„xȃЭKv7tuˆ<%(mˆD®&±&Ѫøº›•¹•nn®J²¥î¼Ü]wöÓYmós˜ç}æ}óÌÿ}˜v‰¤ÿ°¦ˆµ¾.ݓ
—qõ6ãl®„J„·©Bû=á{X.„{X8›kEFŸ.¥½
4
ŠdVí¬¿ëaÈù	wni(! B¼0#òÏÀH{t††ì“<ïš%ýk„ ¤‰n¤	~}-v‰™EÕt­Ólu§mBŒv¢8Ÿ ¬‚¸ÓïWÍ^)âÂ]XHÐMí­‚Àñ8!Døˆñ¦"´xN,,’UdÓã݈±V”õÄ[Q''Q“	~%ƒÆ^ó>%.ì¬Y…Ò^µ1ւh±KI!@½}£l穘vñ6U@‘Œ°i¬
¶;’A„
5
1զȯD´Uªc•mˆúÀMG‹©®¾Å«eœ<wÕétÃt´AÀ4´+ÕfNœ7âëªG¸GٛÁ£>ßW’Žp¥æ‘@5zžPZVŽâõàù“cAOc¯¤¶Y‘ýg‹Xó-ñÙñÇb.®e#_–¹?"4A„'o¹_ɲŒÑh„Ñ~n6Üf¡ï¯_
05çÅóûÓÞYÞ¸`e%E!lêÉÕH$	ÆÇe²²Šé·Ìâóx‘ægèu~d1ó'‡N¯a0@Ã]ÕÜ[’¦O#˶—¿07urìÈ>¾~ùÁÅK^ŽÖ2S´R2ëœç-§
6
–¹VýCž—ƒCde¦¢©"V«•š+%%PR²ËÉÙ\ÜïO
Rû
؎’·x[„YM’)Ol1P«K ýC‹×Pç(ývzÜ6NIQ 묧>[¤4€íB³ÚÔ,&“D][3›óˆíÖ±ëD»³pÅ%Lã‘3qÑÓ}ö«4‚(	GwYwþÕRKzÎњIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/hi48-app-kiconedit.png (+5 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDR00Wù‡gAMA±üa	pHYsÒÝ~üEIDATxœí˜_L[UÇ?·÷Ú*´´!ÁÖ¸*S”¸³§ÅŠ‹Ì8âÃ6@Ý«1ÆEM4cYôÁÄ£Ks™›³ñÅ}0ÆA`„©3NÌDíøÓ9B	“Rh)ýw}¸£pזõÏÝڙ~“æ69çö|>çœû˹…rŠ¡ØYD^÷=…WwAò‰<öþ3OrñØ[ –J{äùž]PۈqɃñ‰·	Mý†iÛ°Ž»TW@N¸÷blxSžÅónÂgQéhNY‰Rî½–û1l~˜ð7]H",žwÓóâ&¦¯ª:—ÚJÂËÎ&bÇv‹C,_ŒJø—àR@¦g4רKiTð|¶II\ƒ_ˆ©á¤âñª"˧;aþóÎdÃñŸ×àß=§†µ@J‰Ê!…lE¾æÁø£#ÃCê
4
d‘3Ùø¥‡Ç²‚‡\žíەv)hæW“½€Í¦\µ‘È<ógÉr­BÚH¨áOt(4‡m³>ÙX,Êu½Dî")ðñ„R=ò‡\˨Å~ÿšDnQÁÇz;DH$àÓ!/xHÈXJ·]¸€Éd"¦…Û`ázøð'íH¢@ïùçȞÓé	œîkñ>¨¶_ñà_o‹ˆ¡½ÕËóÊ}½Ä‘VInßõ,áê͜M,}¼AÐéàèpað)7L|œøJ5¢Á‚h°$%ðûÐ[ 2"i•xü©V¨mD¬ÿG{ÐédNý*Ÿ» ®À`	Ñ&“	*ë@/ 7êØ÷üs¼w¸JG3ááp_ƒpÿ®
<äs˜‹CÀ‰ èL˜Íf"U
DõÉn;]mT:š‰ÎMž"Qد.jùæâãªíØl6ôF=ê•Ù¯°òÚËoòÁɯ‰ÎM
.2s×f‚Íü5r\SøüV%–uTUUA…¾dÓÓ[šY	ÌZXäŸÑs\ñxù{n†å;]\š>ƒ/$kýätmii¡®®§Ó	€ÃáÀjµ2ôáÚì
}Ÿ„ŸñßAxÁËÜÜeúþL¤¿pYîOßIpe<Žvt´ÓÝý$’då—wN‘Øô(÷ÿrÅãeÐs5	>ÿ€îtBw·6¿Ð¸Ýî¤ÀO¦»™þî,™ñ\žÅ?;©€×(àZ§`»ÝN8<…ÑèàW{éûò[šïåZ3Ãã´µ¥‚›Í…ŽºM^)C¡1ŒFG~ÇÎI†ÕðZ‚¯¦`¯×K4jÇç;Áþý“lݪîs3ÀW£É
5
C´µ¥¶ÝLx( ŒÞ‚äþ>П¡ŒºWf=H›rTíÊÐÖuƒ¶,SJl啲@±S(vþge´?½ƒË%pà€/mÛÁƒ66®£‡3´½‚uô¶ßBeb§,PìÜöe´œbç?¼ø™Í²žIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/icons/CMakeLists.txt (+12 lines)
Line 0 Link Here
1
#################################################
2
#
3
#  (C) 2010-2011 Calvin Morrison
4
#  mutantturkey@gmail.com
5
#
6
#  Improvements and feedback are welcome
7
#
8
#  This file is released under GPL >= 2
9
#
10
#################################################
11
12
install( FILES source.png standard.png compressed.png DESTINATION ${DATA_INSTALL_DIR}/tdeiconedit/pics )
(-)tdegraphics/tdeiconedit/pics/icons/Makefile.am (+5 lines)
Line 0 Link Here
1
pics_DATA = source.png \
2
	standard.png \
3
	compressed.png
4
5
picsdir = $(kde_datadir)/tdeiconedit/pics
(-)tdegraphics/tdeiconedit/pics/icons/compressed.png (+4 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDR  szzôbKGD½½½iBÕ¨BIDATxÚí–}ƒ Å_—ÝKÆÑÊɺ?壒e‹MšŒý½Ò§xâÇCöì­A#p‘At܆*õ©Hr3"Xu‹§
4
@Èw	ÞR@$š"â6\Bð²àw;'¢¸Óf¼gÃsæ×ÅÝ?,8e®î…+@ˆHf÷#pMH.à­O6pÎÖmF£	›K–ðe_ú!xíD_úžñÝpï	Þ·ÝODpÎÕr‘y}[ëÁaÖÿ ιªßöì‡[À¼Þ‚#l8ElàuE|ñ.dnç‰]Š“˜ÙySˆî9·l+›9ø(x¿–%Ô>ªŸ¯b‹L>Ô§"A8Ô¨Î9 H ïK	縚©NŽ}®x›™Ï|~IÃ͂7…Àpûl¸*7ŸóiB¾	â?âc½è|FÛØhCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturee93b73a5e466da157cb2558e6fa50c14wî µIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/icons/source.png (+4 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDR  szzôbKGD½½½iBÕ¨	IDATxÚí”[„ E¯³1peº´º²Î‡¨Ø)ÚVþƛ=§$
4
¼yó¦O¸w†pæ•={9sݧ;üTÔ!òD@…{E¢'ø²¬eR҅®D"ÍÎ#"^Sç@¸ó	3Ÿ™‰·‰À2­u™œ}ÿ
‰Ùe""9¯{Vþƒsu€“'йsRà¬IQO8	‘v÷­õ;øG7¼–2R™QÍúùq0Ï@Ο\-Àóly ºÉlbÇþ8æ[¸Ü`"€ÊLSë%$ü’©sU8ì"µ\ðց°ˆõÙïB"¸õà­Hî=¬Š!]"@¾T‹t¨óçùûQDóÛ>CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature19c861f09a8f9b0bd8500ca716d9500cƒ!®IEND®B`‚
(-)tdegraphics/tdeiconedit/pics/icons/standard.png (+5 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDR  szzôbKGD½½½iBÕ¨“IDATxÚí–ɍÃ0E?ӘUÈRŠKÑÁ…P•q–¬%¤{æÒû\ÄøÚ×î™>1b¦½îÀE¤^>†ë݄çˆÐúÊØˆ³R%øy`½"=xeš¯o|kF8OÂÙøžÅÏ
4
1à¬b{1MÌHÄBÙùŠ¥ìúB–àŸegN»%¶žsu0¸ÁŒá<d!zæ¤À+‘kžZ°Å™±Ö¬Pî~úBHç,xŽÕ‚®Ë՝ðÊqÛ&Uð,L³Ïj4Ë	ÅEc^^¨ežDlÛڎIm‘}ßS…DâÎ5ÓÎâ\ûšùŽƒ9c‰{UÎr^šá<òPH¯Z¤UÎÞµúÍ
5
9w€÷ǰW¥ÊÁÅ#!õ>™W"ÒÚÅs™ó•¹UvS@9€zo-=½Ì©7•…à¤g—–ͦ<Ç"ï¼ß?Kÿ¾â r÷c÷<ÿH­ô\5!EÙÝzÏy2pÓB¼?úð?Ì|¹"ÿ•¹-$f›Ö“{\‘»ð_—×)U??mCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturece7250189698bca9d2ddeab5c2c142afÏùaIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/logo.xpm (+137 lines)
Line 0 Link Here
1
/* XPM */
2
static const char *logo[]={
3
"260 87 47 1",
4
"J c #9e9e9e",
5
"b c #9f9f9f",
6
"f c #a0a0a0",
7
"I c #a1a1a1",
8
"c c #a2a2a2",
9
"B c #a3a3a3",
10
"G c #a4a4a4",
11
"O c #a5a5a5",
12
"a c #a6a6a6",
13
"v c #a7a7a7",
14
"N c #a8a8a8",
15
"R c #a9a9a9",
16
"z c #aaaaaa",
17
"p c #ababab",
18
"w c #acacac",
19
"t c #adadad",
20
"Q c #aeaeae",
21
"P c #afafaf",
22
"o c #b0b0b0",
23
"S c #b1b1b1",
24
"K c #b2b2b2",
25
"C c #b3b3b3",
26
"M c #b4b4b4",
27
"s c #b5b5b5",
28
"k c #b6b6b6",
29
"n c #b7b7b7",
30
"H c #b8b8b8",
31
"A c #b9b9b9",
32
"d c #bababa",
33
"u c #bbbbbb",
34
"x c #bcbcbc",
35
"l c #bdbdbd",
36
"q c #bebebe",
37
"r c #bfbfbf",
38
"e c #c0c0c0",
39
"D c #c1c1c1",
40
"E c #c2c2c2",
41
"L c #c3c3c3",
42
"F c #c4c4c4",
43
"i c #c5c5c5",
44
"h c #c6c6c6",
45
"# c #c7c7c7",
46
"j c #c8c8c8",
47
"y c #c9c9c9",
48
"g c #cacaca",
49
"m c #cbcbcb",
50
". c #cccccc",
51
"....................#abcdebfg.hbijklm...................................#abcdebfg.hbijklm...................................#abcdebfg.hbijklm...................................#abcdebfg.hbijklm...................................#abcdebfg.hbijklm...............",
52
"................gni.opqrcstbu..vd...................................gni.opqrcstbu..vd...................................gni.opqrcstbu..vd...................................gni.opqrcstbu..vd...................................gni.opqrcstbu..vd...................",
53
"................qbu.wk..qbxbv..y....................................qbu.wk..qbxbv..y....................................qbu.wk..qbxbv..y....................................qbu.wk..qbxbv..y....................................qbu.wk..qbxbv..y....................",
54
"........iszA....qB..svm..vsCbr.........Dd.sE................iszA....qB..svm..vsCbr.........Dd.sE................iszA....qB..svm..vsCbr.........Dd.sE................iszA....qB..svm..vsCbr.........Dd.sE................iszA....qB..svm..vsCbr.........Dd.sE........",
55
"........sbbl.#..Ffg.jGog.zp.l#.........jh.Hp................sbbl.#..Ffg.jGog.zp.l#.........jh.Hp................sbbl.#..Ffg.jGog.zp.l#.........jh.Hp................sbbl.#..Ffg.jGog.zp.l#.........jh.Hp................sbbl.#..Ffg.jGog.zp.l#.........jh.Hp........",
56
".....dm.obbFmfH.mBu..iaIvbq...............yIE............dm.obbFmfH.mBu..iaIvbq...............yIE............dm.obbFmfH.mBu..iaIvbq...............yIE............dm.obbFmfH.mBu..iaIvbq...............yIE............dm.obbFmfH.mBu..iaIvbq...............yIE.......",
57
"...#pbu.pbJg.CbE.sGg.AKunL.................MNrKj.......#pbu.pbJg.CbE.sGg.AKunL.................MNrKj.......#pbu.pbJg.CbE.sGg.AKunL.................MNrKj.......#pbu.pbJg.CbE.sGg.AKunL.................MNrKj.......#pbu.pbJg.CbE.sGg.AKunL.................MNrKj....",
58
"...EJbGmabB..ycp.#ONHBE....................#ffHg.......EJbGmabB..ycp.#ONHBE....................#ffHg.......EJbGmabB..ycp.#ONHBE....................#ffHg.......EJbGmabB..ycp.#ONHBE....................#ffHg.......EJbGmabB..ycp.#ONHBE....................#ffHg....",
59
"....PbbHfbGh..xbHDOswq..............NF......acg.........PbbHfbGh..xbHDOswq..............NF......acg.........PbbHfbGh..xbHDOswq..............NF......acg.........PbbHfbGh..xbHDOswq..............NF......acg.........PbbHfbGh..xbHDOswq..............NF......acg.....",
60
".hDixfbcbbbbwD.nbbz.................pp......jGC......hDixfbcbbbbwD.nbbz.................pp......jGC......hDixfbcbbbbwD.nbbz.................pp......jGC......hDixfbcbbbbwD.nbbz.................pp......jGC......hDixfbcbbbbwD.nbbz.................pp......jGC.....",
61
".KbbpsbbfBbbbbNuLqg.................lbr..CF..rfE.....KbbpsbbfBbbbbNuLqg.................lbr..CF..rfE.....KbbpsbbfBbbbbNuLqg.................lbr..CF..rfE.....KbbpsbbfBbbbbNuLqg.................lbr..CF..rfE.....KbbpsbbfBbbbbNuLqg.................lbr..CF..rfE....",
62
".QbbAgGbbuAObbbQm...................gBOm.PB#..KOg....QbbAgGbbuAObbbQm...................gBOm.PB#..KOg....QbbAgGbbuAObbbQm...................gBOm.PB#..KOg....QbbAgGbbuAObbbQm...................gBOm.PB#..KOg....QbbAgGbbuAObbbQm...................gBOm.PB#..KOg...",
63
"..qIF.lbbOgmlNzg....................yvbn.hfP..#ONg....qIF.lbbOgmlNzg....................yvbn.hfP..#ONg....qIF.lbbOgmlNzg....................yvbn.hfP..#ONg....qIF.lbbOgmlNzg....................yvbn.hfP..#ONg....qIF.lbbOgmlNzg....................yvbn.hfP..#ONg..",
64
"...vx..Rbbn.npwA....................MGGIj.MfFmvqbL.....vx..Rbbn.npwA....................MGGIj.MfFmvqbL.....vx..Rbbn.npwA....................MGGIj.MfFmvqbL.....vx..Rbbn.npwA....................MGGIj.MfFmvqbL.....vx..Rbbn.npwA....................MGGIj.MfFmvqbL..",
65
"..HJo..LbbNmObbr................#y..anebS.gRcSbyrm....HJo..LbbNmObbr................#y..anebS.gRcSbyrm....HJo..LbbNmObbr................#y..anebS.gRcSbyrm....HJo..LbbNmObbr................#y..anebS.gRcSbyrm....HJo..LbbNmObbr................#y..anebS.gRcSbyrm..",
66
".Lbbbl..SMyQQEqy...............sbBj.Od.nJA.gKvn......Lbbbl..SMyQQEqy...............sbBj.Od.nJA.gKvn......Lbbbl..SMyQQEqy...............sbBj.Od.nJA.gKvn......Lbbbl..SMyQQEqy...............sbBj.Od.nJA.gKvn......Lbbbl..SMyQQEqy...............sbBj.Od.nJA.gKvn.....",
67
"..wpMGPrLdNbL.................yflad.to.ibbvRq.........wpMGPrLdNbL.................yflad.to.ibbvRq.........wpMGPrLdNbL.................yflad.to.ibbvRq.........wpMGPrLdNbL.................yflad.to.ibbvRq.........wpMGPrLdNbL.................yflad.to.ibbvRq.......",
68
".....ubbNpbbM..............Dnhibmwn.lfEhbsul.............ubbNpbbM..............Dnhibmwn.lfEhbsul.............ubbNpbbM..............Dnhibmwn.lfEhbsul.............ubbNpbbM..............Dnhibmwn.lfEhbsul.............ubbNpbbM..............Dnhibmwn.lfEhbsul........",
69
".....sbBg.KJC...........DFiIQBEbjOq..PINOm...............sbBg.KJC...........DFiIQBEbjOq..PINOm...............sbBg.KJC...........DFiIQBEbjOq..PINOm...............sbBg.KJC...........DFiIQBEbjOq..PINOm...............sbBg.KJC...........DFiIQBEbjOq..PINOm..........",
70
".....Fkd..mxF...........qzAz.Cazvcg..QtKh................Fkd..mxF...........qzAz.Cazvcg..QtKh................Fkd..mxF...........qzAz.Cazvcg..QtKh................Fkd..mxF...........qzAz.Cazvcg..QtKh................Fkd..mxF...........qzAz.Cazvcg..QtKh...........",
71
"...........rL...........gbvQ.gGHBOiiwOy........................rL...........gbvQ.gGHBOiiwOy........................rL...........gbvQ.gGHBOiiwOy........................rL...........gbvQ.gGHBOiiwOy........................rL...........gbvQ.gGHBOiiwOy.............",
72
".....................LHL.wbO..dOiNbfoj...................................LHL.wbO..dOiNbfoj...................................LHL.wbO..dOiNbfoj...................................LHL.wbO..dOiNbfoj...................................LHL.wbO..dOiNbfoj..............",
73
"....................EIbcPFfJ#.yfD.E#....................................EIbcPFfJ#.yfD.E#....................................EIbcPFfJ#.yfD.E#....................................EIbcPFfJ#.yfD.E#....................................EIbcPFfJ#.yfD.E#................",
74
"................jwe.QKyjvwKbk..Pr...................................jwe.QKyjvwKbk..Pr...................................jwe.QKyjvwKbk..Pr...................................jwe.QKyjvwKbk..Pr...................................jwe.QKyjvwKbk..Pr...................",
75
"..........mj....lbD.tM..FbxbBm................................mj....lbD.tM..FbxbBm................................mj....lbD.tM..FbxbBm................................mj....lbD.tM..FbxbBm................................mj....lbD.tM..FbxbBm......................",
76
"........ezfH....rB..ABy..RKlfl.........qs.Pl................ezfH....rB..ABy..RKlfl.........qs.Pl................ezfH....rB..ABy..RKlfl.........qs.Pl................ezfH....rB..ABy..RKlfl.........qs.Pl................ezfH....rB..ABy..RKlfl.........qs.Pl........",
77
"........Mbbrmxm.#bj.mpvEyvw.#m..........m.la................Mbbrmxm.#bj.mpvEyvw.#m..........m.la................Mbbrmxm.#bj.mpvEyvw.#m..........m.la................Mbbrmxm.#bj.mpvEyvw.#m..........m.la................Mbbrmxm.#bj.mpvEyvw.#m..........m.la........",
78
"....jQy.Qbbi.BQ..as..htfbci...............mOx...........jQy.Qbbi.BQ..as..htfbci...............mOx...........jQy.Qbbi.BQ..as..htfbci...............mOx...........jQy.Qbbi.BQ..as..htfbci...............mOx...........jQy.Qbbi.BQ..as..htfbci...............mOx.......",
79
"...LBbs.Rbfg.dbx.xfF.ssiEm.................AGMa#.......LBbs.Rbfg.dbx.xfF.ssiEm.................AGMa#.......LBbs.Rbfg.dbx.xfF.ssiEm.................AGMa#.......LBbs.Rbfg.dbx.xfF.ssiEm.................AGMa#.......LBbs.Rbfg.dbx.xfF.ssiEm.................AGMa#....",
80
"...hIbIjGbO..mvOmhNIwBh.............#......gfIE........hIbIjGbO..mvOmhNIwBh.............#......gfIE........hIbIjGbO..mvOmhNIwBh.............#......gfIE........hIbIjGbO..mvOmhNIwBh.............#......gfIE........hIbIjGbO..mvOmhNIwBh.............#......gfIE.....",
81
"....kbbKfbcum.LftABDnh..............Bq......wIh.........kbbKfbcum.LftABDnh..............Bq......wIh.........kbbKfbcum.LftABDnh..............Bq......wIh.........kbbKfbcum.LftABDnh..............Bq......wIh.........kbbKfbcum.LftABDnh..............Bq......wIh.....",
82
".DkAkGbbbbbbBkjeGbC.................Qam.....gRw......DkAkGbbbbbbBkjeGbC.................Qam.....gRw......DkAkGbbbbbbBkjeGbC.................Qam.....gRw......DkAkGbbbbbbBkjeGbC.................Qam.....gRw......DkAkGbbbbbbBkjeGbC.................Qam.....gRw.....",
83
".PbbQxbbfzJbbbfomy..................DbH..zx..iIu.....PbbQxbbfzJbbbfomy..................DbH..zx..iIu.....PbbQxbbfzJbbbfomy..................DbH..zx..iIu.....PbbQxbbfzJbbbfomy..................DbH..zx..iIu.....PbbQxbbfzJbbbfomy..................DbH..zx..iIu....",
84
".kIbl.zbbkFofbbn.....................vIj.MbE..AIi....kIbl.zbbkFofbbn.....................vIj.MbE..AIi....kIbl.zbbkFofbbn.....................vIj.MbE..AIi....kIbl.zbbkFofbbn.....................vIj.MbE..AIi....kIbl.zbbkFofbbn.....................vIj.MbE..AIi...",
85
"..#BF.LbbI#.FCCy....................hBbK.yBz..Epcy....#BF.LbbI#.FCCy....................hBbK.yBz..Epcy....#BF.LbbI#.FCCy....................hBbK.yBz..Epcy....#BF.LbbI#.FCCy....................hBbK.yBz..Epcy....#BF.LbbI#.FCCy....................hBbK.yBz..Epcy..",
86
"..mOA..obbo.KIOH....................QRRbL.ubxgBLfF....mOA..obbo.KIOH....................QRRbL.ubxgBLfF....mOA..obbo.KIOH....................QRRbL.ubxgBLfF....mOA..obbo.KIOH....................QRRbL.ubxgBLfF....mOA..obbo.KIOH....................QRRbL.ubxgBLfF..",
87
".gQbp..#IbojcfbD...............mlD..OAiBz..Kbvfyy....gQbp..#IbojcfbD...............mlD..OAiBz..Kbvfyy....gQbp..#IbojcfbD...............mlD..OAiBz..Kbvfyy....gQbp..#IbojcfbD...............mlD..OAiBz..Kbvfyy....gQbp..#IbojcfbD...............mlD..OAiBz..Kbvfyy...",
88
".LbbbKm.dr#ak.ym...............pcbF.OA.ubQygxKD......LbbbKm.dr#ak.ym...............pcbF.OA.ubQygxKD......LbbbKm.dr#ak.ym...............pcbF.OA.ubQygxKD......LbbbKm.dr#ak.ym...............pcbF.OA.ubQygxKD......LbbbKm.dr#ak.ym...............pcbF.OA.ubQygxKD.....",
89
"..nkrpGMnPIbD.................#bFRA.Sw.#bfbIe.........nkrpGMnPIbD.................#bFRA.Sw.#bfbIe.........nkrpGMnPIbD.................#bFRA.Sw.#bfbIe.........nkrpGMnPIbD.................#bFRA.Sw.#bfbIe.........nkrpGMnPIbD.................#bFRA.Sw.#bfbIe.......",
90
".....dbbCkfbS..............kpqib.wH.EfdLbeh#.............dbbCkfbS..............kpqib.wH.EfdLbeh#.............dbbCkfbS..............kpqib.wH.EfdLbeh#.............dbbCkfbS..............kpqib.wH.EfdLbeh#.............dbbCkfbS..............kpqib.wH.EfdLbeh#........",
91
".....Mbv..xBx...........xqEIdIlfLBD..kJfp................Mbv..xBx...........xqEIdIlfLBD..kJfp................Mbv..xBx...........xqEIdIlfLBD..kJfp................Mbv..xBx...........xqEIdIlfLBD..kJfp................Mbv..xBx...........xqEIdIlfLBD..kJfp...........",
92
".....gDE...ur...........EOnw.uBofGm.yakqm................gDE...ur...........EOnw.uBofGm.yakqm................gDE...ur...........EOnw.uBofGm.yakqm................gDE...ur...........EOnw.uBofGm.yakqm................gDE...ur...........EOnw.uBofGm.yakqm...........",
93
"...........hj...........mIcw..NsRcAABtm........................hj...........mIcw..NsRcAABtm........................hj...........mIcw..NsRcAABtm........................hj...........mIcw..NsRcAABtm........................hj...........mIcw..NsRcAABtm.............",
94
".....................dtngCbB..rByMfvx....................................dtngCbB..rByMfvx....................................dtngCbB..rByMfvx....................................dtngCbB..rByMfvx....................................dtngCbB..rByMfvx...............",
95
".................m..uINROFBbL.gIl....................................m..uINROFBbL.gIl....................................m..uINROFBbL.gIl....................................m..uINROFBbL.gIl....................................m..uINROFBbL.gIl...................",
96
"................FId.ws.mPOkbK..AL...................................FId.ws.mPOkbK..AL...................................FId.ws.mPOkbK..AL...................................FId.ws.mPOkbK..AL...................................FId.ws.mPOkbK..AL...................",
97
".........gDL....lI#.oS..jIdcIj.........gj.Fg.................gDL....lI#.oS..jIdcIj.........gj.Fg.................gDL....lI#.oS..jIdcIj.........gj.Fg.................gDL....lI#.oS..jIdcIj.........gj.Fg.................gDL....lI#.oS..jIdcIj.........gj.Fg........",
98
"........dfbd....Dc..qfL..pPivr.........rH.ok................dfbd....Dc..qfL..pPivr.........rH.ok................dfbd....Dc..qfL..pPivr.........rH.ok................dfbd....Dc..qfL..pPivr.........rH.ok................dfbd....Dc..qfL..pPivr.........rH.ok........",
99
".....m..Cbbemoj.ybi..sInlGP...............Dcg............m..Cbbemoj.ybi..sInlGP...............Dcg............m..Cbbemoj.ybi..sInlGP...............Dcg............m..Cbbemoj.ybi..sInlGP...............Dcg............m..Cbbemoj.ybi..sInlGP...............Dcg.......",
100
"....eGh.Qbb#.vvg.zP..LoOfwy................Rs.j.........eGh.Qbb#.vvg.zP..LoOfwy................Rs.j.........eGh.Qbb#.vvg.zP..LoOfwy................Rs.j.........eGh.Qbb#.vvg.zP..LoOfwy................Rs.j.........eGh.Qbb#.vvg.zP..LoOfwy................Rs.j.....",
101
"...rbbP.RbI..ebk.Ebx.QH....................qfNB#.......rbbP.RbI..ebk.Ebx.QH....................qfNB#.......rbbP.RbI..ebk.Ebx.QH....................qfNB#.......rbbP.RbI..ebk.Ebx.QH....................qfNB#.......rbbP.RbI..ebk.Ebx.QH....................qfNB#....",
102
"...gGbbFBbv...tcjiRIcRg.............lm.....mIBy........gGbbFBbv...tcjiRIcRg.............lm.....mIBy........gGbbFBbv...tcjiRIcRg.............lm.....mIBy........gGbbFBbv...tcjiRIcRg.............lm.....mIBy........gGbbFBbv...tcjiRIcRg.............lm.....mIBy.....",
103
"....ubbpbbbPL.jGGPByLm..............GH......kbD.........ubbpbbbPL.jGGPByLm..............GH......kbD.........ubbpbbbPL.jGGPByLm..............GH......kbD.........ubbpbbbPL.jGGPByLm..............GH......kbD.........ubbpbbbPL.jGGPByLm..............GH......kbD.....",
104
".uzQQRbbbbbbbzq#PNx.................Ccj..#...oag.....uzQQRbbbbbbbzq#PNx.................Ccj..#...oag.....uzQQRbbbbbbbzq#PNx.................Ccj..#...oag.....uzQQRbbbbbbbzq#PNx.................Ccj..#...oag.....uzQQRbbbbbbbzq#PNx.................Ccj..#...oag....",
105
".wbbSEJbfCBbbbbvm...................ibS..vK..yGC.....wbbSEJbfCBbbbbvm...................ibS..vK..yGC.....wbbSEJbfCBbbbbvm...................ibS..vK..yGC.....wbbSEJbfCBbbbbvm...................ibS..vK..yGC.....wbbSEJbfCBbbbbvm...................ibS..vK..yGC....",
106
".rNbD.obbSmuabbe.....................pbF.dbx..ebl....rNbD.obbSmuabbe.....................pbF.dbx..ebl....rNbD.obbSmuabbe.....................pbF.dbx..ebl....rNbD.obbSmuabbe.....................pbF.dbx..ebl....rNbD.obbSmuabbe.....................pbF.dbx..ebl...",
107
"...OD.#IbbL.LnnL....................ebbp.mvOmmdKb#.....OD.#IbbL.LnnL....................ebbp.mvOmmdKb#.....OD.#IbbL.LnnL....................ebbp.mvOmmdKb#.....OD.#IbbL.LnnL....................ebbp.mvOmmdKb#.....OD.#IbbL.LnnL....................ebbp.mvOmmdKb#..",
108
"..jBk..nbbz.Qbbd....................pPobq.EbK#fhRh....jBk..nbbz.Qbbd....................pPobq.EbK#fhRh....jBk..nbbz.Qbbd....................pPobq.EbK#fhRh....jBk..nbbz.Qbbd....................pPobq.EbK#fhRh....jBk..nbbz.Qbbd....................pPobq.EbK#fhRh..",
109
".#abay.gOIxEBpvF...............hSn..GdyROy.xIbGg.....#abay.gOIxEBpvF...............hSn..GdyROy.xIbGg.....#abay.gOIxEBpvF...............hSn..GdyROy.xIbGg.....#abay.gOIxEBpvF...............hSn..GdyROy.xIbGg.....#abay.gOIxEBpvF...............hSn..GdyROy.xIbGg....",
110
".#IbbRF.EhqIq.................mOzfe.Nk.rbOqeDqy......#IbbRF.EhqIq.................mOzfe.Nk.rbOqeDqy......#IbbRF.EhqIq.................mOzfe.Nk.rbOqeDqy......#IbbRF.EhqIq.................mOzfe.Nk.rbOqeDqy......#IbbRF.EhqIq.................mOzfe.Nk.rbOqeDqy.....",
111
"..eEgKbNpGbbl...............m.hbjpH.MvmjbOOaF.........eEgKbNpGbbl...............m.hbjpH.MvmjbOOaF.........eEgKbNpGbbl...............m.hbjpH.MvmjbOOaF.........eEgKbNpGbbl...............m.hbjpH.MvmjbOOaF.........eEgKbNpGbbl...............m.hbjpH.MvmjbOOaF.......",
112
".....HbbqDBbt...........m.mpfMhbmpA.#cPdbi...............HbbqDBbt...........m.mpfMhbmpA.#cPdbi...............HbbqDBbt...........m.mpfMhbmpA.#cPdbi...............HbbqDBbt...........m.mpfMhbmpA.#cPdbi...............HbbqDBbt...........m.mpfMhbmpA.#cPdbi..........",
113
".....Hfw..Lti...........dkqGiOsIAfF..AfbM................Hfw..Lti...........dkqGiOsIAfF..AfbM................Hfw..Lti...........dkqGiOsIAfF..AfbM................Hfw..Lti...........dkqGiOsIAfF..AfbM................Hfw..Lti...........dkqGiOsIAfF..AfbM...........",
114
"......gj...nx...........hIKQ.Efkbv..Ecey..................gj...nx...........hIKQ.Efkbv..Ecey..................gj...nx...........hIKQ.Efkbv..Ecey..................gj...nx...........hIKQ.Efkbv..Ecey..................gj...nx...........hIKQ.Efkbv..Ecey............",
115
"...........m............mBbz..QoCbQQfH.........................m............mBbz..QoCbQQfH.........................m............mBbz..QoCbQQfH.........................m............mBbz..QoCbQQfH.........................m............mBbz..QoCbQQfH..............",
116
"....................mPIwFdbIm.EfjrpKh...................................mPIwFdbIm.EfjrpKh...................................mPIwFdbIm.EfjrpKh...................................mPIwFdbIm.EfjrpKh...................................mPIwFdbIm.EfjrpKh...............",
117
".................Eg.saCMfqvbr.mBd....................................Eg.saCMfqvbr.mBd....................................Eg.saCMfqvbr.mBd....................................Eg.saCMfqvbr.mBd....................................Eg.saCMfqvbr.mBd...................",
118
"................ebH.pn..ncdbw..Dy...................................ebH.pn..ncdbw..Dy...................................ebH.pn..ncdbw..Dy...................................ebH.pn..ncdbw..Dy...................................ebH.pn..ncdbw..Dy...................",
119
"........gekq....lcm.Kw..mGHNbL.........hD.l#................gekq....lcm.Kw..mGHNbL.........hD.l#................gekq....lcm.Kw..mGHNbL.........hD.l#................gekq....lcm.Kw..mGHNbL.........hD.l#................gekq....lcm.Kw..mGHNbL.........hD.l#........",
120
"........nbbx....Lfm.Ffd..ptmKL.........Lr.Co................nbbx....Lfm.Ffd..ptmKL.........Lr.Co................nbbx....Lfm.Ffd..ptmKL.........Lr.Co................nbbx....Lfm.Ffd..ptmKL.........Lr.Co................nbbx....Lfm.Ffd..ptmKL.........Lr.Co........",
121
".....F..SbbEmOD.gfe..rIpKfk...............hf#............F..SbbEmOD.gfe..rIpKfk...............hf#............F..SbbEmOD.gfe..rIpKfk...............hf#............F..SbbEmOD.gfe..rIpKfk...............hf#............F..SbbEmOD.gfe..rIpKfk...............hf#.......",
122
"...msbD.wbbj.tc#.PR..qoowHm................PPylg.......msbD.wbbj.tc#.PR..qoowHm................PPylg.......msbD.wbbj.tc#.PR..qoowHm................PPylg.......msbD.wbbj.tc#.PR..qoowHm................PPylg.......msbD.wbbj.tc#.PR..qoowHm................PPylg....",
123
"...rbbR.vbc..hfo.hcSLNl....................Lbfwj.......rbbR.vbc..hfo.hcSLNl....................Lbfwj.......rbbR.vbc..hfo.hcSLNl....................Lbfwj.......rbbR.vbc..hfo.hcSLNl....................Lbfwj.......rbbR.vbc..hfo.hcSLNl....................Lbfwj....",
124
"....Nbbqcbvm..MbELNzIM..............Kj......BBm.........Nbbqcbvm..MbELNzIM..............Kj......BBm.........Nbbqcbvm..MbELNzIM..............Kj......BBm.........Nbbqcbvm..MbELNzIM..............Kj......BBm.........Nbbqcbvm..MbELNzIM..............Kj......BBm.....",
125
".g..qJbObbbOAymwbaO.................vS......rfd......g..qJbObbbOAymwbaO.................vS......rfd......g..qJbObbbOAymwbaO.................vS......rfd......g..qJbObbbOAymwbaO.................vS......rfd......g..qJbObbbOAymwbaO.................vS......rfd.....",
126
".sbcpobbJbbbbICidCi.................HbF..ly..nI#.....sbcpobbJbbbbICidCi.................HbF..ly..nI#.....sbcpobbJbbbbICidCi.................HbF..ly..nI#.....sbcpobbJbbbbICidCi.................HbF..ly..nI#.....sbcpobbJbbbbICidCi.................HbF..ly..nI#....",
127
".zbbkjIbbdQbbbbvm...................jfp..zRg.mzp.....zbbkjIbbdQbbbbvm...................jfp..zRg.mzp.....zbbkjIbbdQbbbbvm...................jfp..zRg.mzp.....zbbkjIbbdQbbbbvm...................jfp..zRg.mzp.....zbbkjIbbdQbbbbvm...................jfp..zRg.mzp....",
128
".jCfL.kbbz.hSfGh....................mzbq.Dbs..hIK....jCfL.kbbz.hSfGh....................mzbq.Dbs..hIK....jCfL.kbbz.hSfGh....................mzbq.Dbs..hIK....jCfL.kbbz.hSfGh....................mzbq.Dbs..hIK....jCfL.kbbz.hSfGh....................mzbq.Dbs..hIK...",
129
"...vq.gGbbq.qMCl....................dffOm.tIjmoAbi.....vq.gGbbq.qMCl....................dffOm.tIjmoAbi.....vq.gGbbq.qMCl....................dffOm.tIjmoAbi.....vq.gGbbq.qMCl....................dffOm.tIjmoAbi.....vq.gGbbq.qMCl....................dffOm.tIjmoAbi..",
130
"..EIM..lbbv.Rbbl....................NMHbn.#cRxb#Mj....EIM..lbbv.Rbbl....................NMHbn.#cRxb#Mj....EIM..lbbv.Rbbl....................NMHbn.#cRxb#Mj....EIM..lbbv.Rbbl....................NMHbn.#cRxb#Mj....EIM..lbbv.Rbbl....................NMHbn.#cRxb#Mj..",
131
".iIbIL..zNiAvnKj...............qapm.GumoIL.Fvbwm.....iIbIL..zNiAvnKj...............qapm.GumoIL.Fvbwm.....iIbIL..zNiAvnKj...............qapm.GumoIL.Fvbwm.....iIbIL..zNiAvnKj...............qapm.GumoIL.Fvbwm.....iIbIL..zNiAvnKj...............qapm.GumoIL.Fvbwm....",
132
".gGIRBdgjiCbE.................gICBx.zM.EbfKsDy.......gGIRBdgjiCbE.................gICBx.zM.EbfKsDy.......gGIRBdgjiCbE.................gICBx.zM.EbfKsDy.......gGIRBdgjiCbE.................gICBx.zM.EbfKsDy.......gGIRBdgjiCbE.................gICBx.zM.EbfKsDy......",
133
"..jm.HbbIIbbA..............jEmibgwn.HBjjbwoKy.........jm.HbbIIbbA..............jEmibgwn.HBjjbwoKy.........jm.HbbIIbbA..............jEmibgwn.HBjjbwoKy.........jm.HbbIIbbA..............jEmibgwn.HBjjbwoKy.........jm.HbbIIbbA..............jEmibgwn.HBjjbwoKy.......",
134
".....kbIygRbt...........hyyBGRFbgRu.gvvoIy...............kbIygRbt...........hyyBGRFbgRu.gvvoIy...............kbIygRbt...........hyyBGRFbgRu.gvvoIy...............kbIygRbt...........hyyBGRFbgRu.gvvoIy...............kbIygRbt...........hyyBGRFbgRu.gvvoIy..........",
135
".....qzK..ykj...........uouvmptOPf#..kvvl................qzK..ykj...........uouvmptOPf#..kvvl................qzK..ykj...........uouvmptOPf#..kvvl................qzK..ykj...........uouvmptOPf#..kvvl................qzK..ykj...........uouvmptOPf#..kvvl...........",
136
"...........Aq...........ybtQ.#fHfvmmnIi........................Aq...........ybtQ.#fHfvmmnIi........................Aq...........ybtQ.#fHfvmmnIi........................Aq...........ybtQ.#fHfvmmnIi........................Aq...........ybtQ.#fHfvmmnIi.............",
137
".....................yLmmvbN..MplIBBaE...................................yLmmvbN..MplIBBaE...................................yLmmvbN..MplIBBaE...................................yLmmvbN..MplIBBaE...................................yLmmvbN..MplIBBaE.............."};
(-)tdegraphics/tdeiconedit/pics/toolbar/CMakeLists.txt (+20 lines)
Line 0 Link Here
1
#################################################
2
#
3
#  (C) 2010-2011 Calvin Morrison
4
#  mutantturkey@gmail.com
5
#
6
#  Improvements and feedback are welcome
7
#
8
#  This file is released under GPL >= 2
9
#
10
#################################################
11
12
install( FILES
13
    fileclose.png circle.png filledcircle.png line.png
14
    paintbrush-cursor.xpm airbrush-cursor.xpm ellipse.png
15
    filledellipse.png rectangle.png filledrectangle.png areaselect.png
16
    selectrect.png selectcircle.png fill-cursor.xpm grid.png pointer.png
17
    aim.png aim-cursor.xpm window_new.png grayscale.png kdepalette.png
18
    transform.png eraser-cursor.xpm colorpicker-cursor.xpm
19
  DESTINATION ${DATA_INSTALL_DIR}/tdeiconedit/pics
20
)
(-)tdegraphics/tdeiconedit/pics/toolbar/Makefile.am (+28 lines)
Line 0 Link Here
1
toolbar_DATA =	fileclose.png \
2
	circle.png \
3
	filledcircle.png \
4
	line.png \
5
	paintbrush-cursor.xpm \
6
	airbrush-cursor.xpm \
7
	ellipse.png \
8
	filledellipse.png \
9
	rectangle.png \
10
	filledrectangle.png \
11
	areaselect.png \
12
	selectrect.png \
13
	selectcircle.png \
14
	fill-cursor.xpm \
15
	grid.png \
16
	pointer.png \
17
	aim.png \
18
    aim-cursor.xpm \
19
	window_new.png \
20
	grayscale.png \
21
	kdepalette.png \
22
	transform.png \
23
    eraser-cursor.xpm \
24
	colorpicker-cursor.xpm
25
26
27
28
toolbardir = $(kde_datadir)/tdeiconedit/pics
(-)tdegraphics/tdeiconedit/pics/toolbar/aim-cursor.xpm (+28 lines)
Line 0 Link Here
1
/* XPM */
2
static char *aim[]={
3
"22 22 3 1",
4
". c None",
5
"a c #000000",
6
"# c #ffffff",
7
"......................",
8
"..........#...........",
9
".........#a#..........",
10
".........#a#..........",
11
".........#a#..........",
12
".........#a#..........",
13
".........#a#..........",
14
".........#a#..........",
15
".........#a#..........",
16
"..#######...#######...",
17
".#aaaaaaa...aaaaaaa#..",
18
"..#######...#######...",
19
"..........a...........",
20
".........#a#..........",
21
".........#a#..........",
22
".........#a#..........",
23
".........#a#..........",
24
".........#a#..........",
25
".........#a#..........",
26
"..........#...........",
27
"......................",
28
"......................"};
(-)tdegraphics/tdeiconedit/pics/toolbar/aim.png (+3 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRÄ´l;bKGD½½½iBÕ¨_IDATxÚc`¶àÀÿÚ
¤–ÐÌÅ$ÌD+W0’áZbõøO¢8ÀÖN¡±ÿŸÍÿþÃR©éœlӊT182Ñ744ÐÊ
4C¯<4M#&ÄuCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature7739b802f8b8b6e63dca2996176cc6c4Œ>ÈIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/airbrush-cursor.xpm (+35 lines)
Line 0 Link Here
1
/* XPM */
2
static char *airbrush[]={
3
"22 22 10 1",
4
". c None",
5
"a c #000000",
6
"d c #2a2a2a",
7
"g c #303030",
8
"c c #444444",
9
"h c #555555",
10
"f c #808080",
11
"b c #aaaaaa",
12
"e c #c8c8c8",
13
"# c #ffffff",
14
"..................#aa#",
15
".................#abca",
16
"................#abcca",
17
"...####........#abccda",
18
"..#aaaa#......#abccda#",
19
".#a####a#....#abccda#.",
20
".#a#eeba#...#abccda#..",
21
".#a#eeba#..#abccda#...",
22
".#a#eeba#.#abccda#....",
23
".#a#eeba##abccda#.....",
24
".#a#ebba#abccda#......",
25
".#a#bbbfaeccda#.......",
26
"..#a#bfgaebda#.#####..",
27
"..#a#bfaebffa##ddddd#.",
28
"...#afaebbfa##ddaaada#",
29
"..#a#eebbfadddda###da#",
30
".#a#eebbfa#aaaa#..#da#",
31
"#a#eebbfa#.####..#da#.",
32
"#aeebbfa#.......#da#..",
33
".#ebbfa#.......#da#...",
34
"dhfffa#.......#da#....",
35
"hd.aa#........#da#...."};
(-)tdegraphics/tdeiconedit/pics/toolbar/areaselect.png (+6 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ìVIDATxÚc` 0øoðFPˆŸO®õ¤‰Sj.¦yügøO„[…Õ1HÎøìF6£È
4
&˜É´
5
gì¦`˜úƒ7Ցï$bCI9î¤)ÃO6˜
6
áCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature9bb6753630c58aa0d1ccde38f8734c57þ=¥$IEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/circle.png (+4 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ìFIDATxÚc`€‹Ø¼²(
4
ÿãäá4¿nalâx,„É1‘*ÿ‰‘'ÉäA¢˜8/RtøÌ&!Âñ&%<©Ž¢ôL=4éù³ñhÅCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature61e1f4b809628c44e7faf33dcdd57122YÓ^LIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/colorpicker-cursor.xpm (+36 lines)
Line 0 Link Here
1
/* XPM */
2
static char *colorpicker[]={
3
"22 22 11 1",
4
". c None",
5
"# c #000000",
6
"f c #151515",
7
"e c #2a2a2a",
8
"c c #333333",
9
"d c #3a3a3a",
10
"i c #808080",
11
"g c #aaaaaa",
12
"b c #d5d5d5",
13
"h c #dcdcdc",
14
"a c #ffffff",
15
"..................##a.",
16
".................#bc#a",
17
"................#bdcc#",
18
"...............#bddce#",
19
"..............#bddcef#",
20
"............##bddcef#a",
21
"...........#bdddcef#a.",
22
"............#becef#a..",
23
"...........#agbee#a...",
24
"..........#ahgibf#a...",
25
".........#ahgi#.#a....",
26
"........#ahgi#........",
27
".......#ahgi#.........",
28
"......#ahgi#..........",
29
".....#ahgi#...........",
30
"....#ahgi#............",
31
"...#ahgi#.............",
32
"..#ahgi#..............",
33
".#ahgi#...............",
34
".#hgi#................",
35
"#ig##.................",
36
"#i#..................."};
(-)tdegraphics/tdeiconedit/pics/toolbar/ellipse.png (+3 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ì5IDATxÚc`ÀˆÂûO@IáâD±+Ä*‹O!Š&R<H;Å${ŸQ2#e00?J÷œµTCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature017bcd7cfbbcc49b20344a91ebcd0f22DÁIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/eraser-cursor.xpm (+32 lines)
Line 0 Link Here
1
/* XPM */
2
static char *eraser[]={
3
"22 22 7 1",
4
"b c #000080",
5
"e c #800000",
6
"a c #8080ff",
7
"d c #c00000",
8
"# c #c0c0ff",
9
"c c #ffc0c0",
10
". c #ffffff",
11
"......................",
12
"...............#aa....",
13
"..............#aaaa...",
14
".............#aaaaaa..",
15
"............#aaaaaaaa.",
16
"...........#aaaaaaaaa.",
17
"..........#aaaaaaaaab.",
18
".........#aaaaaaaaab..",
19
"........#aaaaaaaaab...",
20
".......c##aaaaaaab....",
21
"......cdd##aaaaab.....",
22
".....cdddd##aaab......",
23
"....cdddddd##ab.......",
24
"...cdddddddd#b........",
25
"..cddddddddde.........",
26
".cddddddddde..........",
27
".ccddddddde...........",
28
".cccddddde............",
29
"..cccddde.............",
30
"...cccde..............",
31
"....cce...............",
32
"......................"};
(-)tdegraphics/tdeiconedit/pics/toolbar/fileclose.png (+3 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ìqIDATxÚc`dF8ë?†`B0ïÀ4¡Bì&ÿg`„i`x¥PlB2ù.œõ„A†3”‘L„Ðp+¾ËÀÀ ƒdî܊à	TéBŠaæ:gò¨k1MfA0—@1VÏ¡…3v€'F‡ˆûÀ¤‘CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature342d125f0e7c4e11510dd910c10c507b¥Í»ŽIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/fill-cursor.xpm (+36 lines)
Line 0 Link Here
1
/* XPM */
2
static char *fill[]={
3
"22 22 11 1",
4
". c None",
5
"a c #000000",
6
"i c #222222",
7
"c c #2a2a2a",
8
"e c #333333",
9
"g c #3a3a3a",
10
"d c #404040",
11
"h c #555555",
12
"f c #aaaaaa",
13
"b c #d5d5d5",
14
"# c #ffffff",
15
"......................",
16
"............#.........",
17
"...........#a#........",
18
"..........#aba#.......",
19
".........#abcca#......",
20
"........#adceca#......",
21
".......#afdcecca#.....",
22
"......#abcedcecca#....",
23
".....#afcgeedeeca#....",
24
"...##fddcggeeeecca#...",
25
"..#fdccddcggeeeecca#..",
26
".#ddcdcdddcggeeeeca#..",
27
".#dccbdddddcggeeecca#.",
28
".#ddcddbbdddgggeeccba#",
29
".#ddhadddbddggggeebia#",
30
".#fda#adddbdddggebca#.",
31
".#fda##aaddbbddgbca#..",
32
".#fda#.##adddbdbca#...",
33
"..#da#...#aaddbca#....",
34
"..#fa#....##abca#.....",
35
"..#f#.......#aa#......",
36
"...#.........##......."};
(-)tdegraphics/tdeiconedit/pics/toolbar/filledcircle.png (+4 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ìKIDATxÚc`€‹Ø\²Œ8bQÁH@)ŠF‚J‘T1¡®Ž‰œÐøOŒJ’L$ŠitøÍfÄTLRÚÀ®gªC׀M–&d!LÓTCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturefb99c93ab91fc8bdbd37fb9335795624g
4
ôkIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/filledellipse.png (+3 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ì:IDATxÚc`ÀˆÂû_žB5Œ¢¨c$J)T%)¤b’=È@@#‡F†Q€Gò»I¬CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignatureb84f3734aaa52671933e8ee605d20200툄œIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/filledrectangle.png (+3 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ì"IDATxÚc`ÀÈÀÀÀÀðŸ8uL¤˜<ª˜>ŠG2óx‚v$õCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature68ebf235d2fbf113d48af269e80ac0e8U¡Ó/IEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/flood-cursor.xpm (+32 lines)
Line 0 Link Here
1
/* XPM */
2
static char *flood[]={
3
"22 22 7 1",
4
"b c #000000",
5
"c c #303030",
6
"# c #808080",
7
"e c #a0a0a4",
8
"a c #c0c0c0",
9
"d c #dcdcdc",
10
". c #ffffff",
11
"......................",
12
"......................",
13
"...........##.........",
14
"..........####........",
15
".........##aa##.......",
16
".........##ba##.......",
17
".........##.b##.......",
18
".......cc##..b#.......",
19
".....cccd##d..b.......",
20
"....cccdd#b.d..b......",
21
"...ccceddbdb.d..b.....",
22
"..eccceeddbdd.d..b....",
23
"..ecccceeddddd.d..b...",
24
"..ecccebeeddddd.d.b...",
25
"..eccceebeeddddd.b....",
26
"..eccc.eebeeddd.b.....",
27
"..eecc..eebeeddb......",
28
"...eec...eebeeb.......",
29
"....e.....eebb........",
30
"...........ee.........",
31
"......................",
32
"......................"};
(-)tdegraphics/tdeiconedit/pics/toolbar/flood.png (+4 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRÄ´l;bKGD½½½iBÕ¨èIDATxÚÝÒ±
ƒ0Ðï(›Øx Œ@‘n€Â%c¤ÈçY~Œè’sÊ|	!°yœ¾üuD„"BÏÞЃîžÝߺ'õL~êü‡«†n˜¤?ZÌ9’!@Dúá-8Ï3J)€Z+bŒ+ÞUÅmÄQkí®9g¶kš
4
U•ªJë$U•-¾N<Må°áñxT)%¨êZÇ·ÉÍSq¿ßx‹7áq¼b.oø6{Ü=ñR_NHpÁÃp	ßp=ÀãxíÂ-ô
nˆO)™¨Õ+­÷˚yvÎÿüÒ$¹üÙõ)‡CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturee19919f4d333b5d3520edb8e9ecb0c5b4 gðIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/grayscale.png (+4 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRÄ´l;bKGD½½½iBÕ¨ñIDATxÚ퓱
ƒ0E¿#ÆHá‚XéJŠ!êŒà’)PÄ'±962VpŒH‘‚ßœÏg?Ÿïlà’‘pÆ:˲èó<‹P|ff0˜±-«ZㄺÌwá7׉2Sԍ×9
4
ÆIÛ±Ÿýl¡D$˜¡CÐOe°Õe.?hZ©€‚í§R¯ui²F@‰%“X×u¨PUÈú¾GQ< åÝìaH™¢ižûà¶Ýžµ¾+÷Ub§ÓP¼Ñ(›¦Á¶ÛG R¦ñ~«ñÏ Að(àÿ<Gþ»¼ôzF—`¹š(CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturef95156cb189463f2cddf79b92d5dbd55¢¢êIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/grid.png (+3 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ì IDATxÚc`æ€Jÿ'R’bü$Ó¨3F¢3†ÏŠö^²¬ýCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturef670d781c7e54539c281ea40a5faa83aÛéÚIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/kdepalette.png (+7 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRKÖûltRNSn¦‘bKGD½½½iBÕ¨¾IDATxÚ½”Ñ
Ã0D)#2J>úÑ1<Hwi‘¯>Q×&ªÊŠ,îÌ%"?ã3®èŸ{)…9êôE„Ï»«ƒæ<o¦gÞ¥P÷{
4
'JLq¥è­Zô­Iw) ·ì7²{£]ž"Í)
5
»`ö¾ð5ß,‡
6
­“käˆÑuӍ„€ê¹Ú¡å`®YR«¥ØM™[Æ)M¯$Bw1zÔë;ÊÂ)3Êø¯æ)9=)ÝÉÍý‡Ž(ú¿ÆÇßy-M.3CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturec32add3ce8cbc879554b3d9b333edb70o
7
ûIIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/line.png (+3 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRÄ´l;gAMA±üabKGDÿÿÿ ½§“	pHYsÒÝ~ütIMEÐ/2/‚—[IDATxœc`¶ÀÀÀà?5Ԑ¬‰,C	i$ÛP|š)2—ŠÍªŠnÕE6Œª†Â¤º¡0ƒIQÏDC‰4	[š¤š¤[šä2š”	4)ÁhVÞßê5VYŠIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/paintbrush-cursor.xpm (+36 lines)
Line 0 Link Here
1
/* XPM */
2
static char *paintbrush[]={
3
"22 22 11 1",
4
". c None",
5
"a c #000000",
6
"d c #272727",
7
"i c #2c2c2c",
8
"h c #303030",
9
"c c #3b3b3b",
10
"g c #aaaaaa",
11
"e c #c8c8c8",
12
"b c #d5d5d5",
13
"f c #ececec",
14
"# c #ffffff",
15
".................#abcc",
16
"................#abccc",
17
"...............#abcccd",
18
"..............#abcccdd",
19
".............#abcccdda",
20
"............#abcccdda#",
21
"...........#abcccdda#.",
22
"..........#abcccdda#..",
23
"..........abcccdda#...",
24
".........##cccdda#....",
25
".........#eecdda#.....",
26
"......##f#eegda#......",
27
".....#aabeggga#.......",
28
"....#abbchgaa#........",
29
"...#abcccda##.........",
30
"...abcccdda#..........",
31
"..#abccddia#..........",
32
".#abccdiaa#...........",
33
"#abdddaa##............",
34
"aaaaaa##..............",
35
"######................",
36
"......................"};
(-)tdegraphics/tdeiconedit/pics/toolbar/paintbrush.png (+3 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRÄ´l;bKGD½½½iBÕ¨¦IDATxÚ픱
Â0DˆM’±Rx4%C\f9ªD‚üC”«íçç³õáLc,ɒ8çÑÛ×_ü
ؒèûžœÇÃÀoIi¸´‚C¶‡ïÙÖ‚Ã¶ÍÆŸlnQÛÅ(ÚF-‰¥†ˆmlÛt]W]S¨ãyž™¦ûa`Û^¡)
@¬ßR,i0ë°Ù8UPÛMн—}Ùü|õÒO(ÙšÕÿ7WãgÁ÷ºÇ©CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature426890f90f64395ee7c80e2549632116¾™"IEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/pointer.png (+3 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ì^IDATxÚÍÒÁÀ Phöÿ¿Ü̃=ÊÍúB$q_‘ätÿ1câ¨ÁÄÑ#Ï¡BÇ¡{hn°æ+>àΗÊ<|s¥3ܯ Ó¯ßvÀE3Ç}jý›
¬üÖzI¼#ÎÿCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature1b33aaff61d83f1bfdabf2d1ccd5cef4e†ÖIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/rectangle.png (+3 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ì*IDATxÚc`ÀÈÀÀÀÀðŸHuD)†Ê3‘âŒQÅȀJŽ–Q€7ğ·¥KCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature8f88fb0716fc60cc5393776b6a088503}6 IEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/selectcircle.png (+3 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ìFIDATxÚc` ügø'	(ÄÏ'(ñŸx¥dø‚6æ¢F´¹L乛Šºþ“¢˜\»©hö‚x	©»"2‘9…š¬F=ÀDœCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignaturedf7a26941c2a465c8a6847baa1829b18R-ÉPIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/selectrect.png (+4 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRn½¤°bKGD½]ì'IDATxÚc`à?Â$’bB†‘ï¢ä™hCÑøcp`£<éƒÁ
4
zCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature738f2b081df0d73debe9f3ac2dff60f1üžÀIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/spraycan-cursor.xpm (+30 lines)
Line 0 Link Here
1
/* XPM */
2
static char *spraycan[]={
3
"22 22 5 1",
4
"# c #000000",
5
"c c #808080",
6
"b c #a0a0a4",
7
"a c #c0c0c0",
8
". c #ffffff",
9
"......................",
10
"......................",
11
"......................",
12
"......................",
13
"........##............",
14
"#.#..#..#a####........",
15
".........#a.#.#.......",
16
"......#..#b#a..#......",
17
".#.......##aaa..#.....",
18
"....#....#cbaaa..#....",
19
".........b#cbaaa..#...",
20
"..#...#..bc#cbaaa..#..",
21
"..........bc#cbaaa..#.",
22
".....#.....bc#cbaaa..#",
23
"............bc#cbaaa#.",
24
".............bc#cba#..",
25
"..............bc#c#...",
26
"...............bc#....",
27
"................b.....",
28
"......................",
29
"......................",
30
"......................"};
(-)tdegraphics/tdeiconedit/pics/toolbar/spraycan.png (+4 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRÄ´l;bKGD½½½iBÕ¨ÇIDATxÚíÓ±
à Й#Eö€Ñn
4
rÞÅ÷¸¶Áà@DEù’eQðîë,ÿ|CtºrK.i†ÅˆH:à£AÕÖ"¢ªªâû]ã«Ä„°‚ˆŽöØì:N	B¨G“•¬µ@„ÒÝ£1åHfFk<Ïó|Ù¼´ŠÓtï§^šñΧ¾œ™¹¿ÚkÞZCXâc0æ^Ýy
.~̼¹q+îœëÚÄ	gf Ì¬ÞO*"cþȂ–ðahŠG+O¶•CtåGŠCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature031f8f72f4de59a1e836f7fc7fcbaff4G©ÈIEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/transform.png (+5 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRÄ´l;bKGD½½½iBÕ¨ÉIDATxÚ퓱
Ä E?эâ!R0J
4
FsÁ(»pMˆCtÒUyCd¾¿x¹pÍ9?È}&Ì»¤0G5Ž
5
~Vx¿CDàŽ•øº°÷ûý," ¢Qj;>·ì8¥óvÙ¾¯
˜cáppiMDÒiáPjŽsÌÞï ¢á¥‚ö¡ÛÈñ¯t£°\ÔÌ:R—Ù¦t‚ˆÔXoж1Öߔg3®EK¡k·Ý6½¹ º4ã'X™Â–£–°cŽyYéåï|kÑaÚ?CtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘º!¸*tEXtSignature2bb07f9a20164549f4ee45cda20ec70eᐾ}IEND®B`‚
(-)tdegraphics/tdeiconedit/pics/toolbar/window_new.png (+9 lines)
Line 0 Link Here
1
‰PNG
2
3
IHDRÄ´l;gAMA¯È7ŠétEXtSoftwareAdobe ImageReadyqÉe<±IDATxÚbüÿÿ?-@±XM{6Ÿ›ƒ9™‰áÏï¿~ýâ¿¿¡4ˆÿýýËo¸Ú¿¿ÿ1üû¤~fø÷ëӂÿg£ˆd¨»‘8ÃÏ_?00üø	Ä? ø;Ãw ýý;#±ýb gæ2üg‚¸’‘ñP`W™@,œl,?†ýúÁ¿Aø75ÿb c ‰ýŠQB’™•‘
Ì >Öÿ֒
 ƒþ@
ùƒ„#³C\ýû÷°P<,øôÂâuç?;ƒƒé‘óïß þ¥ÿƒ
ÿõó?þ#ƒˆ‰œT҂n(Œ
€bbø÷ŸdC‘
BfCøuÄôŸƒñ
4
bÿúDtP úΆDª8Ñ.FuÜP–…jXƒ €ˆr1ªF„Ë@†rd‹2p,Õ@ñAƒÑ
ý?G‰qž
5
$€	\ÈFC†#69`>@á
6
l†rds„-Ûbu0ÍÀ`¦yWiƒiü©rÿˆ—‹Q„…o & f=} *- càЛ	ä_²/åå1ÖtŒ;þcø{¬ùÇ¥‰`CŒÁ4ˆ·><l@1¡;Ÿ¡À8C
7
[ü €XþƒT4ô?ÔÐà
8
PP¼â³`šC/Ž2äùþÄòïï`)õ¢ù/$)ý†VȀØ|kô ‘séÃáÈÒ«ò[|”È –ëO¿1ÄN¿¬€5ÀŸ¿hœ
¤ÿÁåf3읚
9
ö(,Á®Ó;6Æÿq˜yurð÷)²@Êè?„F• ŠFŽ)`øgOu×üÜIEND®B`‚
(-)tdegraphics/tdeiconedit/properties.cpp (+147 lines)
Line 0 Link Here
1
/*
2
    TDE Icon Editor - a small graphics drawing program for the TDE
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/
20
21
#include <tdeconfig.h>
22
#include <kdebug.h>
23
#include <tdeapplication.h>
24
25
#include "properties.h"
26
27
TDEIconEditProperties* TDEIconEditProperties::m_self = 0;
28
29
TDEIconEditProperties* TDEIconEditProperties::self()
30
{
31
    if (!m_self)
32
        m_self = new TDEIconEditProperties();
33
    return m_self;
34
}
35
36
TDEIconEditProperties::TDEIconEditProperties() : TQObject()
37
{
38
    TDEConfig *config = kapp->config();
39
40
    config->setGroup( "Appearance" );
41
42
    m_bgMode = (TQWidget::BackgroundMode)config->readNumEntry( "BackgroundMode", TQWidget::FixedPixmap);
43
    m_bgColor = config->readColorEntry( "BackgroundColor", &gray);
44
    m_bgPixmap = config->readPathEntry("BackgroundPixmap");
45
46
    config->setGroup( "Grid" );
47
    m_pasteTransparent = config->readBoolEntry( "PasteTransparent", false );
48
    m_showGrid = config->readBoolEntry( "ShowGrid", true );
49
    m_gridScale = config->readNumEntry( "GridScaling", 10 );
50
    m_showRulers = config->readBoolEntry( "ShowRulers", true );
51
52
    if(config->readEntry( "TransparencyDisplayType", "Checkerboard" ) == "Checkerboard")
53
    {
54
      m_transparencyDisplayType = TDEIconEditGrid::TRD_CHECKERBOARD;
55
    }
56
    else
57
    {
58
      m_transparencyDisplayType = TDEIconEditGrid::TRD_SOLIDCOLOR;
59
    }
60
61
    TQColor checkColor1(255, 255, 255);
62
    TQColor checkColor2(127, 127, 127);
63
64
    m_checkerboardColor1 = config->readColorEntry( "CheckerboardColor1", &checkColor1);
65
    m_checkerboardColor2 = config->readColorEntry( "CheckerboardColor2", &checkColor2);
66
67
    TQString checkerboardSize = config->readEntry( "CheckerboardSize", "Medium" );
68
69
    if(checkerboardSize == "Small")
70
    {
71
      m_checkerboardSize = TDEIconEditGrid::CHK_SMALL;
72
    }
73
    else
74
    if(checkerboardSize == "Medium")
75
    {
76
      m_checkerboardSize = TDEIconEditGrid::CHK_MEDIUM;
77
    }
78
    else
79
    {
80
      m_checkerboardSize = TDEIconEditGrid::CHK_LARGE;
81
    }
82
83
    TQColor solidColor(255, 255, 255);
84
    m_transparencySolidColor = config->readColorEntry( "TransparencySolidColor", &solidColor);
85
}
86
87
TDEIconEditProperties::~TDEIconEditProperties()
88
{
89
  kdDebug(4640) << "TDEIconEditProperties: Deleting properties" << endl;
90
  m_self = 0;
91
}
92
93
void TDEIconEditProperties::save()
94
{
95
    TDEConfig *config = kapp->config();
96
97
    config->setGroup( "Appearance" );
98
99
    config->writeEntry("BackgroundMode", m_bgMode );
100
    config->writeEntry("BackgroundColor", m_bgColor );
101
    config->writePathEntry("BackgroundPixmap", m_bgPixmap );
102
103
    config->setGroup( "Grid" );
104
    config->writeEntry("PasteTransparent", m_pasteTransparent );
105
    config->writeEntry("ShowGrid", m_showGrid );
106
    config->writeEntry("GridScaling", m_gridScale );
107
    config->writeEntry("ShowRulers", m_showRulers );
108
109
    TQString transparencyDisplayType;
110
111
    switch(m_transparencyDisplayType)
112
    {
113
      case TDEIconEditGrid::TRD_SOLIDCOLOR:
114
        transparencyDisplayType = "SolidColor";
115
        break;
116
      case TDEIconEditGrid::TRD_CHECKERBOARD:
117
      default:
118
        transparencyDisplayType = "Checkerboard";
119
        break;
120
    }
121
122
    config->writeEntry( "TransparencyDisplayType", transparencyDisplayType );
123
    config->writeEntry( "CheckerboardColor1", m_checkerboardColor1 );
124
    config->writeEntry( "CheckerboardColor2", m_checkerboardColor2 );
125
126
    TQString checkerboardSize;
127
128
    switch(m_checkerboardSize)
129
    {
130
      case TDEIconEditGrid::CHK_SMALL:
131
        checkerboardSize = "Small";
132
        break;
133
      case TDEIconEditGrid::CHK_MEDIUM:
134
        checkerboardSize = "Medium";
135
        break;
136
      case TDEIconEditGrid::CHK_LARGE:
137
      default:
138
        checkerboardSize = "Large";
139
        break;
140
    }
141
142
    config->writeEntry( "CheckerboardSize", checkerboardSize );
143
    config->writeEntry( "TransparencySolidColor", m_transparencySolidColor );
144
145
    config->sync();
146
}
147
(-)tdegraphics/tdeiconedit/properties.h (+82 lines)
Line 0 Link Here
1
/*
2
    tdeiconedit - a small graphics drawing program the KDE.
3
4
    Copyright (C) 1998 Thomas Tanghus (tanghus@kde.org)
5
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public
8
    License as published by the Free Software Foundation; either
9
    version 2 of the License, or (at your option) any later version.
10
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
    General Public License for more details.
15
16
    You should have received a copy of the GNU Library General Public License
17
    along with this library; see the file COPYING.LIB.  If not, write to
18
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
    Boston, MA 02110-1301, USA.
20
*/
21
22
#ifndef __PROPS_H__
23
#define __PROPS_H__
24
25
#include <tqwidget.h>
26
27
#include "tdeicongrid.h"
28
29
class TDEIconEditProperties : public TQObject
30
{
31
public:
32
  static TDEIconEditProperties* self();
33
  ~TDEIconEditProperties();
34
35
  TQString bgPixmap() { return m_bgPixmap; }
36
  TQColor bgColor() { return m_bgColor; }
37
  TQWidget::BackgroundMode bgMode() { return m_bgMode; }
38
  bool showGrid() { return m_showGrid; }
39
  bool pasteTransparent() { return m_pasteTransparent; }
40
  bool showRulers() { return m_showRulers; }
41
  int gridScale() { return m_gridScale; }
42
  
43
  TDEIconEditGrid::TransparencyDisplayType transparencyDisplayType() const { return m_transparencyDisplayType; }
44
  TQColor checkerboardColor1() const { return m_checkerboardColor1; }
45
  TQColor checkerboardColor2() const { return m_checkerboardColor2; }
46
  TDEIconEditGrid::CheckerboardSize checkerboardSize() const { return m_checkerboardSize; }
47
  TQColor transparencySolidColor() const { return m_transparencySolidColor; }
48
49
  void setBgPixmap( const TQString &p ) { m_bgPixmap = p; }
50
  void setBgColor( const TQColor &c ) { m_bgColor = c; }
51
  void setBgMode( TQWidget::BackgroundMode m ) { m_bgMode = m; }
52
  void setShowGrid( bool b ) { m_showGrid = b; }
53
  void setPasteTransparent( bool b ) { m_pasteTransparent = b; }
54
  void setShowRulers( bool b ) { m_showRulers = b; }
55
  void setGridScale( int s ) { m_gridScale = s; }
56
  void setTransparencyDisplayType(TDEIconEditGrid::TransparencyDisplayType t) { m_transparencyDisplayType = t; }
57
  void setCheckerboardColor1(const TQColor& c) { m_checkerboardColor1 = c; }
58
  void setCheckerboardColor2(const TQColor& c) { m_checkerboardColor2 = c; }
59
  void setCheckerboardSize(TDEIconEditGrid::CheckerboardSize size) { m_checkerboardSize = size; }
60
  void setTransparencySolidColor(const TQColor& c) { m_transparencySolidColor = c; }
61
62
  void save();
63
64
protected:
65
  TDEIconEditProperties();
66
  TQString m_bgPixmap;
67
  TQColor m_bgColor;
68
  TQWidget::BackgroundMode m_bgMode;
69
  bool m_showGrid;
70
  bool m_pasteTransparent;
71
  bool m_showRulers;
72
  int m_gridScale;
73
  TDEIconEditGrid::TransparencyDisplayType m_transparencyDisplayType;
74
  TQColor m_checkerboardColor1;
75
  TQColor m_checkerboardColor2;
76
  TDEIconEditGrid::CheckerboardSize m_checkerboardSize;
77
  TQColor m_transparencySolidColor;
78
79
  static TDEIconEditProperties* m_self;
80
};
81
82
#endif //__PROPS_H__
(-)tdegraphics/tdeiconedit/tdeicon.cpp (+279 lines)
Line 0 Link Here
1
/*
2
    TDE Icon Editor - a small graphics drawing program for the TDE
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#include <stdlib.h>
22
23
#include <tqimage.h>
24
25
#include <tdemessagebox.h>
26
#include <tdefiledialog.h>
27
#include <tdeio/netaccess.h>
28
#include <kimageio.h>
29
#include <kdebug.h>
30
#include <tdelocale.h>
31
32
#include "tdeicon.h"
33
#include "utils.h"
34
35
TDEIconEditIcon::TDEIconEditIcon(TQObject *parent, const TQImage *img, KURL url) 
36
   : TQObject(parent)
37
{
38
    f = 0;
39
    _lastdir = "/";
40
    //checkUnNamedBackup(img);
41
42
    if(!url.isEmpty())
43
    {
44
        open(img, url);
45
    }
46
}
47
48
49
TDEIconEditIcon::~TDEIconEditIcon()
50
{
51
}
52
53
54
bool TDEIconEditIcon::open(const TQImage *image, KURL url)
55
{
56
    TQImage *img = (TQImage*)image;
57
58
    if(url.isEmpty())
59
        return false;
60
61
    kdDebug(4640) << "TDEIconEditIcon::open " << url.prettyURL() << endl;
62
    
63
    if(!url.isValid()) // try to see if it is a relative filename
64
    {
65
        kdDebug(4640) << "TDEIconEditIcon::open (malformed) " << url.prettyURL() << endl;
66
67
        TQFileInfo fi(url.url());
68
        if(fi.isRelative())
69
            url = "file:" + fi.absFilePath();
70
71
        if(!url.isValid()) // Giving up
72
        {
73
            TQString msg = i18n("The URL: %1 \nseems to be malformed.\n").arg(url.url());
74
            KMessageBox::sorry((TQWidget*)parent(), msg);
75
            return false;
76
        }
77
    }
78
79
    TQString filename;
80
81
    if(url.isLocalFile())
82
    {
83
        filename = url.path();
84
    }
85
    else
86
    {
87
        if(!TDEIO::NetAccess::download( url, filename, (TQWidget*)parent() ))
88
        {
89
            TQString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL());
90
            KMessageBox::error((TQWidget*)parent(), msg);
91
            return false;
92
        }
93
    }
94
95
    bool loadedOk = img->load(filename);
96
97
    if(!url.isLocalFile())
98
    {
99
        TDEIO::NetAccess::removeTempFile( filename );
100
    }
101
102
    if(!loadedOk) 
103
    {
104
          TQString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL());
105
          KMessageBox::error((TQWidget*)parent(), msg);
106
    }
107
    else
108
    {
109
        kdDebug(4640) << "TDEIconEditIcon::open - Image loaded" << endl;
110
        
111
        // _url is saved off for use in saving the image to the same 
112
        // file later - should include full path
113
        if(url.isLocalFile())
114
        {
115
            _url = url.path();
116
        }
117
        else
118
        {
119
            _url = "";
120
        }
121
        
122
        kdDebug(4640) << "TDEIcon: _url: " << _url << endl;
123
        
124
        // this causes updates of preview, color palettes, etc.    
125
        emit loaded(img);
126
        kdDebug(4640) << "loaded(img)" <<  endl;    
127
        
128
        // this is the name that shows up in status bar - 
129
        // should be filename with path
130
        emit newname(url.prettyURL()); 
131
        kdDebug(4640) << "newname(_url) : " << url.prettyURL() << endl;    
132
        
133
        emit addrecent(url.prettyURL());
134
        
135
        kdDebug(4640) << "TDEIconEditIcon::open - done" << endl;
136
    }
137
138
    return loadedOk;
139
}
140
141
142
143
bool TDEIconEditIcon::promptForFile(const TQImage *img)
144
{
145
    kdDebug(4640) << "TDEIconEditIcon::promptForFile(const TQImage *img)" << endl;
146
    /*
147
    TQString filter = i18n("*|All Files (*)\n"
148
                        "*.xpm|XPM (*.xpm)\n"
149
                        "*.png|PNG (*.png)\n"
150
                        "*.gif|GIF files (*.gif)\n"
151
                        "*.jpg|JPEG files (*.jpg)\n"
152
                        "*.ico|Icon files (*.ico)\n");
153
154
  
155
    KURL url = KFileDialog::getOpenURL( TQString(), filter );
156
    */
157
    bool loaded = false;
158
    KURL url = KFileDialog::getImageOpenURL( TQString(), TQT_TQWIDGET(parent()) );
159
160
    if( !url.isEmpty() )
161
    {
162
        loaded = open( img, url );
163
    }
164
165
    return loaded;
166
}
167
168
169
170
bool TDEIconEditIcon::saveAs(const TQImage *image)
171
{
172
    kdDebug(4640) << "TDEIconEditIcon::saveAs" << endl;
173
174
    TQString file;
175
176
    //Get list of file types..
177
    KFileDialog *dialog=new KFileDialog(TQString(), TQString(), TQT_TQWIDGET(parent()), "file dialog", true);
178
    dialog->setCaption( i18n("Save Icon As") );
179
    dialog->setKeepLocation( true );
180
    dialog->setMimeFilter( KImageIO::mimeTypes(KImageIO::Writing), "image/png" );
181
    dialog->setOperationMode( KFileDialog::Saving );
182
183
    if(dialog->exec()==TQDialog::Accepted)
184
    {
185
        file = dialog->selectedFile();
186
        if( file.isNull() )
187
        {
188
            delete dialog;
189
            return false;
190
        }
191
        if ( !KImageIO::canWrite(KImageIO::type(file)) )
192
        {
193
            if ( KImageIO::canWrite(KImageIO::typeForMime(dialog->currentFilter())) )
194
                file += "."+KImageIO::suffix(KImageIO::typeForMime(dialog->currentFilter()));
195
            else
196
                file += ".png";
197
        }
198
    }
199
    else
200
    {
201
        delete dialog;
202
        return false;
203
    }
204
        
205
    delete dialog;
206
207
    if(TQFile::exists(file))
208
    {
209
        int r=KMessageBox::warningContinueCancel(TQT_TQWIDGET(parent()),
210
            i18n( "A file named \"%1\" already exists. "
211
                  "Overwrite it?" ).arg(file),
212
            i18n( "Overwrite File?" ),
213
            i18n( "&Overwrite" ) );
214
  
215
        if(r==KMessageBox::Cancel)
216
        {
217
            return false;
218
        }
219
    }
220
221
    return save( image, file );
222
}
223
224
225
226
bool TDEIconEditIcon::save(const TQImage *image, const TQString &_filename)
227
{
228
    kdDebug(4640) << "TDEIconEditIcon::save" << endl;
229
    TQString filename = _filename;
230
231
    if(filename.isEmpty())
232
    {
233
        if(_url.isEmpty())
234
        {
235
            return saveAs(image);
236
        }
237
        else
238
        {
239
            KURL turl(_url);
240
            filename = turl.path();
241
        }    
242
    }
243
244
    TQImage *img = (TQImage*)image;
245
    img->setAlphaBuffer(true);
246
    
247
    KURL turl(filename);
248
    TQString str = turl.path();
249
    bool savedOk = false;
250
251
    /* base image type on file extension - let kimageio
252
    take care of this determination */
253
    
254
    if(img->save(str, KImageIO::type(str).ascii()))    
255
    {
256
        kdDebug(4640) << "img->save()) successful" << endl;
257
        emit saved();    
258
        _url = filename;
259
        
260
        // emit signal to change title bar to reflect new name
261
        emit newname(filename); 
262
        kdDebug(4640) << "newname(filenamme) : " << _url << endl;    
263
        savedOk = true;
264
        emit addrecent(filename);
265
    }
266
    else 
267
    {
268
        TQString msg = i18n("There was an error saving:\n%1\n").arg(str);
269
        KMessageBox::error((TQWidget*)parent(), msg);
270
        kdDebug(4640) << "TDEIconEditIcon::save - " << msg << endl;
271
    }
272
273
    kdDebug(4640) << "TDEIconEditIcon::save - done" << endl;    
274
275
    return savedOk;
276
}
277
278
279
#include "tdeicon.moc"
(-)tdegraphics/tdeiconedit/tdeicon.h (+79 lines)
Line 0 Link Here
1
/*
2
    KDE Icon Editor - a small icon drawing program for the KDE.
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#ifndef __KICON_H__
22
#define __KICON_H__
23
24
#include <stdio.h>
25
#include <errno.h>
26
#include <assert.h>
27
#include <unistd.h>
28
29
#ifdef HAVE_CONFIG_H
30
#include "config.h"
31
#endif
32
33
#if defined(HAVE_FCNTL_H) && !defined(HAVE_FLOCK)
34
#include <fcntl.h>
35
#endif
36
37
#ifdef HAVE_STDC_HEADERS
38
#include <stdlib.h>
39
#endif
40
#include <sys/types.h>
41
#include <sys/stat.h>
42
#include <sys/file.h>
43
44
class TQImage;
45
46
class TDEIconEditIcon : public TQObject
47
{
48
  Q_OBJECT
49
  
50
public:
51
  TDEIconEditIcon(TQObject*, const TQImage*, KURL url = KURL() );
52
  ~TDEIconEditIcon();
53
54
  bool isLocal() { return local; }
55
  TQString url() { return _url; }
56
  void setUrl( const TQString & u ) { _url = u; };
57
58
public slots:
59
  bool open(const TQImage*, KURL url = KURL());
60
  bool promptForFile(const TQImage*);
61
  bool save(const TQImage*, const TQString &filename=TQString());
62
  bool saveAs(const TQImage*);
63
64
signals:
65
  void newmessage( const TQString &);
66
  void newname(const TQString &);
67
  void addrecent(const TQString &);
68
  void opennewwin(const TQString &);
69
  void loaded(TQImage *);
70
  void saved();
71
72
protected:
73
    bool local;
74
    TQString _url;
75
    TQString _lastdir;
76
    FILE *f;
77
};
78
79
#endif //__KICON_H__
(-)tdegraphics/tdeiconedit/tdeiconcolors.cpp (+170 lines)
Line 0 Link Here
1
/*
2
    TDE Icon Editor - a small graphics drawing program for the TDE
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#include <tqpainter.h>
22
#include <tqdrawutil.h>
23
24
#include <kdebug.h>
25
26
#include "tdeiconcolors.h"
27
28
KDrawColors::KDrawColors(TQWidget *parent) : KColorGrid(parent, 0, 3)
29
{
30
  kdDebug(4640) << "KDrawColors - constructor" << endl;
31
  setCellSize(17);
32
  setGrid(true);
33
  setGridState(KColorGrid::Shaded);
34
  selected = 0;
35
  kdDebug(4640) << "KDrawColors - constructor - done" << endl;
36
}
37
38
void KDrawColors::paintCell( TQPainter *painter, int row, int col )
39
{
40
  //KColorGrid::paintCell(painter, row, col);
41
  uint c = colorAt( row * numCols() + col );
42
  TQBrush brush(c);
43
  int d = spacing();
44
45
  qDrawShadePanel( painter, d, d, cellSize()-d, cellSize()-d,
46
                colorGroup(), true, 1, &brush);
47
  if ( row * numCols() + col == selected)
48
     painter->drawWinFocusRect( d+1, d+1, cellSize()-(2*d)+1, cellSize()-(2*d)+1 );
49
}
50
51
void KDrawColors::mouseReleaseEvent( TQMouseEvent *e )
52
{
53
  int row = findRow( e->pos().y() );
54
  int col = findCol( e->pos().x() );
55
  int cell = row * numCols() + col;
56
57
  if ( selected != cell )
58
  {
59
    int prevSel = selected;
60
    selected = cell;
61
    updateCell( prevSel/numCols(), prevSel%numCols(), FALSE );
62
    updateCell( row, col, FALSE );
63
  }
64
65
  emit newColor(colorAt(cell)|OPAQUE_MASK);
66
}
67
68
KSysColors::KSysColors(TQWidget *parent) : KDrawColors(parent)
69
{
70
  kdDebug(4640) << "KSysColors - constructor" << endl;
71
72
  setNumRows(7);
73
  setNumCols(6);
74
  //fill(backgroundColor().rgb()|OPAQUE_MASK);
75
  setFixedSize(numCols()*cellSize(), numRows()*cellSize());
76
  fill(TRANSPARENT|OPAQUE_MASK);
77
78
  int numcells = 42;
79
80
  kdDebug(4640) << "KSysColors - constructor - before setColor" << endl;
81
  for(int i = 0; i < numcells; i++)
82
  {
83
    setColor(i, iconpalette[i]|OPAQUE_MASK);
84
  }
85
  kdDebug(4640) << "KSysColors - constructor - done" << endl;
86
}
87
88
KCustomColors::KCustomColors(TQWidget *parent) : KDrawColors(parent)
89
{
90
  kdDebug(4640) << "KCustomColors - constructor" << endl;
91
  setNumRows(3);
92
  setNumCols(6);
93
  fill(TRANSPARENT|OPAQUE_MASK);
94
  setFixedSize(numCols()*cellSize(), numRows()*cellSize());
95
  freecells = new bool[numRows()*numCols()];
96
  for(int i = 0; i < numRows()*numCols(); i++)
97
    freecells[i] = true;
98
  kdDebug(4640) << "KCustomColors - constructor - done" << endl;
99
}
100
101
KCustomColors::~KCustomColors()
102
{
103
  delete [] freecells;
104
}
105
106
void KCustomColors::mouseDoubleClickEvent(TQMouseEvent *e)
107
{
108
  int row = findRow( e->pos().y() );
109
  int col = findCol( e->pos().x() );
110
  int cell = row * numCols() + col;
111
  TQColor color=colorAt(cell);
112
  if(KColorDialog::getColor(color))
113
  {
114
    setColor(cell, color.rgb());
115
    emit newColor(color.rgb()|OPAQUE_MASK);
116
    freecells[cell] = false;
117
  }
118
}
119
120
void KCustomColors::addColor(uint c)
121
{
122
  if(!contains(c))
123
  {
124
    int f = getFreeCell();
125
    if(f != -1)
126
    {
127
      TQColor color(c);
128
      if(!color.isValid())
129
      {
130
        kdDebug(4640) << "KCustomColors::addColor: Not a valid color: " << c << endl;
131
        return;
132
      }
133
      //kdDebug(4640) << "KCustomColors::addColor: Adding color: " << c << " - " << tqRed(c) << " " << tqGreen(c) << " " << tqBlue(c) << endl;
134
      setColor(f, c);
135
      freecells[f] = false;
136
    }
137
  }
138
}
139
140
int KCustomColors::getFreeCell()
141
{
142
  for (int i = 0; i < numRows()*numCols(); i++)
143
  {
144
    if(freecells[i])
145
    {
146
      if(i+1 < numRows()*numCols())
147
        freecells[i+1] = true;
148
      else
149
        freecells[0] = true;
150
      return i;
151
      break;
152
    }
153
  }
154
  freeAllCells(); // start over again - not very elegant
155
  return 0;
156
}
157
158
void KCustomColors::freeAllCells()
159
{
160
  for (int i = 0; i < numRows()*numCols(); i++)
161
    freecells[i] = true;
162
}
163
164
void KCustomColors::clear()
165
{
166
  fill(TRANSPARENT);
167
  freeAllCells();
168
  update();
169
}
170
#include "tdeiconcolors.moc"
(-)tdegraphics/tdeiconedit/tdeiconcolors.h (+86 lines)
Line 0 Link Here
1
/*
2
    tdeiconedit - a small graphics drawing program for creating KDE icons
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#ifndef __KDRAWCOLORS_H__
22
#define __KDRAWCOLORS_H__
23
24
#include <tqpopupmenu.h>
25
26
#include <kcolordialog.h>
27
28
#include "kcolorgrid.h"
29
#include "utils.h"
30
31
class KDrawColors : public KColorGrid
32
{
33
  Q_OBJECT
34
  
35
public:
36
  KDrawColors(TQWidget *parent);
37
38
  //bool hasColor(uint);
39
40
signals:
41
  void newColor(uint);
42
43
protected:
44
  virtual void paintCell( TQPainter*, int, int );
45
  virtual void mouseReleaseEvent(TQMouseEvent*);
46
47
  int selected;
48
};
49
50
class KCustomColors : public KDrawColors
51
{
52
  Q_OBJECT
53
  
54
public:
55
  KCustomColors(TQWidget *parent);
56
  ~KCustomColors();
57
58
  void addColor(uint);
59
  void clear();
60
61
protected:
62
  virtual void mouseDoubleClickEvent(TQMouseEvent*);
63
  int getFreeCell();
64
  void freeAllCells();
65
66
protected:
67
  bool *freecells;
68
  TQPopupMenu *popup;
69
};
70
71
class KSysColors : public KDrawColors
72
{
73
  Q_OBJECT
74
  
75
public:
76
77
  KSysColors(TQWidget *parent);
78
79
};
80
81
82
83
#endif //__KDRAWCOLORS_H__
84
85
86
(-)tdegraphics/tdeiconedit/tdeiconconfig.cpp (+589 lines)
Line 0 Link Here
1
/*
2
    TDE Icon Editor - a small graphics drawing program for the TDE
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/
20
21
#include <stdlib.h>
22
23
#include <tqcheckbox.h>
24
#include <tqlayout.h>
25
#include <tqlineedit.h>
26
#include <tqvbox.h>
27
#include <tqbuttongroup.h>
28
#include <tqradiobutton.h>
29
30
#include <tdeaccel.h>
31
#include <kbuttonbox.h>
32
#include <tdeapplication.h>
33
#include <tdelocale.h>
34
#include <kcolorbutton.h>
35
#include <tdefiledialog.h>
36
#include <tdemessagebox.h>
37
#include <kdebug.h>
38
#include <kurlrequester.h>
39
40
#include "tdeiconconfig.h"
41
#include "tdeiconedit.h"
42
43
#ifndef PICS_INCLUDED
44
#define PICS_INCLUDED
45
#include "pics/logo.xpm"
46
#endif
47
48
// little helper:
49
static inline TQPixmap loadIcon( const char * name )
50
{
51
  return TDEGlobal::instance()->iconLoader()
52
    ->loadIcon( TQString::fromLatin1(name), TDEIcon::NoGroup, TDEIcon::SizeMedium );
53
}
54
55
KTemplateEditDlg::KTemplateEditDlg(TQWidget *parent) 
56
    : KDialogBase(parent, "KTemplateEditDlg", true, i18n( "Icon Template" ),
57
      Ok|Cancel )
58
{
59
  TQFrame *frame = makeMainWidget();
60
  TQVBoxLayout *ml = new TQVBoxLayout(frame);
61
  TQGroupBox *grp = new TQGroupBox(i18n("Template"), frame);
62
  grp->setColumnLayout(0, Qt::Vertical);
63
  grp->layout()->setSpacing(spacingHint());
64
  grp->layout()->setMargin(marginHint());
65
  TQGridLayout *l = new TQGridLayout(grp->layout());
66
67
  ln_name = new TQLineEdit( grp );
68
  connect( ln_name, TQT_SIGNAL( textChanged( const TQString & ) ), 
69
      TQT_SLOT( slotTextChanged() ) );
70
  TQLabel* lb_name = new TQLabel( ln_name, i18n( "Description:" ), grp );
71
72
  ln_path = new KURLRequester(grp);
73
  connect( ln_path, TQT_SIGNAL( textChanged( const TQString & ) ), 
74
      TQT_SLOT( slotTextChanged() ) );
75
  TQLabel* lb_path = new TQLabel( ln_path, i18n( "Path:" ), grp );
76
77
  l->addWidget(lb_name, 0, 0);
78
  l->addWidget(ln_name, 0, 1);
79
  l->addWidget(lb_path, 1, 0);
80
  l->addWidget(ln_path, 1, 1);
81
82
  ml->addWidget( grp, 1);
83
84
  slotTextChanged();
85
86
  setMinimumSize( 400, 150 );
87
}
88
89
void KTemplateEditDlg::slotTextChanged()
90
{
91
  TQString name = ln_name->text(), path = ln_path->url();
92
  enableButtonOK(name.length() && path.length());
93
}
94
95
void KTemplateEditDlg::setName(const TQString & name)
96
{
97
  ln_name->setText(name);
98
}
99
100
TQString KTemplateEditDlg::name()
101
{
102
  return ln_name->text();
103
}
104
105
void KTemplateEditDlg::setPath(const TQString & path)
106
{
107
  ln_path->setURL(path);
108
}
109
110
TQString KTemplateEditDlg::path()
111
{
112
  return ln_path->url();
113
}
114
115
KTemplateConfig::KTemplateConfig(TQWidget *parent) : TQWidget(parent)
116
{
117
  kdDebug(4640) << "KTemplateConfig constructor" << endl;
118
119
  btadd = btremove = btedit = 0L;
120
121
  TQGroupBox* grp = new TQGroupBox( i18n( "Templates" ), this );
122
  grp->setColumnLayout( 0, Qt::Horizontal );
123
124
  templates = new TDEIconListBox( grp );
125
  connect( templates, TQT_SIGNAL( highlighted( int ) ), 
126
      TQT_SLOT( checkSelection( int ) ) );
127
  connect( templates, TQT_SIGNAL(doubleClicked( TQListBoxItem * ) ), 
128
      TQT_SLOT( edit() ) );
129
130
  TQVBoxLayout* ml = new TQVBoxLayout( this );
131
  ml->addWidget( grp );
132
133
  TQVBoxLayout* l = new  TQVBoxLayout( grp->layout(), KDialog::spacingHint() );
134
  l->addWidget( templates );
135
136
  for( unsigned int i = 0; i <  TDEIconTemplateContainer::self()->count(); i++ )
137
    templates->insertItem( new TDEIconListBoxItem( *TDEIconTemplateContainer::self()->at( i ) ) ) ;
138
139
  KButtonBox *bbox = new KButtonBox( grp );
140
141
  btadd = bbox->addButton( i18n( "&Add..." ) );
142
  connect( btadd, TQT_SIGNAL( clicked() ), TQT_SLOT( add() ) );
143
144
  btedit = bbox->addButton( i18n( "&Edit..." ) );
145
  connect( btedit, TQT_SIGNAL( clicked() ), TQT_SLOT( edit() ) );
146
  btedit->setEnabled( false );
147
148
  btremove = bbox->addButton( i18n( "&Remove" ) );
149
  connect( btremove, TQT_SIGNAL( clicked() ), TQT_SLOT( remove() ) );
150
  btremove->setEnabled( false );
151
	
152
  bbox->addStretch( 1 );
153
	
154
  bbox->layout();
155
  l->addWidget( bbox );
156
}
157
158
KTemplateConfig::~KTemplateConfig()
159
{
160
}
161
162
void KTemplateConfig::saveSettings()
163
{
164
  kdDebug(4640) << "KTemplateConfig::saveSettings" << endl;
165
  
166
  TDEIconTemplateContainer::self()->clear();
167
168
  for(int i = 0; i < (int)templates->count(); i++)
169
  {
170
      TDEIconTemplateContainer::self()->append(templates->iconTemplate(i));
171
  }
172
  TDEIconTemplateContainer::self()->save();
173
  kdDebug(4640) << "KTemplateConfig::saveSettings - done" << endl;
174
175
}
176
177
void KTemplateConfig::checkSelection(int)
178
{
179
  kdDebug(4640) << "KTemplateConfig::checkSelection" << endl;
180
  if(templates->currentItem() != -1)
181
  {
182
    if(btremove) btremove->setEnabled(true);
183
    if(btedit) btedit->setEnabled(true);
184
  }
185
  else
186
  {
187
    if(btremove) btremove->setEnabled(false);
188
    if(btedit) btedit->setEnabled(false);
189
  }
190
  kdDebug(4640) << "KTemplateConfig::checkSelection - done" << endl;
191
}
192
193
void KTemplateConfig::remove()
194
{
195
  templates->removeItem(templates->currentItem());
196
}
197
198
void KTemplateConfig::add()
199
{
200
  KTemplateEditDlg dlg(this);
201
  if(dlg.exec())
202
  {
203
    TDEIconTemplate it;
204
    it.path = dlg.path();
205
    it.title = dlg.name();
206
    templates->insertItem(new TDEIconListBoxItem(it));
207
  }
208
}
209
210
void KTemplateConfig::edit()
211
{
212
  KTemplateEditDlg dlg(this);
213
  dlg.setPath(templates->path(templates->currentItem()));
214
  dlg.setName(templates->text(templates->currentItem()));
215
  templates->item(templates->currentItem());
216
  if(dlg.exec())
217
  {
218
    //Edit the entry
219
    TDEIconTemplate &it=templates->iconTemplate(templates->currentItem());
220
    it.path = dlg.path();
221
    it.title = dlg.name();
222
    static_cast<TDEIconListBoxItem*>(templates->item(templates->currentItem()))->reloadIcon();
223
    templates->update();
224
  }
225
}
226
227
KBackgroundConfig::KBackgroundConfig( TQWidget* parent )
228
  : TQWidget( parent )
229
{
230
  kdDebug(4640) << "KBackgroundConfig - constructor" << endl;
231
232
  lb_ex = 0L;
233
234
  TDEIconEditProperties *props = TDEIconEditProperties::self();
235
236
  pixpath = props->bgPixmap();
237
  pix.load(pixpath);
238
  if(pix.isNull())
239
  {
240
    kdDebug(4640) << "BGPIX: " << pixpath << " not valid!" << endl;
241
    TQPixmap pmlogo((const char**)logo);
242
    pix = pmlogo;
243
  }
244
245
  TQVBoxLayout *mainLayout = new TQVBoxLayout( this );
246
247
  TQGroupBox *grp1 = new TQGroupBox( i18n( "Select Background" ), this );
248
  grp1->setColumnLayout(0, Qt::Vertical );
249
  grp1->layout()->setSpacing( KDialog::spacingHint() );
250
  grp1->layout()->setMargin( KDialog::marginHint() );
251
  mainLayout->addWidget( grp1 );
252
253
  TQGridLayout *grp1Layout = new TQGridLayout( grp1->layout(), 3, 2 );
254
255
  TQButtonGroup* btngrp = new TQButtonGroup( grp1 );
256
  btngrp->setExclusive( true );
257
  btngrp->setFrameStyle( TQFrame::NoFrame );
258
  connect( btngrp, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( slotBackgroundMode( int ) ) );
259
  grp1Layout->addWidget( btngrp, 0, 0 );
260
261
  TQVBoxLayout *bgl = new TQVBoxLayout( btngrp, 5 );
262
263
  TQRadioButton *rbc = new TQRadioButton( i18n( "Use co&lor" ), btngrp );
264
  btngrp->insert( rbc, 0 );
265
  bgl->addWidget( rbc );
266
267
  TQRadioButton *rbp = new TQRadioButton( i18n( "Use pix&map" ), btngrp );
268
  btngrp->insert( rbp, 1 );
269
  bgl->addWidget( rbp );
270
271
  bgl->addStretch( 1 );
272
273
  TQVBox *bbox = new TQVBox( grp1 );
274
  grp1Layout->addWidget( bbox, 0, 1 );
275
276
  btcolor = new KColorButton(props->bgColor(), bbox) ;
277
  connect(btcolor, TQT_SIGNAL(changed(const TQColor &)), 
278
      TQT_SLOT( selectColor(const TQColor &)));
279
280
  btpix = new TQPushButton(i18n( "Choose..." ), bbox);
281
  connect( btpix, TQT_SIGNAL( clicked() ), TQT_SLOT( selectPixmap() ) );
282
283
  TQGroupBox *grp2 = new TQGroupBox( i18n( "Preview" ), this );
284
  mainLayout->addWidget( grp2, 1 );
285
286
  TQBoxLayout *l2 = new TQVBoxLayout( grp2, 15 );
287
288
  l2->addSpacing( 10 );
289
290
  lb_ex = new TQLabel( grp2 );
291
  lb_ex->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
292
  l2->addWidget( lb_ex );
293
294
/*
295
  l1->addWidget( btngrp, 0, AlignLeft );
296
  l1->addLayout( l1r );
297
*/
298
  bgmode = props->bgMode();
299
300
  if( bgmode == TQWidget::FixedPixmap )
301
  {
302
    btngrp->setButton( 1 );
303
    btcolor->setEnabled( false );
304
    lb_ex->setBackgroundPixmap( pix );
305
  }
306
  else
307
  {
308
    btngrp->setButton( 0 );
309
    btpix->setEnabled( false );
310
    lb_ex->setBackgroundColor(btcolor->color());
311
  }
312
}
313
314
KBackgroundConfig::~KBackgroundConfig()
315
{
316
}
317
318
void KBackgroundConfig::slotBackgroundMode(int id)
319
{
320
  if(id == 0)
321
  {
322
    bgmode = TQWidget::FixedColor;
323
    btpix->setEnabled(false);
324
    btcolor->setEnabled(true);
325
    if(lb_ex)
326
      lb_ex->setBackgroundColor(btcolor->color());
327
  }
328
  else
329
  {
330
    bgmode = TQWidget::FixedPixmap;
331
    btpix->setEnabled(true);
332
    btcolor->setEnabled(false);
333
    if(lb_ex)
334
      lb_ex->setBackgroundPixmap(pix);
335
  }
336
}
337
338
void KBackgroundConfig::saveSettings()
339
{
340
  kdDebug(4640) << "KBackgroundConfig::saveSettings" << endl;
341
  TDEIconEditProperties *props = TDEIconEditProperties::self();
342
  props->setBgMode( bgmode );
343
  props->setBgPixmap( pixpath );
344
  props->setBgColor( btcolor->color() );
345
  kdDebug(4640) << "KBackgroundConfig::saveSettings - done" << endl;
346
}
347
348
void KBackgroundConfig::selectColor(const TQColor & newColor)
349
{
350
  lb_ex->setBackgroundColor(newColor);
351
}
352
353
void KBackgroundConfig::selectPixmap()
354
{
355
  //  KURL url = KFileDialog::getOpenURL("/", "*.xpm");
356
  KURL url = KFileDialog::getImageOpenURL("/");
357
358
  if( url.isEmpty() )
359
    return;
360
361
  if( !url.isLocalFile() )
362
  {
363
    KMessageBox::sorry( 0L, i18n( "Only local files are supported yet." ) );
364
    return;
365
  }
366
367
  TQPixmap p(url.path());
368
369
  if( !p.isNull() )
370
  {
371
    lb_ex->setBackgroundPixmap( p );
372
    pixpath = url.path();
373
  }
374
}
375
376
KMiscConfig::KMiscConfig(TQWidget *parent) : TQWidget(parent)
377
{
378
  kdDebug(4640) << "KMiscConfig - constructor" << endl;
379
380
  TDEIconEditProperties* props = TDEIconEditProperties::self();
381
382
  TQBoxLayout *ml = new TQVBoxLayout( this, 0, 5 );
383
384
  TQCheckBox *cbp = new TQCheckBox( i18n( "Paste &transparent pixels" ), this );
385
  connect( cbp, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( pasteMode( bool ) ) );
386
  ml->addWidget(cbp);
387
388
  TQCheckBox *cbr = new TQCheckBox( i18n( "Show &rulers" ), this );
389
  connect( cbr, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( showRulers( bool ) ) );
390
  ml->addWidget(cbr);
391
392
  TQButtonGroup* btngrp = new TQButtonGroup( i18n( "Transparency Display" ), this);
393
  btngrp->setExclusive( true );
394
  connect( btngrp, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( slotTransparencyDisplayType( int ) ) );
395
  ml->addWidget( btngrp );
396
397
  TQVBoxLayout *tgl = new TQVBoxLayout( btngrp, KDialog::marginHint(), KDialog::spacingHint() );
398
  tgl->insertSpacing(0, 10);
399
400
  TQHBoxLayout *hl = new TQHBoxLayout(tgl);
401
402
  TQRadioButton *solidColorRButton = new TQRadioButton( i18n( "&Solid color:" ), btngrp );
403
  btngrp->insert( solidColorRButton, 0 );
404
  hl->addWidget( solidColorRButton );
405
406
  m_solidColorButton = new KColorButton(props->transparencySolidColor(), btngrp);
407
  btngrp->insert( m_solidColorButton, 2 );
408
  hl->addWidget(m_solidColorButton);
409
  //connect(btcolor, TQT_SIGNAL(changed(const TQColor &)), 
410
    //  TQT_SLOT( selectColor(const TQColor &)));
411
412
  TQRadioButton *checkerboardRButton = new TQRadioButton( i18n( "Checker&board" ), btngrp );
413
  btngrp->insert( checkerboardRButton, 1 );
414
  tgl->addWidget( checkerboardRButton );
415
416
  TQGridLayout *grid = new TQGridLayout(tgl, 3, 3);
417
  grid->addColSpacing(0, 40);
418
  grid->setColStretch(1, 1);
419
  grid->setColStretch(2, 1);
420
421
  m_checkerboardSizeCombo = new TQComboBox(btngrp);
422
  m_checkerboardSizeCombo->insertItem( i18n( "Small" ) );
423
  m_checkerboardSizeCombo->insertItem( i18n( "Medium" ) );
424
  m_checkerboardSizeCombo->insertItem( i18n( "Large" ) );
425
  m_checkerboardSizeCombo->setCurrentItem(props->checkerboardSize());
426
427
  TQLabel *label = new TQLabel(m_checkerboardSizeCombo, i18n("Si&ze:"), btngrp);
428
429
  grid->addWidget(label, 0, 1);
430
  grid->addWidget(m_checkerboardSizeCombo, 0, 2);
431
432
  m_checkerboardColor1Button = new KColorButton(props->checkerboardColor1(), btngrp);
433
  label = new TQLabel(m_checkerboardColor1Button, i18n("Color &1:"), btngrp);
434
435
  grid->addWidget(label, 1, 1);
436
  grid->addWidget(m_checkerboardColor1Button, 1, 2);
437
438
  m_checkerboardColor2Button = new KColorButton(props->checkerboardColor2(), btngrp);
439
  label = new TQLabel(m_checkerboardColor2Button, i18n("Color &2:"), btngrp);
440
441
  grid->addWidget(label, 2, 1);
442
  grid->addWidget(m_checkerboardColor2Button, 2, 2);
443
444
  if(props->transparencyDisplayType() == TDEIconEditGrid::TRD_CHECKERBOARD)
445
  {
446
    checkerboardRButton->setChecked(true);
447
    m_checkerboardColor1Button->setEnabled(true);
448
    m_checkerboardColor2Button->setEnabled(true);
449
    m_checkerboardSizeCombo->setEnabled(true);
450
451
    solidColorRButton->setChecked(false);
452
    m_solidColorButton->setEnabled(false);
453
  }
454
  else
455
  {
456
    checkerboardRButton->setChecked(false);
457
    m_checkerboardColor1Button->setEnabled(false);
458
    m_checkerboardColor2Button->setEnabled(false);
459
    m_checkerboardSizeCombo->setEnabled(false);
460
461
    solidColorRButton->setChecked(true);
462
    m_solidColorButton->setEnabled(true);
463
  }
464
465
  ml->addStretch(1);
466
467
  cbp->setChecked( props->pasteTransparent() );
468
  cbr->setChecked( props->showRulers() );
469
}
470
471
KMiscConfig::~KMiscConfig()
472
{
473
474
}
475
476
void KMiscConfig::saveSettings()
477
{
478
  kdDebug(4640) << "KMiscConfig::saveSettings" << endl;
479
  TDEIconEditProperties* props =  TDEIconEditProperties::self();
480
  props->setPasteTransparent( pastemode );
481
  props->setShowRulers( showrulers );
482
  if(m_solidColorButton->isEnabled())
483
  {
484
    props->setTransparencyDisplayType(TDEIconEditGrid::TRD_SOLIDCOLOR);
485
    props->setTransparencySolidColor(m_solidColorButton->color());
486
  }
487
  else
488
  {
489
    props->setTransparencyDisplayType(TDEIconEditGrid::TRD_CHECKERBOARD);
490
    props->setCheckerboardColor1(m_checkerboardColor1Button->color());
491
    props->setCheckerboardColor2(m_checkerboardColor2Button->color());
492
    props->setCheckerboardSize((TDEIconEditGrid::CheckerboardSize)m_checkerboardSizeCombo->currentItem());
493
  }
494
}
495
496
void KMiscConfig::pasteMode(bool mode)
497
{
498
  pastemode = mode;
499
}
500
501
void KMiscConfig::showRulers(bool mode)
502
{
503
  showrulers = mode;
504
}
505
506
void KMiscConfig::slotTransparencyDisplayType(int id)
507
{
508
  if(id == 0)
509
  {
510
    m_checkerboardColor1Button->setEnabled(false);
511
    m_checkerboardColor2Button->setEnabled(false);
512
    m_checkerboardSizeCombo->setEnabled(false);
513
514
    m_solidColorButton->setEnabled(true);
515
  }
516
  else
517
  if(id == 1)
518
  {
519
    m_checkerboardColor1Button->setEnabled(true);
520
    m_checkerboardColor2Button->setEnabled(true);
521
    m_checkerboardSizeCombo->setEnabled(true);
522
523
    m_solidColorButton->setEnabled(false);
524
  }
525
}
526
527
TDEIconConfig::TDEIconConfig(TQWidget *parent)
528
  : KDialogBase(KDialogBase::IconList, i18n("Configure"),
529
                         KDialogBase::Help |
530
                         KDialogBase::Ok |
531
                         KDialogBase::Apply |
532
                         KDialogBase::Cancel,
533
                         KDialogBase::Ok,
534
                         parent, "configDialog", true, true)
535
{
536
  setHelp(TQString());
537
  //KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
538
  connect(this, TQT_SIGNAL(finished()), this, TQT_SLOT(finis()));
539
540
  TQVBox* page = addVBoxPage(i18n("Icon Templates"), TQString(), loadIcon("icons"));
541
  temps = new KTemplateConfig(page);
542
543
  page = addVBoxPage(i18n("Background"), TQString(), loadIcon("background"));
544
  backs = new KBackgroundConfig(page);
545
546
  page = addVBoxPage(i18n("Icon Grid"), TQString(), loadIcon("tdeiconedit"));
547
  misc = new KMiscConfig(page);
548
549
  TQSize min(300, 400);
550
551
  if (300 < sizeHint().width()) { min.setWidth(sizeHint().width()); }
552
  if (400 < sizeHint().height()) { min.setHeight(sizeHint().height()); }
553
554
  resize(min);
555
}
556
557
TDEIconConfig::~TDEIconConfig()
558
{
559
  //delete dict;
560
}
561
562
void TDEIconConfig::slotApply()
563
{
564
  kdDebug(4640) << "TDEIconEditConfig::saveSettings" << endl;
565
566
  temps->saveSettings();
567
  backs->saveSettings();
568
  misc->saveSettings();
569
570
  for (TDEIconEdit* window = TDEIconEdit::windowList.first();
571
         window;
572
         window = TDEIconEdit::windowList.next())
573
  {
574
    window->updateProperties();
575
  }
576
}
577
578
void TDEIconConfig::slotOk()
579
{
580
    slotApply();
581
    KDialogBase::slotOk();
582
}
583
584
void TDEIconConfig::finis()
585
{
586
    delayedDestruct();
587
}
588
589
#include "tdeiconconfig.moc"
(-)tdegraphics/tdeiconedit/tdeiconconfig.h (+158 lines)
Line 0 Link Here
1
/*
2
    KDE Icon Editor - a small icon drawing program for the KDE.
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#ifndef __KICONCONFIG_H__
22
#define __KICONCONFIG_H__
23
24
#include <tqpixmap.h>
25
#include <kdialogbase.h>
26
27
#include "knew.h"
28
#include "utils.h"
29
#include "properties.h"
30
31
#ifdef HAVE_CONFIG_H
32
#include "config.h"
33
#endif
34
35
class TDEAccel;
36
class KKeyChooser;
37
class KColorButton;
38
class KURLRequester;
39
class TQComboBox;
40
41
class KTemplateEditDlg : public KDialogBase
42
{
43
  Q_OBJECT
44
  
45
public:
46
  KTemplateEditDlg(TQWidget *);
47
  ~KTemplateEditDlg() {};
48
49
  TQString name();
50
  TQString path();
51
  void setName(const TQString &);
52
  void setPath(const TQString &);
53
  
54
public slots:
55
  void slotTextChanged();
56
57
protected:
58
  TQLineEdit *ln_name;
59
  KURLRequester *ln_path;
60
};
61
62
class KTemplateConfig : public TQWidget
63
{
64
  Q_OBJECT
65
  
66
public:
67
  KTemplateConfig(TQWidget*);
68
  ~KTemplateConfig();
69
70
  void saveSettings();
71
72
protected slots:
73
  void add();
74
  void edit();
75
  void remove();
76
  void checkSelection(int);
77
78
protected:
79
  TDEIconListBox *templates;
80
  TQPushButton *btadd, *btedit, *btremove;
81
};
82
83
class KBackgroundConfig : public TQWidget
84
{
85
  Q_OBJECT
86
  
87
public:
88
  KBackgroundConfig(TQWidget *parent);
89
  ~KBackgroundConfig();
90
91
public slots:
92
  void saveSettings();
93
  void selectColor(const TQColor & newColor);
94
  void selectPixmap();
95
96
signals:
97
98
protected slots:
99
  void slotBackgroundMode(int);
100
101
protected:
102
  KColorButton *btcolor;
103
  TQPushButton *btpix;
104
  TQPixmap pix;
105
  TQString pixpath;
106
  TQWidget::BackgroundMode bgmode;
107
  TQLabel *lb_ex;
108
};
109
110
class KMiscConfig : public TQWidget
111
{
112
  Q_OBJECT
113
  
114
public:
115
  KMiscConfig(TQWidget *parent);
116
  ~KMiscConfig();
117
118
public slots:
119
  void saveSettings();
120
  void pasteMode(bool);
121
  void showRulers(bool);
122
123
protected slots:
124
  void slotTransparencyDisplayType(int);
125
126
signals:
127
128
protected:
129
  bool pastemode, showrulers;
130
  TQRadioButton *rbp;
131
  KColorButton *m_solidColorButton;
132
  KColorButton *m_checkerboardColor1Button;
133
  KColorButton *m_checkerboardColor2Button;
134
  TQComboBox *m_checkerboardSizeCombo;
135
};
136
137
class TDEIconConfig : public KDialogBase
138
{
139
  Q_OBJECT
140
  
141
142
public:
143
  
144
  TDEIconConfig(TQWidget *parent);
145
  ~TDEIconConfig();
146
147
protected slots:
148
  void slotApply();
149
  void slotOk();
150
  void finis();
151
152
protected:
153
  KTemplateConfig *temps;
154
  KBackgroundConfig *backs;
155
  KMiscConfig *misc;
156
};
157
158
#endif //__KICONCONFIG_H__
(-)tdegraphics/tdeiconedit/tdeiconedit.cpp (+497 lines)
Line 0 Link Here
1
/*
2
    tdeiconedit - a small graphics drawing program for the KDE
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/
20
21
#include <tqwhatsthis.h>
22
#include <tqtooltip.h>
23
24
#include <tdepopupmenu.h>
25
#include <kstdaction.h>
26
#include <tdeconfig.h>
27
#include <tdelocale.h>
28
#include <tdemessagebox.h>
29
#include <kdebug.h>
30
31
#include "tdeiconedit.h"
32
#include "palettetoolbar.h"
33
34
WindowList TDEIconEdit::windowList;
35
36
TDEIconEdit::TDEIconEdit(const TQImage image, const char *name)
37
 : TDEMainWindow(0, name)
38
{
39
    init();
40
    img = image;
41
    img.detach();
42
    grid->load(&img);
43
    grid->setModified(true);
44
}
45
46
TDEIconEdit::TDEIconEdit(KURL url, const char *name)
47
 : TDEMainWindow(0, name)
48
{
49
    init();
50
    icon->open(&img, url);
51
}
52
53
void TDEIconEdit::init()
54
{
55
  setMinimumSize( 600, 540 );
56
57
  windowList.append(this);
58
  setCaption(kapp->caption());
59
60
  m_paletteToolBar = 0L;
61
  statusbar = 0L;
62
63
  history = new KCommandHistory( actionCollection(), true );
64
65
  gridview = new KGridView(&img, history, this);
66
  grid = gridview->grid();
67
  icon = new TDEIconEditIcon(TQT_TQOBJECT(this), &grid->image());
68
69
  setAcceptDrops(true);
70
71
  setupActions();
72
  setupStatusBar();
73
  setStandardToolBarMenuEnabled( true );
74
75
  createGUI();
76
77
  connect(this, TQT_SIGNAL(newname(const TQString &)),
78
           TQT_SLOT( slotUpdateStatusName(const TQString &)));
79
80
  connect( icon, TQT_SIGNAL( saved()), TQT_SLOT(slotSaved()));
81
  connect( icon, TQT_SIGNAL( loaded(TQImage *)), grid, TQT_SLOT(load(TQImage *)));
82
  connect( icon, TQT_SIGNAL(opennewwin(const TQString &)),
83
           TQT_SLOT(slotNewWin(const TQString &)));
84
  connect(icon, TQT_SIGNAL(newname(const TQString &)),
85
           TQT_SLOT( slotUpdateStatusName(const TQString &)));
86
  connect(icon, TQT_SIGNAL(newmessage(const TQString &)),
87
           TQT_SLOT( slotUpdateStatusMessage(const TQString &)));
88
  connect(icon, TQT_SIGNAL(addrecent(const TQString &)),
89
           TQT_SLOT( addRecent(const TQString &)));
90
91
  connect( m_paletteToolBar, TQT_SIGNAL( newColor(uint)),
92
     grid, TQT_SLOT(setColorSelection(uint)));
93
94
  connect( grid, TQT_SIGNAL( changed(const TQPixmap &) ),
95
      m_paletteToolBar, TQT_SLOT( previewChanged(const TQPixmap &) ) );
96
  connect( grid, TQT_SIGNAL( addingcolor(uint) ),
97
      m_paletteToolBar, TQT_SLOT(addColor(uint)));
98
  connect( grid, TQT_SIGNAL( colorschanged(uint, uint*) ),
99
      m_paletteToolBar, TQT_SLOT(addColors(uint, uint*)));
100
101
  connect(grid, TQT_SIGNAL(sizechanged(int, int)),
102
           TQT_SLOT( slotUpdateStatusSize(int, int)));
103
  connect(grid, TQT_SIGNAL(poschanged(int, int)),
104
           TQT_SLOT( slotUpdateStatusPos(int, int)));
105
  connect(grid, TQT_SIGNAL(scalingchanged(int)),
106
           TQT_SLOT( slotUpdateStatusScaling(int)));
107
  connect(grid, TQT_SIGNAL(scalingchanged(int)),
108
           TQT_SLOT( slotUpdateZoom(int)));
109
  connect( grid, TQT_SIGNAL( addingcolor(uint) ),
110
           TQT_SLOT(slotUpdateStatusColors(uint)));
111
  connect(grid, TQT_SIGNAL(colorschanged(uint, uint*)),
112
           TQT_SLOT( slotUpdateStatusColors(uint, uint*)));
113
  connect(grid, TQT_SIGNAL(newmessage(const TQString &)),
114
           TQT_SLOT( slotUpdateStatusMessage(const TQString &)));
115
  connect(grid, TQT_SIGNAL(clipboarddata(bool)),
116
           TQT_SLOT( slotUpdatePaste(bool)));
117
  connect(grid, TQT_SIGNAL(colorSelected(uint)),
118
           m_paletteToolBar, TQT_SLOT(currentColorChanged(uint)));
119
  connect(grid, TQT_SIGNAL(modifiedchanged(bool)),
120
           TQT_SLOT( slotUpdateStatusModified(bool)));
121
  gridview->checkClipboard(); //Not very elegant, but fixes a buglet
122
123
  connect(grid, TQT_SIGNAL(selecteddata(bool)), TQT_SLOT( slotUpdateCopy(bool)));
124
125
  kdDebug(4640) << "Updating statusbar" << endl;
126
  slotUpdateStatusSize(grid->cols(), grid->rows());
127
  slotUpdateStatusScaling(grid->scaling());
128
129
  slotUpdateZoom( grid->scaling() );
130
131
  if(icon->url().length())
132
    slotUpdateStatusName(icon->url());
133
  else
134
    slotUpdateStatusName(i18n("Untitled"));
135
136
  slotUpdateCopy(false);
137
138
  uint *c = 0, n = 0;
139
  n = grid->getColors(c);
140
  slotUpdateStatusColors(n, c);
141
142
  setCentralWidget(gridview);
143
144
  applyMainWindowSettings( kapp->config(), "MainWindowSettings" );
145
  updateProperties();
146
147
  updateAccels();
148
  show();
149
  moveDockWindow( m_paletteToolBar, TQt::DockRight, true, 0 );
150
}
151
152
TDEIconEdit::~TDEIconEdit()
153
{
154
    windowList.remove(this);
155
156
    if (windowList.count() < 1)
157
    {
158
        kapp->quit();
159
    }
160
}
161
162
bool TDEIconEdit::queryClose()
163
{
164
    bool cancel = false;
165
    if (grid->isModified())
166
    {
167
        int r = KMessageBox::warningYesNoCancel(this,
168
	    i18n("The current file has been modified.\nDo you want to save it?"), TQString(), KStdGuiItem::save(), KStdGuiItem::discard());
169
170
        switch(r)
171
        {
172
            case KMessageBox::Yes:
173
                if (!icon->save(&grid->image()))
174
                {
175
                    cancel = true;
176
                }
177
                break;
178
            case KMessageBox::Cancel:
179
                cancel = true;
180
                break;
181
            case KMessageBox::No:
182
            default:
183
                break;
184
        }
185
    }
186
187
    if(!cancel)
188
    {
189
        writeConfig();
190
    }
191
    return (!cancel);
192
}
193
194
// this is for exit by request of the session manager
195
void TDEIconEdit::saveProperties(TDEConfig *config )
196
{
197
    kdDebug(4640) << "TDEIconEdit::saveProperties" << endl;
198
199
    config->writePathEntry("Name", icon->url());
200
}
201
202
// this is for instances opened by the session manager
203
void TDEIconEdit::readProperties(TDEConfig *config)
204
{
205
    kdDebug(4640) << "TDEIconEdit::readProperties" << endl;
206
207
    TQString entry = config->readPathEntry("Name"); // no default
208
    if (entry.isEmpty())  return;
209
    icon->open(&grid->image(), KURL::fromPathOrURL( entry ));
210
}
211
212
/*
213
    this is for normal exits or request from "Options->Save options".
214
*/
215
void TDEIconEdit::writeConfig()
216
{
217
    TDEConfig *config = kapp->config();
218
    m_actRecent->saveEntries( kapp->config() );
219
220
    TDEIconEditProperties::self()->save();
221
222
    saveMainWindowSettings( config, "MainWindowSettings" );
223
}
224
225
TQSize TDEIconEdit::sizeHint() const
226
{
227
    if(gridview)
228
        return gridview->sizeHint();
229
    else
230
        return TQSize(-1, -1);
231
}
232
233
void TDEIconEdit::setupActions()
234
{
235
  kdDebug(4640) << "setupActions" << endl;
236
237
  TDEAction *action;
238
  TDERadioAction *toolAction;
239
  TDEShortcut cut;
240
241
  // File Menu
242
  action = new TDEAction(i18n("New &Window"), "window_new", cut,
243
      TQT_TQOBJECT(this),  TQT_SLOT(slotNewWin()), actionCollection(), "file_new_window");
244
  action->setWhatsThis(i18n("New window\n\nOpens a new icon editor window."));
245
246
  action = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(slotNew()), actionCollection());
247
  action->setWhatsThis(i18n("New\n\nCreate a new icon, either from a"
248
      " template or by specifying the size"));
249
250
  action = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(slotOpen()), actionCollection());
251
  action->setWhatsThis(i18n("Open\n\nOpen an existing icon"));
252
253
  m_actRecent = KStdAction::openRecent(TQT_TQOBJECT(this),
254
      TQT_SLOT(slotOpenRecent(const KURL&)), actionCollection());
255
  m_actRecent->setMaxItems(15); // FIXME should be configurable!
256
  m_actRecent->loadEntries(kapp->config());
257
258
  action = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotSave()), actionCollection());
259
  action->setWhatsThis(i18n("Save\n\nSave the current icon"));
260
261
  KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(slotSaveAs()), actionCollection());
262
263
  action = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotPrint()), actionCollection());
264
  action->setWhatsThis(i18n("Print\n\nOpens a print dialog to let you print"
265
      " the current icon."));
266
267
  KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), actionCollection());
268
269
  // Edit Menu
270
271
  m_actCut = KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(slotCut()), actionCollection());
272
  m_actCut->setWhatsThis(i18n("Cut\n\nCut the current selection out of the"
273
      " icon.\n\n(Tip: You can make both rectangular and circular selections)"));
274
275
  m_actCopy = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), actionCollection());
276
  m_actCopy->setWhatsThis(i18n("Copy\n\nCopy the current selection out of the"
277
      " icon.\n\n(Tip: You can make both rectangular and circular selections)"));
278
279
  m_actPaste = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(slotPaste()), actionCollection());
280
  m_actPaste->setWhatsThis(i18n("Paste\n\n"
281
       "Paste the contents of the clipboard into the current icon.\n\n"
282
       "If the contents are larger than the current icon you can paste them"
283
       " in a new window.\n\n"
284
       "(Tip: Select \"Paste transparent pixels\" in the configuration dialog"
285
       " if you also want to paste transparency.)"));
286
287
  m_actPasteNew = new TDEAction( i18n( "Paste as &New" ), cut, TQT_TQOBJECT(grid),
288
      TQT_SLOT( editPasteAsNew() ), actionCollection(), "edit_paste_as_new" );
289
290
  KStdAction::clear(TQT_TQOBJECT(this), TQT_SLOT(slotClear()), actionCollection());
291
  KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), actionCollection());
292
293
  action = new TDEAction(i18n("Resi&ze..."), "transform", cut,
294
      TQT_TQOBJECT(grid),  TQT_SLOT(editResize()), actionCollection(), "edit_resize");
295
  action->setWhatsThis(i18n("Resize\n\nSmoothly resizes the icon while"
296
      " trying to preserve the contents"));
297
298
  action = new TDEAction(i18n("&GrayScale"), "grayscale", cut,
299
      TQT_TQOBJECT(grid),  TQT_SLOT(grayScale()), actionCollection(), "edit_grayscale");
300
  action->setWhatsThis(i18n("Gray scale\n\nGray scale the current icon.\n"
301
      "(Warning: The result is likely to contain colors not in the icon"
302
      " palette"));
303
304
  // View Menu
305
  m_actZoomIn = KStdAction::zoomIn(TQT_TQOBJECT(this), TQT_SLOT(slotZoomIn()),
306
      actionCollection());
307
  m_actZoomIn->setWhatsThis(i18n("Zoom in\n\nZoom in by one."));
308
309
  m_actZoomOut = KStdAction::zoomOut(TQT_TQOBJECT(this), TQT_SLOT(slotZoomOut()),
310
      actionCollection());
311
  m_actZoomOut->setWhatsThis(i18n("Zoom out\n\nZoom out by one."));
312
313
  TDEActionMenu *actMenu = new TDEActionMenu( i18n( "&Zoom" ), "viewmag",
314
      actionCollection(), "view_zoom" );
315
316
  // xgettext:no-c-format
317
  action = new TDEAction( i18n( "100%" ), cut, TQT_TQOBJECT(this), TQT_SLOT( slotZoom1() ),
318
      actionCollection(), "view_zoom_1" );
319
  actMenu->insert( action );
320
  // xgettext:no-c-format
321
  action = new TDEAction( i18n( "200%" ), cut, TQT_TQOBJECT(this), TQT_SLOT( slotZoom2() ),
322
      actionCollection(), "view_zoom_2" );
323
  actMenu->insert( action );
324
  // xgettext:no-c-format
325
  action = new TDEAction( i18n( "500%" ), cut, TQT_TQOBJECT(this), TQT_SLOT( slotZoom5() ),
326
      actionCollection(), "view_zoom_5" );
327
  actMenu->insert( action );
328
  // xgettext:no-c-format
329
  action = new TDEAction( i18n( "1000%" ), cut, TQT_TQOBJECT(this), TQT_SLOT( slotZoom10() ),
330
      actionCollection(), "view_zoom_10" );
331
  actMenu->insert( action );
332
333
  // Settings Menu
334
  KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureKeys()),
335
      actionCollection());
336
  KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureSettings()),
337
      actionCollection());
338
339
  createStandardStatusBarAction();
340
341
  TDEToggleAction *toggle;
342
343
  toggle = new TDEToggleAction( i18n( "Show &Grid" ), "grid",
344
      cut, TQT_TQOBJECT(this), TQT_SLOT( slotShowGrid() ), actionCollection(),
345
      "options_show_grid" );
346
  toggle->setCheckedState(i18n("Hide &Grid"));
347
  toggle->setWhatsThis( i18n( "Show grid\n\nToggles the grid in the icon"
348
      " edit grid on/off" ) );
349
  toggle->setChecked( TDEIconEditProperties::self()->showGrid() );
350
351
  // Tools Menu
352
  toolAction = new TDERadioAction(i18n("Color Picker"), "colorpicker",
353
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolPointer()), actionCollection(),
354
      "tool_find_pixel");
355
  toolAction->setExclusiveGroup("toolActions");
356
  toolAction->setWhatsThis(i18n("Color Picker\n\nThe color of the pixel clicked"
357
      " on will be the current draw color"));
358
359
  toolAction = new TDERadioAction(i18n("Freehand"), "paintbrush",
360
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFreehand()), actionCollection(),
361
      "tool_freehand");
362
  toolAction->setExclusiveGroup("toolActions");
363
  toolAction->setWhatsThis(i18n("Free hand\n\nDraw non-linear lines"));
364
365
  toolAction->setChecked( true );
366
  grid->setTool(TDEIconEditGrid::Freehand);
367
368
  toolAction = new TDERadioAction(i18n("Rectangle"), "rectangle",
369
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolRectangle()), actionCollection(),
370
      "tool_rectangle");
371
  toolAction->setExclusiveGroup("toolActions");
372
  toolAction->setWhatsThis(i18n("Rectangle\n\nDraw a rectangle"));
373
374
  toolAction = new TDERadioAction(i18n("Filled Rectangle"), "filledrectangle",
375
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFilledRectangle()), actionCollection(),
376
      "tool_filled_rectangle");
377
  toolAction->setExclusiveGroup("toolActions");
378
  toolAction->setWhatsThis(i18n("Filled rectangle\n\nDraw a filled rectangle"));
379
380
  toolAction = new TDERadioAction(i18n("Circle"), "circle",
381
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolCircle()), actionCollection(),
382
      "tool_circle");
383
  toolAction->setExclusiveGroup("toolActions");
384
  toolAction->setWhatsThis(i18n("Circle\n\nDraw a circle"));
385
386
  toolAction = new TDERadioAction(i18n("Filled Circle"), "filledcircle",
387
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFilledCircle()), actionCollection(),
388
      "tool_filled_circle");
389
  toolAction->setExclusiveGroup("toolActions");
390
  toolAction->setWhatsThis(i18n("Filled circle\n\nDraw a filled circle"));
391
392
  toolAction = new TDERadioAction(i18n("Ellipse"), "ellipse",
393
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolEllipse()), actionCollection(),
394
      "tool_ellipse");
395
  toolAction->setExclusiveGroup("toolActions");
396
  toolAction->setWhatsThis(i18n("Ellipse\n\nDraw an ellipse"));
397
398
  toolAction = new TDERadioAction(i18n("Filled Ellipse"), "filledellipse",
399
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFilledEllipse()), actionCollection(),
400
      "tool_filled_ellipse");
401
  toolAction->setExclusiveGroup("toolActions");
402
  toolAction->setWhatsThis(i18n("Filled ellipse\n\nDraw a filled ellipse"));
403
404
  toolAction = new TDERadioAction(i18n("Spray"), "airbrush",
405
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolSpray()), actionCollection(),
406
      "tool_spray");
407
  toolAction->setExclusiveGroup("toolActions");
408
  toolAction->setWhatsThis(i18n("Spray\n\nDraw scattered pixels in the"
409
      " current color"));
410
411
  toolAction = new TDERadioAction(i18n("Flood Fill"), "fill",
412
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFlood()), actionCollection(),
413
      "tool_flood_fill");
414
  toolAction->setExclusiveGroup("toolActions");
415
  toolAction->setWhatsThis(i18n("Flood fill\n\nFill adjoining pixels with"
416
      " the same color with the current color"));
417
418
  toolAction = new TDERadioAction(i18n("Line"), "line",
419
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolLine()), actionCollection(),
420
      "tool_line");
421
  toolAction->setExclusiveGroup("toolActions");
422
  toolAction->setWhatsThis(i18n("Line\n\nDraw a straight line vertically,"
423
      " horizontally or at 45 deg. angles"));
424
425
  toolAction = new TDERadioAction(i18n("Eraser (Transparent)"), "eraser",
426
      cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolEraser()), actionCollection(),
427
      "tool_eraser");
428
  toolAction->setExclusiveGroup("toolActions");
429
  toolAction->setWhatsThis(i18n("Erase\n\nErase pixels. Set the pixels to"
430
      " be transparent\n\n(Tip: If you want to draw transparency with a"
431
      " different tool, first click on \"Erase\" then on the tool you want"
432
      " to use)"));
433
434
  toolAction = new TDERadioAction(i18n("Rectangular Selection"),
435
      "selectrect", cut, TQT_TQOBJECT(this),  TQT_SLOT(slotToolSelectRect()),
436
      actionCollection(), "edit_select_rectangle");
437
  toolAction->setExclusiveGroup( "toolActions" );
438
  toolAction->setWhatsThis(i18n("Select\n\nSelect a rectangular section"
439
      " of the icon using the mouse."));
440
441
  toolAction = new TDERadioAction(i18n("Circular Selection"),
442
      "selectcircle", cut, TQT_TQOBJECT(this),  TQT_SLOT(slotToolSelectCircle()),
443
      actionCollection(), "edit_select_circle");
444
  toolAction->setExclusiveGroup( "toolActions" );
445
  toolAction->setWhatsThis(i18n("Select\n\nSelect a circular section of the"
446
      " icon using the mouse."));
447
}
448
449
void TDEIconEdit::updateAccels()
450
{
451
    actionCollection()->readShortcutSettings();
452
}
453
454
TQWidget *TDEIconEdit::createContainer( TQWidget *parent, int index,
455
        const TQDomElement &element, int &id )
456
{
457
    if ( element.attribute( "name" ) == "paletteToolBar" )
458
    {
459
        m_paletteToolBar = new PaletteToolBar( this, "paletteToolBar" );
460
        m_paletteToolBar->setText( i18n( "Palette Toolbar" ) );
461
        return m_paletteToolBar;
462
    }
463
464
    return KXMLGUIBuilder::createContainer( parent, index, element, id );
465
}
466
467
bool TDEIconEdit::setupStatusBar()
468
{
469
    statusbar = statusBar();
470
471
    TQString str = i18n("Statusbar\n\nThe statusbar gives information on"
472
        " the status of the current icon. The fields are:\n\n"
473
        "\t- Application messages\n\t- Cursor position\n\t- Size\n\t- Zoom factor\n"
474
        "\t- Number of colors");
475
    TQWhatsThis::add(statusBar(), str);
476
477
    statusbar->insertFixedItem("99999,99999", 0, true);
478
    statusbar->insertFixedItem("99999 x 99999", 1, true);
479
    statusbar->insertFixedItem(" 1:999", 2, true);
480
    str = i18n("Colors: %1").arg(9999999);
481
    statusbar->insertFixedItem(str, 3, true);
482
    statusbar->insertItem("", 4);
483
484
    statusbar->changeItem( "", 0);
485
    statusbar->changeItem( "", 1);
486
    statusbar->changeItem( "", 2);
487
    statusbar->changeItem( "", 3);
488
489
    return true;
490
}
491
492
void TDEIconEdit::addRecent(const TQString & path)
493
{
494
  m_actRecent->addURL(KURL( path ));
495
}
496
497
#include "tdeiconedit.moc"
(-)tdegraphics/tdeiconedit/tdeiconedit.desktop (+94 lines)
Line 0 Link Here
1
[Desktop Entry]
2
GenericName=Icon Editor
3
GenericName[af]=Ikoon Redigeerder
4
GenericName[ar]=محرر الإيقونات
5
GenericName[bg]=Редактор на икони
6
GenericName[br]=Aozer arlunioù
7
GenericName[bs]=Editor ikona
8
GenericName[ca]=Editor d'icones
9
GenericName[cs]=Editor ikon
10
GenericName[cy]=Golygydd Eiconau
11
GenericName[da]=Ikoneditor
12
GenericName[de]=Editor für Arbeitsflächensymbole
13
GenericName[el]=Επεξεργαστής εικονιδίων
14
GenericName[eo]=Ilo por pentri kaj redakti piktogramojn
15
GenericName[es]=Editor de iconos
16
GenericName[et]=Ikoonide redaktor
17
GenericName[eu]=Ikono editorea
18
GenericName[fa]=ویرایشگر شمایل
19
GenericName[fi]=Kuvakemuokkain
20
GenericName[fr]=Éditeur d'icônes
21
GenericName[ga]=Eagarthóir Deilbhíní
22
GenericName[gl]=Editor de iconas
23
GenericName[he]=עורך סמלים
24
GenericName[hi]=प्रतीक (आइकॉन) संपादक
25
GenericName[hr]=Uređivač ikona
26
GenericName[hu]=Ikonszerkesztő
27
GenericName[is]=Táknmyndaritill
28
GenericName[it]=Editor di icone
29
GenericName[ja]=アイコンエディタ
30
GenericName[kk]=Таңбаша өңдегіші
31
GenericName[km]=កម្មវិធី​និពន្ធ​រូបតំណាង
32
GenericName[lt]=Ženkliukų redaktorius
33
GenericName[lv]=Ikonu Redaktors
34
GenericName[ms]=Editor Ikon
35
GenericName[nb]=Ikonredigerer
36
GenericName[nds]=Lüttbildeditor
37
GenericName[ne]=प्रतिमा सम्पादक
38
GenericName[nl]=Pictogrambewerker
39
GenericName[nn]=Ikonredigering
40
GenericName[nso]=Mofetosi wa Seemedi
41
GenericName[pa]=ਆਈਕਾਨ ਸੰਪਾਦਕ
42
GenericName[pl]=Edytor ikon
43
GenericName[pt]=Editor de Ícones
44
GenericName[pt_BR]=Editor de Ícones
45
GenericName[ro]=Editor de iconiţe
46
GenericName[ru]=Редактор пиктограмм
47
GenericName[se]=Govašdoaimmaheaddji
48
GenericName[sk]=Editor ikon
49
GenericName[sl]=Urejevalnik ikon
50
GenericName[sr]=Уређивач икона
51
GenericName[sr@Latn]=Uređivač ikona
52
GenericName[sv]=Ikoneditor
53
GenericName[ta]= கேசின்னம் திருத்தி
54
GenericName[tg]=Муҳаррири ишорот
55
GenericName[th]=เครื่องมือแก้ไขไอคอน
56
GenericName[tr]=Simge Düzenleyici
57
GenericName[uk]=Редактор піктограм
58
GenericName[uz]=Nishoncha tahrirchi
59
GenericName[uz@cyrillic]=Нишонча таҳрирчи
60
GenericName[ven]=Musengulusi wa Aikhono
61
GenericName[wa]=Aspougneu d' imådjetes
62
GenericName[xh]=Umhleli we Icon
63
GenericName[zh_CN]=图标编辑器
64
GenericName[zh_HK]=圖示編輯器
65
GenericName[zh_TW]=圖示編輯器
66
GenericName[zu]=Umhleli we Icon
67
Name=TDEIconEdit
68
Name[af]=TDE-ikoon-redigeer
69
Name[ar]=برنامج TDEIconEdit
70
Name[cy]=KGolyguEicon
71
Name[eo]=Piktogramredaktilo
72
Name[hi]=के-आइकॉन-एडिट
73
Name[hr]=Uređivač ikona
74
Name[is]=Táknmyndaritill
75
Name[lv]=KIkonuRedaktors
76
Name[ms]=KIkonEdit
77
Name[ne]=केडीई प्रतिमा सम्पादन
78
Name[pl]=Edytor ikon
79
Name[pt_BR]=KEditor de Ícones
80
Name[ro]=Editor iconiţe
81
Name[sv]=TDEiconedit
82
Name[ta]=கேசின்னம் திருத்து
83
Name[tr]=K Icon Düzenleyici
84
Name[ven]=U sengulusa ha aikhono ya K
85
Name[zh_TW]=TDEIconEdit 圖示編輯器
86
MimeType=image/x-xpm;image/x-ico;image/png;image/jpeg;
87
Exec=tdeiconedit -caption "%c" %i %m %u
88
Icon=tdeiconedit
89
Path=
90
DocPath=tdeiconedit/index.html
91
Type=Application
92
Terminal=false
93
X-DCOP-ServiceType=Multi
94
Categories=Qt;TDE;Graphics;
(-)tdegraphics/tdeiconedit/tdeiconedit.h (+158 lines)
Line 0 Link Here
1
/*
2
    tdeiconedit - a small graphics drawing program for creating KDE icons
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#ifndef __TDEICONEDIT_H__
22
#define __TDEICONEDIT_H__
23
24
#include <tqwidget.h>
25
#include <tqpixmap.h>
26
#include <tqptrlist.h>
27
28
#include <tdemainwindow.h>
29
#include <kiconloader.h>
30
#include <tdemenubar.h>
31
#include <kstatusbar.h>
32
#include <tdetoolbar.h>
33
#include <tdeaccel.h>
34
#include <kurl.h>
35
#include <tdeaction.h>
36
37
#include "knew.h"
38
#include "tdeicon.h"
39
#include "tdeiconconfig.h"
40
#include "tdeicongrid.h"
41
#include "kresize.h"
42
#include "properties.h"
43
44
class TDEIconEdit;
45
class KCommandHistory;
46
typedef TQPtrList<TDEIconEdit> WindowList;
47
48
class TQWhatsThis;
49
class TQToolButton;
50
class TQLabel;
51
class PaletteToolBar;
52
53
/**
54
* TDEIconEdit
55
* @short TDEIconEdit
56
* @author Thomas Tanghus <tanghus@kde.org>
57
* @version 0.4
58
*/
59
class TDEIconEdit : public TDEMainWindow
60
{
61
    Q_OBJECT
62
  
63
public:
64
  TDEIconEdit( KURL url = KURL(), const char *name = "tdeiconedit");
65
  TDEIconEdit( const TQImage image, const char *name = "tdeiconedit");
66
  ~TDEIconEdit();
67
68
  virtual TQSize sizeHint() const;
69
  static WindowList windowList;
70
71
signals:
72
  void newname(const TQString &);
73
74
public slots:
75
  virtual void saveProperties(TDEConfig*);
76
  virtual void readProperties(TDEConfig*);
77
  void updateProperties();
78
79
protected slots:
80
  void slotNewWin(const TQString & url = 0);
81
  void slotNew();
82
  void slotOpen();
83
  void slotClose();
84
  void slotSave();
85
  void slotSaveAs();
86
  void slotPrint();
87
  void slotZoomIn();
88
  void slotZoomOut();
89
  void slotZoom1();
90
  void slotZoom2();
91
  void slotZoom5();
92
  void slotZoom10();
93
  void slotCopy();
94
  void slotCut();
95
  void slotPaste();
96
  void slotClear();
97
  void slotSaved();
98
  void slotSelectAll();
99
  void slotOpenRecent(const KURL&);
100
  void slotToolPointer();
101
  void slotToolFreehand();
102
  void slotToolRectangle();
103
  void slotToolFilledRectangle();
104
  void slotToolCircle();
105
  void slotToolFilledCircle();
106
  void slotToolEllipse();
107
  void slotToolFilledEllipse();
108
  void slotToolSpray();
109
  void slotToolFlood();
110
  void slotToolLine();
111
  void slotToolEraser();
112
  void slotToolSelectRect();
113
  void slotToolSelectCircle();
114
  void slotConfigureSettings();
115
  void slotConfigureKeys();
116
  void slotShowGrid();
117
  void slotUpdateZoom( int );
118
  void slotUpdateStatusColors(uint);
119
  void slotUpdateStatusColors(uint, uint*);
120
  void slotUpdateStatusPos(int, int);
121
  void slotUpdateStatusSize(int, int);
122
  void slotUpdateStatusMessage(const TQString &);
123
  void slotUpdateStatusName(const TQString &);
124
  void slotUpdateStatusModified(bool);
125
  void slotUpdateStatusScaling(int);
126
  void slotUpdatePaste(bool);
127
  void slotUpdateCopy(bool);
128
  void slotOpenBlank(const TQSize);
129
  void addRecent(const TQString &);
130
131
  virtual void dragEnterEvent(TQDragEnterEvent* event);
132
  virtual void dropEvent(TQDropEvent *e);
133
134
protected:
135
  void init();
136
  void setupActions();
137
  bool setupStatusBar();
138
  void writeConfig();
139
  void updateAccels();
140
141
  virtual bool queryClose();
142
  virtual TQWidget *createContainer( TQWidget*, int, const TQDomElement&, int& );
143
144
  KCommandHistory* history;
145
  PaletteToolBar *m_paletteToolBar;
146
  KStatusBar *statusbar;
147
  TDEIconEditGrid *grid;
148
  KGridView *gridview;
149
  TDEIconEditIcon *icon;
150
  TQImage img;
151
  TQString m_name;
152
153
  TDEAction *m_actCopy, *m_actPaste, *m_actCut, *m_actPasteNew;
154
  TDEAction *m_actZoomIn, *m_actZoomOut;
155
  TDERecentFilesAction *m_actRecent;
156
};
157
158
#endif //__TDEICONEDIT_H__
(-)tdegraphics/tdeiconedit/tdeiconeditslots.cpp (+543 lines)
Line 0 Link Here
1
/*
2
    TDE Icon Editor - a small graphics drawing program for the TDE
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/
20
21
#include <tqpaintdevicemetrics.h>
22
#include <tqpainter.h>
23
24
#include <kkeydialog.h>
25
#include <tdelocale.h>
26
#include <tdemessagebox.h>
27
#include <kdebug.h>
28
#include <kprinter.h>
29
#include <kurldrag.h>
30
31
#include "tdeiconedit.h"
32
#include "tdeiconcolors.h"
33
#include "palettetoolbar.h"
34
35
#ifndef PICS_INCLUDED
36
#define PICS_INCLUDED
37
#include "pics/logo.xpm"
38
#endif
39
40
void TDEIconEdit::updateProperties()
41
{
42
    TDEIconEditProperties *props = TDEIconEditProperties::self();
43
    gridview->setShowRulers(props->showRulers());
44
    if(props->bgMode() == TQWidget::FixedPixmap)
45
    {
46
        TQPixmap pix(props->bgPixmap());
47
        if(pix.isNull())
48
        {
49
            TQPixmap pmlogo((const char**)logo);
50
            pix = pmlogo;
51
        }
52
        gridview->viewPortWidget()->viewport()->setBackgroundPixmap(pix);
53
        m_paletteToolBar->setPreviewBackground(pix);
54
    }
55
    else
56
    {
57
        gridview->viewPortWidget()->viewport()
58
            ->setBackgroundColor(props->bgColor());
59
        m_paletteToolBar->setPreviewBackground(props->bgColor());
60
    }
61
    grid->setTransparencyDisplayType(props->transparencyDisplayType());
62
    grid->setTransparencySolidColor(props->transparencySolidColor());
63
    grid->setCheckerboardColor1(props->checkerboardColor1());
64
    grid->setCheckerboardColor2(props->checkerboardColor2());
65
    grid->setCheckerboardSize(props->checkerboardSize());
66
    grid->update();
67
}
68
69
void TDEIconEdit::slotNewWin(const TQString & url)
70
{
71
    //kdDebug(4640) << "TDEIconEdit::openNewWin() - " << url << endl;
72
73
    TDEIconEdit *w = new TDEIconEdit(KURL(url), "tdeiconedit");
74
    TQ_CHECK_PTR(w);
75
}
76
77
78
void TDEIconEdit::slotNew()
79
{
80
    bool cancel = false;
81
    if (grid->isModified())
82
    {
83
        int r = KMessageBox::warningYesNoCancel(this,
84
        i18n("The current file has been modified.\nDo you want to save it?"), TQString(), KStdGuiItem::save(), KStdGuiItem::discard());
85
86
        switch(r)
87
        {
88
            case KMessageBox::Yes:
89
                if(!icon->save(&grid->image()))
90
                {
91
                    cancel = true;
92
                }
93
                break;
94
95
            case KMessageBox::No:
96
                break;
97
98
            case KMessageBox::Cancel:
99
                cancel = true;
100
                break;
101
102
            default:
103
                break;
104
        }
105
    }
106
    if(!cancel)
107
    {
108
        KNewIcon newicon(this);
109
        if(newicon.exec())
110
        {
111
            int r = newicon.openStyle();
112
            if(r == KNewIcon::Blank)
113
            {
114
                grid->editClear();
115
                const TQSize s = newicon.templateSize();
116
                //kdDebug(4640) << "Size: " << s.width() << " x " << s.height() << endl;
117
                grid->setSize(s);
118
                grid->setModified(false);
119
            }
120
            else if(r == KNewIcon::Template)
121
            {
122
                TQString str = newicon.templatePath();
123
                icon->open(&grid->image(), KURL( str ));
124
            }
125
            icon->setUrl("");
126
            emit newname(i18n("Untitled"));
127
        }
128
    }
129
}
130
131
132
void TDEIconEdit::slotOpen()
133
{
134
    bool cancel = false;
135
136
    if( grid->isModified() )
137
    {
138
        int r = KMessageBox::warningYesNoCancel(this,
139
      i18n("The current file has been modified.\nDo you want to save it?"),TQString(), KStdGuiItem::save(), KStdGuiItem::discard());
140
141
        switch( r )
142
        {
143
            case KMessageBox::Yes:
144
                if(!icon->save( &grid->image() ))
145
                {
146
                    cancel = true;
147
                }
148
                break;
149
150
            case KMessageBox::No:
151
                break;
152
153
            case KMessageBox::Cancel:
154
                cancel = true;
155
                break;
156
157
            default:
158
                break;
159
        }
160
    }
161
162
    if( !cancel )
163
    {
164
        if (icon->promptForFile( &grid->image() ))
165
        {
166
            grid->setModified(false);
167
        }
168
    }
169
}
170
171
/*
172
    close only the current window
173
*/
174
void TDEIconEdit::slotClose()
175
{
176
    //kdDebug(4640) << "TDEIconEdit: Closing " <<  endl;
177
    close();
178
}
179
180
void TDEIconEdit::slotSave()
181
{
182
    //kdDebug(4640) << "TDEIconEdit: slotSave() " << endl;
183
    icon->save(&grid->image());
184
}
185
186
187
void TDEIconEdit::slotSaveAs()
188
{
189
    //kdDebug(4640) << "TDEIconEdit: slotSaveAs() " << endl;
190
    icon->saveAs(&grid->image());
191
}
192
193
194
void TDEIconEdit::slotPrint()
195
{
196
    KPrinter printer;
197
198
    if ( printer.setup(this, i18n("Print %1").arg(icon->url().section('/', -1))) )
199
    {
200
        int margin = 10, yPos = 0;
201
        printer.setCreator("TDE Icon Editor");
202
203
        TQPainter p;
204
        p.begin( &printer );
205
        TQFontMetrics fm = p.fontMetrics();
206
        // need width/height
207
        TQPaintDeviceMetrics metrics( &printer );
208
209
        p.drawText( margin, margin + yPos, metrics.width(), fm.lineSpacing(),
210
                        ExpandTabs | DontClip, icon->url() );
211
        yPos = yPos + fm.lineSpacing();
212
        p.drawPixmap( margin, margin + yPos, grid->pixmap() );
213
        p.end();
214
  }
215
}
216
217
void TDEIconEdit::slotZoomIn()
218
{
219
    grid->zoom(DirIn);
220
}
221
222
void TDEIconEdit::slotZoomOut()
223
{
224
    grid->zoom(DirOut);
225
}
226
227
void TDEIconEdit::slotZoom1()
228
{
229
    grid->zoomTo(1);
230
}
231
232
void TDEIconEdit::slotZoom2()
233
{
234
    grid->zoomTo(2);
235
}
236
237
void TDEIconEdit::slotZoom5()
238
{
239
    grid->zoomTo(5);
240
}
241
242
void TDEIconEdit::slotZoom10()
243
{
244
    grid->zoomTo(10);
245
}
246
247
void TDEIconEdit::slotCopy()
248
{
249
    grid->editCopy();
250
}
251
252
void TDEIconEdit::slotCut()
253
{
254
    grid->editCopy(true);
255
}
256
257
void TDEIconEdit::slotPaste()
258
{
259
    static_cast<TDERadioAction*>(actionCollection()
260
        ->action("tool_find_pixel"))->setChecked(true);
261
    grid->setTool(TDEIconEditGrid::Find);
262
    grid->editPaste();
263
}
264
265
void TDEIconEdit::slotClear()
266
{
267
    grid->editClear();
268
}
269
270
void TDEIconEdit::slotSelectAll()
271
{
272
    grid->setTool(TDEIconEditGrid::SelectRect);
273
    grid->editSelectAll();
274
}
275
276
void TDEIconEdit::slotOpenRecent(const KURL& iconFile)
277
{
278
    bool cancel = false;
279
280
    if( grid->isModified() )
281
    {
282
        int r = KMessageBox::warningYesNoCancel(this,
283
      i18n("The current file has been modified.\nDo you want to save it?"),TQString(), KStdGuiItem::save(), KStdGuiItem::discard());
284
285
        switch( r )
286
        {
287
            case KMessageBox::Yes:
288
                if (!icon->save( &grid->image() ))
289
                {
290
                    cancel = true;
291
                }
292
                break;
293
294
            case KMessageBox::No:
295
                break;
296
297
            case KMessageBox::Cancel:
298
                cancel = true;
299
                break;
300
301
            default:
302
                break;
303
        }
304
    }
305
306
    if( !cancel )
307
    {
308
        if(icon->open(&grid->image(), iconFile))
309
        {
310
            grid->setModified(false);
311
        }
312
    }
313
}
314
315
void TDEIconEdit::slotConfigureSettings()
316
{
317
    TDEIconConfig* c = new TDEIconConfig(this);
318
    c->exec();
319
    delete c;
320
}
321
322
void TDEIconEdit::slotConfigureKeys()
323
{
324
    KKeyDialog::configure(actionCollection());
325
326
    TDEIconEdit *ki = 0L;
327
    for (ki = windowList.first(); ki; ki = windowList.next())
328
    {
329
        if (ki != this)
330
        {
331
            ki->updateAccels();
332
        }
333
    }
334
}
335
336
void TDEIconEdit::slotShowGrid()
337
{
338
  bool b = TDEIconEditProperties::self()->showGrid();
339
  grid->setGrid( !b );
340
  TDEIconEditProperties::self()->setShowGrid( !b );
341
}
342
343
void TDEIconEdit::slotToolPointer()
344
{
345
    grid->setTool(TDEIconEditGrid::Find);
346
}
347
348
void TDEIconEdit::slotToolFreehand()
349
{
350
    grid->setTool(TDEIconEditGrid::Freehand);
351
}
352
353
void TDEIconEdit::slotToolRectangle()
354
{
355
    grid->setTool(TDEIconEditGrid::Rect);
356
}
357
358
void TDEIconEdit::slotToolFilledRectangle()
359
{
360
    grid->setTool(TDEIconEditGrid::FilledRect);
361
}
362
363
void TDEIconEdit::slotToolCircle()
364
{
365
    grid->setTool(TDEIconEditGrid::Circle);
366
}
367
368
void TDEIconEdit::slotToolFilledCircle()
369
{
370
    grid->setTool(TDEIconEditGrid::FilledCircle);
371
}
372
373
void TDEIconEdit::slotToolEllipse()
374
{
375
    grid->setTool(TDEIconEditGrid::Ellipse);
376
}
377
378
void TDEIconEdit::slotToolFilledEllipse()
379
{
380
    grid->setTool(TDEIconEditGrid::FilledEllipse);
381
}
382
383
void TDEIconEdit::slotToolSpray()
384
{
385
    grid->setTool(TDEIconEditGrid::Spray);
386
}
387
388
void TDEIconEdit::slotToolFlood()
389
{
390
    grid->setTool(TDEIconEditGrid::FloodFill);
391
}
392
393
void TDEIconEdit::slotToolLine()
394
{
395
    grid->setTool(TDEIconEditGrid::Line);
396
}
397
398
void TDEIconEdit::slotToolEraser()
399
{
400
    grid->setTool(TDEIconEditGrid::Eraser);
401
}
402
403
void TDEIconEdit::slotToolSelectRect()
404
{
405
    grid->setTool(TDEIconEditGrid::SelectRect);
406
}
407
408
void TDEIconEdit::slotToolSelectCircle()
409
{
410
    grid->setTool(TDEIconEditGrid::SelectCircle);
411
}
412
413
void TDEIconEdit::slotSaved()
414
{
415
    grid->setModified(false);
416
}
417
418
void TDEIconEdit::slotUpdateZoom( int s )
419
{
420
    m_actZoomOut->setEnabled( s>1 );
421
}
422
423
void TDEIconEdit::slotUpdateStatusPos(int x, int y)
424
{
425
    TQString str = i18n("Status Position", "%1, %2").arg(x).arg(y);
426
    statusbar->changeItem( str, 0);
427
}
428
429
void TDEIconEdit::slotUpdateStatusSize(int x, int y)
430
{
431
    TQString str = i18n("Status Size", "%1 x %2").arg(x).arg(y);
432
    statusbar->changeItem( str, 1);
433
}
434
435
void TDEIconEdit::slotUpdateStatusScaling(int s)
436
{
437
    TDEIconEditProperties::self()->setGridScale( s );
438
    TQString str;
439
440
    str.sprintf("1:%d", s);
441
    statusbar->changeItem( str, 2);
442
}
443
444
void TDEIconEdit::slotUpdateStatusColors(uint)
445
{
446
    TQString str = i18n("Colors: %1").arg(grid->numColors());
447
    statusbar->changeItem( str, 3);
448
}
449
450
void TDEIconEdit::slotUpdateStatusColors(uint n, uint *)
451
{
452
    TQString str = i18n("Colors: %1").arg(n);
453
    statusbar->changeItem( str, 3);
454
}
455
456
457
void TDEIconEdit::slotUpdateStatusMessage(const TQString & msg)
458
{
459
    statusbar->changeItem( msg, 4);
460
}
461
462
463
void TDEIconEdit::slotUpdateStatusName(const TQString & name)
464
{
465
    m_name = name;
466
467
    TQString text = m_name;
468
469
    if(grid->isModified())
470
    {
471
        text += " ["+i18n("modified")+"]";
472
    }
473
474
    setCaption(text);
475
}
476
477
478
void TDEIconEdit::slotUpdateStatusModified(bool)
479
{
480
    slotUpdateStatusName(m_name);
481
}
482
483
void TDEIconEdit::slotUpdatePaste(bool state)
484
{
485
    m_actPaste->setEnabled(state);
486
    m_actPasteNew->setEnabled(state);
487
}
488
489
490
void TDEIconEdit::slotUpdateCopy(bool state)
491
{
492
    m_actCopy->setEnabled(state);
493
    m_actCut->setEnabled(state);
494
}
495
496
497
void TDEIconEdit::slotOpenBlank(const TQSize s)
498
{
499
    grid->loadBlank( s.width(), s.height());
500
}
501
502
503
void TDEIconEdit::dragEnterEvent(TQDragEnterEvent* e)
504
{
505
  e->accept(KURLDrag::canDecode(e));
506
}
507
508
509
/*
510
    accept drop of a file - opens file in current window
511
    old code to drop image, as image, should be removed
512
*/
513
void TDEIconEdit::dropEvent( TQDropEvent *e )
514
{
515
    //kdDebug(4640) << "Got TQDropEvent!" << endl;
516
517
    KURL::List fileList;
518
    bool loadedinthis = false;
519
520
    if(KURLDrag::decode(e, fileList))
521
    {
522
        for(KURL::List::ConstIterator it = fileList.begin(); 
523
            it != fileList.end(); ++it)
524
        {
525
            //kdDebug(4640) << "In dropEvent for "  <<  (*it).prettyURL() << endl;
526
            const KURL &url = *it;
527
            if(url.isValid())
528
            {
529
                if (!grid->isModified() && !loadedinthis)
530
                {
531
                    icon->open(&grid->image(), url);
532
                    loadedinthis = true;
533
                }
534
                else
535
                {
536
                    slotNewWin(url.url());
537
                }
538
            }
539
        }
540
    }
541
}
542
543
(-)tdegraphics/tdeiconedit/tdeiconeditui.rc (+66 lines)
Line 0 Link Here
1
<!DOCTYPE kpartgui>
2
<kpartgui version="2" name="tdeiconedit">
3
<MenuBar>
4
  <Menu name="file"><text>&amp;File</text>
5
    <Action name="file_new_window" append="new_merge"/>
6
  </Menu>
7
  <Menu name="edit"><text>&amp;Edit</text>
8
    <Action name="edit_paste_as_new" append="edit_paste_merge"/>
9
    <Separator/>
10
    <Action name="edit_resize"/>
11
    <Action name="edit_grayscale"/>
12
  </Menu>
13
  <Menu name="tools"><text>&amp;Tools</text>
14
    <Action name="tool_freehand"/>
15
    <Action name="tool_find_pixel"/>
16
    <Action name="tool_rectangle"/>
17
    <Action name="tool_filled_rectangle"/>
18
    <Action name="tool_circle"/>
19
    <Action name="tool_filled_circle"/>
20
    <Action name="tool_ellipse"/>
21
    <Action name="tool_filled_ellipse"/>
22
    <Action name="tool_spray"/>
23
    <Action name="tool_flood_fill"/>
24
    <Action name="tool_line"/>
25
    <Action name="tool_eraser"/>
26
    <Separator/>
27
    <Action name="edit_select_rectangle"/>
28
    <Action name="edit_select_circle"/>
29
  </Menu>
30
  <Menu name="settings"><text>&amp;Settings</text>
31
    <Action name="options_show_grid" append="show_merge"/>
32
  </Menu>
33
</MenuBar>
34
<ToolBar name="mainToolBar" newline="true" fullwidth="true">
35
  <text>Main Toolbar</text>
36
  <Action name="view_zoom_in"/>
37
  <Action name="view_zoom_out"/>
38
  <Separator/>
39
  <Action name="edit_resize"/>
40
  <Action name="edit_grayscale"/>
41
  <Separator/>
42
  <Action name="options_show_grid"/>
43
</ToolBar>
44
<ToolBar name="toolsToolBar" position="left" noEdit="true">
45
  <text>Tools Toolbar</text>
46
  <Action name="tool_freehand"/>
47
  <Action name="tool_find_pixel"/>
48
  <Action name="tool_rectangle"/>
49
  <Action name="tool_filled_rectangle"/>
50
  <Action name="tool_circle"/>
51
  <Action name="tool_filled_circle"/>
52
  <Action name="tool_ellipse"/>
53
  <Action name="tool_filled_ellipse"/>
54
  <Action name="tool_spray"/>
55
  <Action name="tool_flood_fill"/>
56
  <Action name="tool_line"/>
57
  <Action name="tool_eraser"/>
58
  <Separator/>
59
  <Action name="edit_select_rectangle"/>
60
  <Action name="edit_select_circle"/>
61
</ToolBar>
62
<ToolBar name="paletteToolBar" position="right" noEdit="true">
63
  <text>Pallette Toolbar</text>
64
</ToolBar>
65
</kpartgui>
66
(-)tdegraphics/tdeiconedit/tdeicongrid.cpp (+2263 lines)
Line 0 Link Here
1
/*
2
    TDE Icon Editor - a small graphics drawing program for the TDE.
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    Includes portions of code from TQt,
6
    Copyright (C) 1992-2000 Trolltech AS.
7
8
    This program is free software; you can redistribute it and/or
9
    modify it under the terms of the GNU General Public
10
    License as published by the Free Software Foundation; either
11
    version 2 of the License, or (at your option) any later version.
12
13
    This program is distributed in the hope that it will be useful,
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
    General Public License for more details.
17
18
    You should have received a copy of the GNU Library General Public License
19
    along with this library; see the file COPYING.LIB.  If not, write to
20
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
    Boston, MA 02110-1301, USA.
22
*/
23
24
#include <stdlib.h>
25
26
#include <tqpainter.h>
27
#include <tqwhatsthis.h>
28
#include <tqscrollview.h>
29
#include <tqbitmap.h>
30
#include <tqclipboard.h>
31
#include <tqdatetime.h>
32
33
#include <kiconloader.h>
34
#include <kruler.h>
35
#include <tdelocale.h>
36
#include <tdemessagebox.h>
37
#include <kdebug.h>
38
39
#include "kresize.h"
40
#include "properties.h"
41
#include "tdeicongrid.h"
42
#include "tdeiconedit.h"
43
#ifndef PICS_INCLUDED
44
#include "pics/logo.xpm"
45
#define PICS_INCLUDED
46
#endif
47
48
#include <X11/Xos.h>
49
50
void DrawCommand::execute()
51
{
52
	oldcolor = *((uint*)image->scanLine(y) + x);
53
	*((uint*)image->scanLine(y) + x) = newcolor; 
54
        int cell = y * grid->numCols() + x;
55
        grid->setUndoColor( cell, newcolor, false );
56
}
57
58
void DrawCommand::unexecute()
59
{
60
	*((uint*)image->scanLine(y) + x) = oldcolor; 
61
        int cell = y * grid->numCols() + x;
62
        grid->setUndoColor( cell, oldcolor, false );
63
}
64
65
void RepaintCommand::execute()
66
{
67
        grid->update( area);
68
}
69
70
KGridView::KGridView(TQImage *image, KCommandHistory* history, TQWidget *parent, const char *name)
71
: TQFrame(parent, name)
72
{
73
  _corner = 0L;
74
  _hruler = _vruler = 0L;
75
  _grid = 0L;
76
77
  acceptdrop = false;
78
79
  TDEIconEditProperties *props = TDEIconEditProperties::self();
80
81
  viewport = new TQScrollView(this);
82
  TQ_CHECK_PTR(viewport);
83
84
  _grid = new TDEIconEditGrid(image, history, viewport->viewport());
85
  TQ_CHECK_PTR(_grid);
86
  viewport->addChild(_grid);
87
  _grid->setGrid(props->showGrid());
88
  _grid->setCellSize(props->gridScale());
89
90
  TQString str = i18n( "Icon draw grid\n\nThe icon grid is the area where"
91
      " you draw the icons.\nYou can zoom in and out using the magnifying"
92
      " glasses on the toolbar.\n(Tip: Hold the magnify button down for a"
93
      " few seconds to zoom to a predefined scale)" );
94
  TQWhatsThis::add( _grid, str );
95
96
  if(props->bgMode() == FixedPixmap)
97
  {
98
    TQPixmap pix(props->bgPixmap());
99
    if(pix.isNull())
100
    {
101
      TQPixmap pmlogo((const char **)logo);
102
      pix = pmlogo;
103
    }
104
    viewport->viewport()->setBackgroundPixmap(pix);
105
    _grid->setBackgroundPixmap(pix);
106
  }
107
  else
108
  {
109
    viewport->viewport()->setBackgroundColor(props->bgColor());
110
  }
111
112
  _corner = new TQFrame(this);
113
  _corner->setFrameStyle(TQFrame::WinPanel | TQFrame::Raised);
114
115
  _hruler = new KRuler(Qt::Horizontal, this);
116
  _hruler->setEndLabel(i18n("width"));
117
  _hruler->setOffset( -2 );
118
  _hruler->setRange(0, 1000);
119
120
  _vruler = new KRuler(Qt::Vertical, this);
121
  _vruler->setEndLabel(i18n("height"));
122
  _vruler->setOffset( -2 );
123
  _vruler->setRange(0, 1000);
124
125
  str = i18n( "Rulers\n\nThis is a visual representation of the current"
126
      " cursor position" );
127
  TQWhatsThis::add( _hruler, str );
128
  TQWhatsThis::add( _vruler, str );
129
130
  connect(_grid, TQT_SIGNAL(scalingchanged(int)), TQT_SLOT(scalingChange(int)));
131
  connect(_grid, TQT_SIGNAL(sizechanged(int, int)), TQT_SLOT(sizeChange(int, int)));
132
  connect(_grid, TQT_SIGNAL(needPainting()), TQT_SLOT(paintGrid()));
133
  connect( _grid, TQT_SIGNAL(xposchanged(int)), _hruler, TQT_SLOT(slotNewValue(int)) );
134
  connect( _grid, TQT_SIGNAL(yposchanged(int)), _vruler, TQT_SLOT(slotNewValue(int)) );
135
  connect(viewport, TQT_SIGNAL(contentsMoving(int, int)), TQT_SLOT(moving(int, int)));
136
  
137
  setSizes();
138
  TQResizeEvent e(size(), size());
139
  resizeEvent(&e);
140
}
141
142
void KGridView::paintGrid()
143
{
144
  _grid->update(viewRect());
145
}
146
147
void KGridView::setSizes()
148
{
149
  if(TDEIconEditProperties::self()->showRulers())
150
  {
151
    _hruler->setLittleMarkDistance(_grid->scaling());
152
    _vruler->setLittleMarkDistance(_grid->scaling());
153
154
    _hruler->setMediumMarkDistance(5);
155
    _vruler->setMediumMarkDistance(5);
156
157
    _hruler->setBigMarkDistance(10);
158
    _vruler->setBigMarkDistance(10);
159
160
    _hruler->setShowTinyMarks(true);
161
    _hruler->setShowLittleMarks(false);
162
    _hruler->setShowMediumMarks(true);
163
    _hruler->setShowBigMarks(true);
164
    _hruler->setShowEndMarks(true);
165
166
    _vruler->setShowTinyMarks(true);
167
    _vruler->setShowLittleMarks(false);
168
    _vruler->setShowMediumMarks(true);
169
    _vruler->setShowBigMarks(true);
170
    _vruler->setShowEndMarks(true);
171
172
    _hruler->setPixelPerMark(_grid->scaling());
173
    _vruler->setPixelPerMark(_grid->scaling());
174
175
    _hruler->setMaxValue(_grid->width()+20);
176
    _vruler->setMaxValue(_grid->height()+20);
177
178
    _hruler->show();
179
    _vruler->show();
180
181
    _corner->show();
182
    //resize(_grid->width()+_vruler->width(), _grid->height()+_hruler->height());
183
  }
184
  else
185
  {
186
    _hruler->hide();
187
    _vruler->hide();
188
    _corner->hide();
189
    //resize(_grid->size());
190
  }
191
}
192
193
void KGridView::sizeChange(int, int)
194
{
195
    setSizes();
196
}
197
198
void KGridView::moving(int x, int y)
199
{
200
    _hruler->setOffset(abs(x));
201
    _vruler->setOffset(abs(y));
202
}
203
204
void KGridView::scalingChange(int)
205
{
206
    setSizes();
207
}
208
209
void KGridView::setShowRulers(bool mode)
210
{
211
    TDEIconEditProperties::self()->setShowRulers( mode );
212
    setSizes();
213
    TQResizeEvent e(size(), size());
214
    resizeEvent(&e);
215
}
216
217
void KGridView::setAcceptDrop(bool a)
218
{
219
    if(a == acceptdrop) return;
220
    acceptdrop = a;
221
    paintDropSite();
222
}
223
224
void KGridView::checkClipboard()
225
{
226
     _grid->checkClipboard();
227
}
228
229
const TQRect KGridView::viewRect()
230
{
231
    int x, y, cx, cy;
232
    if(viewport->horizontalScrollBar()->isVisible())
233
    {
234
        x = viewport->contentsX();
235
        cx = viewport->viewport()->width();
236
    }
237
    else
238
    {
239
        x = 0;
240
        cx = viewport->contentsWidth();
241
    }
242
243
    if(viewport->verticalScrollBar()->isVisible())
244
    {
245
        y = viewport->contentsY();
246
        cy = viewport->viewport()->height();
247
    }
248
    else
249
    {
250
        y = 0;
251
        cy = viewport->contentsHeight();
252
    }
253
254
    return TQRect(x, y, cx, cy);
255
}
256
257
void KGridView::paintDropSite()
258
{
259
    TQPainter p;
260
    p.begin( _grid );
261
    p.setRasterOp (NotROP);
262
    p.drawRect(viewRect());
263
    p.end();
264
}
265
266
void KGridView::paintEvent(TQPaintEvent *)
267
{
268
  if(acceptdrop)
269
    paintDropSite();
270
}
271
272
273
void KGridView::resizeEvent(TQResizeEvent*)
274
{
275
  kdDebug(4640) << "KGridView::resizeEvent" << endl;
276
277
  setSizes();
278
279
  if(TDEIconEditProperties::self()->showRulers())
280
  {
281
    _hruler->setGeometry(_vruler->width(), 0, width(), _hruler->height());
282
    _vruler->setGeometry(0, _hruler->height(), _vruler->width(), height());
283
284
    _corner->setGeometry(0, 0, _vruler->width(), _hruler->height());
285
    viewport->setGeometry(_corner->width(), _corner->height(),
286
                   width()-_corner->width(), height()-_corner->height());
287
  }
288
  else
289
    viewport->setGeometry(0, 0, width(), height());
290
}
291
292
293
TDEIconEditGrid::TDEIconEditGrid(TQImage *image, KCommandHistory* h, TQWidget *parent, const char *name)
294
 : KColorGrid(parent, name, 1)
295
{
296
    img = image;
297
    history = h;
298
    selected = 0;
299
    m_command = 0;
300
301
    // the 42 normal kde colors - there can be an additional
302
    // 18 custom colors in the custom colors palette
303
    for(uint i = 0; i < 42; i++)
304
        iconcolors.append(iconpalette[i]);
305
306
    setupImageHandlers();
307
    btndown = isselecting = ispasting = modified = false;
308
309
    img->create(32, 32, 32);
310
    img->setAlphaBuffer(true);
311
    clearImage(img);
312
313
    currentcolor = tqRgb(0,0,0)|OPAQUE_MASK;
314
    emit colorSelected(currentcolor);
315
316
    setMouseTracking(true);
317
318
    setNumRows(32);
319
    setNumCols(32);
320
    fill(TRANSPARENT);
321
322
    connect( kapp->clipboard(), TQT_SIGNAL(dataChanged()), TQT_SLOT(checkClipboard()));
323
    connect( h, TQT_SIGNAL(commandExecuted()), this, TQT_SLOT(updatePreviewPixmap() ));    
324
    createCursors();
325
326
    TDEIconEditProperties *props = TDEIconEditProperties::self();
327
328
    setTransparencyDisplayType(props->transparencyDisplayType());
329
    setTransparencySolidColor(props->transparencySolidColor());
330
    setCheckerboardColor1(props->checkerboardColor1());
331
    setCheckerboardColor2(props->checkerboardColor2());
332
    setCheckerboardSize(props->checkerboardSize());
333
}
334
335
TDEIconEditGrid::~TDEIconEditGrid()
336
{
337
    kdDebug(4640) << "TDEIconEditGrid - destructor: done" << endl;
338
}
339
340
void TDEIconEditGrid::paintEvent(TQPaintEvent *e)
341
{
342
  const TQRect cellsRect(0, 0, numCols() * cellSize(), numRows() * cellSize());
343
  const TQRect paintCellsRect = cellsRect.intersect(e->rect());
344
345
  if(!paintCellsRect.isEmpty())
346
  {
347
    //TQTime time;
348
349
    //time.start();
350
351
    TQRgb *imageBuffer = new TQRgb[paintCellsRect.width() * paintCellsRect.height()];
352
    const int cellsize = cellSize();
353
    const int firstCellPixelsRemaining = cellsize - paintCellsRect.left() % cellsize;
354
355
    if(transparencyDisplayType() == TRD_SOLIDCOLOR)
356
    {
357
      const TQRgb backgroundColor = transparencySolidColor().rgb();
358
      const int backgroundRed = transparencySolidColor().red();
359
      const int backgroundGreen = transparencySolidColor().green();
360
      const int backgroundBlue = transparencySolidColor().blue();
361
      const int firstCellX = paintCellsRect.left() / cellsize;
362
363
      for(int y = paintCellsRect.top(); y <= paintCellsRect.bottom(); y++)
364
      {
365
        TQRgb *dest = imageBuffer + (y - paintCellsRect.top()) * paintCellsRect.width();
366
        
367
        if(y % cellsize == 0 || dest == imageBuffer)
368
        {
369
          // Paint the first scanline in each block of cellSize() identical lines.
370
          // The remaineder can just be copied from this one.
371
          const int cellY = y / cellsize;
372
          TQRgb *src = gridcolors.data() + cellY * numCols() + firstCellX;
373
374
          TQRgb sourcePixel = *src++;
375
          int sourceAlpha = tqAlpha(sourcePixel);
376
          
377
          TQRgb c;
378
379
          if(sourceAlpha == 255)
380
          {
381
            c = sourcePixel;
382
          }
383
          else
384
          if(sourceAlpha == 0)
385
          {
386
            c = backgroundColor;
387
          }
388
          else
389
          {
390
            const int sourceRed = tqRed(sourcePixel);
391
            const int sourceGreen = tqGreen(sourcePixel);
392
            const int sourceBlue = tqBlue(sourcePixel);
393
394
            int r = (sourceAlpha * (sourceRed - backgroundRed)) + 0x80;
395
            r = backgroundRed + ((r + (r >> 8)) >> 8);
396
397
            int g = (sourceAlpha * (sourceGreen - backgroundGreen)) + 0x80;
398
            g = backgroundGreen + ((g + (g >> 8)) >> 8);
399
400
            int b = (sourceAlpha * (sourceBlue - backgroundBlue)) + 0x80;
401
            b = backgroundBlue + ((b + (b >> 8)) >> 8);
402
403
            c = tqRgb(r, g, b);
404
          }
405
406
          int cellPixelsRemaining = firstCellPixelsRemaining;
407
408
          for(int x = paintCellsRect.left(); x <= paintCellsRect.right(); x++)
409
          {
410
            if(cellPixelsRemaining == 0)
411
            {
412
              cellPixelsRemaining = cellsize;
413
414
              // Fetch the next source pixel
415
              sourcePixel = *src++;
416
              sourceAlpha = tqAlpha(sourcePixel);
417
418
              if(sourceAlpha == 255)
419
              {
420
                c = sourcePixel;
421
              }
422
              else
423
              if(sourceAlpha == 0)
424
              {
425
                c = backgroundColor;
426
              }
427
              else
428
              {
429
                const int sourceRed = tqRed(sourcePixel);
430
                const int sourceGreen = tqGreen(sourcePixel);
431
                const int sourceBlue = tqBlue(sourcePixel);
432
433
                //int r = backgroundRed + (sourceAlpha * (sourceRed - backgroundRed)) / 255;
434
                //int g = backgroundGreen + (sourceAlpha * (sourceGreen - backgroundGreen)) / 255;
435
                //int b = backgroundBlue + (sourceAlpha * (sourceBlue - backgroundBlue)) / 255;
436
437
                int r = (sourceAlpha * (sourceRed - backgroundRed)) + 0x80;
438
                r = backgroundRed + ((r + (r >> 8)) >> 8);
439
440
                int g = (sourceAlpha * (sourceGreen - backgroundGreen)) + 0x80;
441
                g = backgroundGreen + ((g + (g >> 8)) >> 8);
442
443
                int b = (sourceAlpha * (sourceBlue - backgroundBlue)) + 0x80;
444
                b = backgroundBlue + ((b + (b >> 8)) >> 8);
445
446
                c = tqRgb(r, g, b);
447
              }
448
            }
449
450
            cellPixelsRemaining--;
451
452
            *dest++ = c;
453
          }
454
        }
455
        else
456
        {
457
          // Copy the scanline above.
458
          memcpy(dest, dest - paintCellsRect.width(), paintCellsRect.width() * sizeof(TQRgb));
459
        }
460
      }
461
    }
462
    else
463
    {
464
      int squareSize;
465
      const int fixedPointMultiplier = 4;
466
467
      if(checkerboardSize() == CHK_SMALL)
468
      {
469
        squareSize = (cellSize() * fixedPointMultiplier) / 4;
470
      }
471
      else
472
      if(checkerboardSize() == CHK_MEDIUM)
473
      {
474
        squareSize = (cellSize() * fixedPointMultiplier) / 2;
475
      }
476
      else
477
      {
478
        squareSize = (2 * cellSize() * fixedPointMultiplier) / 2;
479
      }
480
481
      TQRgb *color1ScanLine = new TQRgb[paintCellsRect.width()];
482
      TQRgb *color2ScanLine = new TQRgb[paintCellsRect.width()];
483
      TQRgb *color1Buffer = color1ScanLine;
484
      TQRgb *color2Buffer = color2ScanLine;
485
486
      for(int x = paintCellsRect.left(); x <= paintCellsRect.right(); x++)
487
      {
488
        if((((x * fixedPointMultiplier) / squareSize) & 1) == 0)
489
        {
490
          *color1Buffer++ = checkerboardColor1().rgb();
491
          *color2Buffer++ = checkerboardColor2().rgb();
492
        }
493
        else
494
        {
495
          *color1Buffer++ = checkerboardColor2().rgb();
496
          *color2Buffer++ = checkerboardColor1().rgb();
497
        }
498
      }
499
500
      const int firstCellX = paintCellsRect.left() / cellsize;
501
      const int firstCellPixelsRemaining = cellsize - paintCellsRect.left() % cellsize;
502
      int lastCellY = -1;
503
      int lastLineFirstSquareColour = 0;
504
505
      for(int y = paintCellsRect.top(); y <= paintCellsRect.bottom(); y++)
506
      {
507
        TQRgb *dest = imageBuffer + (y - paintCellsRect.top()) * paintCellsRect.width();
508
        const int cellY = y / cellsize;
509
510
        int firstSquareColour;
511
        const TQRgb *checkerboardSrc;
512
513
        if((((y * fixedPointMultiplier) / squareSize) & 1) == 0)
514
        {
515
          firstSquareColour = 1;
516
          checkerboardSrc = color1ScanLine;
517
        }
518
        else
519
        {
520
          firstSquareColour = 2;
521
          checkerboardSrc = color2ScanLine;
522
        }
523
524
        if(cellY == lastCellY && firstSquareColour == lastLineFirstSquareColour)
525
        {
526
          // Copy the scanline above.
527
          memcpy(dest, dest - paintCellsRect.width(), paintCellsRect.width() * sizeof(TQRgb));
528
        }
529
        else
530
        {
531
          TQRgb *src = gridcolors.data() + cellY * numCols() + firstCellX;
532
533
          TQRgb sourcePixel = *src++;
534
          int sourceRed = tqRed(sourcePixel);
535
          int sourceGreen = tqGreen(sourcePixel);
536
          int sourceBlue = tqBlue(sourcePixel);
537
          int sourceAlpha = tqAlpha(sourcePixel);
538
539
          int cellPixelsRemaining = firstCellPixelsRemaining;
540
541
          for(int x = paintCellsRect.left(); x <= paintCellsRect.right(); x++)
542
          {
543
            if(cellPixelsRemaining == 0)
544
            {
545
              cellPixelsRemaining = cellsize;
546
547
              // Fetch the next source pixel
548
              sourcePixel = *src++;
549
              sourceRed = tqRed(sourcePixel);
550
              sourceGreen = tqGreen(sourcePixel);
551
              sourceBlue = tqBlue(sourcePixel);
552
              sourceAlpha = tqAlpha(sourcePixel);
553
            }
554
555
            cellPixelsRemaining--;
556
557
            TQRgb c;
558
559
            if(sourceAlpha == 255)
560
            {
561
              c = sourcePixel;
562
            }
563
            else
564
            if(sourceAlpha == 0)
565
            {
566
              c = *checkerboardSrc;
567
            }
568
            else
569
            {
570
              const int backgroundColor = *checkerboardSrc;
571
              const int backgroundRed = tqRed(backgroundColor);
572
              const int backgroundGreen = tqGreen(backgroundColor);
573
              const int backgroundBlue = tqBlue(backgroundColor);
574
575
              //int r = backgroundRed + (sourceAlpha * (sourceRed - backgroundRed)) / 255;
576
              //int g = backgroundGreen + (sourceAlpha * (sourceGreen - backgroundGreen)) / 255;
577
              //int b = backgroundBlue + (sourceAlpha * (sourceBlue - backgroundBlue)) / 255;
578
579
              int r = (sourceAlpha * (sourceRed - backgroundRed)) + 0x80;
580
              r = backgroundRed + ((r + (r >> 8)) >> 8);
581
582
              int g = (sourceAlpha * (sourceGreen - backgroundGreen)) + 0x80;
583
              g = backgroundGreen + ((g + (g >> 8)) >> 8);
584
585
              int b = (sourceAlpha * (sourceBlue - backgroundBlue)) + 0x80;
586
              b = backgroundBlue + ((b + (b >> 8)) >> 8);
587
588
              c = tqRgb(r, g, b);
589
            }
590
591
            *dest++ = c;
592
            checkerboardSrc++;
593
          }
594
        }
595
596
        lastCellY = cellY;
597
        lastLineFirstSquareColour = firstSquareColour;
598
      }
599
600
      delete [] color1ScanLine;
601
      delete [] color2ScanLine;
602
    }
603
604
    TQImage image((uchar *)(imageBuffer), paintCellsRect.width(), paintCellsRect.height(), 32, 0, 0,
605
#if X_BYTE_ORDER == X_LITTLE_ENDIAN
606
      TQImage::LittleEndian);
607
#else
608
      TQImage::BigEndian);
609
#endif
610
    Q_ASSERT(!image.isNull());
611
612
    TQPixmap _pixmap;
613
    _pixmap.convertFromImage(image);
614
615
    TQPainter p;
616
    p.begin(&_pixmap);
617
    paintForeground(&p, e);
618
    p.end();
619
620
    bitBlt(this, paintCellsRect.left(), paintCellsRect.top(), &_pixmap);
621
622
    //kdDebug(4640) << "Image render elapsed: " << time.elapsed() << endl;
623
624
    delete [] imageBuffer;
625
  }
626
}
627
628
void TDEIconEditGrid::paintForeground(TQPainter* p, TQPaintEvent* e)
629
{
630
    TQWMatrix matrix;
631
632
    matrix.translate(-e->rect().x(), -e->rect().y());
633
    p->setWorldMatrix( matrix );
634
635
    TQRect cellsRect(0, 0, numCols() * cellSize(), numRows() * cellSize());
636
    TQRect paintCellsRect = cellsRect.intersect(e->rect());
637
638
    if(!paintCellsRect.isEmpty())
639
    {
640
      int firstColumn = paintCellsRect.left() / cellSize();
641
      int lastColumn = paintCellsRect.right() / cellSize();
642
643
      int firstRow = paintCellsRect.top() / cellSize();
644
      int lastRow = paintCellsRect.bottom() / cellSize();
645
646
      p->setPen(TQColor(0, 0, 0));
647
      p->setBrush(TQColor(0, 0, 0));
648
649
      for(int column = firstColumn; column <= lastColumn; column++)
650
      {
651
        for(int row = firstRow; row <= lastRow; row++)
652
        {
653
          int x = column * cellSize();
654
          int y = row * cellSize();
655
656
          if((ispasting || isselecting) && isMarked(column, row))
657
          {
658
            p->drawWinFocusRect(x + 1, y + 1, cellSize() - 2, cellSize() - 2);
659
          }
660
          else
661
          {
662
            switch( tool )
663
            {
664
              case FilledRect:
665
              case Rect:
666
              case Ellipse:
667
              case Circle:
668
              case FilledEllipse:
669
              case FilledCircle:
670
              case Line:
671
                if(btndown && isMarked(column, row))
672
                {
673
                  if(cellSize() > 1)
674
                  {
675
                    p->drawWinFocusRect( x + 1, y + 1, cellSize() - 2, cellSize() - 2);
676
                  }
677
                  else
678
                  {
679
                    p->drawPoint(x, y);
680
                  }
681
                }
682
                break;
683
684
              default:
685
                break;
686
            }
687
          }
688
        }
689
      }
690
    }
691
692
    if(hasGrid()&& !(cellSize()==1))
693
    {
694
        p->setPen(TQColor(0, 0, 0));
695
        int x = e->rect().x() - ((e->rect().x() % cellSize()) + cellSize());
696
        if(x < 0) x = 0;
697
        int y = e->rect().y() - ((e->rect().y() % cellSize()) + cellSize());
698
        if(y < 0) y = 0;
699
        int cx = e->rect().right() + cellSize();
700
        int cy = e->rect().bottom() + cellSize();
701
702
        // draw grid lines
703
        for(int i = x; i < cx; i += cellSize())
704
            p->drawLine(i, y, i, cy);
705
706
        for(int i = y; i < cy; i += cellSize())
707
            p->drawLine(x, i, cx, i);
708
    }
709
}
710
711
void TDEIconEditGrid::mousePressEvent( TQMouseEvent *e )
712
{
713
    if(!e || (e->button() != Qt::LeftButton))
714
        return;
715
716
    int row = findRow( e->pos().y() );
717
    int col = findCol( e->pos().x() );
718
    //int cell = row * numCols() + col;
719
720
    if(!img->valid(col, row))
721
        return;
722
723
    btndown = true;
724
    start.setX(col);
725
    start.setY(row);
726
727
    if(ispasting)
728
    {
729
        ispasting = false;
730
        editPaste(true);
731
    }
732
733
    if(isselecting)
734
    {
735
        TQPointArray a(pntarray.copy());
736
        pntarray.resize(0);
737
        drawPointArray(a, Mark);
738
        emit selecteddata(false);
739
    }
740
741
    switch( tool )
742
    {
743
        case SelectRect:
744
        case SelectCircle:
745
            isselecting = true;
746
            break;
747
        default:
748
            break;
749
    }
750
}
751
752
void TDEIconEditGrid::mouseMoveEvent( TQMouseEvent *e )
753
{
754
    if(!e) return;
755
756
    int row = findRow( e->pos().y() );
757
    int col = findCol( e->pos().x() );
758
    int cell = row * numCols() + col;
759
760
    if(img->valid(col, row))
761
    {
762
        //kdDebug(4640) << col << " X " << row << endl;
763
        emit poschanged(col, row);
764
        // for the rulers
765
        emit xposchanged((col*scaling())+scaling()/2);
766
        emit yposchanged((row*scaling())+scaling()/2);
767
    }
768
769
    TQPoint tmpp(col, row);
770
    if(tmpp == end) return;
771
772
    // need to use intersection of rectangles to allow pasting
773
    // only that part of clip image which intersects -jwc-
774
    if(ispasting && !btndown && img->valid(col, row))
775
    {
776
        if( (col + cbsize.width()) > (numCols()-1) )
777
            insrect.setX(numCols()-insrect.width());
778
        else
779
            insrect.setX(col);
780
        if( (row + cbsize.height()) > (numRows()-1) )
781
            insrect.setY(numRows()-insrect.height());
782
        else
783
            insrect.setY(row);
784
785
        insrect.setSize(cbsize);
786
        start = insrect.topLeft();
787
        end = insrect.bottomRight();
788
        drawRect(false);
789
        return;
790
    }
791
792
    if(!img->valid(col, row) || !btndown)
793
        return;
794
795
    end.setX(col);
796
    end.setY(row);
797
798
    if(isselecting)
799
    {
800
        if(tool == SelectRect)
801
            drawRect(false);
802
        else
803
            drawEllipse(false);
804
        return;
805
    }
806
807
    bool erase=false;
808
    switch( tool )
809
    {
810
        case Eraser:
811
            erase=true;
812
813
        case Freehand:
814
        {
815
            if( !m_command )
816
                m_command = new KMacroCommand( i18n("Free Hand") );
817
            
818
            if(erase)
819
                setColor( cell, TRANSPARENT );
820
            else
821
                setColor( cell, currentcolor );
822
823
            if ( selected != cell )
824
            {
825
                setModified( true );
826
                int prevSel = selected;
827
                selected = cell;
828
                TQRect area = TQRect( col*cellsize,row*cellsize, cellsize, cellsize ).unite( 
829
                    TQRect ( (prevSel%numCols())*cellsize,(prevSel/numCols())*cellsize, cellsize, cellsize ) );
830
                    
831
                m_command->addCommand( new RepaintCommand( area, this ) );
832
                DrawCommand* dc = new DrawCommand( col, row, colorAt(cell), img, this );
833
                RepaintCommand* rp = new RepaintCommand( area, this );
834
                dc->execute();
835
                rp->execute();
836
                m_command->addCommand( dc );
837
                m_command->addCommand( rp );
838
            }
839
            break;
840
        }
841
        case Find:
842
        {
843
            iconcolors.closestMatch(colorAt(cell));
844
            if ( selected != cell )
845
            {
846
                int prevSel = selected;
847
                selected = cell;
848
                update((prevSel%numCols())*cellsize,(prevSel/numCols())*cellsize, cellsize, cellsize);
849
                update(col*cellsize,row*cellsize, cellsize, cellsize);
850
                emit colorSelected(colorAt(selected));
851
            }
852
            break;
853
        }
854
        case Ellipse:
855
        case Circle:
856
        case FilledEllipse:
857
        case FilledCircle:
858
        {
859
            drawEllipse(false);
860
            break;
861
        }
862
        case FilledRect:
863
        case Rect:
864
        {
865
            drawRect(false);
866
            break;
867
        }
868
        case Line:
869
        {
870
            drawLine(false, false);
871
            break;
872
        }
873
        case Spray:
874
        {
875
            drawSpray(TQPoint(col, row));
876
            setModified(true);
877
            break;
878
        }
879
        default:
880
            break;
881
    }
882
883
    p = *img;
884
    emit changed(TQPixmap(p));
885
}
886
887
void TDEIconEditGrid::mouseReleaseEvent( TQMouseEvent *e )
888
{
889
  if(!e || (e->button() != Qt::LeftButton))
890
    return;
891
892
  int row = findRow( e->pos().y() );
893
  int col = findCol( e->pos().x() );
894
  btndown = false;
895
  end.setX(col);
896
  end.setY(row);
897
  int cell = row * numCols() + col;
898
  bool erase=false;
899
  switch( tool )
900
  {
901
    case Eraser:
902
        erase=true;
903
      //currentcolor = TRANSPARENT;
904
    case Freehand:
905
    {
906
      if(!img->valid(col, row))
907
        return;
908
      if(erase)
909
        setColor( cell, TRANSPARENT );
910
      else
911
        setColor( cell, currentcolor );
912
      //if ( selected != cell )
913
      //{
914
        setModified( true );
915
        int prevSel = selected;
916
        selected = cell;
917
        update((prevSel%numCols())*cellsize,(prevSel/numCols())*cellsize, cellsize, cellsize);
918
        update(col*cellsize,row*cellsize, cellsize, cellsize);
919
        //updateCell( prevSel/numCols(), prevSel%numCols(), FALSE );
920
        //updateCell( row, col, FALSE );
921
        *((uint*)img->scanLine(row) + col) = colorAt(cell);
922
        p = *img;
923
      //}
924
      
925
        if( m_command ) {
926
            history->addCommand( m_command, false );
927
            m_command = 0;
928
        }
929
        
930
      break;
931
    }
932
    case Ellipse:
933
    case Circle:
934
    case FilledEllipse:
935
    case FilledCircle:
936
    {
937
      drawEllipse(true);
938
      break;
939
    }
940
    case FilledRect:
941
    case Rect:
942
    {
943
      drawRect(true);
944
      break;
945
    }
946
    case Line:
947
    {
948
      drawLine(true, false);
949
      break;
950
    }
951
    case Spray:
952
    {
953
      drawSpray(TQPoint(col, row));
954
      break;
955
    }
956
    case FloodFill:
957
    {
958
      TQApplication::setOverrideCursor(waitCursor);
959
      drawFlood(col, row, colorAt(cell));
960
      TQApplication::restoreOverrideCursor();
961
      updateColors();
962
      emit needPainting();
963
      p = *img;
964
      break;
965
    }
966
    case Find:
967
    {
968
      currentcolor = colorAt(cell);
969
      if ( selected != cell )
970
      {
971
        int prevSel = selected;
972
        selected = cell;
973
        update((prevSel%numCols())*cellsize,(prevSel/numCols())*cellsize, cellsize, cellsize);
974
        update(col*cellsize,row*cellsize, cellsize, cellsize);
975
        emit colorSelected(currentcolor);
976
        //updateCell( prevSel/numCols(), prevSel%numCols(), FALSE );
977
        //updateCell( row, col, FALSE );
978
      }
979
980
      break;
981
    }
982
    default:
983
      break;
984
  }
985
  
986
  emit changed(TQPixmap(p));
987
  //emit colorschanged(numColors(), data());
988
}
989
990
//void TDEIconEditGrid::setColorSelection( const TQColor &color )
991
void TDEIconEditGrid::setColorSelection( uint c )
992
{
993
  currentcolor = c;
994
  emit colorSelected(currentcolor);
995
}
996
997
void TDEIconEditGrid::loadBlank( int w, int h )
998
{
999
  img->create(w, h, 32);
1000
  img->setAlphaBuffer(true);
1001
  clearImage(img);
1002
  setNumRows(h);
1003
  setNumCols(w);
1004
  fill(TRANSPARENT);
1005
  emit sizechanged(numCols(), numRows());
1006
  emit colorschanged(numColors(), data());
1007
  history->clear();
1008
}
1009
1010
1011
1012
void TDEIconEditGrid::load( TQImage *image)
1013
{
1014
    kdDebug(4640) << "TDEIconEditGrid::load" << endl;
1015
1016
    setUpdatesEnabled(false);
1017
1018
    if(image == 0L)
1019
    {
1020
        TQString msg = i18n("There was an error loading a blank image.\n");
1021
        KMessageBox::error(this, msg);
1022
        return;
1023
    }
1024
1025
    *img = image->convertDepth(32);
1026
    img->setAlphaBuffer(true);
1027
    setNumRows(img->height());
1028
    setNumCols(img->width());
1029
1030
    for(int y = 0; y < numRows(); y++)
1031
    {
1032
        uint *l = (uint*)img->scanLine(y);
1033
        for(int x = 0; x < numCols(); x++, l++)
1034
        {
1035
            setColor((y*numCols())+x, *l, false);
1036
        }
1037
        //kdDebug(4640) << "Row: " << y << endl;
1038
        kapp->processEvents(200);
1039
    }
1040
1041
    updateColors();
1042
    emit sizechanged(numCols(), numRows());
1043
    emit colorschanged(numColors(), data());
1044
    emit changed(pixmap());
1045
    setUpdatesEnabled(true);
1046
    emit needPainting();
1047
    //repaint(viewRect(), false);
1048
    history->clear();
1049
}
1050
1051
const TQPixmap &TDEIconEditGrid::pixmap()
1052
{
1053
    if(!img->isNull())
1054
        p = *img;
1055
    //p.convertFromImage(*img, 0);
1056
    return(p);
1057
}
1058
1059
void TDEIconEditGrid::getImage(TQImage *image)
1060
{
1061
    kdDebug(4640) << "TDEIconEditGrid::getImage" << endl;
1062
    *image = *img;
1063
}
1064
1065
bool TDEIconEditGrid::zoomTo(int scale)
1066
{
1067
    TQApplication::setOverrideCursor(waitCursor);
1068
    setUpdatesEnabled(false);
1069
    setCellSize( scale );
1070
    setUpdatesEnabled(true);
1071
    emit needPainting();
1072
    TQApplication::restoreOverrideCursor();
1073
    emit scalingchanged(cellSize());
1074
1075
    if(scale == 1)
1076
        return false;
1077
    return true;
1078
}
1079
1080
bool TDEIconEditGrid::zoom(Direction d)
1081
{
1082
    int f = (d == DirIn) ? (cellSize()+1) : (cellSize()-1);
1083
    TQApplication::setOverrideCursor(waitCursor);
1084
    setUpdatesEnabled(false);
1085
    setCellSize( f );
1086
    setUpdatesEnabled(true);
1087
    //emit needPainting();
1088
    TQApplication::restoreOverrideCursor();
1089
1090
    emit scalingchanged(cellSize());
1091
    if(d == DirOut && cellSize() <= 1)
1092
        return false;
1093
    return true;
1094
}
1095
1096
void TDEIconEditGrid::checkClipboard()
1097
{
1098
  bool ok = false;
1099
  TQImage tmp = clipboardImage(ok);
1100
  if(ok)
1101
    emit clipboarddata(true);
1102
  else
1103
  {
1104
    emit clipboarddata(false);
1105
  }
1106
}
1107
1108
TQImage TDEIconEditGrid::clipboardImage(bool &ok)
1109
{
1110
  //###### Remove me later.
1111
  //Workaround TQt bug -- check whether format provided first.
1112
  //Code below is from TQDragObject, to match the mimetype list....
1113
1114
  TQStrList fileFormats = TQImageIO::inputFormats();
1115
  fileFormats.first();
1116
  bool oneIsSupported = false;
1117
  while ( fileFormats.current() )
1118
  {
1119
    TQCString format = fileFormats.current();
1120
    TQCString type = "image/" + format.lower();
1121
    if (kapp->clipboard()->data()->provides(type ) )
1122
    {
1123
      oneIsSupported = true;
1124
    }
1125
    fileFormats.next();
1126
  }
1127
  if (!oneIsSupported)
1128
  {
1129
     ok = false;
1130
     return TQImage();
1131
  }
1132
1133
  TQImage image = kapp->clipboard()->image();
1134
  ok = !image.isNull();
1135
  if ( ok )
1136
  {
1137
      image = image.convertDepth(32);
1138
      image.setAlphaBuffer(true);
1139
  }
1140
  return image;
1141
}
1142
1143
1144
void TDEIconEditGrid::editSelectAll()
1145
{
1146
    start.setX(0);
1147
    start.setY(0);
1148
    end.setX(numCols()-1);
1149
    end.setY(numRows()-1);
1150
    isselecting = true;
1151
    drawRect(false);
1152
    emit newmessage(i18n("All selected"));
1153
}
1154
1155
void TDEIconEditGrid::editClear()
1156
{
1157
    clearImage(img);
1158
    fill(TRANSPARENT);
1159
    update();
1160
    setModified(true);
1161
    p = *img;
1162
    emit changed(p);
1163
    emit newmessage(i18n("Cleared"));
1164
}
1165
1166
TQImage TDEIconEditGrid::getSelection(bool cut)
1167
{
1168
    const TQRect rect = pntarray.boundingRect();
1169
    int nx = 0, ny = 0, nw = 0, nh = 0;
1170
    rect.rect(&nx, &ny, &nw, &nh);
1171
1172
    TQImage tmp(nw, nh, 32);
1173
    tmp.setAlphaBuffer(true);
1174
    clearImage(&tmp);
1175
1176
    int s = pntarray.size();
1177
1178
    for(int i = 0; i < s; i++)
1179
    {
1180
        int x = pntarray[i].x();
1181
        int y = pntarray[i].y();
1182
        if(img->valid(x, y) && rect.contains(TQPoint(x, y)))
1183
        {
1184
            *((uint*)tmp.scanLine(y-ny) + (x-nx)) = *((uint*)img->scanLine(y) + x);
1185
            if(cut)
1186
            {
1187
                *((uint*)img->scanLine(y) + x) = TRANSPARENT;
1188
                setColor( (y*numCols()) + x, TRANSPARENT, false );
1189
            }
1190
        }
1191
    }
1192
1193
    TQPointArray a(pntarray.copy());
1194
    pntarray.resize(0);
1195
    drawPointArray(a, Mark);
1196
    emit selecteddata(false);
1197
    if(cut)
1198
    {
1199
        updateColors();
1200
        update(rect.x()*cellSize(), rect.y()*cellSize(),
1201
            rect.width()*cellSize(), rect.height()*cellSize());
1202
        p = *img;
1203
        emit changed(p);
1204
        emit colorschanged(numColors(), data());
1205
        emit newmessage(i18n("Selected area cut"));
1206
        setModified(true);
1207
    }
1208
    else
1209
        emit newmessage(i18n("Selected area copied"));
1210
1211
    return tmp;
1212
}
1213
1214
void TDEIconEditGrid::editCopy(bool cut)
1215
{
1216
    kapp->clipboard()->setImage(getSelection(cut));
1217
    isselecting = false;
1218
}
1219
1220
1221
void TDEIconEditGrid::editPaste(bool paste)
1222
{
1223
    bool ok = false;
1224
    TQImage tmp = clipboardImage(ok);
1225
1226
    TDEIconEditProperties *props = TDEIconEditProperties::self();
1227
1228
    if(ok)
1229
    {
1230
        if( (tmp.size().width() > img->size().width())
1231
        || (tmp.size().height() > img->size().height()) )
1232
        {
1233
            if(KMessageBox::warningYesNo(this,
1234
                i18n("The clipboard image is larger than the current"
1235
                " image!\nPaste as new image?"),TQString(),i18n("Paste"), i18n("Do Not Paste")) == 0)
1236
            {
1237
                editPasteAsNew();
1238
            }
1239
            return;
1240
        }
1241
        else if(!paste)
1242
        {
1243
            ispasting = true;
1244
            cbsize = tmp.size();
1245
            return;
1246
            // emit newmessage(i18n("Pasting"));
1247
        }
1248
        else
1249
        {
1250
            //kdDebug(4640) << "TDEIconEditGrid: Pasting at: " << insrect.x() << " x " << insrect.y() << endl;
1251
            TQApplication::setOverrideCursor(waitCursor);
1252
1253
            for(int y = insrect.y(), ny = 0; y < numRows() && ny < insrect.height(); y++, ny++)
1254
            {
1255
                uint *l = ((uint*)img->scanLine(y)+insrect.x());
1256
                uint *cl = (uint*)tmp.scanLine(ny);
1257
                for(int x = insrect.x(), nx = 0; x < numCols() && nx < insrect.width(); x++, nx++, l++, cl++)
1258
                {
1259
                    if(props->pasteTransparent())
1260
                    {
1261
                        *l = *cl;
1262
                    }
1263
                    else
1264
                    {
1265
                        // Porter-Duff Over composition
1266
                        double alphaS = tqAlpha(*cl) / 255.0;
1267
                        double alphaD = tqAlpha(*l) / 255.0;
1268
  
1269
                        double r = tqRed(*cl) * alphaS + (1 - alphaS) * tqRed(*l) * alphaD;
1270
                        double g = tqGreen(*cl) * alphaS + (1 - alphaS) * tqGreen(*l) * alphaD;
1271
                        double b = tqBlue(*cl) * alphaS + (1 - alphaS) * tqBlue(*l) * alphaD;
1272
                        double a = alphaS + (1 - alphaS) * alphaD;
1273
  
1274
                        // Remove multiplication by alpha
1275
1276
                        if(a > 0)
1277
                        {
1278
                            r /= a;
1279
                            g /= a;
1280
                            b /= a;
1281
                        }
1282
                        else
1283
                        {
1284
                            r = 0;
1285
                            g = 0;
1286
                            b = 0;
1287
                        }
1288
                        
1289
                        int ir = (int)(r + 0.5);
1290
1291
                        if(ir < 0)
1292
                        {
1293
                            ir = 0;
1294
                        }
1295
                        else
1296
                        if(ir > 255)
1297
                        {
1298
                            ir = 255;
1299
                        }
1300
                        
1301
                        int ig = (int)(g + 0.5);
1302
1303
                        if(ig < 0)
1304
                        {
1305
                            ig = 0;
1306
                        }
1307
                        else
1308
                        if(ig > 255)
1309
                        {
1310
                            ig = 255;
1311
                        }
1312
                        
1313
                        int ib = (int)(b + 0.5);
1314
1315
                        if(ib < 0)
1316
                        {
1317
                            ib = 0;
1318
                        }
1319
                        else
1320
                        if(ib > 255)
1321
                        {
1322
                            ib = 255;
1323
                        }
1324
                        
1325
                        int ia = (int)((a * 255) + 0.5);
1326
1327
                        if(ia < 0)
1328
                        {
1329
                            ia = 0;
1330
                        }
1331
                        else
1332
                        if(ia > 255)
1333
                        {
1334
                            ia = 255;
1335
                        }
1336
                        
1337
                        *l = tqRgba(ir, ig, ib, ia);
1338
                    }
1339
1340
                    setColor((y*numCols())+x, (uint)*l, false);
1341
                }
1342
            }
1343
            updateColors();
1344
            update(insrect.x()*cellSize(), insrect.y()*cellSize(),
1345
                insrect.width()*cellSize(), insrect.height()*cellSize());
1346
1347
            TQApplication::restoreOverrideCursor();
1348
1349
            setModified(true);
1350
            p = *img;
1351
            emit changed(TQPixmap(p));
1352
            emit sizechanged(numCols(), numRows());
1353
            emit colorschanged(numColors(), data());
1354
            emit newmessage(i18n("Done pasting"));
1355
        }
1356
    }
1357
    else
1358
    {
1359
        TQString msg = i18n("Invalid pixmap data in clipboard!\n");
1360
        KMessageBox::sorry(this, msg);
1361
    }
1362
}
1363
1364
1365
void TDEIconEditGrid::editPasteAsNew()
1366
{
1367
    bool ok = false;
1368
    TQImage tmp = clipboardImage(ok);
1369
1370
    if(ok)
1371
    {
1372
        if(isModified())
1373
        {
1374
            TDEIconEdit *w = new TDEIconEdit(tmp);
1375
            TQ_CHECK_PTR(w);
1376
        }
1377
        else
1378
        {
1379
            *img = tmp;
1380
            load(img);
1381
            setModified(true);
1382
            //repaint(viewRect(), false);
1383
  
1384
            p = *img;
1385
            emit changed(TQPixmap(p));
1386
            emit sizechanged(numCols(), numRows());
1387
            emit colorschanged(numColors(), data());
1388
            emit newmessage(i18n("Done pasting"));
1389
            history->clear();
1390
        }
1391
    }
1392
    else
1393
    {
1394
        TQString msg = i18n("Invalid pixmap data in clipboard!\n");
1395
        KMessageBox::error(this, msg);
1396
    }
1397
}
1398
1399
1400
void TDEIconEditGrid::editResize()
1401
{
1402
    kdDebug(4640) << "TDEIconGrid::editResize" << endl;
1403
    KResizeDialog *rs = new KResizeDialog(this, 0, TQSize(numCols(), numRows()));
1404
    if(rs->exec())
1405
    {
1406
        const TQSize s = rs->getSize();
1407
        *img = img->smoothScale(s.width(), s.height());
1408
        load(img);
1409
1410
        setModified(true);
1411
    }
1412
    delete rs;
1413
}
1414
1415
1416
void TDEIconEditGrid::setSize(const TQSize s)
1417
{
1418
    kdDebug(4640) << "::setSize: " << s.width() << " x " << s.height() << endl;
1419
1420
    img->create(s.width(), s.height(), 32);
1421
    img->setAlphaBuffer(true);
1422
    clearImage(img);
1423
    load(img);
1424
}
1425
1426
1427
void TDEIconEditGrid::createCursors()
1428
{
1429
  TQBitmap mask(22, 22);
1430
  TQPixmap pix;
1431
1432
  cursor_normal = TQCursor(arrowCursor);
1433
1434
  pix = BarIcon("colorpicker-cursor");
1435
  if(pix.isNull())
1436
  {
1437
    cursor_colorpicker = cursor_normal;
1438
    kdDebug(4640) << "TDEIconEditGrid: Error loading colorpicker-cursor.xpm" << endl;
1439
  }
1440
  else
1441
  {
1442
    mask = TQPixmap(pix.createHeuristicMask());
1443
    pix.setMask(mask);
1444
    cursor_colorpicker = TQCursor(pix, 1, 21);
1445
  }
1446
1447
  pix = BarIcon("paintbrush-cursor");
1448
  if(pix.isNull())
1449
  {
1450
    cursor_paint = cursor_normal;
1451
    kdDebug(4640) << "TDEIconEditGrid: Error loading paintbrush.xpm" << endl;
1452
  }
1453
  else
1454
  {
1455
    mask = TQPixmap(pix.createHeuristicMask());
1456
    pix.setMask(mask);
1457
    cursor_paint = TQCursor(pix, 0, 19);
1458
  }
1459
1460
  pix = BarIcon("fill-cursor");
1461
  if(pix.isNull())
1462
  {
1463
    cursor_flood = cursor_normal;
1464
    kdDebug(4640) << "TDEIconEditGrid: Error loading fill-cursor.xpm" << endl;
1465
  }
1466
  else
1467
  {
1468
    mask = TQPixmap(pix.createHeuristicMask());
1469
    pix.setMask(mask);
1470
    cursor_flood = TQCursor(pix, 3, 20);
1471
  }
1472
1473
  pix = BarIcon("aim-cursor");
1474
  if(pix.isNull())
1475
  {
1476
    cursor_aim = cursor_normal;
1477
    kdDebug(4640) << "TDEIconEditGrid: Error loading aim-cursor.xpm" << endl;
1478
  }
1479
  else
1480
  {
1481
    mask = TQPixmap(pix.createHeuristicMask());
1482
    pix.setMask(mask);
1483
    cursor_aim = TQCursor(pix, 10, 10);
1484
  }
1485
1486
  pix = BarIcon("airbrush-cursor");
1487
  if(pix.isNull())
1488
  {
1489
    cursor_spray = cursor_normal;
1490
    kdDebug(4640) << "TDEIconEditGrid: Error loading airbrush-cursor.xpm" << endl;
1491
  }
1492
  else
1493
  {
1494
    mask = TQPixmap(pix.createHeuristicMask(true));
1495
    pix.setMask(mask);
1496
    cursor_spray = TQCursor(pix, 0, 20);
1497
  }
1498
1499
  pix = BarIcon("eraser-cursor");
1500
  if(pix.isNull())
1501
  {
1502
    cursor_erase = cursor_normal;
1503
    kdDebug(4640) << "TDEIconEditGrid: Error loading eraser-cursor.xpm" << endl;
1504
  }
1505
  else
1506
  {
1507
    mask = TQPixmap(pix.createHeuristicMask(true));
1508
    pix.setMask(mask);
1509
    cursor_erase = TQCursor(pix, 1, 16);
1510
  }
1511
}
1512
1513
1514
1515
void TDEIconEditGrid::setTool(DrawTool t)
1516
{
1517
    btndown = false;
1518
    tool = t;
1519
1520
    if(tool != SelectRect && tool != SelectCircle)
1521
        isselecting = false;
1522
1523
    switch( tool )
1524
    {
1525
        case SelectRect:
1526
            isselecting = true;
1527
            setCursor(cursor_aim);
1528
            break;
1529
        case SelectCircle:
1530
            isselecting = true;
1531
            setCursor(cursor_aim);
1532
            break;
1533
        case Line:
1534
        case Ellipse:
1535
        case Circle:
1536
        case FilledEllipse:
1537
        case FilledCircle:
1538
        case FilledRect:
1539
        case Rect:
1540
            setCursor(cursor_aim);
1541
            break;
1542
        case Freehand:
1543
            setCursor(cursor_paint);
1544
            break;
1545
        case Spray:
1546
            setCursor(cursor_spray);
1547
            break;
1548
        case Eraser:
1549
            setCursor(cursor_erase);
1550
            break;
1551
        case FloodFill:
1552
            setCursor(cursor_flood);
1553
            break;
1554
        case Find:
1555
            setCursor(cursor_colorpicker);
1556
            break;
1557
        default:
1558
            break;
1559
    }
1560
}
1561
1562
1563
void TDEIconEditGrid::drawFlood(int x, int y, uint oldcolor)
1564
{
1565
    if((!img->valid(x, y))
1566
    || (colorAt((y * numCols())+x) != oldcolor)
1567
    || (colorAt((y * numCols())+x) == currentcolor))
1568
        return;
1569
1570
    *((uint*)img->scanLine(y) + x) = currentcolor;
1571
    setColor((y*numCols())+x, currentcolor, false);
1572
1573
    setModified(true);
1574
1575
    drawFlood(x, y-1, oldcolor);
1576
    drawFlood(x, y+1, oldcolor);
1577
    drawFlood(x-1, y, oldcolor);
1578
    drawFlood(x+1, y, oldcolor);
1579
    //TODO: add undo 
1580
}
1581
1582
1583
void TDEIconEditGrid::drawSpray(TQPoint point)
1584
{
1585
    int x = (point.x()-5);
1586
    int y = (point.y()-5);
1587
1588
    //kdDebug(4640) << "drawSpray() - " << x << " X " << y << endl;
1589
1590
    pntarray.resize(0);
1591
    int points = 0;
1592
    for(int i = 1; i < 4; i++, points++)
1593
    {
1594
        int dx = (rand() % 10);
1595
        int dy = (rand() % 10);
1596
        pntarray.putPoints(points, 1, x+dx, y+dy);
1597
    }
1598
1599
    drawPointArray(pntarray, Draw);
1600
}
1601
1602
1603
//This routine is from TQt sources -- it's the branch of TQPointArray::makeEllipse( int x, int y, int w, int h ) that's not normally compiled
1604
//It seems like TDEIconEdit relied on the TQt1 semantics for makeEllipse, which broke
1605
//the tool with reasonably recent TQt versions.
1606
//Thankfully, TQt includes the old code #ifdef'd, which is hence included here
1607
static void TQPA_makeEllipse(TQPointArray& ar, int x, int y, int w, int h )
1608
{						// midpoint, 1/4 ellipse
1609
    if ( w <= 0 || h <= 0 ) {
1610
	if ( w == 0 || h == 0 ) {
1611
	    ar.resize( 0 );
1612
	    return;
1613
	}
1614
	if ( w < 0 ) {				// negative width
1615
	    w = -w;
1616
	    x -= w;
1617
	}
1618
	if ( h < 0 ) {				// negative height
1619
	    h = -h;
1620
	    y -= h;
1621
	}
1622
    }
1623
    int s = (w+h+2)/2;				// max size of xx,yy array
1624
    int *px = new int[s];			// 1/4th of ellipse
1625
    int *py = new int[s];
1626
    int xx, yy, i=0;
1627
    double d1, d2;
1628
    double a2=(w/2)*(w/2),  b2=(h/2)*(h/2);
1629
    xx = 0;
1630
    yy = int(h/2);
1631
    d1 = b2 - a2*(h/2) + 0.25*a2;
1632
    px[i] = xx;
1633
    py[i] = yy;
1634
    i++;
1635
    while ( a2*(yy-0.5) > b2*(xx+0.5) ) {		// region 1
1636
	if ( d1 < 0 ) {
1637
	    d1 = d1 + b2*(3.0+2*xx);
1638
	    xx++;
1639
	} else {
1640
	    d1 = d1 + b2*(3.0+2*xx) + 2.0*a2*(1-yy);
1641
	    xx++;
1642
	    yy--;
1643
	}
1644
	px[i] = xx;
1645
	py[i] = yy;
1646
	i++;
1647
    }
1648
    d2 = b2*(xx+0.5)*(xx+0.5) + a2*(yy-1)*(yy-1) - a2*b2;
1649
    while ( yy > 0 ) {				// region 2
1650
	if ( d2 < 0 ) {
1651
	    d2 = d2 + 2.0*b2*(xx+1) + a2*(3-2*yy);
1652
	    xx++;
1653
	    yy--;
1654
	} else {
1655
	    d2 = d2 + a2*(3-2*yy);
1656
	    yy--;
1657
	}
1658
	px[i] = xx;
1659
	py[i] = yy;
1660
	i++;
1661
    }
1662
    s = i;
1663
    ar.resize( 4*s );				// make full point array
1664
    x += w/2;
1665
    y += h/2;
1666
    for ( i=0; i<s; i++ ) {			// mirror
1667
	xx = px[i];
1668
	yy = py[i];
1669
	ar.setPoint( s-i-1, x+xx, y-yy );
1670
	ar.setPoint( s+i, x-xx, y-yy );
1671
	ar.setPoint( 3*s-i-1, x-xx, y+yy );
1672
	ar.setPoint( 3*s+i, x+xx, y+yy );
1673
    }
1674
    delete[] px;
1675
    delete[] py;
1676
}
1677
1678
1679
1680
void TDEIconEditGrid::drawEllipse(bool drawit)
1681
{
1682
    if(drawit)
1683
    {
1684
        drawPointArray(pntarray, Draw);
1685
        p = *img;
1686
        emit changed(p);
1687
        return;
1688
    }
1689
1690
    TQPointArray a(pntarray.copy());
1691
    int x = start.x(), y = start.y(), cx, cy;
1692
1693
    if(x > end.x())
1694
    {
1695
        cx = x - end.x();
1696
        x = x - cx;
1697
    }
1698
    else
1699
        cx = end.x() - x;
1700
    if(y > end.y())
1701
    {
1702
        cy = y - end.y();
1703
        y = y - cy;
1704
    }
1705
    else
1706
        cy = end.y() - y;
1707
1708
    int d = (cx > cy) ? cx : cy;
1709
1710
    //kdDebug(4640) << x << ", " << y << " - " << d << " " << d << endl;
1711
    pntarray.resize(0);
1712
    drawPointArray(a, Mark);
1713
1714
    if(tool == Circle || tool == FilledCircle || tool == SelectCircle)
1715
        TQPA_makeEllipse(pntarray, x, y, d, d);
1716
    else if(tool == Ellipse || tool == FilledEllipse)
1717
        TQPA_makeEllipse(pntarray, x, y, cx, cy);
1718
1719
    if((tool == FilledEllipse) || (tool == FilledCircle)
1720
    || (tool == SelectCircle))
1721
    {
1722
        int s = pntarray.size();
1723
        int points = s;
1724
        for(int i = 0; i < s; i++)
1725
        {
1726
            int x = pntarray[i].x();
1727
            int y = pntarray[i].y();
1728
            for(int j = 0; j < s; j++)
1729
            {
1730
                if((pntarray[j].y() == y) && (pntarray[j].x() > x))
1731
                {
1732
                    for(int k = x; k < pntarray[j].x(); k++, points++)
1733
                        pntarray.putPoints(points, 1, k, y);
1734
                    break;
1735
                }
1736
            }
1737
        }
1738
    }
1739
1740
    drawPointArray(pntarray, Mark);
1741
1742
    if(tool == SelectCircle && pntarray.size() > 0 && !ispasting)
1743
        emit selecteddata(true);
1744
}
1745
1746
1747
void TDEIconEditGrid::drawRect(bool drawit)
1748
{
1749
    if(drawit)
1750
    {
1751
        drawPointArray(pntarray, Draw);
1752
        p = *img;
1753
        emit changed(p);
1754
        return;
1755
    }
1756
1757
    TQPointArray a(pntarray.copy());
1758
    int x = start.x(), y = start.y(), cx, cy;
1759
1760
    if(x > end.x())
1761
    {
1762
        cx = x - end.x();
1763
        x = x - cx;
1764
    }
1765
    else
1766
        cx = end.x() - x;
1767
    if(y > end.y())
1768
    {
1769
        cy = y - end.y();
1770
        y = y - cy;
1771
    }
1772
    else
1773
        cy = end.y() - y;
1774
1775
    //kdDebug(4640) << x << ", " << y << " - " << cx << " " << cy << endl;
1776
    pntarray.resize(0);
1777
    drawPointArray(a, Mark); // remove previous marking
1778
1779
    int points = 0;
1780
    bool pasting = ispasting;
1781
1782
    if(tool == FilledRect || (tool == SelectRect))
1783
    {
1784
        for(int i = x; i <= x + (pasting ? cx + 1 : cx); i++)
1785
        {
1786
            for(int j = y; j <= y+cy; j++, points++)
1787
            pntarray.putPoints(points, 1, i, j);
1788
        }
1789
    }
1790
    else
1791
    {
1792
        for(int i = x; i <= x+cx; i++, points++)
1793
            pntarray.putPoints(points, 1, i, y);
1794
        for(int i = y; i <= y+cy; i++, points++)
1795
            pntarray.putPoints(points, 1, x, i);
1796
        for(int i = x; i <= x+cx; i++, points++)
1797
            pntarray.putPoints(points, 1, i, y+cy);
1798
        for(int i = y; i <= y+cy; i++, points++)
1799
            pntarray.putPoints(points, 1, x+cx, i);
1800
    }
1801
1802
    drawPointArray(pntarray, Mark);
1803
1804
    if(tool == SelectRect && pntarray.size() > 0 && !ispasting)
1805
        emit selecteddata(true);
1806
}
1807
1808
1809
void TDEIconEditGrid::drawLine(bool drawit, bool drawStraight)
1810
{
1811
    if(drawit)
1812
    {
1813
        drawPointArray(pntarray, Draw);
1814
        p = *img;
1815
        emit changed(p);
1816
        return;
1817
    }
1818
1819
    TQPointArray a(pntarray.copy());
1820
    pntarray.resize(0);
1821
1822
    // remove previous marking
1823
    drawPointArray(a, Mark);
1824
1825
    int x, y, dx, dy, delta;
1826
1827
    dx = end.x() - start.x();
1828
    dy = end.y() - start.y();
1829
    x = start.x();
1830
    y = start.y();
1831
1832
    delta = TQMAX(abs(dx), abs(dy));
1833
    int deltaX = abs(dx);
1834
    int deltaY = abs(dy);
1835
1836
    if ((drawStraight) && (delta > 0))
1837
    {
1838
        dx /= delta;
1839
        dy /= delta;
1840
1841
        for(int i = 0; i <= delta; i++)
1842
        {
1843
            pntarray.putPoints(i, 1, x, y);
1844
            x += dx;
1845
            y += dy;
1846
        }
1847
    }
1848
1849
    else if ((delta > 0) && (deltaX >= deltaY))
1850
    {
1851
        for(int i = 0; i <= deltaX; i++)
1852
        {
1853
            pntarray.putPoints(i, 1, x, y);
1854
1855
            if(dx > 0)
1856
               x++;
1857
            else
1858
               x--;
1859
1860
            if(dy >= 0)
1861
                y = start.y() + (abs(start.x() - x) * deltaY) / deltaX;
1862
            else
1863
                y = start.y() - (abs(start.x() - x) * deltaY) / deltaX;
1864
        }
1865
    }
1866
1867
    else if ((delta > 0) && (deltaY > deltaX))
1868
    {
1869
        for(int i = 0; i <= deltaY; i++)
1870
        {
1871
            pntarray.putPoints(i, 1, x, y);
1872
1873
            if(dy > 0)
1874
                y++;
1875
            else
1876
                y--;
1877
1878
            if(dx >= 0)
1879
                x = start.x() + (abs(start.y() - y) * deltaX) / deltaY;
1880
            else
1881
                x = start.x() - (abs(start.y() - y) * deltaX) / deltaY;
1882
        }
1883
    }
1884
1885
    drawPointArray(pntarray, Mark);
1886
}
1887
1888
1889
void TDEIconEditGrid::drawPointArray(TQPointArray a, DrawAction action)
1890
{
1891
    TQRect area( a.boundingRect().x()*cellSize()-1, a.boundingRect().y()*cellSize()-1,
1892
                a.boundingRect().width()*cellSize()+1, a.boundingRect().height()*cellSize()+1 );
1893
    
1894
    KMacroCommand* macro = 0;
1895
    bool doupdate = false;
1896
1897
    if( a.size() > 0 && action == Draw ) {
1898
	// might cause a memmory leak, if
1899
	// macro is never used and never 
1900
	// added to the history! TODO: Fix this
1901
        macro = new KMacroCommand( i18n("Drawn Array") );
1902
	RepaintCommand* rc = new RepaintCommand( area, this );
1903
	macro->addCommand( rc );	
1904
    }
1905
    
1906
    int s = a.size(); //((rect.size().width()) * (rect.size().height()));
1907
    for(int i = 0; i < s; i++)
1908
    {
1909
        int x = a[i].x();
1910
        int y = a[i].y();
1911
1912
        if(img->valid(x, y) && TQT_TQRECT_OBJECT(a.boundingRect()).contains(a[ i ]))
1913
        {
1914
            //kdDebug(4640) << "x: " << x << " - y: " << y << endl;
1915
            switch( action )
1916
            {
1917
                case Draw:
1918
                {
1919
		    DrawCommand* dc = new DrawCommand( x, y, currentcolor, img, this );
1920
		    dc->execute();
1921
                    //*((uint*)img->scanLine(y) + x) = currentcolor; //colors[cell]|OPAQUE;
1922
                    //int cell = y * numCols() + x;
1923
                    //setColor( cell, currentcolor, false );
1924
                    doupdate = true;
1925
                    //updateCell( y, x, FALSE );
1926
		    macro->addCommand( dc );
1927
                    break;
1928
                }
1929
1930
                case Mark:
1931
                case UnMark:
1932
                    update(x*cellsize,y*cellsize, cellsize, cellsize);
1933
                    //updateCell( y, x, true );
1934
                    break;
1935
1936
                default:
1937
                    break;
1938
            }
1939
        }
1940
    }
1941
1942
    
1943
    if(doupdate)
1944
    {
1945
        setModified( true );
1946
        updateColors();
1947
	RepaintCommand* rc = new RepaintCommand( area, this );
1948
        rc->execute();
1949
	macro->addCommand( rc );
1950
	pntarray.resize(0);
1951
	// add to undo/redo history	
1952
	history->addCommand( macro, false );    }
1953
}
1954
1955
void TDEIconEditGrid::updatePreviewPixmap()
1956
{
1957
    p = *img;
1958
    emit changed(TQPixmap(p));
1959
}
1960
1961
1962
bool TDEIconEditGrid::isMarked(TQPoint point)
1963
{
1964
    return isMarked(point.x(), point.y());
1965
}
1966
1967
1968
bool TDEIconEditGrid::isMarked(int x, int y)
1969
{
1970
    if(((y * numCols()) + x) == selected)
1971
        return true;
1972
1973
    int s = pntarray.size();
1974
    for(int i = 0; i < s; i++)
1975
    {
1976
        if(y == pntarray[i].y() && x == pntarray[i].x())
1977
            return true;
1978
    }
1979
1980
    return false;
1981
}
1982
1983
1984
// Fast diffuse dither to 3x3x3 color cube
1985
// Based on TQt's image conversion functions
1986
static bool kdither_32_to_8( const TQImage *src, TQImage *dst )
1987
{
1988
    register TQRgb *p;
1989
    uchar  *b;
1990
    int	    y;
1991
1992
	//printf("kconvert_32_to_8\n");
1993
1994
    if ( !dst->create(src->width(), src->height(), 8, 256) ) {
1995
		kdWarning() << "OImage: destination image not valid" << endl;
1996
		return FALSE;
1997
	}
1998
1999
    int ncols = 256;
2000
2001
    static uint bm[16][16];
2002
    static int init=0;
2003
    if (!init)
2004
    {
2005
		// Build a Bayer Matrix for dithering
2006
		init = 1;
2007
		int n, i, j;
2008
2009
		bm[0][0]=0;
2010
2011
		for (n=1; n<16; n*=2)
2012
        {
2013
	    	for (i=0; i<n; i++)
2014
            {
2015
			    for (j=0; j<n; j++)
2016
                {
2017
		    	    bm[i][j]*=4;
2018
		    	    bm[i+n][j]=bm[i][j]+2;
2019
		    	    bm[i][j+n]=bm[i][j]+3;
2020
		    	    bm[i+n][j+n]=bm[i][j]+1;
2021
			    }
2022
	    	}
2023
		}
2024
2025
		for (i=0; i<16; i++)
2026
	    	for (j=0; j<16; j++)
2027
			    bm[i][j]<<=8;
2028
    }
2029
2030
    dst->setNumColors( ncols );
2031
2032
#define MAX_R 2
2033
#define MAX_G 2
2034
#define MAX_B 2
2035
#define INDEXOF(r,g,b) (((r)*(MAX_G+1)+(g))*(MAX_B+1)+(b))
2036
2037
	int rc, gc, bc;
2038
2039
	for ( rc=0; rc<=MAX_R; rc++ )		// build 2x2x2 color cube
2040
	    for ( gc=0; gc<=MAX_G; gc++ )
2041
		    for ( bc=0; bc<=MAX_B; bc++ )
2042
            {
2043
		        dst->setColor( INDEXOF(rc,gc,bc),
2044
			    tqRgb( rc*255/MAX_R, gc*255/MAX_G, bc*255/MAX_B ) );
2045
		    }
2046
2047
	int sw = src->width();
2048
	int* line1[3];
2049
	int* line2[3];
2050
	int* pv[3];
2051
2052
	line1[0] = new int[src->width()];
2053
	line2[0] = new int[src->width()];
2054
	line1[1] = new int[src->width()];
2055
	line2[1] = new int[src->width()];
2056
	line1[2] = new int[src->width()];
2057
	line2[2] = new int[src->width()];
2058
	pv[0] = new int[sw];
2059
	pv[1] = new int[sw];
2060
	pv[2] = new int[sw];
2061
2062
	for ( y=0; y < src->height(); y++ )
2063
    {
2064
	    p = (TQRgb *)src->scanLine(y);
2065
	    b = dst->scanLine(y);
2066
		int endian = (TQImage::systemByteOrder() == TQImage::BigEndian);
2067
		int x;
2068
		uchar* q = const_cast<TQImage*>(src)->scanLine(y);
2069
		uchar* q2 = const_cast<TQImage*>(src)->scanLine(y+1 < src->height() ? y + 1 : 0);
2070
		for (int chan = 0; chan < 3; chan++)
2071
        {
2072
		    b = dst->scanLine(y);
2073
		    int *l1 = (y&1) ? line2[chan] : line1[chan];
2074
		    int *l2 = (y&1) ? line1[chan] : line2[chan];
2075
		    if ( y == 0 )
2076
            {
2077
			    for (int i=0; i<sw; i++)
2078
			        l1[i] = q[i*4+chan+endian];
2079
		    }
2080
		    if ( y+1 < src->height() )
2081
            {
2082
			    for (int i=0; i<sw; i++)
2083
			        l2[i] = q2[i*4+chan+endian];
2084
		    }
2085
		    // Bi-directional error diffusion
2086
		    if ( y&1 )
2087
            {
2088
			    for (x=0; x<sw; x++)
2089
                {
2090
			        int pix = TQMAX(TQMIN(2, (l1[x] * 2 + 128)/ 255), 0);
2091
			        int err = l1[x] - pix * 255 / 2;
2092
			        pv[chan][x] = pix;
2093
2094
			        // Spread the error around...
2095
			        if ( x+1<sw )
2096
                    {
2097
				        l1[x+1] += (err*7)>>4;
2098
				        l2[x+1] += err>>4;
2099
			        }
2100
			        l2[x]+=(err*5)>>4;
2101
			        if (x>1)
2102
				        l2[x-1]+=(err*3)>>4;
2103
			    }
2104
		    }
2105
            else
2106
            {
2107
			    for (x=sw; x-->0; )
2108
                {
2109
			        int pix = TQMAX(TQMIN(2, (l1[x] * 2 + 128)/ 255), 0);
2110
			        int err = l1[x] - pix * 255 / 2;
2111
			        pv[chan][x] = pix;
2112
2113
			        // Spread the error around...
2114
			        if ( x > 0 )
2115
                    {
2116
				        l1[x-1] += (err*7)>>4;
2117
				        l2[x-1] += err>>4;
2118
			        }
2119
			        l2[x]+=(err*5)>>4;
2120
			        if (x+1 < sw)
2121
				        l2[x+1]+=(err*3)>>4;
2122
			    }
2123
		    }
2124
		}
2125
		if (endian)
2126
        {
2127
		    for (x=0; x<sw; x++)
2128
            {
2129
			    *b++ = INDEXOF(pv[2][x],pv[1][x],pv[0][x]);
2130
		    }
2131
		}
2132
        else
2133
        {
2134
		    for (x=0; x<sw; x++)
2135
            {
2136
			    *b++ = INDEXOF(pv[0][x],pv[1][x],pv[2][x]);
2137
		    }
2138
		}
2139
	}
2140
2141
	delete [] line1[0];
2142
	delete [] line2[0];
2143
	delete [] line1[1];
2144
	delete [] line2[1];
2145
	delete [] line1[2];
2146
	delete [] line2[2];
2147
	delete [] pv[0];
2148
	delete [] pv[1];
2149
	delete [] pv[2];
2150
2151
#undef MAX_R
2152
#undef MAX_G
2153
#undef MAX_B
2154
#undef INDEXOF
2155
2156
    return TRUE;
2157
}
2158
2159
// this doesn't work the way it should but the way KPixmap does.
2160
void TDEIconEditGrid::mapToKDEPalette()
2161
{
2162
    TQImage dest;
2163
2164
    kdither_32_to_8(img, &dest);
2165
    *img = dest.convertDepth(32);
2166
2167
    for(int y = 0; y < img->height(); y++)
2168
    {
2169
        uint *l = (uint*)img->scanLine(y);
2170
        for(int x = 0; x < img->width(); x++, l++)
2171
        {
2172
            if(*l < 0xff000000)
2173
            {
2174
                *l = *l | 0xff000000;
2175
            }
2176
        }
2177
    }
2178
2179
    load(img);
2180
    return;
2181
2182
/*
2183
#if [[[TQT_VERSION IS DEPRECATED]]] > 140
2184
  *img = img->convertDepthWithPalette(32, iconpalette, 42);
2185
  load(img);
2186
  return;
2187
#endif
2188
*/
2189
2190
    TQApplication::setOverrideCursor(waitCursor);
2191
    for(int y = 0; y < numRows(); y++)
2192
    {
2193
        uint *l = (uint*)img->scanLine(y);
2194
        for(int x = 0; x < numCols(); x++, l++)
2195
        {
2196
            if(*l != TRANSPARENT)
2197
            {
2198
                if(!iconcolors.contains(*l))
2199
                    *l = iconcolors.closestMatch(*l);
2200
            }
2201
        }
2202
    }
2203
2204
    load(img);
2205
    setModified(true);
2206
    TQApplication::restoreOverrideCursor();
2207
}
2208
2209
2210
void TDEIconEditGrid::grayScale()
2211
{
2212
    for(int y = 0; y < numRows(); y++)
2213
    {
2214
        uint *l = (uint*)img->scanLine(y);
2215
        for(int x = 0; x < numCols(); x++, l++)
2216
        {
2217
            if(*l != TRANSPARENT)
2218
            {
2219
                uint c = tqGray(*l);
2220
                *l = tqRgba(c, c, c, tqAlpha(*l));
2221
            }
2222
        }
2223
    }
2224
2225
    load(img);
2226
    setModified(true);
2227
}
2228
2229
2230
void TDEIconEditGrid::clearImage(TQImage *image)
2231
{
2232
    if(image->depth() != 32)
2233
    {
2234
        image->fill(TRANSPARENT);
2235
    }
2236
    else
2237
    {
2238
        // TQImage::fill() does not set the alpha channel so do it
2239
        // manually.
2240
        for(int y = 0; y < image->height(); y++)
2241
        {
2242
            uint *l = (uint*)image->scanLine(y);
2243
            for(int x = 0; x < image->width(); x++, l++)
2244
            {
2245
                *l = TRANSPARENT;
2246
            }
2247
        }
2248
    }
2249
}
2250
2251
2252
void TDEIconEditGrid::setModified(bool m)
2253
{
2254
    if(m != modified)
2255
    {
2256
        modified = m;
2257
        emit modifiedchanged(m);
2258
    }
2259
}
2260
2261
2262
#include "tdeicongrid.moc"
2263
// vim: set ts=4:
(-)tdegraphics/tdeiconedit/tdeicongrid.h (+265 lines)
Line 0 Link Here
1
/*
2
    TDE Icon Editor - a small graphics drawing program for the TDE.
3
    Copyright (C) 1998  Thomas Tanghus (tanghus@kde.org)
4
5
    This program is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public License
16
    along with this library; see the file COPYING.LIB.  If not, write to
17
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
    Boston, MA 02110-1301, USA.
19
*/  
20
21
#ifndef __TDEICONEDITGRID_H__
22
#define __TDEICONEDITGRID_H__
23
24
#include <tqpixmap.h>
25
#include <tqimage.h>
26
#include <tqcursor.h>
27
#include <tqpointarray.h>
28
#include <tqframe.h>
29
#include <kcommand.h>
30
#include <tdelocale.h>
31
32
#include "kcolorgrid.h"
33
34
class KCommandHistory;
35
class KRuler;
36
class TDEIconEditGrid;
37
class TQScrollView;
38
39
enum Direction {
40
    DirIn = 0, DirOut = 1,
41
    DirUp = DirIn, DirDown = DirOut,
42
    DirLeft, DirRight
43
};
44
45
class DrawCommand : public KCommand {
46
    public:
47
        DrawCommand( int xx, int yy, uint newcol, TQImage* img, TDEIconEditGrid* g ) {
48
            x = xx;
49
	    y = yy;
50
	    newcolor = newcol;
51
	    image = img;
52
	    grid = g;
53
        }
54
        
55
        void execute();
56
        void unexecute();
57
        TQString name() const {
58
            return i18n("Drawed Something");
59
        }
60
61
    protected:
62
        int x;
63
	int y;
64
        uint newcolor;
65
        uint oldcolor;
66
	TQImage* image;
67
	TDEIconEditGrid* grid;
68
};
69
70
class RepaintCommand : public KCommand {
71
    public:
72
	RepaintCommand( TQRect a, TDEIconEditGrid* g ) {
73
		area = a;
74
		grid = g;
75
	}
76
	
77
	void execute();
78
	void unexecute() {
79
		execute();
80
	}
81
	
82
	TQString name() const {
83
		return "repainted";
84
	}
85
    protected:
86
	TDEIconEditGrid* grid;
87
	TQRect area;
88
};
89
90
class KGridView : public TQFrame
91
{
92
    Q_OBJECT
93
  
94
public:
95
  KGridView( TQImage *image, KCommandHistory* history, TQWidget * parent = 0, const char *name = 0);
96
97
  KRuler *hruler() { return _hruler;}
98
  KRuler *vruler() { return _vruler;}
99
  TQFrame *corner() { return _corner;}
100
  TDEIconEditGrid *grid() { return _grid; }
101
  void setShowRulers(bool mode);
102
  void setAcceptDrop(bool a);
103
  const TQRect viewRect();
104
  TQScrollView *viewPortWidget() { return viewport;}
105
106
public slots:
107
  void sizeChange(int, int);
108
  void moving(int, int);
109
  void scalingChange(int);
110
  void paintGrid();
111
  void checkClipboard();
112
113
protected:
114
  virtual void paintEvent(TQPaintEvent*);
115
  virtual void resizeEvent(TQResizeEvent*);
116
  void paintDropSite();
117
  void setSizes();
118
119
  TQFrame *_corner;
120
  TDEIconEditGrid *_grid;
121
  KRuler *_hruler, *_vruler;
122
  TQScrollView *viewport;
123
  bool acceptdrop;
124
};
125
126
/**
127
* TDEIconEditGrid
128
* @short TDEIconEditGrid
129
* @author Thomas Tanghus <tanghus@kde.org>
130
* @version 0.3
131
*/
132
class TDEIconEditGrid : public KColorGrid
133
{
134
    Q_OBJECT
135
  
136
public:
137
  TDEIconEditGrid( TQImage *image, KCommandHistory* h, TQWidget * parent = 0, const char *name = 0);
138
  virtual ~TDEIconEditGrid();
139
140
  enum DrawTool { Line, Freehand, FloodFill, Spray, Rect, FilledRect, Circle,
141
        FilledCircle, Ellipse, FilledEllipse, Eraser, SelectRect, SelectCircle, Find };
142
  enum DrawAction { Mark, UnMark, Draw };
143
144
  void setGrid(bool g) { KColorGrid::setGrid(g); emit needPainting(); }
145
  bool isModified() { return modified; };
146
  void setModified(bool m);
147
  const TQPixmap &pixmap();
148
  const TQImage &image() { return *img; }
149
  TQImage clipboardImage(bool &ok);
150
  TQImage getSelection(bool);
151
  int rows() { return numRows(); };
152
  int cols() { return numCols(); };
153
  uint getColors( uint *_colors) { return colors(_colors); }
154
  bool isMarked(TQPoint p);
155
  bool isMarked(int x, int y);
156
  int scaling() { return cellSize(); }
157
  void loadBlank( int w = 0, int h = 0);
158
  void setUndoColor( int colNum, uint v, bool update = true ) {
159
  	setColor( colNum, v, update );
160
  };
161
162
  enum TransparencyDisplayType
163
  {
164
    TRD_SOLIDCOLOR,
165
    TRD_CHECKERBOARD
166
  };
167
  enum CheckerboardSize
168
  {
169
    CHK_SMALL = 0,
170
    CHK_MEDIUM = 1,
171
    CHK_LARGE = 2
172
  };
173
174
  TransparencyDisplayType transparencyDisplayType() const { return m_transparencyDisplayType; }
175
  TQColor checkerboardColor1() const { return m_checkerboardColor1; }
176
  TQColor checkerboardColor2() const { return m_checkerboardColor2; }
177
  CheckerboardSize checkerboardSize() const { return m_checkerboardSize; }
178
  TQColor transparencySolidColor() const { return m_transparencySolidColor; }
179
180
  void setTransparencyDisplayType(TransparencyDisplayType t) { m_transparencyDisplayType = t; }
181
  void setCheckerboardColor1(const TQColor& c) { m_checkerboardColor1 = c; }
182
  void setCheckerboardColor2(const TQColor& c) { m_checkerboardColor2 = c; }
183
  void setCheckerboardSize(CheckerboardSize size) { m_checkerboardSize = size; }
184
  void setTransparencySolidColor(const TQColor& c) { m_transparencySolidColor = c; }
185
186
public slots:
187
  void load( TQImage *);
188
  void editCopy(bool cut = false);
189
  void editPaste(bool paste = false);
190
  void editPasteAsNew();
191
  void editSelectAll();
192
  void editClear();
193
  void getImage(TQImage *image);
194
//#if [[[TQT_VERSION IS DEPRECATED]]] <= 140
195
  void editResize();
196
//#endif
197
  void setSize(const TQSize s);
198
  void grayScale();
199
  void mapToKDEPalette();
200
  void setTool(DrawTool tool);
201
  bool zoom(Direction direct);
202
  bool zoomTo(int);
203
  
204
  void checkClipboard();
205
206
signals:
207
  void scalingchanged(int);
208
  void changed( const TQPixmap & );
209
  void sizechanged( int, int );
210
  void poschanged( int, int );
211
  void xposchanged( int );
212
  void yposchanged( int );
213
  void newmessage(const TQString &);
214
  void clipboarddata(bool);
215
  void selecteddata(bool);
216
  void needPainting();
217
  void modifiedchanged(bool);
218
  void colorSelected(uint);
219
220
protected slots:
221
  void setColorSelection( uint );
222
  void updatePreviewPixmap();
223
224
protected:
225
  virtual void paintEvent(TQPaintEvent*);
226
  virtual void paintCell( TQPainter*, int, int ) {}
227
  virtual void paintForeground(TQPainter* p, TQPaintEvent* e);
228
  virtual void mousePressEvent(TQMouseEvent*);
229
  virtual void mouseReleaseEvent(TQMouseEvent*);
230
  virtual void mouseMoveEvent(TQMouseEvent*);
231
  void createCursors();
232
  void drawPointArray(TQPointArray, DrawAction);
233
  void drawEllipse(bool);
234
  void drawLine(bool drawIt, bool drawStraight);
235
  void drawRect(bool);
236
  void drawSpray(TQPoint);
237
  void drawFlood(int x, int y, uint oldcolor);
238
  static void clearImage(TQImage *image);
239
240
  uint currentcolor;
241
  TQPoint start, end;
242
  TQRect insrect;
243
  TQSize cbsize;
244
  TQImage *img;
245
  TQPixmap p;
246
  int selected, tool; //, numrows, numcols;
247
  bool modified, btndown, ispasting, isselecting;
248
  TQPointArray pntarray;
249
  KColorArray iconcolors;
250
  KCommandHistory* history;
251
  KMacroCommand* m_command;
252
  TQCursor cursor_normal, cursor_aim, cursor_flood, cursor_spray, cursor_erase, cursor_paint, cursor_colorpicker;
253
  TransparencyDisplayType m_transparencyDisplayType;
254
  TQColor m_checkerboardColor1;
255
  TQColor m_checkerboardColor2;
256
  CheckerboardSize m_checkerboardSize;
257
  TQColor m_transparencySolidColor;
258
};
259
260
261
262
#endif //__TDEICONEDITGRID_H__
263
264
265
(-)tdegraphics/tdeiconedit/utils.cpp (+134 lines)
Line 0 Link Here
1
/*
2
    TDE Icon Editor - a small graphics drawing program for the TDE
3
4
    Copyright (C) 1998 Thomas Tanghus (tanghus@kde.org)
5
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public
8
    License as published by the Free Software Foundation; either
9
    version 2 of the License, or (at your option) any later version.
10
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
    General Public License for more details.
15
16
    You should have received a copy of the GNU Library General Public License
17
    along with this library; see the file COPYING.LIB.  If not, write to
18
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
    Boston, MA 02110-1301, USA.
20
*/
21
22
#include <kimageio.h>
23
#include <tdelocale.h>
24
#include <kdebug.h>
25
26
#include "utils.h"
27
#include "config.h"
28
29
imageFormats *formats = 0L;
30
31
void setupImageHandlers()
32
{
33
  if(formats != 0L)
34
    return;
35
36
  KImageIO::registerFormats();
37
38
  kdDebug(4640) << "Initializing formats" << endl;
39
  formats = new imageFormats;
40
  TQ_CHECK_PTR(formats);
41
  formats->setAutoDelete(true);
42
  formats->append(new imageFormat("GIF", "GIF",  "gif"));
43
#ifdef HAVE_LIBJPEG
44
  formats->append(new imageFormat("JFIF", "JPEG", "jpg"));
45
#endif
46
  formats->append(new imageFormat("XPM", "XPM",  "xpm"));
47
  formats->append(new imageFormat("ICO", "Windows Icon File",  "ico"));
48
/*
49
#ifdef HAVE_LIBJPEG
50
  TQImageIO::defineIOHandler("JFIF","^\377\330\377\340", 0, read_jpeg_jfif, NULL);
51
#endif
52
*/
53
}
54
55
// Simple copy operation on local files (isn't there something like this in the libs?)
56
bool copyFile(const TQString &src, const TQString &dest)
57
{
58
  TQFile f_src(src);
59
  TQFile f_dest(dest);
60
  TQFileInfo fi(f_src);
61
  uint src_size = fi.size();
62
  kdDebug(4640) << "Size: " << src_size << endl;
63
64
  if ( f_src.open(IO_ReadOnly) )
65
  {    // file opened successfully
66
    if ( !f_dest.open(IO_WriteOnly) )
67
    {
68
      kdDebug(4640) << "copyFile - There was an error opening destination file: " << dest << endl;
69
      f_src.close();
70
      return false;
71
    }
72
    char *data = new char[src_size];
73
    if(f_src.readBlock(data, src_size) == -1)
74
    {
75
      kdDebug(4640) << "copyFile - There was an error reading source file: " << src << endl;
76
      f_src.close();
77
      f_dest.close();
78
      delete [] data;
79
      return false;
80
    }
81
    if(f_dest.writeBlock(data, src_size) == -1)
82
    {
83
      kdDebug(4640) << "copyFile - There was an error writing to destination file: " << dest << endl;
84
      f_src.close();
85
      f_dest.close();
86
      delete [] data;
87
      return false;
88
    }
89
90
    f_src.close();
91
    f_dest.close();
92
    delete [] data;
93
    return true;
94
  }
95
  kdDebug(4640) << "copyFile - There was an error opening source file: " << src << endl;
96
  return false;
97
}
98
99
bool removeFile(const TQString &file)
100
{
101
  if(file.length() > 0 && TQFile::exists(file))
102
  {
103
    TQDir d;
104
    kdDebug(4640) << "Removing " << file << endl;
105
    if(!d.remove(file))
106
    {
107
      kdDebug(4640) << "removeFile - There was an error removing the file: " << file << endl;
108
      return false;
109
    }
110
    return true;
111
  }
112
  return false;
113
}
114
115
bool moveFile(const TQString &src, const TQString &dest)
116
{
117
  if(copyFile(src, dest))
118
    return removeFile(src);
119
  return false;
120
}
121
122
uint kdeColor(uint color)
123
{
124
  uint c = iconpalette[0]|OPAQUE_MASK;
125
126
  for(uint i = 0; i < 42; i++)
127
  {
128
    //kdDebug(4640) << "Color #" << i << " " << iconpalette[i] << endl;
129
    if( (iconpalette[i]|OPAQUE_MASK) - c < (iconpalette[i]|OPAQUE_MASK) - color)
130
      c = iconpalette[i]|OPAQUE_MASK;
131
  }
132
  //kdDebug(4640) << color << " -> " << c << endl;
133
  return c;
134
}
(-)tdegraphics/tdeiconedit/utils.h (+73 lines)
Line 0 Link Here
1
/*  
2
    tdeiconedit - a small graphics drawing program for the KDE
3
4
    Copyright (C) 1998 Thomas Tanghus (tanghus@kde.org)
5
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public
8
    License as published by the Free Software Foundation; either
9
    version 2 of the License, or (at your option) any later version.
10
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
    General Public License for more details.
15
16
    You should have received a copy of the GNU Library General Public License
17
    along with this library; see the file COPYING.LIB.  If not, write to
18
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
    Boston, MA 02110-1301, USA.
20
*/  
21
22
#ifndef __UTILS_H__
23
#define __UTILS_H__
24
25
#include <tqimage.h>
26
27
#ifdef HAVE_CONFIG_H
28
#include "config.h"
29
#endif // HAVE_CONFIG_H
30
31
#include <tqdir.h>
32
#include <tqfile.h>
33
#include <tqfileinfo.h>
34
#include <tdeapplication.h>
35
36
#define OPAQUE_MASK 0xff000000
37
38
#ifdef TRANSPARENT
39
#undef TRANSPARENT
40
#endif
41
#define TRANSPARENT 0x00000000
42
43
const uint iconpalette[42] = {  // kde palette
44
	0x303030,0x585858,0x808080,0xa0a0a0,0xc3c3c3,0xdcdcdc,
45
	0x000040,0x004000,0x000000,0x004040,0x404000,0x000000,
46
	0x000080,0x008000,0x800000,0x008080,0x808000,0x800080,
47
	0x0000c0,0x00c000,0xc00000,0x00c0c0,0xc0c000,0xc000c0,
48
	0x0000ff,0x00ff00,0xff0000,0x00ffff,0xffff00,0xff00ff,
49
	0xc0c0ff,0xc0ffc0,0xffc0c0,0xc0ffff,0xffffc0,0xffc0ff,
50
	0x0080ff,0x0058c0,0x58a8ff,0xa8dcff,0xffffff,0x000000};
51
52
struct imageFormat
53
{
54
  imageFormat(const char *f, const char *t, const char *e) { format = f; title = t, extension = e;}
55
  const char *format;
56
  const char *title;
57
  const char *extension;
58
};
59
60
typedef TQPtrList<struct imageFormat> imageFormats;
61
extern imageFormats *formats;
62
63
void setupImageHandlers();
64
65
bool copyFile(const TQString &src, const TQString &dest);
66
bool removeFile(const TQString &file);
67
bool moveFile(const TQString &src, const TQString &dest);
68
uint kdeColor(uint c);
69
70
#endif //__UTILS_H__
71
72
73
(-)tdegraphics/tdeiconedit/version.h (+36 lines)
Line 0 Link Here
1
/*  
2
    tdeiconedit - a small graphics drawing program for the KDE
3
4
    Copyright (C) 1998 Thomas Tanghus (tanghus@kde.org)
5
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public
8
    License as published by the Free Software Foundation; either
9
    version 2 of the License, or (at your option) any later version.
10
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
    General Public License for more details.
15
16
    You should have received a copy of the GNU Library General Public License
17
    along with this library; see the file COPYING.LIB.  If not, write to
18
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
    Boston, MA 02110-1301, USA.
20
*/  
21
22
#ifndef __KIE_VERSION_H__
23
#define __KIE_VERSION_H__
24
25
#define KIE_VERSION_MAJOR 0
26
#define KIE_VERSION_MINOR 4
27
#define KIE_VERSION_RELEASE 0
28
#define KIE_VERSION ((KIE_VERSION_MAJOR * 100) + (KIE_VERSION_MINOR *10) + KIE_VERSION_RELEASE)
29
#define KIE_VERSION_STRING "0.4.0"
30
31
32
33
#endif // __KIE_VERSION_H__
34
35
36

Return to bug 1819