Commit ff942bbf authored by Jan Möbius's avatar Jan Möbius
Browse files

Really fix the include

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5839 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 26f202bf
#ifdef USE_QWT #ifdef WITH_QWT
#include <qstring.h> #include <qstring.h>
#include <qpainter.h> #include <qpainter.h>
...@@ -89,24 +89,24 @@ QColor HistogramItem::color(uint i) const ...@@ -89,24 +89,24 @@ QColor HistogramItem::color(uint i) const
QwtDoubleRect HistogramItem::boundingRect() const QwtDoubleRect HistogramItem::boundingRect() const
{ {
QwtDoubleRect rect = d_data->data.boundingRect(); QwtDoubleRect rect = d_data->data.boundingRect();
if ( !rect.isValid() ) if ( !rect.isValid() )
return rect; return rect;
if ( d_data->attributes & Xfy ) if ( d_data->attributes & Xfy )
{ {
rect = QwtDoubleRect( rect.y(), rect.x(), rect = QwtDoubleRect( rect.y(), rect.x(),
rect.height(), rect.width() ); rect.height(), rect.width() );
if ( rect.left() > d_data->reference ) if ( rect.left() > d_data->reference )
rect.setLeft( d_data->reference ); rect.setLeft( d_data->reference );
else if ( rect.right() < d_data->reference ) else if ( rect.right() < d_data->reference )
rect.setRight( d_data->reference ); rect.setRight( d_data->reference );
} }
else else
{ {
if ( rect.bottom() < d_data->reference ) if ( rect.bottom() < d_data->reference )
rect.setBottom( d_data->reference ); rect.setBottom( d_data->reference );
else if ( rect.top() > d_data->reference ) else if ( rect.top() > d_data->reference )
rect.setTop( d_data->reference ); rect.setTop( d_data->reference );
} }
...@@ -137,7 +137,7 @@ bool HistogramItem::testHistogramAttribute(HistogramAttribute attribute) const ...@@ -137,7 +137,7 @@ bool HistogramItem::testHistogramAttribute(HistogramAttribute attribute) const
return d_data->attributes & attribute; return d_data->attributes & attribute;
} }
void HistogramItem::draw(QPainter *painter, const QwtScaleMap &xMap, void HistogramItem::draw(QPainter *painter, const QwtScaleMap &xMap,
const QwtScaleMap &yMap, const QRect &) const const QwtScaleMap &yMap, const QRect &) const
{ {
const QwtIntervalData &iData = d_data->data; const QwtIntervalData &iData = d_data->data;
...@@ -250,22 +250,22 @@ void HistogramItem::drawBar(QPainter *painter, ...@@ -250,22 +250,22 @@ void HistogramItem::drawBar(QPainter *painter,
painter->setPen(QPen(dark, 2)); painter->setPen(QPen(dark, 2));
#if QT_VERSION >= 0x040000 #if QT_VERSION >= 0x040000
QwtPainter::drawLine(painter, QwtPainter::drawLine(painter,
r.left() + 1, r.bottom(), r.right() + 1, r.bottom()); r.left() + 1, r.bottom(), r.right() + 1, r.bottom());
#else #else
QwtPainter::drawLine(painter, QwtPainter::drawLine(painter,
r.left(), r.bottom(), r.right() + 1, r.bottom()); r.left(), r.bottom(), r.right() + 1, r.bottom());
#endif #endif
painter->setPen(QPen(light, 1)); painter->setPen(QPen(light, 1));
#if QT_VERSION >= 0x040000 #if QT_VERSION >= 0x040000
QwtPainter::drawLine(painter, QwtPainter::drawLine(painter,
r.left(), r.top() + 1, r.left(), r.bottom()); r.left(), r.top() + 1, r.left(), r.bottom());
QwtPainter::drawLine(painter, QwtPainter::drawLine(painter,
r.left() + 1, r.top() + 2, r.left() + 1, r.bottom() - 1); r.left() + 1, r.top() + 2, r.left() + 1, r.bottom() - 1);
#else #else
QwtPainter::drawLine(painter, QwtPainter::drawLine(painter,
r.left(), r.top() + 1, r.left(), r.bottom() + 1); r.left(), r.top() + 1, r.left(), r.bottom() + 1);
QwtPainter::drawLine(painter, QwtPainter::drawLine(painter,
r.left() + 1, r.top() + 2, r.left() + 1, r.bottom()); r.left() + 1, r.top() + 2, r.left() + 1, r.bottom());
...@@ -274,18 +274,18 @@ void HistogramItem::drawBar(QPainter *painter, ...@@ -274,18 +274,18 @@ void HistogramItem::drawBar(QPainter *painter,
painter->setPen(QPen(dark, 1)); painter->setPen(QPen(dark, 1));
#if QT_VERSION >= 0x040000 #if QT_VERSION >= 0x040000
QwtPainter::drawLine(painter, QwtPainter::drawLine(painter,
r.right() + 1, r.top() + 1, r.right() + 1, r.bottom()); r.right() + 1, r.top() + 1, r.right() + 1, r.bottom());
QwtPainter::drawLine(painter, QwtPainter::drawLine(painter,
r.right(), r.top() + 2, r.right(), r.bottom() - 1); r.right(), r.top() + 2, r.right(), r.bottom() - 1);
#else #else
QwtPainter::drawLine(painter, QwtPainter::drawLine(painter,
r.right() + 1, r.top() + 1, r.right() + 1, r.bottom() + 1); r.right() + 1, r.top() + 1, r.right() + 1, r.bottom() + 1);
QwtPainter::drawLine(painter, QwtPainter::drawLine(painter,
r.right(), r.top() + 2, r.right(), r.bottom()); r.right(), r.top() + 2, r.right(), r.bottom());
#endif #endif
painter->restore(); painter->restore();
} }
#endif // USE_QWT #endif // WITH_QWT
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
//== INCLUDES ================================================================= //== INCLUDES =================================================================
#ifdef USE_QWT #ifdef WITH_QWT
#include "QwtFunctionPlot.hh" #include "QwtFunctionPlot.hh"
...@@ -235,4 +235,4 @@ void QwtFunctionPlot::replot() ...@@ -235,4 +235,4 @@ void QwtFunctionPlot::replot()
} // namespace db } // namespace db
//============================================================================= //=============================================================================
#endif // USE_QWT #endif // WITH_QWT
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#ifndef ACG_QWTFUNCTIONPLOT_HH #ifndef ACG_QWTFUNCTIONPLOT_HH
#define ACG_QWTFUNCTIONPLOT_HH #define ACG_QWTFUNCTIONPLOT_HH
#ifdef USE_QWT #ifdef WITH_QWT
//== INCLUDES ================================================================= //== INCLUDES =================================================================
...@@ -104,7 +104,7 @@ private: ...@@ -104,7 +104,7 @@ private:
//============================================================================= //=============================================================================
} // namespace ACG } // namespace ACG
#endif // USE_QWT #endif // WITH_QWT
//============================================================================= //=============================================================================
#endif // ACG_QWTFUNCTIONPLOT_HH defined #endif // ACG_QWTFUNCTIONPLOT_HH defined
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment