File: 06_python_compat.patch

package info (click to toggle)
pyqt-qwt 1.02.02-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 796 kB
  • sloc: python: 5,663; cpp: 273; makefile: 16; sh: 13
file content (56 lines) | stat: -rw-r--r-- 1,587 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#Patch to simplify python interface
--- a/src/qwt_series_data.h
+++ b/src/qwt_series_data.h
@@ -54,14 +54,14 @@
     virtual ~QwtSeriesData();
 
     //! \return Number of samples
-    virtual size_t size() const = 0;
+    virtual size_t size() const {return 0;};
 
     /*!
       Return a sample
       \param i Index
       \return Sample at position i
      */
-    virtual T sample( size_t i ) const = 0;
+    virtual T sample( size_t i ) const {return T();};
 
     /*!
        Calculate the bounding rect of all samples
@@ -75,7 +75,7 @@
 
        \return Bounding rectangle
      */
-    virtual QRectF boundingRect() const = 0;
+    virtual QRectF boundingRect() const {return d_boundingRect;};
 
     /*!
        Set a the "rect of interest"
--- a/src/qwt_series_store.h
+++ b/src/qwt_series_store.h
@@ -28,19 +28,19 @@
     virtual ~QwtAbstractSeriesStore() {}
 
     //! dataChanged() indicates, that the series has been changed.
-    virtual void dataChanged() = 0;
+    virtual void dataChanged() {};
 
     /*!
       Set a the "rectangle of interest" for the stored series
       \sa QwtSeriesData<T>::setRectOfInterest()
      */
-    virtual void setRectOfInterest( const QRectF & ) = 0;
+    virtual void setRectOfInterest( const QRectF & ) {};
 
     //! \return Bounding rectangle of the stored series
-    virtual QRectF dataRect() const = 0;
+    virtual QRectF dataRect() const {return  QRectF( 0.0, 0.0, -1.0, -1.0 );};
 
     //! \return Number of samples
-    virtual size_t dataSize() const = 0;
+    virtual size_t dataSize() const {return 0;};
 };
 
 /*!