def __init__(self): super(TRTextBlockSelect, self).__init__() # -- Head self.lay_head = QtGui.QHBoxLayout() self.btn_refresh = QtGui.QPushButton('&Refresh') self.btn_refresh.clicked.connect(self.refresh) self.lay_head.addWidget(self.btn_refresh) self.addLayout(self.lay_head) # -- TextBlock List self.lst_textBlocks = QtGui.QListWidget() self.lst_textBlocks.setAlternatingRowColors(True) self.lst_textBlocks.setMinimumHeight(100) self.lst_textBlocks.setSelectionMode( QtGui.QAbstractItemView.ExtendedSelection) self.addWidget(self.lst_textBlocks)
def __init__(self): super(TRLayerSelect, self).__init__() # - Init self.header_names = ['Layer/Anchor' + ' ' * 20, 'X', 'Y'] self.data = OrderedDict([('Refresh', [])]) # -- Head self.lay_head = QtGui.QHBoxLayout() self.edt_glyphName = QtGui.QLineEdit() self.btn_refresh = QtGui.QPushButton('&Refresh') self.btn_refresh.clicked.connect(self.refresh) self.lay_head.addWidget(QtGui.QLabel('G:')) self.lay_head.addWidget(self.edt_glyphName) self.lay_head.addWidget(self.btn_refresh) self.addLayout(self.lay_head) # -- Tree view self.tree_anchors = TRtreeWidget(self.data, self.header_names) self.tree_anchors.setMinimumHeight(400) self.addWidget(self.tree_anchors)
def __init__(self): super(TRWLayerSelect, self).__init__() # - Init self.glyph = None # -- Head self.lay_head = QtGui.QHBoxLayout() self.edt_glyphName = QtGui.QLineEdit() self.btn_refresh = QtGui.QPushButton('&Refresh') self.btn_refresh.clicked.connect(self.refresh) self.lay_head.addWidget(QtGui.QLabel('G:')) self.lay_head.addWidget(self.edt_glyphName) self.lay_head.addWidget(self.btn_refresh) self.addLayout(self.lay_head) # -- Layer List self.lst_layers = TRWMasterTableView(init_table_dict) self.lst_layers.selectionModel().selectionChanged.connect( self.set_selected) self.addWidget(self.lst_layers) self.refresh()