segimg.py 文件源码

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

项目:Semi-automatic-Annotation 作者: Luoyadan 项目源码 文件源码
def __init__(self, typeList, curType, curID, parent = None):
        super(modifyTypeID_Dialog, self).__init__(parent)

        self.select_type = typeList[0]
        self.select_ID = curID 

        Vlayout = QtGui.QVBoxLayout(self)

        # widget for editing the date
        self.cb_label = QtGui.QLabel()
        self.cb_label.setText("LaneLine Type: ")
        self.sp_label = QtGui.QLabel()
        self.sp_label.setText("LaneLine ID: ")

        self.cb = QtGui.QComboBox()
        self.cb.addItems(typeList)
        self.cb.setCurrentIndex(typeList.index(curType))
        self.cb.currentIndexChanged.connect(self.type_change)

        self.sp = QtGui.QSpinBox()
        self.sp.setRange(-128, 127)
        self.sp.setValue(curID)
        self.sp.valueChanged.connect(self.ID_change)

        # add widgets to layout
        Hlayout1 = QtGui.QHBoxLayout(self)
        Hlayout1.addWidget(self.cb_label)
        Hlayout1.addWidget(self.sp_label)
        Vlayout.addLayout(Hlayout1)

        Hlayout2 = QtGui.QHBoxLayout(self)
        Hlayout2.addWidget(self.cb)
        Hlayout2.addWidget(self.sp)
        Vlayout.addLayout(Hlayout2)

        # OK and Cancel buttons
        buttons = QDialogButtonBox(
            QDialogButtonBox.Ok | QDialogButtonBox.Cancel,
            Qt.Horizontal, self)
        buttons.accepted.connect(self.accept)
        buttons.rejected.connect(self.reject)
        Vlayout.addWidget(buttons)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号