Пример #1
0
    def __init__(self, name, penWidth, lineColor, fillColor, plot):
        self.__curve__ = Qwt.QwtPlotCurve(name)
        pen = QtGui.QPen(lineColor)
        pen.setWidth(penWidth)
        self.__curve__.setPen(pen)
        self.__curve__.setBrush(fillColor)
        self.__curve__.attach(plot)

        #work around to get nicer plotting.
        self.__curveExt__ = Qwt.QwtPlotCurve(name + " extra")
        self.__curveExt__.setPen(QtGui.QPen(lineColor))
        self.__curveExt__.attach(plot)
Пример #2
0
    def populate(self):
        #Insert new curves
        self.cSin = Qwt.QwtPlotCurve("y = sin(x)")
        self.cSin.setRenderHint(Qwt.QwtPlotItem.RenderAntialiased)
        self.cSin.setLegendAttribute(Qwt.QwtPlotCurve.LegendShowLine, True)
        self.cSin.setPen(Qt.red)
        self.cSin.attach(self)

        self.cCos = Qwt.QwtPlotCurve("y = cos(x)")
        self.cCos.setRenderHint(Qwt.QwtPlotItem.RenderAntialiased)
        self.cCos.setLegendAttribute(Qwt.QwtPlotCurve.LegendShowLine, True)
        self.cCos.setPen(Qt.blue)
        self.cCos.attach(self)

        #Create sin and cos data
        self.s = FunctionData(sin)
        self.cSin.setData(self.s)
        self.c = FunctionData(cos)
        self.cCos.setData(self.c)

        #Insert markers

        #  ...a horizontal line at y = 0...
        self.mY = Qwt.QwtPlotMarker()
        self.mY.setLabel(Qwt.QwtText("y = 0"))
        self.mY.setLabelAlignment(Qt.AlignRight | Qt.AlignTop)
        self.mY.setLineStyle(Qwt.QwtPlotMarker.HLine)
        self.mY.setYValue(0.0)
        self.mY.attach(self)

        #  ...a vertical line at x = 2 * pi
        self.mX = Qwt.QwtPlotMarker()
        self.mX.setLabel(Qwt.QwtText("x = 2 pi"))
        self.mX.setLabelAlignment(Qt.AlignLeft | Qt.AlignBottom)
        self.mX.setLabelOrientation(Qt.Vertical)
        self.mX.setLineStyle(Qwt.QwtPlotMarker.VLine)
        self.mX.setLinePen(Qt.black, 0, Qt.DashDotLine)
        self.mX.setXValue(2.0 * pi)
        self.mX.attach(self)

        x = 7.7

        # an arrow at a specific position
        self.mPos = Qwt.QwtPlotMarker("Marker")
        self.mPos.setRenderHint(Qwt.QwtPlotItem.RenderAntialiased, True)
        self.mPos.setItemAttribute(Qwt.QwtPlotItem.Legend, True)
        self.arr = ArrowSymbol()
        self.mPos.setSymbol(self.arr)
        self.mPos.setValue(QPointF(x, sin(x)))
        self.mPos.setLabel(Qwt.QwtText("x = %.1f" % x))
        self.mPos.setLabelAlignment(Qt.AlignRight | Qt.AlignBottom)
        self.mPos.attach(self)
Пример #3
0
    def __init__(self, parent=None):
        Qwt.QwtPlot.__init__(self, parent)
        self.canvas().setStyleSheet(
            "border: 2px solid Black;"
            "border-radius: 15px;"
            "background-color: qlineargradient( x1: 0, y1: 0, x2: 0, y2: 1,"
            "stop: 0 LemonChiffon, stop: 1 PaleGoldenrod );")

        # attach curve
        self.d_curve = Qwt.QwtPlotCurve("Scattered Points")
        self.d_curve.setPen(QColor("Purple"))

        # when using QwtPlotCurve.ImageBuffer simple dots can be
        # rendered in parallel on multicore systems.
        self.d_curve.setRenderThreadCount(
            0)  # 0: use QThread.idealThreadCount()
        self.d_curve.attach(self)
        self.setSymbol(None)
        # panning with the left mouse button
        Qwt.QwtPlotPanner(self.canvas())

        # distanve measurement with the right mouse button
        self.picker = DistancePicker(self.canvas())
        self.picker.setMousePattern(Qwt.QwtPlotPicker.MouseSelect1,
                                    Qt.RightButton)
        self.picker.setRubberBandPen(QPen(Qt.blue))
        # zoom in/out with the wheel
        self.magnifier = Qwt.QwtPlotMagnifier(self.canvas())
        self.magnifier.setMouseButton(Qt.NoButton)
    def update(self, layer, style):
        """Update plot for given Safecast layer.

        :param layer: Safecast layer
        """
        # collect plot coordinates
        x, y = layer.plotData()

        # clear plot first & detach curve
        if hasQwt6:
            items = Qwt.QwtPlotItem.Rtti_PlotItem
        else:
            items = [Qwt.QwtPlotItem.Rtti_PlotItem]
        self.detachItems(items, True)

        # attach a curve
        self.curve = Qwt.QwtPlotCurve('ader_microSvh')
        self.curve.attach(self)

        if style == 0:  # lines
            self.curve.setPen(Qt.QPen(Qt.Qt.blue, 0))
        else:  # points
            self.curve.setStyle(Qwt.QwtPlotCurve.NoCurve)
            self.curve.setSymbol(
                Qwt.QwtSymbol(Qwt.QwtSymbol.Ellipse, Qt.QBrush(Qt.Qt.blue),
                              Qt.QPen(Qt.Qt.blue), Qt.QSize(5, 5)))

        self.curve.setSamples(x, y)

        self.replot()
Пример #5
0
 def __init__(self):
     QFrame.__init__(self)
     self.d_curves = [None] * CurvCnt
     xMap.setScaleInterval(-0.5, 10.5)
     yMap.setScaleInterval(-1.1, 1.1)
     # Frame style FIXME This doesn't seem to work properly
     self.setFrameStyle(QFrame.Box | QFrame.Raised)
     self.setLineWidth(2)
     self.setMidLineWidth(3)
     # Calculate values
     for i in range(Size):
         xval[i] = i * 10.0 / (Size - 1.0)
         yval[i] = math.sin(xval[i]) * math.cos(2.0 * xval[i])
     #  define curve styles
     i = 0
     self.d_curves[i] = Qwt.QwtPlotCurve()
     self.d_curves[i].setSymbol(
         Qwt.QwtSymbol(Qwt.QwtSymbol.Cross, QBrush(Qt.NoBrush),
                       QPen(Qt.black), QSize(5, 5)))
     self.d_curves[i].setPen(Qt.darkGreen)
     self.d_curves[i].setStyle(Qwt.QwtPlotCurve.Lines)
     self.d_curves[i].setCurveAttribute(Qwt.QwtPlotCurve.Fitted)
     i += 1
     self.d_curves[i] = Qwt.QwtPlotCurve()
     self.d_curves[i].setSymbol(
         Qwt.QwtSymbol(Qwt.QwtSymbol.Ellipse, Qt.yellow, QPen(Qt.blue),
                       QSize(5, 5)))
     self.d_curves[i].setPen(Qt.red)
     self.d_curves[i].setStyle(Qwt.QwtPlotCurve.Sticks)
     i += 1
     self.d_curves[i] = Qwt.QwtPlotCurve()
     self.d_curves[i].setPen(Qt.darkBlue)
     self.d_curves[i].setStyle(Qwt.QwtPlotCurve.Lines)
     i += 1
     self.d_curves[i] = Qwt.QwtPlotCurve()
     self.d_curves[i].setPen(Qt.darkBlue)
     self.d_curves[i].setStyle(Qwt.QwtPlotCurve.Lines)
     self.d_curves[i].setRenderHint(Qwt.QwtPlotItem.RenderAntialiased)
     i += 1
     self.d_curves[i] = Qwt.QwtPlotCurve()
     self.d_curves[i].setPen(Qt.darkCyan)
     self.d_curves[i].setStyle(Qwt.QwtPlotCurve.Steps)
     i += 1
     self.d_curves[i] = Qwt.QwtPlotCurve()
     self.d_curves[i].setSymbol(
         Qwt.QwtSymbol(Qwt.QwtSymbol.XCross, QBrush(Qt.NoBrush),
                       QPen(Qt.darkMagenta), QSize(5, 5)))
     self.d_curves[i].setStyle(Qwt.QwtPlotCurve.NoCurve)
     # attach data
     for i in range(CurvCnt):
         self.d_curves[i].setSamples(xval, yval)
Пример #6
0
    def __init__(self,parent):
        super().__init__(parent)
        self.__d_interval = Qwt.QwtInterval( 0.0, 10.0 )
        self.__d_timerId = -1
        self.__d_directPainter = Qwt.QwtPlotDirectPainter()
        self.__d_clock = Qwt.QwtSystemClock()
        self.__d_paintedPoints = 0 
        
        self.setAutoReplot( False )
        self.setCanvas( Canvas() )
        self.plotLayout().setAlignCanvasToScales( True )

        self.setAxisTitle( Qwt.QwtPlot.xBottom, "Time [s]" )
        self.setAxisScale( Qwt.QwtPlot.xBottom, self.__d_interval.minValue(), self.__d_interval.maxValue() )
        self.setAxisScale( Qwt.QwtPlot.yLeft, -200.0, 200.0 )
        self.grid = Qwt.QwtPlotGrid()
        self.grid.setPen( Qt.gray, 0.0, Qt.DotLine )
        self.grid.enableX( True )
        self.grid.enableXMin( True )
        self.grid.enableY( True )
        self.grid.enableYMin( False )
        self.grid.attach( self )

        self.__d_origin = Qwt.QwtPlotMarker()
        self.__d_origin.setLineStyle( Qwt.QwtPlotMarker.Cross )
        self.__d_origin.setValue( self.__d_interval.minValue() + self.__d_interval.width() / 2.0, 0.0 )
        self.__d_origin.setLinePen( Qt.gray, 0.0, Qt.DashLine )
        self.__d_origin.attach( self )

        self.__d_curve = Qwt.QwtPlotCurve()
        self.__d_curve.setStyle( Qwt.QwtPlotCurve.Lines )
        self.__d_curve.setPen( self.canvas().palette().color( QPalette.WindowText ) )
        self.__d_curve.setRenderHint( Qwt.QwtPlotItem.RenderAntialiased, True )
        self.__d_curve.setPaintAttribute( Qwt.QwtPlotCurve.ClipPolygons, False )
        self.__cdata = CurveData()
        self.__d_curve.setData( self.__cdata )
        self.__d_curve.attach( self )
Пример #7
0
    def __init__(self, parent=None):
        Qwt.QwtPlot.__init__(self, parent)
        self.setAutoReplot(False)
        self.setTitle("Frequency Response of a Second-Order System")
        canvas = Qwt.QwtPlotCanvas()
        canvas.setBorderRadius(10)
        self.setCanvas(canvas)
        self.setCanvasBackground(QColor("MidnightBlue"))
        # legend
        legend = Qwt.QwtLegend()
        self.insertLegend(legend, Qwt.QwtPlot.BottomLegend)

        # grid
        grid = Qwt.QwtPlotGrid()
        grid.enableXMin(True)
        grid.setMajorPen(Qt.white, 0, Qt.DotLine)
        grid.setMinorPen(Qt.gray, 0, Qt.DotLine)
        grid.attach(self)

        # axes
        self.enableAxis(Qwt.QwtPlot.yRight)
        self.setAxisTitle(Qwt.QwtPlot.xBottom, "Normalized Frequency")
        self.setAxisTitle(Qwt.QwtPlot.yLeft, "Amplitude [dB]")
        self.setAxisTitle(Qwt.QwtPlot.yRight, "Phase [deg]")

        self.setAxisMaxMajor(Qwt.QwtPlot.xBottom, 6)
        self.setAxisMaxMinor(Qwt.QwtPlot.xBottom, 9)
        self.setAxisScaleEngine(Qwt.QwtPlot.xBottom, Qwt.QwtLogScaleEngine())

        # curves
        self.d_curve1 = Qwt.QwtPlotCurve("Amplitude")
        self.d_curve1.setRenderHint(Qwt.QwtPlotItem.RenderAntialiased)
        self.d_curve1.setPen(Qt.yellow)
        self.d_curve1.setLegendAttribute(Qwt.QwtPlotCurve.LegendShowLine)
        self.d_curve1.setYAxis(Qwt.QwtPlot.yLeft)
        self.d_curve1.attach(self)

        self.d_curve2 = Qwt.QwtPlotCurve("Phase")
        self.d_curve2.setRenderHint(Qwt.QwtPlotItem.RenderAntialiased)
        self.d_curve2.setPen(Qt.cyan)
        self.d_curve2.setLegendAttribute(Qwt.QwtPlotCurve.LegendShowLine)
        self.d_curve2.setYAxis(Qwt.QwtPlot.yRight)
        self.d_curve2.attach(self)

        # marker
        self.d_marker1 = Qwt.QwtPlotMarker()
        self.d_marker1.setValue(0.0, 0.0)
        self.d_marker1.setLineStyle(Qwt.QwtPlotMarker.VLine)
        self.d_marker1.setLabelAlignment(Qt.AlignRight | Qt.AlignBottom)
        self.d_marker1.setLinePen(Qt.green, 0, Qt.DashDotLine)
        self.d_marker1.attach(self)

        self.d_marker2 = Qwt.QwtPlotMarker()
        self.d_marker2.setLineStyle(Qwt.QwtPlotMarker.HLine)
        self.d_marker2.setLabelAlignment(Qt.AlignRight | Qt.AlignBottom)
        self.d_marker2.setLinePen(QColor(200, 150, 0), 0, Qt.DashDotLine)
        self.d_marker2.setSymbol(
            Qwt.QwtSymbol(Qwt.QwtSymbol.Diamond, QColor(Qt.yellow),
                          QColor(Qt.green), QSize(8, 8)))
        self.d_marker2.attach(self)

        self.setDamp(0)

        self.setAutoReplot(True)
Пример #8
0
from PyQt5 import Qwt
import numpy as np
from PyQt5.QtCore import Qt,  QSize
from PyQt5.QtGui import QBrush, QPen
from PyQt5.QtWidgets import QApplication

a = QApplication(sys.argv)

plot=Qwt.QwtPlot()
plot.setTitle("Plot Demo")
plot.setCanvasBackground(Qt.white)
plot.insertLegend( Qwt.QwtLegend() )
grid = Qwt.QwtPlotGrid()
grid.attach( plot )

curve = Qwt.QwtPlotCurve()
curve.setTitle("Some Points")
curve.setPen(Qt.blue,4)
curve.setRenderHint( Qwt.QwtPlotItem.RenderAntialiased, True );

symbol = Qwt.QwtSymbol( Qwt.QwtSymbol.Ellipse, QBrush( Qt.yellow ), QPen( Qt.red, 2 ), QSize( 8, 8 ) );
curve.setSymbol( symbol )

x=np.arange(0,10,0.1)
y=np.sin(x)
curve.setSamples(x,y)
curve.attach(plot)

zoomer = Qwt.QwtPlotZoomer( Qwt.QwtPlot.xBottom, Qwt.QwtPlot.yLeft, plot.canvas() );
zoomer.setZoomBase(False);
zoomer.zoom(0);
Пример #9
0
    def __init__(self):
        super(MyApp, self).__init__()
        # Set up the user interface from Designer.
        self.ui = Ui_mainWindow()
        self.ui.setupUi(self)

# ======= LOCAL WIDGET MODIFICATIONS ===============================================================

        spdMeter   = self.ui.SpeedDial
        spdLCD     = self.ui.SpeedLCD
        spdWheel   = self.ui.SpeedWheel
        thermo     = self.ui.Thermo
        thermSlide = self.ui.ThermoSlider
        compass    = self.ui.Compass
        counter    = self.ui.Counter
        global clk
        clk = self.ui.AnalogClock

        # SPEEDOMETER SETUP
        palette2 = QPalette()
        palette2.setColor(QPalette.Base, Qt.black)
        palette2.setColor(QPalette.WindowText, QColor(Qt.darkBlue))
        palette2.setColor(QPalette.Text, Qt.yellow)
        palette2.setColor(QPalette.Dark, Qt.darkGray)       # Bezel ring color 1
        palette2.setColor(QPalette.Light, Qt.lightGray)     # Bezel Ring Color 2
        spdMeter.setPalette(palette2)
        needle = Qwt.QwtDialSimpleNeedle(Qwt.QwtDialSimpleNeedle.Arrow, True, Qt.red, QtGui.QColor(Qt.gray))
        spdMeter.setNeedle(needle)

        # THERMO SETUP
        colorMap = Qwt.QwtLinearColorMap()
        colorMap.setColorInterval(Qt.blue, Qt.red)
        thermo.setColorMap(colorMap)

        # COMPASS SETUP
        palette0 = QPalette()
        palette0.setColor(QPalette.Base, Qt.darkBlue)
        palette0.setColor(QPalette.WindowText, QColor(Qt.darkBlue))
        palette0.setColor(QPalette.Text, Qt.yellow)
        palette0.setColor(QPalette.Dark, Qt.darkGray)       # Bezel ring color 1
        palette0.setColor(QPalette.Light, Qt.lightGray)     # Bezel Ring Color 2
        compass.setPalette(palette0)
        # Tick marks for each degree
        CompSclDrw = Qwt.QwtCompassScaleDraw()
        CompSclDrw.enableComponent(Qwt.QwtAbstractScaleDraw.Ticks, True)
        CompSclDrw.enableComponent(Qwt.QwtAbstractScaleDraw.Labels, True)
        CompSclDrw.enableComponent(Qwt.QwtAbstractScaleDraw.Backbone, False)
        CompSclDrw.setTickLength(Qwt.QwtScaleDiv.MinorTick, 0)
        CompSclDrw.setTickLength(Qwt.QwtScaleDiv.MediumTick, 0)
        CompSclDrw.setTickLength(Qwt.QwtScaleDiv.MajorTick, 5)
        compass.setScaleDraw(CompSclDrw)
        compass.setNeedle(Qwt.QwtCompassMagnetNeedle(Qwt.QwtCompassMagnetNeedle.ThinStyle, Qt.darkBlue, Qt.red))

        # ANALOG CLOCK SETUP
        palette1 = QPalette()
        palette1.setColor(QPalette.Base, Qt.black)           # Clock number ring background
        palette1.setColor(QPalette.Text, Qt.yellow)          # Clock numbers color
        palette1.setColor(QPalette.Foreground, Qt.darkBlue)  # Inner Ring Color
        palette1.setColor(QPalette.Dark, Qt.darkGray)        # Bezel ring color 1
        palette1.setColor(QPalette.Light, Qt.lightGray)      # Bezel Ring Color 2
        clk.setPalette(palette1)
        # Disable minor ticks
        ClkSclDrw = Qwt.QwtRoundScaleDraw()
        ClkSclDrw.setTickLength(Qwt.QwtScaleDiv.MinorTick, 0)
        # Set color of clock hands
        knobColor = QColor(Qt.gray)
        for i in range(clk.NHands):
            handColor = QColor(Qt.gray)
            width = 8
            if i == clk.SecondHand:
                handColor = Qt.red
                knobColor = QColor(Qt.darkRed)
                width = 5
            hand = Qwt.QwtDialSimpleNeedle(Qwt.QwtDialSimpleNeedle.Arrow, True, handColor, knobColor)
            hand.setWidth(width)
            clk.setHand(clk.Hand(i), hand)

# ======= WIDGET CONNECTIONS =======================================================================

        spdMeter.setValue(self.ui.SpeedWheel.value())
        spdWheel.valueChanged['double'].connect(spdMeter.setValue)
        spdWheel.valueChanged['double'].connect(spdLCD.display)
        thermSlide.valueChanged['double'].connect(thermo.setValue)
        counter.valueChanged['double'].connect(compass.setValue)

# =======  SINE WAVE PLOT SETUP ====================================================================

        global ampKnob, frqKnob, maxPts, n, angle, xData, yData, curve, plot, deg
        ampKnob = self.ui.AmpKnob                # Amplitude knob object
        frqKnob = self.ui.FreqKnob               # Frequency knob object
        maxPts = 250                             # X axis range for plots
        xData = np.zeros(1, dtype=np.uint16)     # Buffer for x data
        yData = np.zeros(1, dtype=np.float32)    # Buffer for y Data
        n = 0                                    # loop counter and base for frequency steps
        angle = 0                                # Rotation angle along X axis for plots
        deg = u'\N{DEGREE SIGN}'
        plot = self.ui.qwtPlot                   # Plot object
        # plot.setTitle("SINE WAVE PLOT")
        # plot.insertLegend(Qwt.QwtLegend())
        plot.setCanvasBackground(Qt.black)
        plot.setAxisScale(2, 0, maxPts, 50)      # X bottom axis
        plot.setAxisMaxMinor(2, 5)
        plot.setAxisScale(0, -10, 10, 2)         # Y Left Axis
        plot.setAxisMaxMinor(0, 2)
        grid = Qwt.QwtPlotGrid()
        grid.setPen(Qt.darkGray, 0, Qt.DotLine)
        grid.attach(plot)
        curve = Qwt.QwtPlotCurve()
        # curve.setTitle("Some Points")
        curve.attach(plot)
        curve.setPen(Qt.yellow, 2)
        curve.setRenderHint(Qwt.QwtPlotItem.RenderAntialiased, True)
        # Start the loop function
        update()
Пример #10
0
  def __init__(self, proc, cmdLine, name, reader, depth):
    self.__depth__ = depth
    self.__proc__ = proc
    self.__reader__ = reader
    self.__name__ = name
    self.__dialog__ = QtWidgets.QDialog()
    self.__procDetails__ = uic.loadUi(os.path.join(os.path.dirname(__file__), "./ui/processdetails.ui"), baseinstance=self.__dialog__)
    self.__dialog__.show()
    self.__dialog__.setWindowTitle(proc+":"+cmdLine+" Properties")
    self.__processGone__ = False
    self.__y__ = range(self.__depth__)
    self.__tcpConnections__ = []
    self.__tcpStat__ = None
    self.__TCPHist__ = [0] * self.__reader__.getHistoryDepth(self.__proc__)
    self.__prevtcpipbytes__ = 0
    self.__envData = procreader.reader.UNKNOWN

    #tell reader that a singleprocess GUI is using its data, for optimization
    self.__reader__.setListener(self.__proc__)

    #-------- top plot CPU usage-------------------------------------------------------------------
    #Curves for CPU usage
    self.__curveCpuHist__ = Qwt.QwtPlotCurve("CPU History")
    pen = QtGui.QPen(QtGui.QColor(0,255,0))
    pen.setWidth(2)
    
    #work around to get better plotting.
    self.__curveCpuHistExt__ = Qwt.QwtPlotCurve("CPU History extra")
    self.__curveCpuHistExt__.setPen(QtGui.QPen(QtGui.QColor(0,255,0)))
    self.__curveCpuHistExt__.attach(self.__procDetails__.qwtPlotCpuHist)
    
    
    self.__curveCpuHist__.setPen(pen)
    self.__curveCpuHist__.setBrush(QtGui.QColor(0,170,0))
    self.__curveCpuHist__.attach(self.__procDetails__.qwtPlotCpuHist)
    
    #Curve for kernel usage
    self.__curveCpuKernelHist__ = Qwt.QwtPlotCurve("CPU Kernel History")
    pen = QtGui.QPen(QtGui.QColor(255,0,0))
    pen.setWidth(1)
    self.__curveCpuKernelHist__.setPen(pen)
    self.__curveCpuKernelHist__.setBrush(QtGui.QColor(170,0,0))
    self.__curveCpuKernelHist__.attach(self.__procDetails__.qwtPlotCpuHist)
    
    #work around to get better plotting.
    self.__curveCpuKernelHistExt__ = Qwt.QwtPlotCurve("CPU Kernel History extra")
    self.__curveCpuKernelHistExt__.setPen(QtGui.QPen(QtGui.QColor(255,0,0)))
    self.__curveCpuKernelHistExt__.attach(self.__procDetails__.qwtPlotCpuHist)
    
    
    #self.__procDetails__.qwtPlotCpuHist.setAxisScale(0,0,self.__depth__,10)    
    
    self.__curveCpuPlotGrid__ = Qwt.QwtPlotGrid()
    self.__curveCpuPlotGrid__.setMajorPen(QtGui.QPen(QtGui.QColor(0,100,0), 0, QtCore.Qt.SolidLine))
    self.__curveCpuPlotGrid__.setMinorPen(QtGui.QPen(QtGui.QColor(0,100,0), 0, QtCore.Qt.SolidLine))
    self.__curveCpuPlotGrid__.enableXMin(True)
    self.__curveCpuPlotGrid__.attach(self.__procDetails__.qwtPlotCpuHist)
    #----------------------------------------------------------------------------------------------
    
    #-------- Middle plot memory usage-------------------------------------------------------------
    #Curve for memory usage
    self.__curveRssHist__ = Qwt.QwtPlotCurve("Rss History")
    pen = QtGui.QPen(QtGui.QColor(248,248,0))
    pen.setWidth(1)
    self.__curveRssHist__.setPen(pen)
    self.__curveRssHist__.setBrush(QtGui.QColor(190,190,0))
    self.__curveRssHist__.attach(self.__procDetails__.qwtPlotRssHist)
    
    self.__curveRssHistExt__ = Qwt.QwtPlotCurve("Rss extra")
    self.__curveRssHistExt__.setPen(QtGui.QPen(QtGui.QColor(248,248,0)))
    self.__curveRssHistExt__.attach(self.__procDetails__.qwtPlotRssHist)
    
    #self.__procDetails__.qwtPlotRssHgetThreist.setAxisScale(0,0,100,10)
    self.__RssPlotGrid__ = Qwt.QwtPlotGrid()
    self.__RssPlotGrid__.setMajorPen(QtGui.QPen(QtGui.QColor(0,100,0), 0, QtCore.Qt.SolidLine))
    self.__RssPlotGrid__.setMinorPen(QtGui.QPen(QtGui.QColor(0,100,0), 0, QtCore.Qt.SolidLine))
    self.__RssPlotGrid__.enableXMin(True)
    self.__RssPlotGrid__.attach(self.__procDetails__.qwtPlotRssHist)
    #----------------------------------------------------------------------------------------------
    
    #-------- Bottom plot IO usage ----------------------------------------------------------------
    #Curve for memory usage
    self.__curveIOHist__ = Qwt.QwtPlotCurve("IO History")
    pen = QtGui.QPen(QtGui.QColor(0,214,214))
    pen.setWidth(1)
    self.__curveIOHist__.setPen(pen)
    self.__curveIOHist__.setBrush(QtGui.QColor(0,150,150))
    self.__curveIOHist__.attach(self.__procDetails__.qwtPlotIoHist)
    
    self.__curveIOHistExt__ = Qwt.QwtPlotCurve("IO History extra")
    self.__curveIOHistExt__.setPen(QtGui.QPen(QtGui.QColor(0,214,214)))
    self.__curveIOHistExt__.attach(self.__procDetails__.qwtPlotIoHist)
    
    #self.__procDetails__.qwtPlotIoHist.setAxisScale(0,0,100,10)
    self.__IOPlotGrid__ = Qwt.QwtPlotGrid()
    self.__IOPlotGrid__.setMajorPen(QtGui.QPen(QtGui.QColor(0,100,0), 0, QtCore.Qt.SolidLine))
    self.__IOPlotGrid__.setMinorPen(QtGui.QPen(QtGui.QColor(0,100,0), 0, QtCore.Qt.SolidLine))
    self.__IOPlotGrid__.enableXMin(True)
    self.__IOPlotGrid__.attach(self.__procDetails__.qwtPlotIoHist)
    #----------------------------------------------------------------------------------------------

    #-------- TCP IO usage ----------------------------------------------------------------
    self.__curveTcpipHist__ = Qwt.QwtPlotCurve("TCPIP History")
    pen = QtGui.QPen(QtGui.QColor(0,214,214))
    pen.setWidth(1)
    self.__curveTcpipHist__.setPen(pen)
    self.__curveTcpipHist__.setBrush(QtGui.QColor(196,60,210))
    self.__curveTcpipHist__.attach(self.__procDetails__.qwtPlotTcpipHist)
    
    self.__curveTcpipHistExt__ = Qwt.QwtPlotCurve("TCPIP History extra")
    self.__curveTcpipHistExt__.setPen(QtGui.QPen(QtGui.QColor(215,124,224)))
    self.__curveTcpipHistExt__.attach(self.__procDetails__.qwtPlotTcpipHist)
    
    #self.__procDetails__.qwtPlotIoHist.setAxisScale(0,0,100,10)
    self.__TcpipPlotGrid__ = Qwt.QwtPlotGrid()
    self.__TcpipPlotGrid__.setMajorPen(QtGui.QPen(QtGui.QColor(0,100,0), 0, QtCore.Qt.SolidLine))
    self.__TcpipPlotGrid__.setMinorPen(QtGui.QPen(QtGui.QColor(0,100,0), 0, QtCore.Qt.SolidLine))
    self.__TcpipPlotGrid__.enableXMin(True)
    self.__TcpipPlotGrid__.attach(self.__procDetails__.qwtPlotTcpipHist)
    #----------------------------------------------------------------------------------------------
    
    #  all plots ----------------------------------------------------------------------------------
    self.__procDetails__.qwtPlotCpuHist.setCanvasBackground(QtGui.QColor(0,0,0))
    self.__procDetails__.qwtPlotRssHist.setCanvasBackground(QtGui.QColor(0,0,0))
    self.__procDetails__.qwtPlotIoHist.setCanvasBackground(QtGui.QColor(0,0,0))
    self.__procDetails__.qwtPlotTcpipHist.setCanvasBackground(QtGui.QColor(0,0,0))
    self.__procDetails__.qwtPlotCpuHist.enableAxis(0, False )
    self.__procDetails__.qwtPlotCpuHist.enableAxis(2, False )
    self.__procDetails__.qwtPlotRssHist.enableAxis(0, False )
    self.__procDetails__.qwtPlotRssHist.enableAxis(2, False )
    self.__procDetails__.qwtPlotIoHist.enableAxis(0, False )
    self.__procDetails__.qwtPlotIoHist.enableAxis(2, False )
    self.__procDetails__.qwtPlotTcpipHist.enableAxis(0, False )    
    self.__procDetails__.qwtPlotTcpipHist.enableAxis(2, False )
    #----------------------------------------------------------------------------------------------
    self._availableLabel = QtWidgets.QLabel("                                                                                ", parent=self.__procDetails__.qwtPlotTcpipHist )
      
    font = QtGui.QFont("Arial", pointSize=12)
    self._availableLabel.setFont(font)
    self._availableLabel.setStyleSheet("QLabel { color : grey; }");
    self._availableLabel.show()

    self.__procDetails__.pushButtonOK.clicked.connect(self.__onClose__)
  
    # Fill some field only at construction time
    self.__procDetails__.filterEdit.textEdited.connect(self.__onFilterTextEdit__)
    
    self.__lddoutput__ = None
    self._tcpstat = tcpip_stat.tcpStat()
    self._tcpstat.start()
    self.update_sockets()