Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 06_python_compat.patch
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
\return Sample at position i
*/
- virtual T sample( size_t i ) const = 0;
+ virtual T sample( size_t i ) const {return T();};
+ virtual T sample( size_t ) const {return T();};

/*!
Calculate the bounding rect of all samples
Expand Down
4 changes: 2 additions & 2 deletions header/qwt_series_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ class QwtSeriesData
\return Sample at position i
*/
#ifndef QWT_PYTHON_WRAPPER
virtual T sample( size_t i ) const = 0;
virtual T sample( size_t ) const = 0;
#else
virtual T sample( size_t i ) const {return T();};
virtual T sample( size_t ) const {return T();};
#endif
/*!
Calculate the bounding rect of all samples
Expand Down
1 change: 1 addition & 0 deletions sip/qmap_convert.sip
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
%MappedType QMap<double,QString> /TypeHint="Dict[double,QString]", TypeHintValue="{}"/
{
%TypeHeaderCode
#include <qmap.h>
#include <qwt_compass.h>
%End

Expand Down
4 changes: 2 additions & 2 deletions sip/qwt_abstract_scale_draw.sip
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ public:
void setSpacing( double margin );
double spacing() const;

void setPenWidth( int width );
int penWidth() const;
void setPenWidthF( int width );
int penWidthF() const;

virtual void draw( QPainter *, const QPalette & ) const;

Expand Down
62 changes: 62 additions & 0 deletions sip/qwt_axis.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/******************************************************************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/

/*!
Enums and methods for axes
*/
namespace QwtAxis
{
%TypeHeaderCode
#include "qwt_global.h"
%End

//! \brief Axis position
enum Position
{
//! Y axis left of the canvas
YLeft,

//! Y axis right of the canvas
YRight,

//! X axis below the canvas
XBottom,

//! X axis above the canvas
XTop
};

//! \brief Number of axis positions
enum { AxisPositions = XTop + 1 };

bool isValid( int axisPos );
bool isYAxis( int axisPos );
bool isXAxis( int axisPos );
}

/*
//! \return true, when axisPos is in the valid range [ YLeft, XTop ]
inline bool QwtAxis::isValid( int axisPos )
{
return ( axisPos >= 0 && axisPos < AxisPositions );
}

//! \return true, when axisPos is XBottom or XTop
inline bool QwtAxis::isXAxis( int axisPos )
{
return ( axisPos == XBottom ) || ( axisPos == XTop );
}

//! \return true, when axisPos is YLeft or YRight
inline bool QwtAxis::isYAxis( int axisPos )
{
return ( axisPos == YLeft ) || ( axisPos == YRight );
}

*/
1 change: 1 addition & 0 deletions sip/qwt_axis_id.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
typedef int QwtAxisId;
11 changes: 5 additions & 6 deletions sip/qwt_clipper.sip
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,21 @@
\brief Some clipping algorithms
*/

class QwtClipper
namespace QwtClipper
{
%TypeHeaderCode
#include <qwt_clipper.h>
%End

public:
static QPolygon clipPolygon( const QRect &,
QPolygon clippedPolygon( const QRect &,
const QPolygon &, bool closePolygon = false );
static QPolygon clipPolygon( const QRectF &,
QPolygon clippedPolygon( const QRectF &,
const QPolygon &, bool closePolygon = false );

static QPolygonF clipPolygonF( const QRectF &,
QPolygonF clippedPolygonF( const QRectF &,
const QPolygonF &, bool closePolygon = false );

static QVector<QwtInterval> clipCircle(
QVector<QwtInterval> clipCircle(
const QRectF &, const QPointF &, double radius );
};

Expand Down
142 changes: 98 additions & 44 deletions sip/qwt_color_map.sip
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/******************************************************************************
* python-qwt. Python wrapper for the Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
Expand All @@ -13,7 +13,7 @@ class QwtColorMap
%TypeHeaderCode
#include <qwt_color_map.h>
%End
public:
public:
enum Format
{
RGB,
Expand All @@ -23,100 +23,154 @@ public:
QwtColorMap( Format = QwtColorMap::RGB );
virtual ~QwtColorMap();

void setFormat( Format );
Format format() const;
virtual QRgb rgb( const QwtInterval &interval, double value ) const = 0;
virtual unsigned char colorIndex( const QwtInterval &interval, double value ) const = 0;
virtual QRgb rgb( const QwtInterval& interval, double value ) const = 0;
virtual uint colorIndex( int numColors, const QwtInterval& interval, double value ) const;

QColor color( const QwtInterval &, double value ) const;
virtual QVector<QRgb> colorTable( const QwtInterval & ) const;
QColor color( const QwtInterval&, double value ) const;
virtual QVector< QRgb > colorTable( int ) const;
virtual QVector< QRgb > colorTable256() const;

//private:
// Format d_format;
private:
QwtColorMap( const QwtColorMap & );

// Format m_format;
};

class QwtLinearColorMap: QwtColorMap
{
%TypeHeaderCode
#include <qwt_color_map.h>
%End
public:
public:
enum Mode
{
FixedColors,
ScaledColors
};

QwtLinearColorMap( Format = QwtColorMap::RGB );
QwtLinearColorMap( const QColor &from, const QColor &to,
Format = QwtColorMap::RGB );
QwtLinearColorMap( const QColor& from, const QColor& to,
Format = QwtColorMap::RGB );

virtual ~QwtLinearColorMap();

void setMode( Mode );
Mode mode() const;

void setColorInterval( const QColor &color1, const QColor &color2 );
void setColorInterval( const QColor& color1, const QColor& color2 );
void addColorStop( double value, const QColor& );
QVector<double> colorStops() const;
QVector< double > colorStops() const;

QColor color1() const;
QColor color2() const;

virtual QRgb rgb( const QwtInterval &, double value ) const;
virtual unsigned char colorIndex( const QwtInterval &, double value ) const;
virtual QRgb rgb( const QwtInterval&,
double value ) const;

virtual uint colorIndex( int numColors,
const QwtInterval&, double value ) const;

class ColorStops;

private:
// Disabled copy constructor and operator=
private:
QwtLinearColorMap( const QwtLinearColorMap & );
//QwtLinearColorMap &operator=( const QwtLinearColorMap & );

//class PrivateData;
//PrivateData *d_data;
// class PrivateData;
// PrivateData* m_data;
};

class QwtAlphaColorMap: QwtColorMap
{
%TypeHeaderCode
#include <qwt_color_map.h>
%End
public:
QwtAlphaColorMap( const QColor & = QColor( Qt::gray ) );
public:
QwtAlphaColorMap( const QColor& = QColor( Qt::gray ) );
virtual ~QwtAlphaColorMap();

void setColor( const QColor & );
void setAlphaInterval( int alpha1, int alpha2 );

int alpha1() const;
int alpha2() const;

void setColor( const QColor& );
QColor color() const;

virtual QRgb rgb( const QwtInterval &, double value ) const;
virtual QRgb rgb( const QwtInterval&,
double value ) const;

private:
private:
QwtAlphaColorMap( const QwtAlphaColorMap & );
//QwtAlphaColorMap &operator=( const QwtAlphaColorMap & );

virtual unsigned char colorIndex( const QwtInterval &, double value ) const;
// class PrivateData;
// PrivateData* m_data;
};

//class PrivateData;
//PrivateData *d_data;
class QwtHueColorMap : QwtColorMap
{
%TypeHeaderCode
#include <qwt_color_map.h>
%End
public:
QwtHueColorMap( Format = QwtColorMap::RGB );
virtual ~QwtHueColorMap();

void setHueInterval( int hue1, int hue2 ); // direction ?
void setSaturation( int saturation );
void setValue( int value );
void setAlpha( int alpha );

int hue1() const;
int hue2() const;
int saturation() const;
int value() const;
int alpha() const;

virtual QRgb rgb( const QwtInterval&,
double value ) const;

private:
QwtHueColorMap( const QwtHueColorMap & );
// class PrivateData;
// PrivateData* m_data;
};

class QwtSaturationValueColorMap : QwtColorMap
{
%TypeHeaderCode
#include <qwt_color_map.h>
%End
public:
QwtSaturationValueColorMap();
virtual ~QwtSaturationValueColorMap();

void setHue( int hue );
void setSaturationInterval( int sat1, int sat2 );
void setValueInterval( int value1, int value2 );
void setAlpha( int alpha );

int hue() const;
int saturation1() const;
int saturation2() const;
int value1() const;
int value2() const;
int alpha() const;

virtual QRgb rgb( const QwtInterval&,
double value ) const;

private:
QwtSaturationValueColorMap( const QwtSaturationValueColorMap & );
// class PrivateData;
// PrivateData* m_data;
};

/*inline QColor QwtColorMap::color(
const QwtInterval &interval, double value ) const
/*inline QColor QwtColorMap::color( const QwtInterval& interval, double value ) const
{
if ( d_format == RGB )
{
return QColor::fromRgba( rgb( interval, value ) );
}
else
{
const unsigned int index = colorIndex( interval, value );
return colorTable( interval )[index]; // slow
}
return QColor::fromRgba( rgb( interval, value ) );
}

inline QwtColorMap::Format QwtColorMap::format() const
{
return d_format;
return m_format;
}*/

2 changes: 2 additions & 0 deletions sip/qwt_column_symbol.sip
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,6 @@ public:
protected:
void drawBox( QPainter * /Transfer/, const QwtColumnRect & ) const;

private:
QwtColumnSymbol( const QwtColumnSymbol & );
};
3 changes: 2 additions & 1 deletion sip/qwt_compass_rose.sip
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public:
const QPointF &center, double radius, double north,
QPalette::ColorGroup colorGroup = QPalette::Active ) const = 0;

//private:
private:
QwtCompassRose( const QwtCompassRose & );
// QPalette d_palette;
};

Expand Down
Loading