summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (more/less context) (show whitespace changes)
-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
12 files changed, 17 insertions, 17 deletions
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
@@ -219,97 +219,97 @@ static QChar vt100extended(QChar c)
case 0x240d : return 5;
case 0x240a : return 6;
case 0x00b0 : return 7;
case 0x00b1 : return 8;
case 0x2424 : return 9;
case 0x240b : return 10;
case 0x2518 : return 11;
case 0x2510 : return 12;
case 0x250c : return 13;
case 0x2514 : return 14;
case 0x253c : return 15;
case 0xf800 : return 16;
case 0xf801 : return 17;
case 0x2500 : return 18;
case 0xf803 : return 19;
case 0xf804 : return 20;
case 0x251c : return 21;
case 0x2524 : return 22;
case 0x2534 : return 23;
case 0x252c : return 24;
case 0x2502 : return 25;
case 0x2264 : return 26;
case 0x2265 : return 27;
case 0x03c0 : return 28;
case 0x2260 : return 29;
case 0x00a3 : return 30;
case 0x00b7 : return 31;
}
return c;
}
static QChar identicalMap(QChar c)
{
return c;
}
void TEWidget::fontChange(const QFont &)
{
QFontMetrics fm(font());
font_h = fm.height();
font_w = fm.maxWidth();
font_a = fm.ascent();
//printf("font_h: %d\n",font_h);
//printf("font_w: %d\n",font_w);
//printf("font_a: %d\n",font_a);
//printf("charset: %s\n",QFont::encodingName(font().charSet()).ascii());
//printf("rawname: %s\n",font().rawName().ascii());
fontMap =
-#if QT_VERSION < 300
+#if QT_VERSION < 0x030000
strcmp(QFont::encodingName(font().charSet()).ascii(),"iso10646")
? vt100extended
:
#endif
identicalMap;
propagateSize();
update();
}
void TEWidget::setVTFont(const QFont& f)
{
QFrame::setFont(f);
}
QFont TEWidget::getVTFont() {
return font();
}
void TEWidget::setFont(const QFont &)
{
// ignore font change request if not coming from konsole itself
}
/* ------------------------------------------------------------------------- */
/* */
/* Constructor / Destructor */
/* */
/* ----------------------------------------------------------------------- */
TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name)
{
#ifndef QT_NO_CLIPBOARD
cb = QApplication::clipboard();
QObject::connect( (QObject*)cb, SIGNAL(dataChanged()),
this, SLOT(onClearSelection()) );
#endif
scrollbar = new QScrollBar( this );
scrollbar->setCursor( arrowCursor );
connect(scrollbar, SIGNAL(valueChanged(int)), this, SLOT(scrollChanged(int)));
hscrollbar = new QScrollBar( Qt::Horizontal, this );
hscrollbar->setCursor( arrowCursor );
connect(hscrollbar, SIGNAL(valueChanged(int)), this, SLOT(hscrollChanged(int)));
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
@@ -1,89 +1,89 @@
/****************************************************************************
** $Id$
**
** Implementation of QRegExp class
**
** Created : 950126
**
** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
**
** This file is part of the tools module of the Qt GUI Toolkit.
**
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech AS of Norway and appearing in the file
** LICENSE.QPL included in the packaging of this file.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
** licenses may use this file in accordance with the Qt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
** information about Qt Commercial License Agreements.
** See http://www.trolltech.com/qpl/ for QPL licensing information.
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
-#if QT_VERSION >=300
+#if QT_VERSION >= 0x030000
#error QRegExp3 is now in QT 3 use QRegExp instead
#endif
-#if QT_VERSION < 300
+#if QT_VERSION < 0x030000
#include "./qregexp3.h"
#else
#include "qregexp.h"
#endif
/* OPIE */
#include <opie2/odebug.h>
/* QT */
#include <qarray.h>
#include <qbitarray.h>
#include <qcache.h>
#include <qintdict.h>
#include <qmap.h>
#include <qstring.h>
#include <qtl.h>
#include <qvector.h>
/* STD */
#include <limits.h>
/*
WARNING! Be sure to read qregexp.tex before modifying this file.
*/
/*!
\class QRegExp3 qregexp.h
\brief The QRegExp class provides pattern matching using regular expressions.
\ingroup tools
\ingroup misc
\ingroup shared
Regular expressions, "regexps", provide a way to find patterns
within text. This is useful in many contexts, for example:
<ol>
<li>\e Validation. A regexp can be used to check whether a piece of
text meets some criteria, e.g. is an integer or contains no
whitespace.
<li>\e Searching. Regexps provide a much more powerful means of
searching text than simple string matching does. For example we can
create a regexp which says "find one of the words 'mail', 'letter'
or 'correspondence' but not any of the words 'email', 'mailman'
'mailer', 'letterbox' etc."
<li><em>Search and Replace.</em> A regexp can be used to replace a
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
@@ -1,111 +1,111 @@
/****************************************************************************
** $Id$
**
** Definition of QRegExp class
**
** Created : 950126
**
** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
**
** This file is part of the tools module of the Qt GUI Toolkit.
**
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech AS of Norway and appearing in the file
** LICENSE.QPL included in the packaging of this file.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
** licenses may use this file in accordance with the Qt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
** information about Qt Commercial License Agreements.
** See http://www.trolltech.com/qpl/ for QPL licensing information.
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#ifndef QREGEXP3_H
#define QREGEXP3_H
#ifndef QT_H
#include "qstringlist.h"
#endif // QT_H
-#if QT_VERSION >=300
+#if QT_VERSION >= 0x030000
#include <qregexp.h>
#else
class QRegExpEngine;
struct QRegExpPrivate;
class Q_EXPORT QRegExp3
{
public:
QRegExp3();
QRegExp3( const QString& pattern, bool caseSensitive = TRUE,
bool wildcard = FALSE );
QRegExp3( const QRegExp3& rx );
~QRegExp3();
QRegExp3& operator=( const QRegExp3& rx );
bool operator==( const QRegExp3& rx ) const;
bool operator!=( const QRegExp3& rx ) const { return !operator==( rx ); }
bool isEmpty() const;
bool isValid() const;
QString pattern() const;
void setPattern( const QString& pattern );
bool caseSensitive() const;
void setCaseSensitive( bool sensitive );
#ifndef QT_NO_REGEXP_WILDCARD
bool wildcard() const;
void setWildcard( bool wildcard );
#endif
bool minimal() const;
void setMinimal( bool minimal );
bool exactMatch( const QString& str );
bool exactMatch( const QString& str ) const;
#ifndef QT_NO_COMPAT
int match( const QString& str, int index, int *len = 0,
bool indexIsStart = TRUE );
#endif
int search( const QString& str, int start = 0 );
int search( const QString& str, int start = 0 ) const;
// QChar versions
#ifdef QCHAR_SUPPORT
int search(const QChar *str,int start=0);
int search(const QChar *str,int start=0) const;
int searchRev(const QChar *str,int start=-1);
int searchRev(const QChar *str,int start=-1) const ;
bool exactMatch(const QChar *str);
bool exactMatch(const QChar *str) const;
// end QChar versions
#endif
int searchRev( const QString& str, int start = -1 );
int searchRev( const QString& str, int start = -1 ) const;
int matchedLength();
#ifndef QT_NO_REGEXP_CAPTURE
QStringList capturedTexts();
QString cap( int nth = 0 );
int pos( int nth = 0 );
#endif
private:
void compile( bool caseSensitive );
QRegExpEngine *eng;
QRegExpPrivate *priv;
};
-#endif // QT_VERSION >= 300
+#endif // QT_VERSION >= 0x030000
#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
@@ -7,63 +7,63 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include "zsafe.h"
#include "shadedlistitem.h"
ShadedListItem::ShadedListItem(int index, QListViewItem *parent)
: QListViewItem(parent)
{
oddRow = (index % 2 != 0);
}
ShadedListItem::ShadedListItem(int index, QListView *parent)
: QListViewItem(parent), lv(parent)
{
oddRow = (index % 2 != 0);
}
ShadedListItem::ShadedListItem(int index, QListView *parent, QListViewItem *after)
: QListViewItem(parent, after), lv(parent)
{
oddRow = (index % 2 != 0);
}
ShadedListItem::ShadedListItem(int index, QListView *parent, QString label1, QString label2, QString label3)
: QListViewItem(parent, label1, label2, label3), lv(parent)
{
oddRow = (index % 2 != 0);
}
ShadedListItem::ShadedListItem(int index, QListView *parent, QListViewItem *after, QString label1, QString label2, QString label3)
: QListViewItem(parent, after, label1, label2, label3), lv(parent)
{
oddRow = (index % 2 != 0);
}
ShadedListItem::~ShadedListItem()
{
}
void ShadedListItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
{
QColorGroup colors(cg);
-#if QT_VERSION >=300
+#if QT_VERSION >= 0x030000
const QColorGroup::ColorRole crole = QColorGroup::Base;
// const QWidget::BackgroundMode bgmode = lv->viewport()->backgroundMode();
// const QColorGroup::ColorRole crole = QPalette::backgroundRoleFromMode(bgmode);
#else
const QColorGroup::ColorRole crole = QColorGroup::Base;
#endif
if (oddRow) {
colors.setColor(crole, *ZSafe::oddRowColor);
}
else {
colors.setColor(crole, *ZSafe::evenRowColor);
}
QListViewItem::paintCell(p, colors, column, width, alignment);
}
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
@@ -327,152 +327,152 @@ void WellenreiterConfigWindow::performAction( const QString& type,
case 0: /* Ignore */ return;
case 1: /* Play Alarm */ ODevice::inst()->playAlarmSound(); return;
case 2: /* Play Click */ ODevice::inst()->playTouchSound(); return;
case 3: /* Blink LED */ break; //FIXME: Implement this
case 4: /* Run Script */
{
/**
*
* Script Substitution Information:
*
* $SSID = SSID
* $MAC = MAC
* $WEP = Wep
* $CHAN = Channel
*
**/
script = script.replace( QRegExp( "$SSID" ), essid );
script = script.replace( QRegExp( "$MAC" ), mac );
script = script.replace( QRegExp( "$WEP" ), wep ? QString( "true" ) : QString( "false" ) );
script = script.replace( QRegExp( "$CHAN" ), QString::number( channel ) );
odebug << "going to call script '" << script << "'" << oendl;
::system( script );
odebug << "script returned." << oendl;
return;
}
default: assert( false );
}
}
void WellenreiterConfigWindow::load()
{
#ifdef Q_WS_X11
#warning Persistent Configuration not yet implemented for standalone X11 build
performAutodetection();
#else
odebug << "loading configuration settings..." << oendl;
/* This is dumb monkey typing stuff... We _need_ to do this automatically! */
OConfig* c = oApp->config();
c->setGroup( "Interface" );
QString interface = c->readEntry( "name", "<none>" );
if ( interface != "<none>" )
{
-#if QT_VERSION < 300
+#if QT_VERSION < 0x030000
interfaceName->insertItem( interface, 0 );
interfaceName->setCurrentItem( 0 );
#else
interfaceName->setCurrentText( interface );
#endif
QString device = c->readEntry( "type", "<select>" );
-#if QT_VERSION < 300
+#if QT_VERSION < 0x030000
for ( int i = 0; i < deviceType->count(); ++i )
{
if ( deviceType->text( i ) == device )
{
deviceType->setCurrentItem( i );
break;
}
}
#else
deviceType->setCurrentText( device );
#endif
}
else
{
performAutodetection();
}
prismHeader->setChecked( c->readBoolEntry( "prism", false ) );
hopChannels->setChecked( c->readBoolEntry( "hop", true ) );
hopInterval->setValue( c->readNumEntry( "interval", 250 ) );
adaptiveHopping->setChecked( c->readBoolEntry( "adaptive", true ) );
c->setGroup( "Capture" );
writeCaptureFile->setChecked( c->readBoolEntry( "writeCaptureFile", true ) );
captureFileName->setEnabled( writeCaptureFile->isChecked() );
getCaptureFileName->setEnabled( writeCaptureFile->isChecked() );
parsePackets->setEnabled( writeCaptureFile->isChecked() );
captureFileName->setText( c->readEntry( "filename", "/tmp/capture" ) );
hexViewBufferUnlimited->setChecked( c->readBoolEntry( "hexViewBufferUnlimited", true ) );
hexViewBufferLimited->setChecked( !c->readBoolEntry( "hexViewBufferUnlimited", true ) );
hexViewBufferSize->setValue( c->readNumEntry( "hexViewBufferSize", 2000 ) );
c->setGroup( "UI" );
lookupVendor->setChecked( c->readBoolEntry( "lookupVendor", true ) );
openTree->setChecked( c->readBoolEntry( "openTree", true ) );
disablePM->setChecked( c->readBoolEntry( "disablePM", true ) );
newNetworkAction->setCurrentItem( c->readNumEntry( "newNetworkAction", 1 ) ); // Default: Play Alarm
newNetworkScript->setText( c->readEntry( "newNetworkScript", "" ) );
newClientAction->setCurrentItem( c->readNumEntry( "newClientAction", 2 ) ); // Default: Play Click
newClientScript->setText( c->readEntry( "newClientScript", "" ) );
newStationAction->setCurrentItem( c->readNumEntry( "newStationAction", 2 ) ); // Default: Play Click
newStationScript->setText( c->readEntry( "newStationScript", "" ) );
synchronizeActionsAndScripts(); // needed for showing/hiding the script QLineEdit on demand
c->setGroup( "GPS" );
enableGPS->setChecked( c->readBoolEntry( "use", false ) );
-#if QT_VERSION < 300
+#if QT_VERSION < 0x030000
gpsdHost->insertItem( c->readEntry( "host", "localhost" ), 0 );
gpsdHost->setCurrentItem( 0 );
#else
gpsdHost->setCurrentText( c->readEntry( "host", "localhost" ) );
#endif
gpsdPort->setValue( c->readNumEntry( "port", 2947 ) );
startGPS->setChecked( c->readBoolEntry( "start", false ) );
commandGPS->setText( c->readEntry( "command", "gpsd -p /dev/ttyS3 -s 57600" ) );
#endif
}
void WellenreiterConfigWindow::save()
{
#ifdef Q_WS_X11
#warning Persistent Configuration not yet implemented for standalone X11 build
#else
odebug << "saving configuration settings..." << oendl;
/* This is dumb monkey typing stuff... We _need_ to do this automatically! */
OConfig* c = oApp->config();
c->setGroup( "Interface" );
c->writeEntry( "name", interfaceName->currentText() );
c->writeEntry( "type", deviceType->currentText() );
c->writeEntry( "prism", prismHeader->isChecked() );
c->writeEntry( "hop", hopChannels->isChecked() );
c->writeEntry( "interval", hopInterval->value() );
c->writeEntry( "adaptive", adaptiveHopping->isChecked() );
c->setGroup( "Capture" );
c->writeEntry( "writeCaptureFile", writeCaptureFile->isChecked() );
c->writeEntry( "filename", captureFileName->text() );
c->writeEntry( "hexViewBufferUnlimited", hexViewBufferUnlimited->isChecked() );
c->writeEntry( "hexViewBufferSize", hexViewBufferSize->value() );
c->setGroup( "UI" );
c->writeEntry( "lookupVendor", lookupVendor->isChecked() );
c->writeEntry( "openTree", openTree->isChecked() );
c->writeEntry( "disablePM", disablePM->isChecked() );
c->writeEntry( "newNetworkAction", newNetworkAction->currentItem() );
c->writeEntry( "newNetworkScript", newNetworkScript->text() );
c->writeEntry( "newClientAction", newClientAction->currentItem() );
c->writeEntry( "newClientScript", newClientScript->text() );
c->writeEntry( "newStationAction", newStationAction->currentItem() );
c->writeEntry( "newStationScript", newStationScript->text() );
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
@@ -18,164 +18,164 @@
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
..}^=.=       =       ; Public License for more details.
++=   -.     .`     .:
 :     =  ...= . :.=- You should have received a copy of the GNU
 -.   .:....=;==+<; General Public License along with this file;
  -_. . .   )=.  = see the file COPYING. If not, write to the
    --        :-=` Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "appearance.h"
#include "editScheme.h"
#include "stylelistitem.h"
#include "decolistitem.h"
#include "colorlistitem.h"
#include "exceptlistitem.h"
#include "sample.h"
/* OPIE */
#include <opie2/odevice.h>
#include <opie2/ofiledialog.h>
#include <opie2/otabwidget.h>
#include <opie2/odebug.h>
#include <qpe/config.h>
#include <qpe/global.h>
#include <qpe/qpeapplication.h>
#include <qpe/qpemessagebox.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/qpestyle.h>
#include <qpe/lightstyle.h>
#include <qpe/styleinterface.h>
/* QT */
#include <qbuttongroup.h>
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qdialog.h>
#include <qdir.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qlistbox.h>
#include <qmessagebox.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
#include <qstylefactory.h>
#endif
#include <qtoolbutton.h>
#include <qwindowsstyle.h>
#include <qlistview.h>
#include <qheader.h>
#include <qvbox.h>
#include <qwhatsthis.h>
using namespace Opie;
using namespace Opie::Ui;
using namespace Opie::Core;
class DefaultWindowDecoration : public WindowDecorationInterface
{
public:
DefaultWindowDecoration() : ref(0) {}
QString name() const
{
return "Default";
}
QPixmap icon() const
{
return QPixmap();
}
QRESULT queryInterface( const QUuid &uuid, QUnknownInterface **iface )
{
*iface = 0;
if ( uuid == IID_QUnknown )
*iface = this;
else if ( uuid == IID_WindowDecoration )
*iface = this;
if ( *iface )
(*iface)->addRef();
return QS_OK;
}
Q_REFCOUNT
private:
ulong ref;
};
QWidget *Appearance::createStyleTab ( QWidget *parent, Config &cfg )
{
QWidget* tab = new QWidget( parent, "StyleTab" );
QVBoxLayout* vertLayout = new QVBoxLayout( tab, 3, 3 );
m_style_list = new QListBox( tab, "m_style_list" );
vertLayout->addWidget( m_style_list );
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." ) );
m_style_settings = new QPushButton ( tr( "Settings..." ), tab );
connect ( m_style_settings, SIGNAL( clicked()), this, SLOT( styleSettingsClicked()));
vertLayout-> addWidget ( m_style_settings );
QWhatsThis::add( m_style_settings, tr( "Click here to configure the currently selected style.\n\nNote: This option is not available for all styles." ) );
QString s = cfg. readEntry ( "Style", "Light" );
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
m_style_list->insertStringList(QStyleFactory::styles());
#else
m_style_list-> insertItem ( new StyleListItem ( "Windows", new QWindowsStyle ( )));
m_style_list-> insertItem ( new StyleListItem ( "Light", new LightStyle ( )));
m_style_list-> insertItem ( new StyleListItem ( "QPE", new QPEStyle ( )));
#endif
{
QString path = QPEApplication::qpeDir ( );
path.append( "/plugins/styles/" );
QStringList sl = QDir ( path, "lib*.so" ). entryList ( );
for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it )
{
QString libstr = path;
libstr.append( "/" );
libstr.append( *it );
QLibrary *lib = new QLibrary ( libstr );
StyleInterface *iface;
if (( lib-> queryInterface ( IID_Style, (QUnknownInterface **) &iface ) == QS_OK ) && iface )
{
StyleListItem *slit = new StyleListItem ( lib, iface );
m_style_list-> insertItem ( slit );
if ( slit-> key ( ) == s )
m_style_list-> setCurrentItem ( slit );
}
else
delete lib;
}
}
m_original_style = m_style_list-> currentItem ( );
styleClicked ( m_original_style );
connect( m_style_list, SIGNAL( highlighted(int) ), this, SLOT( styleClicked(int) ) );
return tab;
}
QWidget *Appearance::createDecoTab ( QWidget *parent, Config &cfg )
{
QWidget* tab = new QWidget( parent, "DecoTab" );
QVBoxLayout* vertLayout = new QVBoxLayout( tab, 3, 3 );
m_deco_list = new QListBox( tab, "m_deco_list" );
vertLayout->addWidget( m_deco_list );
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
@@ -1,94 +1,94 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
** This file is part of Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "doctab.h"
#include <qpe/global.h>
#include <qpe/fontmanager.h>
#include <qpe/config.h>
#include <qpe/applnk.h>
#include <qpe/qpedialog.h>
#include <qpe/qpeapplication.h>
#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
#include <qpe/qcopenvelope_qws.h>
#endif
#include <qlabel.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qtabwidget.h>
#include <qslider.h>
#include <qfile.h>
#include <qtextstream.h>
#include <qdatastream.h>
#include <qmessagebox.h>
#include <qcombobox.h>
#include <qspinbox.h>
#include <qlistbox.h>
#include <qdir.h>
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
#include <qstylefactory.h>
#endif
#include <stdlib.h>
DocTabSettings::DocTabSettings( QWidget* parent, const char* name, WFlags fl )
: DocTabSettingsBase( parent, name, TRUE, fl )
{
dl = new QPEDialogListener(this);
reset();
}
DocTabSettings::~DocTabSettings()
{}
void DocTabSettings::accept()
{
applyDocTab();
QDialog::accept();
}
void DocTabSettings::applyDocTab()
{
Config cfg( "Launcher" );
cfg.setGroup( "DocTab" );
cfg.writeEntry( "Enable", yes->isChecked() );
cfg.write();
}
void DocTabSettings::reject()
{
reset();
QDialog::reject();
}
void DocTabSettings::reset()
{
}
QString DocTabSettings::actualDocTab;
void DocTabSettings::done(int r)
{
QDialog::done(r);
close();
}
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
@@ -1,94 +1,94 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
** This file is part of Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "settings.h"
#include <qpe/global.h>
#include <qpe/fontmanager.h>
#include <qpe/config.h>
#include <qpe/applnk.h>
#include <qpe/qpedialog.h>
#include <qpe/qpeapplication.h>
#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
#include <qpe/qcopenvelope_qws.h>
#endif
#include <qlabel.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qtabwidget.h>
#include <qslider.h>
#include <qfile.h>
#include <qtextstream.h>
#include <qdatastream.h>
#include <qmessagebox.h>
#include <qcombobox.h>
#include <qspinbox.h>
#include <qlistbox.h>
#include <qdir.h>
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
#include <qstylefactory.h>
#endif
#include <stdlib.h>
LanguageSettings::LanguageSettings( QWidget* parent, const char* name, WFlags fl )
: LanguageSettingsBase( parent, name, TRUE, fl )
{
if ( FontManager::hasUnicodeFont() )
languages->setFont(FontManager::unicodeFont(FontManager::Proportional));
QString tfn = QPEApplication::qpeDir() + "i18n/";
QDir langDir = tfn;
QStringList list = langDir.entryList("*", QDir::Dirs );
QStringList::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
QString name = (*it);
QFileInfo desktopFile( tfn + "/" + name + "/.directory" );
if ( desktopFile.exists() ) {
langAvail.append(name);
Config conf( desktopFile.filePath(), Config::File );
QString langName = conf.readEntry( "Name" );
QString ownName = conf.readEntryDirect( "Name[" + name + "]" );
if ( ownName.isEmpty() )
ownName = conf.readEntryDirect( "Name" );
if ( !ownName.isEmpty() && ownName != langName )
langName = langName + " [" + ownName + "]";
languages->insertItem( langName );
}
}
if ( langAvail. find ( "en" ) == -1 ) {
langAvail. prepend ( "" ); // no tr
languages-> insertItem ( QString ( "English [%1] (%2)" /* no tr (!) */ ). arg ( tr ( "English" )). arg ( tr( "default" )), 0 );
}
dl = new QPEDialogListener(this);
reset();
}
LanguageSettings::~LanguageSettings()
{}
void LanguageSettings::accept()
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,53 +1,53 @@
#ifndef NETCONF_MODULE_H
#define NETCONF_MODULE_H
#include <qobject.h>
-#if QT_VERSION < 300
+#if QT_VERSION < 0x030000
#include <qlist.h>
#else
#include <qptrlist.h>
#endif
#include <qmap.h>
#include "interface.h"
class QWidget;
class QTabWidget;
/**
* \brief The basis of all plugins
*
* This is the way to extend networksettings with
* extra functionality.
*
*
* Networksettings in the 1.0 release does not use QCOM
* for activation. You need to provide the following function yourself.
*
* A module needs to provide Name, Images, and methods for
* claiming interfaces. For example you can claim physicla
* interfaces like wlan0, ppp0 or virtual like a VPN
* connection and hide the real ppp device or ethernet device
* behind your VPN plugin.
*
* During start up. The main application searches for network devices
* and then looks for an owner under the plugins for them.
* For example the WLAN Plugin looks if there is a WLAN Extension
* on that interface and then claims it by returning true from isOwner()
*
* \code
* extern "C"
* {
* void* create_plugin() {
* return new WLANModule();
* }
* };
* \endcode
* @see isOwner(Interface*)
*/
class Module : private QObject{
signals:
/**
* Emit this Signal once you change the Interface
* you're operating on
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,41 +1,41 @@
#include "addconnectionimp.h"
#include <qlistview.h>
-#if QT_VERSION < 300
+#if QT_VERSION < 0x030000
#include <qlist.h>
#else
#include <qptrlist.h>
#endif
#include <qlabel.h>
#include <qheader.h>
/**
* Constructor
*/
AddConnectionImp::AddConnectionImp(QWidget *parent, const char *name, WFlags f):AddConnection(parent, name, f){
connect(registeredServicesList, SIGNAL(selectionChanged()), this, SLOT(changed()));
registeredServicesList->header()->hide();
};
/**
* The current item changed, update the discription.
*/
void AddConnectionImp::changed(){
QListViewItem *item = registeredServicesList->currentItem();
if(item)
help->setText(list[item->text(0)]);
}
/**
* Save a copy of newList for the discriptions and append them all to the view
* @param newList the new list of possible interfaces
*/
void AddConnectionImp::addConnections(const QMap<QString, QString> &newList){
list = newList;
QMap<QString, QString>::Iterator it;
for( it = list.begin(); it != list.end(); ++it )
(void)new QListViewItem(registeredServicesList, it.key());
registeredServicesList->setCurrentItem(registeredServicesList->firstChild());
}
// addserviceimp.cpp
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
@@ -1,76 +1,76 @@
#include "mainwindowimp.h"
#include "addconnectionimp.h"
#include "interfaceinformationimp.h"
#include "interfacesetupimp.h"
#include "interfaces.h"
#include "module.h"
/* OPIE */
#include <opie2/odebug.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
#include <qpe/qlibrary.h>
#include <qpe/resource.h>
/* QT */
#include <qpushbutton.h>
#include <qlistbox.h>
#include <qlineedit.h>
#include <qlistview.h>
#include <qheader.h>
#include <qlabel.h>
#include <qtabwidget.h> // in order to disable the profiles tab
#include <qmessagebox.h>
-#if QT_VERSION < 300
+#if QT_VERSION < 0x030000
#include <qlist.h>
#else
#include <qptrlist.h>
#endif
#include <qdir.h>
#include <qfile.h>
#include <qtextstream.h>
#include <qregexp.h>
/* STD */
#include <net/if.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#define DEFAULT_SCHEME "/var/lib/pcmcia/scheme"
#define _PROCNETDEV "/proc/net/dev"
MainWindowImp::MainWindowImp(QWidget *parent, const char *name, WFlags) : MainWindow(parent, name, Qt::WStyle_ContextHelp), advancedUserMode(true), scheme(DEFAULT_SCHEME)
{
connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked()));
connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked()));
connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked()));
connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked()));
//remove tab with no function
tabWidget->removePage( tab );
// Load connections.
// /usr/local/kde/lib/libinterfaces.la
loadModules(QPEApplication::qpeDir() + "plugins/networksettings");
getAllInterfaces();
Interfaces i;
QStringList list = i.getInterfaceList();
QMap<QString, Interface*>::Iterator it;
for ( QStringList::Iterator ni = list.begin(); ni != list.end(); ++ni )
{
/*
* we skipped it in getAllInterfaces now
* we need to ignore it as well
*/
if (m_handledIfaces.contains( *ni) )
{
odebug << "Not up iface handled by module" << oendl;
continue;
}
bool found = false;
for( it = interfaceNames.begin(); it != interfaceNames.end(); ++it )
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
@@ -549,97 +549,97 @@ void QOutputDev::doClip ( GfxState *state, bool winding )
// Transform points in the path and convert curves to line segments.
// Builds a set of subpaths and returns the number of subpaths.
// If <fillHack> is set, close any unclosed subpaths and activate a
// kludge for polygon fills: First, it divides up the subpaths into
// non-overlapping polygons by simply comparing bounding rectangles.
// Then it connects subaths within a single compound polygon to a single
// point so that X can fill the polygon (sort of).
//
int QOutputDev::convertPath ( GfxState *state, QPointArray &points, QArray<int> &lengths )
{
GfxPath *path = state-> getPath ( );
int n = path-> getNumSubpaths ( );
lengths. resize ( n );
// do each subpath
for ( int i = 0; i < n; i++ ) {
// transform the points
lengths [i] = convertSubpath ( state, path-> getSubpath ( i ), points );
}
return n;
}
//
// Transform points in a single subpath and convert curves to line
// segments.
//
int QOutputDev::convertSubpath ( GfxState *state, GfxSubpath *subpath, QPointArray &points )
{
int oldcnt = points. count ( );
fp_t x0, y0, x1, y1, x2, y2, x3, y3;
int m = subpath-> getNumPoints ( );
int i = 0;
while ( i < m ) {
if ( i >= 1 && subpath-> getCurve ( i )) {
state-> transform ( subpath-> getX ( i - 1 ), subpath-> getY ( i - 1 ), &x0, &y0 );
state-> transform ( subpath-> getX ( i ), subpath-> getY ( i ), &x1, &y1 );
state-> transform ( subpath-> getX ( i + 1 ), subpath-> getY ( i + 1 ), &x2, &y2 );
state-> transform ( subpath-> getX ( i + 2 ), subpath-> getY ( i + 2 ), &x3, &y3 );
QPointArray tmp;
tmp. setPoints ( 4, lrint ( x0 ), lrint ( y0 ), lrint ( x1 ), lrint ( y1 ),
lrint ( x2 ), lrint ( y2 ), lrint ( x3 ), lrint ( y3 ));
-#if QT_VERSION < 300
+#if QT_VERSION < 0x030000
tmp = tmp. quadBezier ( );
for ( uint loop = 0; loop < tmp. count ( ); loop++ ) {
QPoint p = tmp. point ( loop );
points. putPoints ( points. count ( ), 1, p. x ( ), p. y ( ));
}
#else
tmp = tmp. cubicBezier ( );
points. putPoints ( points. count ( ), tmp. count ( ), tmp );
#endif
i += 3;
}
else {
state-> transform ( subpath-> getX ( i ), subpath-> getY ( i ), &x1, &y1 );
points. putPoints ( points. count ( ), 1, lrint ( x1 ), lrint ( y1 ));
++i;
}
}
return points. count ( ) - oldcnt;
}
void QOutputDev::beginString ( GfxState *state, GString */*s*/ )
{
m_text-> beginString ( state );
}
void QOutputDev::endString ( GfxState */*state*/ )
{
m_text-> endString ( );
}
void QOutputDev::drawChar ( GfxState *state, fp_t x, fp_t y,
fp_t dx, fp_t dy, fp_t originX, fp_t originY,
CharCode code, Unicode *u, int uLen )
{
fp_t x1, y1, dx1, dy1;
if ( uLen > 0 )
m_text-> addChar ( state, x, y, dx, dy, u, uLen );
// check for invisible text -- this is used by Acrobat Capture
if (( state-> getRender ( ) & 3 ) == 3 ) {
return;
}