Skip to content

Commit 6bc52dd

Browse files
author
Pierre Raybaut
committed
Renamed modules: qwt/qwt_*.py --> qwt/*.py
1 parent 4e6a8a6 commit 6bc52dd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+179
-179
lines changed

qwt/__init__.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,31 @@
33

44
import warnings
55

6-
from qwt.qwt_plot import QwtPlot
7-
from qwt.qwt_symbol import QwtSymbol as QSbl # see deprecated section
8-
from qwt.qwt_scale_engine import QwtLinearScaleEngine, QwtLogScaleEngine
9-
from qwt.qwt_text import QwtText
10-
from qwt.qwt_plot_canvas import QwtPlotCanvas
11-
from qwt.qwt_plot_curve import QwtPlotCurve as QPC # see deprecated section
12-
from qwt.qwt_plot_curve import QwtPlotItem
13-
from qwt.qwt_scale_map import QwtScaleMap
14-
from qwt.qwt_interval import QwtInterval
15-
from qwt.qwt_legend import QwtLegend
16-
from qwt.qwt_plot_marker import QwtPlotMarker
17-
from qwt.qwt_plot_grid import QwtPlotGrid as QPG # see deprecated section
18-
from qwt.qwt_color_map import QwtLinearColorMap
6+
from qwt.plot import QwtPlot
7+
from qwt.symbol import QwtSymbol as QSbl # see deprecated section
8+
from qwt.scale_engine import QwtLinearScaleEngine, QwtLogScaleEngine
9+
from qwt.text import QwtText
10+
from qwt.plot_canvas import QwtPlotCanvas
11+
from qwt.plot_curve import QwtPlotCurve as QPC # see deprecated section
12+
from qwt.plot_curve import QwtPlotItem
13+
from qwt.scale_map import QwtScaleMap
14+
from qwt.interval import QwtInterval
15+
from qwt.legend import QwtLegend
16+
from qwt.plot_marker import QwtPlotMarker
17+
from qwt.plot_grid import QwtPlotGrid as QPG # see deprecated section
18+
from qwt.color_map import QwtLinearColorMap
1919

20-
from qwt.toqimage import toQImage
20+
from qwt.toqimage import array_to_qimage as toQImage
2121

22-
from qwt.qwt_scale_div import QwtScaleDiv
23-
from qwt.qwt_scale_draw import QwtScaleDraw
24-
from qwt.qwt_scale_draw import QwtAbstractScaleDraw
25-
from qwt.qwt_series_data import QwtIntervalSeriesData
26-
from qwt.qwt_sample import QwtIntervalSample
27-
from qwt.qwt_painter import QwtPainter
28-
from qwt.qwt_legend_data import QwtLegendData
22+
from qwt.scale_div import QwtScaleDiv
23+
from qwt.scale_draw import QwtScaleDraw
24+
from qwt.scale_draw import QwtAbstractScaleDraw
25+
from qwt.series_data import QwtIntervalSeriesData
26+
from qwt.sample import QwtIntervalSample
27+
from qwt.painter import QwtPainter
28+
from qwt.legend_data import QwtLegendData
2929

30-
from qwt.qwt_plot_renderer import QwtPlotRenderer
30+
from qwt.plot_renderer import QwtPlotRenderer
3131

3232

3333
## ============================================================================

qwt/abstract_legend.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# -*- coding: utf-8 -*-
2+
3+
# Moved to legend.py
4+
File renamed without changes.
File renamed without changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22

3-
from qwt.qwt_interval import QwtInterval
4-
from qwt.qwt_painter import QwtPainter
3+
from qwt.interval import QwtInterval
4+
from qwt.painter import QwtPainter
55

66
from qwt.qt.QtGui import QPolygonF, QPalette
77
from qwt.qt.QtCore import QRectF, Qt
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
from qwt.qwt_spline import QwtSpline
3+
from qwt.spline import QwtSpline
44

55
from qwt.qt.QtGui import QPolygonF
66
from qwt.qt.QtCore import QPointF
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# -*- coding: utf-8 -*-
22

3-
from qwt.qwt_null_paintdevice import QwtNullPaintDevice
4-
from qwt.qwt_painter_command import QwtPainterCommand
3+
from qwt.null_paintdevice import QwtNullPaintDevice
4+
from qwt.painter_command import QwtPainterCommand
55

66
from qwt.qt.QtGui import (QPainter, QPainterPathStroker, QPaintEngine, QPixmap,
77
QTransform, QImage)
88
from qwt.qt.QtCore import Qt, QRectF, QSizeF, QSize, QPointF, QRect
99

10-
from math import ceil
10+
import numpy as np
1111

1212

1313
def qwtHasScalablePen(painter):
@@ -235,7 +235,7 @@ def scaledBoundingRect(self, sx, sy):
235235

236236
def sizeMetrics(self):
237237
sz = self.defaultSize()
238-
return QSize(ceil(sz.width()), ceil(sz.height()))
238+
return QSize(np.ceil(sz.width()), np.ceil(sz.height()))
239239

240240
def setDefaultSize(self, size):
241241
w = max([0., size.width()])
@@ -340,8 +340,8 @@ def toPixmap(self, *args):
340340
if self.isNull():
341341
return QPixmap()
342342
sz = self.defaultSize()
343-
w = ceil(sz.width())
344-
h = ceil(sz.height())
343+
w = np.ceil(sz.width())
344+
h = np.ceil(sz.height())
345345
pixmap = QPixmap(w, h)
346346
pixmap.fill(Qt.transparent)
347347
r = QRectF(0., 0., sz.width(), sz.height())
@@ -367,8 +367,8 @@ def toImage(self, *args):
367367
if self.isNull():
368368
return QImage()
369369
sz = self.defaultSize()
370-
w = ceil(sz.width())
371-
h = ceil(sz.height())
370+
w = np.ceil(sz.width())
371+
h = np.ceil(sz.height())
372372
image = QImage(w, h, QImage.Format_ARGB32)
373373
image.fill(0)
374374
r = QRect(0, 0, sz.width(), sz.height())
File renamed without changes.

qwt/qwt_legend.py renamed to qwt/legend.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# -*- coding: utf-8 -*-
22

3-
from qwt.qwt_legend_data import QwtLegendData
4-
from qwt.qwt_dyngrid_layout import QwtDynGridLayout
5-
from qwt.qwt_painter import QwtPainter
6-
from qwt.qwt_legend_label import QwtLegendLabel
3+
from qwt.legend_data import QwtLegendData
4+
from qwt.dyngrid_layout import QwtDynGridLayout
5+
from qwt.painter import QwtPainter
6+
from qwt.legend_label import QwtLegendLabel
77

88
from qwt.qt.QtGui import (QFrame, QScrollArea, QWidget, QVBoxLayout, QPalette,
99
QApplication)
1010
from qwt.qt.QtCore import SIGNAL, QEvent, QSize, Qt, QRect, QRectF
1111

12-
from math import ceil
12+
import numpy as np
1313

1414

1515
class QwtAbstractLegend(QFrame):
@@ -301,10 +301,10 @@ def renderLegend(self, painter, rect, fillBackground):
301301
return
302302
left, right, top, bottom = self.getContentsMargins()
303303
layoutRect = QRect()
304-
layoutRect.setLeft(ceil(rect.left())+left)
305-
layoutRect.setTop(ceil(rect.top())+top)
306-
layoutRect.setRight(ceil(rect.right())-right)
307-
layoutRect.setBottom(ceil(rect.bottom())-bottom)
304+
layoutRect.setLeft(np.ceil(rect.left())+left)
305+
layoutRect.setTop(np.ceil(rect.top())+top)
306+
layoutRect.setRight(np.ceil(rect.right())-right)
307+
layoutRect.setBottom(np.ceil(rect.bottom())-bottom)
308308
numCols = legendLayout.columnsForWidth(layoutRect.width())
309309
itemRects = legendLayout.layoutItems(layoutRect, numCols)
310310
index = 0

0 commit comments

Comments
 (0)