summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/TEWidget.cpp2
-rw-r--r--core/apps/textedit/textedit.cpp2
-rw-r--r--core/opie-login/loginwindowimpl.cpp4
-rw-r--r--freetype/fontfactoryttf_qws.h2
-rw-r--r--libopie2/opieui/oseparator.cpp2
-rw-r--r--libopie2/qt3/opieui/oeditlistbox.h2
-rw-r--r--libopie2/qt3/opieui/ojanuswidget.cpp2
-rw-r--r--library/lightstyle.cpp10
-rw-r--r--library/lightstyle.h2
-rw-r--r--library/qpeapplication.cpp4
-rw-r--r--library/qpestyle.cpp4
-rw-r--r--library/qpestyle.h2
-rw-r--r--noncore/apps/opie-console/TEWidget.cpp2
-rw-r--r--noncore/apps/tinykate/libkate/qt3back/qregexp3.cpp4
-rw-r--r--noncore/apps/tinykate/libkate/qt3back/qregexp3.h4
-rw-r--r--noncore/apps/zsafe/shadedlistitem.cpp2
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.cpp6
-rw-r--r--noncore/settings/appearance2/appearance.cpp4
-rw-r--r--noncore/settings/doctab/doctab.cpp2
-rw-r--r--noncore/settings/language/language.cpp2
-rw-r--r--noncore/settings/networksettings/interfaces/module.h2
-rw-r--r--noncore/settings/networksettings/mainwindow/addconnectionimp.cpp2
-rw-r--r--noncore/settings/networksettings/mainwindow/mainwindowimp.cpp2
-rw-r--r--noncore/unsupported/qpdf/QOutputDev.cpp2
-rw-r--r--scripts/kconfig/qconf.cc16
-rw-r--r--scripts/kconfig/qconf.h2
26 files changed, 45 insertions, 45 deletions
diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp
index 5171bf1..bee58e7 100644
--- a/core/apps/embeddedkonsole/TEWidget.cpp
+++ b/core/apps/embeddedkonsole/TEWidget.cpp
@@ -232,49 +232,49 @@ static QChar vt100extended(QChar c)
232 return c; 232 return c;
233} 233}
234 234
235static QChar identicalMap(QChar c) 235static QChar identicalMap(QChar c)
236{ 236{
237 return c; 237 return c;
238} 238}
239 239
240void TEWidget::fontChange(const QFont &) 240void TEWidget::fontChange(const QFont &)
241{ 241{
242 QFontMetrics fm(font()); 242 QFontMetrics fm(font());
243 font_h = fm.height(); 243 font_h = fm.height();
244 // font_w = fm.maxWidth(); 244 // font_w = fm.maxWidth();
245 font_w = fm.width("m"); 245 font_w = fm.width("m");
246 font_a = fm.ascent(); 246 font_a = fm.ascent();
247 printf("font h=%d max_width=%d width_m=%d assent=%d\n", font_h, 247 printf("font h=%d max_width=%d width_m=%d assent=%d\n", font_h,
248 fm.maxWidth(), font_w, font_a); 248 fm.maxWidth(), font_w, font_a);
249 249
250 //printf("font_h: %d\n",font_h); 250 //printf("font_h: %d\n",font_h);
251 //printf("font_w: %d\n",font_w); 251 //printf("font_w: %d\n",font_w);
252 //printf("font_a: %d\n",font_a); 252 //printf("font_a: %d\n",font_a);
253 //printf("charset: %s\n",QFont::encodingName(font().charSet()).ascii()); 253 //printf("charset: %s\n",QFont::encodingName(font().charSet()).ascii());
254 //printf("rawname: %s\n",font().rawName().ascii()); 254 //printf("rawname: %s\n",font().rawName().ascii());
255 fontMap = 255 fontMap =
256#if QT_VERSION < 300 256#if QT_VERSION < 0x030000
257 strcmp(QFont::encodingName(font().charSet()).ascii(),"iso10646") 257 strcmp(QFont::encodingName(font().charSet()).ascii(),"iso10646")
258 ? vt100extended 258 ? vt100extended
259 : 259 :
260#endif 260#endif
261 identicalMap; 261 identicalMap;
262 propagateSize(); 262 propagateSize();
263 update(); 263 update();
264} 264}
265 265
266void TEWidget::setVTFont(const QFont& f) 266void TEWidget::setVTFont(const QFont& f)
267{ 267{
268 QFrame::setFont(f); 268 QFrame::setFont(f);
269} 269}
270 270
271QFont TEWidget::getVTFont() { 271QFont TEWidget::getVTFont() {
272 return font(); 272 return font();
273} 273}
274 274
275void TEWidget::setFont(const QFont &) 275void TEWidget::setFont(const QFont &)
276{ 276{
277 // ignore font change request if not coming from konsole itself 277 // ignore font change request if not coming from konsole itself
278} 278}
279 279
280/* ------------------------------------------------------------------------- */ 280/* ------------------------------------------------------------------------- */
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index cabeb20..c7273c5 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -24,49 +24,49 @@
24#include <qpe/config.h> 24#include <qpe/config.h>
25#include <qpe/qpeapplication.h> 25#include <qpe/qpeapplication.h>
26 26
27 27
28/* QT */ 28/* QT */
29#include <qmenubar.h> 29#include <qmenubar.h>
30#include <qtoolbar.h> 30#include <qtoolbar.h>
31#include <qtextstream.h> 31#include <qtextstream.h>
32#include <qclipboard.h> 32#include <qclipboard.h>
33#include <qaction.h> 33#include <qaction.h>
34#include <qlineedit.h> 34#include <qlineedit.h>
35#include <qmessagebox.h> 35#include <qmessagebox.h>
36#include <qlayout.h> 36#include <qlayout.h>
37#include <qtimer.h> 37#include <qtimer.h>
38#include <qdir.h> 38#include <qdir.h>
39 39
40/* STD */ 40/* STD */
41#include <unistd.h> 41#include <unistd.h>
42#include <sys/stat.h> 42#include <sys/stat.h>
43#include <stdlib.h> //getenv 43#include <stdlib.h> //getenv
44 44
45using namespace Opie::Core; 45using namespace Opie::Core;
46using namespace Opie::Ui; 46using namespace Opie::Ui;
47 47
48#if QT_VERSION < 300 48#if QT_VERSION < 0x030000
49class QpeEditor : public QMultiLineEdit 49class QpeEditor : public QMultiLineEdit
50{ 50{
51 51
52public: 52public:
53 QpeEditor( QWidget *parent, const char * name = 0 ) 53 QpeEditor( QWidget *parent, const char * name = 0 )
54 : QMultiLineEdit( parent, name ) { 54 : QMultiLineEdit( parent, name ) {
55 clearTableFlags(); 55 clearTableFlags();
56 setTableFlags( Tbl_vScrollBar | Tbl_autoHScrollBar ); 56 setTableFlags( Tbl_vScrollBar | Tbl_autoHScrollBar );
57} 57}
58 58
59 void find( const QString &txt, bool caseSensitive, 59 void find( const QString &txt, bool caseSensitive,
60 bool backwards ); 60 bool backwards );
61protected: 61protected:
62 bool markIt; 62 bool markIt;
63 int line1, line2, col1, col2; 63 int line1, line2, col1, col2;
64 void mousePressEvent( QMouseEvent * ); 64 void mousePressEvent( QMouseEvent * );
65 void mouseReleaseEvent( QMouseEvent * ); 65 void mouseReleaseEvent( QMouseEvent * );
66 66
67//public slots: 67//public slots:
68 /* 68 /*
69signals: 69signals:
70 void notFound(); 70 void notFound();
71 void searchWrapped(); 71 void searchWrapped();
72 */ 72 */
diff --git a/core/opie-login/loginwindowimpl.cpp b/core/opie-login/loginwindowimpl.cpp
index 73c2cbe..ac24894 100644
--- a/core/opie-login/loginwindowimpl.cpp
+++ b/core/opie-login/loginwindowimpl.cpp
@@ -12,49 +12,49 @@
12    .i_,=:_.      -<s. This file is distributed in the hope that 12    .i_,=:_.      -<s. This file is distributed in the hope that
13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
14    : ..    .:,     . . . without even the implied warranty of 14    : ..    .:,     . . . without even the implied warranty of
15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
17..}^=.=       =       ; Public License for more details. 17..}^=.=       =       ; Public License for more details.
18++=   -.     .`     .: 18++=   -.     .`     .:
19 :     =  ...= . :.=- You should have received a copy of the GNU 19 :     =  ...= . :.=- You should have received a copy of the GNU
20 -.   .:....=;==+<; General Public License along with this file; 20 -.   .:....=;==+<; General Public License along with this file;
21  -_. . .   )=.  = see the file COPYING. If not, write to the 21  -_. . .   )=.  = see the file COPYING. If not, write to the
22    --        :-=` Free Software Foundation, Inc., 22    --        :-=` Free Software Foundation, Inc.,
23 59 Temple Place - Suite 330, 23 59 Temple Place - Suite 330,
24 Boston, MA 02111-1307, USA. 24 Boston, MA 02111-1307, USA.
25 25
26*/ 26*/
27#include <qpe/version.h> 27#include <qpe/version.h>
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qlayout.h> 29#include <qlayout.h>
30#include <qlineedit.h> 30#include <qlineedit.h>
31#include <qtimer.h> 31#include <qtimer.h>
32#include <qcombobox.h> 32#include <qcombobox.h>
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qpopupmenu.h> 34#include <qpopupmenu.h>
35#include <qmessagebox.h> 35#include <qmessagebox.h>
36#if QT_VERSION < 300 36#if QT_VERSION < 0x030000
37#include <qgfx_qws.h> 37#include <qgfx_qws.h>
38#endif 38#endif
39#include <qwindowsystem_qws.h> 39#include <qwindowsystem_qws.h>
40 40
41#include <qpe/resource.h> 41#include <qpe/resource.h>
42#include <qpe/qcopenvelope_qws.h> 42#include <qpe/qcopenvelope_qws.h>
43#include <qpe/config.h> 43#include <qpe/config.h>
44 44
45#include <opie2/odevice.h> 45#include <opie2/odevice.h>
46 46
47#include <stdio.h> 47#include <stdio.h>
48#include <stdlib.h> 48#include <stdlib.h>
49 49
50#include "passworddialogimpl.h" 50#include "passworddialogimpl.h"
51#include "loginwindowimpl.h" 51#include "loginwindowimpl.h"
52#include "loginapplication.h" 52#include "loginapplication.h"
53#include "inputmethods.h" 53#include "inputmethods.h"
54 54
55using namespace Opie::Core; 55using namespace Opie::Core;
56 56
57 57
58LoginWindowImpl::LoginWindowImpl ( ) : LoginWindow ( 0, "LOGIN-WINDOW", WStyle_Customize | WStyle_NoBorder | WDestructiveClose ) 58LoginWindowImpl::LoginWindowImpl ( ) : LoginWindow ( 0, "LOGIN-WINDOW", WStyle_Customize | WStyle_NoBorder | WDestructiveClose )
59{ 59{
60 QPopupMenu *pop = new QPopupMenu ( this ); 60 QPopupMenu *pop = new QPopupMenu ( this );
@@ -115,49 +115,49 @@ LoginWindowImpl::~LoginWindowImpl ( )
115 115
116void LoginWindowImpl::receive ( const QCString &msg, const QByteArray &data ) 116void LoginWindowImpl::receive ( const QCString &msg, const QByteArray &data )
117{ 117{
118 QDataStream stream ( data, IO_ReadOnly ); 118 QDataStream stream ( data, IO_ReadOnly );
119 119
120 if ( msg == "hideInputMethod()" ) 120 if ( msg == "hideInputMethod()" )
121 m_input-> hideInputMethod ( ); 121 m_input-> hideInputMethod ( );
122 else if ( msg == "showInputMethod()" ) 122 else if ( msg == "showInputMethod()" )
123 m_input-> showInputMethod ( ); 123 m_input-> showInputMethod ( );
124 else if ( msg == "reloadInputMethods()" ) 124 else if ( msg == "reloadInputMethods()" )
125 m_input-> loadInputMethods ( ); 125 m_input-> loadInputMethods ( );
126} 126}
127 127
128void LoginWindowImpl::calcMaxWindowRect ( ) 128void LoginWindowImpl::calcMaxWindowRect ( )
129{ 129{
130#ifdef Q_WS_QWS 130#ifdef Q_WS_QWS
131 QRect wr; 131 QRect wr;
132 int displayWidth = qApp-> desktop ( )-> width ( ); 132 int displayWidth = qApp-> desktop ( )-> width ( );
133 QRect ir = m_input-> inputRect ( ); 133 QRect ir = m_input-> inputRect ( );
134 if ( ir.isValid() ) 134 if ( ir.isValid() )
135 wr.setCoords( 0, 0, displayWidth-1, ir.top()-1 ); 135 wr.setCoords( 0, 0, displayWidth-1, ir.top()-1 );
136 else 136 else
137 wr.setCoords( 0, 0, displayWidth-1, m_taskbar->y()-1 ); 137 wr.setCoords( 0, 0, displayWidth-1, m_taskbar->y()-1 );
138 138
139#if QT_VERSION < 300 139#if QT_VERSION < 0x030000
140 wr = qt_screen-> mapToDevice ( wr, QSize ( qt_screen-> width ( ), qt_screen-> height ( ))); 140 wr = qt_screen-> mapToDevice ( wr, QSize ( qt_screen-> width ( ), qt_screen-> height ( )));
141#endif 141#endif
142 142
143 QWSServer::setMaxWindowRect( wr ); 143 QWSServer::setMaxWindowRect( wr );
144#endif 144#endif
145} 145}
146 146
147 147
148void LoginWindowImpl::keyPressEvent ( QKeyEvent *e ) 148void LoginWindowImpl::keyPressEvent ( QKeyEvent *e )
149{ 149{
150 switch ( e-> key ( )) { 150 switch ( e-> key ( )) {
151 case HardKey_Suspend: suspend ( ); 151 case HardKey_Suspend: suspend ( );
152 break; 152 break;
153 case HardKey_Backlight: backlight ( ); 153 case HardKey_Backlight: backlight ( );
154 break; 154 break;
155 default: e-> ignore ( ); 155 default: e-> ignore ( );
156 break; 156 break;
157 } 157 }
158 LoginWindow::keyPressEvent ( e ); 158 LoginWindow::keyPressEvent ( e );
159} 159}
160 160
161 161
162void LoginWindowImpl::toggleEchoMode ( bool t ) 162void LoginWindowImpl::toggleEchoMode ( bool t )
163{ 163{
diff --git a/freetype/fontfactoryttf_qws.h b/freetype/fontfactoryttf_qws.h
index 208ab61..ff0fcfc 100644
--- a/freetype/fontfactoryttf_qws.h
+++ b/freetype/fontfactoryttf_qws.h
@@ -2,49 +2,49 @@
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21 21
22#ifndef FONTFACTORY_FT_H 22#ifndef FONTFACTORY_FT_H
23#define FONTFACTORY_FT_H 23#define FONTFACTORY_FT_H
24 24
25#include <qfontmanager_qws.h> 25#include <qfontmanager_qws.h>
26#if QT_VERSION >= 300 26#if QT_VERSION >= 0x030000
27# include <private/qfontdata_p.h> 27# include <private/qfontdata_p.h>
28#else 28#else
29# include "qfontdata_p.h" 29# include "qfontdata_p.h"
30#endif 30#endif
31 31
32 32
33#ifdef QT_NO_FREETYPE 33#ifdef QT_NO_FREETYPE
34 34
35extern "C" { 35extern "C" {
36#include <freetype/freetype.h> 36#include <freetype/freetype.h>
37} 37}
38 38
39// ascent, descent, width(ch), width(string), maxwidth? 39// ascent, descent, width(ch), width(string), maxwidth?
40// leftbearing, rightbearing, minleftbearing,minrightbearing 40// leftbearing, rightbearing, minleftbearing,minrightbearing
41// leading 41// leading
42 42
43class QFontFactoryFT : public QFontFactory { 43class QFontFactoryFT : public QFontFactory {
44 44
45public: 45public:
46 46
47 QFontFactoryFT(); 47 QFontFactoryFT();
48 virtual ~QFontFactoryFT(); 48 virtual ~QFontFactoryFT();
49 49
50 QRenderedFont * get(const QFontDef &,QDiskFont *); 50 QRenderedFont * get(const QFontDef &,QDiskFont *);
diff --git a/libopie2/opieui/oseparator.cpp b/libopie2/opieui/oseparator.cpp
index bbc4381..177368b 100644
--- a/libopie2/opieui/oseparator.cpp
+++ b/libopie2/opieui/oseparator.cpp
@@ -87,43 +87,43 @@ int OSeparator::orientation() const
87 if ( frameStyle() & VLine ) 87 if ( frameStyle() & VLine )
88 return VLine; 88 return VLine;
89 89
90 if ( frameStyle() & HLine ) 90 if ( frameStyle() & HLine )
91 return HLine; 91 return HLine;
92 92
93 return 0; 93 return 0;
94} 94}
95 95
96void OSeparator::drawFrame(QPainter *p) 96void OSeparator::drawFrame(QPainter *p)
97{ 97{
98 QPointp1, p2; 98 QPointp1, p2;
99 QRectr = frameRect(); 99 QRectr = frameRect();
100 const QColorGroup & g = colorGroup(); 100 const QColorGroup & g = colorGroup();
101 101
102 if ( frameStyle() & HLine ) { 102 if ( frameStyle() & HLine ) {
103 p1 = QPoint( r.x(), r.height()/2 ); 103 p1 = QPoint( r.x(), r.height()/2 );
104 p2 = QPoint( r.x()+r.width(), p1.y() ); 104 p2 = QPoint( r.x()+r.width(), p1.y() );
105 } 105 }
106 else { 106 else {
107 p1 = QPoint( r.x()+r.width()/2, 0 ); 107 p1 = QPoint( r.x()+r.width()/2, 0 );
108 p2 = QPoint( p1.x(), r.height() ); 108 p2 = QPoint( p1.x(), r.height() );
109 } 109 }
110 110
111#if QT_VERSION < 300 111#if QT_VERSION < 0x030000
112 style().drawSeparator( p, p1.x(), p1.y(), p2.x(), p2.y(), g, true, 1, midLineWidth() ); 112 style().drawSeparator( p, p1.x(), p1.y(), p2.x(), p2.y(), g, true, 1, midLineWidth() );
113#else 113#else
114 QStyleOption opt( lineWidth(), midLineWidth() ); 114 QStyleOption opt( lineWidth(), midLineWidth() );
115 style().drawPrimitive( QStyle::PE_Separator, p, QRect( p1, p2 ), g, QStyle::Style_Sunken, opt ); 115 style().drawPrimitive( QStyle::PE_Separator, p, QRect( p1, p2 ), g, QStyle::Style_Sunken, opt );
116#endif 116#endif
117} 117}
118 118
119 119
120QSize OSeparator::sizeHint() const 120QSize OSeparator::sizeHint() const
121{ 121{
122 if ( frameStyle() & VLine ) 122 if ( frameStyle() & VLine )
123 return QSize(2, 0); 123 return QSize(2, 0);
124 124
125 if ( frameStyle() & HLine ) 125 if ( frameStyle() & HLine )
126 return QSize(0, 2); 126 return QSize(0, 2);
127 127
128 return QSize(-1, -1); 128 return QSize(-1, -1);
129} 129}
diff --git a/libopie2/qt3/opieui/oeditlistbox.h b/libopie2/qt3/opieui/oeditlistbox.h
index 63fab11..c9c207d 100644
--- a/libopie2/qt3/opieui/oeditlistbox.h
+++ b/libopie2/qt3/opieui/oeditlistbox.h
@@ -6,49 +6,49 @@
6 License as published by the Free Software Foundation; either 6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version. 7 version 2 of the License, or (at your option) any later version.
8 8
9 This library is distributed in the hope that it will be useful, 9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details. 12 Library General Public License for more details.
13 13
14 You should have received a copy of the GNU Library General Public License 14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to 15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. 17 Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#ifndef OEDITLISTBOX_H 20#ifndef OEDITLISTBOX_H
21#define OEDITLISTBOX_H 21#define OEDITLISTBOX_H
22 22
23#include <qgroupbox.h> 23#include <qgroupbox.h>
24#include <qlistbox.h> 24#include <qlistbox.h>
25 25
26class OLineEdit; 26class OLineEdit;
27class OComboBox; 27class OComboBox;
28class QPushButton; 28class QPushButton;
29 29
30#if QT_VERSION < 300 30#if QT_VERSION < 0x030000
31 enum StringComparisonMode { 31 enum StringComparisonMode {
32 CaseSensitive = 0x00001, // 0 0001 32 CaseSensitive = 0x00001, // 0 0001
33 BeginsWith = 0x00002, // 0 0010 33 BeginsWith = 0x00002, // 0 0010
34 EndsWith = 0x00004, // 0 0100 34 EndsWith = 0x00004, // 0 0100
35 Contains = 0x00008, // 0 1000 35 Contains = 0x00008, // 0 1000
36 ExactMatch = 0x00010 // 1 0000 36 ExactMatch = 0x00010 // 1 0000
37 }; 37 };
38#endif 38#endif
39 39
40class OEditListBoxPrivate; 40class OEditListBoxPrivate;
41/** 41/**
42 * An editable listbox 42 * An editable listbox
43 * 43 *
44 * This class provides a editable listbox ;-), this means 44 * This class provides a editable listbox ;-), this means
45 * a listbox which is accompanied by a line edit to enter new 45 * a listbox which is accompanied by a line edit to enter new
46 * items into the listbox and pushbuttons to add and remove 46 * items into the listbox and pushbuttons to add and remove
47 * items from the listbox and two buttons to move items up and down. 47 * items from the listbox and two buttons to move items up and down.
48 */ 48 */
49class OEditListBox : public QGroupBox 49class OEditListBox : public QGroupBox
50{ 50{
51 Q_OBJECT 51 Q_OBJECT
52 52
53public: 53public:
54 /// @since 3.1 54 /// @since 3.1
diff --git a/libopie2/qt3/opieui/ojanuswidget.cpp b/libopie2/qt3/opieui/ojanuswidget.cpp
index 063e393..8bdbc03 100644
--- a/libopie2/qt3/opieui/ojanuswidget.cpp
+++ b/libopie2/qt3/opieui/ojanuswidget.cpp
@@ -751,49 +751,49 @@ void OJanusWidget::setFocus()
751 mTabControl->setFocus(); 751 mTabControl->setFocus();
752 } 752 }
753 else if( mFace == Swallow ) 753 else if( mFace == Swallow )
754 { 754 {
755 mSwallowPage->setFocus(); 755 mSwallowPage->setFocus();
756 } 756 }
757 else if( mFace == Plain ) 757 else if( mFace == Plain )
758 { 758 {
759 mPlainPage->setFocus(); 759 mPlainPage->setFocus();
760 } 760 }
761} 761}
762 762
763 763
764QSize OJanusWidget::minimumSizeHint() const 764QSize OJanusWidget::minimumSizeHint() const
765{ 765{
766 if( mFace == TreeList || mFace == IconList ) 766 if( mFace == TreeList || mFace == IconList )
767 { 767 {
768 QSize s1( ODialog::spacingHint(), ODialog::spacingHint()*2 ); 768 QSize s1( ODialog::spacingHint(), ODialog::spacingHint()*2 );
769 QSize s2(0,0); 769 QSize s2(0,0);
770 QSize s3(0,0); 770 QSize s3(0,0);
771 QSize s4( mPageStack->sizeHint() ); 771 QSize s4( mPageStack->sizeHint() );
772 772
773 if( mFace == TreeList ) 773 if( mFace == TreeList )
774 { 774 {
775#if QT_VERSION < 300 775#if QT_VERSION < 0x030000
776 s1.rwidth() += style().splitterWidth(); 776 s1.rwidth() += style().splitterWidth();
777#else 777#else
778 s1.rwidth() += style().pixelMetric( QStyle::PM_SplitterWidth ); 778 s1.rwidth() += style().pixelMetric( QStyle::PM_SplitterWidth );
779#endif 779#endif
780 s2 = mTreeList->minimumSize(); 780 s2 = mTreeList->minimumSize();
781 } 781 }
782 else 782 else
783 { 783 {
784 mIconList->updateMinimumHeight(); 784 mIconList->updateMinimumHeight();
785 mIconList->updateWidth(); 785 mIconList->updateWidth();
786 s2 = mIconList->minimumSize(); 786 s2 = mIconList->minimumSize();
787 } 787 }
788 788
789 if( mTitleLabel->isVisible() == true ) 789 if( mTitleLabel->isVisible() == true )
790 { 790 {
791 s3 += mTitleLabel->sizeHint(); 791 s3 += mTitleLabel->sizeHint();
792 s3.rheight() += mTitleSep->minimumSize().height(); 792 s3.rheight() += mTitleSep->minimumSize().height();
793 } 793 }
794 794
795 // 795 //
796 // Select the tallest item. It has only effect in IconList mode 796 // Select the tallest item. It has only effect in IconList mode
797 // 797 //
798 int h1 = s1.rheight() + s3.rheight() + s4.height(); 798 int h1 = s1.rheight() + s3.rheight() + s4.height();
799 int h2 = QMAX( h1, s2.rheight() ); 799 int h2 = QMAX( h1, s2.rheight() );
diff --git a/library/lightstyle.cpp b/library/lightstyle.cpp
index f18bdca..3bd1623 100644
--- a/library/lightstyle.cpp
+++ b/library/lightstyle.cpp
@@ -1,46 +1,46 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include "lightstyle.h" 20#include "lightstyle.h"
21 21
22#if QT_VERSION < 300 22#if QT_VERSION < 0x030000
23 23
24#define INCLUDE_MENUITEM_DEF 24#define INCLUDE_MENUITEM_DEF
25#include "qmenubar.h" 25#include "qmenubar.h"
26#include "qapplication.h" 26#include "qapplication.h"
27#include "qpainter.h" 27#include "qpainter.h"
28#include "qpalette.h" 28#include "qpalette.h"
29#include "qframe.h" 29#include "qframe.h"
30#include "qpushbutton.h" 30#include "qpushbutton.h"
31#include "qdrawutil.h" 31#include "qdrawutil.h"
32#include "qscrollbar.h" 32#include "qscrollbar.h"
33#include "qtabbar.h" 33#include "qtabbar.h"
34#include "qguardedptr.h" 34#include "qguardedptr.h"
35#include "qlayout.h" 35#include "qlayout.h"
36#include "qlineedit.h" 36#include "qlineedit.h"
37 37
38 38
39class LightStylePrivate 39class LightStylePrivate
40{ 40{
41public: 41public:
42 LightStylePrivate() 42 LightStylePrivate()
43 : hoverWidget(0), ref(1), savePalette(0) 43 : hoverWidget(0), ref(1), savePalette(0)
44 { 44 {
45 } 45 }
46 46
@@ -138,66 +138,66 @@ int LightStyle::buttonMargin() const
138 138
139QSize LightStyle::exclusiveIndicatorSize() const 139QSize LightStyle::exclusiveIndicatorSize() const
140{ 140{
141 return QSize(13, 13); 141 return QSize(13, 13);
142} 142}
143 143
144 144
145int LightStyle::defaultFrameWidth() const 145int LightStyle::defaultFrameWidth() const
146{ 146{
147 return 2; 147 return 2;
148} 148}
149 149
150 150
151QSize LightStyle::indicatorSize() const 151QSize LightStyle::indicatorSize() const
152{ 152{
153 return QSize(13, 13); 153 return QSize(13, 13);
154} 154}
155 155
156 156
157void LightStyle::polish(QWidget *widget) 157void LightStyle::polish(QWidget *widget)
158{ 158{
159 if (widget->inherits("QPushButton")) 159 if (widget->inherits("QPushButton"))
160 widget->installEventFilter(this); 160 widget->installEventFilter(this);
161 161
162#if QT_VERSION >= 300 162#if QT_VERSION >= 0x030000
163 if (widget->inherits("QLineEdit")) { 163 if (widget->inherits("QLineEdit")) {
164 QLineEdit *lineedit = (QLineEdit *) widget; 164 QLineEdit *lineedit = (QLineEdit *) widget;
165 lineedit->setFrameShape(QFrame::StyledPanel); 165 lineedit->setFrameShape(QFrame::StyledPanel);
166 lineedit->setLineWidth(2); 166 lineedit->setLineWidth(2);
167 } 167 }
168#endif 168#endif
169 169
170 QWindowsStyle::polish(widget); 170 QWindowsStyle::polish(widget);
171} 171}
172 172
173 173
174void LightStyle::unPolish(QWidget *widget) 174void LightStyle::unPolish(QWidget *widget)
175{ 175{
176 if (widget->inherits("QPushButton")) 176 if (widget->inherits("QPushButton"))
177 widget->removeEventFilter(this); 177 widget->removeEventFilter(this);
178 178
179#if QT_VERSION >= 300 179#if QT_VERSION >= 0x030000
180 if (widget->inherits("QLineEdit")) { 180 if (widget->inherits("QLineEdit")) {
181 QLineEdit *lineedit = (QLineEdit *) widget; 181 QLineEdit *lineedit = (QLineEdit *) widget;
182 lineedit->setLineWidth(1); 182 lineedit->setLineWidth(1);
183 lineedit->setFrameShape(QFrame::WinPanel); 183 lineedit->setFrameShape(QFrame::WinPanel);
184 } 184 }
185#endif 185#endif
186 186
187 QWindowsStyle::unPolish(widget); 187 QWindowsStyle::unPolish(widget);
188} 188}
189 189
190 190
191void LightStyle::polish(QApplication *app) 191void LightStyle::polish(QApplication *app)
192{ 192{
193 QPalette pal = app->palette(); 193 QPalette pal = app->palette();
194 194
195 QColorGroup active(pal.color(QPalette::Active, 195 QColorGroup active(pal.color(QPalette::Active,
196 QColorGroup::Foreground), // foreground 196 QColorGroup::Foreground), // foreground
197 pal.color(QPalette::Active, 197 pal.color(QPalette::Active,
198 QColorGroup::Button), // button 198 QColorGroup::Button), // button
199 pal.color(QPalette::Active, 199 pal.color(QPalette::Active,
200 QColorGroup::Background).light(), // light 200 QColorGroup::Background).light(), // light
201 pal.color(QPalette::Active, 201 pal.color(QPalette::Active,
202 QColorGroup::Background).dark(175), // dark 202 QColorGroup::Background).dark(175), // dark
203 pal.color(QPalette::Active, 203 pal.color(QPalette::Active,
@@ -393,66 +393,66 @@ void LightStyle::drawBevelButton(QPainter *p, int x, int y, int w, int h,
393void LightStyle::getButtonShift(int &x, int &y) const 393void LightStyle::getButtonShift(int &x, int &y) const
394{ 394{
395 x = y = 0; 395 x = y = 0;
396} 396}
397 397
398 398
399void LightStyle::drawComboButton(QPainter *p, int x, int y, int w, int h, 399void LightStyle::drawComboButton(QPainter *p, int x, int y, int w, int h,
400 const QColorGroup &g, bool, 400 const QColorGroup &g, bool,
401 bool editable, bool, 401 bool editable, bool,
402 const QBrush *fill) 402 const QBrush *fill)
403{ 403{
404 drawButton(p, x, y, w, h, g, FALSE, fill); 404 drawButton(p, x, y, w, h, g, FALSE, fill);
405 405
406 if (editable) { 406 if (editable) {
407 QRect r = comboButtonRect(x, y, w, h); 407 QRect r = comboButtonRect(x, y, w, h);
408 qDrawShadePanel(p, r.x() - 1, r.y() - 1, 408 qDrawShadePanel(p, r.x() - 1, r.y() - 1,
409 r.width() + defaultFrameWidth(), 409 r.width() + defaultFrameWidth(),
410 r.height() + defaultFrameWidth(), 410 r.height() + defaultFrameWidth(),
411 g, TRUE); 411 g, TRUE);
412 } 412 }
413 413
414 int indent = ((y + h) / 2) - 3; 414 int indent = ((y + h) / 2) - 3;
415 int xpos = x; 415 int xpos = x;
416 416
417#if QT_VERSION >= 300 417#if QT_VERSION >= 0x030000
418 if( QApplication::reverseLayout() ) 418 if( QApplication::reverseLayout() )
419 xpos += indent; 419 xpos += indent;
420 else 420 else
421#endif 421#endif
422 xpos += w - indent - 5; 422 xpos += w - indent - 5;
423 423
424 drawArrow(p, Qt::DownArrow, TRUE, xpos, indent, 5, 5, g, TRUE, fill); 424 drawArrow(p, Qt::DownArrow, TRUE, xpos, indent, 5, 5, g, TRUE, fill);
425} 425}
426 426
427 427
428QRect LightStyle::comboButtonRect( int x, int y, int w, int h ) const 428QRect LightStyle::comboButtonRect( int x, int y, int w, int h ) const
429{ 429{
430 QRect r(x + 3, y + 3, w - 6, h - 6); 430 QRect r(x + 3, y + 3, w - 6, h - 6);
431 int indent = ((y + h) / 2) - 3; 431 int indent = ((y + h) / 2) - 3;
432 r.setRight(r.right() - indent - 10); 432 r.setRight(r.right() - indent - 10);
433 433
434#if QT_VERSION >= 300 434#if QT_VERSION >= 0x030000
435 if( QApplication::reverseLayout() ) 435 if( QApplication::reverseLayout() )
436 r.moveBy( indent + 10, 0 ); 436 r.moveBy( indent + 10, 0 );
437#endif 437#endif
438 438
439 return r; 439 return r;
440} 440}
441 441
442 442
443QRect LightStyle::comboButtonFocusRect(int x, int y, int w, int h ) const 443QRect LightStyle::comboButtonFocusRect(int x, int y, int w, int h ) const
444{ 444{
445 return comboButtonRect(x, y, w, h); 445 return comboButtonRect(x, y, w, h);
446} 446}
447 447
448 448
449void LightStyle::drawPanel(QPainter *p, int x, int y, int w, int h, 449void LightStyle::drawPanel(QPainter *p, int x, int y, int w, int h,
450 const QColorGroup &g, bool sunken, 450 const QColorGroup &g, bool sunken,
451 int lw, const QBrush *fill) 451 int lw, const QBrush *fill)
452{ 452{
453 if (lw >= 2) { 453 if (lw >= 2) {
454 if ( fill ) 454 if ( fill )
455 p->fillRect(x + 2, y + 2, w - 4, h - 4, *fill); 455 p->fillRect(x + 2, y + 2, w - 4, h - 4, *fill);
456 456
457 QPen oldpen = p->pen(); 457 QPen oldpen = p->pen();
458 458
diff --git a/library/lightstyle.h b/library/lightstyle.h
index c377cc2..0392957 100644
--- a/library/lightstyle.h
+++ b/library/lightstyle.h
@@ -5,49 +5,49 @@
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef LIGHTSTYLE_H 20#ifndef LIGHTSTYLE_H
21#define LIGHTSTYLE_H 21#define LIGHTSTYLE_H
22 22
23 23
24#ifndef QT_H 24#ifndef QT_H
25#include <qstyle.h> 25#include <qstyle.h>
26#include <qwindowsstyle.h> 26#include <qwindowsstyle.h>
27#endif // QT_H 27#endif // QT_H
28 28
29#if QT_VERSION < 300 29#if QT_VERSION < 0x030000
30 30
31#ifdef QT_PLUGIN_STYLE_LIGHT 31#ifdef QT_PLUGIN_STYLE_LIGHT
32# define Q_EXPORT_STYLE_LIGHT 32# define Q_EXPORT_STYLE_LIGHT
33#else 33#else
34# define Q_EXPORT_STYLE_LIGHT Q_EXPORT 34# define Q_EXPORT_STYLE_LIGHT Q_EXPORT
35#endif // QT_PLUGIN_STYLE_LIGHT 35#endif // QT_PLUGIN_STYLE_LIGHT
36 36
37 37
38class Q_EXPORT_STYLE_LIGHT LightStyle : public QWindowsStyle 38class Q_EXPORT_STYLE_LIGHT LightStyle : public QWindowsStyle
39{ 39{
40public: 40public:
41 LightStyle(); 41 LightStyle();
42 virtual ~LightStyle(); 42 virtual ~LightStyle();
43 43
44 void polish(QWidget *widget); 44 void polish(QWidget *widget);
45 void unPolish(QWidget*widget); 45 void unPolish(QWidget*widget);
46 46
47 void polish(QApplication *app); 47 void polish(QApplication *app);
48 void unPolish(QApplication *app); 48 void unPolish(QApplication *app);
49 49
50 void polishPopupMenu(QPopupMenu *menu); 50 void polishPopupMenu(QPopupMenu *menu);
51 51
52 void drawPushButton(QPushButton *button, QPainter *p); 52 void drawPushButton(QPushButton *button, QPainter *p);
53 void drawButton(QPainter *p, int x, int y, int w, int h, 53 void drawButton(QPainter *p, int x, int y, int w, int h,
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index af00f49..1c5ced3 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -39,49 +39,49 @@
39#include <qwindowsystem_qws.h> 39#include <qwindowsystem_qws.h>
40#endif 40#endif
41#include <qtextstream.h> 41#include <qtextstream.h>
42#include <qpalette.h> 42#include <qpalette.h>
43#include <qbuffer.h> 43#include <qbuffer.h>
44#include <qptrdict.h> 44#include <qptrdict.h>
45#include <qregexp.h> 45#include <qregexp.h>
46#include <qdir.h> 46#include <qdir.h>
47#include <qlabel.h> 47#include <qlabel.h>
48#include <qdialog.h> 48#include <qdialog.h>
49#include <qdragobject.h> 49#include <qdragobject.h>
50#include <qtextcodec.h> 50#include <qtextcodec.h>
51#include <qevent.h> 51#include <qevent.h>
52#include <qtooltip.h> 52#include <qtooltip.h>
53#include <qsignal.h> 53#include <qsignal.h>
54#include <qmainwindow.h> 54#include <qmainwindow.h>
55#include <qwidgetlist.h> 55#include <qwidgetlist.h>
56#include <qpixmapcache.h> 56#include <qpixmapcache.h>
57 57
58#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 58#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
59#define QTOPIA_INTERNAL_INITAPP 59#define QTOPIA_INTERNAL_INITAPP
60#include "qpeapplication.h" 60#include "qpeapplication.h"
61#include "qpestyle.h" 61#include "qpestyle.h"
62#include "styleinterface.h" 62#include "styleinterface.h"
63#if QT_VERSION >= 300 63#if QT_VERSION >= 0x030000
64#include <qstylefactory.h> 64#include <qstylefactory.h>
65#else 65#else
66#include <qplatinumstyle.h> 66#include <qplatinumstyle.h>
67#include <qwindowsstyle.h> 67#include <qwindowsstyle.h>
68#include <qmotifstyle.h> 68#include <qmotifstyle.h>
69#include <qmotifplusstyle.h> 69#include <qmotifplusstyle.h>
70#include "lightstyle.h" 70#include "lightstyle.h"
71 71
72#include <qpe/qlibrary.h> 72#include <qpe/qlibrary.h>
73#endif 73#endif
74#include "global.h" 74#include "global.h"
75#include "resource.h" 75#include "resource.h"
76#if QT_VERSION <= 230 && defined(QT_NO_CODECS) 76#if QT_VERSION <= 230 && defined(QT_NO_CODECS)
77#include "qutfcodec.h" 77#include "qutfcodec.h"
78#endif 78#endif
79#include "config.h" 79#include "config.h"
80#include "network.h" 80#include "network.h"
81#ifdef QWS 81#ifdef QWS
82#include "fontmanager.h" 82#include "fontmanager.h"
83#include "fontdatabase.h" 83#include "fontdatabase.h"
84#endif 84#endif
85 85
86#include "alarmserver.h" 86#include "alarmserver.h"
87#include "applnk.h" 87#include "applnk.h"
@@ -1822,49 +1822,49 @@ void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize )
1822void QPEApplication::setKeepRunning() 1822void QPEApplication::setKeepRunning()
1823{ 1823{
1824 if ( qApp && qApp->inherits( "QPEApplication" ) ) { 1824 if ( qApp && qApp->inherits( "QPEApplication" ) ) {
1825 QPEApplication * qpeApp = ( QPEApplication* ) qApp; 1825 QPEApplication * qpeApp = ( QPEApplication* ) qApp;
1826 qpeApp->d->keep_running = TRUE; 1826 qpeApp->d->keep_running = TRUE;
1827 } 1827 }
1828} 1828}
1829 1829
1830/*! 1830/*!
1831 Returns TRUE if the application will quit after processing the 1831 Returns TRUE if the application will quit after processing the
1832 current list of qcop messages; otherwise returns FALSE. 1832 current list of qcop messages; otherwise returns FALSE.
1833 1833
1834 \sa setKeepRunning() 1834 \sa setKeepRunning()
1835*/ 1835*/
1836bool QPEApplication::keepRunning() const 1836bool QPEApplication::keepRunning() const
1837{ 1837{
1838 return d->keep_running; 1838 return d->keep_running;
1839} 1839}
1840 1840
1841/*! 1841/*!
1842 \internal 1842 \internal
1843*/ 1843*/
1844void QPEApplication::internalSetStyle( const QString &style ) 1844void QPEApplication::internalSetStyle( const QString &style )
1845{ 1845{
1846#if QT_VERSION >= 300 1846#if QT_VERSION >= 0x030000
1847 if ( style == "QPE" ) { 1847 if ( style == "QPE" ) {
1848 setStyle( new QPEStyle ); 1848 setStyle( new QPEStyle );
1849 } 1849 }
1850 else { 1850 else {
1851 QStyle *s = QStyleFactory::create( style ); 1851 QStyle *s = QStyleFactory::create( style );
1852 if ( s ) 1852 if ( s )
1853 setStyle( s ); 1853 setStyle( s );
1854 } 1854 }
1855#else 1855#else
1856 if ( style == "Windows" ) { 1856 if ( style == "Windows" ) {
1857 setStyle( new QWindowsStyle ); 1857 setStyle( new QWindowsStyle );
1858 } 1858 }
1859 else if ( style == "QPE" ) { 1859 else if ( style == "QPE" ) {
1860 setStyle( new QPEStyle ); 1860 setStyle( new QPEStyle );
1861 } 1861 }
1862 else if ( style == "Light" ) { 1862 else if ( style == "Light" ) {
1863 setStyle( new LightStyle ); 1863 setStyle( new LightStyle );
1864 } 1864 }
1865#ifndef QT_NO_STYLE_PLATINUM 1865#ifndef QT_NO_STYLE_PLATINUM
1866 else if ( style == "Platinum" ) { 1866 else if ( style == "Platinum" ) {
1867 setStyle( new QPlatinumStyle ); 1867 setStyle( new QPlatinumStyle );
1868 } 1868 }
1869#endif 1869#endif
1870#ifndef QT_NO_STYLE_MOTIF 1870#ifndef QT_NO_STYLE_MOTIF
diff --git a/library/qpestyle.cpp b/library/qpestyle.cpp
index b61ada4..0566f6b 100644
--- a/library/qpestyle.cpp
+++ b/library/qpestyle.cpp
@@ -2,49 +2,49 @@
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "qpestyle.h" 21#include "qpestyle.h"
22 22
23 23
24#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2) 24#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2)
25 25
26#if QT_VERSION >= 300 26#if QT_VERSION >= 0x030000
27 27
28#include <qdrawutil.h> 28#include <qdrawutil.h>
29#include <qcombobox.h> 29#include <qcombobox.h>
30#include <qtabbar.h> 30#include <qtabbar.h>
31 31
32QPEStyle::QPEStyle() 32QPEStyle::QPEStyle()
33{ 33{
34} 34}
35 35
36QPEStyle::~QPEStyle() 36QPEStyle::~QPEStyle()
37{ 37{
38} 38}
39 39
40void QPEStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRect &r, 40void QPEStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRect &r,
41 const QColorGroup &cg, SFlags flags, const QStyleOption &data) const 41 const QColorGroup &cg, SFlags flags, const QStyleOption &data) const
42{ 42{
43 switch ( pe ) { 43 switch ( pe ) {
44 case PE_ButtonTool: 44 case PE_ButtonTool:
45 { 45 {
46 QColorGroup mycg = cg; 46 QColorGroup mycg = cg;
47 if ( flags & Style_On ) { 47 if ( flags & Style_On ) {
48 QBrush fill( cg.mid(), Dense4Pattern ); 48 QBrush fill( cg.mid(), Dense4Pattern );
49 mycg.setBrush( QColorGroup::Button, fill ); 49 mycg.setBrush( QColorGroup::Button, fill );
50 } 50 }
@@ -408,49 +408,49 @@ QSize QPEStyle::sizeFromContents( ContentsType contents, const QWidget *widget,
408 } 408 }
409 default: 409 default:
410 sz = QWindowsStyle::sizeFromContents( contents, widget, contentsSize, data ); 410 sz = QWindowsStyle::sizeFromContents( contents, widget, contentsSize, data );
411 break; 411 break;
412 } 412 }
413 413
414 return sz; 414 return sz;
415} 415}
416 416
417#else 417#else
418 418
419#include <qfontmetrics.h> 419#include <qfontmetrics.h>
420#include <qpalette.h> 420#include <qpalette.h>
421#include <qdrawutil.h> 421#include <qdrawutil.h>
422#include <qscrollbar.h> 422#include <qscrollbar.h>
423#include <qbutton.h> 423#include <qbutton.h>
424#include <qframe.h> 424#include <qframe.h>
425#include <qtabbar.h> 425#include <qtabbar.h>
426 426
427#define INCLUDE_MENUITEM_DEF 427#define INCLUDE_MENUITEM_DEF
428#include <qmenudata.h> 428#include <qmenudata.h>
429 429
430QPEStyle::QPEStyle() 430QPEStyle::QPEStyle()
431{ 431{
432#if QT_VERSION < 300 432#if QT_VERSION < 0x030000
433 setButtonMargin(buttonMargin()); 433 setButtonMargin(buttonMargin());
434 setScrollBarExtent(scrollBarExtent().width(),scrollBarExtent().height()); 434 setScrollBarExtent(scrollBarExtent().width(),scrollBarExtent().height());
435#endif 435#endif
436} 436}
437 437
438QPEStyle::~QPEStyle() 438QPEStyle::~QPEStyle()
439{ 439{
440} 440}
441 441
442int QPEStyle::buttonMargin() const 442int QPEStyle::buttonMargin() const
443{ 443{
444 return 2; 444 return 2;
445} 445}
446 446
447QSize QPEStyle::scrollBarExtent() const 447QSize QPEStyle::scrollBarExtent() const
448{ 448{
449 return QSize(13,13); 449 return QSize(13,13);
450} 450}
451 451
452void QPEStyle::polish ( QPalette & ) 452void QPEStyle::polish ( QPalette & )
453{ 453{
454} 454}
455 455
456void QPEStyle::polish( QWidget *w ) 456void QPEStyle::polish( QWidget *w )
diff --git a/library/qpestyle.h b/library/qpestyle.h
index 19ef346..1bde0ff 100644
--- a/library/qpestyle.h
+++ b/library/qpestyle.h
@@ -4,49 +4,49 @@
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#ifndef QPESTYLE_H 21#ifndef QPESTYLE_H
22#define QPESTYLE_H 22#define QPESTYLE_H
23 23
24#ifndef QT_H 24#ifndef QT_H
25#include "qwindowsstyle.h" 25#include "qwindowsstyle.h"
26#endif // QT_H 26#endif // QT_H
27 27
28#if QT_VERSION >= 300 28#if QT_VERSION >= 0x030000
29 29
30class Q_EXPORT QPEStyle : public QWindowsStyle 30class Q_EXPORT QPEStyle : public QWindowsStyle
31{ 31{
32public: 32public:
33 QPEStyle(); 33 QPEStyle();
34 virtual ~QPEStyle(); 34 virtual ~QPEStyle();
35 35
36 virtual void drawPrimitive( PrimitiveElement pe, QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags=Style_Default, const QStyleOption & = QStyleOption::Default) const; 36 virtual void drawPrimitive( PrimitiveElement pe, QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags=Style_Default, const QStyleOption & = QStyleOption::Default) const;
37 virtual void drawControl( ControlElement ce, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags how=Style_Default, const QStyleOption & = QStyleOption::Default) const; 37 virtual void drawControl( ControlElement ce, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags how=Style_Default, const QStyleOption & = QStyleOption::Default) const;
38 virtual void drawComplexControl( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags how=Style_Default, SCFlags sub=SC_All, SCFlags subActive=SC_None, const QStyleOption & = QStyleOption::Default) const; 38 virtual void drawComplexControl( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags how=Style_Default, SCFlags sub=SC_All, SCFlags subActive=SC_None, const QStyleOption & = QStyleOption::Default) const;
39 virtual int pixelMetric( PixelMetric metric, const QWidget *widget=0 ) const; 39 virtual int pixelMetric( PixelMetric metric, const QWidget *widget=0 ) const;
40 virtual QSize sizeFromContents( ContentsType contents, const QWidget *widget, const QSize &contentsSize, const QStyleOption & = QStyleOption::Default) const; 40 virtual QSize sizeFromContents( ContentsType contents, const QWidget *widget, const QSize &contentsSize, const QStyleOption & = QStyleOption::Default) const;
41}; 41};
42 42
43#else 43#else
44 44
45class Q_EXPORT QPEStyle : public QWindowsStyle 45class Q_EXPORT QPEStyle : public QWindowsStyle
46{ 46{
47public: 47public:
48 QPEStyle(); 48 QPEStyle();
49 virtual ~QPEStyle(); 49 virtual ~QPEStyle();
50 virtual void polish( QPalette &p ); 50 virtual void polish( QPalette &p );
51 virtual void polish( QWidget *w ); 51 virtual void polish( QWidget *w );
52 virtual void unPolish( QWidget *w ); 52 virtual void unPolish( QWidget *w );
diff --git a/noncore/apps/opie-console/TEWidget.cpp b/noncore/apps/opie-console/TEWidget.cpp
index 98c1793..1199e4f 100644
--- a/noncore/apps/opie-console/TEWidget.cpp
+++ b/noncore/apps/opie-console/TEWidget.cpp
@@ -243,49 +243,49 @@ static QChar vt100extended(QChar c)
243 case 0x2260 : return 29; 243 case 0x2260 : return 29;
244 case 0x00a3 : return 30; 244 case 0x00a3 : return 30;
245 case 0x00b7 : return 31; 245 case 0x00b7 : return 31;
246 } 246 }
247 return c; 247 return c;
248} 248}
249 249
250static QChar identicalMap(QChar c) 250static QChar identicalMap(QChar c)
251{ 251{
252 return c; 252 return c;
253} 253}
254 254
255void TEWidget::fontChange(const QFont &) 255void TEWidget::fontChange(const QFont &)
256{ 256{
257 QFontMetrics fm(font()); 257 QFontMetrics fm(font());
258 font_h = fm.height(); 258 font_h = fm.height();
259 font_w = fm.maxWidth(); 259 font_w = fm.maxWidth();
260 font_a = fm.ascent(); 260 font_a = fm.ascent();
261//printf("font_h: %d\n",font_h); 261//printf("font_h: %d\n",font_h);
262//printf("font_w: %d\n",font_w); 262//printf("font_w: %d\n",font_w);
263//printf("font_a: %d\n",font_a); 263//printf("font_a: %d\n",font_a);
264//printf("charset: %s\n",QFont::encodingName(font().charSet()).ascii()); 264//printf("charset: %s\n",QFont::encodingName(font().charSet()).ascii());
265//printf("rawname: %s\n",font().rawName().ascii()); 265//printf("rawname: %s\n",font().rawName().ascii());
266 fontMap = 266 fontMap =
267#if QT_VERSION < 300 267#if QT_VERSION < 0x030000
268 strcmp(QFont::encodingName(font().charSet()).ascii(),"iso10646") 268 strcmp(QFont::encodingName(font().charSet()).ascii(),"iso10646")
269 ? vt100extended 269 ? vt100extended
270 : 270 :
271#endif 271#endif
272 identicalMap; 272 identicalMap;
273 propagateSize(); 273 propagateSize();
274 update(); 274 update();
275} 275}
276 276
277void TEWidget::setVTFont(const QFont& f) 277void TEWidget::setVTFont(const QFont& f)
278{ 278{
279 QFrame::setFont(f); 279 QFrame::setFont(f);
280} 280}
281 281
282QFont TEWidget::getVTFont() { 282QFont TEWidget::getVTFont() {
283 return font(); 283 return font();
284} 284}
285 285
286void TEWidget::setFont(const QFont &) 286void TEWidget::setFont(const QFont &)
287{ 287{
288 // ignore font change request if not coming from konsole itself 288 // ignore font change request if not coming from konsole itself
289} 289}
290 290
291/* ------------------------------------------------------------------------- */ 291/* ------------------------------------------------------------------------- */
diff --git a/noncore/apps/tinykate/libkate/qt3back/qregexp3.cpp b/noncore/apps/tinykate/libkate/qt3back/qregexp3.cpp
index 78635b2..7b30b1a 100644
--- a/noncore/apps/tinykate/libkate/qt3back/qregexp3.cpp
+++ b/noncore/apps/tinykate/libkate/qt3back/qregexp3.cpp
@@ -13,53 +13,53 @@
13** as defined by Trolltech AS of Norway and appearing in the file 13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file. 14** LICENSE.QPL included in the packaging of this file.
15** 15**
16** This file may be distributed and/or modified under the terms of the 16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software 17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the 18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file. 19** packaging of this file.
20** 20**
21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition 21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
22** licenses may use this file in accordance with the Qt Commercial License 22** licenses may use this file in accordance with the Qt Commercial License
23** Agreement provided with the Software. 23** Agreement provided with the Software.
24** 24**
25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27** 27**
28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for 28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29** information about Qt Commercial License Agreements. 29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information. 30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information. 31** See http://www.trolltech.com/gpl/ for GPL licensing information.
32** 32**
33** Contact info@trolltech.com if any conditions of this licensing are 33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you. 34** not clear to you.
35** 35**
36**********************************************************************/ 36**********************************************************************/
37#if QT_VERSION >=300 37#if QT_VERSION >= 0x030000
38#error QRegExp3 is now in QT 3 use QRegExp instead 38#error QRegExp3 is now in QT 3 use QRegExp instead
39#endif 39#endif
40 40
41#if QT_VERSION < 300 41#if QT_VERSION < 0x030000
42#include "./qregexp3.h" 42#include "./qregexp3.h"
43#else 43#else
44#include "qregexp.h" 44#include "qregexp.h"
45#endif 45#endif
46 46
47/* OPIE */ 47/* OPIE */
48#include <opie2/odebug.h> 48#include <opie2/odebug.h>
49 49
50/* QT */ 50/* QT */
51#include <qarray.h> 51#include <qarray.h>
52#include <qbitarray.h> 52#include <qbitarray.h>
53#include <qcache.h> 53#include <qcache.h>
54#include <qintdict.h> 54#include <qintdict.h>
55#include <qmap.h> 55#include <qmap.h>
56#include <qstring.h> 56#include <qstring.h>
57#include <qtl.h> 57#include <qtl.h>
58#include <qvector.h> 58#include <qvector.h>
59 59
60/* STD */ 60/* STD */
61#include <limits.h> 61#include <limits.h>
62 62
63/* 63/*
64 WARNING! Be sure to read qregexp.tex before modifying this file. 64 WARNING! Be sure to read qregexp.tex before modifying this file.
65*/ 65*/
diff --git a/noncore/apps/tinykate/libkate/qt3back/qregexp3.h b/noncore/apps/tinykate/libkate/qt3back/qregexp3.h
index 5b75131..fd6bc78 100644
--- a/noncore/apps/tinykate/libkate/qt3back/qregexp3.h
+++ b/noncore/apps/tinykate/libkate/qt3back/qregexp3.h
@@ -21,49 +21,49 @@
21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition 21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
22** licenses may use this file in accordance with the Qt Commercial License 22** licenses may use this file in accordance with the Qt Commercial License
23** Agreement provided with the Software. 23** Agreement provided with the Software.
24** 24**
25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27** 27**
28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for 28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29** information about Qt Commercial License Agreements. 29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information. 30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information. 31** See http://www.trolltech.com/gpl/ for GPL licensing information.
32** 32**
33** Contact info@trolltech.com if any conditions of this licensing are 33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you. 34** not clear to you.
35** 35**
36**********************************************************************/ 36**********************************************************************/
37 37
38#ifndef QREGEXP3_H 38#ifndef QREGEXP3_H
39#define QREGEXP3_H 39#define QREGEXP3_H
40#ifndef QT_H 40#ifndef QT_H
41#include "qstringlist.h" 41#include "qstringlist.h"
42#endif // QT_H 42#endif // QT_H
43 43
44 44
45#if QT_VERSION >=300 45#if QT_VERSION >= 0x030000
46#include <qregexp.h> 46#include <qregexp.h>
47#else 47#else
48class QRegExpEngine; 48class QRegExpEngine;
49struct QRegExpPrivate; 49struct QRegExpPrivate;
50 50
51class Q_EXPORT QRegExp3 51class Q_EXPORT QRegExp3
52{ 52{
53public: 53public:
54 QRegExp3(); 54 QRegExp3();
55 QRegExp3( const QString& pattern, bool caseSensitive = TRUE, 55 QRegExp3( const QString& pattern, bool caseSensitive = TRUE,
56 bool wildcard = FALSE ); 56 bool wildcard = FALSE );
57 QRegExp3( const QRegExp3& rx ); 57 QRegExp3( const QRegExp3& rx );
58 ~QRegExp3(); 58 ~QRegExp3();
59 QRegExp3& operator=( const QRegExp3& rx ); 59 QRegExp3& operator=( const QRegExp3& rx );
60 60
61 bool operator==( const QRegExp3& rx ) const; 61 bool operator==( const QRegExp3& rx ) const;
62 bool operator!=( const QRegExp3& rx ) const { return !operator==( rx ); } 62 bool operator!=( const QRegExp3& rx ) const { return !operator==( rx ); }
63 63
64 bool isEmpty() const; 64 bool isEmpty() const;
65 bool isValid() const; 65 bool isValid() const;
66 QString pattern() const; 66 QString pattern() const;
67 void setPattern( const QString& pattern ); 67 void setPattern( const QString& pattern );
68 bool caseSensitive() const; 68 bool caseSensitive() const;
69 void setCaseSensitive( bool sensitive ); 69 void setCaseSensitive( bool sensitive );
@@ -86,26 +86,26 @@ public:
86#ifdef QCHAR_SUPPORT 86#ifdef QCHAR_SUPPORT
87 int search(const QChar *str,int start=0); 87 int search(const QChar *str,int start=0);
88 int search(const QChar *str,int start=0) const; 88 int search(const QChar *str,int start=0) const;
89 int searchRev(const QChar *str,int start=-1); 89 int searchRev(const QChar *str,int start=-1);
90 int searchRev(const QChar *str,int start=-1) const ; 90 int searchRev(const QChar *str,int start=-1) const ;
91 bool exactMatch(const QChar *str); 91 bool exactMatch(const QChar *str);
92 bool exactMatch(const QChar *str) const; 92 bool exactMatch(const QChar *str) const;
93 // end QChar versions 93 // end QChar versions
94#endif 94#endif
95 int searchRev( const QString& str, int start = -1 ); 95 int searchRev( const QString& str, int start = -1 );
96 int searchRev( const QString& str, int start = -1 ) const; 96 int searchRev( const QString& str, int start = -1 ) const;
97 int matchedLength(); 97 int matchedLength();
98#ifndef QT_NO_REGEXP_CAPTURE 98#ifndef QT_NO_REGEXP_CAPTURE
99 QStringList capturedTexts(); 99 QStringList capturedTexts();
100 QString cap( int nth = 0 ); 100 QString cap( int nth = 0 );
101 int pos( int nth = 0 ); 101 int pos( int nth = 0 );
102#endif 102#endif
103 103
104private: 104private:
105 void compile( bool caseSensitive ); 105 void compile( bool caseSensitive );
106 106
107 QRegExpEngine *eng; 107 QRegExpEngine *eng;
108 QRegExpPrivate *priv; 108 QRegExpPrivate *priv;
109}; 109};
110#endif // QT_VERSION >= 300 110#endif // QT_VERSION >= 0x030000
111#endif // QREGEXP_H 111#endif // QREGEXP_H
diff --git a/noncore/apps/zsafe/shadedlistitem.cpp b/noncore/apps/zsafe/shadedlistitem.cpp
index 72c6261..7f340f9 100644
--- a/noncore/apps/zsafe/shadedlistitem.cpp
+++ b/noncore/apps/zsafe/shadedlistitem.cpp
@@ -31,39 +31,39 @@ ShadedListItem::ShadedListItem(int index, QListView *parent, QListViewItem *afte
31 oddRow = (index % 2 != 0); 31 oddRow = (index % 2 != 0);
32} 32}
33 33
34ShadedListItem::ShadedListItem(int index, QListView *parent, QString label1, QString label2, QString label3) 34ShadedListItem::ShadedListItem(int index, QListView *parent, QString label1, QString label2, QString label3)
35 : QListViewItem(parent, label1, label2, label3), lv(parent) 35 : QListViewItem(parent, label1, label2, label3), lv(parent)
36{ 36{
37 oddRow = (index % 2 != 0); 37 oddRow = (index % 2 != 0);
38} 38}
39 39
40ShadedListItem::ShadedListItem(int index, QListView *parent, QListViewItem *after, QString label1, QString label2, QString label3) 40ShadedListItem::ShadedListItem(int index, QListView *parent, QListViewItem *after, QString label1, QString label2, QString label3)
41 : QListViewItem(parent, after, label1, label2, label3), lv(parent) 41 : QListViewItem(parent, after, label1, label2, label3), lv(parent)
42{ 42{
43 oddRow = (index % 2 != 0); 43 oddRow = (index % 2 != 0);
44} 44}
45 45
46ShadedListItem::~ShadedListItem() 46ShadedListItem::~ShadedListItem()
47{ 47{
48 48
49} 49}
50 50
51 51
52void ShadedListItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) 52void ShadedListItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
53{ 53{
54 QColorGroup colors(cg); 54 QColorGroup colors(cg);
55#if QT_VERSION >=300 55#if QT_VERSION >= 0x030000
56 const QColorGroup::ColorRole crole = QColorGroup::Base; 56 const QColorGroup::ColorRole crole = QColorGroup::Base;
57 // const QWidget::BackgroundMode bgmode = lv->viewport()->backgroundMode(); 57 // const QWidget::BackgroundMode bgmode = lv->viewport()->backgroundMode();
58 // const QColorGroup::ColorRole crole = QPalette::backgroundRoleFromMode(bgmode); 58 // const QColorGroup::ColorRole crole = QPalette::backgroundRoleFromMode(bgmode);
59#else 59#else
60 const QColorGroup::ColorRole crole = QColorGroup::Base; 60 const QColorGroup::ColorRole crole = QColorGroup::Base;
61#endif 61#endif
62 if (oddRow) { 62 if (oddRow) {
63 colors.setColor(crole, *ZSafe::oddRowColor); 63 colors.setColor(crole, *ZSafe::oddRowColor);
64 } 64 }
65 else { 65 else {
66 colors.setColor(crole, *ZSafe::evenRowColor); 66 colors.setColor(crole, *ZSafe::evenRowColor);
67 } 67 }
68 QListViewItem::paintCell(p, colors, column, width, alignment); 68 QListViewItem::paintCell(p, colors, column, width, alignment);
69} 69}
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp
index 1670f93..9ec5af9 100644
--- a/noncore/net/wellenreiter/gui/configwindow.cpp
+++ b/noncore/net/wellenreiter/gui/configwindow.cpp
@@ -351,104 +351,104 @@ void WellenreiterConfigWindow::performAction( const QString& type,
351 return; 351 return;
352 } 352 }
353 default: assert( false ); 353 default: assert( false );
354 } 354 }
355} 355}
356 356
357 357
358void WellenreiterConfigWindow::load() 358void WellenreiterConfigWindow::load()
359{ 359{
360#ifdef Q_WS_X11 360#ifdef Q_WS_X11
361 #warning Persistent Configuration not yet implemented for standalone X11 build 361 #warning Persistent Configuration not yet implemented for standalone X11 build
362 performAutodetection(); 362 performAutodetection();
363#else 363#else
364 odebug << "loading configuration settings..." << oendl; 364 odebug << "loading configuration settings..." << oendl;
365 365
366 /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ 366 /* This is dumb monkey typing stuff... We _need_ to do this automatically! */
367 367
368 OConfig* c = oApp->config(); 368 OConfig* c = oApp->config();
369 369
370 c->setGroup( "Interface" ); 370 c->setGroup( "Interface" );
371 371
372 QString interface = c->readEntry( "name", "<none>" ); 372 QString interface = c->readEntry( "name", "<none>" );
373 if ( interface != "<none>" ) 373 if ( interface != "<none>" )
374 { 374 {
375#if QT_VERSION < 300 375#if QT_VERSION < 0x030000
376 interfaceName->insertItem( interface, 0 ); 376 interfaceName->insertItem( interface, 0 );
377 interfaceName->setCurrentItem( 0 ); 377 interfaceName->setCurrentItem( 0 );
378#else 378#else
379 interfaceName->setCurrentText( interface ); 379 interfaceName->setCurrentText( interface );
380#endif 380#endif
381 381
382 QString device = c->readEntry( "type", "<select>" ); 382 QString device = c->readEntry( "type", "<select>" );
383#if QT_VERSION < 300 383#if QT_VERSION < 0x030000
384 for ( int i = 0; i < deviceType->count(); ++i ) 384 for ( int i = 0; i < deviceType->count(); ++i )
385 { 385 {
386 if ( deviceType->text( i ) == device ) 386 if ( deviceType->text( i ) == device )
387 { 387 {
388 deviceType->setCurrentItem( i ); 388 deviceType->setCurrentItem( i );
389 break; 389 break;
390 } 390 }
391 } 391 }
392#else 392#else
393 deviceType->setCurrentText( device ); 393 deviceType->setCurrentText( device );
394#endif 394#endif
395 } 395 }
396 else 396 else
397 { 397 {
398 performAutodetection(); 398 performAutodetection();
399 } 399 }
400 400
401 prismHeader->setChecked( c->readBoolEntry( "prism", false ) ); 401 prismHeader->setChecked( c->readBoolEntry( "prism", false ) );
402 hopChannels->setChecked( c->readBoolEntry( "hop", true ) ); 402 hopChannels->setChecked( c->readBoolEntry( "hop", true ) );
403 hopInterval->setValue( c->readNumEntry( "interval", 250 ) ); 403 hopInterval->setValue( c->readNumEntry( "interval", 250 ) );
404 adaptiveHopping->setChecked( c->readBoolEntry( "adaptive", true ) ); 404 adaptiveHopping->setChecked( c->readBoolEntry( "adaptive", true ) );
405 405
406 c->setGroup( "Capture" ); 406 c->setGroup( "Capture" );
407 writeCaptureFile->setChecked( c->readBoolEntry( "writeCaptureFile", true ) ); 407 writeCaptureFile->setChecked( c->readBoolEntry( "writeCaptureFile", true ) );
408 captureFileName->setEnabled( writeCaptureFile->isChecked() ); 408 captureFileName->setEnabled( writeCaptureFile->isChecked() );
409 getCaptureFileName->setEnabled( writeCaptureFile->isChecked() ); 409 getCaptureFileName->setEnabled( writeCaptureFile->isChecked() );
410 parsePackets->setEnabled( writeCaptureFile->isChecked() ); 410 parsePackets->setEnabled( writeCaptureFile->isChecked() );
411 captureFileName->setText( c->readEntry( "filename", "/tmp/capture" ) ); 411 captureFileName->setText( c->readEntry( "filename", "/tmp/capture" ) );
412 hexViewBufferUnlimited->setChecked( c->readBoolEntry( "hexViewBufferUnlimited", true ) ); 412 hexViewBufferUnlimited->setChecked( c->readBoolEntry( "hexViewBufferUnlimited", true ) );
413 hexViewBufferLimited->setChecked( !c->readBoolEntry( "hexViewBufferUnlimited", true ) ); 413 hexViewBufferLimited->setChecked( !c->readBoolEntry( "hexViewBufferUnlimited", true ) );
414 hexViewBufferSize->setValue( c->readNumEntry( "hexViewBufferSize", 2000 ) ); 414 hexViewBufferSize->setValue( c->readNumEntry( "hexViewBufferSize", 2000 ) );
415 415
416 c->setGroup( "UI" ); 416 c->setGroup( "UI" );
417 lookupVendor->setChecked( c->readBoolEntry( "lookupVendor", true ) ); 417 lookupVendor->setChecked( c->readBoolEntry( "lookupVendor", true ) );
418 openTree->setChecked( c->readBoolEntry( "openTree", true ) ); 418 openTree->setChecked( c->readBoolEntry( "openTree", true ) );
419 disablePM->setChecked( c->readBoolEntry( "disablePM", true ) ); 419 disablePM->setChecked( c->readBoolEntry( "disablePM", true ) );
420 newNetworkAction->setCurrentItem( c->readNumEntry( "newNetworkAction", 1 ) ); // Default: Play Alarm 420 newNetworkAction->setCurrentItem( c->readNumEntry( "newNetworkAction", 1 ) ); // Default: Play Alarm
421 newNetworkScript->setText( c->readEntry( "newNetworkScript", "" ) ); 421 newNetworkScript->setText( c->readEntry( "newNetworkScript", "" ) );
422 newClientAction->setCurrentItem( c->readNumEntry( "newClientAction", 2 ) ); // Default: Play Click 422 newClientAction->setCurrentItem( c->readNumEntry( "newClientAction", 2 ) ); // Default: Play Click
423 newClientScript->setText( c->readEntry( "newClientScript", "" ) ); 423 newClientScript->setText( c->readEntry( "newClientScript", "" ) );
424 newStationAction->setCurrentItem( c->readNumEntry( "newStationAction", 2 ) ); // Default: Play Click 424 newStationAction->setCurrentItem( c->readNumEntry( "newStationAction", 2 ) ); // Default: Play Click
425 newStationScript->setText( c->readEntry( "newStationScript", "" ) ); 425 newStationScript->setText( c->readEntry( "newStationScript", "" ) );
426 synchronizeActionsAndScripts(); // needed for showing/hiding the script QLineEdit on demand 426 synchronizeActionsAndScripts(); // needed for showing/hiding the script QLineEdit on demand
427 427
428 c->setGroup( "GPS" ); 428 c->setGroup( "GPS" );
429 enableGPS->setChecked( c->readBoolEntry( "use", false ) ); 429 enableGPS->setChecked( c->readBoolEntry( "use", false ) );
430#if QT_VERSION < 300 430#if QT_VERSION < 0x030000
431 gpsdHost->insertItem( c->readEntry( "host", "localhost" ), 0 ); 431 gpsdHost->insertItem( c->readEntry( "host", "localhost" ), 0 );
432 gpsdHost->setCurrentItem( 0 ); 432 gpsdHost->setCurrentItem( 0 );
433#else 433#else
434 gpsdHost->setCurrentText( c->readEntry( "host", "localhost" ) ); 434 gpsdHost->setCurrentText( c->readEntry( "host", "localhost" ) );
435#endif 435#endif
436 gpsdPort->setValue( c->readNumEntry( "port", 2947 ) ); 436 gpsdPort->setValue( c->readNumEntry( "port", 2947 ) );
437 startGPS->setChecked( c->readBoolEntry( "start", false ) ); 437 startGPS->setChecked( c->readBoolEntry( "start", false ) );
438 commandGPS->setText( c->readEntry( "command", "gpsd -p /dev/ttyS3 -s 57600" ) ); 438 commandGPS->setText( c->readEntry( "command", "gpsd -p /dev/ttyS3 -s 57600" ) );
439 439
440#endif 440#endif
441} 441}
442 442
443 443
444void WellenreiterConfigWindow::save() 444void WellenreiterConfigWindow::save()
445{ 445{
446#ifdef Q_WS_X11 446#ifdef Q_WS_X11
447 #warning Persistent Configuration not yet implemented for standalone X11 build 447 #warning Persistent Configuration not yet implemented for standalone X11 build
448#else 448#else
449 odebug << "saving configuration settings..." << oendl; 449 odebug << "saving configuration settings..." << oendl;
450 450
451 /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ 451 /* This is dumb monkey typing stuff... We _need_ to do this automatically! */
452 452
453 OConfig* c = oApp->config(); 453 OConfig* c = oApp->config();
454 454
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp
index 9638686..088171c 100644
--- a/noncore/settings/appearance2/appearance.cpp
+++ b/noncore/settings/appearance2/appearance.cpp
@@ -42,49 +42,49 @@
42#include <opie2/odebug.h> 42#include <opie2/odebug.h>
43 43
44#include <qpe/config.h> 44#include <qpe/config.h>
45#include <qpe/global.h> 45#include <qpe/global.h>
46#include <qpe/qpeapplication.h> 46#include <qpe/qpeapplication.h>
47#include <qpe/qpemessagebox.h> 47#include <qpe/qpemessagebox.h>
48#include <qpe/qcopenvelope_qws.h> 48#include <qpe/qcopenvelope_qws.h>
49#include <qpe/qpestyle.h> 49#include <qpe/qpestyle.h>
50#include <qpe/lightstyle.h> 50#include <qpe/lightstyle.h>
51#include <qpe/styleinterface.h> 51#include <qpe/styleinterface.h>
52 52
53/* QT */ 53/* QT */
54#include <qbuttongroup.h> 54#include <qbuttongroup.h>
55#include <qcheckbox.h> 55#include <qcheckbox.h>
56#include <qcombobox.h> 56#include <qcombobox.h>
57#include <qdialog.h> 57#include <qdialog.h>
58#include <qdir.h> 58#include <qdir.h>
59#include <qlabel.h> 59#include <qlabel.h>
60#include <qlayout.h> 60#include <qlayout.h>
61#include <qlineedit.h> 61#include <qlineedit.h>
62#include <qlistbox.h> 62#include <qlistbox.h>
63#include <qmessagebox.h> 63#include <qmessagebox.h>
64#include <qpushbutton.h> 64#include <qpushbutton.h>
65#include <qradiobutton.h> 65#include <qradiobutton.h>
66#if QT_VERSION >= 300 66#if QT_VERSION >= 0x030000
67#include <qstylefactory.h> 67#include <qstylefactory.h>
68#endif 68#endif
69#include <qtoolbutton.h> 69#include <qtoolbutton.h>
70#include <qwindowsstyle.h> 70#include <qwindowsstyle.h>
71#include <qlistview.h> 71#include <qlistview.h>
72#include <qheader.h> 72#include <qheader.h>
73#include <qvbox.h> 73#include <qvbox.h>
74#include <qwhatsthis.h> 74#include <qwhatsthis.h>
75 75
76using namespace Opie; 76using namespace Opie;
77using namespace Opie::Ui; 77using namespace Opie::Ui;
78using namespace Opie::Core; 78using namespace Opie::Core;
79 79
80class DefaultWindowDecoration : public WindowDecorationInterface 80class DefaultWindowDecoration : public WindowDecorationInterface
81{ 81{
82public: 82public:
83 DefaultWindowDecoration() : ref(0) {} 83 DefaultWindowDecoration() : ref(0) {}
84 QString name() const 84 QString name() const
85 { 85 {
86 return "Default"; 86 return "Default";
87 } 87 }
88 QPixmap icon() const 88 QPixmap icon() const
89 { 89 {
90 return QPixmap(); 90 return QPixmap();
@@ -109,49 +109,49 @@ private:
109 109
110 110
111 111
112 112
113 113
114 114
115 115
116QWidget *Appearance::createStyleTab ( QWidget *parent, Config &cfg ) 116QWidget *Appearance::createStyleTab ( QWidget *parent, Config &cfg )
117{ 117{
118 QWidget* tab = new QWidget( parent, "StyleTab" ); 118 QWidget* tab = new QWidget( parent, "StyleTab" );
119 QVBoxLayout* vertLayout = new QVBoxLayout( tab, 3, 3 ); 119 QVBoxLayout* vertLayout = new QVBoxLayout( tab, 3, 3 );
120 120
121 m_style_list = new QListBox( tab, "m_style_list" ); 121 m_style_list = new QListBox( tab, "m_style_list" );
122 vertLayout->addWidget( m_style_list ); 122 vertLayout->addWidget( m_style_list );
123 QWhatsThis::add( m_style_list, tr( "Styles control the way items such as buttons and scroll bars appear in all applications.\n\nClick here to select an available style." ) ); 123 QWhatsThis::add( m_style_list, tr( "Styles control the way items such as buttons and scroll bars appear in all applications.\n\nClick here to select an available style." ) );
124 124
125 m_style_settings = new QPushButton ( tr( "Settings..." ), tab ); 125 m_style_settings = new QPushButton ( tr( "Settings..." ), tab );
126 connect ( m_style_settings, SIGNAL( clicked()), this, SLOT( styleSettingsClicked())); 126 connect ( m_style_settings, SIGNAL( clicked()), this, SLOT( styleSettingsClicked()));
127 vertLayout-> addWidget ( m_style_settings ); 127 vertLayout-> addWidget ( m_style_settings );
128 QWhatsThis::add( m_style_settings, tr( "Click here to configure the currently selected style.\n\nNote: This option is not available for all styles." ) ); 128 QWhatsThis::add( m_style_settings, tr( "Click here to configure the currently selected style.\n\nNote: This option is not available for all styles." ) );
129 129
130 QString s = cfg. readEntry ( "Style", "Light" ); 130 QString s = cfg. readEntry ( "Style", "Light" );
131 131
132 132
133#if QT_VERSION >= 300 133#if QT_VERSION >= 0x030000
134 m_style_list->insertStringList(QStyleFactory::styles()); 134 m_style_list->insertStringList(QStyleFactory::styles());
135#else 135#else
136 m_style_list-> insertItem ( new StyleListItem ( "Windows", new QWindowsStyle ( ))); 136 m_style_list-> insertItem ( new StyleListItem ( "Windows", new QWindowsStyle ( )));
137 m_style_list-> insertItem ( new StyleListItem ( "Light", new LightStyle ( ))); 137 m_style_list-> insertItem ( new StyleListItem ( "Light", new LightStyle ( )));
138 m_style_list-> insertItem ( new StyleListItem ( "QPE", new QPEStyle ( ))); 138 m_style_list-> insertItem ( new StyleListItem ( "QPE", new QPEStyle ( )));
139#endif 139#endif
140 140
141 { 141 {
142 QString path = QPEApplication::qpeDir ( ); 142 QString path = QPEApplication::qpeDir ( );
143 path.append( "/plugins/styles/" ); 143 path.append( "/plugins/styles/" );
144 QStringList sl = QDir ( path, "lib*.so" ). entryList ( ); 144 QStringList sl = QDir ( path, "lib*.so" ). entryList ( );
145 145
146 for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it ) 146 for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it )
147 { 147 {
148 QString libstr = path; 148 QString libstr = path;
149 libstr.append( "/" ); 149 libstr.append( "/" );
150 libstr.append( *it ); 150 libstr.append( *it );
151 QLibrary *lib = new QLibrary ( libstr ); 151 QLibrary *lib = new QLibrary ( libstr );
152 StyleInterface *iface; 152 StyleInterface *iface;
153 153
154 if (( lib-> queryInterface ( IID_Style, (QUnknownInterface **) &iface ) == QS_OK ) && iface ) 154 if (( lib-> queryInterface ( IID_Style, (QUnknownInterface **) &iface ) == QS_OK ) && iface )
155 { 155 {
156 StyleListItem *slit = new StyleListItem ( lib, iface ); 156 StyleListItem *slit = new StyleListItem ( lib, iface );
157 m_style_list-> insertItem ( slit ); 157 m_style_list-> insertItem ( slit );
diff --git a/noncore/settings/doctab/doctab.cpp b/noncore/settings/doctab/doctab.cpp
index feaf538..72eda6b 100644
--- a/noncore/settings/doctab/doctab.cpp
+++ b/noncore/settings/doctab/doctab.cpp
@@ -22,49 +22,49 @@
22 22
23#include <qpe/global.h> 23#include <qpe/global.h>
24#include <qpe/fontmanager.h> 24#include <qpe/fontmanager.h>
25#include <qpe/config.h> 25#include <qpe/config.h>
26#include <qpe/applnk.h> 26#include <qpe/applnk.h>
27#include <qpe/qpedialog.h> 27#include <qpe/qpedialog.h>
28#include <qpe/qpeapplication.h> 28#include <qpe/qpeapplication.h>
29#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 29#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
30#include <qpe/qcopenvelope_qws.h> 30#include <qpe/qcopenvelope_qws.h>
31#endif 31#endif
32 32
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qcheckbox.h> 34#include <qcheckbox.h>
35#include <qradiobutton.h> 35#include <qradiobutton.h>
36#include <qtabwidget.h> 36#include <qtabwidget.h>
37#include <qslider.h> 37#include <qslider.h>
38#include <qfile.h> 38#include <qfile.h>
39#include <qtextstream.h> 39#include <qtextstream.h>
40#include <qdatastream.h> 40#include <qdatastream.h>
41#include <qmessagebox.h> 41#include <qmessagebox.h>
42#include <qcombobox.h> 42#include <qcombobox.h>
43#include <qspinbox.h> 43#include <qspinbox.h>
44#include <qlistbox.h> 44#include <qlistbox.h>
45#include <qdir.h> 45#include <qdir.h>
46#if QT_VERSION >= 300 46#if QT_VERSION >= 0x030000
47#include <qstylefactory.h> 47#include <qstylefactory.h>
48#endif 48#endif
49 49
50#include <stdlib.h> 50#include <stdlib.h>
51 51
52 52
53DocTabSettings::DocTabSettings( QWidget* parent, const char* name, WFlags fl ) 53DocTabSettings::DocTabSettings( QWidget* parent, const char* name, WFlags fl )
54 : DocTabSettingsBase( parent, name, TRUE, fl ) 54 : DocTabSettingsBase( parent, name, TRUE, fl )
55{ 55{
56 dl = new QPEDialogListener(this); 56 dl = new QPEDialogListener(this);
57 reset(); 57 reset();
58} 58}
59 59
60DocTabSettings::~DocTabSettings() 60DocTabSettings::~DocTabSettings()
61{} 61{}
62 62
63void DocTabSettings::accept() 63void DocTabSettings::accept()
64{ 64{
65 applyDocTab(); 65 applyDocTab();
66 QDialog::accept(); 66 QDialog::accept();
67} 67}
68 68
69void DocTabSettings::applyDocTab() 69void DocTabSettings::applyDocTab()
70{ 70{
diff --git a/noncore/settings/language/language.cpp b/noncore/settings/language/language.cpp
index 14750ac..bf90576 100644
--- a/noncore/settings/language/language.cpp
+++ b/noncore/settings/language/language.cpp
@@ -22,49 +22,49 @@
22 22
23#include <qpe/global.h> 23#include <qpe/global.h>
24#include <qpe/fontmanager.h> 24#include <qpe/fontmanager.h>
25#include <qpe/config.h> 25#include <qpe/config.h>
26#include <qpe/applnk.h> 26#include <qpe/applnk.h>
27#include <qpe/qpedialog.h> 27#include <qpe/qpedialog.h>
28#include <qpe/qpeapplication.h> 28#include <qpe/qpeapplication.h>
29#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 29#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
30#include <qpe/qcopenvelope_qws.h> 30#include <qpe/qcopenvelope_qws.h>
31#endif 31#endif
32 32
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qcheckbox.h> 34#include <qcheckbox.h>
35#include <qradiobutton.h> 35#include <qradiobutton.h>
36#include <qtabwidget.h> 36#include <qtabwidget.h>
37#include <qslider.h> 37#include <qslider.h>
38#include <qfile.h> 38#include <qfile.h>
39#include <qtextstream.h> 39#include <qtextstream.h>
40#include <qdatastream.h> 40#include <qdatastream.h>
41#include <qmessagebox.h> 41#include <qmessagebox.h>
42#include <qcombobox.h> 42#include <qcombobox.h>
43#include <qspinbox.h> 43#include <qspinbox.h>
44#include <qlistbox.h> 44#include <qlistbox.h>
45#include <qdir.h> 45#include <qdir.h>
46#if QT_VERSION >= 300 46#if QT_VERSION >= 0x030000
47#include <qstylefactory.h> 47#include <qstylefactory.h>
48#endif 48#endif
49 49
50#include <stdlib.h> 50#include <stdlib.h>
51 51
52 52
53LanguageSettings::LanguageSettings( QWidget* parent, const char* name, WFlags fl ) 53LanguageSettings::LanguageSettings( QWidget* parent, const char* name, WFlags fl )
54 : LanguageSettingsBase( parent, name, TRUE, fl ) 54 : LanguageSettingsBase( parent, name, TRUE, fl )
55{ 55{
56 if ( FontManager::hasUnicodeFont() ) 56 if ( FontManager::hasUnicodeFont() )
57 languages->setFont(FontManager::unicodeFont(FontManager::Proportional)); 57 languages->setFont(FontManager::unicodeFont(FontManager::Proportional));
58 58
59 59
60 QString tfn = QPEApplication::qpeDir() + "i18n/"; 60 QString tfn = QPEApplication::qpeDir() + "i18n/";
61 QDir langDir = tfn; 61 QDir langDir = tfn;
62 QStringList list = langDir.entryList("*", QDir::Dirs ); 62 QStringList list = langDir.entryList("*", QDir::Dirs );
63 63
64 QStringList::Iterator it; 64 QStringList::Iterator it;
65 65
66 for ( it = list.begin(); it != list.end(); ++it ) { 66 for ( it = list.begin(); it != list.end(); ++it ) {
67 QString name = (*it); 67 QString name = (*it);
68 QFileInfo desktopFile( tfn + "/" + name + "/.directory" ); 68 QFileInfo desktopFile( tfn + "/" + name + "/.directory" );
69 if ( desktopFile.exists() ) { 69 if ( desktopFile.exists() ) {
70 langAvail.append(name); 70 langAvail.append(name);
diff --git a/noncore/settings/networksettings/interfaces/module.h b/noncore/settings/networksettings/interfaces/module.h
index 9dc913e..13189c3 100644
--- a/noncore/settings/networksettings/interfaces/module.h
+++ b/noncore/settings/networksettings/interfaces/module.h
@@ -1,29 +1,29 @@
1#ifndef NETCONF_MODULE_H 1#ifndef NETCONF_MODULE_H
2#define NETCONF_MODULE_H 2#define NETCONF_MODULE_H
3 3
4#include <qobject.h> 4#include <qobject.h>
5#if QT_VERSION < 300 5#if QT_VERSION < 0x030000
6#include <qlist.h> 6#include <qlist.h>
7#else 7#else
8#include <qptrlist.h> 8#include <qptrlist.h>
9#endif 9#endif
10#include <qmap.h> 10#include <qmap.h>
11#include "interface.h" 11#include "interface.h"
12 12
13class QWidget; 13class QWidget;
14class QTabWidget; 14class QTabWidget;
15 15
16 16
17/** 17/**
18 * \brief The basis of all plugins 18 * \brief The basis of all plugins
19 * 19 *
20 * This is the way to extend networksettings with 20 * This is the way to extend networksettings with
21 * extra functionality. 21 * extra functionality.
22 * 22 *
23 * 23 *
24 * Networksettings in the 1.0 release does not use QCOM 24 * Networksettings in the 1.0 release does not use QCOM
25 * for activation. You need to provide the following function yourself. 25 * for activation. You need to provide the following function yourself.
26 * 26 *
27 * A module needs to provide Name, Images, and methods for 27 * A module needs to provide Name, Images, and methods for
28 * claiming interfaces. For example you can claim physicla 28 * claiming interfaces. For example you can claim physicla
29 * interfaces like wlan0, ppp0 or virtual like a VPN 29 * interfaces like wlan0, ppp0 or virtual like a VPN
diff --git a/noncore/settings/networksettings/mainwindow/addconnectionimp.cpp b/noncore/settings/networksettings/mainwindow/addconnectionimp.cpp
index 84f1cf6..9049af4 100644
--- a/noncore/settings/networksettings/mainwindow/addconnectionimp.cpp
+++ b/noncore/settings/networksettings/mainwindow/addconnectionimp.cpp
@@ -1,27 +1,27 @@
1#include "addconnectionimp.h" 1#include "addconnectionimp.h"
2#include <qlistview.h> 2#include <qlistview.h>
3#if QT_VERSION < 300 3#if QT_VERSION < 0x030000
4#include <qlist.h> 4#include <qlist.h>
5#else 5#else
6#include <qptrlist.h> 6#include <qptrlist.h>
7#endif 7#endif
8#include <qlabel.h> 8#include <qlabel.h>
9#include <qheader.h> 9#include <qheader.h>
10 10
11/** 11/**
12 * Constructor 12 * Constructor
13 */ 13 */
14AddConnectionImp::AddConnectionImp(QWidget *parent, const char *name, WFlags f):AddConnection(parent, name, f){ 14AddConnectionImp::AddConnectionImp(QWidget *parent, const char *name, WFlags f):AddConnection(parent, name, f){
15 connect(registeredServicesList, SIGNAL(selectionChanged()), this, SLOT(changed())); 15 connect(registeredServicesList, SIGNAL(selectionChanged()), this, SLOT(changed()));
16 registeredServicesList->header()->hide(); 16 registeredServicesList->header()->hide();
17}; 17};
18 18
19/** 19/**
20 * The current item changed, update the discription. 20 * The current item changed, update the discription.
21 */ 21 */
22void AddConnectionImp::changed(){ 22void AddConnectionImp::changed(){
23 QListViewItem *item = registeredServicesList->currentItem(); 23 QListViewItem *item = registeredServicesList->currentItem();
24 if(item) 24 if(item)
25 help->setText(list[item->text(0)]); 25 help->setText(list[item->text(0)]);
26} 26}
27 27
diff --git a/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp
index 5f23aea..8feb7a5 100644
--- a/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp
@@ -4,49 +4,49 @@
4#include "interfaceinformationimp.h" 4#include "interfaceinformationimp.h"
5#include "interfacesetupimp.h" 5#include "interfacesetupimp.h"
6#include "interfaces.h" 6#include "interfaces.h"
7#include "module.h" 7#include "module.h"
8 8
9/* OPIE */ 9/* OPIE */
10#include <opie2/odebug.h> 10#include <opie2/odebug.h>
11#include <qpe/qcopenvelope_qws.h> 11#include <qpe/qcopenvelope_qws.h>
12#include <qpe/qpeapplication.h> 12#include <qpe/qpeapplication.h>
13#include <qpe/config.h> 13#include <qpe/config.h>
14#include <qpe/qlibrary.h> 14#include <qpe/qlibrary.h>
15#include <qpe/resource.h> 15#include <qpe/resource.h>
16 16
17/* QT */ 17/* QT */
18#include <qpushbutton.h> 18#include <qpushbutton.h>
19#include <qlistbox.h> 19#include <qlistbox.h>
20#include <qlineedit.h> 20#include <qlineedit.h>
21#include <qlistview.h> 21#include <qlistview.h>
22#include <qheader.h> 22#include <qheader.h>
23#include <qlabel.h> 23#include <qlabel.h>
24#include <qtabwidget.h> // in order to disable the profiles tab 24#include <qtabwidget.h> // in order to disable the profiles tab
25#include <qmessagebox.h> 25#include <qmessagebox.h>
26 26
27 27
28#if QT_VERSION < 300 28#if QT_VERSION < 0x030000
29#include <qlist.h> 29#include <qlist.h>
30#else 30#else
31#include <qptrlist.h> 31#include <qptrlist.h>
32#endif 32#endif
33#include <qdir.h> 33#include <qdir.h>
34#include <qfile.h> 34#include <qfile.h>
35#include <qtextstream.h> 35#include <qtextstream.h>
36#include <qregexp.h> 36#include <qregexp.h>
37 37
38/* STD */ 38/* STD */
39#include <net/if.h> 39#include <net/if.h>
40#include <sys/ioctl.h> 40#include <sys/ioctl.h>
41#include <sys/socket.h> 41#include <sys/socket.h>
42 42
43#define DEFAULT_SCHEME "/var/lib/pcmcia/scheme" 43#define DEFAULT_SCHEME "/var/lib/pcmcia/scheme"
44#define _PROCNETDEV "/proc/net/dev" 44#define _PROCNETDEV "/proc/net/dev"
45 45
46MainWindowImp::MainWindowImp(QWidget *parent, const char *name, WFlags) : MainWindow(parent, name, Qt::WStyle_ContextHelp), advancedUserMode(true), scheme(DEFAULT_SCHEME) 46MainWindowImp::MainWindowImp(QWidget *parent, const char *name, WFlags) : MainWindow(parent, name, Qt::WStyle_ContextHelp), advancedUserMode(true), scheme(DEFAULT_SCHEME)
47{ 47{
48 connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked())); 48 connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked()));
49 connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked())); 49 connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked()));
50 connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked())); 50 connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked()));
51 connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked())); 51 connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked()));
52 52
diff --git a/noncore/unsupported/qpdf/QOutputDev.cpp b/noncore/unsupported/qpdf/QOutputDev.cpp
index 022d938..487177c 100644
--- a/noncore/unsupported/qpdf/QOutputDev.cpp
+++ b/noncore/unsupported/qpdf/QOutputDev.cpp
@@ -573,49 +573,49 @@ int QOutputDev::convertPath ( GfxState *state, QPointArray &points, QArray<int>
573// 573//
574// Transform points in a single subpath and convert curves to line 574// Transform points in a single subpath and convert curves to line
575// segments. 575// segments.
576// 576//
577int QOutputDev::convertSubpath ( GfxState *state, GfxSubpath *subpath, QPointArray &points ) 577int QOutputDev::convertSubpath ( GfxState *state, GfxSubpath *subpath, QPointArray &points )
578{ 578{
579 int oldcnt = points. count ( ); 579 int oldcnt = points. count ( );
580 580
581 fp_t x0, y0, x1, y1, x2, y2, x3, y3; 581 fp_t x0, y0, x1, y1, x2, y2, x3, y3;
582 582
583 int m = subpath-> getNumPoints ( ); 583 int m = subpath-> getNumPoints ( );
584 int i = 0; 584 int i = 0;
585 585
586 while ( i < m ) { 586 while ( i < m ) {
587 if ( i >= 1 && subpath-> getCurve ( i )) { 587 if ( i >= 1 && subpath-> getCurve ( i )) {
588 state-> transform ( subpath-> getX ( i - 1 ), subpath-> getY ( i - 1 ), &x0, &y0 ); 588 state-> transform ( subpath-> getX ( i - 1 ), subpath-> getY ( i - 1 ), &x0, &y0 );
589 state-> transform ( subpath-> getX ( i ), subpath-> getY ( i ), &x1, &y1 ); 589 state-> transform ( subpath-> getX ( i ), subpath-> getY ( i ), &x1, &y1 );
590 state-> transform ( subpath-> getX ( i + 1 ), subpath-> getY ( i + 1 ), &x2, &y2 ); 590 state-> transform ( subpath-> getX ( i + 1 ), subpath-> getY ( i + 1 ), &x2, &y2 );
591 state-> transform ( subpath-> getX ( i + 2 ), subpath-> getY ( i + 2 ), &x3, &y3 ); 591 state-> transform ( subpath-> getX ( i + 2 ), subpath-> getY ( i + 2 ), &x3, &y3 );
592 592
593 QPointArray tmp; 593 QPointArray tmp;
594 tmp. setPoints ( 4, lrint ( x0 ), lrint ( y0 ), lrint ( x1 ), lrint ( y1 ), 594 tmp. setPoints ( 4, lrint ( x0 ), lrint ( y0 ), lrint ( x1 ), lrint ( y1 ),
595 lrint ( x2 ), lrint ( y2 ), lrint ( x3 ), lrint ( y3 )); 595 lrint ( x2 ), lrint ( y2 ), lrint ( x3 ), lrint ( y3 ));
596 596
597#if QT_VERSION < 300 597#if QT_VERSION < 0x030000
598 tmp = tmp. quadBezier ( ); 598 tmp = tmp. quadBezier ( );
599 599
600 for ( uint loop = 0; loop < tmp. count ( ); loop++ ) { 600 for ( uint loop = 0; loop < tmp. count ( ); loop++ ) {
601 QPoint p = tmp. point ( loop ); 601 QPoint p = tmp. point ( loop );
602 points. putPoints ( points. count ( ), 1, p. x ( ), p. y ( )); 602 points. putPoints ( points. count ( ), 1, p. x ( ), p. y ( ));
603 } 603 }
604#else 604#else
605 tmp = tmp. cubicBezier ( ); 605 tmp = tmp. cubicBezier ( );
606 points. putPoints ( points. count ( ), tmp. count ( ), tmp ); 606 points. putPoints ( points. count ( ), tmp. count ( ), tmp );
607#endif 607#endif
608 608
609 i += 3; 609 i += 3;
610 } 610 }
611 else { 611 else {
612 state-> transform ( subpath-> getX ( i ), subpath-> getY ( i ), &x1, &y1 ); 612 state-> transform ( subpath-> getX ( i ), subpath-> getY ( i ), &x1, &y1 );
613 613
614 points. putPoints ( points. count ( ), 1, lrint ( x1 ), lrint ( y1 )); 614 points. putPoints ( points. count ( ), 1, lrint ( x1 ), lrint ( y1 ));
615 ++i; 615 ++i;
616 } 616 }
617 } 617 }
618 return points. count ( ) - oldcnt; 618 return points. count ( ) - oldcnt;
619} 619}
620 620
621 621
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 52419ad..0459caf 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1,57 +1,57 @@
1/* 1/*
2 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> 2 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
3 * Released under the terms of the GNU GPL v2.0. 3 * Released under the terms of the GNU GPL v2.0.
4 */ 4 */
5 5
6#include <qapplication.h> 6#include <qapplication.h>
7#include <qmainwindow.h> 7#include <qmainwindow.h>
8#include <qtoolbar.h> 8#include <qtoolbar.h>
9#include <qvbox.h> 9#include <qvbox.h>
10#include <qsplitter.h> 10#include <qsplitter.h>
11#include <qlistview.h> 11#include <qlistview.h>
12#include <qtextview.h> 12#include <qtextview.h>
13#include <qlineedit.h> 13#include <qlineedit.h>
14#include <qmenubar.h> 14#include <qmenubar.h>
15#include <qmessagebox.h> 15#include <qmessagebox.h>
16#include <qaction.h> 16#include <qaction.h>
17#include <qheader.h> 17#include <qheader.h>
18#include <qfiledialog.h> 18#include <qfiledialog.h>
19#include <qregexp.h> 19#include <qregexp.h>
20#if QT_VERSION >= 300 20#if QT_VERSION >= 0x030000
21#include <qsettings.h> 21#include <qsettings.h>
22#endif 22#endif
23 23
24#include <stdlib.h> 24#include <stdlib.h>
25 25
26#include "lkc.h" 26#include "lkc.h"
27#include "qconf.h" 27#include "qconf.h"
28 28
29#include "qconf.moc" 29#include "qconf.moc"
30#include "images.c" 30#include "images.c"
31 31
32static QApplication *configApp; 32static QApplication *configApp;
33#if QT_VERSION >= 300 33#if QT_VERSION >= 0x030000
34static QSettings *configSettings; 34static QSettings *configSettings;
35#endif 35#endif
36 36
37/* 37/*
38 * update all the children of a menu entry 38 * update all the children of a menu entry
39 * removes/adds the entries from the parent widget as necessary 39 * removes/adds the entries from the parent widget as necessary
40 * 40 *
41 * parent: either the menu list widget or a menu entry widget 41 * parent: either the menu list widget or a menu entry widget
42 * menu: entry to be updated 42 * menu: entry to be updated
43 */ 43 */
44template <class P> 44template <class P>
45void ConfigList::updateMenuList(P* parent, struct menu* menu) 45void ConfigList::updateMenuList(P* parent, struct menu* menu)
46{ 46{
47 struct menu* child; 47 struct menu* child;
48 ConfigItem* item; 48 ConfigItem* item;
49 ConfigItem* last; 49 ConfigItem* last;
50 bool visible; 50 bool visible;
51 enum prop_type type; 51 enum prop_type type;
52 52
53 if (!menu) { 53 if (!menu) {
54 while ((item = parent->firstChild())) 54 while ((item = parent->firstChild()))
55 delete item; 55 delete item;
56 return; 56 return;
57 } 57 }
@@ -81,49 +81,49 @@ void ConfigList::updateMenuList(P* parent, struct menu* menu)
81 if (!item || item->menu != child) 81 if (!item || item->menu != child)
82 item = new ConfigItem(parent, last, child, visible); 82 item = new ConfigItem(parent, last, child, visible);
83 else 83 else
84 item->testUpdateMenu(visible); 84 item->testUpdateMenu(visible);
85 85
86 if (mode == fullMode || mode == menuMode || type != P_MENU) 86 if (mode == fullMode || mode == menuMode || type != P_MENU)
87 updateMenuList(item, child); 87 updateMenuList(item, child);
88 else 88 else
89 updateMenuList(item, 0); 89 updateMenuList(item, 0);
90 last = item; 90 last = item;
91 continue; 91 continue;
92 } 92 }
93 hide: 93 hide:
94 if (item && item->menu == child) { 94 if (item && item->menu == child) {
95 last = parent->firstChild(); 95 last = parent->firstChild();
96 if (last == item) 96 if (last == item)
97 last = 0; 97 last = 0;
98 else while (last->nextSibling() != item) 98 else while (last->nextSibling() != item)
99 last = last->nextSibling(); 99 last = last->nextSibling();
100 delete item; 100 delete item;
101 } 101 }
102 } 102 }
103} 103}
104 104
105#if QT_VERSION >= 300 105#if QT_VERSION >= 0x030000
106/* 106/*
107 * set the new data 107 * set the new data
108 * TODO check the value 108 * TODO check the value
109 */ 109 */
110void ConfigItem::okRename(int col) 110void ConfigItem::okRename(int col)
111{ 111{
112 Parent::okRename(col); 112 Parent::okRename(col);
113 sym_set_string_value(menu->sym, text(dataColIdx).latin1()); 113 sym_set_string_value(menu->sym, text(dataColIdx).latin1());
114} 114}
115#endif 115#endif
116 116
117/* 117/*
118 * update the displayed of a menu entry 118 * update the displayed of a menu entry
119 */ 119 */
120void ConfigItem::updateMenu(void) 120void ConfigItem::updateMenu(void)
121{ 121{
122 ConfigList* list; 122 ConfigList* list;
123 struct symbol* sym; 123 struct symbol* sym;
124 struct property *prop; 124 struct property *prop;
125 QString prompt; 125 QString prompt;
126 int type; 126 int type;
127 tristate expr; 127 tristate expr;
128 128
129 list = listView(); 129 list = listView();
@@ -194,49 +194,49 @@ void ConfigItem::updateMenu(void)
194 default: 194 default:
195 if (sym_is_choice_value(sym) && type == S_BOOLEAN) 195 if (sym_is_choice_value(sym) && type == S_BOOLEAN)
196 setPixmap(promptColIdx, list->choiceNoPix); 196 setPixmap(promptColIdx, list->choiceNoPix);
197 else 197 else
198 setPixmap(promptColIdx, list->symbolNoPix); 198 setPixmap(promptColIdx, list->symbolNoPix);
199 setText(noColIdx, "N"); 199 setText(noColIdx, "N");
200 ch = 'N'; 200 ch = 'N';
201 break; 201 break;
202 } 202 }
203 if (expr != no) 203 if (expr != no)
204 setText(noColIdx, sym_tristate_within_range(sym, no) ? "_" : 0); 204 setText(noColIdx, sym_tristate_within_range(sym, no) ? "_" : 0);
205 if (expr != mod) 205 if (expr != mod)
206 setText(modColIdx, sym_tristate_within_range(sym, mod) ? "_" : 0); 206 setText(modColIdx, sym_tristate_within_range(sym, mod) ? "_" : 0);
207 if (expr != yes) 207 if (expr != yes)
208 setText(yesColIdx, sym_tristate_within_range(sym, yes) ? "_" : 0); 208 setText(yesColIdx, sym_tristate_within_range(sym, yes) ? "_" : 0);
209 209
210 setText(dataColIdx, QChar(ch)); 210 setText(dataColIdx, QChar(ch));
211 break; 211 break;
212 case S_INT: 212 case S_INT:
213 case S_HEX: 213 case S_HEX:
214 case S_STRING: 214 case S_STRING:
215 const char* data; 215 const char* data;
216 216
217 data = sym_get_string_value(sym); 217 data = sym_get_string_value(sym);
218#if QT_VERSION >= 300 218#if QT_VERSION >= 0x030000
219 int i = list->mapIdx(dataColIdx); 219 int i = list->mapIdx(dataColIdx);
220 if (i >= 0) 220 if (i >= 0)
221 setRenameEnabled(i, TRUE); 221 setRenameEnabled(i, TRUE);
222#endif 222#endif
223 setText(dataColIdx, data); 223 setText(dataColIdx, data);
224 if (type == S_STRING) 224 if (type == S_STRING)
225 prompt.sprintf("%s: %s", prompt.latin1(), data); 225 prompt.sprintf("%s: %s", prompt.latin1(), data);
226 else 226 else
227 prompt.sprintf("(%s) %s", data, prompt.latin1()); 227 prompt.sprintf("(%s) %s", data, prompt.latin1());
228 break; 228 break;
229 } 229 }
230 if (!sym_has_value(sym) && visible) 230 if (!sym_has_value(sym) && visible)
231 prompt += " (NEW)"; 231 prompt += " (NEW)";
232set_prompt: 232set_prompt:
233 setText(promptColIdx, prompt); 233 setText(promptColIdx, prompt);
234} 234}
235 235
236void ConfigItem::testUpdateMenu(bool v) 236void ConfigItem::testUpdateMenu(bool v)
237{ 237{
238 ConfigItem* i; 238 ConfigItem* i;
239 239
240 visible = v; 240 visible = v;
241 if (!menu) 241 if (!menu)
242 return; 242 return;
@@ -469,49 +469,49 @@ void ConfigList::changeValue(ConfigItem* item)
469 if (!sym) { 469 if (!sym) {
470 if (item->menu->list) 470 if (item->menu->list)
471 item->setOpen(!item->isOpen()); 471 item->setOpen(!item->isOpen());
472 return; 472 return;
473 } 473 }
474 474
475 type = sym_get_type(sym); 475 type = sym_get_type(sym);
476 switch (type) { 476 switch (type) {
477 case S_BOOLEAN: 477 case S_BOOLEAN:
478 case S_TRISTATE: 478 case S_TRISTATE:
479 oldexpr = sym_get_tristate_value(sym); 479 oldexpr = sym_get_tristate_value(sym);
480 newexpr = sym_toggle_tristate_value(sym); 480 newexpr = sym_toggle_tristate_value(sym);
481 if (item->menu->list) { 481 if (item->menu->list) {
482 if (oldexpr == newexpr) 482 if (oldexpr == newexpr)
483 item->setOpen(!item->isOpen()); 483 item->setOpen(!item->isOpen());
484 else if (oldexpr == no) 484 else if (oldexpr == no)
485 item->setOpen(TRUE); 485 item->setOpen(TRUE);
486 } 486 }
487 if (oldexpr != newexpr) 487 if (oldexpr != newexpr)
488 parent()->updateList(item); 488 parent()->updateList(item);
489 break; 489 break;
490 case S_INT: 490 case S_INT:
491 case S_HEX: 491 case S_HEX:
492 case S_STRING: 492 case S_STRING:
493#if QT_VERSION >= 300 493#if QT_VERSION >= 0x030000
494 if (colMap[dataColIdx] >= 0) 494 if (colMap[dataColIdx] >= 0)
495 item->startRename(colMap[dataColIdx]); 495 item->startRename(colMap[dataColIdx]);
496 else 496 else
497#endif 497#endif
498 parent()->lineEdit->show(item); 498 parent()->lineEdit->show(item);
499 break; 499 break;
500 } 500 }
501} 501}
502 502
503void ConfigList::setRootMenu(struct menu *menu) 503void ConfigList::setRootMenu(struct menu *menu)
504{ 504{
505 enum prop_type type; 505 enum prop_type type;
506 506
507 if (rootEntry == menu) 507 if (rootEntry == menu)
508 return; 508 return;
509 type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN; 509 type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN;
510 if (type != P_MENU) 510 if (type != P_MENU)
511 return; 511 return;
512 updateMenuList(this, 0); 512 updateMenuList(this, 0);
513 rootEntry = menu; 513 rootEntry = menu;
514 updateListAll(); 514 updateListAll();
515 setSelected(currentItem(), hasFocus()); 515 setSelected(currentItem(), hasFocus());
516} 516}
517 517
@@ -730,49 +730,49 @@ void ConfigView::updateList(ConfigItem* item)
730 v->list->updateList(item); 730 v->list->updateList(item);
731} 731}
732 732
733void ConfigView::updateListAll(void) 733void ConfigView::updateListAll(void)
734{ 734{
735 ConfigView* v; 735 ConfigView* v;
736 736
737 for (v = viewList; v; v = v->nextView) 737 for (v = viewList; v; v = v->nextView)
738 v->list->updateListAll(); 738 v->list->updateListAll();
739} 739}
740 740
741/* 741/*
742 * Construct the complete config widget 742 * Construct the complete config widget
743 */ 743 */
744ConfigMainWindow::ConfigMainWindow(void) 744ConfigMainWindow::ConfigMainWindow(void)
745{ 745{
746 QMenuBar* menu; 746 QMenuBar* menu;
747 QSplitter* split1; 747 QSplitter* split1;
748 QSplitter* split2; 748 QSplitter* split2;
749 bool ok; 749 bool ok;
750 int x, y, width, height; 750 int x, y, width, height;
751 751
752 QWidget *d = configApp->desktop(); 752 QWidget *d = configApp->desktop();
753 753
754#if QT_VERSION >= 300 754#if QT_VERSION >= 0x030000
755 width = configSettings->readNumEntry("/kconfig/qconf/window width", d->width() - 64); 755 width = configSettings->readNumEntry("/kconfig/qconf/window width", d->width() - 64);
756 height = configSettings->readNumEntry("/kconfig/qconf/window height", d->height() - 64); 756 height = configSettings->readNumEntry("/kconfig/qconf/window height", d->height() - 64);
757 resize(width, height); 757 resize(width, height);
758 x = configSettings->readNumEntry("/kconfig/qconf/window x", 0, &ok); 758 x = configSettings->readNumEntry("/kconfig/qconf/window x", 0, &ok);
759 if (ok) 759 if (ok)
760 y = configSettings->readNumEntry("/kconfig/qconf/window y", 0, &ok); 760 y = configSettings->readNumEntry("/kconfig/qconf/window y", 0, &ok);
761 if (ok) 761 if (ok)
762 move(x, y); 762 move(x, y);
763#else 763#else
764 width = d->width() - 64; 764 width = d->width() - 64;
765 height = d->height() - 64; 765 height = d->height() - 64;
766 resize(width, height); 766 resize(width, height);
767#endif 767#endif
768 768
769 showDebug = false; 769 showDebug = false;
770 770
771 split1 = new QSplitter(this); 771 split1 = new QSplitter(this);
772 split1->setOrientation(QSplitter::Horizontal); 772 split1->setOrientation(QSplitter::Horizontal);
773 setCentralWidget(split1); 773 setCentralWidget(split1);
774 774
775 menuView = new ConfigView(split1, this); 775 menuView = new ConfigView(split1, this);
776 menuList = menuView->list; 776 menuList = menuView->list;
777 777
778 split2 = new QSplitter(split1); 778 split2 = new QSplitter(split1);
@@ -1245,60 +1245,60 @@ void fixup_rootmenu(struct menu *menu)
1245 } else if (!menu_cnt) 1245 } else if (!menu_cnt)
1246 fixup_rootmenu(child); 1246 fixup_rootmenu(child);
1247 } 1247 }
1248} 1248}
1249 1249
1250static const char *progname; 1250static const char *progname;
1251 1251
1252static void usage(void) 1252static void usage(void)
1253{ 1253{
1254 printf("%s <config>\n", progname); 1254 printf("%s <config>\n", progname);
1255 exit(0); 1255 exit(0);
1256} 1256}
1257 1257
1258int main(int ac, char** av) 1258int main(int ac, char** av)
1259{ 1259{
1260 ConfigMainWindow* v; 1260 ConfigMainWindow* v;
1261 const char *name; 1261 const char *name;
1262 1262
1263#ifndef LKC_DIRECT_LINK 1263#ifndef LKC_DIRECT_LINK
1264 kconfig_load(); 1264 kconfig_load();
1265#endif 1265#endif
1266 1266
1267 progname = av[0]; 1267 progname = av[0];
1268 configApp = new QApplication(ac, av); 1268 configApp = new QApplication(ac, av);
1269#if QT_VERSION >= 300 1269#if QT_VERSION >= 0x030000
1270 configSettings = new QSettings; 1270 configSettings = new QSettings;
1271#endif 1271#endif
1272 if (ac > 1 && av[1][0] == '-') { 1272 if (ac > 1 && av[1][0] == '-') {
1273 switch (av[1][1]) { 1273 switch (av[1][1]) {
1274 case 'h': 1274 case 'h':
1275 case '?': 1275 case '?':
1276 usage(); 1276 usage();
1277 } 1277 }
1278 name = av[2]; 1278 name = av[2];
1279 } else 1279 } else
1280 name = av[1]; 1280 name = av[1];
1281 if (!name) 1281 if (!name)
1282 usage(); 1282 usage();
1283 1283
1284 conf_parse(name); 1284 conf_parse(name);
1285 fixup_rootmenu(&rootmenu); 1285 fixup_rootmenu(&rootmenu);
1286 conf_read(NULL); 1286 conf_read(NULL);
1287 //zconfdump(stdout); 1287 //zconfdump(stdout);
1288 1288
1289 v = new ConfigMainWindow(); 1289 v = new ConfigMainWindow();
1290 1290
1291 //zconfdump(stdout); 1291 //zconfdump(stdout);
1292 v->show(); 1292 v->show();
1293 configApp->connect(configApp, SIGNAL(lastWindowClosed()), SLOT(quit())); 1293 configApp->connect(configApp, SIGNAL(lastWindowClosed()), SLOT(quit()));
1294 configApp->exec(); 1294 configApp->exec();
1295 1295
1296#if QT_VERSION >= 300 1296#if QT_VERSION >= 0x030000
1297 configSettings->writeEntry("/kconfig/qconf/window x", v->pos().x()); 1297 configSettings->writeEntry("/kconfig/qconf/window x", v->pos().x());
1298 configSettings->writeEntry("/kconfig/qconf/window y", v->pos().y()); 1298 configSettings->writeEntry("/kconfig/qconf/window y", v->pos().y());
1299 configSettings->writeEntry("/kconfig/qconf/window width", v->size().width()); 1299 configSettings->writeEntry("/kconfig/qconf/window width", v->size().width());
1300 configSettings->writeEntry("/kconfig/qconf/window height", v->size().height()); 1300 configSettings->writeEntry("/kconfig/qconf/window height", v->size().height());
1301 delete configSettings; 1301 delete configSettings;
1302#endif 1302#endif
1303 return 0; 1303 return 0;
1304} 1304}
diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index c548884..dee5254 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -120,49 +120,49 @@ private:
120 int colMap[colNr]; 120 int colMap[colNr];
121 int colRevMap[colNr]; 121 int colRevMap[colNr];
122}; 122};
123 123
124class ConfigItem : public QListViewItem { 124class ConfigItem : public QListViewItem {
125 typedef class QListViewItem Parent; 125 typedef class QListViewItem Parent;
126public: 126public:
127 ConfigItem(QListView *parent, ConfigItem *after, struct menu *m, bool v) 127 ConfigItem(QListView *parent, ConfigItem *after, struct menu *m, bool v)
128 : Parent(parent, after), menu(m), visible(v), goParent(false) 128 : Parent(parent, after), menu(m), visible(v), goParent(false)
129 { 129 {
130 init(); 130 init();
131 } 131 }
132 ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v) 132 ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v)
133 : Parent(parent, after), menu(m), visible(v), goParent(false) 133 : Parent(parent, after), menu(m), visible(v), goParent(false)
134 { 134 {
135 init(); 135 init();
136 } 136 }
137 ConfigItem(QListView *parent, ConfigItem *after, bool v) 137 ConfigItem(QListView *parent, ConfigItem *after, bool v)
138 : Parent(parent, after), menu(0), visible(v), goParent(true) 138 : Parent(parent, after), menu(0), visible(v), goParent(true)
139 { 139 {
140 init(); 140 init();
141 } 141 }
142 ~ConfigItem(void); 142 ~ConfigItem(void);
143 void init(void); 143 void init(void);
144#if QT_VERSION >= 300 144#if QT_VERSION >= 0x030000
145 void okRename(int col); 145 void okRename(int col);
146#endif 146#endif
147 void updateMenu(void); 147 void updateMenu(void);
148 void testUpdateMenu(bool v); 148 void testUpdateMenu(bool v);
149 ConfigList* listView() const 149 ConfigList* listView() const
150 { 150 {
151 return (ConfigList*)Parent::listView(); 151 return (ConfigList*)Parent::listView();
152 } 152 }
153 ConfigItem* firstChild() const 153 ConfigItem* firstChild() const
154 { 154 {
155 return (ConfigItem *)Parent::firstChild(); 155 return (ConfigItem *)Parent::firstChild();
156 } 156 }
157 ConfigItem* nextSibling() const 157 ConfigItem* nextSibling() const
158 { 158 {
159 return (ConfigItem *)Parent::nextSibling(); 159 return (ConfigItem *)Parent::nextSibling();
160 } 160 }
161 void setText(colIdx idx, const QString& text) 161 void setText(colIdx idx, const QString& text)
162 { 162 {
163 Parent::setText(listView()->mapIdx(idx), text); 163 Parent::setText(listView()->mapIdx(idx), text);
164 } 164 }
165 QString text(colIdx idx) const 165 QString text(colIdx idx) const
166 { 166 {
167 return Parent::text(listView()->mapIdx(idx)); 167 return Parent::text(listView()->mapIdx(idx));
168 } 168 }