def setupUi(self, UnittestDialog): UnittestDialog.setObjectName("UnittestDialog") UnittestDialog.resize(650, 700) self.verticalLayout_2 = QtWidgets.QVBoxLayout(UnittestDialog) self.verticalLayout_2.setObjectName("verticalLayout_2") self.groupBox = QtWidgets.QGroupBox(UnittestDialog) self.groupBox.setTitle("") self.groupBox.setObjectName("groupBox") self._4 = QtWidgets.QGridLayout(self.groupBox) self._4.setObjectName("_4") self.testComboBox = QtWidgets.QComboBox(self.groupBox) self.testComboBox.setEditable(True) self.testComboBox.setObjectName("testComboBox") self._4.addWidget(self.testComboBox, 1, 1, 1, 2) self.testsuiteComboBox = QtWidgets.QComboBox(self.groupBox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.testsuiteComboBox.sizePolicy().hasHeightForWidth()) self.testsuiteComboBox.setSizePolicy(sizePolicy) self.testsuiteComboBox.setEditable(True) self.testsuiteComboBox.setInsertPolicy(QtWidgets.QComboBox.InsertAtTop) self.testsuiteComboBox.setDuplicatesEnabled(False) self.testsuiteComboBox.setObjectName("testsuiteComboBox") self._4.addWidget(self.testsuiteComboBox, 0, 1, 1, 1) self.label = QtWidgets.QLabel(self.groupBox) self.label.setObjectName("label") self._4.addWidget(self.label, 1, 0, 1, 1) self.testsuiteLabel = QtWidgets.QLabel(self.groupBox) self.testsuiteLabel.setObjectName("testsuiteLabel") self._4.addWidget(self.testsuiteLabel, 0, 0, 1, 1) self.fileDialogButton = QtWidgets.QToolButton(self.groupBox) self.fileDialogButton.setObjectName("fileDialogButton") self._4.addWidget(self.fileDialogButton, 0, 2, 1, 1) self.verticalLayout_2.addWidget(self.groupBox) self.optionsGroup = QtWidgets.QGroupBox(UnittestDialog) self.optionsGroup.setTitle("") self.optionsGroup.setObjectName("optionsGroup") self._5 = QtWidgets.QHBoxLayout(self.optionsGroup) self._5.setObjectName("_5") self.localCheckBox = QtWidgets.QCheckBox(self.optionsGroup) self.localCheckBox.setObjectName("localCheckBox") self._5.addWidget(self.localCheckBox) self.coverageCheckBox = QtWidgets.QCheckBox(self.optionsGroup) self.coverageCheckBox.setObjectName("coverageCheckBox") self._5.addWidget(self.coverageCheckBox) self.coverageEraseCheckBox = QtWidgets.QCheckBox(self.optionsGroup) self.coverageEraseCheckBox.setEnabled(False) self.coverageEraseCheckBox.setObjectName("coverageEraseCheckBox") self._5.addWidget(self.coverageEraseCheckBox) self.verticalLayout_2.addWidget(self.optionsGroup) self.progressGroupBox = QtWidgets.QGroupBox(UnittestDialog) self.progressGroupBox.setTitle("") self.progressGroupBox.setObjectName("progressGroupBox") self.verticalLayout = QtWidgets.QVBoxLayout(self.progressGroupBox) self.verticalLayout.setObjectName("verticalLayout") self._8 = QtWidgets.QHBoxLayout() self._8.setObjectName("_8") self.progressTextLabel = QtWidgets.QLabel(self.progressGroupBox) self.progressTextLabel.setObjectName("progressTextLabel") self._8.addWidget(self.progressTextLabel) spacerItem = QtWidgets.QSpacerItem(371, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self._8.addItem(spacerItem) self.progressLed = E5Led(self.progressGroupBox) self.progressLed.setObjectName("progressLed") self._8.addWidget(self.progressLed) self.verticalLayout.addLayout(self._8) self.progressProgressBar = QtWidgets.QProgressBar(self.progressGroupBox) self.progressProgressBar.setProperty("value", 0) self.progressProgressBar.setOrientation(QtCore.Qt.Horizontal) self.progressProgressBar.setObjectName("progressProgressBar") self.verticalLayout.addWidget(self.progressProgressBar) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.progressCounterRunLabel = QtWidgets.QLabel(self.progressGroupBox) self.progressCounterRunLabel.setObjectName("progressCounterRunLabel") self.horizontalLayout_2.addWidget(self.progressCounterRunLabel) self.progressCounterRunCount = QtWidgets.QLabel(self.progressGroupBox) self.progressCounterRunCount.setText("0") self.progressCounterRunCount.setObjectName("progressCounterRunCount") self.horizontalLayout_2.addWidget(self.progressCounterRunCount) self.progressCounterRemLabel = QtWidgets.QLabel(self.progressGroupBox) self.progressCounterRemLabel.setObjectName("progressCounterRemLabel") self.horizontalLayout_2.addWidget(self.progressCounterRemLabel) self.progressCounterRemCount = QtWidgets.QLabel(self.progressGroupBox) self.progressCounterRemCount.setText("0") self.progressCounterRemCount.setObjectName("progressCounterRemCount") self.horizontalLayout_2.addWidget(self.progressCounterRemCount) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem1) self.verticalLayout.addLayout(self.horizontalLayout_2) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.progressCounterFailureLabel = QtWidgets.QLabel(self.progressGroupBox) self.progressCounterFailureLabel.setObjectName("progressCounterFailureLabel") self.horizontalLayout.addWidget(self.progressCounterFailureLabel) self.progressCounterFailureCount = QtWidgets.QLabel(self.progressGroupBox) self.progressCounterFailureCount.setText("0") self.progressCounterFailureCount.setObjectName("progressCounterFailureCount") self.horizontalLayout.addWidget(self.progressCounterFailureCount) self.progressCounterErrorLabel = QtWidgets.QLabel(self.progressGroupBox) self.progressCounterErrorLabel.setObjectName("progressCounterErrorLabel") self.horizontalLayout.addWidget(self.progressCounterErrorLabel) self.progressCounterErrorCount = QtWidgets.QLabel(self.progressGroupBox) self.progressCounterErrorCount.setText("0") self.progressCounterErrorCount.setObjectName("progressCounterErrorCount") self.horizontalLayout.addWidget(self.progressCounterErrorCount) self.progressCounterSkippedLabel = QtWidgets.QLabel(self.progressGroupBox) self.progressCounterSkippedLabel.setObjectName("progressCounterSkippedLabel") self.horizontalLayout.addWidget(self.progressCounterSkippedLabel) self.progressCounterSkippedCount = QtWidgets.QLabel(self.progressGroupBox) self.progressCounterSkippedCount.setText("0") self.progressCounterSkippedCount.setObjectName("progressCounterSkippedCount") self.horizontalLayout.addWidget(self.progressCounterSkippedCount) self.progressCounterExpectedFailureLabel = QtWidgets.QLabel(self.progressGroupBox) self.progressCounterExpectedFailureLabel.setObjectName("progressCounterExpectedFailureLabel") self.horizontalLayout.addWidget(self.progressCounterExpectedFailureLabel) self.progressCounterExpectedFailureCount = QtWidgets.QLabel(self.progressGroupBox) self.progressCounterExpectedFailureCount.setText("0") self.progressCounterExpectedFailureCount.setObjectName("progressCounterExpectedFailureCount") self.horizontalLayout.addWidget(self.progressCounterExpectedFailureCount) self.progressCounterUnexpectedSuccessLabel = QtWidgets.QLabel(self.progressGroupBox) self.progressCounterUnexpectedSuccessLabel.setObjectName("progressCounterUnexpectedSuccessLabel") self.horizontalLayout.addWidget(self.progressCounterUnexpectedSuccessLabel) self.progressCounterUnexpectedSuccessCount = QtWidgets.QLabel(self.progressGroupBox) self.progressCounterUnexpectedSuccessCount.setText("0") self.progressCounterUnexpectedSuccessCount.setObjectName("progressCounterUnexpectedSuccessCount") self.horizontalLayout.addWidget(self.progressCounterUnexpectedSuccessCount) spacerItem2 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem2) self.verticalLayout.addLayout(self.horizontalLayout) self.verticalLayout_2.addWidget(self.progressGroupBox) self.textLabel1 = QtWidgets.QLabel(UnittestDialog) self.textLabel1.setObjectName("textLabel1") self.verticalLayout_2.addWidget(self.textLabel1) self.testsListWidget = QtWidgets.QListWidget(UnittestDialog) self.testsListWidget.setObjectName("testsListWidget") self.verticalLayout_2.addWidget(self.testsListWidget) self.listboxLabel = QtWidgets.QLabel(UnittestDialog) self.listboxLabel.setObjectName("listboxLabel") self.verticalLayout_2.addWidget(self.listboxLabel) self.errorsListWidget = QtWidgets.QListWidget(UnittestDialog) self.errorsListWidget.setObjectName("errorsListWidget") self.verticalLayout_2.addWidget(self.errorsListWidget) self.buttonBox = QtWidgets.QDialogButtonBox(UnittestDialog) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close) self.buttonBox.setObjectName("buttonBox") self.verticalLayout_2.addWidget(self.buttonBox) self._3 = QtWidgets.QHBoxLayout() self._3.setObjectName("_3") self.sbLabel = QtWidgets.QLabel(UnittestDialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.sbLabel.sizePolicy().hasHeightForWidth()) self.sbLabel.setSizePolicy(sizePolicy) self.sbLabel.setObjectName("sbLabel") self._3.addWidget(self.sbLabel) spacerItem3 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self._3.addItem(spacerItem3) self.verticalLayout_2.addLayout(self._3) self.label.setBuddy(self.testComboBox) self.testsuiteLabel.setBuddy(self.testsuiteComboBox) self.retranslateUi(UnittestDialog) self.coverageCheckBox.toggled['bool'].connect(self.coverageEraseCheckBox.setEnabled) self.buttonBox.accepted.connect(UnittestDialog.close) self.buttonBox.rejected.connect(UnittestDialog.close) QtCore.QMetaObject.connectSlotsByName(UnittestDialog) UnittestDialog.setTabOrder(self.testsuiteComboBox, self.fileDialogButton) UnittestDialog.setTabOrder(self.fileDialogButton, self.testComboBox) UnittestDialog.setTabOrder(self.testComboBox, self.localCheckBox) UnittestDialog.setTabOrder(self.localCheckBox, self.coverageCheckBox) UnittestDialog.setTabOrder(self.coverageCheckBox, self.coverageEraseCheckBox) UnittestDialog.setTabOrder(self.coverageEraseCheckBox, self.testsListWidget) UnittestDialog.setTabOrder(self.testsListWidget, self.errorsListWidget)
def __init__(self, vm): """ Constructor @param vm view manager widget (Tabview) """ super(TabWidget, self).__init__() self.__tabBar = TabBar(self) self.setTabBar(self.__tabBar) iconSize = self.__tabBar.iconSize() self.__tabBar.setIconSize( QSize(2 * iconSize.width(), iconSize.height())) self.setUsesScrollButtons(True) self.setElideMode(Qt.ElideNone) if isMacPlatform(): self.setDocumentMode(True) self.__tabBar.tabMoveRequested.connect(self.moveTab) self.__tabBar.tabRelocateRequested.connect(self.__relocateTab) self.__tabBar.tabCopyRequested[str, int, int].connect(self.__copyTabOther) self.__tabBar.tabCopyRequested[int, int].connect(self.__copyTab) self.vm = vm self.editors = [] self.indicator = E5Led(self) self.setCornerWidget(self.indicator, Qt.TopLeftCorner) self.rightCornerWidget = QWidget(self) self.rightCornerWidgetLayout = QHBoxLayout(self.rightCornerWidget) self.rightCornerWidgetLayout.setContentsMargins(0, 0, 0, 0) self.rightCornerWidgetLayout.setSpacing(0) self.__navigationMenu = QMenu(self) self.__navigationMenu.aboutToShow.connect(self.__showNavigationMenu) self.__navigationMenu.triggered.connect(self.__navigationMenuTriggered) self.navigationButton = QToolButton(self) if Preferences.getUI("SingleCloseButton") or \ not hasattr(self, 'setTabsClosable'): self.closeButton = QToolButton(self) self.closeButton.setIcon(UI.PixmapCache.getIcon("close.png")) self.closeButton.setToolTip(self.tr("Close the current editor")) self.closeButton.setEnabled(False) self.closeButton.clicked[bool].connect(self.__closeButtonClicked) self.rightCornerWidgetLayout.addWidget(self.closeButton) else: self.tabCloseRequested.connect(self.__closeRequested) self.closeButton = None self.setCornerWidget(self.rightCornerWidget, Qt.TopRightCorner) self.__initMenu() self.contextMenuEditor = None self.contextMenuIndex = -1 self.setTabContextMenuPolicy(Qt.CustomContextMenu) self.customTabContextMenuRequested.connect(self.__showContextMenu) ericPic = QPixmap( os.path.join(getConfig('ericPixDir'), 'pymakr_small.png')) self.emptyLabel = QLabel() self.emptyLabel.setPixmap(ericPic) self.emptyLabel.setAlignment(Qt.AlignVCenter | Qt.AlignHCenter) super(TabWidget, self).addTab(self.emptyLabel, UI.PixmapCache.getIcon("empty.png"), "")
def setupUi(self, ChatWidget): ChatWidget.setObjectName("ChatWidget") ChatWidget.resize(300, 600) self.verticalLayout_2 = QtWidgets.QVBoxLayout(ChatWidget) self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) self.verticalLayout_2.setObjectName("verticalLayout_2") self.usersGroup = QtWidgets.QGroupBox(ChatWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(1) sizePolicy.setHeightForWidth( self.usersGroup.sizePolicy().hasHeightForWidth()) self.usersGroup.setSizePolicy(sizePolicy) self.usersGroup.setObjectName("usersGroup") self.verticalLayout = QtWidgets.QVBoxLayout(self.usersGroup) self.verticalLayout.setObjectName("verticalLayout") self.usersList = QtWidgets.QListWidget(self.usersGroup) self.usersList.setFocusPolicy(QtCore.Qt.NoFocus) self.usersList.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) self.usersList.setObjectName("usersList") self.verticalLayout.addWidget(self.usersList) self.verticalLayout_2.addWidget(self.usersGroup) self.chatGroup = QtWidgets.QGroupBox(ChatWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(2) sizePolicy.setHeightForWidth( self.chatGroup.sizePolicy().hasHeightForWidth()) self.chatGroup.setSizePolicy(sizePolicy) self.chatGroup.setObjectName("chatGroup") self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.chatGroup) self.verticalLayout_4.setObjectName("verticalLayout_4") self.chatEdit = QtWidgets.QTextEdit(self.chatGroup) self.chatEdit.setFocusPolicy(QtCore.Qt.NoFocus) self.chatEdit.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) self.chatEdit.setReadOnly(True) self.chatEdit.setObjectName("chatEdit") self.verticalLayout_4.addWidget(self.chatEdit) self.messageEdit = E5ClearableLineEdit(self.chatGroup) self.messageEdit.setObjectName("messageEdit") self.verticalLayout_4.addWidget(self.messageEdit) self.sendButton = QtWidgets.QPushButton(self.chatGroup) self.sendButton.setObjectName("sendButton") self.verticalLayout_4.addWidget(self.sendButton) self.verticalLayout_2.addWidget(self.chatGroup) self.sharingGroup = QtWidgets.QGroupBox(ChatWidget) self.sharingGroup.setEnabled(False) self.sharingGroup.setObjectName("sharingGroup") self.horizontalLayout = QtWidgets.QHBoxLayout(self.sharingGroup) self.horizontalLayout.setObjectName("horizontalLayout") spacerItem = QtWidgets.QSpacerItem(76, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem) self.shareButton = QtWidgets.QToolButton(self.sharingGroup) self.shareButton.setEnabled(False) self.shareButton.setCheckable(True) self.shareButton.setObjectName("shareButton") self.horizontalLayout.addWidget(self.shareButton) self.startEditButton = QtWidgets.QToolButton(self.sharingGroup) self.startEditButton.setEnabled(False) self.startEditButton.setCheckable(True) self.startEditButton.setObjectName("startEditButton") self.horizontalLayout.addWidget(self.startEditButton) self.sendEditButton = QtWidgets.QToolButton(self.sharingGroup) self.sendEditButton.setEnabled(False) self.sendEditButton.setObjectName("sendEditButton") self.horizontalLayout.addWidget(self.sendEditButton) self.cancelEditButton = QtWidgets.QToolButton(self.sharingGroup) self.cancelEditButton.setEnabled(False) self.cancelEditButton.setObjectName("cancelEditButton") self.horizontalLayout.addWidget(self.cancelEditButton) spacerItem1 = QtWidgets.QSpacerItem(75, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem1) self.verticalLayout_2.addWidget(self.sharingGroup) self.connectGroup = QtWidgets.QGroupBox(ChatWidget) self.connectGroup.setObjectName("connectGroup") self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.connectGroup) self.verticalLayout_3.setObjectName("verticalLayout_3") self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.label_2 = QtWidgets.QLabel(self.connectGroup) self.label_2.setObjectName("label_2") self.horizontalLayout_3.addWidget(self.label_2) self.hostEdit = E5ClearableComboBox(self.connectGroup) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.hostEdit.sizePolicy().hasHeightForWidth()) self.hostEdit.setSizePolicy(sizePolicy) self.hostEdit.setEditable(True) self.hostEdit.setInsertPolicy(QtWidgets.QComboBox.InsertAtTop) self.hostEdit.setSizeAdjustPolicy( QtWidgets.QComboBox.AdjustToMinimumContentsLength) self.hostEdit.setObjectName("hostEdit") self.horizontalLayout_3.addWidget(self.hostEdit) self.verticalLayout_3.addLayout(self.horizontalLayout_3) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.clearHostsButton = QtWidgets.QPushButton(self.connectGroup) self.clearHostsButton.setObjectName("clearHostsButton") self.horizontalLayout_4.addWidget(self.clearHostsButton) self.connectButton = QtWidgets.QPushButton(self.connectGroup) self.connectButton.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.connectButton.sizePolicy().hasHeightForWidth()) self.connectButton.setSizePolicy(sizePolicy) self.connectButton.setText("") self.connectButton.setAutoDefault(False) self.connectButton.setObjectName("connectButton") self.horizontalLayout_4.addWidget(self.connectButton) self.connectionLed = E5Led(self.connectGroup) self.connectionLed.setObjectName("connectionLed") self.horizontalLayout_4.addWidget(self.connectionLed) self.verticalLayout_3.addLayout(self.horizontalLayout_4) self.verticalLayout_2.addWidget(self.connectGroup) self.serverGroup = QtWidgets.QGroupBox(ChatWidget) self.serverGroup.setObjectName("serverGroup") self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.serverGroup) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.label_4 = QtWidgets.QLabel(self.serverGroup) self.label_4.setObjectName("label_4") self.horizontalLayout_2.addWidget(self.label_4) self.serverPortSpin = QtWidgets.QSpinBox(self.serverGroup) self.serverPortSpin.setMinimum(1025) self.serverPortSpin.setMaximum(65535) self.serverPortSpin.setSingleStep(1) self.serverPortSpin.setProperty("value", 42000) self.serverPortSpin.setObjectName("serverPortSpin") self.horizontalLayout_2.addWidget(self.serverPortSpin) self.serverButton = QtWidgets.QPushButton(self.serverGroup) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.serverButton.sizePolicy().hasHeightForWidth()) self.serverButton.setSizePolicy(sizePolicy) self.serverButton.setText("") self.serverButton.setAutoDefault(False) self.serverButton.setObjectName("serverButton") self.horizontalLayout_2.addWidget(self.serverButton) self.serverLed = E5Led(self.serverGroup) self.serverLed.setObjectName("serverLed") self.horizontalLayout_2.addWidget(self.serverLed) self.verticalLayout_2.addWidget(self.serverGroup) self.retranslateUi(ChatWidget) QtCore.QMetaObject.connectSlotsByName(ChatWidget) ChatWidget.setTabOrder(self.serverButton, self.serverPortSpin) ChatWidget.setTabOrder(self.serverPortSpin, self.hostEdit) ChatWidget.setTabOrder(self.hostEdit, self.connectButton) ChatWidget.setTabOrder(self.connectButton, self.clearHostsButton) ChatWidget.setTabOrder(self.clearHostsButton, self.shareButton) ChatWidget.setTabOrder(self.shareButton, self.startEditButton) ChatWidget.setTabOrder(self.startEditButton, self.sendEditButton) ChatWidget.setTabOrder(self.sendEditButton, self.cancelEditButton) ChatWidget.setTabOrder(self.cancelEditButton, self.messageEdit) ChatWidget.setTabOrder(self.messageEdit, self.sendButton)