def paintEvent(self, event): painter = QtGui.QStylePainter(self) option = QtGui.QStyleOptionTab() if not self.colors: for i in range(self.count()): self.colors.append('gray') for i, tab_color in enumerate(self.colors): self.initStyleOption(option, i) color = Qt4Gui.QColor(tab_color) color.setAlpha(96) linearGrad = QtGui.QLinearGradient(QtCore.QPointF(0, 0), QtCore.QPointF(0, 1)) linearGrad.setColorAt(0, color) linearGrad.setColorAt(1, QtCore.Qt.transparent) brush = QtGui.QBrush(linearGrad) color_selected = Qt4Gui.QColor(tab_color) color_selected.setAlpha(168) linearGrad = QtGui.QLinearGradient(QtCore.QPointF(0, 0), QtCore.QPointF(0, 20)) linearGrad.setColorAt(0, color_selected) linearGrad.setColorAt(1, QtCore.Qt.transparent) brush_selected = QtGui.QBrush(linearGrad) option.palette.setBrush(Qt4Gui.QPalette.Normal, Qt4Gui.QPalette.Button, brush) option.palette.setBrush(Qt4Gui.QPalette.Normal, Qt4Gui.QPalette.Background, brush_selected) painter.setCompositionMode(QtGui.QPainter.CompositionMode_Lighten) painter.drawControl(QtGui.QStyle.CE_TabBarTab, option)
def setPaletteFromDct(dct): palette = Qt4Gui.QPalette() for role in roles: for group in groups: color = Qt4Gui.QColor(dct['%s:%s' % (role, group)]) qGrp = getattr(Qt4Gui.QPalette, group) qRl = getattr(Qt4Gui.QPalette, role) palette.setColor(qGrp, qRl, color) QtGui.QApplication.setPalette(palette)
def fill_status(self): status_combo_box = self.statusComboBox.model() for value, color in zip(self.task_process['process'], self.task_process['color']): item = Qt4Gui.QStandardItem(u'{0}'.format(value)) sc = gf.hex_to_rgb(color, tuple=True) sc_item = Qt4Gui.QColor(sc[0], sc[1], sc[2], 128) item.setBackground(sc_item) item.setData(sc_item, 1) item.setData(value, 2) status_combo_box.appendRow(item)
def fill_priority(self): # priority combo box with colors priority_combo_box = self.priorityComboBox.model() step = len(self.priority) - 1 int_range = 255 / step * step r = range(0, int_range, 255 / step) g = range(0, int_range, 255 / step) b = 0 a = 64 r.reverse() pc = [] for i in range(step): color = r[i], g[i], b, a pc.append(color) for i, (label, value) in enumerate(self.priority): item = Qt4Gui.QStandardItem(u'{0}, {1}'.format(label, value)) color = Qt4Gui.QColor(pc[i - 1][0], pc[i - 1][1], pc[i - 1][2], pc[i - 1][3]) if i > 0: item.setBackground(color) item.setData(color, 1) priority_combo_box.appendRow(item)
def getting_pixmaps(self): for snapshot in self.snapshots: preview_files_objects = snapshot.get_previewable_files_objects() for preview_file_obj in preview_files_objects: web_file_obj = preview_file_obj.get_web_preview() if not web_file_obj: web_file_obj = preview_file_obj pixmap = Qt4Gui.QPixmap(web_file_obj.get_full_abs_path()) if not pixmap.isNull(): self.pix_list.append(pixmap.scaledToWidth(640, QtCore.Qt.SmoothTransformation)) self.file_list.append(preview_file_obj) self.create_scene()
def setupUi(self, searchWidget): searchWidget.setObjectName("searchWidget") self.searchWidgetGridLayout = QtGui.QGridLayout(searchWidget) self.searchWidgetGridLayout.setContentsMargins(0, 0, 0, 0) self.searchWidgetGridLayout.setSpacing(0) self.searchWidgetGridLayout.setObjectName("searchWidgetGridLayout") self.searchLineEdit = QtGui.QLineEdit(searchWidget) font = Qt4Gui.QFont() font.setPointSize(9) self.searchLineEdit.setFont(font) self.searchLineEdit.setStyleSheet( "QLineEdit {\n" " border: 0px;\n" " border-radius: 8px;\n" " show-decoration-selected: 1;\n" " padding: 0px 8px;\n" " background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255, 255, 255, 64), stop:1 rgba(255, 255, 255, 0));\n" " background-position: bottom left;\n" " background-image: url(\":/ui_check/gliph/search_16.png\");\n" " background-repeat: fixed;\n" " selection-background-color: darkgray;\n" " padding-left: 15px;\n" "}\n" "QLineEdit:hover{\n" " color: white;\n" " background-image: url(\":/ui_check/gliph/searchHover_16.png\");\n" "}") self.searchLineEdit.setFrame(False) self.searchLineEdit.setObjectName("searchLineEdit") self.searchWidgetGridLayout.addWidget(self.searchLineEdit, 0, 0, 1, 1) self.expandingLayout = QtGui.QVBoxLayout() self.expandingLayout.setSpacing(0) self.expandingLayout.setObjectName("expandingLayout") self.searchWidgetGridLayout.addLayout(self.expandingLayout, 0, 1, 1, 1) self.gearMenuToolButton = QtGui.QToolButton(searchWidget) self.gearMenuToolButton.setMaximumSize(QtCore.QSize(22, 22)) self.gearMenuToolButton.setPopupMode(QtGui.QToolButton.InstantPopup) self.gearMenuToolButton.setAutoRaise(True) self.gearMenuToolButton.setArrowType(QtCore.Qt.NoArrow) self.gearMenuToolButton.setObjectName("gearMenuToolButton") self.searchWidgetGridLayout.addWidget(self.gearMenuToolButton, 0, 2, 1, 1) self.searchOptionsSplitter = QtGui.QSplitter(searchWidget) self.searchOptionsSplitter.setOrientation(QtCore.Qt.Vertical) self.searchOptionsSplitter.setObjectName("searchOptionsSplitter") self.searchWidgetGridLayout.addWidget(self.searchOptionsSplitter, 1, 0, 1, 3) self.searchWidgetGridLayout.setColumnStretch(0, 1) self.retranslateUi(searchWidget) QtCore.QMetaObject.connectSlotsByName(searchWidget)
def setupUi(self, richedit): richedit.setObjectName("richedit") richedit.resize(506, 22) self.horizontalLayout = QtGui.QHBoxLayout(richedit) self.horizontalLayout.setSpacing(0) self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setObjectName("horizontalLayout") self.boldButton = QtGui.QToolButton(richedit) self.boldButton.setToolTip("Set selected Text Bold") self.boldButton.setStatusTip("Set selected Text Bold") icon = Qt4Gui.QIcon() icon.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/text_bold.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.boldButton.setIcon(icon) self.boldButton.setCheckable(True) self.boldButton.setAutoRaise(True) self.boldButton.setObjectName("boldButton") self.horizontalLayout.addWidget(self.boldButton) self.italicButton = QtGui.QToolButton(richedit) icon1 = Qt4Gui.QIcon() icon1.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/text_italic.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.italicButton.setIcon(icon1) self.italicButton.setCheckable(True) self.italicButton.setAutoRaise(True) self.italicButton.setObjectName("italicButton") self.horizontalLayout.addWidget(self.italicButton) self.underlinedButton = QtGui.QToolButton(richedit) icon2 = Qt4Gui.QIcon() icon2.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/text_underline.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.underlinedButton.setIcon(icon2) self.underlinedButton.setCheckable(True) self.underlinedButton.setAutoRaise(True) self.underlinedButton.setObjectName("underlinedButton") self.horizontalLayout.addWidget(self.underlinedButton) self.strikedButton = QtGui.QToolButton(richedit) self.strikedButton.setText("") icon3 = Qt4Gui.QIcon() icon3.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/text_strikethrough.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.strikedButton.setIcon(icon3) self.strikedButton.setCheckable(True) self.strikedButton.setAutoRaise(True) self.strikedButton.setObjectName("strikedButton") self.horizontalLayout.addWidget(self.strikedButton) self.leftButton = QtGui.QToolButton(richedit) self.leftButton.setText("") icon4 = Qt4Gui.QIcon() icon4.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/text_align_left.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.leftButton.setIcon(icon4) self.leftButton.setCheckable(True) self.leftButton.setAutoRaise(True) self.leftButton.setObjectName("leftButton") self.horizontalLayout.addWidget(self.leftButton) self.centerButton = QtGui.QToolButton(richedit) self.centerButton.setText("") icon5 = Qt4Gui.QIcon() icon5.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/text_align_center.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.centerButton.setIcon(icon5) self.centerButton.setCheckable(True) self.centerButton.setAutoRaise(True) self.centerButton.setObjectName("centerButton") self.horizontalLayout.addWidget(self.centerButton) self.rightButton = QtGui.QToolButton(richedit) self.rightButton.setText("") icon6 = Qt4Gui.QIcon() icon6.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/text_align_right.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.rightButton.setIcon(icon6) self.rightButton.setCheckable(True) self.rightButton.setAutoRaise(True) self.rightButton.setObjectName("rightButton") self.horizontalLayout.addWidget(self.rightButton) self.justButton = QtGui.QToolButton(richedit) self.justButton.setText("") icon7 = Qt4Gui.QIcon() icon7.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/text_align_justify.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.justButton.setIcon(icon7) self.justButton.setCheckable(True) self.justButton.setAutoRaise(True) self.justButton.setObjectName("justButton") self.horizontalLayout.addWidget(self.justButton) self.numbersListButton = QtGui.QToolButton(richedit) self.numbersListButton.setText("") icon8 = Qt4Gui.QIcon() icon8.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/text_list_numbers.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.numbersListButton.setIcon(icon8) self.numbersListButton.setAutoRaise(True) self.numbersListButton.setObjectName("numbersListButton") self.horizontalLayout.addWidget(self.numbersListButton) self.bulletsListButton = QtGui.QToolButton(richedit) self.bulletsListButton.setText("") icon9 = Qt4Gui.QIcon() icon9.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/text_list_bullets.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.bulletsListButton.setIcon(icon9) self.bulletsListButton.setAutoRaise(True) self.bulletsListButton.setObjectName("bulletsListButton") self.horizontalLayout.addWidget(self.bulletsListButton) self.downTextButton = QtGui.QToolButton(richedit) self.downTextButton.setText("") icon10 = Qt4Gui.QIcon() icon10.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/text_subscript.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.downTextButton.setIcon(icon10) self.downTextButton.setAutoRaise(True) self.downTextButton.setObjectName("downTextButton") self.horizontalLayout.addWidget(self.downTextButton) self.upTextButton = QtGui.QToolButton(richedit) self.upTextButton.setText("") icon11 = Qt4Gui.QIcon() icon11.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/text_superscript.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.upTextButton.setIcon(icon11) self.upTextButton.setAutoRaise(True) self.upTextButton.setObjectName("upTextButton") self.horizontalLayout.addWidget(self.upTextButton) self.capsButton = QtGui.QToolButton(richedit) self.capsButton.setText("") icon12 = Qt4Gui.QIcon() icon12.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/text_allcaps.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.capsButton.setIcon(icon12) self.capsButton.setAutoRaise(True) self.capsButton.setObjectName("capsButton") self.horizontalLayout.addWidget(self.capsButton) self.smallCapsButton = QtGui.QToolButton(richedit) self.smallCapsButton.setText("") icon13 = Qt4Gui.QIcon() icon13.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/text_smallcaps.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.smallCapsButton.setIcon(icon13) self.smallCapsButton.setAutoRaise(True) self.smallCapsButton.setObjectName("smallCapsButton") self.horizontalLayout.addWidget(self.smallCapsButton) self.fontcolorButton = QtGui.QToolButton(richedit) self.fontcolorButton.setText("") icon14 = Qt4Gui.QIcon() icon14.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/color_wheel.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.fontcolorButton.setIcon(icon14) self.fontcolorButton.setAutoRaise(True) self.fontcolorButton.setObjectName("fontcolorButton") self.horizontalLayout.addWidget(self.fontcolorButton) self.fontButton = QtGui.QToolButton(richedit) self.fontButton.setText("") icon15 = Qt4Gui.QIcon() icon15.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/font.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.fontButton.setIcon(icon15) self.fontButton.setAutoRaise(True) self.fontButton.setObjectName("fontButton") self.horizontalLayout.addWidget(self.fontButton) self.linkButton = QtGui.QToolButton(richedit) self.linkButton.setText("") icon16 = Qt4Gui.QIcon() icon16.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/link_add.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.linkButton.setIcon(icon16) self.linkButton.setAutoRaise(True) self.linkButton.setObjectName("linkButton") self.horizontalLayout.addWidget(self.linkButton) self.pictureButton = QtGui.QToolButton(richedit) self.pictureButton.setText("") icon17 = Qt4Gui.QIcon() icon17.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/picture_add.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.pictureButton.setIcon(icon17) self.pictureButton.setAutoRaise(True) self.pictureButton.setObjectName("pictureButton") self.horizontalLayout.addWidget(self.pictureButton) self.folderButton = QtGui.QToolButton(richedit) self.folderButton.setText("") icon18 = Qt4Gui.QIcon() icon18.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/folder_add.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.folderButton.setIcon(icon18) self.folderButton.setAutoRaise(True) self.folderButton.setObjectName("folderButton") self.horizontalLayout.addWidget(self.folderButton) self.cutButton = QtGui.QToolButton(richedit) self.cutButton.setText("") icon19 = Qt4Gui.QIcon() icon19.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/cut_red.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.cutButton.setIcon(icon19) self.cutButton.setAutoRaise(True) self.cutButton.setObjectName("cutButton") self.horizontalLayout.addWidget(self.cutButton) self.copyButton = QtGui.QToolButton(richedit) self.copyButton.setText("") icon20 = Qt4Gui.QIcon() icon20.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/page_white_copy.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.copyButton.setIcon(icon20) self.copyButton.setAutoRaise(True) self.copyButton.setObjectName("copyButton") self.horizontalLayout.addWidget(self.copyButton) self.pasteButton = QtGui.QToolButton(richedit) self.pasteButton.setText("") icon21 = Qt4Gui.QIcon() icon21.addPixmap(Qt4Gui.QPixmap(":/ui_richedit/gliph/richedit/page_white_paste.png"), Qt4Gui.QIcon.Normal, Qt4Gui.QIcon.Off) self.pasteButton.setIcon(icon21) self.pasteButton.setAutoRaise(True) self.pasteButton.setObjectName("pasteButton") self.horizontalLayout.addWidget(self.pasteButton) spacerItem = QtGui.QSpacerItem(0, 8, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem) self.horizontalLayout.setStretch(22, 1) self.retranslateUi(richedit) QtCore.QMetaObject.connectSlotsByName(richedit) richedit.setTabOrder(self.boldButton, self.italicButton) richedit.setTabOrder(self.italicButton, self.underlinedButton) richedit.setTabOrder(self.underlinedButton, self.strikedButton) richedit.setTabOrder(self.strikedButton, self.leftButton) richedit.setTabOrder(self.leftButton, self.centerButton) richedit.setTabOrder(self.centerButton, self.rightButton) richedit.setTabOrder(self.rightButton, self.justButton) richedit.setTabOrder(self.justButton, self.numbersListButton) richedit.setTabOrder(self.numbersListButton, self.fontcolorButton) richedit.setTabOrder(self.fontcolorButton, self.pictureButton) richedit.setTabOrder(self.pictureButton, self.linkButton) richedit.setTabOrder(self.linkButton, self.folderButton) richedit.setTabOrder(self.folderButton, self.copyButton) richedit.setTabOrder(self.copyButton, self.cutButton)
def setIcon(self): icon = Qt4Gui.QIcon(':/ui_main/gliph/tactic_favicon.ico') self.setWindowIcon(icon)
def setupUi(self, incom): incom.setObjectName("incom") incom.resize(154, 156) self.horizontalLayout = QtGui.QHBoxLayout(incom) self.horizontalLayout.setSpacing(0) self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setObjectName("horizontalLayout") self.groupBox = QtGui.QGroupBox(incom) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.groupBox.sizePolicy().hasHeightForWidth()) self.groupBox.setSizePolicy(sizePolicy) self.groupBox.setStyleSheet( "QGroupBox {\n" " background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255, 255, 255, 0), stop:1 rgba(104, 104, 190, 40));\n" " border: 2px solid gray;\n" " border-radius: 2px;\n" "}") self.groupBox.setObjectName("groupBox") self.gridLayout_3 = QtGui.QGridLayout(self.groupBox) self.gridLayout_3.setContentsMargins(0, 0, 0, 0) self.gridLayout_3.setSpacing(0) self.gridLayout_3.setObjectName("gridLayout_3") self.dateLabel = QtGui.QLabel(self.groupBox) self.dateLabel.setMinimumSize(QtCore.QSize(0, 18)) font = Qt4Gui.QFont() font.setPointSize(10) self.dateLabel.setFont(font) self.dateLabel.setToolTip("") self.dateLabel.setStyleSheet( "QLabel {\n" " background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255, 255, 255, 0), stop:1 rgba(128, 128, 150, 175));\n" " border-bottom: 2px solid qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255, 255, 255, 0), stop:1 rgba(128, 128, 128, 175));\n" " padding: 0px;\n" "}") self.dateLabel.setTextFormat(QtCore.Qt.PlainText) self.dateLabel.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.dateLabel.setMargin(2) self.dateLabel.setObjectName("dateLabel") self.gridLayout_3.addWidget(self.dateLabel, 0, 1, 1, 1) self.authorFullLabel = QtGui.QLabel(self.groupBox) self.authorFullLabel.setMinimumSize(QtCore.QSize(0, 50)) font = Qt4Gui.QFont() font.setPointSize(9) self.authorFullLabel.setFont(font) self.authorFullLabel.setAccessibleDescription("") self.authorFullLabel.setStyleSheet("QLabel {\n" " padding: 4px;\n" "}") self.authorFullLabel.setTextFormat(QtCore.Qt.PlainText) self.authorFullLabel.setAlignment(QtCore.Qt.AlignBottom | QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft) self.authorFullLabel.setObjectName("authorFullLabel") self.gridLayout_3.addWidget(self.authorFullLabel, 2, 0, 1, 1) self.commentLabel = QtGui.QLabel(self.groupBox) self.commentLabel.setText("") self.commentLabel.setTextFormat(QtCore.Qt.RichText) self.commentLabel.setScaledContents(True) self.commentLabel.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) self.commentLabel.setWordWrap(True) self.commentLabel.setOpenExternalLinks(True) self.commentLabel.setTextInteractionFlags( QtCore.Qt.LinksAccessibleByMouse | QtCore.Qt.TextSelectableByKeyboard | QtCore.Qt.TextSelectableByMouse) self.commentLabel.setObjectName("commentLabel") self.gridLayout_3.addWidget(self.commentLabel, 1, 1, 2, 1) self.authorPicLabel = QtGui.QLabel(self.groupBox) self.authorPicLabel.setMinimumSize(QtCore.QSize(120, 80)) self.authorPicLabel.setMaximumSize(QtCore.QSize(120, 120)) self.authorPicLabel.setTextFormat(QtCore.Qt.RichText) self.authorPicLabel.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignTop) self.authorPicLabel.setMargin(2) self.authorPicLabel.setObjectName("authorPicLabel") self.gridLayout_3.addWidget(self.authorPicLabel, 1, 0, 1, 1) self.authorLabel = QtGui.QLabel(self.groupBox) self.authorLabel.setMinimumSize(QtCore.QSize(0, 18)) font = Qt4Gui.QFont() font.setPointSize(10) font.setWeight(75) font.setItalic(False) font.setBold(True) self.authorLabel.setFont(font) self.authorLabel.setStyleSheet( "QLabel {\n" " background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(128, 128, 150, 175), stop:1 rgba(64, 64,64, 0));\n" " border-bottom: 2px solid qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(64, 64, 64, 175), stop:1 rgba(255, 255,255, 0));\n" " padding: 0px;\n" "}") self.authorLabel.setTextFormat(QtCore.Qt.PlainText) self.authorLabel.setObjectName("authorLabel") self.gridLayout_3.addWidget(self.authorLabel, 0, 0, 1, 1) self.gridLayout_3.setColumnStretch(1, 1) self.gridLayout_3.setRowStretch(2, 1) self.horizontalLayout.addWidget(self.groupBox) spacerItem = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem) self.retranslateUi(incom) QtCore.QMetaObject.connectSlotsByName(incom)
def setupUi(self, snapshotItem): snapshotItem.setObjectName("snapshotItem") self.gridLayout = QtGui.QGridLayout(snapshotItem) self.gridLayout.setContentsMargins(0, 0, 0, 0) self.gridLayout.setSpacing(0) self.gridLayout.setObjectName("gridLayout") self.previewVerticalLayout = QtGui.QVBoxLayout() self.previewVerticalLayout.setSpacing(0) self.previewVerticalLayout.setContentsMargins(4, 4, 4, 4) self.previewVerticalLayout.setObjectName("previewVerticalLayout") self.previewLabel = QtGui.QLabel(snapshotItem) self.previewLabel.setMinimumSize(QtCore.QSize(64, 64)) self.previewLabel.setMaximumSize(QtCore.QSize(64, 64)) self.previewLabel.setStyleSheet( "QLabel {\n" " background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 rgba(175, 175, 175, 16), stop: 1 rgba(0, 0, 0, 0));\n" " border: 0px;\n" " border-radius: 4px;\n" " padding: 0px 0px;\n" "}") self.previewLabel.setTextFormat(QtCore.Qt.RichText) self.previewLabel.setAlignment(QtCore.Qt.AlignCenter) self.previewLabel.setObjectName("previewLabel") self.previewVerticalLayout.addWidget(self.previewLabel) spacerItem = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Ignored) self.previewVerticalLayout.addItem(spacerItem) self.previewVerticalLayout.setStretch(1, 1) self.gridLayout.addLayout(self.previewVerticalLayout, 0, 1, 3, 1) self.nameVerticalLayout = QtGui.QHBoxLayout() self.nameVerticalLayout.setSpacing(0) self.nameVerticalLayout.setContentsMargins(-1, -1, -1, 3) self.nameVerticalLayout.setObjectName("nameVerticalLayout") self.fileNameLabel = QtGui.QLabel(snapshotItem) self.fileNameLabel.setMinimumSize(QtCore.QSize(0, 20)) self.fileNameLabel.setMaximumSize(QtCore.QSize(16777215, 20)) font = Qt4Gui.QFont() font.setWeight(75) font.setBold(True) self.fileNameLabel.setFont(font) self.fileNameLabel.setStyleSheet( "QLabel {\n" " background-color: transparent;\n" " border-bottom: 2px solid qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(128, 128, 128, 64), stop:1 rgba(128, 128,128, 0));\n" "}") self.fileNameLabel.setTextFormat(QtCore.Qt.PlainText) self.fileNameLabel.setWordWrap(True) self.fileNameLabel.setObjectName("fileNameLabel") self.nameVerticalLayout.addWidget(self.fileNameLabel) self.sizeLabel = QtGui.QLabel(snapshotItem) self.sizeLabel.setMinimumSize(QtCore.QSize(0, 20)) self.sizeLabel.setMaximumSize(QtCore.QSize(16777215, 20)) self.sizeLabel.setToolTip("") self.sizeLabel.setStyleSheet( "QLabel {\n" " background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255, 255, 255, 0), stop:1 rgba(64, 64, 64, 175));\n" "}") self.sizeLabel.setTextFormat(QtCore.Qt.PlainText) self.sizeLabel.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.sizeLabel.setMargin(2) self.sizeLabel.setObjectName("sizeLabel") self.nameVerticalLayout.addWidget(self.sizeLabel) self.nameVerticalLayout.setStretch(0, 1) self.gridLayout.addLayout(self.nameVerticalLayout, 0, 2, 1, 2) self.infoHorizontalLayout = QtGui.QHBoxLayout() self.infoHorizontalLayout.setSpacing(0) self.infoHorizontalLayout.setObjectName("infoHorizontalLayout") self.gridLayout.addLayout(self.infoHorizontalLayout, 1, 2, 1, 1) self.descriptionLorizontalLayout = QtGui.QHBoxLayout() self.descriptionLorizontalLayout.setSpacing(0) self.descriptionLorizontalLayout.setObjectName( "descriptionLorizontalLayout") self.authorLabel = QtGui.QLabel(snapshotItem) self.authorLabel.setMinimumSize(QtCore.QSize(0, 25)) font = Qt4Gui.QFont() font.setItalic(True) self.authorLabel.setFont(font) self.authorLabel.setStyleSheet("color:grey;") self.authorLabel.setTextFormat(QtCore.Qt.PlainText) self.authorLabel.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) self.authorLabel.setMargin(2) self.authorLabel.setObjectName("authorLabel") self.descriptionLorizontalLayout.addWidget(self.authorLabel) self.commentLabel = QtGui.QLabel(snapshotItem) self.commentLabel.setMinimumSize(QtCore.QSize(0, 25)) self.commentLabel.setTextFormat(QtCore.Qt.PlainText) self.commentLabel.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) self.commentLabel.setWordWrap(True) self.commentLabel.setMargin(2) self.commentLabel.setObjectName("commentLabel") self.descriptionLorizontalLayout.addWidget(self.commentLabel) self.descriptionLorizontalLayout.setStretch(1, 1) self.gridLayout.addLayout(self.descriptionLorizontalLayout, 2, 2, 1, 2) self.checkBoxHorizontalLayout = QtGui.QHBoxLayout() self.checkBoxHorizontalLayout.setSpacing(0) self.checkBoxHorizontalLayout.setObjectName("checkBoxHorizontalLayout") spacerItem1 = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.checkBoxHorizontalLayout.addItem(spacerItem1) self.selectedCheckBox = QtGui.QCheckBox(snapshotItem) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.selectedCheckBox.sizePolicy().hasHeightForWidth()) self.selectedCheckBox.setSizePolicy(sizePolicy) self.selectedCheckBox.setMinimumSize(QtCore.QSize(30, 0)) self.selectedCheckBox.setObjectName("selectedCheckBox") self.checkBoxHorizontalLayout.addWidget(self.selectedCheckBox) self.gridLayout.addLayout(self.checkBoxHorizontalLayout, 1, 3, 1, 1) self.itemColorLine = QtGui.QFrame(snapshotItem) self.itemColorLine.setMaximumSize(QtCore.QSize(4, 16777215)) self.itemColorLine.setStyleSheet( "QFrame { border: 0px; background-color: green;}\n" "") self.itemColorLine.setFrameShadow(QtGui.QFrame.Plain) self.itemColorLine.setLineWidth(4) self.itemColorLine.setFrameShape(QtGui.QFrame.VLine) self.itemColorLine.setFrameShadow(QtGui.QFrame.Sunken) self.itemColorLine.setObjectName("itemColorLine") self.gridLayout.addWidget(self.itemColorLine, 0, 0, 3, 1) self.gridLayout.setRowStretch(2, 1) self.retranslateUi(snapshotItem) QtCore.QMetaObject.connectSlotsByName(snapshotItem)
def setupUi(self, assetsBrowser): assetsBrowser.setObjectName("assetsBrowser") assetsBrowser.resize(545, 192) self.verticalLayout = QtGui.QVBoxLayout(assetsBrowser) self.verticalLayout.setSpacing(0) self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.setObjectName("verticalLayout") self.splitter = QtGui.QSplitter(assetsBrowser) self.splitter.setOrientation(QtCore.Qt.Horizontal) self.splitter.setObjectName("splitter") self.assetsTreeWidget = QtGui.QTreeWidget(self.splitter) self.assetsTreeWidget.setMinimumSize(QtCore.QSize(120, 0)) self.assetsTreeWidget.setMaximumSize(QtCore.QSize(200, 16777215)) self.assetsTreeWidget.setBaseSize(QtCore.QSize(60, 0)) self.assetsTreeWidget.setObjectName("assetsTreeWidget") self.assetsTreeWidget.header().setVisible(False) self.verticalLayoutWidget_3 = QtGui.QWidget(self.splitter) self.verticalLayoutWidget_3.setObjectName("verticalLayoutWidget_3") self.verticalLayout_2 = QtGui.QVBoxLayout(self.verticalLayoutWidget_3) self.verticalLayout_2.setSpacing(0) self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) self.verticalLayout_2.setObjectName("verticalLayout_2") self.searchLineEdit = QtGui.QLineEdit(self.verticalLayoutWidget_3) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.searchLineEdit.sizePolicy().hasHeightForWidth()) self.searchLineEdit.setSizePolicy(sizePolicy) self.searchLineEdit.setMaximumSize(QtCore.QSize(16777215, 20)) font = Qt4Gui.QFont() font.setPointSize(9) self.searchLineEdit.setFont(font) self.searchLineEdit.setStyleSheet( "QLineEdit {\n" " color: rgb(192, 192, 192);\n" " border: 2px solid darkgray;\n" " border-radius: 10px;\n" " show-decoration-selected: 1;\n" " padding: 0px 8px;\n" " background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(128, 128, 128, 255), stop:1 rgba(64, 64,64, 255));\n" " background-position: bottom left;\n" " background-image: url(\":/ui_check/gliph/search_16.png\");\n" " background-repeat: fixed;\n" " selection-background-color: darkgray;\n" " padding-left: 15px;\n" "}\n" "QLineEdit:hover{\n" " color: white;\n" " background-image: url(\":/ui_check/gliph/searchHover_16.png\");\n" "}") self.searchLineEdit.setFrame(False) self.searchLineEdit.setObjectName("searchLineEdit") self.verticalLayout_2.addWidget(self.searchLineEdit) self.searchOptionsLayout = QtGui.QVBoxLayout() self.searchOptionsLayout.setSpacing(0) self.searchOptionsLayout.setObjectName("searchOptionsLayout") self.verticalLayout_2.addLayout(self.searchOptionsLayout) self.sobjectScrollLayout = QtGui.QVBoxLayout() self.sobjectScrollLayout.setSpacing(0) self.sobjectScrollLayout.setObjectName("sobjectScrollLayout") self.verticalLayout_2.addLayout(self.sobjectScrollLayout) self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setSpacing(6) self.horizontalLayout.setObjectName("horizontalLayout") self.countLabel = QtGui.QLabel(self.verticalLayoutWidget_3) self.countLabel.setObjectName("countLabel") self.horizontalLayout.addWidget(self.countLabel) spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem) self.label_2 = QtGui.QLabel(self.verticalLayoutWidget_3) self.label_2.setObjectName("label_2") self.horizontalLayout.addWidget(self.label_2) self.limitSpinBox = QtGui.QSpinBox(self.verticalLayoutWidget_3) self.limitSpinBox.setMinimum(5) self.limitSpinBox.setMaximum(500) self.limitSpinBox.setSingleStep(5) self.limitSpinBox.setProperty("value", 20) self.limitSpinBox.setObjectName("limitSpinBox") self.horizontalLayout.addWidget(self.limitSpinBox) self.label = QtGui.QLabel(self.verticalLayoutWidget_3) self.label.setObjectName("label") self.horizontalLayout.addWidget(self.label) self.zoomSpinBox = QtGui.QSpinBox(self.verticalLayoutWidget_3) self.zoomSpinBox.setMinimum(25) self.zoomSpinBox.setMaximum(400) self.zoomSpinBox.setSingleStep(25) self.zoomSpinBox.setProperty("value", 100) self.zoomSpinBox.setObjectName("zoomSpinBox") self.horizontalLayout.addWidget(self.zoomSpinBox) self.verticalLayout_2.addLayout(self.horizontalLayout) self.verticalLayout_2.setStretch(2, 1) self.verticalLayout.addWidget(self.splitter) self.retranslateUi(assetsBrowser) QtCore.QMetaObject.connectSlotsByName(assetsBrowser)
def setupUi(self, configuration_dialog): configuration_dialog.setObjectName("configuration_dialog") configuration_dialog.setWindowModality(QtCore.Qt.ApplicationModal) configuration_dialog.resize(503, 319) configuration_dialog.setSizeGripEnabled(True) configuration_dialog.setModal(True) self.gridLayout_6 = QtGui.QGridLayout(configuration_dialog) self.gridLayout_6.setObjectName("gridLayout_6") self.configToolBox = QtGui.QToolBox(configuration_dialog) palette = Qt4Gui.QPalette() self.configToolBox.setPalette(palette) self.configToolBox.setStyleSheet("QToolBox > *,\n" "QToolBox > QScrollArea > #qt_scrollarea_viewport > QWidget {\n" " background-color: rgba(128, 128, 128, 48);\n" "}\n" "\n" "QToolBox::tab {\n" " border-style: outset;\n" " border-width: 1px;\n" " border-color: rgba(75, 75, 75, 75);\n" " border-radius: 1px;\n" " padding: 3px;\n" " background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 rgba(175, 175, 175, 25), stop: 1 rgba(175, 175, 175, 0));\n" "}\n" "\n" "QToolBox::tab:hover {\n" " background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 rgba(175, 175, 175, 50), stop: 1 rgba(175, 175, 175, 0));\n" " border: 1px solid rgba(128, 128, 128, 75);\n" "}\n" "QToolBox::tab:selected {\n" " font: italic;\n" " border-style: outset;\n" " border-width: 1px;\n" " border-color: rgba(75, 75, 75, 75);\n" " border-radius: 1px;\n" "}") self.configToolBox.setObjectName("configToolBox") self.serverPage = QtGui.QWidget() self.serverPage.setGeometry(QtCore.QRect(0, 0, 485, 90)) self.serverPage.setObjectName("serverPage") self.serverPageLayout = QtGui.QVBoxLayout(self.serverPage) self.serverPageLayout.setContentsMargins(6, 6, 6, 6) self.serverPageLayout.setObjectName("serverPageLayout") self.configToolBox.addItem(self.serverPage, "") self.projectPage = QtGui.QWidget() self.projectPage.setGeometry(QtCore.QRect(0, 0, 100, 30)) self.projectPage.setObjectName("projectPage") self.projectPageLayout = QtGui.QVBoxLayout(self.projectPage) self.projectPageLayout.setContentsMargins(6, 6, 6, 6) self.projectPageLayout.setObjectName("projectPageLayout") self.configToolBox.addItem(self.projectPage, "") self.checkinOutOptionsPage = QtGui.QWidget() self.checkinOutOptionsPage.setGeometry(QtCore.QRect(0, 0, 100, 30)) self.checkinOutOptionsPage.setObjectName("checkinOutOptionsPage") self.checkinPageLayout = QtGui.QVBoxLayout(self.checkinOutOptionsPage) self.checkinPageLayout.setContentsMargins(6, 6, 6, 6) self.checkinPageLayout.setObjectName("checkinPageLayout") self.configToolBox.addItem(self.checkinOutOptionsPage, "") self.checkinOutAppPage = QtGui.QWidget() self.checkinOutAppPage.setGeometry(QtCore.QRect(0, 0, 100, 30)) self.checkinOutAppPage.setObjectName("checkinOutAppPage") self.checkinOutPageLayout = QtGui.QVBoxLayout(self.checkinOutAppPage) self.checkinOutPageLayout.setContentsMargins(6, 6, 6, 6) self.checkinOutPageLayout.setObjectName("checkinOutPageLayout") self.configToolBox.addItem(self.checkinOutAppPage, "") self.globalCofigPage = QtGui.QWidget() self.globalCofigPage.setGeometry(QtCore.QRect(0, 0, 100, 30)) self.globalCofigPage.setObjectName("globalCofigPage") self.globalCofigPageLayout = QtGui.QVBoxLayout(self.globalCofigPage) self.globalCofigPageLayout.setContentsMargins(6, 6, 6, 6) self.globalCofigPageLayout.setObjectName("globalCofigPageLayout") self.configToolBox.addItem(self.globalCofigPage, "") self.currentEnvironmentPage = QtGui.QWidget() self.currentEnvironmentPage.setGeometry(QtCore.QRect(0, 0, 100, 30)) self.currentEnvironmentPage.setObjectName("currentEnvironmentPage") self.currentEnvironmentPageLayout = QtGui.QVBoxLayout(self.currentEnvironmentPage) self.currentEnvironmentPageLayout.setContentsMargins(6, 6, 6, 6) self.currentEnvironmentPageLayout.setObjectName("currentEnvironmentPageLayout") self.configToolBox.addItem(self.currentEnvironmentPage, "") self.gridLayout_6.addWidget(self.configToolBox, 0, 0, 1, 1) self.buttonBox = QtGui.QDialogButtonBox(configuration_dialog) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Apply|QtGui.QDialogButtonBox.Close|QtGui.QDialogButtonBox.Reset|QtGui.QDialogButtonBox.RestoreDefaults|QtGui.QDialogButtonBox.SaveAll) self.buttonBox.setObjectName("buttonBox") self.gridLayout_6.addWidget(self.buttonBox, 1, 0, 1, 1) self.retranslateUi(configuration_dialog) self.configToolBox.setCurrentIndex(0) self.configToolBox.layout().setSpacing(6) QtCore.QMetaObject.connectSlotsByName(configuration_dialog)
def setupUi(self, item): item.setObjectName("item") self.gridLayout = QtGui.QGridLayout(item) self.gridLayout.setContentsMargins(0, 0, 0, 0) self.gridLayout.setSpacing(0) self.gridLayout.setObjectName("gridLayout") self.itemColorLine = QtGui.QFrame(item) self.itemColorLine.setMaximumSize(QtCore.QSize(4, 16777215)) self.itemColorLine.setStyleSheet( "QFrame { border: 0px; background-color: black;}") self.itemColorLine.setFrameShadow(QtGui.QFrame.Plain) self.itemColorLine.setLineWidth(4) self.itemColorLine.setFrameShape(QtGui.QFrame.VLine) self.itemColorLine.setFrameShadow(QtGui.QFrame.Sunken) self.itemColorLine.setObjectName("itemColorLine") self.gridLayout.addWidget(self.itemColorLine, 0, 0, 3, 1) self.previewVerticalLayout = QtGui.QVBoxLayout() self.previewVerticalLayout.setSpacing(0) self.previewVerticalLayout.setContentsMargins(4, 4, 4, 4) self.previewVerticalLayout.setObjectName("previewVerticalLayout") self.previewLabel = QtGui.QLabel(item) self.previewLabel.setMinimumSize(QtCore.QSize(64, 64)) self.previewLabel.setMaximumSize(QtCore.QSize(64, 64)) self.previewLabel.setStyleSheet( "QLabel {\n" " background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 rgba(175, 175, 175, 16), stop: 1 rgba(0, 0, 0, 0));\n" " border: 0px;\n" " border-radius: 4px;\n" " padding: 0px 0px;\n" "}") self.previewLabel.setTextFormat(QtCore.Qt.RichText) self.previewLabel.setAlignment(QtCore.Qt.AlignCenter) self.previewLabel.setObjectName("previewLabel") self.previewVerticalLayout.addWidget(self.previewLabel) spacerItem = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Ignored) self.previewVerticalLayout.addItem(spacerItem) self.previewVerticalLayout.setStretch(1, 1) self.gridLayout.addLayout(self.previewVerticalLayout, 0, 1, 3, 1) self.toolsVerticalLayout = QtGui.QVBoxLayout() self.toolsVerticalLayout.setSpacing(6) self.toolsVerticalLayout.setContentsMargins(3, 4, 6, -1) self.toolsVerticalLayout.setObjectName("toolsVerticalLayout") self.tasksToolButton = QtGui.QToolButton(item) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.tasksToolButton.sizePolicy().hasHeightForWidth()) self.tasksToolButton.setSizePolicy(sizePolicy) self.tasksToolButton.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly) self.tasksToolButton.setAutoRaise(True) self.tasksToolButton.setArrowType(QtCore.Qt.NoArrow) self.tasksToolButton.setObjectName("tasksToolButton") self.toolsVerticalLayout.addWidget(self.tasksToolButton) self.relationsToolButton = QtGui.QToolButton(item) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.relationsToolButton.sizePolicy().hasHeightForWidth()) self.relationsToolButton.setSizePolicy(sizePolicy) self.relationsToolButton.setPopupMode( QtGui.QToolButton.MenuButtonPopup) self.relationsToolButton.setToolButtonStyle( QtCore.Qt.ToolButtonTextBesideIcon) self.relationsToolButton.setAutoRaise(True) self.relationsToolButton.setArrowType(QtCore.Qt.NoArrow) self.relationsToolButton.setObjectName("relationsToolButton") self.toolsVerticalLayout.addWidget(self.relationsToolButton) spacerItem1 = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Ignored) self.toolsVerticalLayout.addItem(spacerItem1) self.toolsVerticalLayout.setStretch(2, 1) self.gridLayout.addLayout(self.toolsVerticalLayout, 0, 2, 3, 1) self.nameVerticalLayout = QtGui.QVBoxLayout() self.nameVerticalLayout.setSpacing(0) self.nameVerticalLayout.setContentsMargins(-1, -1, -1, 3) self.nameVerticalLayout.setObjectName("nameVerticalLayout") self.fileNameLabel = QtGui.QLabel(item) self.fileNameLabel.setMinimumSize(QtCore.QSize(0, 20)) self.fileNameLabel.setMaximumSize(QtCore.QSize(16777215, 24)) font = Qt4Gui.QFont() font.setWeight(75) font.setBold(True) self.fileNameLabel.setFont(font) self.fileNameLabel.setStyleSheet( "QLabel {\n" " background-color: transparent;\n" " border-bottom: 2px solid qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(128, 128, 128, 64), stop:1 rgba(128, 128,128, 0));\n" "}") self.fileNameLabel.setTextFormat(QtCore.Qt.PlainText) self.fileNameLabel.setObjectName("fileNameLabel") self.nameVerticalLayout.addWidget(self.fileNameLabel) self.gridLayout.addLayout(self.nameVerticalLayout, 0, 3, 1, 2) self.checkBoxHorizontalLayout = QtGui.QHBoxLayout() self.checkBoxHorizontalLayout.setSpacing(0) self.checkBoxHorizontalLayout.setObjectName("checkBoxHorizontalLayout") spacerItem2 = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.checkBoxHorizontalLayout.addItem(spacerItem2) self.selectedCheckBox = QtGui.QCheckBox(item) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.selectedCheckBox.sizePolicy().hasHeightForWidth()) self.selectedCheckBox.setSizePolicy(sizePolicy) self.selectedCheckBox.setMinimumSize(QtCore.QSize(30, 0)) self.selectedCheckBox.setObjectName("selectedCheckBox") self.checkBoxHorizontalLayout.addWidget(self.selectedCheckBox) self.gridLayout.addLayout(self.checkBoxHorizontalLayout, 1, 4, 1, 1) self.descriptionLerticalLayout = QtGui.QVBoxLayout() self.descriptionLerticalLayout.setSpacing(0) self.descriptionLerticalLayout.setObjectName( "descriptionLerticalLayout") self.commentLabel = QtGui.QLabel(item) self.commentLabel.setMinimumSize(QtCore.QSize(0, 25)) self.commentLabel.setTextFormat(QtCore.Qt.PlainText) self.commentLabel.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) self.commentLabel.setWordWrap(True) self.commentLabel.setMargin(2) self.commentLabel.setObjectName("commentLabel") self.descriptionLerticalLayout.addWidget(self.commentLabel) self.gridLayout.addLayout(self.descriptionLerticalLayout, 2, 3, 1, 2) self.infoHorizontalLayout = QtGui.QHBoxLayout() self.infoHorizontalLayout.setSpacing(0) self.infoHorizontalLayout.setObjectName("infoHorizontalLayout") self.gridLayout.addLayout(self.infoHorizontalLayout, 1, 3, 1, 1) self.gridLayout.setRowStretch(2, 1) self.retranslateUi(item) QtCore.QMetaObject.connectSlotsByName(item)