The pyplot module provides an interactive plotting interface similar to Matplotlib‘s, i.e. with MATLAB-like syntax.
The guiqwt.pyplot module was designed to be as close as possible to the matplotlib.pyplot module, so that one could easily switch between these two modules by simply changing the import statement. Basically, if guiqwt does support the plotting commands called in your script, replacing import matplotlib.pyplot by import guiqwt.pyplot should suffice, as shown in the following example:
Simple example using matplotlib:
import matplotlib.pyplot as plt import numpy as np x = np.linspace(-10, 10) plt.plot(x, x**2, 'r+') plt.show()Switching from matplotlib to guiqwt is trivial:
import guiqwt.pyplot as plt # only this line has changed! import numpy as np x = np.linspace(-10, 10) plt.plot(x, x**2, 'r+') plt.show()
>>> import numpy as np
>>> from guiqwt.pyplot import * # ugly but acceptable in an interactive session
>>> ion() # switching to interactive mode
>>> x = np.linspace(-5, 5, 1000)
>>> figure(1)
>>> subplot(2, 1, 1)
>>> plot(x, np.sin(x), "r+")
>>> plot(x, np.cos(x), "g-")
>>> errorbar(x, -1+x**2/20+.2*np.random.rand(len(x)), x/20)
>>> xlabel("Axe x")
>>> ylabel("Axe y")
>>> subplot(2, 1, 2)
>>> img = np.fromfunction(lambda x, y: np.sin((x/200.)*(y/200.)**2), (1000, 1000))
>>> xlabel("pixels")
>>> ylabel("pixels")
>>> zlabel("intensity")
>>> gray()
>>> imshow(img)
>>> figure("plotyy")
>>> plotyy(x, np.sin(x), x, np.cos(x))
>>> ylabel("sinus", "cosinus")
>>> show()
Show all figures and enter Qt event loop This should be the last line of your script
Create a subplot command
Example: import numpy as np x = np.linspace(-5, 5, 1000) figure(1) subplot(2, 1, 1) plot(x, np.sin(x), “r+”) subplot(2, 1, 2) plot(x, np.cos(x), “g-”) show()
Set y-axis direction of increasing values
Save figure
Currently supports PDF and PNG formats only
Plot curves
Example:
import numpy as np x = np.linspace(-5, 5, 1000) plot(x, np.sin(x), “r+”) plot(x, np.cos(x), “g-”) show()
Plot curves with two different y axes
Example:
import numpy as np x = np.linspace(-5, 5, 1000) plotyy(x, np.sin(x), x, np.cos(x)) ylabel(“sinus”, “cosinus”) show()
Plot curves with logarithmic x-axis scale
Example:
import numpy as np x = np.linspace(-5, 5, 1000) semilogx(x, np.sin(12*x), “g-”) show()
Plot curves with logarithmic y-axis scale
Example:
import numpy as np x = np.linspace(-5, 5, 1000) semilogy(x, np.sin(12*x), “g-”) show()
Plot curves with logarithmic x-axis and y-axis scales
Example:
import numpy as np x = np.linspace(-5, 5, 1000) loglog(x, np.sin(12*x), “g-”) show()
Plot curves with error bars
Example:
import numpy as np x = np.linspace(-5, 5, 1000) errorbar(x, -1+x**2/20+.2*np.random.rand(len(x)), x/20) show()
Plot 1-D histogram
Example:
from numpy.random import normal data = normal(0, 1, (2000, )) hist(data) show()
Display the image in data to current axes interpolation: ‘nearest’, ‘linear’ (default), ‘antialiasing’
Example:
import numpy as np x = np.linspace(-5, 5, 1000) img = np.fromfunction(lambda x, y:
np.sin((x/200.)*(y/200.)**2), (1000, 1000))
gray() imshow(img) show()
import numpy as np
from guiqwt.widgets.fit import FitParam, guifit
def test():
x = np.linspace(-10, 10, 1000)
y = np.cos(1.5*x)+np.random.rand(x.shape[0])*.2
def fit(x, params):
a, b = params
return np.cos(b*x)+a
a = FitParam("Offset", 1., 0., 2.)
b = FitParam("Frequency", 2., 1., 10., logscale=True)
params = [a, b]
values = guifit(x, y, fit, params, xlabel="Time (s)", ylabel="Power (a.u.)")
print(values)
print([param.value for param in params])
if __name__ == "__main__":
test()
GUI-based curve fitting tool
QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()
QDialog.accepted [signal]
Activate default tool
Register a panel to the plot manager
Register a separator tool to the plot manager: the separator tool is just a tool which insert a separator in the plot context menu
Add toolbar to the plot manager toolbar: a QToolBar object toolbar_id: toolbar’s id (default id is string “default”)
QWidget.childAt(int, int) -> QWidget
Call all the registred panels ‘configure_panel’ methods to finalize the object construction (this allows to use tools registered to the same plot manager as the panel itself with breaking the registration sequence: “add plots, then panels, then tools”)
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
QWidget.customContextMenuRequested[QPoint] [signal]
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
QDialog.finished[int] [signal]
Return the active plot
The active plot is the plot whose canvas has the focus otherwise it’s the “default” plot
Return active tool
Return widget context menu – built using active tools
Convenience function to get the contrast adjustment panel
Return None if the contrast adjustment panel has not been added to this manager
Return default plot
The default plot is the plot on which tools and panels will act.
Get default tool
Return default toolbar
Return fitargs and fitkwargs
Convenience function to get the item list panel
Return None if the item list panel has not been added to this manager
Return the main (parent) widget
Note that for py:class:guiqwt.plot.CurveWidget or guiqwt.plot.ImageWidget objects, this method will return the widget itself because the plot manager is integrated to it.
Return panel from its ID Panel IDs are listed in module guiqwt.panels
Return plot associated to plot_id (if method is called without specifying the plot_id parameter, return the default plot)
Return all registered plots
Return tool instance from its class
Return toolbar from its ID toolbar_id: toolbar’s id (default id is string “default”)
Convenience method to get fit parameter values
Convenience function to get the X-axis cross section panel
Return None if the X-axis cross section panel has not been added to this manager
Convenience function to get the Y-axis cross section panel
Return None if the Y-axis cross section panel has not been added to this manager
QWidget.grabMouse(QCursor)
QWidget.move(int, int)
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Refresh Fit Tool dialog box
Register standard, curve-related and other tools
See also
methods
guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_curve_tools() guiqwt.plot.PlotManager.register_image_tools() guiqwt.plot.PlotManager.register_all_image_tools()
Register standard, image-related and other tools
See also
methods
guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_curve_tools() guiqwt.plot.PlotManager.register_image_tools() guiqwt.plot.PlotManager.register_all_curve_tools()
Register only curve-related tools
See also
methods
guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_image_tools()
Register only image-related tools
See also
methods
guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_curve_tools()
Register other common tools
See also
methods
guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_curve_tools() guiqwt.plot.PlotManager.register_image_tools()
Registering basic tools for standard plot dialog –> top of the context-menu
Register the plotting dialog box tools: the base implementation provides standard, curve-related and other tools - i.e. calling this method is exactly the same as calling guiqwt.plot.CurveDialog.register_all_curve_tools()
This method may be overriden to provide a fully customized set of tools
QDialog.rejected [signal]
QWidget.render(QPainter, QPoint targetOffset=QPoint(), QRegion sourceRegion=QRegion(), QWidget.RenderFlags flags=QWidget.DrawWindowBackground|QWidget.DrawChildren)
QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)
QWidget.resize(int, int)
QWidget.scroll(int, int, QRect)
QWidget.setBaseSize(QSize)
QWidget.setContentsMargins(QMargins)
QWidget.setFixedSize(int, int)
QWidget.setFocus(Qt.FocusReason)
QWidget.setGeometry(int, int, int, int)
QWidget.setMask(QRegion)
QWidget.setMaximumSize(QSize)
QWidget.setMinimumSize(QSize)
QWidget.setParent(QWidget, Qt.WindowFlags)
QWidget.setSizeIncrement(QSize)
QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)
Set active tool (if tool argument is None, the active tool will be the default tool)
Convenience function to set the contrast adjustment panel range
This is strictly equivalent to the following:
# Here, *widget* is for example a CurveWidget instance
# (the same apply for CurvePlot, ImageWidget, ImagePlot or any
# class deriving from PlotManager)
widget.get_contrast_panel().set_range(zmin, zmax)
Set default plot
The default plot is the plot on which tools and panels will act.
Set default tool
Set default toolbar
QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)
Convenience function to update the cross section panels at once
This is strictly equivalent to the following:
# Here, *widget* is for example a CurveWidget instance
# (the same apply for CurvePlot, ImageWidget, ImagePlot or any
# class deriving from PlotManager)
widget.get_xcs_panel().update_plot()
widget.get_ycs_panel().update_plot()
Update tools for current plot
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
See also
Curve-related widgets with integrated plot manager:
Image-related widgets with integrated plot manager:
Building your own plot manager:
Simple example without the plot manager:
from guidata.qt.QtGui import QWidget, QVBoxLayout, QHBoxLayout, QPushButton
from guidata.qt.QtCore import SIGNAL
#---Import plot widget base class
from guiqwt.plot import CurveWidget
from guiqwt.builder import make
from guidata.configtools import get_icon
#---
class FilterTestWidget(QWidget):
"""
Filter testing widget
parent: parent widget (QWidget)
x, y: NumPy arrays
func: function object (the signal filter to be tested)
"""
def __init__(self, parent, x, y, func):
QWidget.__init__(self, parent)
self.setMinimumSize(320, 200)
self.x = x
self.y = y
self.func = func
#---guiqwt curve item attribute:
self.curve_item = None
#---
def setup_widget(self, title):
#---Create the plot widget:
curvewidget = CurveWidget(self)
curvewidget.register_all_curve_tools()
self.curve_item = make.curve([], [], color='b')
curvewidget.plot.add_item(self.curve_item)
curvewidget.plot.set_antialiasing(True)
#---
button = QPushButton("Test filter: %s" % title)
self.connect(button, SIGNAL('clicked()'), self.process_data)
vlayout = QVBoxLayout()
vlayout.addWidget(curvewidget)
vlayout.addWidget(button)
self.setLayout(vlayout)
self.update_curve()
def process_data(self):
self.y = self.func(self.y)
self.update_curve()
def update_curve(self):
#---Update curve
self.curve_item.set_data(self.x, self.y)
self.curve_item.plot().replot()
#---
class TestWindow(QWidget):
def __init__(self):
QWidget.__init__(self)
self.setWindowTitle("Signal filtering (guiqwt)")
self.setWindowIcon(get_icon('guiqwt.svg'))
hlayout = QHBoxLayout()
self.setLayout(hlayout)
def add_plot(self, x, y, func, title):
widget = FilterTestWidget(self, x, y, func)
widget.setup_widget(title)
self.layout().addWidget(widget)
def test():
"""Testing this simple Qt/guiqwt example"""
from guidata.qt.QtGui import QApplication
import numpy as np
import scipy.signal as sps, scipy.ndimage as spi
app = QApplication([])
win = TestWindow()
x = np.linspace(-10, 10, 500)
y = np.random.rand(len(x))+5*np.sin(2*x**2)/x
win.add_plot(x, y, lambda x: spi.gaussian_filter1d(x, 1.), "Gaussian")
win.add_plot(x, y, sps.wiener, "Wiener")
win.show()
app.exec_()
if __name__ == '__main__':
test()
Simple example with the plot manager: even if this simple example does not justify the use of the plot manager (this is an unnecessary complication here), it shows how to use it. In more complex applications, using the plot manager allows to design highly versatile graphical user interfaces.
from guidata.qt.QtGui import (QWidget, QVBoxLayout, QHBoxLayout, QPushButton,
QMainWindow)
from guidata.qt.QtCore import SIGNAL
#---Import plot widget base class
from guiqwt.curve import CurvePlot
from guiqwt.plot import PlotManager
from guiqwt.builder import make
from guidata.configtools import get_icon
#---
class FilterTestWidget(QWidget):
"""
Filter testing widget
parent: parent widget (QWidget)
x, y: NumPy arrays
func: function object (the signal filter to be tested)
"""
def __init__(self, parent, x, y, func):
QWidget.__init__(self, parent)
self.setMinimumSize(320, 200)
self.x = x
self.y = y
self.func = func
#---guiqwt related attributes:
self.plot = None
self.curve_item = None
#---
def setup_widget(self, title):
#---Create the plot widget:
self.plot = CurvePlot(self)
self.curve_item = make.curve([], [], color='b')
self.plot.add_item(self.curve_item)
self.plot.set_antialiasing(True)
#---
button = QPushButton("Test filter: %s" % title)
self.connect(button, SIGNAL('clicked()'), self.process_data)
vlayout = QVBoxLayout()
vlayout.addWidget(self.plot)
vlayout.addWidget(button)
self.setLayout(vlayout)
self.update_curve()
def process_data(self):
self.y = self.func(self.y)
self.update_curve()
def update_curve(self):
#---Update curve
self.curve_item.set_data(self.x, self.y)
self.plot.replot()
#---
class TestWindow(QMainWindow):
def __init__(self):
QMainWindow.__init__(self)
self.setWindowTitle("Signal filtering 2 (guiqwt)")
self.setWindowIcon(get_icon('guiqwt.svg'))
hlayout = QHBoxLayout()
central_widget = QWidget(self)
central_widget.setLayout(hlayout)
self.setCentralWidget(central_widget)
#---guiqwt plot manager
self.manager = PlotManager(self)
#---
def add_plot(self, x, y, func, title):
widget = FilterTestWidget(self, x, y, func)
widget.setup_widget(title)
self.centralWidget().layout().addWidget(widget)
#---Register plot to manager
self.manager.add_plot(widget.plot)
#---
def setup_window(self):
#---Add toolbar and register manager tools
toolbar = self.addToolBar("tools")
self.manager.add_toolbar(toolbar, id(toolbar))
self.manager.register_all_curve_tools()
#---
def test():
"""Testing this simple Qt/guiqwt example"""
from guidata.qt.QtGui import QApplication
import numpy as np
import scipy.signal as sps, scipy.ndimage as spi
app = QApplication([])
win = TestWindow()
x = np.linspace(-10, 10, 500)
y = np.random.rand(len(x))+5*np.sin(2*x**2)/x
win.add_plot(x, y, lambda x: spi.gaussian_filter1d(x, 1.), "Gaussian")
win.add_plot(x, y, sps.wiener, "Wiener")
#---Setup window
win.setup_window()
#---
win.show()
app.exec_()
if __name__ == '__main__':
test()
Construct a PlotManager object, a ‘controller’ that organizes relations between plots (i.e. guiqwt.curve.CurvePlot or guiqwt.image.ImagePlot objects), panels, tools (see guiqwt.tools) and toolbars
Register a panel to the plot manager
Register a separator tool to the plot manager: the separator tool is just a tool which insert a separator in the plot context menu
Add toolbar to the plot manager toolbar: a QToolBar object toolbar_id: toolbar’s id (default id is string “default”)
Call all the registred panels ‘configure_panel’ methods to finalize the object construction (this allows to use tools registered to the same plot manager as the panel itself with breaking the registration sequence: “add plots, then panels, then tools”)
Return the active plot
The active plot is the plot whose canvas has the focus otherwise it’s the “default” plot
Return widget context menu – built using active tools
Convenience function to get the contrast adjustment panel
Return None if the contrast adjustment panel has not been added to this manager
Return default plot
The default plot is the plot on which tools and panels will act.
Convenience function to get the item list panel
Return None if the item list panel has not been added to this manager
Return the main (parent) widget
Note that for py:class:guiqwt.plot.CurveWidget or guiqwt.plot.ImageWidget objects, this method will return the widget itself because the plot manager is integrated to it.
Return plot associated to plot_id (if method is called without specifying the plot_id parameter, return the default plot)
Return toolbar from its ID toolbar_id: toolbar’s id (default id is string “default”)
Convenience function to get the X-axis cross section panel
Return None if the X-axis cross section panel has not been added to this manager
Convenience function to get the Y-axis cross section panel
Return None if the Y-axis cross section panel has not been added to this manager
Register standard, curve-related and other tools
See also
methods
guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_curve_tools() guiqwt.plot.PlotManager.register_image_tools() guiqwt.plot.PlotManager.register_all_image_tools()
Register standard, image-related and other tools
See also
methods
guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_curve_tools() guiqwt.plot.PlotManager.register_image_tools() guiqwt.plot.PlotManager.register_all_curve_tools()
Register only curve-related tools
See also
methods
guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_image_tools()
Register only image-related tools
See also
methods
guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_curve_tools()
Register other common tools
See also
methods
guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_curve_tools() guiqwt.plot.PlotManager.register_image_tools()
Registering basic tools for standard plot dialog –> top of the context-menu
Set active tool (if tool argument is None, the active tool will be the default tool)
Convenience function to set the contrast adjustment panel range
This is strictly equivalent to the following:
# Here, *widget* is for example a CurveWidget instance
# (the same apply for CurvePlot, ImageWidget, ImagePlot or any
# class deriving from PlotManager)
widget.get_contrast_panel().set_range(zmin, zmax)
Set default plot
The default plot is the plot on which tools and panels will act.
Convenience function to update the cross section panels at once
This is strictly equivalent to the following:
# Here, *widget* is for example a CurveWidget instance
# (the same apply for CurvePlot, ImageWidget, ImagePlot or any
# class deriving from PlotManager)
widget.get_xcs_panel().update_plot()
widget.get_ycs_panel().update_plot()
Construct a CurveWidget object: plotting widget with integrated plot manager
- parent: parent widget
- title: plot title
- xlabel: (bottom axis title, top axis title) or bottom axis title only
- ylabel: (left axis title, right axis title) or left axis title only
- xunit: (bottom axis unit, top axis unit) or bottom axis unit only
- yunit: (left axis unit, right axis unit) or left axis unit only
- panels (optional): additionnal panels (list, tuple)
Construct a CurveDialog object: plotting dialog box with integrated plot manager
- wintitle: window title
- icon: window icon
- edit: editable state
- toolbar: show/hide toolbar
- options: options sent to the guiqwt.curve.CurvePlot object (dictionary)
- parent: parent widget
- panels (optional): additionnal panels (list, tuple)
Install standard buttons (OK, Cancel) in dialog button box layout (guiqwt.plot.CurveDialog.button_layout)
This method may be overriden to customize the button box
Construct a ImageWidget object: plotting widget with integrated plot manager
- parent: parent widget
- title: plot title (string)
- xlabel, ylabel, zlabel: resp. bottom, left and right axis titles (strings)
- xunit, yunit, zunit: resp. bottom, left and right axis units (strings)
- yreverse: reversing Y-axis (bool)
- aspect_ratio: height to width ratio (float)
- lock_aspect_ratio: locking aspect ratio (bool)
- show_contrast: showing contrast adjustment tool (bool)
- show_xsection: showing x-axis cross section plot (bool)
- show_ysection: showing y-axis cross section plot (bool)
- xsection_pos: x-axis cross section plot position (string: “top”, “bottom”)
- ysection_pos: y-axis cross section plot position (string: “left”, “right”)
- panels (optional): additionnal panels (list, tuple)
Construct a ImageDialog object: plotting dialog box with integrated plot manager
- wintitle: window title
- icon: window icon
- edit: editable state
- toolbar: show/hide toolbar
- options: options sent to the guiqwt.image.ImagePlot object (dictionary)
- parent: parent widget
- panels (optional): additionnal panels (list, tuple)
The builder module provides a builder singleton class used to simplify the creation of plot items.
Before creating any widget, a QApplication must be instantiated (that is a Qt internal requirement):
>>> import guidata
>>> app = guidata.qapplication()
that is mostly equivalent to the following (the only difference is that the guidata helper function also installs the Qt translation corresponding to the system locale):
>>> from PyQt4.QtGui import QApplication
>>> app = QApplication([])
now that a QApplication object exists, we may create the plotting widget:
>>> from guiqwt.plot import ImageWidget
>>> widget = ImageWidget()
create curves, images, histograms, etc. and attach them to the plot:
>>> from guiqwt.builder import make
>>> curve = make.mcure(x, y, 'r+')
>>> image = make.image(data)
>>> hist = make.histogram(data, 100)
>>> for item in (curve, image, hist):
... widget.plot.add_item()
and then show the widget to screen:
>>> widget.show()
>>> app.exec_()
This is just a bare class used to regroup a set of factory functions in a single object
Make an annotated circle plot item (guiqwt.annotations.AnnotatedCircle object)
- x0, y0, x1, y1: circle diameter coordinates
- title, subtitle: strings
Make an annotated ellipse plot item (guiqwt.annotations.AnnotatedEllipse object)
- x0, y0, x1, y1: ellipse rectangle coordinates
- ratio: ratio between y-axis and x-axis lengths
- title, subtitle: strings
Make an annotated rectangle plot item (guiqwt.annotations.AnnotatedRectangle object)
- x0, y0, x1, y1: rectangle coordinates
- title, subtitle: strings
Make an annotated segment plot item (guiqwt.annotations.AnnotatedSegment object)
- x0, y0, x1, y1: segment coordinates
- title, subtitle: strings
Make a circle shape plot item (guiqwt.shapes.EllipseShape object)
- x0, y0, x1, y1: circle diameter coordinates
- title: label name (optional)
Make a computation label plot item (guiqwt.label.DataInfoLabel object) (see example: guiqwt.tests.computations)
Make a 2D computation label plot item (guiqwt.label.RangeComputation2d object) (see example: guiqwt.tests.computations)
Make computation labels plot item (guiqwt.label.DataInfoLabel object) (see example: guiqwt.tests.computations)
Make 2D computation labels plot item (guiqwt.label.RangeComputation2d object) (see example: guiqwt.tests.computations)
Return image bounds from pixel_size (scalar or tuple)
Make a curve plot item from x, y, data (guiqwt.curve.CurveItem object)
- x: 1D NumPy array
- y: 1D NumPy array
- color: curve color name
- linestyle: curve line style (MATLAB-like string or attribute name from the PyQt4.QtCore.Qt.PenStyle enum (i.e. “SolidLine” “DashLine”, “DotLine”, “DashDotLine”, “DashDotDotLine” or “NoPen”)
- linewidth: line width (pixels)
- marker: marker shape (MATLAB-like string or attribute name from the PyQt4.Qwt5.QwtSymbol.Style enum (i.e. “Cross”, “Ellipse”, “Star1”, “XCross”, “Rect”, “Diamond”, “UTriangle”, “DTriangle”, “RTriangle”, “LTriangle”, “Star2” or “NoSymbol”)
- markersize: marker size (pixels)
- markerfacecolor: marker face color name
- markeredgecolor: marker edge color name
- shade: 0 <= float <= 1 (curve shade)
- fitted: boolean (fit curve to data)
- curvestyle: attribute name from the PyQt4.Qwt5.QwtPlotCurve.CurveStyle enum (i.e. “Lines”, “Sticks”, “Steps”, “Dots” or “NoCurve”)
- curvetype: attribute name from the PyQt4.Qwt5.QwtPlotCurve.CurveType enum (i.e. “Yfx” or “Xfy”)
- baseline (float: default=0.0): the baseline is needed for filling the curve with a brush or the Sticks drawing style. The interpretation of the baseline depends on the curve type (horizontal line for “Yfx”, vertical line for “Xfy”)
- xaxis, yaxis: X/Y axes bound to curve
Examples: curve(x, y, marker=’Ellipse’, markerfacecolor=’#ffffff’) which is equivalent to (MATLAB-style support): curve(x, y, marker=’o’, markerfacecolor=’w’)
Make an ellipse shape plot item (guiqwt.shapes.EllipseShape object)
- x0, y0, x1, y1: ellipse x-axis coordinates
- title: label name (optional)
Make an errorbar curve plot item (guiqwt.curve.ErrorBarCurveItem object)
- x: 1D NumPy array
- y: 1D NumPy array
- dx: None, or scalar, or 1D NumPy array
- dy: None, or scalar, or 1D NumPy array
- color: curve color name
- linestyle: curve line style (MATLAB-like string or attribute name from the PyQt4.QtCore.Qt.PenStyle enum (i.e. “SolidLine” “DashLine”, “DotLine”, “DashDotLine”, “DashDotDotLine” or “NoPen”)
- linewidth: line width (pixels)
- marker: marker shape (MATLAB-like string or attribute name from the PyQt4.Qwt5.QwtSymbol.Style enum (i.e. “Cross”, “Ellipse”, “Star1”, “XCross”, “Rect”, “Diamond”, “UTriangle”, “DTriangle”, “RTriangle”, “LTriangle”, “Star2” or “NoSymbol”)
- markersize: marker size (pixels)
- markerfacecolor: marker face color name
- markeredgecolor: marker edge color name
- shade: 0 <= float <= 1 (curve shade)
- fitted: boolean (fit curve to data)
- curvestyle: attribute name from the PyQt4.Qwt5.QwtPlotCurve.CurveStyle enum (i.e. “Lines”, “Sticks”, “Steps”, “Dots” or “NoCurve”)
- curvetype: attribute name from the PyQt4.Qwt5.QwtPlotCurve.CurveType enum (i.e. “Yfx” or “Xfy”)
- baseline (float: default=0.0): the baseline is needed for filling the curve with a brush or the Sticks drawing style. The interpretation of the baseline depends on the curve type (horizontal line for “Yfx”, vertical line for “Xfy”)
- xaxis, yaxis: X/Y axes bound to curve
Style: tuple (style, color, width)
Style: tuple (style, color, width)
Make an horizontal cursor plot item
Convenient function to make an horizontal marker (guiqwt.shapes.Marker object)
Make 1D Histogram plot item (guiqwt.histogram.HistogramItem object)
- data (1D NumPy array)
- bins: number of bins (int)
- logscale: Y-axis scale (bool)
Make a 2D Histogram plot item (guiqwt.image.Histogram2DItem object)
- X: data (1D array)
- Y: data (1D array)
- NX: Number of bins along x-axis (int)
- NY: Number of bins along y-axis (int)
- logscale: Z-axis scale (bool)
- title: item title (string)
- transparent: enable transparency (bool)
Make an image plot item from data (guiqwt.image.ImageItem object or guiqwt.image.RGBImageItem object if data has 3 dimensions)
Make a rectangular area image filter plot item (guiqwt.image.ImageFilterItem object)
- xmin, xmax, ymin, ymax: filter area bounds
- imageitem: An imageitem instance
- filter: function (x, y, data) –> data
Make an info label plot item (guiqwt.label.DataInfoLabel object)
Make a label plot item (guiqwt.label.LabelItem object)
- text: label text (string)
- g: position in plot coordinates (tuple) or relative position (string)
- c: position in canvas coordinates (tuple)
- anchor: anchor position in relative position (string)
- title: label name (optional)
Make a legend plot item (guiqwt.label.LegendBoxItem or guiqwt.label.SelectedLegendBoxItem object)
anchor: legend position in relative position (string)
c (optional): position in canvas coordinates (tuple)
- restrict_items (optional):
- None: all items are shown in legend box
- []: no item shown
- [item1, item2]: item1, item2 are shown in legend box
Make a marker plot item (guiqwt.shapes.Marker object)
- position: tuple (x, y)
- label_cb: function with two arguments (x, y) returning a string
- constraint_cb: function with two arguments (x, y) returning a tuple (x, y) according to the marker constraint
- movable: if True (default), marker will be movable
- readonly: if False (default), marker can be deleted
- markerstyle: ‘+’, ‘-‘, ‘|’ or None
- markerspacing: spacing between text and marker line
- color: marker color name
- linestyle: marker line style (MATLAB-like string or attribute name from the PyQt4.QtCore.Qt.PenStyle enum (i.e. “SolidLine” “DashLine”, “DotLine”, “DashDotLine”, “DashDotDotLine” or “NoPen”)
- linewidth: line width (pixels)
- marker: marker shape (MATLAB-like string or attribute name from the PyQt4.Qwt5.QwtSymbol.Style enum (i.e. “Cross”, “Ellipse”, “Star1”, “XCross”, “Rect”, “Diamond”, “UTriangle”, “DTriangle”, “RTriangle”, “LTriangle”, “Star2” or “NoSymbol”)
- markersize: marker size (pixels)
- markerfacecolor: marker face color name
- markeredgecolor: marker edge color name
Make a masked image plot item from data (guiqwt.image.MaskedImageItem object)
Make a curve plot item based on MATLAB-like syntax (may returns a list of curves if data contains more than one signal) (guiqwt.curve.CurveItem object)
Example: mcurve(x, y, ‘r+’)
Make an errorbar curve plot item based on MATLAB-like syntax (guiqwt.curve.ErrorBarCurveItem object)
Example: mcurve(x, y, ‘r+’)
Make a pseudocolor plot item of a 2D array based on MATLAB-like syntax (guiqwt.image.QuadGridItem object)
Make a curve plot item based on a guiqwt.styles.CurveParam instance (guiqwt.curve.CurveItem object)
Usage: pcurve(x, y, param)
Make an errorbar curve plot item based on a guiqwt.styles.ErrorBarParam instance (guiqwt.curve.ErrorBarCurveItem object)
- x: 1D NumPy array
- y: 1D NumPy array
- dx: None, or scalar, or 1D NumPy array
- dy: None, or scalar, or 1D NumPy array
- curveparam: guiqwt.styles.CurveParam object
- errorbarparam: guiqwt.styles.ErrorBarParam object
- xaxis, yaxis: X/Y axes bound to curve
Usage: perror(x, y, dx, dy, curveparam, errorbarparam)
Make 1D histogram plot item (guiqwt.histogram.HistogramItem object) based on a guiqwt.styles.CurveParam and guiqwt.styles.HistogramParam instances
Usage: phistogram(data, curveparam, histparam)
Make a pseudocolor plot item of a 2D array (guiqwt.image.QuadGridItem object)
Make an info label plot item showing an XRangeSelection object infos
Default function is lambda x, dx: (x, dx).
x = linspace(-10, 10, 10) y = sin(sin(sin(x))) range = make.range(-2, 2) disp = make.range_info_label(range, ‘BL’, “x = %.1f ± %.1f cm”,
lambda x, dx: (x, dx))
(guiqwt.label.DataInfoLabel object) (see example: guiqwt.tests.computations)
Make a rectangle shape plot item (guiqwt.shapes.RectangleShape object)
- x0, y0, x1, y1: rectangle coordinates
- title: label name (optional)
Make a RGB image plot item from data (guiqwt.image.RGBImageItem object)
Make a segment shape plot item (guiqwt.shapes.SegmentShape object)
- x0, y0, x1, y1: segment coordinates
- title: label name (optional)
Make a transformable image plot item (image with an arbitrary affine transform) (guiqwt.image.TrImageItem object)
- data: 2D NumPy array (image pixel data)
- filename: image filename (if data is not specified)
- title: image title (optional)
- x0, y0: position
- angle: angle (radians)
- dx, dy: pixel size along X and Y axes
- interpolation: ‘nearest’, ‘linear’ (default), ‘antialiasing’ (5x5)
Make a vertical cursor plot item
Convenient function to make a vertical marker (guiqwt.shapes.Marker object)
Make an cross cursor plot item
Convenient function to make an cross marker (guiqwt.shapes.Marker object)
Make an xyimage plot item (image with non-linear X/Y axes) from data (guiqwt.image.XYImageItem object)
- x: 1D NumPy array
- y: 1D NumPy array
- data: 2D NumPy array (image pixel data)
- title: image title (optional)
- interpolation: ‘nearest’, ‘linear’ (default), ‘antialiasing’ (5x5)
The panels module provides guiqwt.curve.PanelWidget (the panel widget class from which all panels must derived) and identifiers for each kind of panel:
- guiqwt.panels.ID_ITEMLIST: ID of the item list panel
- guiqwt.panels.ID_CONTRAST: ID of the contrast adjustment panel
- guiqwt.panels.ID_XCS: ID of the X-axis cross section panel
- guiqwt.panels.ID_YCS: ID of the Y-axis cross section panel
See also
The signals module contains constants defining the custom Qt SIGNAL objects used by guiqwt: the signals definition are gathered here to avoid mispelling signals at connect and emit sites.
Emitted by plot when an IBasePlotItem-like object was moved from (x0, y0) to (x1, y1)
Arguments: item object, x0, y0, x1, y1
Emitted by plot when a guiqwt.shapes.Marker position changes
Arguments: guiqwt.shapes.Marker object
Emitted by plot when a guiqwt.shapes.Axes position (or angle) changes
Arguments: guiqwt.shapes.Axes object
Emitted by plot when an annotations.AnnotatedShape position changes
Arguments: annotation item
Emitted by plot when a shapes.XRangeSelection range changes
Arguments: range object, lower_bound, upper_bound
Emitted by plot when item list has changed (item removed, added, ...)
Arguments: plot
Emitted by plot when selected item has changed
Arguments: plot
Emitted by plot when an item was deleted from the itemlist or using the delete item tool
Arguments: removed item
Emitted by plot when an item is selected
Arguments: plot
Emitted (by plot) when plot’s title or any axis label has changed
Arguments: plot
Emitted (by plot) when any plot axis direction has changed
Arguments: plot
Emitted by plot when LUT has been changed by the user
Arguments: plot
Emitted by plot when image mask has changed
Arguments: MaskedImageItem object
Emitted for example by panels when their visibility has changed
Arguments: state (boolean)
Emitted by an interactive tool to notify that the tool has just been “validated”, i.e. <ENTER>, <RETURN> or <SPACE> was pressed
Arguments: filter
The baseplot module provides the guiqwt plotting widget base class: guiqwt.baseplot.BasePlot. This is an enhanced version of PyQwt‘s QwtPlot plotting widget which supports the following features:
- add to plot, del from plot, hide/show and save/restore plot items easily
- item selection and multiple selection
- active item
- plot parameters editing
Warning
guiqwt.baseplot.BasePlot is rather an internal class than a ready-to-use plotting widget. The end user should prefer using guiqwt.plot.CurvePlot or guiqwt.plot.ImagePlot.
See also
An enhanced QwtPlot class that provides methods for handling plotitems and axes better
It distinguishes activatable items from basic QwtPlotItems.
Activatable items must support IBasePlotItem interface and should be added to the plot using add_item methods.
Signals: SIG_ITEMS_CHANGED, SIG_ACTIVE_ITEM_CHANGED
QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()
Add a plot item instance to this plot widget
Add a plot item instance within a specified z range, over zmin
QWidget.childAt(int, int) -> QWidget
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
QWidget.customContextMenuRequested[QPoint] [signal]
See also guiqwt.baseplot.BasePlot.save_items_to_hdf5()
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
Re-apply the axis scales so as to disable autoscaling without changing the view
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
Enable only used axes For now, this is needed only by the pyplot interface
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Return active item Force item activation if there is no active item
Return AxesParam dataset class associated to item’s type
Return axis ID from axis name If axis ID is passed directly, check the ID
Return the name (‘lin’ or ‘log’) of the scale used by axis
Return widget context menu
Return widget’s item list (items are based on IBasePlotItem’s interface)
Return last active item corresponding to passed item_type
Return maximum z-order for all items registered in plot If there is no item, return 0
Return nearest item from position ‘pos’ If close_dist > 0: return the first found item (higher z) which
distance to ‘pos’ is less than close_dist
else: return the closest item
Return nearest item for which position ‘pos’ is inside of it (iterate over items with respect to their ‘z’ coordinate)
Return a list of DataSets for a given parameter key the datasets will be edited and passed back to set_plot_parameters
this is a generic interface to help building context menus using the BasePlotMenuTool
Return widget’s private item list (items are based on IBasePlotItem’s interface)
Return widget’s public item list (items are based on IBasePlotItem’s interface)
QWidget.grabMouse(QCursor)
Hide items (if items is None, hide all items)
Invalidate paint cache and schedule redraw use instead of replot when only the content of the canvas needs redrawing (axes, shouldn’t change)
QWidget.move(int, int)
Move item(s) down, i.e. to the background (swap item with the previous item in z-order)
item: plot item or list of plot items
Return True if items have been moved effectively
Move item(s) up, i.e. to the foreground (swap item with the next item in z-order)
item: plot item or list of plot items
Return True if items have been moved effectively
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Read axes styles from section and options (one option for each axis in the order left, right, bottom, top)
Skip axis if option is None
QWidget.render(QPainter, QPoint targetOffset=QPoint(), QRegion sourceRegion=QRegion(), QWidget.RenderFlags flags=QWidget.DrawWindowBackground|QWidget.DrawChildren)
QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)
QWidget.resize(int, int)
QWidget.scroll(int, int, QRect)
See also guiqwt.baseplot.BasePlot.restore_items_from_hdf5()
QWidget.setBaseSize(QSize)
QWidget.setContentsMargins(QMargins)
QWidget.setFixedSize(int, int)
QWidget.setFocus(Qt.FocusReason)
QWidget.setGeometry(int, int, int, int)
QWidget.setMask(QRegion)
QWidget.setMaximumSize(QSize)
QWidget.setMinimumSize(QSize)
QWidget.setParent(QWidget, Qt.WindowFlags)
QWidget.setSizeIncrement(QSize)
QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)
Set axis color color: color name (string) or QColor instance
Set axis limits (minimum and maximum values) and optional step size
Set axis scale Example: self.set_axis_scale(curve.yAxis(), ‘lin’)
Set axis maximum number of major ticks and maximum of minor ticks
Show/hide item and emit a SIG_ITEMS_CHANGED signal
Utility function used to quickly setup a plot with a set of items
Set all items readonly state to state Default item’s readonly state: False (items may be deleted)
Set the associated guiqwt.plot.PlotManager instance
Set active curve scales Example: self.set_scales(‘lin’, ‘lin’)
Show items (if items is None, show all items)
QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)
CurveItem and GridItem objects are plot items (derived from QwtPlotItem) that may be displayed on a 2D plotting widget like guiqwt.curve.CurvePlot or guiqwt.image.ImagePlot.
See also
>>> import guidata
>>> app = guidata.qapplication()
- that is mostly equivalent to the following (the only difference is that the guidata helper function also installs the Qt translation corresponding to the system locale):
>>> from PyQt4.QtGui import QApplication
>>> app = QApplication([])
- now that a QApplication object exists, we may create the plotting widget:
>>> from guiqwt.curve import CurvePlot
>>> plot = CurvePlot(title="Example", xlabel="X", ylabel="Y")
>>> from guiqwt.curve import CurveItem
>>> from guiqwt.styles import CurveParam
>>> param = CurveParam()
>>> param.label = 'My curve'
>>> curve = CurveItem(param)
>>> curve.set_data(x, y)
- or using the plot item builder (see guiqwt.builder.make()):
>>> from guiqwt.builder import make
>>> curve = make.curve(x, y, title='My curve')
Attach the curve to the plotting widget:
>>> plot.add_item(curve)
Display the plotting widget:
>>> plot.show()
>>> app.exec_()
Construct a 2D curve plotting widget (this class inherits guiqwt.baseplot.BasePlot)
parent: parent widget
title: plot title
xlabel: (bottom axis title, top axis title) or bottom axis title only
ylabel: (left axis title, right axis title) or left axis title only
xunit: (bottom axis unit, top axis unit) or bottom axis unit only
yunit: (left axis unit, right axis unit) or left axis unit only
gridparam: GridParam instance
- axes_synchronised: keep all x and y axes synchronised when zomming or
panning
alias of ICurveItemType
QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()
Add a plot item instance to this plot widget * item: QwtPlotItem (PyQt4.Qwt5) object implementing
the IBasePlotItem interface (guiqwt.interfaces)
Add a plot item instance within a specified z range, over zmin
QWidget.childAt(int, int) -> QWidget
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Copy widget’s window to clipboard
QWidget.customContextMenuRequested[QPoint] [signal]
Remove item from widget Convenience function (see ‘del_items’)
Remove item from widget
See also guiqwt.baseplot.BasePlot.save_items_to_hdf5()
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
Re-apply the axis scales so as to disable autoscaling without changing the view
Disable unused axes
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
Translate the active axes by dx, dy dx, dy are tuples composed of (initial pos, dest pos)
Change the scale of the active axes (zoom/dezoom) according to dx, dy dx, dy are tuples composed of (initial pos, dest pos) We try to keep initial pos fixed on the canvas as the scale changes
Edit axis parameters
Edit plot parameters
Enable only used axes For now, this is needed only by the pyplot interface
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Return active axes
Return active item Force item activation if there is no active item
Return AxesParam dataset class associated to item’s type
Get axis color (color name, i.e. string)
Return axis direction of increasing values * axis_id: axis id (BasePlot.Y_LEFT, BasePlot.X_BOTTOM, ...)
or string: ‘bottom’, ‘left’, ‘top’ or ‘right’
Get axis font
Return axis ID from axis name If axis ID is passed directly, check the ID
Return axis limits (minimum and maximum values)
Return the name (‘lin’ or ‘log’) of the scale used by axis
Get axis title
Get axis unit
Return widget context menu
Return default item, depending on plot’s default item type (e.g. for a curve plot, this is a curve item type).
Return nothing if there is more than one item matching the default item type.
Return widget’s item list (items are based on IBasePlotItem’s interface)
Return last active item corresponding to passed item_type
Return maximum z-order for all items registered in plot If there is no item, return 0
Return nearest item from position ‘pos’ If close_dist > 0: return the first found item (higher z) which
distance to ‘pos’ is less than close_dist
else: return the closest item
Return nearest item for which position ‘pos’ is inside of it (iterate over items with respect to their ‘z’ coordinate)
Return widget’s private item list (items are based on IBasePlotItem’s interface)
Return widget’s public item list (items are based on IBasePlotItem’s interface)
Return active curve scales
Return selected items
Get plot title
QWidget.grabMouse(QCursor)
Hide items (if items is None, hide all items)
Invalidate paint cache and schedule redraw use instead of replot when only the content of the canvas needs redrawing (axes, shouldn’t change)
Reimplement QWidget method
QWidget.move(int, int)
Move item(s) down, i.e. to the background (swap item with the previous item in z-order)
item: plot item or list of plot items
Return True if items have been moved effectively
Move item(s) up, i.e. to the foreground (swap item with the next item in z-order)
item: plot item or list of plot items
Return True if items have been moved effectively
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Read axes styles from section and options (one option for each axis in the order left, right, bottom, top)
Skip axis if option is None
QWidget.render(QPainter, QPoint targetOffset=QPoint(), QRegion sourceRegion=QRegion(), QWidget.RenderFlags flags=QWidget.DrawWindowBackground|QWidget.DrawChildren)
QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)
QWidget.resize(int, int)
QWidget.scroll(int, int, QRect)
Select all selectable items
Select item
Select items
See also guiqwt.baseplot.BasePlot.restore_items_from_hdf5()
QWidget.setBaseSize(QSize)
QWidget.setContentsMargins(QMargins)
QWidget.setFixedSize(int, int)
QWidget.setFocus(Qt.FocusReason)
QWidget.setGeometry(int, int, int, int)
QWidget.setMask(QRegion)
QWidget.setMaximumSize(QSize)
QWidget.setMinimumSize(QSize)
QWidget.setParent(QWidget, Qt.WindowFlags)
QWidget.setSizeIncrement(QSize)
QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)
Override base set_active_item to change the grid’s axes according to the selected item
Set axis color color: color name (string) or QColor instance
Set axis direction of increasing values * axis_id: axis id (BasePlot.Y_LEFT, BasePlot.X_BOTTOM, ...)
or string: ‘bottom’, ‘left’, ‘top’ or ‘right’
Set axis font
Set axis limits (minimum and maximum values)
Set axis scale Example: self.set_axis_scale(curve.yAxis(), ‘lin’)
Set axis maximum number of major ticks and maximum of minor ticks
Set axis title
Set axis unit
Show/hide item and emit a SIG_ITEMS_CHANGED signal
Utility function used to quickly setup a plot with a set of items
Set all items readonly state to state Default item’s readonly state: False (items may be deleted)
Set the associated guiqwt.plot.PlotManager instance
Set plot scale limits
Set pointer. Valid values of pointer_type:
- None: disable pointer
- “canvas”: enable canvas pointer
- “curve”: enable on-curve pointer
Set active curve scales Example: self.set_scales(‘lin’, ‘lin’)
Set plot title
Set plot and axes titles at once * title: plot title * xlabel: (bottom axis title, top axis title)
or bottom axis title only
Reimplement Qwt method
Show items (if items is None, show all items)
Preferred size
Unselect all selected items
Unselect item
QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)
Update all axes styles
Update axis style
Construct a curve plot item with the parameters curveparam (see guiqwt.styles.CurveParam)
Renvoie les coordonnées (x’,y’) du point le plus proche de (x,y) Méthode surchargée pour ErrorBarSignalCurve pour renvoyer les coordonnées des pointes des barres d’erreur
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Construct an error-bar curve plot item with the parameters errorbarparam (see guiqwt.styles.ErrorBarParam)
Return error-bar curve data: x, y, dx, dy * x: NumPy array * y: NumPy array * dx: float or NumPy array (non-constant error bars) * dy: float or NumPy array (non-constant error bars)
Calcul de la distance d’un point à une courbe renvoie (dist, handle, inside)
Return True if item data is empty
Return True if object is private
Return object readonly state
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Set error-bar curve data: * x: NumPy array * y: NumPy array * dx: float or NumPy array (non-constant error bars) * dy: float or NumPy array (non-constant error bars)
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
The image module provides image-related objects and functions:
- guiqwt.image.ImagePlot: a 2D curve and image plotting widget, derived from guiqwt.curve.CurvePlot
- guiqwt.image.ImageItem: simple images
- guiqwt.image.TrImageItem: images supporting arbitrary affine transform
- guiqwt.image.XYImageItem: images with non-linear X/Y axes
- guiqwt.image.Histogram2DItem: 2D histogram
- guiqwt.image.ImageFilterItem: rectangular filtering area that may be resized and moved onto the processed image
- guiqwt.image.assemble_imageitems()
- guiqwt.image.get_plot_source_rect()
- guiqwt.image.get_image_from_plot()
ImageItem, TrImageItem, XYImageItem, Histogram2DItem and ImageFilterItem objects are plot items (derived from QwtPlotItem) that may be displayed on a guiqwt.image.ImagePlot plotting widget.
See also
>>> import guidata
>>> app = guidata.qapplication()
- that is mostly equivalent to the following (the only difference is that the guidata helper function also installs the Qt translation corresponding to the system locale):
>>> from PyQt4.QtGui import QApplication
>>> app = QApplication([])
- now that a QApplication object exists, we may create the plotting widget:
>>> from guiqwt.image import ImagePlot
>>> plot = ImagePlot(title="Example")
Generate random data for testing purpose:
>>> import numpy as np
>>> data = np.random.rand(100, 100)
>>> from guiqwt.curve import ImageItem
>>> from guiqwt.styles import ImageParam
>>> param = ImageParam()
>>> param.label = 'My image'
>>> image = ImageItem(param)
>>> image.set_data(data)
- or using the plot item builder (see guiqwt.builder.make()):
>>> from guiqwt.builder import make
>>> image = make.image(data, title='My image')
Attach the image to the plotting widget:
>>> plot.add_item(image)
Display the plotting widget:
>>> plot.show()
>>> app.exec_()
Construct a 2D curve and image plotting widget (this class inherits guiqwt.curve.CurvePlot)
- parent: parent widget
- title: plot title (string)
- xlabel, ylabel, zlabel: resp. bottom, left and right axis titles (strings)
- xunit, yunit, zunit: resp. bottom, left and right axis units (strings)
- yreverse: reversing y-axis direction of increasing values (bool)
- aspect_ratio: height to width ratio (float)
- lock_aspect_ratio: locking aspect ratio (bool)
alias of IImageItemType
QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()
Add a plot item instance to this plot widget
z: item’s z order (None -> z = max(self.get_items())+1) autoscale: True -> rescale plot to fit image bounds
Add a plot item instance within a specified z range, over zmin
QWidget.childAt(int, int) -> QWidget
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Copy widget’s window to clipboard
QWidget.customContextMenuRequested[QPoint] [signal]
Del all items, eventually (default) except grid
Remove item from widget Convenience function (see ‘del_items’)
Remove item from widget
See also guiqwt.baseplot.BasePlot.save_items_to_hdf5()
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
Re-apply the axis scales so as to disable autoscaling without changing the view
Disable unused axes
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
Translate the active axes by dx, dy dx, dy are tuples composed of (initial pos, dest pos)
Edit plot parameters
Enable only used axes For now, this is needed only by the pyplot interface
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Return active axes
Return active item Force item activation if there is no active item
Return AxesParam dataset class associated to item’s type
Get axis color (color name, i.e. string)
Return axis direction of increasing values * axis_id: axis id (BasePlot.Y_LEFT, BasePlot.X_BOTTOM, ...)
or string: ‘bottom’, ‘left’, ‘top’ or ‘right’
Get axis font
Return axis ID from axis name If axis ID is passed directly, check the ID
Return axis limits (minimum and maximum values)
Return the name (‘lin’ or ‘log’) of the scale used by axis
Get axis title
Get axis unit
Return widget context menu
Return default item, depending on plot’s default item type (e.g. for a curve plot, this is a curve item type).
Return nothing if there is more than one item matching the default item type.
Return widget’s item list (items are based on IBasePlotItem’s interface)
Return last active item corresponding to passed item_type
Return maximum z-order for all items registered in plot If there is no item, return 0
Return nearest item from position ‘pos’ If close_dist > 0: return the first found item (higher z) which
distance to ‘pos’ is less than close_dist
else: return the closest item
Return nearest item for which position ‘pos’ is inside of it (iterate over items with respect to their ‘z’ coordinate)
Return plot scale limits
Return widget’s private item list (items are based on IBasePlotItem’s interface)
Return widget’s public item list (items are based on IBasePlotItem’s interface)
Return active curve scales
Return selected items
Get plot title
QWidget.grabMouse(QCursor)
Hide items (if items is None, hide all items)
Invalidate paint cache and schedule redraw use instead of replot when only the content of the canvas needs redrawing (axes, shouldn’t change)
Reimplement QWidget method
QWidget.move(int, int)
Move item(s) down, i.e. to the background (swap item with the previous item in z-order)
item: plot item or list of plot items
Return True if items have been moved effectively
Move item(s) up, i.e. to the foreground (swap item with the next item in z-order)
item: plot item or list of plot items
Return True if items have been moved effectively
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Read axes styles from section and options (one option for each axis in the order left, right, bottom, top)
Skip axis if option is None
QWidget.render(QPainter, QPoint targetOffset=QPoint(), QRegion sourceRegion=QRegion(), QWidget.RenderFlags flags=QWidget.DrawWindowBackground|QWidget.DrawChildren)
QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)
QWidget.resize(int, int)
QWidget.scroll(int, int, QRect)
Select all selectable items
Select item
Select items
See also guiqwt.baseplot.BasePlot.restore_items_from_hdf5()
QWidget.setBaseSize(QSize)
QWidget.setContentsMargins(QMargins)
QWidget.setFixedSize(int, int)
QWidget.setFocus(Qt.FocusReason)
QWidget.setGeometry(int, int, int, int)
QWidget.setMask(QRegion)
QWidget.setMaximumSize(QSize)
QWidget.setMinimumSize(QSize)
QWidget.setParent(QWidget, Qt.WindowFlags)
QWidget.setSizeIncrement(QSize)
QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)
Override base set_active_item to change the grid’s axes according to the selected item
Toggle curve antialiasing
Set axis color color: color name (string) or QColor instance
Set axis direction of increasing values * axis_id: axis id (BasePlot.Y_LEFT, BasePlot.X_BOTTOM, ...)
or string: ‘bottom’, ‘left’, ‘top’ or ‘right’
Set axis font
Set axis limits (minimum and maximum values)
Set axis scale Example: self.set_axis_scale(curve.yAxis(), ‘lin’)
Set axis maximum number of major ticks and maximum of minor ticks
Set axis title
Set axis unit
Show/hide item and emit a SIG_ITEMS_CHANGED signal
Utility function used to quickly setup a plot with a set of items
Set all items readonly state to state Default item’s readonly state: False (items may be deleted)
Set the associated guiqwt.plot.PlotManager instance
Set plot scale limits
Set pointer. Valid values of pointer_type:
- None: disable pointer
- “canvas”: enable canvas pointer
- “curve”: enable on-curve pointer
Set active curve scales Example: self.set_scales(‘lin’, ‘lin’)
Set plot title
Set plot and axes titles at once * title: plot title * xlabel: (bottom axis title, top axis title)
or bottom axis title only
Show items (if items is None, show all items)
Preferred size
Unselect all selected items
Unselect item
QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)
Update all axes styles
Update axis style
Draw image with painter on canvasRect <!> src_rect and dst_rect are coord tuples (xleft, ytop, xright, ybottom)
Export Region Of Interest to array
Return average cross section along x-axis
Return average cross section along y-axis
Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation
Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)
Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)
Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)
Return image data Arguments:
x0, y0 [, x1, y1]
Return image level at coordinates (x0,y0) If x1,y1 are specified:
return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
Return (image) pixel coordinates Transform the plot coordinates (arbitrary plot Z-axis unit) into the image coordinates (pixel unit)
Rounding is necessary to obtain array indexes from these coordinates
Return plot coordinates Transform the image coordinates (pixel unit) into the plot coordinates (arbitrary plot Z-axis unit)
Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Set image interpolation mode
interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size
Align rectangular shape to image pixels
Draw image border rectangle
Draw image with painter on canvasRect <!> src_rect and dst_rect are coord tuples (xleft, ytop, xright, ybottom)
Export Region Of Interest to array
Return average cross section along x-axis
Return average cross section along y-axis
Return closest image pixel coordinates
Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation
Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)
Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)
Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)
Return image data Arguments:
x0, y0 [, x1, y1]
Return image level at coordinates (x0,y0) If x1,y1 are specified:
return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
Provides a filter object over this image’s content
interface de IHistDataSource
Get interpolation mode
Return the LUT transform range tuple: (min, max)
Return full dynamic range
Get maximum range for this dataset
Return (image) pixel coordinates Transform the plot coordinates (arbitrary plot Z-axis unit) into the image coordinates (pixel unit)
Rounding is necessary to obtain array indexes from these coordinates
Return plot coordinates Transform the image coordinates (pixel unit) into the plot coordinates (arbitrary plot Z-axis unit)
Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)
Return cross section along x-axis at y=y0
Return cross section along y-axis at x=x0
Return True if item data is empty
Return True if object is private
Return object readonly state
Load data from filename and eventually apply specified lut_range filename has been set using method ‘set_filename’
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Set Image item data * data: 2D NumPy array * lut_range: LUT range – tuple (levelmin, levelmax)
Set image interpolation mode
interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size
Set LUT transform range lut_range is a tuple: (min, max)
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Update image border rectangle to fit image shape
Align rectangular shape to image pixels
Draw image border rectangle
Export Region Of Interest to array
Return average cross section along x-axis
Return average cross section along y-axis
Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation
Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)
Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)
Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)
Return image data Arguments:
x0, y0 [, x1, y1]
Return image level at coordinates (x0,y0) If x1,y1 are specified:
return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
Provides a filter object over this image’s content
interface de IHistDataSource
Get interpolation mode
Return the LUT transform range tuple: (min, max)
Return full dynamic range
Get maximum range for this dataset
Return (image) pixel coordinates (from plot coordinates)
Return plot coordinates (from image pixel coordinates)
Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)
Return cross section along x-axis at y=y0
Return cross section along y-axis at x=x0
Return True if item data is empty
Return True if object is private
Return object readonly state
Load data from filename and eventually apply specified lut_range filename has been set using method ‘set_filename’
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Set Image item data * data: 2D NumPy array * lut_range: LUT range – tuple (levelmin, levelmax)
Set image interpolation mode
interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size
Set LUT transform range lut_range is a tuple: (min, max)
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Update image border rectangle to fit image shape
Align rectangular shape to image pixels
Deserialize object from HDF5 reader
Export Region Of Interest to array
Return average cross section along x-axis
Return average cross section along y-axis
Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation
Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)
Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)
Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)
Return image data Arguments:
x0, y0 [, x1, y1]
Return image level at coordinates (x0,y0) If x1,y1 are specified:
return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
interface de IHistDataSource
Get interpolation mode
Return the LUT transform range tuple: (min, max)
Return full dynamic range
Get maximum range for this dataset
Return (image) pixel coordinates (from plot coordinates)
Return plot coordinates (from image pixel coordinates)
Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)
Return cross section along x-axis at y=y0
Return cross section along y-axis at x=x0
Return True if item data is empty
Return True if object is private
Return object readonly state
Load data from filename and eventually apply specified lut_range filename has been set using method ‘set_filename’
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Serialize object to HDF5 writer
Set image interpolation mode
interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size
Set LUT transform range lut_range is a tuple: (min, max)
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Align rectangular shape to image pixels
Draw image border rectangle
Export Region Of Interest to array
Return average cross section along x-axis
Return average cross section along y-axis
Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation
Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)
Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)
Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)
Return image data Arguments:
x0, y0 [, x1, y1]
Return image level at coordinates (x0,y0) If x1,y1 are specified:
return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
interface de IHistDataSource
Get interpolation mode
Return the LUT transform range tuple: (min, max)
Return full dynamic range
Get maximum range for this dataset
Return (image) pixel coordinates (from plot coordinates)
Return plot coordinates (from image pixel coordinates)
Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)
Return cross section along x-axis at y=y0
Return cross section along y-axis at x=x0
Return True if item data is empty
Return True if object is private
Return object readonly state
Load data from filename and eventually apply specified lut_range filename has been set using method ‘set_filename’
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Set Image item data * data: 2D NumPy array * lut_range: LUT range – tuple (levelmin, levelmax)
Set image interpolation mode
interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size
Set LUT transform range lut_range is a tuple: (min, max)
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Update image border rectangle to fit image shape
(last dimension: 0:Red, 1:Green, 2:Blue[, 3:Alpha]) * param (optional): image parameters
(guiqwt.styles.RGBImageParam instance)
Align rectangular shape to image pixels
Deserialize object from HDF5 reader
Draw image border rectangle
Export Region Of Interest to array
Return average cross section along x-axis
Return average cross section along y-axis
Return closest image pixel coordinates
Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation
Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)
Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)
Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)
Return image data Arguments:
x0, y0 [, x1, y1]
Return image level at coordinates (x0,y0) If x1,y1 are specified:
return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
Provides a filter object over this image’s content
interface de IHistDataSource
Get interpolation mode
Return the LUT transform range tuple: (min, max)
Return full dynamic range
Get maximum range for this dataset
Return (image) pixel coordinates (from plot coordinates)
Return plot coordinates (from image pixel coordinates)
Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)
Return (xmin, xmax)
Return cross section along x-axis at y=y0
Return (ymin, ymax)
Return cross section along y-axis at x=x0
Return True if item data is empty
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Serialize object to HDF5 writer
Set image interpolation mode
interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Update image border rectangle to fit image shape
Align rectangular shape to image pixels
Draw image border rectangle
Export Region Of Interest to array
Return average cross section along x-axis
Return average cross section along y-axis
Return closest image pixel coordinates
Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation
Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)
Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)
Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)
Return image data Arguments:
x0, y0 [, x1, y1]
Return image level at coordinates (x0,y0) If x1,y1 are specified:
return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
Provides a filter object over this image’s content
interface de IHistDataSource
Get interpolation mode
Return the LUT transform range tuple: (min, max)
Return full dynamic range
Get maximum range for this dataset
Return (image) pixel coordinates (from plot coordinates)
Return plot coordinates (from image pixel coordinates)
Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)
Return (xmin, xmax)
Return cross section along x-axis at y=y0
Return (ymin, ymax)
Return cross section along y-axis at x=x0
Return True if item data is empty
Return True if object is private
Return object readonly state
Load data from filename and eventually apply specified lut_range filename has been set using method ‘set_filename’
Mask circular area, inside the rectangle (x0, y0, x1, y1), i.e. circle with a radius of .5*(x1-x0) If inside is True (default), mask the inside of the area Otherwise, mask the outside
Mask rectangular area If inside is True (default), mask the inside of the area Otherwise, mask the outside
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Set Image item data * data: 2D NumPy array * lut_range: LUT range – tuple (levelmin, levelmax)
Set image interpolation mode
interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size
Set LUT transform range lut_range is a tuple: (min, max)
Set mask filename There are two ways for pickling mask data of MaskedImageItem objects:
- using the mask filename (as for data itself)
- using the mask areas (MaskedAreas instance, see set_mask_areas)
When saving objects, the first method is tried and then, if no filename has been defined for mask data, the second method is used.
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Update image border rectangle to fit image shape
Align rectangular shape to image pixels
Draw image border rectangle
Draw image with painter on canvasRect <!> src_rect and dst_rect are coord tuples (xleft, ytop, xright, ybottom)
Export Region Of Interest to array
Return average cross section along x-axis
Return average cross section along y-axis
Return closest image pixel coordinates
Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation
Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)
Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)
Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)
Return image data Arguments:
x0, y0 [, x1, y1]
Return image level at coordinates (x0,y0) If x1,y1 are specified:
return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
Return instance of the default imageparam DataSet
Provides a filter object over this image’s content
interface de IHistDataSource
Get interpolation mode
Return full dynamic range
Get maximum range for this dataset
Return (image) pixel coordinates Transform the plot coordinates (arbitrary plot Z-axis unit) into the image coordinates (pixel unit)
Rounding is necessary to obtain array indexes from these coordinates
Return plot coordinates Transform the image coordinates (pixel unit) into the plot coordinates (arbitrary plot Z-axis unit)
Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)
Return cross section along x-axis at y=y0
Return cross section along y-axis at x=x0
Return True if item data is empty
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Set the image item on which the filter will be applied * image: guiqwt.image.RawImageItem instance
Set image interpolation mode
interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Update image border rectangle to fit image shape
Align rectangular shape to image pixels
Draw image border rectangle
Export Region Of Interest to array
Return average cross section along x-axis
Return average cross section along y-axis
Return closest image pixel coordinates
Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation
Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)
Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)
Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)
Return image data Arguments:
x0, y0 [, x1, y1]
Return image level at coordinates (x0,y0) If x1,y1 are specified:
return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
Return instance of the default imageparam DataSet
Provides a filter object over this image’s content
interface de IHistDataSource
Get interpolation mode
Return full dynamic range
Get maximum range for this dataset
Return (image) pixel coordinates Transform the plot coordinates (arbitrary plot Z-axis unit) into the image coordinates (pixel unit)
Rounding is necessary to obtain array indexes from these coordinates
Return plot coordinates Transform the image coordinates (pixel unit) into the plot coordinates (arbitrary plot Z-axis unit)
Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)
Return cross section along x-axis at y=y0
Return cross section along y-axis at x=x0
Return True if item data is empty
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Set the filter function * filter: function (x, y, data) –> data
Set the image item on which the filter will be applied * image: guiqwt.image.XYImageItem instance
Set image interpolation mode
interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Update image border rectangle to fit image shape
Align rectangular shape to image pixels
Draw image border rectangle
Export Region Of Interest to array
Return average cross section along x-axis
Return average cross section along y-axis
Return closest image pixel coordinates
Return closest image rectangular pixel area index bounds Avoid returning empty rectangular area (return 1x1 pixel area instead) Handle reversed/not-reversed Y-axis orientation
Return closest image pixel indexes corner: None (not a corner), ‘TL’ (top-left corner), ‘BR’ (bottom-right corner)
Return closest pixel indexes Instead of returning indexes of an image pixel like the method ‘get_closest_indexes’, this method returns the indexes of the closest pixel which is not necessarily on the image itself (i.e. indexes may be outside image index bounds: negative or superior than the image dimension)
Note: this is not the same as retrieving the canvas pixel coordinates (which depends on the zoom level)
Return image data Arguments:
x0, y0 [, x1, y1]
Return image level at coordinates (x0,y0) If x1,y1 are specified:
return image levels (np.ndarray) in rectangular area (x0,y0,x1,y1)
Return instance of the default imageparam DataSet
Provides a filter object over this image’s content
Get interpolation mode
Return the LUT transform range tuple: (min, max)
Return full dynamic range
Get maximum range for this dataset
Return (image) pixel coordinates Transform the plot coordinates (arbitrary plot Z-axis unit) into the image coordinates (pixel unit)
Rounding is necessary to obtain array indexes from these coordinates
Return plot coordinates Transform the image coordinates (pixel unit) into the plot coordinates (arbitrary plot Z-axis unit)
Return formatted string with stats on image rectangular area (output should be compatible with AnnotatedShape.get_infos)
Return cross section along x-axis at y=y0
Return cross section along y-axis at x=x0
Return True if item data is empty
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Set image interpolation mode
interp_mode: INTERP_NEAREST, INTERP_LINEAR, INTERP_AA size (integer): (for anti-aliasing only) AA matrix size
Set LUT transform range lut_range is a tuple: (min, max)
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Update image border rectangle to fit image shape
Assemble together image items in qrect (QRectF object) and return resulting pixel data <!> Does not support XYImageItem objects
Return QRectF rectangle object in plot coordinates from top-left and bottom-right QPoint objects in canvas coordinates
Return pixel data of a rectangular plot area (image items only) p0, p1: resp. top-left and bottom-right points (QPoint objects) apply_lut: apply contrast settings add_images: add superimposed images (instead of replace by the foreground)
Support only the image items implementing the IExportROIImageItemType interface, i.e. this does not support XYImageItem objects
HistogramItem objects are plot items (derived from QwtPlotItem) that may be displayed on a 2D plotting widget like guiqwt.curve.CurvePlot or guiqwt.image.ImagePlot.
Simple histogram plotting example:
# -*- coding: utf-8 -*-
#
# Copyright © 2009-2010 CEA
# Pierre Raybaut
# Licensed under the terms of the CECILL License
# (see guiqwt/__init__.py for details)
"""Histogram test"""
SHOW = True # Show test in GUI-based test launcher
from guiqwt.plot import CurveDialog
from guiqwt.builder import make
def test():
"""Test"""
from numpy.random import normal
data = normal(0, 1, (2000, ))
win = CurveDialog(edit=False, toolbar=True, wintitle="Histogram test")
plot = win.get_plot()
plot.add_item(make.histogram(data))
win.show()
win.exec_()
if __name__ == "__main__":
# Create QApplication
import guidata
_app = guidata.qapplication()
test()
A Qwt item representing histogram data
Return the bounding rectangle of the data
Deserialize object from HDF5 reader
Renvoie les coordonnées (x’,y’) du point le plus proche de (x,y) Méthode surchargée pour ErrorBarSignalCurve pour renvoyer les coordonnées des pointes des barres d’erreur
Return curve data x, y (NumPy arrays)
Return histogram source (source: object with method ‘get_histogram’, e.g. objects derived from guiqwt.image.ImageItem)
Calcul de la distance d’un point à une courbe renvoie (dist, handle, inside)
Return True if item data is empty
Return True if object is private
Return object readonly state
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Serialize object to HDF5 writer
Set curve data: * x: NumPy array * y: NumPy array
Set histogram source (source: object with method ‘get_histogram’, e.g. objects derived from guiqwt.image.ImageItem)
Sets whether we use a logarithm or linear scale for the histogram counts
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Contrast adjustment tool
QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()
QWidget.childAt(int, int) -> QWidget
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Add to parent QMainWindow as a dock widget
QWidget.customContextMenuRequested[QPoint] [signal]
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
QWidget.grabMouse(QCursor)
QWidget.move(int, int)
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
QWidget.render(QPainter, QPoint targetOffset=QPoint(), QRegion sourceRegion=QRegion(), QWidget.RenderFlags flags=QWidget.DrawWindowBackground|QWidget.DrawChildren)
QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)
QWidget.resize(int, int)
QWidget.scroll(int, int, QRect)
QWidget.setBaseSize(QSize)
QWidget.setContentsMargins(QMargins)
QWidget.setFixedSize(int, int)
QWidget.setFocus(Qt.FocusReason)
QWidget.setGeometry(int, int, int, int)
QWidget.setMask(QRegion)
QWidget.setMaximumSize(QSize)
QWidget.setMinimumSize(QSize)
QWidget.setParent(QWidget, Qt.WindowFlags)
QWidget.setSizeIncrement(QSize)
QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)
QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)
DockWidget visibility has changed
Image levels histogram widget
alias of ICurveItemType
QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()
Add a plot item instance to this plot widget * item: QwtPlotItem (PyQt4.Qwt5) object implementing
the IBasePlotItem interface (guiqwt.interfaces)
Add a plot item instance within a specified z range, over zmin
QWidget.childAt(int, int) -> QWidget
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Copy widget’s window to clipboard
QWidget.customContextMenuRequested[QPoint] [signal]
Del all items, eventually (default) except grid
Remove item from widget Convenience function (see ‘del_items’)
Remove item from widget
See also guiqwt.baseplot.BasePlot.save_items_to_hdf5()
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
Re-apply the axis scales so as to disable autoscaling without changing the view
Disable unused axes
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
Do autoscale on all axes
Translate the active axes by dx, dy dx, dy are tuples composed of (initial pos, dest pos)
Change the scale of the active axes (zoom/dezoom) according to dx, dy dx, dy are tuples composed of (initial pos, dest pos) We try to keep initial pos fixed on the canvas as the scale changes
Edit axis parameters
Edit plot parameters
Eliminate outliers: eliminate percent/2*N counts on each side of the histogram (where N is the total count number)
Enable only used axes For now, this is needed only by the pyplot interface
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Return active axes
Return active item Force item activation if there is no active item
Return AxesParam dataset class associated to item’s type
Get axis color (color name, i.e. string)
Return axis direction of increasing values * axis_id: axis id (BasePlot.Y_LEFT, BasePlot.X_BOTTOM, ...)
or string: ‘bottom’, ‘left’, ‘top’ or ‘right’
Get axis font
Return axis ID from axis name If axis ID is passed directly, check the ID
Return axis limits (minimum and maximum values)
Return the name (‘lin’ or ‘log’) of the scale used by axis
Get axis title
Get axis unit
Return widget context menu
Return default item, depending on plot’s default item type (e.g. for a curve plot, this is a curve item type).
Return nothing if there is more than one item matching the default item type.
Return widget’s item list (items are based on IBasePlotItem’s interface)
Return last active item corresponding to passed item_type
Return maximum z-order for all items registered in plot If there is no item, return 0
Return nearest item from position ‘pos’ If close_dist > 0: return the first found item (higher z) which
distance to ‘pos’ is less than close_dist
else: return the closest item
Return nearest item for which position ‘pos’ is inside of it (iterate over items with respect to their ‘z’ coordinate)
Return plot scale limits
Return widget’s private item list (items are based on IBasePlotItem’s interface)
Return widget’s public item list (items are based on IBasePlotItem’s interface)
Return active curve scales
Return selected items
Get plot title
QWidget.grabMouse(QCursor)
Hide items (if items is None, hide all items)
Invalidate paint cache and schedule redraw use instead of replot when only the content of the canvas needs redrawing (axes, shouldn’t change)
Reimplement QWidget method
QWidget.move(int, int)
Move item(s) down, i.e. to the background (swap item with the previous item in z-order)
item: plot item or list of plot items
Return True if items have been moved effectively
Move item(s) up, i.e. to the foreground (swap item with the next item in z-order)
item: plot item or list of plot items
Return True if items have been moved effectively
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Read axes styles from section and options (one option for each axis in the order left, right, bottom, top)
Skip axis if option is None
QWidget.render(QPainter, QPoint targetOffset=QPoint(), QRegion sourceRegion=QRegion(), QWidget.RenderFlags flags=QWidget.DrawWindowBackground|QWidget.DrawChildren)
QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)
QWidget.resize(int, int)
QWidget.scroll(int, int, QRect)
Select all selectable items
Select item
Select items
See also guiqwt.baseplot.BasePlot.restore_items_from_hdf5()
QWidget.setBaseSize(QSize)
QWidget.setContentsMargins(QMargins)
QWidget.setFixedSize(int, int)
QWidget.setFocus(Qt.FocusReason)
QWidget.setGeometry(int, int, int, int)
QWidget.setMask(QRegion)
QWidget.setMaximumSize(QSize)
QWidget.setMinimumSize(QSize)
QWidget.setParent(QWidget, Qt.WindowFlags)
QWidget.setSizeIncrement(QSize)
QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)
Override base set_active_item to change the grid’s axes according to the selected item
Toggle curve antialiasing
Set axis color color: color name (string) or QColor instance
Set axis direction of increasing values * axis_id: axis id (BasePlot.Y_LEFT, BasePlot.X_BOTTOM, ...)
or string: ‘bottom’, ‘left’, ‘top’ or ‘right’
Set axis font
Set axis limits (minimum and maximum values)
Set axis scale Example: self.set_axis_scale(curve.yAxis(), ‘lin’)
Set axis maximum number of major ticks and maximum of minor ticks
Set axis title
Set axis unit
Show/hide item and emit a SIG_ITEMS_CHANGED signal
Utility function used to quickly setup a plot with a set of items
Set all items readonly state to state Default item’s readonly state: False (items may be deleted)
Set the associated guiqwt.plot.PlotManager instance
Set plot scale limits
Set pointer. Valid values of pointer_type:
- None: disable pointer
- “canvas”: enable canvas pointer
- “curve”: enable on-curve pointer
Set active curve scales Example: self.set_scales(‘lin’, ‘lin’)
Set plot title
Set plot and axes titles at once * title: plot title * xlabel: (bottom axis title, top axis title)
or bottom axis title only
Reimplement Qwt method
Show items (if items is None, show all items)
Preferred size
Unselect all selected items
Unselect item
QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)
Update all axes styles
Update axis style
Simple cross-section demo:
# -*- coding: utf-8 -*-
#
# Copyright © 2009-2010 CEA
# Pierre Raybaut
# Licensed under the terms of the CECILL License
# (see guiqwt/__init__.py for details)
"""Renders a cross section chosen by a cross marker"""
SHOW = True # Show test in GUI-based test launcher
import os.path as osp, numpy as np
from guiqwt.plot import ImageDialog
from guiqwt.builder import make
def create_window():
win = ImageDialog(edit=False, toolbar=True, wintitle="Cross sections test",
options=dict(show_xsection=True, show_ysection=True))
win.resize(600, 600)
return win
def test():
"""Test"""
# -- Create QApplication
import guidata
_app = guidata.qapplication()
# --
filename = osp.join(osp.dirname(__file__), "brain.png")
win = create_window()
image = make.image(filename=filename, colormap="bone")
data2 = np.array(image.data.T[200:], copy=True)
image2 = make.image(data2, title="Modified", alpha_mask=True)
plot = win.get_plot()
plot.add_item(image)
plot.add_item(image2, z=1)
win.exec_()
if __name__ == "__main__":
test()
X-axis cross section widget
alias of XCrossSectionPlot
QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()
QWidget.childAt(int, int) -> QWidget
Configure panel
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Add to parent QMainWindow as a dock widget
Cross section curve has just changed
QWidget.customContextMenuRequested[QPoint] [signal]
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
QWidget.grabMouse(QCursor)
QWidget.move(int, int)
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Register panel to plot manager
QWidget.render(QPainter, QPoint targetOffset=QPoint(), QRegion sourceRegion=QRegion(), QWidget.RenderFlags flags=QWidget.DrawWindowBackground|QWidget.DrawChildren)
QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)
QWidget.resize(int, int)
QWidget.scroll(int, int, QRect)
QWidget.setBaseSize(QSize)
QWidget.setContentsMargins(QMargins)
QWidget.setFixedSize(int, int)
QWidget.setFocus(Qt.FocusReason)
QWidget.setGeometry(int, int, int, int)
QWidget.setMask(QRegion)
QWidget.setMaximumSize(QSize)
QWidget.setMinimumSize(QSize)
QWidget.setParent(QWidget, Qt.WindowFlags)
QWidget.setSizeIncrement(QSize)
QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)
QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)
Update cross section curve(s) associated to object obj
obj may be a marker or a rectangular shape (see guiqwt.tools.CrossSectionTool and guiqwt.tools.AverageCrossSectionTool)
If obj is None, update the cross sections of the last active object
DockWidget visibility has changed
Y-axis cross section widget parent (QWidget): parent widget position (string): “left” or “right”
alias of YCrossSectionPlot
QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()
QWidget.childAt(int, int) -> QWidget
Configure panel
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Add to parent QMainWindow as a dock widget
Cross section curve has just changed
QWidget.customContextMenuRequested[QPoint] [signal]
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
QWidget.grabMouse(QCursor)
QWidget.move(int, int)
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Register panel to plot manager
QWidget.render(QPainter, QPoint targetOffset=QPoint(), QRegion sourceRegion=QRegion(), QWidget.RenderFlags flags=QWidget.DrawWindowBackground|QWidget.DrawChildren)
QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)
QWidget.resize(int, int)
QWidget.scroll(int, int, QRect)
QWidget.setBaseSize(QSize)
QWidget.setContentsMargins(QMargins)
QWidget.setFixedSize(int, int)
QWidget.setFocus(Qt.FocusReason)
QWidget.setGeometry(int, int, int, int)
QWidget.setMask(QRegion)
QWidget.setMaximumSize(QSize)
QWidget.setMinimumSize(QSize)
QWidget.setParent(QWidget, Qt.WindowFlags)
QWidget.setSizeIncrement(QSize)
QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)
QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)
Update cross section curve(s) associated to object obj
obj may be a marker or a rectangular shape (see guiqwt.tools.CrossSectionTool and guiqwt.tools.AverageCrossSectionTool)
If obj is None, update the cross sections of the last active object
DockWidget visibility has changed
An annotated shape is a plot item (derived from QwtPlotItem) that may be displayed on a 2D plotting widget like guiqwt.curve.CurvePlot or guiqwt.image.ImagePlot.
See also
module guiqwt.shapes
>>> from guiqwt.annotations import AnnotatedCircle
>>> from guiqwt.styles import AnnotationParam
>>> param = AnnotationParam()
>>> param.title = 'My circle'
>>> circle_item = AnnotatedCircle(0., 2., 4., 0., param)
- or using the plot item builder (see guiqwt.builder.make()):
>>> from guiqwt.builder import make
>>> circle_item = make.annotated_circle(0., 2., 4., 0., title='My circle')
Construct an annotated point at coordinates (x, y) with properties set with annotationparam (see guiqwt.styles.AnnotationParam)
Return the label object associated to this annotated shape object
Deserialize object from HDF5 reader
Return shape center coordinates: (xc, yc)
Return text associated to current shape (see guiqwt.label.ObjectInfo)
Return shape center coordinates after applying transform matrix
Return center coordinates as a string (with units)
Return shape size after applying transform matrix
Return size as a string (with units)
Return True if associated label is visible
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Serialize object to HDF5 writer
Set the annotated shape’s label visibility
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Update the annotated shape’s label contents
Convert x (float) to a string (with associated unit and uncertainty)
Convert y (float) to a string (with associated unit and uncertainty)
Construct an annotated segment between coordinates (x1, y1) and (x2, y2) with properties set with annotationparam (see guiqwt.styles.AnnotationParam)
Return the label object associated to this annotated shape object
Return the shape object associated to this annotated shape object
Deserialize object from HDF5 reader
Return shape center coordinates: (xc, yc)
Return text associated to current shape (see guiqwt.label.ObjectInfo)
Return shape center coordinates after applying transform matrix
Return center coordinates as a string (with units)
Return shape size after applying transform matrix
Return size as a string (with units)
Return True if associated label is visible
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Serialize object to HDF5 writer
Set the annotated shape’s label visibility
Set item movable state
Set object as private
Set object readonly state
Set the coordinates of the shape’s top-left corner to (x1, y1), and of its bottom-right corner to (x2, y2).
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Update the annotated shape’s label contents
Convert x (float) to a string (with associated unit and uncertainty)
Convert y (float) to a string (with associated unit and uncertainty)
Construct an annotated rectangle between coordinates (x1, y1) and (x2, y2) with properties set with annotationparam (see guiqwt.styles.AnnotationParam)
Return the label object associated to this annotated shape object
Return the shape object associated to this annotated shape object
Deserialize object from HDF5 reader
Return shape center coordinates: (xc, yc)
Return text associated to current shape (see guiqwt.label.ObjectInfo)
Return center coordinates as a string (with units)
Return size as a string (with units)
Return True if associated label is visible
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Serialize object to HDF5 writer
Set the annotated shape’s label visibility
Set item movable state
Set object as private
Set object readonly state
Set the coordinates of the shape’s top-left corner to (x1, y1), and of its bottom-right corner to (x2, y2).
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Update the annotated shape’s label contents
Convert x (float) to a string (with associated unit and uncertainty)
Convert y (float) to a string (with associated unit and uncertainty)
Construct an annotated oblique rectangle between coordinates (x0, y0), (x1, y1), (x2, y2) and (x3, y3) with properties set with annotationparam (see guiqwt.styles.AnnotationParam)
Return the label object associated to this annotated shape object
Deserialize object from HDF5 reader
Return shape center coordinates: (xc, yc)
Return formatted string with informations on current shape
Return the coordinates of the shape’s top-left and bottom-right corners
Return text associated to current shape (see guiqwt.label.ObjectInfo)
Return X-diameter angle with horizontal direction, after applying transform matrix
Return shape center coordinates after applying transform matrix
Return center coordinates as a string (with units)
Return size as a string (with units)
Return True if associated label is visible
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Serialize object to HDF5 writer
Set the annotated shape’s label visibility
Set item movable state
Set object as private
Set object readonly state
Set the rectangle corners coordinates: (x0, y0): top-left corner (x1, y1): top-right corner (x2, y2): bottom-right corner (x3, y3): bottom-left corner
x: additionnal points
(x3, y3)<——(x2, y2)
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Update the annotated shape’s label contents
Convert x (float) to a string (with associated unit and uncertainty)
Convert y (float) to a string (with associated unit and uncertainty)
Construct an annotated ellipse with X-axis diameter between coordinates (x1, y1) and (x2, y2) and properties set with annotationparam (see guiqwt.styles.AnnotationParam)
Return the label object associated to this annotated shape object
Return the shape object associated to this annotated shape object
Deserialize object from HDF5 reader
Return shape center coordinates: (xc, yc)
Return text associated to current shape (see guiqwt.label.ObjectInfo)
Return X-diameter angle with horizontal direction, after applying transform matrix
Return center coordinates as a string (with units)
Return size as a string (with units)
Return the coordinates of the ellipse’s X-axis diameter Warning: transform matrix is not applied here
Return the coordinates of the ellipse’s Y-axis diameter Warning: transform matrix is not applied here
Return True if associated label is visible
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Serialize object to HDF5 writer
Set the annotated shape’s label visibility
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Set the coordinates of the ellipse’s X-axis diameter Warning: transform matrix is not applied here
Set the coordinates of the ellipse’s Y-axis diameter Warning: transform matrix is not applied here
Unselect item
Update the annotated shape’s label contents
Convert x (float) to a string (with associated unit and uncertainty)
Convert y (float) to a string (with associated unit and uncertainty)
Construct an annotated circle with diameter between coordinates (x1, y1) and (x2, y2) and properties set with annotationparam (see guiqwt.styles.AnnotationParam)
Return the label object associated to this annotated shape object
Return the shape object associated to this annotated shape object
Deserialize object from HDF5 reader
Return shape center coordinates: (xc, yc)
Return text associated to current shape (see guiqwt.label.ObjectInfo)
Return X-diameter angle with horizontal direction, after applying transform matrix
Return center coordinates: (xc, yc)
Return center coordinates as a string (with units)
Return shape size after applying transform matrix
Return size as a string (with units)
Return the coordinates of the ellipse’s X-axis diameter Warning: transform matrix is not applied here
Return the coordinates of the ellipse’s Y-axis diameter Warning: transform matrix is not applied here
Return True if associated label is visible
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Serialize object to HDF5 writer
Set label position, for instance based on shape position
Set the annotated shape’s label visibility
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Set the coordinates of the ellipse’s X-axis diameter Warning: transform matrix is not applied here
Set the coordinates of the ellipse’s Y-axis diameter Warning: transform matrix is not applied here
Unselect item
Update the annotated shape’s label contents
Convert x (float) to a string (with associated unit and uncertainty)
Convert y (float) to a string (with associated unit and uncertainty)
A shape is a plot item (derived from QwtPlotItem) that may be displayed on a 2D plotting widget like guiqwt.curve.CurvePlot or guiqwt.image.ImagePlot.
See also
module guiqwt.annotations
>>> from guiqwt.shapes import RectangleShape
>>> from guiqwt.styles import ShapeParam
>>> param = ShapeParam()
>>> param.title = 'My rectangle'
>>> rect_item = RectangleShape(0., 2., 4., 0., param)
- or using the plot item builder (see guiqwt.builder.make()):
>>> from guiqwt.builder import make
>>> rect_item = make.rectangle(0., 2., 4., 0., title='My rectangle')
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Deserialize object from HDF5 reader
Return bounding rectangle coordinates (in plot coordinates)
Return polygon points
return (dist, handle, inside)
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Serialize object to HDF5 writer
Set item movable state
Set object as private
Set object readonly state
Set the coordinates of the rectangle’s top-left corner to (x1, y1), and of its bottom-right corner to (x2, y2).
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Deserialize object from HDF5 reader
Return bounding rectangle coordinates (in plot coordinates)
Return polygon points
return (dist, handle, inside)
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Serialize object to HDF5 writer
Set item movable state
Set object as private
Set object readonly state
Set the rectangle corners coordinates: (x0, y0): top-left corner (x1, y1): top-right corner (x2, y2): bottom-right corner (x3, y3): bottom-left corner
x: additionnal points (handles used for rotation – other handles being used for rectangle resizing)
(x3, y3)<——(x2, y2)
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Deserialize object from HDF5 reader
Return bounding rectangle coordinates (in plot coordinates)
Return polygon points
return (dist, handle, inside)
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Serialize object to HDF5 writer
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Deserialize object from HDF5 reader
Return bounding rectangle coordinates (in plot coordinates)
Return polygon points
return (dist, handle, inside)
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Serialize object to HDF5 writer
Set item movable state
Set object as private
Set object readonly state
Set the start point of this segment to (x1, y1) and the end point of this line to (x2, y2)
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Deserialize object from HDF5 reader
Return bounding rectangle coordinates (in plot coordinates)
Return polygon points
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Serialize object to HDF5 writer
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Axes( (0,1), (1,1), (0,0) )
Return bounding rectangle coordinates (in plot coordinates)
Return polygon points
return (dist, handle, inside)
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Returns a group or category for this item this should be a class object inheriting from IItemType
Unselect item
A label or a legend is a plot item (derived from QwtPlotItem) that may be displayed on a 2D plotting widget like guiqwt.curve.CurvePlot or guiqwt.image.ImagePlot.
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Deserialize object from HDF5 reader
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Serialize object to HDF5 writer
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
Deserialize object from HDF5 reader
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Serialize object to HDF5 writer
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
ObjectInfo showing curve computations relative to a XRangeSelection shape.
label: formatted string curve: CurveItem object xrangeselection: XRangeSelection object function: input arguments are x, y arrays (extraction of arrays corresponding to the xrangeselection X-axis range)
Deserialize object from HDF5 reader
Return True if object is private
Return object readonly state
Move a handle as returned by hit_test to the new position pos ctrl: True if <Ctrl> button is being pressed, False otherwise
Translate the shape such that old_pos becomes new_pos in canvas coordinates
Translate the shape together with other selected items delta_x, delta_y: translation in plot coordinates
Select item
Serialize object to HDF5 writer
Set item movable state
Set object as private
Set object readonly state
Set item resizable state (or any action triggered when moving an handle, e.g. rotation)
Set item rotatable state
Set item selectable state
Unselect item
A plot tool is an object providing various features to a plotting widget (guiqwt.curve.CurvePlot or guiqwt.image.ImagePlot): buttons, menus, selection tools, image I/O tools, etc. To make it work, a tool has to be registered to the plotting widget’s manager, i.e. an instance of the guiqwt.plot.PlotManager class (see the guiqwt.plot module for more details on the procedure).
The CurvePlot and ImagePlot widgets do not provide any PlotManager: the manager has to be created separately. On the contrary, the ready-to-use widgets guiqwt.plot.CurveWidget and guiqwt.plot.ImageWidget are higher-level plotting widgets with integrated manager, tools and panels.
See also
The following example add all the existing tools to an ImageWidget object for testing purpose:
import os.path as osp
from guiqwt.plot import ImageDialog
from guiqwt.tools import (RectangleTool, EllipseTool, HRangeTool, PlaceAxesTool,
MultiLineTool, FreeFormTool, SegmentTool, CircleTool,
AnnotatedRectangleTool, AnnotatedEllipseTool,
AnnotatedSegmentTool, AnnotatedCircleTool, LabelTool,
AnnotatedPointTool,
VCursorTool, HCursorTool, XCursorTool,
ObliqueRectangleTool, AnnotatedObliqueRectangleTool)
from guiqwt.builder import make
def create_window():
win = ImageDialog(edit=False, toolbar=True,
wintitle="All image and plot tools test")
for toolklass in (LabelTool, HRangeTool,
VCursorTool, HCursorTool, XCursorTool,
SegmentTool, RectangleTool, ObliqueRectangleTool,
CircleTool, EllipseTool,
MultiLineTool, FreeFormTool, PlaceAxesTool,
AnnotatedRectangleTool, AnnotatedObliqueRectangleTool,
AnnotatedCircleTool, AnnotatedEllipseTool,
AnnotatedSegmentTool, AnnotatedPointTool):
win.add_tool(toolklass)
return win
def test():
"""Test"""
# -- Create QApplication
import guidata
_app = guidata.qapplication()
# --
filename = osp.join(osp.dirname(__file__), "brain.png")
win = create_window()
image = make.image(filename=filename, colormap="bone")
plot = win.get_plot()
plot.add_item(image)
win.exec_()
if __name__ == "__main__":
test()
Activate tool
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Graphical Object Selection Tool
Activate tool
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
We create a new shape if it’s the first point otherwise we add a new point
moving while holding the button down lets the user position the last created point
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Releasing the mouse button validate the last point position
moving while holding the button down lets the user position the last created point
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Reimplemented RectangularActionTool method
To be reimplemented
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
To be reimplemented
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Reimplemented RectangularActionTool method
To be reimplemented
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
To be reimplemented
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Reimplemented RectangularActionTool method
To be reimplemented
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
To be reimplemented
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Reimplemented RectangularActionTool method
To be reimplemented
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
To be reimplemented
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Reimplemented RectangularActionTool method
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
To be reimplemented
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Reimplemented RectangularActionTool method
To be reimplemented
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
To be reimplemented
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Reimplemented RectangularActionTool method
To be reimplemented
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
To be reimplemented
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Reimplemented RectangularActionTool method
To be reimplemented
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
To be reimplemented
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Reimplemented RectangularActionTool method
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
To be reimplemented
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Reimplemented RectangularActionTool method
To be reimplemented
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
To be reimplemented
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Reimplemented RectangularActionTool method
To be reimplemented
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
To be reimplemented
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
Activate tool
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
Activate tool
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
Activate tool
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
Activate tool
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Reimplemented RectangularActionTool method
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
Method called when shape’s rectangular area has just been drawn on screen. Adding the final shape to plot and returning it.
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Reimplemented RectangularActionTool method
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
Return tool mouse cursor
Deactivate tool
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Reimplemented RectangularActionTool method
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Used to organize tools automatically in menu items
If the tool supports it, this method should install an action in the context menu
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
called by to allow derived classes to update the states of actions based on the currently active BasePlot
can also be called after an action modifying the BasePlot (e.g. in order to update action states when an item is deselected)
Activate tool
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
Edit item data (requires spyderlib)
Activate tool
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create and return tool’s action
Create and return menu for the tool’s action
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Every BasePlot using this tool should call register_plot to notify the tool about this widget using it
Used to organize tools automatically in menu items
Setup tool’s toolbar
The styles module provides set of parameters (DataSet classes) to configure plot items and plot tools.
See also
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
Histogram
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Set marker line style style:
- convenient values: ‘+’, ‘-‘, ‘|’ or None
- QwtPlotMarker.NoLine, QwtPlotMarker.Vertical, ...
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Eventually convert MATLAB-like linestyle into Qt linestyle
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
helper function that passes the visitor to the accept methods of all the items in this dataset
Check the dataset item values
Open a dialog box to edit data set * parent: parent widget (default is None, meaning no parent) * apply: apply callback (default is None) * size: dialog size (QSize object or integer tuple (width, height))
Return data set comment
Return data set icon
Return data set title
Set default values
Edit data set with text input only
Return readable string representation of the data set If debug is True, add more details on data items
Open a dialog box to view data set * parent: parent widget (default is None, meaning no parent) * size: dialog size (QSize object or integer tuple (width, height))
Return a NumPy array from an image filename fname.
If to_grayscale is True, convert RGB images to grayscale The ext (optional) argument is a string that specifies the file extension which defines the input format: when not specified, the input format is guessed from filename.
Save a NumPy array to an image filename fname.
If to_grayscale is True, convert RGB images to grayscale The ext (optional) argument is a string that specifies the file extension which defines the input format: when not specified, the input format is guessed from filename. If max_range is True, array data is scaled to fit the dtype (or data type itself if dtype is None) dynamic range Warning: option max_range changes data in place
The resizedialog module provides a dialog box providing essential GUI for entering parameters needed to resize an image: guiqwt.widgets.resizedialog.ResizeDialog.
QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()
QDialog.accepted [signal]
QWidget.childAt(int, int) -> QWidget
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
QWidget.customContextMenuRequested[QPoint] [signal]
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
QDialog.finished[int] [signal]
QWidget.grabMouse(QCursor)
QWidget.move(int, int)
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
QDialog.rejected [signal]
QWidget.render(QPainter, QPoint targetOffset=QPoint(), QRegion sourceRegion=QRegion(), QWidget.RenderFlags flags=QWidget.DrawWindowBackground|QWidget.DrawChildren)
QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)
QWidget.resize(int, int)
QWidget.scroll(int, int, QRect)
QWidget.setBaseSize(QSize)
QWidget.setContentsMargins(QMargins)
QWidget.setFixedSize(int, int)
QWidget.setFocus(Qt.FocusReason)
QWidget.setGeometry(int, int, int, int)
QWidget.setMask(QRegion)
QWidget.setMaximumSize(QSize)
QWidget.setMinimumSize(QSize)
QWidget.setParent(QWidget, Qt.WindowFlags)
QWidget.setSizeIncrement(QSize)
QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)
QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)
The rotatecrop module provides a dialog box providing essential GUI elements for rotating (arbitrary angle) and cropping an image:
- guiqwt.widgets.rotatecrop.RotateCropDialog: dialog box
- guiqwt.widgets.rotatecrop.RotateCropWidget: equivalent widget
Rotate & Crop Dialog
Rotate and crop a guiqwt.image.TrImageItem plot item
QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()
Computed rotated/cropped array and apply changes to item
QDialog.accepted [signal]
Activate default tool
Add the standard apply button
Add tool buttons to layout
Register a panel to the plot manager
Add the standard reset button
Register a separator tool to the plot manager: the separator tool is just a tool which insert a separator in the plot context menu
Add toolbar to the plot manager toolbar: a QToolBar object toolbar_id: toolbar’s id (default id is string “default”)
Apply transformation, e.g. crop or rotate
QWidget.childAt(int, int) -> QWidget
Compute transformation, return compute output array
Call all the registred panels ‘configure_panel’ methods to finalize the object construction (this allows to use tools registered to the same plot manager as the panel itself with breaking the registration sequence: “add plots, then panels, then tools”)
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
Create the plotting widget (which is an instance of class guiqwt.plot.BaseImageWidget), add it to the dialog box main layout (guiqwt.plot.CurveDialog.plot_layout) and then add the item list, contrast adjustment and X/Y axes cross section panels.
May be overriden to customize the plot layout (guiqwt.plot.CurveDialog.plot_layout)
QWidget.customContextMenuRequested[QPoint] [signal]
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
QDialog.finished[int] [signal]
Return the active plot
The active plot is the plot whose canvas has the focus otherwise it’s the “default” plot
Return active tool
Return widget context menu – built using active tools
Convenience function to get the contrast adjustment panel
Return None if the contrast adjustment panel has not been added to this manager
Return default plot
The default plot is the plot on which tools and panels will act.
Get default tool
Return default toolbar
Convenience function to get the item list panel
Return None if the item list panel has not been added to this manager
Return the main (parent) widget
Note that for py:class:guiqwt.plot.CurveWidget or guiqwt.plot.ImageWidget objects, this method will return the widget itself because the plot manager is integrated to it.
Return panel from its ID Panel IDs are listed in module guiqwt.panels
Return plot associated to plot_id (if method is called without specifying the plot_id parameter, return the default plot)
Return all registered plots
Return tool instance from its class
Return toolbar from its ID toolbar_id: toolbar’s id (default id is string “default”)
Convenience function to get the X-axis cross section panel
Return None if the X-axis cross section panel has not been added to this manager
Convenience function to get the Y-axis cross section panel
Return None if the Y-axis cross section panel has not been added to this manager
QWidget.grabMouse(QCursor)
Reimplemented ImageDialog method
QWidget.move(int, int)
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Register standard, curve-related and other tools
See also
methods
guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_curve_tools() guiqwt.plot.PlotManager.register_image_tools() guiqwt.plot.PlotManager.register_all_image_tools()
Register standard, image-related and other tools
See also
methods
guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_curve_tools() guiqwt.plot.PlotManager.register_image_tools() guiqwt.plot.PlotManager.register_all_curve_tools()
Register only curve-related tools
See also
methods
guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_image_tools()
Register only image-related tools
See also
methods
guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_other_tools() guiqwt.plot.PlotManager.register_curve_tools()
Register other common tools
See also
methods
guiqwt.plot.PlotManager.add_tool() guiqwt.plot.PlotManager.register_standard_tools() guiqwt.plot.PlotManager.register_curve_tools() guiqwt.plot.PlotManager.register_image_tools()
Registering basic tools for standard plot dialog –> top of the context-menu
Register the plotting dialog box tools: the base implementation provides standard, image-related and other tools - i.e. calling this method is exactly the same as calling guiqwt.plot.CurveDialog.register_all_image_tools()
This method may be overriden to provide a fully customized set of tools
Restore item original transform settings
QDialog.rejected [signal]
QWidget.render(QPainter, QPoint targetOffset=QPoint(), QRegion sourceRegion=QRegion(), QWidget.RenderFlags flags=QWidget.DrawWindowBackground|QWidget.DrawChildren)
QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)
Reset crop/transform image settings
Reset transformation
QWidget.resize(int, int)
Restore item original state
QWidget.scroll(int, int, QRect)
QWidget.setBaseSize(QSize)
QWidget.setContentsMargins(QMargins)
QWidget.setFixedSize(int, int)
QWidget.setFocus(Qt.FocusReason)
QWidget.setGeometry(int, int, int, int)
QWidget.setMask(QRegion)
QWidget.setMaximumSize(QSize)
QWidget.setMinimumSize(QSize)
QWidget.setParent(QWidget, Qt.WindowFlags)
QWidget.setSizeIncrement(QSize)
QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)
Set active tool (if tool argument is None, the active tool will be the default tool)
Convenience function to set the contrast adjustment panel range
This is strictly equivalent to the following:
# Here, *widget* is for example a CurveWidget instance
# (the same apply for CurvePlot, ImageWidget, ImagePlot or any
# class deriving from PlotManager)
widget.get_contrast_panel().set_range(zmin, zmax)
Set default plot
The default plot is the plot on which tools and panels will act.
Set default tool
Set default toolbar
Set associated item – must be a TrImageItem object
Show/hide cropping rectangle shape
Unset the associated item, freeing memory
QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)
Convenience function to update the cross section panels at once
This is strictly equivalent to the following:
# Here, *widget* is for example a CurveWidget instance
# (the same apply for CurvePlot, ImageWidget, ImagePlot or any
# class deriving from PlotManager)
widget.get_xcs_panel().update_plot()
widget.get_ycs_panel().update_plot()
Update tools for current plot
Rotate & Crop Widget
Rotate and crop a guiqwt.image.TrImageItem plot item
QWidget.RenderFlags(QWidget.RenderFlags) QWidget.RenderFlags(int) QWidget.RenderFlags()
Computed rotated/cropped array and apply changes to item
Add the standard apply button
Add tool buttons to layout
Add the standard reset button
Apply transformation, e.g. crop or rotate
QWidget.childAt(int, int) -> QWidget
Compute transformation, return compute output array
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection) -> bool QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection) -> bool
QWidget.customContextMenuRequested[QPoint] [signal]
QObject.destroyed[QObject] [signal] QObject.destroyed [signal]
QObject.disconnect(QObject, SIGNAL(), callable) -> bool
QObject.findChild(tuple, QString name=QString()) -> QObject
QObject.findChildren(tuple, QString name=QString()) -> list-of-QObject QObject.findChildren(type, QRegExp) -> list-of-QObject QObject.findChildren(tuple, QRegExp) -> list-of-QObject
Required for BaseTransformMixin
QWidget.grabMouse(QCursor)
QWidget.move(int, int)
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
Restore item original transform settings
QWidget.render(QPainter, QPoint targetOffset=QPoint(), QRegion sourceRegion=QRegion(), QWidget.RenderFlags flags=QWidget.DrawWindowBackground|QWidget.DrawChildren)
QWidget.repaint(int, int, int, int) QWidget.repaint(QRect) QWidget.repaint(QRegion)
Reset crop/transform image settings
Reset transformation
QWidget.resize(int, int)
Restore item original state
QWidget.scroll(int, int, QRect)
QWidget.setBaseSize(QSize)
QWidget.setContentsMargins(QMargins)
QWidget.setFixedSize(int, int)
QWidget.setFocus(Qt.FocusReason)
QWidget.setGeometry(int, int, int, int)
QWidget.setMask(QRegion)
QWidget.setMaximumSize(QSize)
QWidget.setMinimumSize(QSize)
QWidget.setParent(QWidget, Qt.WindowFlags)
QWidget.setSizeIncrement(QSize)
QWidget.setSizePolicy(QSizePolicy.Policy, QSizePolicy.Policy)
Set associated item – must be a TrImageItem object
Show/hide cropping rectangle shape
Unset the associated item, freeing memory
QWidget.update(QRect) QWidget.update(QRegion) QWidget.update(int, int, int, int)