tab_scene.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:kite 作者: pyrocko 项目源码 文件源码
def __init__(self, plot, parent=None):
        QtGui.QDialog.__init__(self, parent)

        loadUi(get_resource('transect.ui'), baseinstance=self)

        pxmap = self.style().standardPixmap

        self.closeButton.setIcon(
            pxmap(QtGui.QStyle.SP_DialogCloseButton))
        self.createButton.setIcon(
            pxmap(QtGui.QStyle.SP_ArrowUp))
        self.removeButton.setIcon(
            pxmap(QtGui.QStyle.SP_DialogDiscardButton))

        self.plot = plot
        self.poly_line = None

        self.trans_plot = pg.PlotDataItem(
            antialias=True,
            fillLevel=0.,
            fillBrush=pg.mkBrush(0, 127, 0, 150))

        self.plt_wdgt = pg.PlotWidget()
        self.plt_wdgt.setLabels(
            bottom={'Distance', 'm'},
            left='Displacement [m]')

        self.plt_wdgt.showGrid(True, True, alpha=.5)
        self.plt_wdgt.enableAutoRange()
        self.plt_wdgt.addItem(self.trans_plot)

        self.layoutPlot.addWidget(self.plt_wdgt)
        self.plot.image.sigImageChanged.connect(self.updateTransPlot)
        self.createButton.released.connect(self.addPolyLine)
        self.removeButton.released.connect(self.removePolyLine)

        parent.model.sigConfigChanged.connect(self.close)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号