当前位置: 首页>>代码示例>>Python>>正文


Python Qwt5.QwtPlot类代码示例

本文整理汇总了Python中PyQt4.Qwt5.QwtPlot的典型用法代码示例。如果您正苦于以下问题:Python QwtPlot类的具体用法?Python QwtPlot怎么用?Python QwtPlot使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了QwtPlot类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Ui_MainWindow

class Ui_MainWindow(QtGui.QMainWindow):
    def __init__(self,parent = None):
                
        #init
        QtGui.QMainWindow.__init__(self)
        self.setupUi(self)
    
    
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(800, 600)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.tabWidget = QtGui.QTabWidget(self.centralwidget)
        self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
        self.tab = QtGui.QWidget()
        self.tab.setObjectName(_fromUtf8("tab"))
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.tab)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.uiFillterProcess = QtGui.QLineEdit(self.tab)
        self.uiFillterProcess.setObjectName(_fromUtf8("uiFillterProcess"))
        self.horizontalLayout_2.addWidget(self.uiFillterProcess)
        self.uiFillterUser = QtGui.QLineEdit(self.tab)
        self.uiFillterUser.setObjectName(_fromUtf8("uiFillterUser"))
        self.horizontalLayout_2.addWidget(self.uiFillterUser)
        self.verticalLayout_2.addLayout(self.horizontalLayout_2)
        self.uiTable = QtGui.QTableView(self.tab)
        self.uiTable.setObjectName(_fromUtf8("uiTable"))
        self.verticalLayout_2.addWidget(self.uiTable)
        self.uiRefreshButton = QtGui.QPushButton(self.tab)
        self.uiRefreshButton.setObjectName(_fromUtf8("uiRefreshButton"))
        self.verticalLayout_2.addWidget(self.uiRefreshButton)
        self.tabWidget.addTab(self.tab, _fromUtf8(""))
        self.tab_2 = QtGui.QWidget()
        self.tab_2.setObjectName(_fromUtf8("tab_2"))
        self.qwtPlot = QwtPlot(self.tab_2)
        self.qwtPlot.setGeometry(QtCore.QRect(80, 50, 274, 234))
        self.qwtPlot.setObjectName(_fromUtf8("qwtPlot"))
        self.tabWidget.addTab(self.tab_2, _fromUtf8(""))
        self.verticalLayout.addWidget(self.tabWidget)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.verticalLayout.addLayout(self.horizontalLayout)
        MainWindow.setCentralWidget(self.centralwidget)

        self.retranslateUi(MainWindow)
        self.tabWidget.setCurrentIndex(1)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None))
        self.uiRefreshButton.setText(_translate("MainWindow", "Refresh", None))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Processes", None))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Resources", None))
开发者ID:m4rc1n88,项目名称:workspace,代码行数:58,代码来源:menager_ui.py

示例2: __init__

 def __init__(self, parent):
     QwtPlot.__init__(self, parent)
     self.variables = []
     self.insertLegend(QwtLegend(self), QwtPlot.TopLegend)
     self.setCanvasBackground(Qt.white)
     self.magnifier = QwtPlotMagnifier(self.canvas())
     self.magnifier.setAxisEnabled(QwtPlot.xBottom, False)
     self.magnifier.setAxisEnabled(QwtPlot.yLeft, True)
     self.panner = QwtPlotPanner(self.canvas())
     self.panner.setAxisEnabled(QwtPlot.xBottom, False)
     self.panner.setAxisEnabled(QwtPlot.yLeft, True)
开发者ID:delijati,项目名称:pysimiam-simulator,代码行数:11,代码来源:qt_plotwindow_qwt.py

示例3: __init__

    def __init__(self, spurset, fef, parent):
        chart.__init__(self, spurset, fef, parent)
        self.plot = QwtPlot(parent)

        self.plot.setAxisScale(xaxis, self.spurset.RFmin,
                               self.spurset.RFmax)
        self.plot.setAxisScale(yaxis, -self.spurset.dspan/2,
                               self.spurset.dspan/2)

        self.plot.setCanvasBackground(Qt.white)
        grid = QwtPlotGrid()
        grid.setMajPen(QPen(Qt.black, 1, Qt.DotLine))
        grid.attach(self.plot)

        self.plot.insertLegend(QwtLegend(self.parent), QwtPlot.ExternalLegend)

        # a picker to be used for the front-end filter parallelogram
        self.picker = QwtPlotPicker(xaxis, yaxis,
                                    QwtPicker.PointSelection,
                                    QwtPlotPicker.NoRubberBand,
                                    QwtPicker.AlwaysOff,
                                    self.plot.canvas())
        # gonna need this to implement ondrop()
        self._mouseRelease = self.picker.widgetMouseReleaseEvent
        self._picked_obj = None

        self.picker.connect(self.picker, SIGNAL('appended(const QPoint&)'),
                            self.onpick)
        self.picker.connect(self.picker, SIGNAL('moved(const QPoint&)'),
                            self.ondrag)
        # all about the monkey-patching
        self.picker.widgetMouseReleaseEvent = self.ondrop
开发者ID:patrickyeon,项目名称:spurdist,代码行数:32,代码来源:qwtchart.py

示例4: setupUi

    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(800, 600)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.tabWidget = QtGui.QTabWidget(self.centralwidget)
        self.tabWidget.setGeometry(QtCore.QRect(70, 120, 661, 291))
        self.tabWidget.setObjectName("tabWidget")
        self.tab = QtGui.QWidget()
        self.tab.setObjectName("tab")
        self.qwtPlot = QwtPlot(self.tab)
        self.qwtPlot.setGeometry(QtCore.QRect(20, 30, 400, 200))
        self.qwtPlot.setObjectName("qwtPlot")
        self.Knob = QwtKnob(self.tab)
        self.Knob.setGeometry(QtCore.QRect(490, 60, 114, 114))
        self.Knob.setObjectName("Knob")
        self.tabWidget.addTab(self.tab, "")
        self.tab_2 = QtGui.QWidget()
        self.tab_2.setObjectName("tab_2")
        self.tabWidget.addTab(self.tab_2, "")
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 26))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
开发者ID:msunardi,项目名称:soundmotion,代码行数:31,代码来源:waveshapingui.py

示例5: __init__

 def __init__(self, *arg):
     QwtPlot.__init__(self, *arg)
     self.plotLayout().setAlignCanvasToScales(True)
     self.setCanvasBackground(Qt.white)
     self.legend = QwtLegend()
     self.legend.setItemMode(QwtLegend.ClickableItem)
     self.insertLegend(self.legend, QwtPlot.TopLegend)
     self.grid = QwtPlotGrid()
     self.grid.attach(self)
     self.grid.setPen(QPen(Qt.black, 0, Qt.DotLine))
     self.zoomer = QwtPlotZoomer(QwtPlot.xBottom, QwtPlot.yLeft, QwtPicker.DragSelection,
         QwtPicker.AlwaysOn, self.canvas())
     self.zoomer.setRubberBandPen(QPen(Qt.green))
     self.zoomer.setTrackerPen(QPen(Qt.red))
     self.magnifier = QwtPlotMagnifier(self.canvas())
     self.panner = QwtPlotPanner(self.canvas())
     self.panner.setMouseButton(Qt.LeftButton, Qt.ControlModifier)
     self.connect(self, SIGNAL("legendClicked(QwtPlotItem*)"), self.togglePlotItemVisibility)
开发者ID:BackupTheBerlios,项目名称:simuvis4-svn,代码行数:18,代码来源:QwtPlotWindow.py

示例6: Ui_MainWindow

class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(700, 500)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))

        #plotting of the EEG signal itself
        self.eegPlot = QwtPlot(self.centralwidget)
        self.eegPlot.setGeometry(QtCore.QRect(30, 20, 411, 411))
        self.eegPlot.setObjectName(_fromUtf8("EEG Plot"))

        #begin the acquisition of the signal and stop as well 
        self.startEEG = QtGui.QPushButton(self.centralwidget)
        self.startEEG.setGeometry(QtCore.QRect(460, 370, 87, 27))
        self.startEEG.setObjectName(_fromUtf8("Start EEG"))
        self.stopEEG = QtGui.QPushButton(self.centralwidget)
        self.stopEEG.setGeometry(QtCore.QRect(580, 370, 87, 27))
        self.stopEEG.setObjectName(_fromUtf8("Stop EEG"))
        

        #create a menubar(?)

        menubar = QMainWindow.menuBar()
        fileMenu = menubar.addMenu('&File')
        fileMenu.addAction(exitAction)

        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 707, 24))
        self.menubar.setObjectName(_fromUtf8("MenuBar"))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("StatusBar"))
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(translate("MainWindow", "MainWindow", None))
        self.startEEG.setText(translate("MainWindow", "Start", None))
        self.stopEEG.setText(translate("MainWindow", "Stop", None))
开发者ID:shurru,项目名称:pyemotiv,代码行数:43,代码来源:GUImain.py

示例7: Ui_MainWindow

class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(800, 600)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.tabWidget = QtGui.QTabWidget(self.centralwidget)
        self.tabWidget.setGeometry(QtCore.QRect(70, 120, 661, 291))
        self.tabWidget.setObjectName("tabWidget")
        self.tab = QtGui.QWidget()
        self.tab.setObjectName("tab")
        self.qwtPlot = QwtPlot(self.tab)
        self.qwtPlot.setGeometry(QtCore.QRect(20, 30, 400, 200))
        self.qwtPlot.setObjectName("qwtPlot")
        self.Knob = QwtKnob(self.tab)
        self.Knob.setGeometry(QtCore.QRect(490, 60, 114, 114))
        self.Knob.setObjectName("Knob")
        self.tabWidget.addTab(self.tab, "")
        self.tab_2 = QtGui.QWidget()
        self.tab_2.setObjectName("tab_2")
        self.tabWidget.addTab(self.tab_2, "")
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 26))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), QtGui.QApplication.translate("MainWindow", "Tab 1", None, QtGui.QApplication.UnicodeUTF8))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), QtGui.QApplication.translate("MainWindow", "Tab 2", None, QtGui.QApplication.UnicodeUTF8))
开发者ID:msunardi,项目名称:soundmotion,代码行数:37,代码来源:waveshapingui.py

示例8: ImageControlDialog

class ImageControlDialog(QDialog):
    def __init__(self, parent, rc, imgman):
        """An ImageControlDialog is initialized with a parent widget, a RenderControl object,
        and an ImageManager object"""
        QDialog.__init__(self, parent)
        image = rc.image
        self.setWindowTitle("%s: Colour Controls" % image.name)
        self.setWindowIcon(pixmaps.colours.icon())
        self.setModal(False)
        self.image = image
        self._rc = rc
        self._imgman = imgman
        self._currier = PersistentCurrier()

        # init internal state
        self._prev_range = self._display_range = None, None
        self._hist = None
        self._geometry = None

        # create layouts
        lo0 = QVBoxLayout(self)
        #    lo0.setContentsMargins(0,0,0,0)

        # histogram plot
        whide = self.makeButton("Hide", self.hide, width=128)
        whide.setShortcut(Qt.Key_F9)
        lo0.addWidget(Separator(self, "Histogram and ITF", extra_widgets=[whide]))
        lo1 = QHBoxLayout()
        lo1.setContentsMargins(0, 0, 0, 0)
        self._histplot = QwtPlot(self)
        self._histplot.setAutoDelete(False)
        lo1.addWidget(self._histplot, 1)
        lo2 = QHBoxLayout()
        lo2.setContentsMargins(0, 0, 0, 0)
        lo2.setSpacing(2)
        lo0.addLayout(lo2)
        lo0.addLayout(lo1)
        self._wautozoom = QCheckBox("autozoom", self)
        self._wautozoom.setChecked(True)
        self._wautozoom.setToolTip("""<P>If checked, then the histrogram plot will zoom in automatically when
      you narrow the current intensity range.</P>""")
        self._wlogy = QCheckBox("log Y", self)
        self._wlogy.setChecked(True)
        self._ylogscale = True
        self._wlogy.setToolTip(
            """<P>If checked, a log-scale Y axis is used for the histogram plot instead of a linear one.""")
        QObject.connect(self._wlogy, SIGNAL("toggled(bool)"), self._setHistLogScale)
        self._whistunzoom = self.makeButton("", self._unzoomHistogram, icon=pixmaps.full_range.icon())
        self._whistzoomout = self.makeButton("-", self._currier.curry(self._zoomHistogramByFactor, math.sqrt(.1)))
        self._whistzoomin = self.makeButton("+", self._currier.curry(self._zoomHistogramByFactor, math.sqrt(10)))
        self._whistzoomin.setToolTip("""<P>Click to zoom into the histogram plot by one step. This does not
      change the current intensity range.</P>""")
        self._whistzoomout.setToolTip("""<P>Click to zoom out of the histogram plot by one step. This does not
      change the current intensity range.</P>""")
        self._whistunzoom.setToolTip("""<P>Click to reset the histogram plot back to its full extent.
      This does not change the current intensity range.</P>""")
        self._whistzoom = QwtWheel(self)
        self._whistzoom.setOrientation(Qt.Horizontal)
        self._whistzoom.setMaximumWidth(80)
        self._whistzoom.setRange(10, 0)
        self._whistzoom.setStep(0.1)
        self._whistzoom.setTickCnt(30)
        self._whistzoom.setTracking(False)
        QObject.connect(self._whistzoom, SIGNAL("valueChanged(double)"), self._zoomHistogramFinalize)
        QObject.connect(self._whistzoom, SIGNAL("sliderMoved(double)"), self._zoomHistogramPreview)
        self._whistzoom.setToolTip("""<P>Use this wheel control to zoom in/out of the histogram plot.
      This does not change the current intensity range.
      Note that the zoom wheel should also respond to your mouse wheel, if you have one.</P>""")
        # This works around a stupid bug in QwtSliders -- when using the mousewheel, only sliderMoved() signals are emitted,
        # with no final  valueChanged(). If we want to do a fast preview of something on sliderMoved(), and a "slow" final
        # step on valueChanged(), we're in trouble. So we start a timer on sliderMoved(), and if the timer expires without
        # anything else happening, do a valueChanged().
        # Here we use a timer to call zoomHistogramFinalize() w/o an argument.
        self._whistzoom_timer = QTimer(self)
        self._whistzoom_timer.setSingleShot(True)
        self._whistzoom_timer.setInterval(500)
        QObject.connect(self._whistzoom_timer, SIGNAL("timeout()"), self._zoomHistogramFinalize)
        # set same size for all buttons and controls
        width = 24
        for w in self._whistunzoom, self._whistzoomin, self._whistzoomout:
            w.setMinimumSize(width, width)
            w.setMaximumSize(width, width)
        self._whistzoom.setMinimumSize(80, width)
        self._wlab_histpos_text = "(hover here for help)"
        self._wlab_histpos = QLabel(self._wlab_histpos_text, self)
        self._wlab_histpos.setToolTip("""
      <P>The plot shows a histogram of either the full image or its selected subset
      (as per the "Data subset" section below).</P>
      <P>The current intensity range is indicated by the grey box
      in the plot.</P>
      <P>Use the left mouse button to change the low intensity limit, and the right
      button (on Macs, use Ctrl-click) to change the high limit.</P>
      <P>Use Shift with the left mouse button to zoom into an area of the histogram,
      or else use the "zoom wheel" control or the plus/minus toolbuttons above the histogram to zoom in or out.
      To zoom back out to the full extent of the histogram, click on the rightmost button above the histogram.</P>
      """)
        lo2.addWidget(self._wlab_histpos, 1)
        lo2.addWidget(self._wautozoom)
        lo2.addWidget(self._wlogy, 0)
        lo2.addWidget(self._whistzoomin, 0)
#.........这里部分代码省略.........
开发者ID:ska-sa,项目名称:tigger,代码行数:101,代码来源:ControlDialog.py

示例9: setupUi


#.........这里部分代码省略.........
        self.nTapsEdit.setFrameShape(QtGui.QFrame.Box)
        self.nTapsEdit.setFrameShadow(QtGui.QFrame.Raised)
        self.nTapsEdit.setText("")
        self.nTapsEdit.setObjectName("nTapsEdit")
        self.formLayout_8.setWidget(1, QtGui.QFormLayout.FieldRole, self.nTapsEdit)
        self.verticalLayout.addWidget(self.filterPropsBox)
        self.sysParamsBox = QtGui.QGroupBox(self.filterFrame)
        self.sysParamsBox.setObjectName("sysParamsBox")
        self.formLayout_4 = QtGui.QFormLayout(self.sysParamsBox)
        self.formLayout_4.setObjectName("formLayout_4")
        self.nfftEdit = QtGui.QLineEdit(self.sysParamsBox)
        self.nfftEdit.setObjectName("nfftEdit")
        self.formLayout_4.setWidget(1, QtGui.QFormLayout.FieldRole, self.nfftEdit)
        self.nfftLabel = QtGui.QLabel(self.sysParamsBox)
        self.nfftLabel.setMinimumSize(QtCore.QSize(150, 0))
        self.nfftLabel.setObjectName("nfftLabel")
        self.formLayout_4.setWidget(1, QtGui.QFormLayout.LabelRole, self.nfftLabel)
        self.verticalLayout.addWidget(self.sysParamsBox)
        self.designButton = QtGui.QPushButton(self.filterFrame)
        self.designButton.setMinimumSize(QtCore.QSize(0, 0))
        self.designButton.setMaximumSize(QtCore.QSize(200, 16777215))
        self.designButton.setAutoDefault(True)
        self.designButton.setDefault(True)
        self.designButton.setObjectName("designButton")
        self.verticalLayout.addWidget(self.designButton)
        self.gridLayout.addWidget(self.filterFrame, 1, 0, 1, 1)
        self.tabGroup = QtGui.QTabWidget(self.centralwidget)
        self.tabGroup.setMinimumSize(QtCore.QSize(800, 0))
        self.tabGroup.setObjectName("tabGroup")
        self.freqTab = QtGui.QWidget()
        self.freqTab.setObjectName("freqTab")
        self.horizontalLayout_2 = QtGui.QHBoxLayout(self.freqTab)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.freqPlot = QwtPlot(self.freqTab)
        self.freqPlot.setObjectName("freqPlot")
        self.horizontalLayout_2.addWidget(self.freqPlot)
        self.tabGroup.addTab(self.freqTab, "")
        self.timeTab = QtGui.QWidget()
        self.timeTab.setObjectName("timeTab")
        self.horizontalLayout = QtGui.QHBoxLayout(self.timeTab)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.timePlot = QwtPlot(self.timeTab)
        self.timePlot.setObjectName("timePlot")
        self.horizontalLayout.addWidget(self.timePlot)
        self.tabGroup.addTab(self.timeTab, "")
        self.phaseTab = QtGui.QWidget()
        self.phaseTab.setObjectName("phaseTab")
        self.horizontalLayout_3 = QtGui.QHBoxLayout(self.phaseTab)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.phasePlot = QwtPlot(self.phaseTab)
        self.phasePlot.setObjectName("phasePlot")
        self.horizontalLayout_3.addWidget(self.phasePlot)
        self.tabGroup.addTab(self.phaseTab, "")
        self.groupTab = QtGui.QWidget()
        self.groupTab.setObjectName("groupTab")
        self.horizontalLayout_4 = QtGui.QHBoxLayout(self.groupTab)
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.groupPlot = QwtPlot(self.groupTab)
        self.groupPlot.setObjectName("groupPlot")
        self.horizontalLayout_4.addWidget(self.groupPlot)
        self.tabGroup.addTab(self.groupTab, "")
        self.gridLayout.addWidget(self.tabGroup, 1, 1, 1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1124, 27))
        self.menubar.setObjectName("menubar")
开发者ID:danbar,项目名称:gnuradio,代码行数:67,代码来源:pyqt_filter.py

示例10: Ui_MainWindow


#.........这里部分代码省略.........
        self.nTapsEdit.setFrameShape(QtGui.QFrame.Box)
        self.nTapsEdit.setFrameShadow(QtGui.QFrame.Raised)
        self.nTapsEdit.setText("")
        self.nTapsEdit.setObjectName("nTapsEdit")
        self.formLayout_8.setWidget(1, QtGui.QFormLayout.FieldRole, self.nTapsEdit)
        self.verticalLayout.addWidget(self.filterPropsBox)
        self.sysParamsBox = QtGui.QGroupBox(self.filterFrame)
        self.sysParamsBox.setObjectName("sysParamsBox")
        self.formLayout_4 = QtGui.QFormLayout(self.sysParamsBox)
        self.formLayout_4.setObjectName("formLayout_4")
        self.nfftEdit = QtGui.QLineEdit(self.sysParamsBox)
        self.nfftEdit.setObjectName("nfftEdit")
        self.formLayout_4.setWidget(1, QtGui.QFormLayout.FieldRole, self.nfftEdit)
        self.nfftLabel = QtGui.QLabel(self.sysParamsBox)
        self.nfftLabel.setMinimumSize(QtCore.QSize(150, 0))
        self.nfftLabel.setObjectName("nfftLabel")
        self.formLayout_4.setWidget(1, QtGui.QFormLayout.LabelRole, self.nfftLabel)
        self.verticalLayout.addWidget(self.sysParamsBox)
        self.designButton = QtGui.QPushButton(self.filterFrame)
        self.designButton.setMinimumSize(QtCore.QSize(0, 0))
        self.designButton.setMaximumSize(QtCore.QSize(200, 16777215))
        self.designButton.setAutoDefault(True)
        self.designButton.setDefault(True)
        self.designButton.setObjectName("designButton")
        self.verticalLayout.addWidget(self.designButton)
        self.gridLayout.addWidget(self.filterFrame, 1, 0, 1, 1)
        self.tabGroup = QtGui.QTabWidget(self.centralwidget)
        self.tabGroup.setMinimumSize(QtCore.QSize(800, 0))
        self.tabGroup.setObjectName("tabGroup")
        self.freqTab = QtGui.QWidget()
        self.freqTab.setObjectName("freqTab")
        self.horizontalLayout_2 = QtGui.QHBoxLayout(self.freqTab)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.freqPlot = QwtPlot(self.freqTab)
        self.freqPlot.setObjectName("freqPlot")
        self.horizontalLayout_2.addWidget(self.freqPlot)
        self.tabGroup.addTab(self.freqTab, "")
        self.timeTab = QtGui.QWidget()
        self.timeTab.setObjectName("timeTab")
        self.horizontalLayout = QtGui.QHBoxLayout(self.timeTab)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.timePlot = QwtPlot(self.timeTab)
        self.timePlot.setObjectName("timePlot")
        self.horizontalLayout.addWidget(self.timePlot)
        self.tabGroup.addTab(self.timeTab, "")
        self.phaseTab = QtGui.QWidget()
        self.phaseTab.setObjectName("phaseTab")
        self.horizontalLayout_3 = QtGui.QHBoxLayout(self.phaseTab)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.phasePlot = QwtPlot(self.phaseTab)
        self.phasePlot.setObjectName("phasePlot")
        self.horizontalLayout_3.addWidget(self.phasePlot)
        self.tabGroup.addTab(self.phaseTab, "")
        self.groupTab = QtGui.QWidget()
        self.groupTab.setObjectName("groupTab")
        self.horizontalLayout_4 = QtGui.QHBoxLayout(self.groupTab)
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.groupPlot = QwtPlot(self.groupTab)
        self.groupPlot.setObjectName("groupPlot")
        self.horizontalLayout_4.addWidget(self.groupPlot)
        self.tabGroup.addTab(self.groupTab, "")
        self.gridLayout.addWidget(self.tabGroup, 1, 1, 1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1124, 27))
        self.menubar.setObjectName("menubar")
开发者ID:danbar,项目名称:gnuradio,代码行数:67,代码来源:pyqt_filter.py

示例11: setupUi

    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(1172, 708)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.horizontalLayout_2 = QtGui.QHBoxLayout(self.centralwidget)
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.graphSelectionLayout = QtGui.QVBoxLayout()
        self.graphSelectionLayout.setSizeConstraint(QtGui.QLayout.SetDefaultConstraint)
        self.graphSelectionLayout.setObjectName(_fromUtf8("graphSelectionLayout"))
        self.lblProject = QtGui.QLabel(self.centralwidget)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.lblProject.setFont(font)
        self.lblProject.setObjectName(_fromUtf8("lblProject"))
        self.graphSelectionLayout.addWidget(self.lblProject)
        self.listProjectMeasurements = QtGui.QListWidget(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.listProjectMeasurements.sizePolicy().hasHeightForWidth())
        self.listProjectMeasurements.setSizePolicy(sizePolicy)
        self.listProjectMeasurements.setObjectName(_fromUtf8("listProjectMeasurements"))
        self.graphSelectionLayout.addWidget(self.listProjectMeasurements)
        self.btnProjectClearSelection = QtGui.QPushButton(self.centralwidget)
        self.btnProjectClearSelection.setEnabled(False)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.btnProjectClearSelection.sizePolicy().hasHeightForWidth())
        self.btnProjectClearSelection.setSizePolicy(sizePolicy)
        self.btnProjectClearSelection.setObjectName(_fromUtf8("btnProjectClearSelection"))
        self.graphSelectionLayout.addWidget(self.btnProjectClearSelection)
        self.lblMeasureParam = QtGui.QLabel(self.centralwidget)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.lblMeasureParam.setFont(font)
        self.lblMeasureParam.setObjectName(_fromUtf8("lblMeasureParam"))
        self.graphSelectionLayout.addWidget(self.lblMeasureParam)
        self.listMeasurementParameter = QtGui.QListWidget(self.centralwidget)
        self.listMeasurementParameter.setEnabled(True)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.listMeasurementParameter.sizePolicy().hasHeightForWidth())
        self.listMeasurementParameter.setSizePolicy(sizePolicy)
        self.listMeasurementParameter.setObjectName(_fromUtf8("listMeasurementParameter"))
        self.graphSelectionLayout.addWidget(self.listMeasurementParameter)
        self.btnMeasureParamClearSelection = QtGui.QPushButton(self.centralwidget)
        self.btnMeasureParamClearSelection.setEnabled(False)
        self.btnMeasureParamClearSelection.setObjectName(_fromUtf8("btnMeasureParamClearSelection"))
        self.graphSelectionLayout.addWidget(self.btnMeasureParamClearSelection)
        self.horizontalLayout_2.addLayout(self.graphSelectionLayout)
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.lblLowerDisplayedFrequency = QtGui.QLabel(self.centralwidget)
        self.lblLowerDisplayedFrequency.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.lblLowerDisplayedFrequency.setObjectName(_fromUtf8("lblLowerDisplayedFrequency"))
        self.horizontalLayout.addWidget(self.lblLowerDisplayedFrequency)
        self.dsbLowerDisplayedFrequency = QtGui.QDoubleSpinBox(self.centralwidget)
        self.dsbLowerDisplayedFrequency.setEnabled(False)
        self.dsbLowerDisplayedFrequency.setObjectName(_fromUtf8("dsbLowerDisplayedFrequency"))
        self.horizontalLayout.addWidget(self.dsbLowerDisplayedFrequency)
        self.lblUpperDisplayedFrequency = QtGui.QLabel(self.centralwidget)
        self.lblUpperDisplayedFrequency.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.lblUpperDisplayedFrequency.setObjectName(_fromUtf8("lblUpperDisplayedFrequency"))
        self.horizontalLayout.addWidget(self.lblUpperDisplayedFrequency)
        self.dsbUpperDisplayedFrequency = QtGui.QDoubleSpinBox(self.centralwidget)
        self.dsbUpperDisplayedFrequency.setEnabled(False)
        self.dsbUpperDisplayedFrequency.setObjectName(_fromUtf8("dsbUpperDisplayedFrequency"))
        self.horizontalLayout.addWidget(self.dsbUpperDisplayedFrequency)
        self.btnApplyFrequencyRange = QtGui.QPushButton(self.centralwidget)
        self.btnApplyFrequencyRange.setEnabled(False)
        self.btnApplyFrequencyRange.setObjectName(_fromUtf8("btnApplyFrequencyRange"))
        self.horizontalLayout.addWidget(self.btnApplyFrequencyRange)
        self.btnRefreshSelection = QtGui.QPushButton(self.centralwidget)
        self.btnRefreshSelection.setEnabled(False)
        self.btnRefreshSelection.setObjectName(_fromUtf8("btnRefreshSelection"))
        self.horizontalLayout.addWidget(self.btnRefreshSelection)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.qwtPlot = QwtPlot(self.centralwidget)
        self.qwtPlot.setObjectName(_fromUtf8("qwtPlot"))
        self.verticalLayout.addWidget(self.qwtPlot)
        self.horizontalLayout_2.addLayout(self.verticalLayout)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1172, 25))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        self.menuFile = QtGui.QMenu(self.menubar)
        self.menuFile.setObjectName(_fromUtf8("menuFile"))
        self.menuHilfe = QtGui.QMenu(self.menubar)
        self.menuHilfe.setObjectName(_fromUtf8("menuHilfe"))
        self.menuAnalysis = QtGui.QMenu(self.menubar)
        self.menuAnalysis.setObjectName(_fromUtf8("menuAnalysis"))
        self.menuProject = QtGui.QMenu(self.menubar)
        self.menuProject.setObjectName(_fromUtf8("menuProject"))
#.........这里部分代码省略.........
开发者ID:mrstibbons,项目名称:impedance_tuby_py,代码行数:101,代码来源:main_window.py

示例12: setupUi

    def setupUi(self, Frame):
        Frame.setObjectName("Frame")
        Frame.resize(652, 351)
        Frame.setFrameShape(QtGui.QFrame.StyledPanel)
        Frame.setFrameShadow(QtGui.QFrame.Raised)
        self.horizontalLayoutWidget = QtGui.QWidget(Frame)
        self.horizontalLayoutWidget.setGeometry(QtCore.QRect(25, 27, 591, 271))
        self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
        self.horizontalLayout = QtGui.QHBoxLayout(self.horizontalLayoutWidget)
        self.horizontalLayout.setSizeConstraint(QtGui.QLayout.SetMaximumSize)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.qwtPlot = QwtPlot(self.horizontalLayoutWidget)
        self.qwtPlot.setObjectName("qwtPlot")
        self.horizontalLayout.addWidget(self.qwtPlot)
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.gridLayout = QtGui.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtGui.QLabel(self.horizontalLayoutWidget)
        self.label.setLineWidth(1)
        self.label.setMargin(2)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.Slider = QwtSlider(self.horizontalLayoutWidget)
        self.Slider.setObjectName("Slider")
        self.gridLayout.addWidget(self.Slider, 0, 1, 1, 1)
        self.lcdNumber_2 = QtGui.QLCDNumber(self.horizontalLayoutWidget)
        self.lcdNumber_2.setObjectName("lcdNumber_2")
        self.gridLayout.addWidget(self.lcdNumber_2, 0, 2, 1, 1)
        self.label_4 = QtGui.QLabel(self.horizontalLayoutWidget)
        self.label_4.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_4.setMargin(2)
        self.label_4.setObjectName("label_4")
        self.gridLayout.addWidget(self.label_4, 0, 3, 1, 1)
        self.label_2 = QtGui.QLabel(self.horizontalLayoutWidget)
        self.label_2.setMargin(2)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
        self.Slider_2 = QwtSlider(self.horizontalLayoutWidget)
        self.Slider_2.setObjectName("Slider_2")
        self.gridLayout.addWidget(self.Slider_2, 1, 1, 1, 1)
        self.lcdNumber_3 = QtGui.QLCDNumber(self.horizontalLayoutWidget)
        self.lcdNumber_3.setObjectName("lcdNumber_3")
        self.gridLayout.addWidget(self.lcdNumber_3, 1, 2, 1, 1)
        self.label_5 = QtGui.QLabel(self.horizontalLayoutWidget)
        self.label_5.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_5.setMargin(2)
        self.label_5.setObjectName("label_5")
        self.gridLayout.addWidget(self.label_5, 1, 3, 1, 1)
        self.label_3 = QtGui.QLabel(self.horizontalLayoutWidget)
        self.label_3.setMargin(2)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1)
        self.Slider_3 = QwtSlider(self.horizontalLayoutWidget)
        self.Slider_3.setObjectName("Slider_3")
        self.gridLayout.addWidget(self.Slider_3, 2, 1, 1, 1)
        self.lcdNumber = QtGui.QLCDNumber(self.horizontalLayoutWidget)
        self.lcdNumber.setObjectName("lcdNumber")
        self.gridLayout.addWidget(self.lcdNumber, 2, 2, 1, 1)
        self.label_6 = QtGui.QLabel(self.horizontalLayoutWidget)
        self.label_6.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_6.setMargin(2)
        self.label_6.setObjectName("label_6")
        self.gridLayout.addWidget(self.label_6, 2, 3, 1, 1)
        self.verticalLayout.addLayout(self.gridLayout)
        self.horizontalLayout.addLayout(self.verticalLayout)

        self.retranslateUi(Frame)
        QtCore.QMetaObject.connectSlotsByName(Frame)
开发者ID:Torgeir-KK6ADH,项目名称:trowelproject,代码行数:71,代码来源:scope.py

示例13: add_plot

 def add_plot(self, name, units):
     # legend
     legend = QwtLegend()
     legend.setFrameStyle(Qt.QFrame.Box | Qt.QFrame.Sunken)
     legend.setItemMode(QwtLegend.ClickableItem)
     # plot
     plot = QwtPlot(self)
     plot.setTitle(name.upper())
     plot.setObjectName(name)
     plot.setCanvasBackground(Qt.Qt.white)
     plot.setAxisTitle(QwtPlot.xBottom, "time [s]")
     plot.insertLegend(legend, QwtPlot.RightLegend)
     plot.time = deque(maxlen=MAX_LENGTH)
     plot.data = []
     plot.curves = []
     for i, unit in enumerate(units):
         position = QwtPlot.yLeft if i == 0 else QwtPlot.yRight
         curve = QwtPlotCurve(LEGENDS[unit])
         curve.setPen(Qt.QPen(self.next_color(), 2))
         curve.setYAxis(position)
         curve.attach(plot)
         plot.enableAxis(position)
         plot.setAxisTitle(position, unit)
         plot.curves.append(curve)
         plot.data.append(deque(maxlen=MAX_LENGTH))
     self.vertical_layout.addWidget(plot)
     self._plots[name] = plot
开发者ID:nikinikiniki,项目名称:libsensors-python,代码行数:27,代码来源:streaming_plot_client.py

示例14: mouseMoveEvent

 def mouseMoveEvent(self, event):
     QwtPlot.mouseMoveEvent(self, event)
开发者ID:AutumnLight,项目名称:orange,代码行数:2,代码来源:OWPCA.py

示例15: ValueWidget

class ValueWidget(QWidget, Ui_Widget):

    def __init__(self, iface):

        self.hasqwt=hasqwt
        self.hasmpl=hasmpl
        self.layerMap=dict()
        self.statsChecked=False
        self.ymin=0
        self.ymax=250

        self.iface=iface
        self.canvas=self.iface.mapCanvas()
        self.legend=self.iface.legendInterface()
        self.logger = logging.getLogger('.'.join((__name__, 
                                        self.__class__.__name__)))

        QWidget.__init__(self)
        self.setupUi(self)
        self.setupUi_extra()

        QObject.connect(self.cbxActive,SIGNAL("stateChanged(int)"),self.changeActive)
        QObject.connect(self.cbxGraph,SIGNAL("stateChanged(int)"),self.changePage)
        QObject.connect(self.canvas, SIGNAL( "keyPressed( QKeyEvent * )" ), self.pauseDisplay )
        QObject.connect(self.plotSelector, SIGNAL( "currentIndexChanged ( int )" ), self.changePlot )

    def setupUi_extra(self):

        # checkboxes
        #self.changeActive(Qt.Checked)
        #set inactive by default - should save last state in user config
        self.cbxActive.setCheckState(Qt.Unchecked)

        # plot
        self.plotSelector.setVisible( False )
        self.cbxStats.setVisible( False )
        self.graphControls.setVisible( False )
        if self.hasqwt:
            self.plotSelector.addItem( 'Qwt' )
        if self.hasmpl:
            self.plotSelector.addItem( 'mpl' )
        self.plotSelector.setCurrentIndex( 0 );
        if (not self.hasqwt or not self.hasmpl):
            #self.plotSelector.setVisible(False)
            self.plotSelector.setEnabled(False)

        # Page 2 - qwt
        if self.hasqwt:
            self.qwtPlot = QwtPlot(self.stackedWidget)
            self.qwtPlot.setAutoFillBackground(False)
            self.qwtPlot.setObjectName("qwtPlot")
            self.curve = QwtPlotCurve()
            self.curve.setSymbol(
                QwtSymbol(QwtSymbol.Ellipse,
                          QBrush(Qt.white),
                          QPen(Qt.red, 2),
                          QSize(9, 9)))
            self.curve.attach(self.qwtPlot)
            self.qwtPlot.setVisible(False)
        else:
            self.qwtPlot = QtGui.QLabel("Need Qwt >= 5.0 or matplotlib >= 1.0 !")

        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.qwtPlot.sizePolicy().hasHeightForWidth())
        self.qwtPlot.setSizePolicy(sizePolicy)
        self.qwtPlot.setObjectName("qwtPlot")
        self.qwtPlot.updateGeometry()
        self.stackedWidget.addWidget(self.qwtPlot)

        #Page 3 - matplotlib
        self.mplLine = None #make sure to invalidate when layers change
        if self.hasmpl:
            # mpl stuff
            # should make figure light gray
            self.mplBackground = None #http://www.scipy.org/Cookbook/Matplotlib/Animations
            self.mplFig = plt.Figure(facecolor='w', edgecolor='w')
            self.mplFig.subplots_adjust(left=0.1, right=0.975, bottom=0.13, top=0.95)
            self.mplPlt = self.mplFig.add_subplot(111)   
            self.mplPlt.tick_params(axis='both', which='major', labelsize=12)
            self.mplPlt.tick_params(axis='both', which='minor', labelsize=10)                           
            # qt stuff
            self.pltCanvas = FigureCanvasQTAgg(self.mplFig)
            self.pltCanvas.setParent(self.stackedWidget)
            self.pltCanvas.setAutoFillBackground(False)
            self.pltCanvas.setObjectName("mplPlot")
            self.mplPlot = self.pltCanvas
            self.mplPlot.setVisible(False)
        else:
            self.mplPlot = QtGui.QLabel("Need Qwt >= 5.0 or matplotlib >= 1.0 !")

        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.mplPlot.sizePolicy().hasHeightForWidth())
        self.mplPlot.setSizePolicy(sizePolicy)
        self.qwtPlot.setObjectName("qwtPlot")
        self.mplPlot.updateGeometry()
        self.stackedWidget.addWidget(self.mplPlot)
#.........这里部分代码省略.........
开发者ID:blazek,项目名称:valuetool,代码行数:101,代码来源:valuewidget.py


注:本文中的PyQt4.Qwt5.QwtPlot类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。