def __init__(self, text, title, link=None, timeout=None): QtGui.QLabel.__init__(self) self.link = link self.setAutoFillBackground(True) self.timeoutTimer = QtCore.QTimer(self) self.timeoutTimer.setSingleShot(True) self.effect = QtGui.QGraphicsOpacityEffect(self) self.setGraphicsEffect(self.effect) self.setText(self.decoretorText(text, title)) # Fade in self.animationIn = QtCore.QPropertyAnimation(self.effect, 'opacity') self.animationIn.setDuration(300) self.animationIn.setStartValue(0) self.animationIn.setEndValue(1.0) # Fade out self.animationOut = QtCore.QPropertyAnimation(self.effect, 'opacity') self.animationOut.setDuration(300) self.animationOut.setStartValue(1.0) self.animationOut.setEndValue(0) if timeout is not None: self.timeoutTimer.setInterval(timeout) self.animationIn.finished.connect(self.timeoutTimer.start) self.timeoutTimer.timeout.connect(self.close) self.setstylelabel() self.linkActivated.connect(self.linkHandler) self.setFixedHeight(50) self.animationIn.start()
def openFileIMG(self, img_file): s = self.scene() if self.backgroundItem: drawBackground = self.backgroundItem.isVisible() else: drawBackground = True if self.outlineItem: drawOutline = self.outlineItem.isVisible() else: drawOutline = True if self.TraceImage: drawOutline = self.outlineItem.isVisible() else: drawOutline = True s.clear() img = QtGui.QPixmap(img_file) self.TraceImage = QtGui.QGraphicsPixmapItem(img) self.TraceImage.setFlags(QtGui.QGraphicsItem.ItemClipsToShape) self.TraceImage.setCacheMode(QtGui.QGraphicsItem.NoCache) self.TraceImage.setZValue(1) effect = QtGui.QGraphicsOpacityEffect(self) self.TraceImage.setGraphicsEffect(effect) self.setOpacity(self.opacity) self.TraceImage.setZValue(1) self.svgItem = QtSvg.QGraphicsSvgItem() self.svgItem.setFlags(QtGui.QGraphicsItem.ItemClipsToShape) self.svgItem.setCacheMode(QtGui.QGraphicsItem.NoCache) self.svgItem.setZValue(0) self.backgroundItem = QtGui.QGraphicsRectItem( self.TraceImage.boundingRect()) self.backgroundItem.setBrush(QtCore.Qt.white) self.backgroundItem.setPen(QtGui.QPen(QtCore.Qt.NoPen)) self.backgroundItem.setVisible(drawBackground) self.backgroundItem.setZValue(-1) self.outlineItem = QtGui.QGraphicsRectItem( self.TraceImage.boundingRect()) outline = QtGui.QPen(QtCore.Qt.darkGray, 1.5, QtCore.Qt.SolidLine) outline.setCosmetic(True) self.outlineItem.setPen(outline) self.outlineItem.setBrush(QtGui.QBrush(QtCore.Qt.NoBrush)) self.outlineItem.setVisible(drawOutline) self.outlineItem.setZValue(2) s.addItem(self.backgroundItem) s.addItem(self.svgItem) s.addItem(self.TraceImage) s.addItem(self.outlineItem) s.setSceneRect(self.outlineItem.boundingRect().adjusted( -10, -10, 10, 10))
def highlighted_effect(self): """ desc: Creates the highlighted effect. returns: A QGraphicsEffect object. """ effect = QtGui.QGraphicsOpacityEffect() return effect
def __init_graphic_effects(self): """ Initializes graphic effects. """ # Opacity effect for fade in/out. # self.opacityEffect = QtWidgets.QGraphicsOpacityEffect(self) self.opacityEffect = QtGui.QGraphicsOpacityEffect(self) # Fade in animation. self.fadeInAnimation = QtCore.QPropertyAnimation(self.opacityEffect, safe_encode("opacity")) self.fadeInAnimation.setStartValue(0.0) self.fadeInAnimation.setEndValue(1.0) # Fade out animation self.fadeOutAnimation = QtCore.QPropertyAnimation(self.opacityEffect, safe_encode("opacity")) self.fadeOutAnimation.setStartValue(1.0) self.fadeOutAnimation.setEndValue(0.0)
def _init_ui(self, fade_duration): self.setupUi(self) arch_str = " ".join(platform.architecture()) resources_path = os.path.join(DIR_PATH, "..", "resources") software_path = os.path.join(resources_path, "software.yaml") with open(software_path, 'r') as stream: software_dict = yaml.load(stream) software_str = "DTOcean {} ({})".format(software_dict["version"], arch_str) self.versionLabel.setText(software_str) names_path = os.path.join(resources_path, "people.yaml") with open(names_path, 'r') as stream: names = yaml.load(stream) names_str = ", ".join(names[:-1]) names_str += " and {}".format(names[-1]) self.peopleLabel.setText(names_str) pix_search_str = os.path.join(resources_path, "beneficiary*.png") self._image_files = cycle(glob.glob(pix_search_str)) self._timer = QtCore.QTimer(self) self._effect = QtGui.QGraphicsOpacityEffect() self._fade_in = self._init_fade_in(fade_duration) self._fade_out = self._init_fade_out(fade_duration) self.institutionLabel.setGraphicsEffect(self._effect) self._fade_in.finished.connect(self._start_timer) self._fade_out.finished.connect(self._start_image) self.scrollArea.verticalScrollBar().valueChanged.connect( self.institutionLabel.repaint) return
def fadeInPix(self): self.effect = QtGui.QGraphicsOpacityEffect() self.label.setGraphicsEffect(self.effect) self.anim = QPropertyAnimation(self.effect, "opacity") self.fadeIn() self.anim.finished.connect(self.switch)
def __init__(self, action, gui_context, parent): QtGui.QLabel.__init__(self, parent) AbstractActionWidget.__init__(self, action, gui_context) self.setObjectName('ActionButton') self.setMouseTracking(True) # This property holds if this button reacts to mouse events. self.interactive = False # This property is used to store the original position of this label # so it can be visually reset when the user leaves before the ongoing # animation has finished. self.originalPosition = None # This property holds the state of the selection animation. Since this # animation is only created inside startSelectionAnimation() (to avoid # the increasing amount of performAction() invocations), this variable is # used to continuously store the state of that animation. self.selectionAnimationState = QtCore.QAbstractAnimation.Stopped self.setMaximumHeight(160) opacityEffect = QtGui.QGraphicsOpacityEffect(parent=self) opacityEffect.setOpacity(1.0) self.setGraphicsEffect(opacityEffect) # Bounce animation # hoverAnimationPart1 = QtCore.QPropertyAnimation(self, 'pos') hoverAnimationPart1.setObjectName('hoverAnimationPart1') hoverAnimationPart1.setDuration(500) hoverAnimationPart1.setEasingCurve(QtCore.QEasingCurve.Linear) hoverAnimationPart2 = QtCore.QPropertyAnimation(self, 'pos') hoverAnimationPart2.setObjectName('hoverAnimationPart2') hoverAnimationPart2.setDuration(1500) hoverAnimationPart2.setEasingCurve(QtCore.QEasingCurve.OutElastic) hoverAnimation = QtCore.QSequentialAnimationGroup(parent=self) hoverAnimation.setObjectName('hoverAnimation') hoverAnimation.setLoopCount(-1) # Infinite hoverAnimation.addAnimation(hoverAnimationPart1) hoverAnimation.addAnimation(hoverAnimationPart2) #################### # Selection animation # selectionAnimationPart1 = QtCore.QPropertyAnimation(self, 'pos') selectionAnimationPart1.setObjectName('selectionAnimationPart1') selectionAnimationPart1.setDuration(200) selectionAnimationPart1.setEasingCurve(QtCore.QEasingCurve.Linear) selectionAnimationPart2 = QtCore.QPropertyAnimation(self, 'size') selectionAnimationPart2.setObjectName('selectionAnimationPart2') selectionAnimationPart2.setDuration(200) selectionAnimationPart2.setEasingCurve(QtCore.QEasingCurve.OutCubic) selectionAnimationPart3 = QtCore.QPropertyAnimation( self.graphicsEffect(), 'opacity') selectionAnimationPart3.setObjectName('selectionAnimationPart3') selectionAnimationPart3.setDuration(200) selectionAnimationPart3.setEasingCurve(QtCore.QEasingCurve.Linear) selectionAnimation = QtCore.QParallelAnimationGroup(parent=self) selectionAnimation.setObjectName('selectionAnimation') selectionAnimation.addAnimation(selectionAnimationPart1) selectionAnimation.addAnimation(selectionAnimationPart2) selectionAnimation.addAnimation(selectionAnimationPart3) # Not working when clicking the white area underneath the ActionButton image. #selectionAnimation.finished.connect(self.resetLayout) #selectionAnimation.finished.connect(self.performAction) selectionAnimation.stateChanged.connect( self.updateSelectionAnimationState)
def mousePressEvent(self, a_event): QtGui.QGraphicsRectItem.mousePressEvent(self, a_event) self.setGraphicsEffect(QtGui.QGraphicsOpacityEffect())
def mousePressEvent(self, a_event): QtGui.QGraphicsEllipseItem.mousePressEvent(self, a_event) self.setGraphicsEffect(QtGui.QGraphicsOpacityEffect()) self.select() self.pressed = True
def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth()) MainWindow.setSizePolicy(sizePolicy) MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Psymon", None, QtGui.QApplication.UnicodeUTF8)) MainWindow.setTabShape(QtGui.QTabWidget.Rounded) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.gridLayout_4 = QtGui.QGridLayout(self.centralwidget) self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4")) self.tabWidget = QtGui.QTabWidget(self.centralwidget) self.tabWidget.setEnabled(True) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth()) self.tabWidget.setSizePolicy(sizePolicy) self.tabWidget.setTabPosition(QtGui.QTabWidget.North) self.tabWidget.setTabShape(QtGui.QTabWidget.Rounded) self.tabWidget.setIconSize(QtCore.QSize(16, 16)) self.tabWidget.setElideMode(QtCore.Qt.ElideNone) self.tabWidget.setUsesScrollButtons(True) self.tabWidget.setObjectName(_fromUtf8("tabWidget")) self.tab_3 = QtGui.QWidget() self.gridLayout_22 = QtGui.QGridLayout(self.tab_3) self.tab_7 = QtGui.QWidget() self.gridLayout_2 = QtGui.QGridLayout(self.tab_7) self.comboBox = QtGui.QComboBox(self.tab_7) self.comboBox.setObjectName(_fromUtf8("comboBox")) self.table_pixmap = QtGui.QPixmap(os.path.join(__builtin__.iconspath ,"table.png")) self.table_icon = QtGui.QIcon(self.comboBox.itemIcon(0)) self.table_icon.addPixmap(self.table_pixmap) self.tree_pixmap = QtGui.QPixmap(os.path.join(__builtin__.iconspath ,"tree.png")) self.tree_icon = QtGui.QIcon(self.comboBox.itemIcon(0)) self.tree_icon.addPixmap(self.tree_pixmap) self.comboBox.addItem(_fromUtf8("")) self.comboBox.setItemIcon(0,self.table_icon) self.comboBox.setItemText(0, QtGui.QApplication.translate("MainWindow", "Table View", None, QtGui.QApplication.UnicodeUTF8)) self.comboBox.addItem(_fromUtf8("")) self.comboBox.setItemIcon(1,self.tree_icon) self.comboBox.setItemText(1, QtGui.QApplication.translate("MainWindow", "Tree View", None, QtGui.QApplication.UnicodeUTF8)) self.gridLayout_2.addWidget(self.comboBox, 0, 4, 1, 1) self.pushButton = QtGui.QPushButton(self.tab_7) self.process_stop_pixmap = QtGui.QPixmap(os.path.join(__builtin__.iconspath ,"process_stop.png")) self.process_stop_icon = QtGui.QIcon(self.pushButton.icon()) self.process_stop_icon.addPixmap(self.process_stop_pixmap) self.pushButton.setIcon(self.process_stop_icon) self.pushButton.setText(QtGui.QApplication.translate("MainWindow", "End Process", None, QtGui.QApplication.UnicodeUTF8)) self.pushButton.setObjectName(_fromUtf8("pushButton")) self.gridLayout_2.addWidget(self.pushButton, 0, 0, 1, 1) self.treeWidget = QtGui.QTreeWidget(self.tab_7) self.treeWidget_10 = QtGui.QTreeWidget(self.tab_3) self.treeWidget_11 = QtGui.QTreeWidget(self.tab_3) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.treeWidget.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.treeWidget_10.sizePolicy().hasHeightForWidth()) self.treeWidget.setSizePolicy(sizePolicy) self.treeWidget_10.setSizePolicy(sizePolicy) self.treeWidget_11.setMaximumSize(QtCore.QSize(16777215, 120)) self.treeWidget_11.setMinimumSize(QtCore.QSize(16777215, 60)) self.treeWidget_10.setMinimumSize(QtCore.QSize(16777215, 60)) self.treeWidget.setMouseTracking(False) self.treeWidget.setFocusPolicy(QtCore.Qt.WheelFocus) self.treeWidget.setAutoFillBackground(True) self.treeWidget.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.treeWidget.setTabKeyNavigation(False) self.treeWidget.setProperty("showDropIndicator", False) self.treeWidget.setDragDropOverwriteMode(False) self.treeWidget.setAlternatingRowColors(True) self.treeWidget.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) self.treeWidget.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.treeWidget.setTextElideMode(QtCore.Qt.ElideRight) self.treeWidget.setHorizontalScrollMode(QtGui.QAbstractItemView.ScrollPerItem) self.treeWidget.setAutoExpandDelay(-1) self.treeWidget.setRootIsDecorated(False) self.treeWidget.setItemsExpandable(False) self.treeWidget.setAnimated(False) self.treeWidget.setWordWrap(False) self.treeWidget.setExpandsOnDoubleClick(False) self.treeWidget.setObjectName(_fromUtf8("treeWidget")) self.treeWidget.headerItem().setText(0, QtGui.QApplication.translate("MainWindow", "Process", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText(1, QtGui.QApplication.translate("MainWindow", "Pid", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText(2, QtGui.QApplication.translate("MainWindow", "User", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText(3, QtGui.QApplication.translate("MainWindow", "Status", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText(4, QtGui.QApplication.translate("MainWindow", "Niceness", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText(5, QtGui.QApplication.translate("MainWindow", "Cpu [%]", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText(6, QtGui.QApplication.translate("MainWindow", "Memory [%]", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText(7, QtGui.QApplication.translate("MainWindow", "Virtual Mem [MB]", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText(8, QtGui.QApplication.translate("MainWindow", "RSS Mem [MB]", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText(9, QtGui.QApplication.translate("MainWindow", "Start time", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText(10, QtGui.QApplication.translate("MainWindow", "Cpu time", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText(11, QtGui.QApplication.translate("MainWindow", "Threads", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText(12, QtGui.QApplication.translate("MainWindow", "I/O read [bytes]", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText(13, QtGui.QApplication.translate("MainWindow", "I/O write [bytes]", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText(14, QtGui.QApplication.translate("MainWindow", "Parent [name,pid]", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText(15, QtGui.QApplication.translate("MainWindow", "Working directory", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.headerItem().setText(16, QtGui.QApplication.translate("MainWindow", "Command", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget.header().setObjectName(_fromUtf8("treeWidgetHeader")) self.treeWidget.header().setSortIndicatorShown(True) self.treeWidget.header().setClickable(True) self.treeWidget.sortItems(5, QtCore.Qt.DescendingOrder) self.treeWidget.verticalScrollBar().setObjectName(_fromUtf8("treeWidgetVBar")) self.treeWidget.horizontalScrollBar().setObjectName(_fromUtf8("treeWidgetHBar")) self.gridLayout_2.addWidget(self.treeWidget, 1, 0, 1, 5) self.treeWidget_10.setMouseTracking(False) self.treeWidget_10.setFocusPolicy(QtCore.Qt.WheelFocus) self.treeWidget_10.setAutoFillBackground(True) self.treeWidget_10.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.treeWidget_10.setTabKeyNavigation(False) self.treeWidget_10.setProperty("showDropIndicator", False) self.treeWidget_10.setDragDropOverwriteMode(False) self.treeWidget_10.setAlternatingRowColors(True) self.treeWidget_10.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) self.treeWidget_10.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.treeWidget_10.setTextElideMode(QtCore.Qt.ElideRight) self.treeWidget_10.setHorizontalScrollMode(QtGui.QAbstractItemView.ScrollPerItem) self.treeWidget_10.setAutoExpandDelay(-1) self.treeWidget_10.setRootIsDecorated(False) self.treeWidget_10.setItemsExpandable(False) self.treeWidget_10.setAnimated(False) self.treeWidget_10.setWordWrap(False) self.treeWidget_10.setExpandsOnDoubleClick(False) self.treeWidget_10.setSortingEnabled(False) self.treeWidget_10.setObjectName(_fromUtf8("treeWidget_10")) self.treeWidget_10.headerItem().setText(0, QtGui.QApplication.translate("MainWindow", "Process", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_10.headerItem().setText(1, QtGui.QApplication.translate("MainWindow", "Pid", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_10.headerItem().setText(2, QtGui.QApplication.translate("MainWindow", "Local", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_10.headerItem().setText(3, QtGui.QApplication.translate("MainWindow", "Remote", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_10.headerItem().setText(4, QtGui.QApplication.translate("MainWindow", "Status", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_10.header().setCascadingSectionResizes(True) self.treeWidget_10.header().setDefaultSectionSize(100) self.treeWidget_10.header().setMinimumSectionSize(50) self.treeWidget_10.header().resizeSection(0,120) self.treeWidget_10.header().resizeSection(1,80) self.treeWidget_10.header().resizeSection(2,240) self.treeWidget_10.header().resizeSection(3,240) self.treeWidget_10.header().resizeSection(4,100) self.treeWidget_10.header().setStretchLastSection(True) self.gridLayout_22.addWidget(self.treeWidget_10, 7, 0, 1, 5) self.treeWidget_11.setMouseTracking(False) self.treeWidget_11.setFocusPolicy(QtCore.Qt.WheelFocus) self.treeWidget_11.setAutoFillBackground(True) self.treeWidget_11.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.treeWidget_11.setTabKeyNavigation(False) self.treeWidget_11.setProperty("showDropIndicator", False) self.treeWidget_11.setDragDropOverwriteMode(False) self.treeWidget_11.setAlternatingRowColors(True) self.treeWidget_11.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) self.treeWidget_11.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.treeWidget_11.setTextElideMode(QtCore.Qt.ElideRight) self.treeWidget_11.setHorizontalScrollMode(QtGui.QAbstractItemView.ScrollPerItem) self.treeWidget_11.setAutoExpandDelay(-1) self.treeWidget_11.setRootIsDecorated(False) self.treeWidget_11.setItemsExpandable(False) self.treeWidget_11.setAnimated(False) self.treeWidget_11.setWordWrap(False) self.treeWidget_11.setExpandsOnDoubleClick(False) self.treeWidget_11.setSortingEnabled(False) self.treeWidget_11.setObjectName(_fromUtf8("treeWidget_11")) self.treeWidget_11.headerItem().setText(0, QtGui.QApplication.translate("MainWindow", "Interface", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_11.headerItem().setText(1, QtGui.QApplication.translate("MainWindow", "Bytes Sent", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_11.headerItem().setText(2, QtGui.QApplication.translate("MainWindow", "Bytes Receive", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_11.headerItem().setText(3, QtGui.QApplication.translate("MainWindow", "Packets Sent", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_11.headerItem().setText(4, QtGui.QApplication.translate("MainWindow", "Packets Receive", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_11.header().setCascadingSectionResizes(True) self.treeWidget_11.header().setDefaultSectionSize(100) self.treeWidget_11.header().setMinimumSectionSize(50) self.treeWidget_11.header().resizeSection(0,90) self.treeWidget_11.header().resizeSection(1,180) self.treeWidget_11.header().resizeSection(2,180) self.treeWidget_11.header().resizeSection(3,160) self.treeWidget_11.header().resizeSection(4,160) self.treeWidget_11.header().setStretchLastSection(True) self.gridLayout_22.addWidget(self.treeWidget_11, 3, 0, 1, 5) self.lineEdit = QtGui.QLineEdit(self.tab_7) self.lineEdit2 = QtGui.QLineEdit(self.tab_3) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lineEdit.sizePolicy().hasHeightForWidth()) self.lineEdit.setSizePolicy(sizePolicy) self.lineEdit.setAutoFillBackground(False) self.lineEdit.setInputMask(_fromUtf8("")) self.lineEdit.setText(_fromUtf8("")) self.lineEdit.setPlaceholderText(QtGui.QApplication.translate("MainWindow", "Quick Search... ", None, QtGui.QApplication.UnicodeUTF8)) self.lineEdit.setObjectName(_fromUtf8("lineEdit")) self.gridLayout_2.addWidget(self.lineEdit, 0, 2, 1, 1) self.lineEdit2.setSizePolicy(sizePolicy) self.lineEdit2.setAutoFillBackground(False) self.lineEdit2.setInputMask(_fromUtf8("")) self.lineEdit2.setText(_fromUtf8("")) self.lineEdit2.setPlaceholderText(QtGui.QApplication.translate("MainWindow", "Quick Search... ", None, QtGui.QApplication.UnicodeUTF8)) self.lineEdit2.setObjectName(_fromUtf8("lineEdit2")) self.gridLayout_22.addWidget(self.lineEdit2, 6, 0, 1, 0) spacerItem = QtGui.QSpacerItem(0, 21, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum) self.gridLayout_2.addItem(spacerItem, 0, 3, 1, 1) self.tabWidget.addTab(self.tab_7, _fromUtf8("")) self.tab_8 = QtGui.QWidget() self.tabWidget.addTab(self.tab_8, _fromUtf8("")) self.tab = QtGui.QWidget() self.tabWidget.addTab(self.tab, _fromUtf8("")) self.tabWidget.addTab(self.tab_3, _fromUtf8("")) self.tab_2 = QtGui.QWidget() self.gridLayout = QtGui.QGridLayout(self.tab_2) self.gridLayout_50 = QtGui.QGridLayout(self.tab) spacerItem2 = QtGui.QSpacerItem(0, 13, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem2, 0, 0, 1, 1) spacerItem3 = QtGui.QSpacerItem(0, 13, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem3, 0, 2, 1, 1) self.line = QtGui.QFrame(self.tab_2) self.line.setFrameShadow(QtGui.QFrame.Plain) self.line.setFrameShape(QtGui.QFrame.HLine) self.line.setFrameShadow(QtGui.QFrame.Sunken) self.gridLayout.addWidget(self.line, 1, 0, 1, 0) self.line_2 = QtGui.QFrame(self.tab_2) self.line_2.setFrameShape(QtGui.QFrame.HLine) self.line_2.setFrameShadow(QtGui.QFrame.Sunken) self.line_2.setLineWidth(1) self.gridLayout.addWidget(self.line_2, 3, 0, 1, 0) self.line_3 = QtGui.QFrame(self.tab_2) self.line_3.setFrameShape(QtGui.QFrame.HLine) self.line_3.setFrameShadow(QtGui.QFrame.Sunken) self.gridLayout.addWidget(self.line_3, 5, 0, 1, 0) self.line_4 = QtGui.QFrame(self.tab_2) self.line_4.setFrameShape(QtGui.QFrame.HLine) self.line_4.setFrameShadow(QtGui.QFrame.Sunken) self.gridLayout.addWidget(self.line_4, 7, 0, 1, 0) self.line_5 = QtGui.QFrame(self.tab_2) self.line_5.setFrameShape(QtGui.QFrame.HLine) self.line_5.setFrameShadow(QtGui.QFrame.Sunken) self.gridLayout.addWidget(self.line_5, 9, 0, 1, 0) self.label22_1 = QtGui.QLabel() self.label22_1.setText(QtGui.QApplication.translate("MainWindow","<b>Global Connections</b>", None, QtGui.QApplication.UnicodeUTF8)) self.gridLayout_22.addWidget(self.label22_1, 5, 0, 1, 1) self.line_101 = QtGui.QFrame(self.tab_3) self.label22_2 = QtGui.QLabel() self.label22_2.setText(QtGui.QApplication.translate("MainWindow","<b>Interfaces</b>", None, QtGui.QApplication.UnicodeUTF8)) self.gridLayout_22.addWidget(self.label22_2, 2, 0, 1, 1) self.treeWidget_6 = QtGui.QTreeWidget(self.tab_2) self.treeWidget_3 = QtGui.QTreeWidget(self.tab_2) self.treeWidget_4 = QtGui.QTreeWidget(self.tab_2) self.treeWidget_5 = QtGui.QTreeWidget(self.tab_2) self.treeWidget_50 = QtGui.QTreeWidget(self.tab) self.treeWidget_6.setMaximumSize(QtCore.QSize(16777215, 120)) self.treeWidget_3.setMaximumSize(QtCore.QSize(16777215, 120)) self.treeWidget_4.setMaximumSize(QtCore.QSize(16777215, 120)) self.treeWidget_5.setMaximumSize(QtCore.QSize(16777215, 90)) self.treeWidget_6.setMinimumSize(QtCore.QSize(16777215, 50)) self.treeWidget_3.setMinimumSize(QtCore.QSize(16777215, 60)) self.treeWidget_4.setMinimumSize(QtCore.QSize(16777215, 60)) self.treeWidget_5.setMinimumSize(QtCore.QSize(16777215, 60)) self.treeWidget_3.setLayoutDirection(QtCore.Qt.LeftToRight) self.treeWidget_3.setAutoFillBackground(True) self.treeWidget_3.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.treeWidget_3.setFrameShape(QtGui.QFrame.NoFrame) self.treeWidget_3.setFrameShadow(QtGui.QFrame.Plain) self.treeWidget_3.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.treeWidget_3.setProperty("showDropIndicator", False) self.treeWidget_3.setAlternatingRowColors(True) self.treeWidget_3.setTextElideMode(QtCore.Qt.ElideNone) self.treeWidget_3.setHorizontalScrollMode(QtGui.QAbstractItemView.ScrollPerItem) self.treeWidget_3.setVerticalScrollMode(QtGui.QAbstractItemView.ScrollPerItem) self.treeWidget_3.setRootIsDecorated(False) self.treeWidget_3.setItemsExpandable(False) self.treeWidget_3.setExpandsOnDoubleClick(False) self.treeWidget_3.setSortingEnabled(False) self.treeWidget_3.setObjectName(_fromUtf8("treeWidget_3")) self.treeWidget_3.headerItem().setText(0, QtGui.QApplication.translate("MainWindow", "Thread Id", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_3.headerItem().setText(1, QtGui.QApplication.translate("MainWindow", "User Time", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_3.headerItem().setText(2, QtGui.QApplication.translate("MainWindow", "System Time", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_3.header().setVisible(True) self.treeWidget_3.header().setCascadingSectionResizes(True) self.treeWidget_3.header().setDefaultSectionSize(200) self.treeWidget_3.header().setMinimumSectionSize(100) self.gridLayout.addWidget(self.treeWidget_3, 8, 0, 1, 0) self.treeWidget_4.setLayoutDirection(QtCore.Qt.LeftToRight) self.treeWidget_4.setAutoFillBackground(True) self.treeWidget_4.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.treeWidget_4.setFrameShape(QtGui.QFrame.NoFrame) self.treeWidget_4.setFrameShadow(QtGui.QFrame.Plain) self.treeWidget_4.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.treeWidget_4.setProperty("showDropIndicator", False) self.treeWidget_4.setAlternatingRowColors(True) self.treeWidget_4.setTextElideMode(QtCore.Qt.ElideNone) self.treeWidget_4.setHorizontalScrollMode(QtGui.QAbstractItemView.ScrollPerItem) self.treeWidget_4.setVerticalScrollMode(QtGui.QAbstractItemView.ScrollPerItem) self.treeWidget_4.setRootIsDecorated(False) self.treeWidget_4.setItemsExpandable(False) self.treeWidget_4.setExpandsOnDoubleClick(False) self.treeWidget_4.setSortingEnabled(False) self.treeWidget_4.setObjectName(_fromUtf8("treeWidget_4")) self.treeWidget_4.headerItem().setText(0, QtGui.QApplication.translate("MainWindow", "Connection Type", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_4.headerItem().setText(1, QtGui.QApplication.translate("MainWindow", "Local", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_4.headerItem().setText(2, QtGui.QApplication.translate("MainWindow", "Remote", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_4.headerItem().setText(3, QtGui.QApplication.translate("MainWindow", "Status", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_4.header().setVisible(True) self.treeWidget_4.header().setCascadingSectionResizes(True) self.treeWidget_4.header().setDefaultSectionSize(200) self.treeWidget_4.header().setMinimumSectionSize(100) self.gridLayout.addWidget(self.treeWidget_4, 6, 0, 1, 0) self.treeWidget_6.setLayoutDirection(QtCore.Qt.LeftToRight) self.treeWidget_6.setAutoFillBackground(True) self.treeWidget_6.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.treeWidget_6.setFrameShape(QtGui.QFrame.NoFrame) self.treeWidget_6.setFrameShadow(QtGui.QFrame.Plain) self.treeWidget_6.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.treeWidget_6.setProperty("showDropIndicator", False) self.treeWidget_6.setAlternatingRowColors(True) self.treeWidget_6.setTextElideMode(QtCore.Qt.ElideNone) self.treeWidget_6.setHorizontalScrollMode(QtGui.QAbstractItemView.ScrollPerItem) self.treeWidget_6.setVerticalScrollMode(QtGui.QAbstractItemView.ScrollPerItem) self.treeWidget_6.setRootIsDecorated(False) self.treeWidget_6.setItemsExpandable(False) self.treeWidget_6.setExpandsOnDoubleClick(False) self.treeWidget_6.setSortingEnabled(False) self.treeWidget_6.setObjectName(_fromUtf8("treeWidget_6")) self.treeWidget_6.headerItem().setText(0, QtGui.QApplication.translate("MainWindow", "Opened File Id", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_6.headerItem().setText(1, QtGui.QApplication.translate("MainWindow", "Opened File", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_6.header().setVisible(True) self.treeWidget_6.header().setCascadingSectionResizes(True) self.treeWidget_6.header().setDefaultSectionSize(200) self.treeWidget_6.header().setMinimumSectionSize(100) self.gridLayout.addWidget(self.treeWidget_6, 10, 0, 1, 0) self.treeWidget_5.setLayoutDirection(QtCore.Qt.LeftToRight) self.treeWidget_5.setAutoFillBackground(True) self.treeWidget_5.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.treeWidget_5.setFrameShape(QtGui.QFrame.NoFrame) self.treeWidget_5.setFrameShadow(QtGui.QFrame.Plain) self.treeWidget_5.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.treeWidget_5.setProperty("showDropIndicator", False) self.treeWidget_5.setAlternatingRowColors(True) self.treeWidget_5.setTextElideMode(QtCore.Qt.ElideNone) self.treeWidget_5.setHorizontalScrollMode(QtGui.QAbstractItemView.ScrollPerItem) self.treeWidget_5.setRootIsDecorated(False) self.treeWidget_5.setItemsExpandable(False) self.treeWidget_5.setExpandsOnDoubleClick(False) self.treeWidget_5.setSortingEnabled(False) self.treeWidget_5.setObjectName(_fromUtf8("treeWidget_5")) self.treeWidget_5.setSelectionMode(QtGui.QAbstractItemView.NoSelection) self.treeWidget_5.headerItem().setText(0, QtGui.QApplication.translate("MainWindow", "Pid", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_5.headerItem().setText(1, QtGui.QApplication.translate("MainWindow", "User", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_5.headerItem().setText(2, QtGui.QApplication.translate("MainWindow", "Status", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_5.headerItem().setText(3, QtGui.QApplication.translate("MainWindow", "Niceness", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_5.headerItem().setText(4, QtGui.QApplication.translate("MainWindow", "Virtual Mem [MB]", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_5.headerItem().setText(5, QtGui.QApplication.translate("MainWindow", "RSS Mem [MB]", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_5.headerItem().setText(6, QtGui.QApplication.translate("MainWindow", "Start time", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_5.headerItem().setText(7, QtGui.QApplication.translate("MainWindow", "Cpu time", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_5.headerItem().setText(8, QtGui.QApplication.translate("MainWindow", "Threads", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_5.headerItem().setText(9, QtGui.QApplication.translate("MainWindow", "Connections", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_5.headerItem().setText(10, QtGui.QApplication.translate("MainWindow", "Opened files", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_5.headerItem().setText(11, QtGui.QApplication.translate("MainWindow", "I/O read [bytes]", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_5.headerItem().setText(12, QtGui.QApplication.translate("MainWindow", "I/O write [bytes]", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_5.headerItem().setText(13, QtGui.QApplication.translate("MainWindow", "I/O read [KB/s]", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_5.headerItem().setText(14, QtGui.QApplication.translate("MainWindow", "I/O write [KB/s]", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_5.headerItem().setText(15, QtGui.QApplication.translate("MainWindow", "Parent [name,pid]", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_5.headerItem().setText(16, QtGui.QApplication.translate("MainWindow", "Working directory", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_5.headerItem().setText(17, QtGui.QApplication.translate("MainWindow", "Command", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_5.header().setVisible(True) self.treeWidget_5.header().setCascadingSectionResizes(True) self.treeWidget_5.header().setDefaultSectionSize(160) self.treeWidget_5.header().setMinimumSectionSize(80) self.gridLayout.addWidget(self.treeWidget_5, 4, 0, 1, 0) self.treeWidget_50.setLayoutDirection(QtCore.Qt.LeftToRight) self.treeWidget_50.setAutoFillBackground(True) self.treeWidget_50.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.treeWidget_50.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.treeWidget_50.setProperty("showDropIndicator", False) self.treeWidget_50.setAlternatingRowColors(True) self.treeWidget_50.setTextElideMode(QtCore.Qt.ElideNone) self.treeWidget_50.setHorizontalScrollMode(QtGui.QAbstractItemView.ScrollPerItem) self.treeWidget_50.setRootIsDecorated(False) self.treeWidget_50.setItemsExpandable(False) self.treeWidget_50.setExpandsOnDoubleClick(False) self.treeWidget_50.setMouseTracking(True) self.treeWidget_50.setSortingEnabled(False) self.treeWidget_50.setObjectName(_fromUtf8("treeWidget_50")) self.treeWidget_50.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) self.treeWidget_50.headerItem().setText(0, QtGui.QApplication.translate("MainWindow", "Partition", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_50.headerItem().setText(1, QtGui.QApplication.translate("MainWindow", "Mountpoint", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_50.headerItem().setText(2, QtGui.QApplication.translate("MainWindow", "Filesystem", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_50.headerItem().setText(3, QtGui.QApplication.translate("MainWindow", "Total [MB]", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_50.headerItem().setText(4, QtGui.QApplication.translate("MainWindow", "Used [MB]", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_50.headerItem().setText(5, QtGui.QApplication.translate("MainWindow", "Free [MB]", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_50.headerItem().setText(6, QtGui.QApplication.translate("MainWindow", "Used %", None, QtGui.QApplication.UnicodeUTF8)) self.treeWidget_50.header().setVisible(True) self.treeWidget_50.header().setCascadingSectionResizes(True) self.treeWidget_50.header().setDefaultSectionSize(100) self.treeWidget_50.header().setMinimumSectionSize(60) self.treeWidget_50.header().resizeSection(0,120) self.treeWidget_50.header().resizeSection(1,150) self.gridLayout_50.addWidget(self.treeWidget_50, 3, 0, 1, 0) self.progressBar = QtGui.QProgressBar(self.tab) self.progressBar.setProperty("Used %", 0.0) self.progressBar.setTextVisible(False) self.progressBar.setOrientation(QtCore.Qt.Horizontal) self.progressBar.setObjectName(_fromUtf8("progressBar")) self.gridLayout_50.addWidget(self.progressBar, 4, 0, 1, 0) self.label50 = QtGui.QLabel() self.label50.setText(QtGui.QApplication.translate("MainWindow","<b>Partitions</b>", None, QtGui.QApplication.UnicodeUTF8)) self.gridLayout_50.addWidget(self.label50, 2, 0, 1, 3) self.tabWidget.addTab(self.tab_2, _fromUtf8("")) self.gridLayout_4.addWidget(self.tabWidget, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 808, 21)) self.menubar.setObjectName(_fromUtf8("menubar")) self.menuPsymon = QtGui.QMenu(self.menubar) self.menuPsymon.setTitle(QtGui.QApplication.translate("MainWindow", "&File", None, QtGui.QApplication.UnicodeUTF8)) self.menuPsymon.setObjectName(_fromUtf8("menuPsymon")) self.menuView = QtGui.QMenu(self.menubar) self.menuView.setTitle(QtGui.QApplication.translate("MainWindow", "&View", None, QtGui.QApplication.UnicodeUTF8)) self.menuView.setObjectName(_fromUtf8("menuView")) self.menuQstyle = QtGui.QMenu(self.menuView) self.menuQstyle_pixmap = QtGui.QPixmap(os.path.join(__builtin__.iconspath ,"style.png")) self.menuQstyle_icon = QtGui.QIcon() self.menuQstyle_icon.addPixmap(self.menuQstyle_pixmap) self.menuQstyle.setIcon(self.menuQstyle_icon) self.menuQstyle.setTitle(QtGui.QApplication.translate("MainWindow", "Application Style", None, QtGui.QApplication.UnicodeUTF8)) self.menuQstyle.setObjectName(_fromUtf8("menuQstyle")) self.menuTabsAlign = QtGui.QMenu(self.menuView) self.menuTabsAlign_pixmap = QtGui.QPixmap(os.path.join(__builtin__.iconspath ,"tabs.png")) self.menuTabsAlign_icon = QtGui.QIcon() self.menuTabsAlign_icon.addPixmap(self.menuTabsAlign_pixmap) self.menuTabsAlign.setIcon(self.menuTabsAlign_icon) self.menuTabsAlign.setTitle(QtGui.QApplication.translate("MainWindow", "Tabs Orientation", None, QtGui.QApplication.UnicodeUTF8)) self.menuTabsAlign.setObjectName(_fromUtf8("menuTabsAlign")) self.menuSettings = QtGui.QMenu(self.menubar) self.menuSettings.setTitle(QtGui.QApplication.translate("MainWindow", "&Settings", None, QtGui.QApplication.UnicodeUTF8)) self.menuSettings.setObjectName(_fromUtf8("menuSettings")) self.menuConfig = QtGui.QAction(MainWindow) self.menuConfig_pixmap = QtGui.QPixmap(os.path.join(__builtin__.iconspath ,"configure.png")) self.menuConfig_icon = QtGui.QIcon() self.menuConfig_icon.addPixmap(self.menuConfig_pixmap) self.menuConfig.setIcon(self.menuConfig_icon) self.menuConfig.setText(QtGui.QApplication.translate("MainWindow", "Configure Psymon", None, QtGui.QApplication.UnicodeUTF8)) self.menuConfig.setObjectName(_fromUtf8("menuConfig")) self.menuSettings.addAction(self.menuConfig) self.menuHelp = QtGui.QMenu(self.menubar) self.menuHelp.setTitle(QtGui.QApplication.translate("MainWindow", "&Help", None, QtGui.QApplication.UnicodeUTF8)) self.menuHelp.setObjectName(_fromUtf8("menuHelp")) MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setObjectName(_fromUtf8("statusbar")) MainWindow.setStatusBar(self.statusbar) opac = QtGui.QGraphicsOpacityEffect() opac.setOpacity(0.7) self.statusbar.setGraphicsEffect(opac) self.actionQuit = QtGui.QAction(MainWindow) self.quit_pixmap = QtGui.QPixmap(os.path.join(__builtin__.iconspath ,"quit.png")) self.quit_icon = QtGui.QIcon(self.actionQuit.icon()) self.quit_icon.addPixmap(self.quit_pixmap) self.actionQuit.setIcon(self.quit_icon) self.actionQuit.setText(QtGui.QApplication.translate("MainWindow", "Quit", None, QtGui.QApplication.UnicodeUTF8)) self.actionQuit.setObjectName(_fromUtf8("actionQuit")) self.menuView.addAction(self.menuQstyle.menuAction()) self.menuView.addAction(self.menuTabsAlign.menuAction()) self.menuPsymon.addAction(self.actionQuit) self.menubar.addAction(self.menuPsymon.menuAction()) self.menubar.addAction(self.menuView.menuAction()) self.menubar.addAction(self.menuSettings.menuAction()) self.menubar.addAction(self.menuHelp.menuAction()) self.left_pixmap = QtGui.QPixmap(os.path.join(__builtin__.iconspath ,"left.png")) self.left_icon = QtGui.QIcon() self.left_icon.addPixmap(self.left_pixmap) self.center_pixmap = QtGui.QPixmap(os.path.join(__builtin__.iconspath ,"center.png")) self.center_icon = QtGui.QIcon() self.center_icon.addPixmap(self.center_pixmap) self.right_pixmap = QtGui.QPixmap(os.path.join(__builtin__.iconspath ,"right.png")) self.right_icon = QtGui.QIcon() self.right_icon.addPixmap(self.right_pixmap) self.action_tabsleft = QtGui.QAction(MainWindow) self.action_tabsleft.setIcon(self.left_icon) self.action_tabsleft.setText("Left") self.action_tabsleft.setObjectName("actiontabsleft") self.menuTabsAlign.addAction(self.action_tabsleft) self.action_tabscenter = QtGui.QAction(MainWindow) self.action_tabscenter.setIcon(self.center_icon) self.action_tabscenter.setText("Center") self.action_tabscenter.setObjectName("actiontabscenter") self.menuTabsAlign.addAction(self.action_tabscenter) self.action_tabsright = QtGui.QAction(MainWindow) self.action_tabsright.setIcon(self.right_icon) self.action_tabsright.setText("Right") self.action_tabsright.setObjectName("actiontabsright") self.menuTabsAlign.addAction(self.action_tabsright) self.fullscreen_pixmap = QtGui.QPixmap(os.path.join(__builtin__.iconspath ,"fullscreen.png")) self.fullscreen_icon = QtGui.QIcon() self.fullscreen_icon.addPixmap(self.fullscreen_pixmap) self.action_Fullscreen = QtGui.QAction(MainWindow) self.action_Fullscreen.setText(QtGui.QApplication.translate("MainWindow", "Fullscreen", None, QtGui.QApplication.UnicodeUTF8)) self.action_Fullscreen.setIcon(self.fullscreen_icon) self.action_Fullscreen.setObjectName("actionFullscreen") self.action_Fullscreen.setCheckable(True) self.menuView.addAction(self.action_Fullscreen) self.action_helpPsymon = QtGui.QAction(MainWindow) self.helpPsymon_pixmap = QtGui.QPixmap(os.path.join(__builtin__.iconspath ,"help.png")) self.helpPsymon_icon = QtGui.QIcon() self.helpPsymon_icon.addPixmap(self.helpPsymon_pixmap) self.action_helpPsymon.setIcon(self.helpPsymon_icon) self.action_helpPsymon.setText(QtGui.QApplication.translate("MainWindow", "Help", None, QtGui.QApplication.UnicodeUTF8)) self.action_helpPsymon.setObjectName("actionhelpPsymon") self.menuHelp.addAction(self.action_helpPsymon) self.menuHelp.addSeparator() self.action_aboutPsymon = QtGui.QAction(MainWindow) self.aboutPsymon_pixmap = QtGui.QPixmap(os.path.join(__builtin__.iconspath ,"about.png")) self.aboutPsymon_icon = QtGui.QIcon() self.aboutPsymon_icon.addPixmap(self.aboutPsymon_pixmap) self.action_aboutPsymon.setIcon(self.aboutPsymon_icon) self.action_aboutPsymon.setText(QtGui.QApplication.translate("MainWindow", "About Psymon", None, QtGui.QApplication.UnicodeUTF8)) self.action_aboutPsymon.setObjectName("actionaboutPsymon") self.menuHelp.addAction(self.action_aboutPsymon) self.action_aboutQt = QtGui.QAction(MainWindow) self.aboutQt_pixmap = QtGui.QPixmap(os.path.join(__builtin__.iconspath ,"qt.png")) self.aboutQt_icon = QtGui.QIcon() self.aboutQt_icon.addPixmap(self.aboutQt_pixmap) self.action_aboutQt.setIcon(self.aboutQt_icon) self.action_aboutQt.setText(QtGui.QApplication.translate("MainWindow", "About Qt", None, QtGui.QApplication.UnicodeUTF8)) self.action_aboutQt.setObjectName("actionaboutQt") self.menuHelp.addAction(self.action_aboutQt) tree_scr_v = self.treeWidget.verticalScrollBar().sizeHint().width() scr_size = int(tree_scr_v/1.3) self.treeWidget_10.verticalScrollBar().setMaximumWidth(scr_size) self.treeWidget_11.verticalScrollBar().setMaximumWidth(scr_size) self.treeWidget_3.verticalScrollBar().setMaximumWidth(scr_size) self.treeWidget_4.verticalScrollBar().setMaximumWidth(scr_size) self.treeWidget_5.verticalScrollBar().setMaximumWidth(scr_size) self.treeWidget_50.verticalScrollBar().setMaximumWidth(scr_size) self.treeWidget_6.verticalScrollBar().setMaximumWidth(scr_size) self.treeWidget_10.horizontalScrollBar().setMaximumHeight(scr_size) self.treeWidget_11.horizontalScrollBar().setMaximumHeight(scr_size) self.treeWidget_3.horizontalScrollBar().setMaximumHeight(scr_size) self.treeWidget_4.horizontalScrollBar().setMaximumHeight(scr_size) self.treeWidget_5.horizontalScrollBar().setMaximumHeight(scr_size) self.treeWidget_50.horizontalScrollBar().setMaximumHeight(scr_size) self.treeWidget_6.horizontalScrollBar().setMaximumHeight(scr_size) self.statuslabel = QtGui.QLabel(self.centralwidget) self.statuslabel.setMinimumWidth(1) self.statuslabel.setText("") self.statuslabel.setFont(QtGui.QFont('sans')) self.statuslabel.setAlignment(Qt.AlignCenter) self.statusbar.addWidget(self.statuslabel,1) QtCore.QCoreApplication.setApplicationName("Psymon") QtCore.QCoreApplication.setOrganizationName("Psymon") self.settings = QtCore.QSettings() self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow) self.labelplot = QtGui.QLabel() self.labelplot.setText(QtGui.QApplication.translate("MainWindow","<b>Cpu History</b>", None, QtGui.QApplication.UnicodeUTF8)+QtGui.QApplication.translate("MainWindow"," (Cpus: ", None, QtGui.QApplication.UnicodeUTF8)+str(psutil.cpu_count())+")") self.labelplot_icon = QtGui.QLabel() self.labelplot_icon_pixmap = QtGui.QPixmap(os.path.join(__builtin__.iconspath ,"cpu.png")) self.labelplot_icon.setPixmap(self.labelplot_icon_pixmap) spacerItem_plot = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.plot = Qwt.QwtPlot() self.plotter = cpuplotter.CpuPlot(self.plot) self.gridLayout_3 = QtGui.QGridLayout(self.tab_8) self.gridLayout_3.setObjectName("gridLayout_3") self.gridLayout_3.addWidget(self.labelplot, 0, 0, 1, 1) self.gridLayout_3.addWidget(self.labelplot_icon, 0, 2, 1, 1) self.gridLayout_3.addItem(spacerItem_plot, 0, 1, 1, 1) self.gridLayout_3.addWidget(self.plotter, 1, 0, 1, 5) self.labelplot2 = QtGui.QLabel() self.labelplot2.setText(QtGui.QApplication.translate("MainWindow","<b>Memory History</b>", None, QtGui.QApplication.UnicodeUTF8)+QtGui.QApplication.translate("MainWindow"," (Mem: ", None, QtGui.QApplication.UnicodeUTF8)+str(round(psutil.virtual_memory().total /1000000000.0,2))+"\ GB, "+QtGui.QApplication.translate("MainWindow","Swap: ", None, QtGui.QApplication.UnicodeUTF8)+str(round(psutil.swap_memory().total /1000000000.0,2))+"GB)") self.label2plot_icon = QtGui.QLabel() self.label2plot_icon_pixmap = QtGui.QPixmap(os.path.join(__builtin__.iconspath ,"memory.png")) self.label2plot_icon.setPixmap(self.label2plot_icon_pixmap) spacerItem2_plot = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.plot2 = Qwt.QwtPlot() self.plotter2 = memoryplotter.MemoryPlot(self.plot2) self.gridLayout_3.addWidget(self.labelplot2, 2, 0, 1, 1) self.gridLayout_3.addWidget(self.label2plot_icon, 2, 2, 1, 1) self.gridLayout_3.addItem(spacerItem2_plot, 2, 1, 1, 1) self.gridLayout_3.addWidget(self.plotter2, 3, 0, 1, 5) self.labelplot3 = QtGui.QLabel() self.labelplot3.setText(QtGui.QApplication.translate("MainWindow","<b>Network History</b>", None, QtGui.QApplication.UnicodeUTF8)) self.labelplot3_icon = QtGui.QLabel() self.labelplot3_icon_pixmap = QtGui.QPixmap(os.path.join(__builtin__.iconspath ,"network.png")) self.labelplot3_icon.setPixmap(self.labelplot3_icon_pixmap) spacerItem3_plot = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.plot3 = Qwt.QwtPlot() self.plotter3 = networkplotter.NetworkPlot(self.plot3) self.gridLayout_22.addWidget(self.labelplot3, 0, 0, 1, 1) self.gridLayout_22.addWidget(self.labelplot3_icon, 0, 2, 1, 1) self.gridLayout_22.addItem(spacerItem3_plot, 0, 1, 1, 1) self.gridLayout_22.addWidget(self.plotter3, 1, 0, 1, 5) self.labelplot5 = QtGui.QLabel() self.labelplot5.setText(QtGui.QApplication.translate("MainWindow","<b>Disk I/O History</b>", None, QtGui.QApplication.UnicodeUTF8)) self.labelplot5_icon = QtGui.QLabel() self.labelplot5_icon_pixmap = QtGui.QPixmap(os.path.join(__builtin__.iconspath ,"harddisk.png")) self.labelplot5_icon.setPixmap(self.labelplot5_icon_pixmap) spacerItem5_plot = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.plot5 = Qwt.QwtPlot() self.plotter5 = diskplotter.DiskPlot(self.plot5) self.gridLayout_50.addWidget(self.labelplot5, 0, 0, 1, 1) self.gridLayout_50.addWidget(self.labelplot5_icon, 0, 2, 1, 1) self.gridLayout_50.addItem(spacerItem5_plot, 0, 1, 1, 1) self.gridLayout_50.addWidget(self.plotter5, 1, 0, 1, 5) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_7), QtGui.QApplication.translate("MainWindow", "Process Table", None, QtGui.QApplication.UnicodeUTF8)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_8), QtGui.QApplication.translate("MainWindow", "Cpu && Memory Info", None, QtGui.QApplication.UnicodeUTF8)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), QtGui.QApplication.translate("MainWindow", "Disks Info", None, QtGui.QApplication.UnicodeUTF8)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), QtGui.QApplication.translate("MainWindow", "Network Info", None, QtGui.QApplication.UnicodeUTF8)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), QtGui.QApplication.translate("MainWindow", "Process Detailed Info", None, QtGui.QApplication.UnicodeUTF8))
def _init_ui(self, fade_duration): self.setupUi(self) arch_str = " ".join(platform.architecture()) resources_path = os.path.join(DIR_PATH, "..", "resources") software_path = os.path.join(resources_path, "software.yaml") with open(software_path, 'r') as stream: software_dict = yaml.load(stream, Loader=Loader) software_str = "DTOcean {} ({})".format(software_dict["version"], arch_str) self.versionLabel.setText(software_str) names_path = os.path.join(resources_path, "people.yaml") with open(names_path, 'r') as stream: names = yaml.load(stream, Loader=Loader) if names is None: self.verticalLayout_3.removeWidget(self.peopleIntroLabel) self.peopleIntroLabel.deleteLater() self.peopleIntroLabel = None self.verticalLayout_3.removeWidget(self.peopleLabel) self.peopleLabel.deleteLater() self.peopleLabel = None self.verticalLayout_3.removeWidget(self.line) self.line.deleteLater() self.line = None else: names_str = ", ".join(names[:-1]) names_str += " and {}".format(names[-1]) self.peopleLabel.setText(names_str) pix_search_str = os.path.join(resources_path, "beneficiary*.png") pix_list = glob.glob(pix_search_str) self._n_pix = len(pix_list) if self._n_pix > 0: self._image_files = cycle(pix_list) else: self.verticalLayout_3.removeWidget(self.insitutionIntroLabel) self.insitutionIntroLabel.deleteLater() self.insitutionIntroLabel = None self.horizontalLayout.removeWidget(self.frame) self.frame.deleteLater() self.frame = None self.verticalLayout_4.removeWidget(self.insitutionIntroLabel) self.institutionLabel.deleteLater() self.institutionLabel = None self.verticalLayout_3.removeWidget(self.line_3) self.line_3.deleteLater() self.line_3 = None if self._n_pix > 1: self._timer = QtCore.QTimer(self) self._effect = QtGui.QGraphicsOpacityEffect() self._fade_in = self._init_fade_in(fade_duration) self._fade_out = self._init_fade_out(fade_duration) self.institutionLabel.setGraphicsEffect(self._effect) self._fade_in.finished.connect(self._start_timer) self._fade_out.finished.connect(self._start_image) self.scrollArea.verticalScrollBar().valueChanged.connect( self.institutionLabel.repaint) return