summaryrefslogtreecommitdiff
path: root/library
Side-by-side diff
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-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
5 files changed, 11 insertions, 11 deletions
diff --git a/library/lightstyle.cpp b/library/lightstyle.cpp
index f18bdca..3bd1623 100644
--- a/library/lightstyle.cpp
+++ b/library/lightstyle.cpp
@@ -10,25 +10,25 @@
**
** 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 "lightstyle.h"
-#if QT_VERSION < 300
+#if QT_VERSION < 0x030000
#define INCLUDE_MENUITEM_DEF
#include "qmenubar.h"
#include "qapplication.h"
#include "qpainter.h"
#include "qpalette.h"
#include "qframe.h"
#include "qpushbutton.h"
#include "qdrawutil.h"
#include "qscrollbar.h"
#include "qtabbar.h"
#include "qguardedptr.h"
@@ -150,42 +150,42 @@ int LightStyle::defaultFrameWidth() const
QSize LightStyle::indicatorSize() const
{
return QSize(13, 13);
}
void LightStyle::polish(QWidget *widget)
{
if (widget->inherits("QPushButton"))
widget->installEventFilter(this);
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
if (widget->inherits("QLineEdit")) {
QLineEdit *lineedit = (QLineEdit *) widget;
lineedit->setFrameShape(QFrame::StyledPanel);
lineedit->setLineWidth(2);
}
#endif
QWindowsStyle::polish(widget);
}
void LightStyle::unPolish(QWidget *widget)
{
if (widget->inherits("QPushButton"))
widget->removeEventFilter(this);
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
if (widget->inherits("QLineEdit")) {
QLineEdit *lineedit = (QLineEdit *) widget;
lineedit->setLineWidth(1);
lineedit->setFrameShape(QFrame::WinPanel);
}
#endif
QWindowsStyle::unPolish(widget);
}
void LightStyle::polish(QApplication *app)
@@ -405,42 +405,42 @@ void LightStyle::drawComboButton(QPainter *p, int x, int y, int w, int h,
if (editable) {
QRect r = comboButtonRect(x, y, w, h);
qDrawShadePanel(p, r.x() - 1, r.y() - 1,
r.width() + defaultFrameWidth(),
r.height() + defaultFrameWidth(),
g, TRUE);
}
int indent = ((y + h) / 2) - 3;
int xpos = x;
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
if( QApplication::reverseLayout() )
xpos += indent;
else
#endif
xpos += w - indent - 5;
drawArrow(p, Qt::DownArrow, TRUE, xpos, indent, 5, 5, g, TRUE, fill);
}
QRect LightStyle::comboButtonRect( int x, int y, int w, int h ) const
{
QRect r(x + 3, y + 3, w - 6, h - 6);
int indent = ((y + h) / 2) - 3;
r.setRight(r.right() - indent - 10);
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
if( QApplication::reverseLayout() )
r.moveBy( indent + 10, 0 );
#endif
return r;
}
QRect LightStyle::comboButtonFocusRect(int x, int y, int w, int h ) const
{
return comboButtonRect(x, y, w, h);
}
diff --git a/library/lightstyle.h b/library/lightstyle.h
index c377cc2..0392957 100644
--- a/library/lightstyle.h
+++ b/library/lightstyle.h
@@ -17,25 +17,25 @@
** not clear to you.
**
**********************************************************************/
#ifndef LIGHTSTYLE_H
#define LIGHTSTYLE_H
#ifndef QT_H
#include <qstyle.h>
#include <qwindowsstyle.h>
#endif // QT_H
-#if QT_VERSION < 300
+#if QT_VERSION < 0x030000
#ifdef QT_PLUGIN_STYLE_LIGHT
# define Q_EXPORT_STYLE_LIGHT
#else
# define Q_EXPORT_STYLE_LIGHT Q_EXPORT
#endif // QT_PLUGIN_STYLE_LIGHT
class Q_EXPORT_STYLE_LIGHT LightStyle : public QWindowsStyle
{
public:
LightStyle();
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index af00f49..1c5ced3 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -51,25 +51,25 @@
#include <qevent.h>
#include <qtooltip.h>
#include <qsignal.h>
#include <qmainwindow.h>
#include <qwidgetlist.h>
#include <qpixmapcache.h>
#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
#define QTOPIA_INTERNAL_INITAPP
#include "qpeapplication.h"
#include "qpestyle.h"
#include "styleinterface.h"
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
#include <qstylefactory.h>
#else
#include <qplatinumstyle.h>
#include <qwindowsstyle.h>
#include <qmotifstyle.h>
#include <qmotifplusstyle.h>
#include "lightstyle.h"
#include <qpe/qlibrary.h>
#endif
#include "global.h"
#include "resource.h"
@@ -1834,25 +1834,25 @@ void QPEApplication::setKeepRunning()
\sa setKeepRunning()
*/
bool QPEApplication::keepRunning() const
{
return d->keep_running;
}
/*!
\internal
*/
void QPEApplication::internalSetStyle( const QString &style )
{
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
if ( style == "QPE" ) {
setStyle( new QPEStyle );
}
else {
QStyle *s = QStyleFactory::create( style );
if ( s )
setStyle( s );
}
#else
if ( style == "Windows" ) {
setStyle( new QWindowsStyle );
}
diff --git a/library/qpestyle.cpp b/library/qpestyle.cpp
index b61ada4..0566f6b 100644
--- a/library/qpestyle.cpp
+++ b/library/qpestyle.cpp
@@ -14,25 +14,25 @@
** 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 "qpestyle.h"
#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2)
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
#include <qdrawutil.h>
#include <qcombobox.h>
#include <qtabbar.h>
QPEStyle::QPEStyle()
{
}
QPEStyle::~QPEStyle()
{
}
@@ -420,25 +420,25 @@ QSize QPEStyle::sizeFromContents( ContentsType contents, const QWidget *widget,
#include <qpalette.h>
#include <qdrawutil.h>
#include <qscrollbar.h>
#include <qbutton.h>
#include <qframe.h>
#include <qtabbar.h>
#define INCLUDE_MENUITEM_DEF
#include <qmenudata.h>
QPEStyle::QPEStyle()
{
-#if QT_VERSION < 300
+#if QT_VERSION < 0x030000
setButtonMargin(buttonMargin());
setScrollBarExtent(scrollBarExtent().width(),scrollBarExtent().height());
#endif
}
QPEStyle::~QPEStyle()
{
}
int QPEStyle::buttonMargin() const
{
return 2;
diff --git a/library/qpestyle.h b/library/qpestyle.h
index 19ef346..1bde0ff 100644
--- a/library/qpestyle.h
+++ b/library/qpestyle.h
@@ -16,25 +16,25 @@
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#ifndef QPESTYLE_H
#define QPESTYLE_H
#ifndef QT_H
#include "qwindowsstyle.h"
#endif // QT_H
-#if QT_VERSION >= 300
+#if QT_VERSION >= 0x030000
class Q_EXPORT QPEStyle : public QWindowsStyle
{
public:
QPEStyle();
virtual ~QPEStyle();
virtual void drawPrimitive( PrimitiveElement pe, QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags=Style_Default, const QStyleOption & = QStyleOption::Default) const;
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;
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;
virtual int pixelMetric( PixelMetric metric, const QWidget *widget=0 ) const;
virtual QSize sizeFromContents( ContentsType contents, const QWidget *widget, const QSize &contentsSize, const QStyleOption & = QStyleOption::Default) const;