author | harlekin <harlekin> | 2003-03-09 10:05:26 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-03-09 10:05:26 (UTC) |
commit | c45c38135a5bdc5acf2a73b5086a21e5331fcbbf (patch) (unidiff) | |
tree | 6b247100b120d993c237b890202e4dbb490416bf /core/applets/clipboardapplet/clipboard.cpp | |
parent | 8357b1104375ea0cb6b9d6ed1b8975f090745d60 (diff) | |
download | opie-c45c38135a5bdc5acf2a73b5086a21e5331fcbbf.zip opie-c45c38135a5bdc5acf2a73b5086a21e5331fcbbf.tar.gz opie-c45c38135a5bdc5acf2a73b5086a21e5331fcbbf.tar.bz2 |
new inlined icon
Diffstat (limited to 'core/applets/clipboardapplet/clipboard.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/clipboardapplet/clipboard.cpp | 315 |
1 files changed, 209 insertions, 106 deletions
diff --git a/core/applets/clipboardapplet/clipboard.cpp b/core/applets/clipboardapplet/clipboard.cpp index 3099a84..b83e16e 100644 --- a/core/applets/clipboardapplet/clipboard.cpp +++ b/core/applets/clipboardapplet/clipboard.cpp | |||
@@ -35,83 +35,186 @@ | |||
35 | static const char * paste_xpm[] = { | 35 | static const char * paste_xpm[] = { |
36 | "14 16 64 1", | 36 | "14 16 167 2", |
37 | " c None", | 37 | " c None", |
38 | ".c #020202", | 38 | ". c #96A0AC", |
39 | "+c #867616", | 39 | "+ c #9BB0D4", |
40 | "@c #A69A42", | 40 | "@ c #5E7095", |
41 | "#c #BAB676", | 41 | "# c #F1CA79", |
42 | "$c #060606", | 42 | "$ c #EFC56D", |
43 | "%c #EAD2AA", | 43 | "% c #C9AF76", |
44 | "&c #F6F6DA", | 44 | "& c #9FABBA", |
45 | "*c #222212", | 45 | "* c #AEBFDD", |
46 | "=c #86761E", | 46 | "= c #8899BA", |
47 | "-c #868686", | 47 | "- c #726E68", |
48 | ";c #5A5202", | 48 | "; c #D19A33", |
49 | ">c #8A7E2E", | 49 | "> c #DA9524", |
50 | ",c #2C2C2C", | 50 | ", c #EFC065", |
51 | "'c #9A9A9A", | 51 | "' c #F3DDA6", |
52 | ")c #F6EADA", | 52 | ") c #E9D192", |
53 | "!c #AAA262", | 53 | "! c #ADA895", |
54 | "~c #323232", | 54 | "~ c #9AA8BF", |
55 | "{c #726A32", | 55 | "{ c #B4C2D8", |
56 | "]c #6E6E6E", | 56 | "] c #AEBED7", |
57 | "^c #C2B69E", | 57 | "^ c #797E8A", |
58 | "/c #9E9E9E", | 58 | "/ c #B78534", |
59 | "(c #EED6BA", | 59 | "( c #DE8516", |
60 | "_c #F2DEC2", | 60 | "_ c #8A4308", |
61 | ":c #D2CE8E", | 61 | ": c #F0C470", |
62 | "<c #3A3A3A", | 62 | "< c #F5EFD3", |
63 | "[c #EACAA2", | 63 | "[ c #DFD7B4", |
64 | "}c #3E3E3E", | 64 | "} c #8F9BA6", |
65 | "|c #727272", | 65 | "| c #7C8BA3", |
66 | "1c #CECECE", | 66 | "1 c #808A9A", |
67 | "2c #929292", | 67 | "2 c #828892", |
68 | "3c #4A462A", | 68 | "3 c #727582", |
69 | "4c #424242", | 69 | "4 c #9A6435", |
70 | "5c #666666", | 70 | "5 c #F37004", |
71 | "6c #C2AE96", | 71 | "6 c #A24104", |
72 | "7c #767676", | 72 | "7 c #F0C36E", |
73 | "8c #D6D6D6", | 73 | "8 c #F4EBCC", |
74 | "9c #C2C2C2", | 74 | "9 c #ECDCAF", |
75 | "0c #BFA681", | 75 | "0 c #CDC29B", |
76 | "ac #1E1E1E", | 76 | "a c #C1B486", |
77 | "bc #FAF6F3", | 77 | "b c #C3A86B", |
78 | "cc #AEAEAE", | 78 | "c c #B8924A", |
79 | "dc #C29A6A", | 79 | "d c #B17B31", |
80 | "ec #FEFEFE", | 80 | "e c #C66C1C", |
81 | "fc #B6B6B6", | 81 | "f c #DE6610", |
82 | "gc #7E7E7E", | 82 | "g c #944311", |
83 | "hc #FAF2E6", | 83 | "h c #F3E8C6", |
84 | "ic #8E8E8E", | 84 | "i c #F3E0AB", |
85 | "jc #C6BCAE", | 85 | "j c #F2DB9B", |
86 | "kc #DEDEDE", | 86 | "k c #F1D382", |
87 | "lc #BEBEBE", | 87 | "l c #F0C056", |
88 | "mc #464646", | 88 | "m c #CCA354", |
89 | "nc #BEAE92", | 89 | "n c #B7B09D", |
90 | "oc #262626", | 90 | "o c #C2A898", |
91 | "pc #F2E2CE", | 91 | "p c #BCA298", |
92 | "qc #C2A175", | 92 | "q c #9A959F", |
93 | "rc #CACACA", | 93 | "r c #526C8F", |
94 | "sc #969696", | 94 | "s c #F3E4B9", |
95 | "tc #8A8A8A", | 95 | "t c #F3DA99", |
96 | "uc #828282", | 96 | "u c #F4D78A", |
97 | "vc #6A6A6A", | 97 | "v c #F5CA6A", |
98 | "wc #BEB6AE", | 98 | "w c #F4B032", |
99 | "xc #E2E0E0", | 99 | "x c #C19A56", |
100 | "yc #7A7A7A", | 100 | "y c #C2D7EA", |
101 | " *{>; ", | 101 | "z c #C0D0E7", |
102 | " }}}@e:!;}}} ", | 102 | "A c #B0C6E8", |
103 | "<x8=&:#@+;ll, ", | 103 | "B c #A6C1EB", |
104 | "}k/=;;3}337|o ", | 104 | "C c #6AA1E3", |
105 | "<k's24444m45o ", | 105 | "D c #F0C36D", |
106 | "}8'ss4xkkk]}a ", | 106 | "E c #F3E2B0", |
107 | "<1s224keee|b4 ", | 107 | "F c #F3D891", |
108 | "}r2itmkeee]]44", | 108 | "G c #F3CF7A", |
109 | "<9iitmkeeehkw.", | 109 | "H c #F4BC4C", |
110 | "<lt-u4keeb)pn.", | 110 | "I c #F3A51C", |
111 | "<fu-umkebhp(0.", | 111 | "J c #BC9758", |
112 | "<cugg4kbh)_(q.", | 112 | "K c #CAE4FE", |
113 | "<cyyymk))p(%q.", | 113 | "L c #C5DDFB", |
114 | ",5vvv4k)p_%[q.", | 114 | "M c #B5D3FB", |
115 | " ...$mljnn0qd.", | 115 | "N c #A8CCFC", |
116 | " 4.......,"}; | 116 | "O c #63A6F6", |
117 | "P c #2180E3", | ||
118 | "Q c #F3E1AE", | ||
119 | "R c #F3D488", | ||
120 | "S c #F3C664", | ||
121 | "T c #F4B63C", | ||
122 | "U c #F2A61C", | ||
123 | "V c #BC9A5C", | ||
124 | "W c #CCE6FE", | ||
125 | "X c #C8DEFB", | ||
126 | "Y c #B9D6FB", | ||
127 | "Z c #B2D0FC", | ||
128 | "` c #84B6FB", | ||
129 | " .c #479DFB", | ||
130 | "..c #F3DFAC", | ||
131 | "+.c #F3CC76", | ||
132 | "@.c #F3BE52", | ||
133 | "#.c #F4B53A", | ||
134 | "$.c #F2AB24", | ||
135 | "%.c #BC9D61", | ||
136 | "&.c #CBE5FE", | ||
137 | "*.c #C3DBFB", | ||
138 | "=.c #B0D0FB", | ||
139 | "-.c #ACCBFC", | ||
140 | ";.c #A0C3FD", | ||
141 | ">.c #6EB1FF", | ||
142 | ",.c #F3DCA4", | ||
143 | "'.c #F3C35F", | ||
144 | ").c #F3BC4A", | ||
145 | "!.c #F3AC26", | ||
146 | "~.c #BC9E63", | ||
147 | "{.c #CAE4FF", | ||
148 | "].c #BCD7FB", | ||
149 | "^.c #A3C7FB", | ||
150 | "/.c #94BCFB", | ||
151 | "(.c #92BAFB", | ||
152 | "_.c #74B4FE", | ||
153 | ":.c #F1C46D", | ||
154 | "<.c #F4D99A", | ||
155 | "[.c #F4BE52", | ||
156 | "}.c #F4BB47", | ||
157 | "|.c #F4B63D", | ||
158 | "1.c #F4AD27", | ||
159 | "2.c #BC9E64", | ||
160 | "3.c #CAE5FF", | ||
161 | "4.c #BAD6FB", | ||
162 | "5.c #A1C5FB", | ||
163 | "6.c #9AC1FB", | ||
164 | "7.c #9DC1FC", | ||
165 | "8.c #7CBAFE", | ||
166 | "9.c #F5C870", | ||
167 | "0.c #F8DC9B", | ||
168 | "a.c #F8C65C", | ||
169 | "b.c #F8C252", | ||
170 | "c.c #F8BE49", | ||
171 | "d.c #F7B534", | ||
172 | "e.c #BFA46C", | ||
173 | "f.c #CBE4FF", | ||
174 | "g.c #B7D3FB", | ||
175 | "h.c #A4C6FB", | ||
176 | "i.c #A0C4FB", | ||
177 | "j.c #A2C4FC", | ||
178 | "k.c #80BDFF", | ||
179 | "l.c #BC9250", | ||
180 | "m.c #BF9461", | ||
181 | "n.c #BD8944", | ||
182 | "o.c #BD863D", | ||
183 | "p.c #BD8438", | ||
184 | "q.c #BC7C2C", | ||
185 | "r.c #988269", | ||
186 | "s.c #C5E7FF", | ||
187 | "t.c #C0DDFE", | ||
188 | "u.c #B2D4FE", | ||
189 | "v.c #ACD1FE", | ||
190 | "w.c #ACD0FE", | ||
191 | "x.c #7DC0FF", | ||
192 | "y.c #805835", | ||
193 | "z.c #754D26", | ||
194 | "A.c #754C22", | ||
195 | "B.c #754B20", | ||
196 | "C.c #75471A", | ||
197 | "D.c #534D4F", | ||
198 | "E.c #619BCE", | ||
199 | "F.c #6295C8", | ||
200 | "G.c #5C91C8", | ||
201 | "H.c #598FC8", | ||
202 | "I.c #588FC8", | ||
203 | "J.c #3E87CD", | ||
204 | " . + @ ", | ||
205 | " # $ % & * = - ; > ", | ||
206 | ", ' ) ! ~ { ] ^ / ( _ ", | ||
207 | ": < [ } | 1 2 3 4 5 6 ", | ||
208 | "7 8 9 0 a b c d e f g ", | ||
209 | "7 h i j k l m n o p q r ", | ||
210 | "7 s t u v w x y z A B C ", | ||
211 | "D E F G H I J K L M N O P ", | ||
212 | "D Q R S T U V W X Y Z ` . ", | ||
213 | "D ..+.@.#.$.%.&.*.=.-.;.>. ", | ||
214 | "7 ,.'.).T !.~.{.].^./.(._. ", | ||
215 | ":.<.[.}.|.1.2.3.4.5.6.7.8. ", | ||
216 | "9.0.a.b.c.d.e.f.g.h.i.j.k. ", | ||
217 | "l.m.n.o.p.q.r.s.t.u.v.w.x. ", | ||
218 | " y.z.A.B.C.D.E.F.G.H.I.J. ", | ||
219 | " "}; | ||
117 | 220 | ||
@@ -125,3 +228,3 @@ ClipboardApplet::ClipboardApplet( QWidget *parent, const char *name ) : QWidget( | |||
125 | m_timer = new QTimer ( this ); | 228 | m_timer = new QTimer ( this ); |
126 | 229 | ||
127 | connect ( QApplication::clipboard ( ), SIGNAL( dataChanged ( )), this, SLOT( newData ( ))); | 230 | connect ( QApplication::clipboard ( ), SIGNAL( dataChanged ( )), this, SLOT( newData ( ))); |
@@ -133,3 +236,3 @@ ClipboardApplet::ClipboardApplet( QWidget *parent, const char *name ) : QWidget( | |||
133 | m_lasttext = QString::null; | 236 | m_lasttext = QString::null; |
134 | 237 | ||
135 | m_timer-> start ( 0, true ); | 238 | m_timer-> start ( 0, true ); |
@@ -153,3 +256,3 @@ void ClipboardApplet::mousePressEvent ( QMouseEvent *) | |||
153 | delete m_menu; | 256 | delete m_menu; |
154 | 257 | ||
155 | m_menu = new QPopupMenu ( this ); | 258 | m_menu = new QPopupMenu ( this ); |
@@ -157,9 +260,9 @@ void ClipboardApplet::mousePressEvent ( QMouseEvent *) | |||
157 | 260 | ||
158 | if ( m_history. count ( )) { | 261 | if ( m_history. count ( )) { |
159 | for ( unsigned int i = 0; i < m_history. count ( ); i++ ) { | 262 | for ( unsigned int i = 0; i < m_history. count ( ); i++ ) { |
160 | QString str = m_history [i]; | 263 | QString str = m_history [i]; |
161 | 264 | ||
162 | if ( str. length ( ) > 20 ) | 265 | if ( str. length ( ) > 20 ) |
163 | str = str. left ( 20 ) + "..."; | 266 | str = str. left ( 20 ) + "..."; |
164 | 267 | ||
165 | m_menu-> insertItem ( QString ( "%1: %2" ). arg ( i + 1 ). arg ( str ), i ); | 268 | m_menu-> insertItem ( QString ( "%1: %2" ). arg ( i + 1 ). arg ( str ), i ); |
@@ -167,3 +270,3 @@ void ClipboardApplet::mousePressEvent ( QMouseEvent *) | |||
167 | } | 270 | } |
168 | m_menu-> setItemChecked ( m_history. count ( ) - 1, true ); | 271 | m_menu-> setItemChecked ( m_history. count ( ) - 1, true ); |
169 | m_menu-> insertSeparator ( ); | 272 | m_menu-> insertSeparator ( ); |
@@ -173,5 +276,5 @@ void ClipboardApplet::mousePressEvent ( QMouseEvent *) | |||
173 | m_menu-> insertItem ( QIconSet ( Resource::loadPixmap ( "paste" )), tr( "Paste" ), 102 ); | 276 | m_menu-> insertItem ( QIconSet ( Resource::loadPixmap ( "paste" )), tr( "Paste" ), 102 ); |
174 | 277 | ||
175 | connect ( m_menu, SIGNAL( activated ( int )), this, SLOT( action ( int ))); | 278 | connect ( m_menu, SIGNAL( activated ( int )), this, SLOT( action ( int ))); |
176 | 279 | ||
177 | m_dirty = false; | 280 | m_dirty = false; |
@@ -180,3 +283,3 @@ void ClipboardApplet::mousePressEvent ( QMouseEvent *) | |||
180 | QSize s = m_menu-> sizeHint ( ); | 283 | QSize s = m_menu-> sizeHint ( ); |
181 | 284 | ||
182 | m_menu-> popup ( QPoint ( p. x ( ) + ( width ( ) / 2 ) - ( s. width ( ) / 2 ), p. y ( ) - s. height ( ))); | 285 | m_menu-> popup ( QPoint ( p. x ( ) + ( width ( ) / 2 ) - ( s. width ( ) / 2 ), p. y ( ) - s. height ( ))); |
@@ -191,3 +294,3 @@ void ClipboardApplet::action(int id) | |||
191 | case 100: | 294 | case 100: |
192 | unicode = 'X' - '@'; | 295 | unicode = 'X' - '@'; |
193 | scan = Key_X; // Cut | 296 | scan = Key_X; // Cut |
@@ -195,3 +298,3 @@ void ClipboardApplet::action(int id) | |||
195 | case 101: | 298 | case 101: |
196 | unicode = 'C' - '@'; | 299 | unicode = 'C' - '@'; |
197 | scan = Key_C; // Copy | 300 | scan = Key_C; // Copy |
@@ -199,6 +302,6 @@ void ClipboardApplet::action(int id) | |||
199 | case 102: | 302 | case 102: |
200 | unicode = 'V' - '@'; | 303 | unicode = 'V' - '@'; |
201 | scan = Key_V; // Paste | 304 | scan = Key_V; // Paste |
202 | break; | 305 | break; |
203 | 306 | ||
204 | default: | 307 | default: |
@@ -206,6 +309,6 @@ void ClipboardApplet::action(int id) | |||
206 | QApplication::clipboard ( )-> setText ( m_history [id] ); | 309 | QApplication::clipboard ( )-> setText ( m_history [id] ); |
207 | 310 | ||
208 | for ( uint i = 0; i < m_history. count ( ); i++ ) | 311 | for ( uint i = 0; i < m_history. count ( ); i++ ) |
209 | m_menu-> setItemChecked ( i, i == uint( id )); | 312 | m_menu-> setItemChecked ( i, i == uint( id )); |
210 | 313 | ||
211 | unicode = 'V' - '@'; | 314 | unicode = 'V' - '@'; |
@@ -215,3 +318,3 @@ void ClipboardApplet::action(int id) | |||
215 | } | 318 | } |
216 | 319 | ||
217 | if ( scan ) { | 320 | if ( scan ) { |
@@ -231,3 +334,3 @@ void ClipboardApplet::newData ( ) | |||
231 | static bool excllock = false; | 334 | static bool excllock = false; |
232 | 335 | ||
233 | if ( excllock ) | 336 | if ( excllock ) |
@@ -236,5 +339,5 @@ void ClipboardApplet::newData ( ) | |||
236 | excllock = true; | 339 | excllock = true; |
237 | 340 | ||
238 | m_timer-> stop ( ); | 341 | m_timer-> stop ( ); |
239 | 342 | ||
240 | QCString type = "plain"; | 343 | QCString type = "plain"; |
@@ -247,8 +350,8 @@ void ClipboardApplet::newData ( ) | |||
247 | m_history. remove ( m_history. begin ( )); | 350 | m_history. remove ( m_history. begin ( )); |
248 | 351 | ||
249 | m_dirty = true; | 352 | m_dirty = true; |
250 | } | 353 | } |
251 | 354 | ||
252 | m_timer-> start ( 1500, true ); | 355 | m_timer-> start ( 1500, true ); |
253 | 356 | ||
254 | excllock = false; | 357 | excllock = false; |