def __init__(self, c): self.c = c tabw = c.frame.top.tabWidget self.listWidget = QtWidgets.QListWidget(tabw) tabw.addTab(self.listWidget, "Headlines") c.frame.top.treeWidget.itemSelectionChanged.connect(self.req_update) self.requested = False
def initUI(self): # create GUI components ## this code is atrocious... don't look too closely self.setObjectName("LeoTagWidget") # verticalLayout_2: contains # verticalLayout self.verticalLayout_2 = QtWidgets.QVBoxLayout(self) self.verticalLayout_2.setContentsMargins(0, 1, 0, 1) self.verticalLayout_2.setObjectName("nodetags-verticalLayout_2") # horizontalLayout: contains # "Refresh" button # comboBox self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setObjectName("nodetags-horizontalLayout") # horizontalLayout2: contains # label2 # not much by default -- it's a place to add buttons for current tags self.horizontalLayout2 = QtWidgets.QHBoxLayout() self.horizontalLayout2.setContentsMargins(0, 0, 0, 0) self.horizontalLayout2.setObjectName("nodetags-horizontalLayout2") label2 = QtWidgets.QLabel(self) label2.setObjectName("nodetags-label2") label2.setText("Tags for current node:") self.horizontalLayout2.addWidget(label2) # verticalLayout: contains # horizontalLayout # listWidget # horizontalLayout2 # label self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("nodetags-verticalLayout") self.comboBox = QtWidgets.QComboBox(self) self.comboBox.setObjectName("nodetags-comboBox") self.comboBox.setEditable(True) self.horizontalLayout.addWidget(self.comboBox) self.pushButton = QtWidgets.QPushButton("+", self) self.pushButton.setObjectName("nodetags-pushButton") self.pushButton.setMinimumSize(24, 24) self.pushButton.setMaximumSize(24, 24) self.horizontalLayout.addWidget(self.pushButton) self.verticalLayout.addLayout(self.horizontalLayout) self.listWidget = QtWidgets.QListWidget(self) self.listWidget.setObjectName("nodetags-listWidget") self.verticalLayout.addWidget(self.listWidget) self.verticalLayout.addLayout(self.horizontalLayout2) self.label = QtWidgets.QLabel(self) self.label.setObjectName("nodetags-label") self.label.setText("Total: 0 items") self.verticalLayout.addWidget(self.label) self.verticalLayout_2.addLayout(self.verticalLayout) QtCore.QMetaObject.connectSlotsByName(self)
def initUI(self): # create GUI components ## this code is atrocious... don't look too closely self.setObjectName("LeoNodewatchWidget") # verticalLayout_2: contains # verticalLayout self.verticalLayout_2 = QtWidgets.QVBoxLayout(self) self.verticalLayout_2.setContentsMargins(0, 1, 0, 1) self.verticalLayout_2.setObjectName("verticalLayout_2") # horizontalLayout: contains # "Refresh" button # comboBox self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setObjectName("horizontalLayout") # verticalLayout: contains # horizontalLayout # listWidget # label self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.comboBox = QtWidgets.QComboBox(self) self.comboBox.setObjectName("comboBox") self.horizontalLayout.addWidget(self.comboBox) self.pushButton = QtWidgets.QPushButton("Refresh", self) self.pushButton.setObjectName("pushButton") self.pushButton.setMinimumSize(50, 24) self.pushButton.setMaximumSize(50, 24) self.horizontalLayout.addWidget(self.pushButton) self.verticalLayout.addLayout(self.horizontalLayout) self.listWidget = QtWidgets.QListWidget(self) self.listWidget.setObjectName("listWidget") self.verticalLayout.addWidget(self.listWidget) self.label = QtWidgets.QLabel(self) self.label.setObjectName("label") self.label.setText("Total: 0 items") self.verticalLayout.addWidget(self.label) self.verticalLayout_2.addLayout(self.verticalLayout) QtCore.QMetaObject.connectSlotsByName(self)