embedding.py 文件源码

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

项目:Dragonfly 作者: duaneloh 项目源码 文件源码
def add_roi_frame(self):
        self.vbox.setStretch(self.vbox.count()-1, 0)
        self.roi_frame = QtWidgets.QFrame(self)
        self.vbox.addWidget(self.roi_frame)
        self.vbox.addStretch(1)
        vbox = QtWidgets.QVBoxLayout()
        self.roi_frame.setLayout(vbox)

        self.roi_summary = QtWidgets.QLabel('', self)
        vbox.addWidget(self.roi_summary)

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        button = QtWidgets.QPushButton('Clear ROIs', self)
        button.clicked.connect(self.clear_roi)
        hbox.addWidget(button)
        hbox.addStretch(1)

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        self.roi_choice = QtWidgets.QGridLayout()
        self.current_roi = QtWidgets.QButtonGroup()
        hbox.addLayout(self.roi_choice)
        hbox.addStretch(1)

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        button = QtWidgets.QPushButton('Prev', self)
        button.clicked.connect(self.prev_frame)
        hbox.addWidget(button)
        button = QtWidgets.QPushButton('Next', self)
        button.clicked.connect(self.next_frame)
        hbox.addWidget(button)
        button = QtWidgets.QPushButton('Random', self)
        button.clicked.connect(self.rand_frame)
        hbox.addWidget(button)
        hbox.addStretch(1)

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        self.class_tag = QtWidgets.QLineEdit('', self)
        self.class_tag.setFixedWidth(24)
        hbox.addWidget(self.class_tag)
        button = QtWidgets.QPushButton('Apply Class', self)
        button.clicked.connect(self.apply_class)
        hbox.addWidget(button)
        hbox.addStretch(1)

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        self.class_fname = QtWidgets.QLineEdit(self.classes.fname, self)
        self.class_fname.editingFinished.connect(self.update_name)
        hbox.addWidget(self.class_fname)
        button = QtWidgets.QPushButton('Save Classes', self)
        button.clicked.connect(self.classes.save)
        hbox.addWidget(button)
        hbox.addStretch(1)
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号