-rw-r--r-- | noncore/settings/appearance2/appearance.cpp | 8 | ||||
-rw-r--r-- | noncore/settings/appearance2/config.in | 2 | ||||
-rw-r--r-- | noncore/settings/appearance2/exceptlistitem.h | 8 | ||||
-rw-r--r-- | noncore/settings/appearance2/stylelistitem.h | 3 |
4 files changed, 11 insertions, 10 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp index 93e28fa..eea1a19 100644 --- a/noncore/settings/appearance2/appearance.cpp +++ b/noncore/settings/appearance2/appearance.cpp | |||
@@ -342,53 +342,53 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg ) | |||
342 | gridLayout-> addWidget( m_tabstyle_bottom, 1, 2 ); | 342 | gridLayout-> addWidget( m_tabstyle_bottom, 1, 2 ); |
343 | QWhatsThis::add( m_tabstyle_bottom, tr( "Click here so that tabs appear at the bottom of the window." ) ); | 343 | QWhatsThis::add( m_tabstyle_bottom, tr( "Click here so that tabs appear at the bottom of the window." ) ); |
344 | 344 | ||
345 | m_tabstyle_top-> setChecked ( tabtop ); | 345 | m_tabstyle_top-> setChecked ( tabtop ); |
346 | m_tabstyle_bottom-> setChecked ( !tabtop ); | 346 | m_tabstyle_bottom-> setChecked ( !tabtop ); |
347 | 347 | ||
348 | m_original_tabstyle = style; | 348 | m_original_tabstyle = style; |
349 | m_original_tabpos = tabtop; | 349 | m_original_tabpos = tabtop; |
350 | 350 | ||
351 | vertLayout-> addSpacing ( 3 ); | 351 | vertLayout-> addSpacing ( 3 ); |
352 | QHBoxLayout *rotLay = new QHBoxLayout ( vertLayout, 3 ); | 352 | QHBoxLayout *rotLay = new QHBoxLayout ( vertLayout, 3 ); |
353 | 353 | ||
354 | QLabel* rotlabel = new QLabel( tr( "Rotation direction:" ), tab ); | 354 | QLabel* rotlabel = new QLabel( tr( "Rotation direction:" ), tab ); |
355 | m_rotdir_cw = new QRadioButton( tab, "rotdir_cw" ); | 355 | m_rotdir_cw = new QRadioButton( tab, "rotdir_cw" ); |
356 | m_rotdir_ccw = new QRadioButton( tab, "rotdir_ccw" ); | 356 | m_rotdir_ccw = new QRadioButton( tab, "rotdir_ccw" ); |
357 | m_rotdir_flip = new QRadioButton( tab, "rotdir_flip" ); | 357 | m_rotdir_flip = new QRadioButton( tab, "rotdir_flip" ); |
358 | QButtonGroup* rotbtngrp = new QButtonGroup( tab, "rotbuttongroup" ); | 358 | QButtonGroup* rotbtngrp = new QButtonGroup( tab, "rotbuttongroup" ); |
359 | 359 | ||
360 | rotbtngrp-> hide ( ); | 360 | rotbtngrp-> hide ( ); |
361 | rotbtngrp-> setExclusive ( true ); | 361 | rotbtngrp-> setExclusive ( true ); |
362 | rotbtngrp-> insert ( m_rotdir_cw ); | 362 | rotbtngrp-> insert ( m_rotdir_cw ); |
363 | rotbtngrp-> insert ( m_rotdir_ccw ); | 363 | rotbtngrp-> insert ( m_rotdir_ccw ); |
364 | rotbtngrp-> insert ( m_rotdir_flip ); | 364 | rotbtngrp-> insert ( m_rotdir_flip ); |
365 | 365 | ||
366 | QImage ccwImage = Resource::loadImage( "redo" ); | 366 | QImage ccwImage = Opie::Core::OResource::loadImage( "redo", Opie::Core::OResource::SmallIcon ); |
367 | QPixmap cw, ccw, flip; | 367 | QPixmap cw, ccw, flip; |
368 | cw.convertFromImage( ccwImage.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 368 | cw.convertFromImage( ccwImage ); |
369 | ccw.convertFromImage( ccwImage.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ).mirror( 1, 0 ) ); | 369 | ccw.convertFromImage( ccwImage.mirror( 1, 0 ) ); |
370 | flip.convertFromImage( Resource::loadImage( "pass" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 370 | flip.convertFromImage( Opie::Core::OResource::loadImage( "pass", Opie::Core::OResource::SmallIcon ) ); |
371 | 371 | ||
372 | m_rotdir_cw-> setPixmap( cw ); | 372 | m_rotdir_cw-> setPixmap( cw ); |
373 | m_rotdir_ccw-> setPixmap( ccw ); | 373 | m_rotdir_ccw-> setPixmap( ccw ); |
374 | m_rotdir_flip-> setPixmap( flip ); | 374 | m_rotdir_flip-> setPixmap( flip ); |
375 | 375 | ||
376 | rotLay-> addWidget ( rotlabel, 0 ); | 376 | rotLay-> addWidget ( rotlabel, 0 ); |
377 | rotLay-> addWidget ( m_rotdir_cw, 0 ); | 377 | rotLay-> addWidget ( m_rotdir_cw, 0 ); |
378 | rotLay-> addWidget ( m_rotdir_ccw, 0 ); | 378 | rotLay-> addWidget ( m_rotdir_ccw, 0 ); |
379 | rotLay-> addWidget ( m_rotdir_flip, 0 ); | 379 | rotLay-> addWidget ( m_rotdir_flip, 0 ); |
380 | 380 | ||
381 | int rotDirection = cfg.readNumEntry( "rotatedir" ); | 381 | int rotDirection = cfg.readNumEntry( "rotatedir" ); |
382 | ODirection rot = CW; | 382 | ODirection rot = CW; |
383 | 383 | ||
384 | if (rotDirection == -1) | 384 | if (rotDirection == -1) |
385 | { | 385 | { |
386 | rot = ODevice::inst ( )-> direction ( ); | 386 | rot = ODevice::inst ( )-> direction ( ); |
387 | } | 387 | } |
388 | else | 388 | else |
389 | { | 389 | { |
390 | rot = (ODirection)rotDirection; | 390 | rot = (ODirection)rotDirection; |
391 | } | 391 | } |
392 | 392 | ||
393 | m_rotdir_cw-> setChecked ( rot == CW ); | 393 | m_rotdir_cw-> setChecked ( rot == CW ); |
394 | m_rotdir_ccw-> setChecked ( rot == CCW ); | 394 | m_rotdir_ccw-> setChecked ( rot == CCW ); |
diff --git a/noncore/settings/appearance2/config.in b/noncore/settings/appearance2/config.in index 9e30429..2f23c1c 100644 --- a/noncore/settings/appearance2/config.in +++ b/noncore/settings/appearance2/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config APPEARANCE2 | 1 | config APPEARANCE2 |
2 | boolean "opie-appearance (control color, widget view etc)" | 2 | boolean "opie-appearance (control color, widget view etc)" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI && LIBQTAUX | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBQTAUX |
diff --git a/noncore/settings/appearance2/exceptlistitem.h b/noncore/settings/appearance2/exceptlistitem.h index 365fa90..b8cec86 100644 --- a/noncore/settings/appearance2/exceptlistitem.h +++ b/noncore/settings/appearance2/exceptlistitem.h | |||
@@ -63,52 +63,52 @@ public: | |||
63 | QRgb *iline = (QRgb *) img. scanLine ( y ); | 63 | QRgb *iline = (QRgb *) img. scanLine ( y ); |
64 | QRgb *oline = (QRgb *) ovl. scanLine ( y ); | 64 | QRgb *oline = (QRgb *) ovl. scanLine ( y ); |
65 | 65 | ||
66 | for ( int x = 0; x != img. width ( ); x++ ) { | 66 | for ( int x = 0; x != img. width ( ); x++ ) { |
67 | QRgb i = *iline; | 67 | QRgb i = *iline; |
68 | QRgb o = *oline; | 68 | QRgb o = *oline; |
69 | 69 | ||
70 | *iline = qRgba (( qRed ( i ) + qRed ( o )) / 2, | 70 | *iline = qRgba (( qRed ( i ) + qRed ( o )) / 2, |
71 | ( qGreen ( i ) + qGreen ( o )) / 2, | 71 | ( qGreen ( i ) + qGreen ( o )) / 2, |
72 | ( qBlue ( i ) + qBlue ( o )) / 2, | 72 | ( qBlue ( i ) + qBlue ( o )) / 2, |
73 | ( qAlpha ( i ) + qAlpha ( o )) / 2 ); | 73 | ( qAlpha ( i ) + qAlpha ( o )) / 2 ); |
74 | iline++; | 74 | iline++; |
75 | oline++; | 75 | oline++; |
76 | } | 76 | } |
77 | } | 77 | } |
78 | } | 78 | } |
79 | 79 | ||
80 | static void init ( ) | 80 | static void init ( ) |
81 | { | 81 | { |
82 | static bool init = false; | 82 | static bool init = false; |
83 | 83 | ||
84 | if ( init ) | 84 | if ( init ) |
85 | return; | 85 | return; |
86 | 86 | ||
87 | QImage noimg = Resource::loadImage ( "appearance/no.png" ); | 87 | QImage noimg = Opie::Core::OResource::loadImage ( "appearance/no.png", Opie::Core::OResource::SmallIcon ); |
88 | QImage fontimg = Resource::loadImage ( "appearance/font.png" ); | 88 | QImage fontimg = Opie::Core::OResource::loadImage ( "appearance/font.png", Opie::Core::OResource::SmallIcon ); |
89 | QImage styleimg = Resource::loadImage ( "appearance/style.png" ); | 89 | QImage styleimg = Opie::Core::OResource::loadImage ( "appearance/style.png", Opie::Core::OResource::SmallIcon ); |
90 | QImage decoimg = Resource::loadImage ( "appearance/deco.png" ); | 90 | QImage decoimg = Opie::Core::OResource::loadImage ( "appearance/deco.png", Opie::Core::OResource::SmallIcon ); |
91 | 91 | ||
92 | s_fontpix [0] = new QPixmap ( ); | 92 | s_fontpix [0] = new QPixmap ( ); |
93 | s_fontpix [0]-> convertFromImage ( fontimg ); | 93 | s_fontpix [0]-> convertFromImage ( fontimg ); |
94 | overlay ( fontimg, noimg ); | 94 | overlay ( fontimg, noimg ); |
95 | s_fontpix [1] = new QPixmap ( ); | 95 | s_fontpix [1] = new QPixmap ( ); |
96 | s_fontpix [1]-> convertFromImage ( fontimg ); | 96 | s_fontpix [1]-> convertFromImage ( fontimg ); |
97 | 97 | ||
98 | s_stylepix [0] = new QPixmap ( ); | 98 | s_stylepix [0] = new QPixmap ( ); |
99 | s_stylepix [0]-> convertFromImage ( styleimg ); | 99 | s_stylepix [0]-> convertFromImage ( styleimg ); |
100 | overlay ( styleimg, noimg ); | 100 | overlay ( styleimg, noimg ); |
101 | s_stylepix [1] = new QPixmap ( ); | 101 | s_stylepix [1] = new QPixmap ( ); |
102 | s_stylepix [1]-> convertFromImage ( styleimg ); | 102 | s_stylepix [1]-> convertFromImage ( styleimg ); |
103 | 103 | ||
104 | s_decopix [0] = new QPixmap ( ); | 104 | s_decopix [0] = new QPixmap ( ); |
105 | s_decopix [0]-> convertFromImage ( decoimg ); | 105 | s_decopix [0]-> convertFromImage ( decoimg ); |
106 | overlay ( decoimg, noimg ); | 106 | overlay ( decoimg, noimg ); |
107 | s_decopix [1] = new QPixmap ( ); | 107 | s_decopix [1] = new QPixmap ( ); |
108 | s_decopix [1]-> convertFromImage ( decoimg ); | 108 | s_decopix [1]-> convertFromImage ( decoimg ); |
109 | 109 | ||
110 | init = true; | 110 | init = true; |
111 | } | 111 | } |
112 | 112 | ||
113 | bool noFont ( ) const | 113 | bool noFont ( ) const |
114 | { | 114 | { |
diff --git a/noncore/settings/appearance2/stylelistitem.h b/noncore/settings/appearance2/stylelistitem.h index 613fa71..3946190 100644 --- a/noncore/settings/appearance2/stylelistitem.h +++ b/noncore/settings/appearance2/stylelistitem.h | |||
@@ -11,51 +11,52 @@ | |||
11 | .="- .-=="i, .._ License as published by the Free Software | 11 | .="- .-=="i, .._ License as published by the Free Software |
12 | - . .-<_> .<> Foundation; either version 2 of the License, | 12 | - . .-<_> .<> Foundation; either version 2 of the License, |
13 | ._= =} : or (at your option) any later version. | 13 | ._= =} : or (at your option) any later version. |
14 | .%`+i> _;_. | 14 | .%`+i> _;_. |
15 | .i_,=:_. -<s. This program is distributed in the hope that | 15 | .i_,=:_. -<s. This program is distributed in the hope that |
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | : .. .:, . . . without even the implied warranty of | 17 | : .. .:, . . . without even the implied warranty of |
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 21 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 22 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef STYLELISTITEM_H | 31 | #ifndef STYLELISTITEM_H |
32 | #define STYLELISTITEM_H | 32 | #define STYLELISTITEM_H |
33 | 33 | ||
34 | /* OPIE */ | 34 | /* OPIE */ |
35 | #include <opie2/oresource.h> | ||
36 | |||
35 | #include <qpe/styleinterface.h> | 37 | #include <qpe/styleinterface.h> |
36 | #include <qpe/qlibrary.h> | 38 | #include <qpe/qlibrary.h> |
37 | #include <qpe/resource.h> | ||
38 | 39 | ||
39 | /* QT */ | 40 | /* QT */ |
40 | #include <qlistbox.h> | 41 | #include <qlistbox.h> |
41 | #include <qfileinfo.h> | 42 | #include <qfileinfo.h> |
42 | 43 | ||
43 | #include <stdio.h> | 44 | #include <stdio.h> |
44 | 45 | ||
45 | class StyleListItem : public QListBoxText { | 46 | class StyleListItem : public QListBoxText { |
46 | public: | 47 | public: |
47 | StyleListItem ( const QString &t, QStyle *sty ) : QListBoxText ( t ) | 48 | StyleListItem ( const QString &t, QStyle *sty ) : QListBoxText ( t ) |
48 | { | 49 | { |
49 | m_lib = 0; | 50 | m_lib = 0; |
50 | m_style_if = 0; | 51 | m_style_if = 0; |
51 | m_settings_if = 0; | 52 | m_settings_if = 0; |
52 | m_style = sty; | 53 | m_style = sty; |
53 | } | 54 | } |
54 | 55 | ||
55 | StyleListItem ( QLibrary *lib, StyleInterface *iface ) : QListBoxText ( iface-> name ( )) | 56 | StyleListItem ( QLibrary *lib, StyleInterface *iface ) : QListBoxText ( iface-> name ( )) |
56 | { | 57 | { |
57 | m_lib = lib; | 58 | m_lib = lib; |
58 | m_style_if = iface; | 59 | m_style_if = iface; |
59 | m_settings_if = 0; | 60 | m_settings_if = 0; |
60 | m_style = iface-> style ( ); | 61 | m_style = iface-> style ( ); |
61 | 62 | ||