def load_pixmap(self, pixmap: qtg.QPixmap): self._output_changed = False self.setPixmap(pixmap) self._master_pixmap = qtg.QPixmap(pixmap) self._original_pixmap = qtg.QPixmap(pixmap) if self._max_pixmap_dimension == None: self._max_pixmap_dimension = max(pixmap.width(), pixmap.height()) self.update_pixmap()
def __init__(self): QtWidgets.QDialog.__init__(self) Ui_BackupStartedDialog.__init__(self) self.setupUi(self) pixmap = QtGui.QPixmap("img/logo.png") pixmap = pixmap.scaled(20, 20) self.logo_label.setPixmap(pixmap) pixmap = QtGui.QPixmap("img/check.png") pixmap = pixmap.scaledToWidth(20) self.check_label.setPixmap(pixmap)
def file_open(self): self.iw.scene.clear() self.image_name = QFileDialog.getOpenFileName(self, 'Open File') self.iw.pixmap = QtGui.QPixmap(self.image_name[0]) self.iw.pixmap_fit = self.iw.pixmap.scaled( self.iw.pixmap.width(), self.iw.pixmap.height(), QtCore.Qt.AspectRatioMode.KeepAspectRatio, transformMode=QtCore.Qt.TransformationMode.SmoothTransformation) self.iw.scene.addPixmap(self.iw.pixmap_fit) #add image self.iw.setScene(self.iw.scene) #Adjust window size automatically? self.iw.fitInView(self.iw.scene.sceneRect(), QtCore.Qt.AspectRatioMode.KeepAspectRatio) self.iw.scene.update() self.statusbar.showMessage('Select a measurement to make from the toolbar') self.lengthButton.setEnabled(True) self.areaButton.setEnabled(True) self.angleButton.setEnabled(True) self.exportButton.setEnabled(True) self.undoButton.setEnabled(True) self.bezier.setEnabled(True) self.bezier.setChecked(True) self.widthsButton.setEnabled(False) self.angleNames = [] self.areaNames = [] self.lengthNames = [] #self.iw.measurements = [[]] self.iw.widths = [] self.iw.lengths = [[]] self.iw.L = posData( np.empty(shape=(0, 0)), np.empty(shape=(0, 0))) #lengths self.iw.A = posData( np.empty(shape=(0, 0)), np.empty(shape=(0, 0))) #area self.iw.W = posData( np.empty(shape=(0, 0)), np.empty(shape=(0, 0))) #widths self.iw.T = angleData(np.empty(shape=(0, 0))) #angles self.iw.angleValues = np.empty((0,0)) self.iw.areaValues = np.empty((0,0)) self.iw._lastpos = None self.iw._thispos = None self.iw.measuring_length = False self.iw.measuring_area = False self.iw.measuring_widths = False self.iw.measuring_angle = False self.iw._zoom = 0 self.iw.factor = 1.0 self.iw.d = {} #dictionary for line items self.iw.k = 0 #initialize counter so lines turn yellow self.iw.m = None self.iw.scene.realline = None self.iw.scene.testline = None self.iw.scene.ellipseItem = None self.iw.scene.area_ellipseItem = None self.iw.scene.polyItem = None self.iw.image_name = None
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(800, 600) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 22)) self.menubar.setObjectName("menubar") self.menuFile = QtWidgets.QMenu(self.menubar) self.menuFile.setObjectName("menuFile") self.menuReports = QtWidgets.QMenu(self.menubar) self.menuReports.setObjectName("menuReports") self.menuSettings = QtWidgets.QMenu(self.menubar) self.menuSettings.setObjectName("menuSettings") self.menuFInd_Device = QtWidgets.QMenu(self.menuSettings) self.menuFInd_Device.setObjectName("menuFInd_Device") self.menudevice = QtWidgets.QMenu(self.menubar) self.menudevice.setObjectName("menudevice") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.action_New_cofig = QtGui.QAction(MainWindow) icon = QtGui.QIcon() icon.addPixmap( QtGui.QPixmap("Gui\\../../../../Downloads/BlackArch_logo.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.On) self.action_New_cofig.setIcon(icon) self.action_New_cofig.setObjectName("action_New_cofig") self.actionOpen_config = QtGui.QAction(MainWindow) self.actionOpen_config.setObjectName("actionOpen_config") self.actionClose = QtGui.QAction(MainWindow) self.actionClose.setObjectName("actionClose") self.actionNew_Device = QtGui.QAction(MainWindow) self.actionNew_Device.setObjectName("actionNew_Device") self.actionMobile_Device = QtGui.QAction(MainWindow) self.actionMobile_Device.setObjectName("actionMobile_Device") self.actionDoc = QtGui.QAction(MainWindow) self.actionDoc.setObjectName("actionDoc") self.actionupload_confing = QtGui.QAction(MainWindow) self.actionupload_confing.setObjectName("actionupload_confing") self.menuFile.addAction(self.action_New_cofig) self.menuFile.addSeparator() self.menuFile.addAction(self.actionOpen_config) self.menuFInd_Device.addAction(self.actionNew_Device) self.menuFInd_Device.addSeparator() self.menuFInd_Device.addAction(self.actionMobile_Device) self.menuSettings.addAction(self.menuFInd_Device.menuAction()) self.menuSettings.addSeparator() self.menuSettings.addAction(self.actionDoc) self.menudevice.addAction(self.actionupload_confing) self.menubar.addAction(self.menuFile.menuAction()) self.menubar.addAction(self.menuReports.menuAction()) self.menubar.addAction(self.menuSettings.menuAction()) self.menubar.addAction(self.menudevice.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def __init__(self): QtWidgets.QDialog.__init__(self) Ui_WelcomeDialog.__init__(self) self.setupUi(self) pixmap = QtGui.QPixmap("img/logo.png") pixmap = pixmap.scaled(20, 20) self.logo_label.setPixmap(pixmap)
def __init__(self, size): self.size = size self.qsize = QtCore.QSize(*size) self.pixmap = QtGui.QPixmap(self.qsize) self.painter = QtGui.QPainter(self.pixmap) self.painter.setRenderHint(QPainter_Antialiasing, True) self.painter.setRenderHint(QPainter_SmoothPixmapTransform, True) self.painter.fillRect(0, 0, size[0], size[1], GlobalColor_white)
def __init__(self): QtWidgets.QDialog.__init__(self) Ui_LoginDialog.__init__(self) self.setupUi(self) pixmap = QtGui.QPixmap("img/logo.png") pixmap = pixmap.scaled(32, 32) self.logo_label.setPixmap(pixmap)
def setupUi(self, Einstellungen): Einstellungen.setObjectName("Einstellungen") Einstellungen.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal) Einstellungen.resize(276, 229) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(".\\ui\\../images/icon.ico"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) Einstellungen.setWindowIcon(icon) self.gridLayout_2 = QtWidgets.QGridLayout(Einstellungen) self.gridLayout_2.setObjectName("gridLayout_2") self.gridLayout = QtWidgets.QGridLayout() self.gridLayout.setObjectName("gridLayout") self.pushButtonOK = QtWidgets.QPushButton(Einstellungen) self.pushButtonOK.setDefault(True) self.pushButtonOK.setObjectName("pushButtonOK") self.gridLayout.addWidget(self.pushButtonOK, 0, 0, 1, 1) self.pushButtonAbbrechen = QtWidgets.QPushButton(Einstellungen) self.pushButtonAbbrechen.setObjectName("pushButtonAbbrechen") self.gridLayout.addWidget(self.pushButtonAbbrechen, 0, 1, 1, 1) self.gridLayout_2.addLayout(self.gridLayout, 8, 0, 1, 1) self.label = QtWidgets.QLabel(Einstellungen) font = QtGui.QFont() font.setBold(True) self.label.setFont(font) self.label.setObjectName("label") self.gridLayout_2.addWidget(self.label, 0, 0, 1, 1) self.label_2 = QtWidgets.QLabel(Einstellungen) self.label_2.setObjectName("label_2") self.gridLayout_2.addWidget(self.label_2, 1, 0, 1, 1) self.lineEditAktPW = QtWidgets.QLineEdit(Einstellungen) self.lineEditAktPW.setEchoMode(QtWidgets.QLineEdit.EchoMode.Password) self.lineEditAktPW.setClearButtonEnabled(True) self.lineEditAktPW.setObjectName("lineEditAktPW") self.gridLayout_2.addWidget(self.lineEditAktPW, 2, 0, 1, 1) self.lineEditNeuPW = QtWidgets.QLineEdit(Einstellungen) self.lineEditNeuPW.setEchoMode(QtWidgets.QLineEdit.EchoMode.Password) self.lineEditNeuPW.setClearButtonEnabled(True) self.lineEditNeuPW.setObjectName("lineEditNeuPW") self.gridLayout_2.addWidget(self.lineEditNeuPW, 4, 0, 1, 1) self.lineEditWdhNeuPW = QtWidgets.QLineEdit(Einstellungen) self.lineEditWdhNeuPW.setEchoMode(QtWidgets.QLineEdit.EchoMode.Password) self.lineEditWdhNeuPW.setClearButtonEnabled(True) self.lineEditWdhNeuPW.setObjectName("lineEditWdhNeuPW") self.gridLayout_2.addWidget(self.lineEditWdhNeuPW, 6, 0, 1, 1) self.label_4 = QtWidgets.QLabel(Einstellungen) self.label_4.setObjectName("label_4") self.gridLayout_2.addWidget(self.label_4, 5, 0, 1, 1) self.label_3 = QtWidgets.QLabel(Einstellungen) self.label_3.setObjectName("label_3") self.gridLayout_2.addWidget(self.label_3, 3, 0, 1, 1) spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) self.gridLayout_2.addItem(spacerItem, 7, 0, 1, 1) self.retranslateUi(Einstellungen) QtCore.QMetaObject.connectSlotsByName(Einstellungen) Einstellungen.setTabOrder(self.lineEditAktPW, self.lineEditNeuPW) Einstellungen.setTabOrder(self.lineEditNeuPW, self.lineEditWdhNeuPW) Einstellungen.setTabOrder(self.lineEditWdhNeuPW, self.pushButtonOK) Einstellungen.setTabOrder(self.pushButtonOK, self.pushButtonAbbrechen)
def system_tray_icon(status, geometry=None): """Returns the system tray icon for the given status. The following icons will be used: 1) macOS: Black SVG icons with transparent background. macOS will adapt the appearance as necessary. This only works reliably in Qt >= 5.15. 2) Linux: Any icons installed in the system theme. Maestral will prefer "symbolic" icons named "maestral-status-{status}-symbolic" over regular icons named "maestral-status-{status}". It will fall back to manually setting the icon in a color which contrasts the background color of the status bar. :param str status: Maestral status. Must be 'idle', 'syncing', 'paused', 'disconnected' 'info' or 'error'. :param geometry: Tray icon geometry on screen. If given, this location will be used to determine the system tray background color. """ allowed_status = { "idle", "syncing", "paused", "disconnected", "info", "error" } if status not in allowed_status: raise ValueError(f"status must be in {allowed_status}") if platform.system() == "Darwin": # use SVG icon with automatic color icon = QtGui.QIcon(resource_path(f"maestral_tray-{status}-dark.svg")) icon.setIsMask(True) else: # Prefer icons from theme if installed / existing. Fall back to loading our own # SVG icon with a color contrasting the status bar. theme_icon_name = f"maestral_tray-{status}" theme_icon_name_symbolic = f"maestral_tray-{status}-symbolic" # Prefer "symbolic" icons where the appearance is adapted by the platform # automatically. Specs for symbolic icons and their use in the system tray # vary between platforms. Fall back to regular icons instead. if QtGui.QIcon.hasThemeIcon(theme_icon_name_symbolic): icon = QtGui.QIcon.fromTheme(theme_icon_name_symbolic) elif QtGui.QIcon.hasThemeIcon(theme_icon_name): icon = QtGui.QIcon.fromTheme(theme_icon_name) else: icon = QtGui.QIcon() if icon.isNull(): color = "light" if is_dark_status_bar(geometry) else "dark" # We create our icon from a pixmap instead of the SVG directly, this works # around https://bugreports.qt.io/browse/QTBUG-53550. pixmap = QtGui.QPixmap( resource_path(f"maestral_tray-{status}-{color}.svg")) icon = QtGui.QIcon(pixmap) return icon
def setupUi(self, InstallerSecondWindow): InstallerSecondWindow.setObjectName("InstallerSecondWindow") InstallerSecondWindow.resize(800, 456) font = QtGui.QFont() font.setFamily("Roboto") InstallerSecondWindow.setFont(font) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("download.ico"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) InstallerSecondWindow.setWindowIcon(icon) self.centralwidget = QtWidgets.QWidget(InstallerSecondWindow) self.centralwidget.setObjectName("centralwidget") self.bFinish = QtWidgets.QPushButton(self.centralwidget) self.bFinish.setEnabled(False) self.bFinish.setGeometry(QtCore.QRect(710, 380, 75, 24)) self.bFinish.setObjectName("bFinish") self.OutputLabel = QtWidgets.QLabel(self.centralwidget) self.OutputLabel.setGeometry(QtCore.QRect(10, 50, 81, 21)) font = QtGui.QFont() font.setFamily("Roboto") font.setPointSize(12) self.OutputLabel.setFont(font) self.OutputLabel.setObjectName("OutputLabel") self.OutputText = QtWidgets.QPlainTextEdit(self.centralwidget) self.OutputText.setGeometry(QtCore.QRect(13, 80, 771, 241)) self.OutputText.setReadOnly(True) self.OutputText.setObjectName("OutputText") self.checkRunAfterInstall = QtWidgets.QCheckBox(self.centralwidget) self.checkRunAfterInstall.setEnabled(False) self.checkRunAfterInstall.setGeometry(QtCore.QRect(20, 380, 221, 20)) self.checkRunAfterInstall.setObjectName("checkRunAfterInstall") self.progressBar = QtWidgets.QProgressBar(self.centralwidget) self.progressBar.setGeometry(QtCore.QRect(17, 340, 761, 23)) self.progressBar.setProperty("value", 0) self.progressBar.setObjectName("progressBar") self.checkDesktopShortcut = QtWidgets.QCheckBox(self.centralwidget) self.checkDesktopShortcut.setGeometry(QtCore.QRect(10, 10, 151, 20)) self.checkDesktopShortcut.setChecked(True) self.checkDesktopShortcut.setObjectName("checkDesktopShortcut") self.checkStartMenuShortcut = QtWidgets.QCheckBox(self.centralwidget) self.checkStartMenuShortcut.setGeometry(QtCore.QRect(10, 30, 171, 20)) self.checkStartMenuShortcut.setChecked(True) self.checkStartMenuShortcut.setObjectName("checkStartMenuShortcut") self.bInstall = QtWidgets.QPushButton(self.centralwidget) self.bInstall.setGeometry(QtCore.QRect(700, 40, 75, 24)) self.bInstall.setObjectName("bInstall") InstallerSecondWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(InstallerSecondWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 22)) self.menubar.setObjectName("menubar") InstallerSecondWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(InstallerSecondWindow) self.statusbar.setObjectName("statusbar") InstallerSecondWindow.setStatusBar(self.statusbar) self.retranslateUi(InstallerSecondWindow) QtCore.QMetaObject.connectSlotsByName(InstallerSecondWindow)
def test_splashscreen(_, window, __, ___, ____, app): pixmap = QtGui.QPixmap('assets/Yellowstone.jpg') size = app.screens()[0].size() scaled = pixmap.scaled(size, KeepAspectRatio) splash = QtWidgets.QSplashScreen(scaled) splash.show() QtCore.QTimer.singleShot(2000, lambda: splash_timer(splash, window)) return None, None, False
def cell_clicked(self, row, column): if column == 1: color = QtWidgets.QColorDialog.getColor() if color.isValid(): self.canvas.colors[self.canvas.classes[row]] = color item = QtWidgets.QTableWidgetItem() icon = QtGui.QPixmap(20, 20) icon.fill(color) item.setData(QtCore.Qt.ItemDataRole.DecorationRole, icon) self.tableWidgetClasses.setItem(row, 1, item)
def update_pixmap(self): if self._master_pixmap == None or self.pixmap().width() == 0 or self.pixmap().height() == 0: return scaled = self._master_pixmap.scaled(self._max_pixmap_dimension, self._max_pixmap_dimension, qtc.Qt.AspectRatioMode.KeepAspectRatio) updated = qtg.QPixmap(scaled) updated.fill(qtc.Qt.GlobalColor.transparent) painter = qtg.QPainter(updated) painter.setOpacity(self._opacity) painter.drawPixmap(0, 0, scaled) painter.end() self.setPixmap(updated)
def __init__(self): QtWidgets.QMainWindow.__init__(self) Ui_MainWindow.__init__(self) self.setupUi(self) pixmap = QtGui.QPixmap("img/logo.png") pixmap = pixmap.scaled(20, 20) self.logo_label.setPixmap(pixmap) pixmap = QtGui.QPixmap("img/computer.png") pixmap = pixmap.scaled(32, 32) self.computer_label.setPixmap(pixmap) pixmap = QtGui.QPixmap("img/arrow.png") pixmap = pixmap.scaled(20, 20) self.arrow_label.setPixmap(pixmap) pixmap = QtGui.QPixmap("img/cloud.png") pixmap = pixmap.scaled(32, 32) self.cloud_label.setPixmap(pixmap)
def paint_pixmaps(self, mouse_x, mouse_y, ratio): view_pixmap = qtg.QPixmap(self.pixmap()) view_painter = qtg.QPainter(view_pixmap) view_pen = view_painter.pen() view_pen.setWidth(self._pen_size * ratio) view_pen.setColor(self._pen_color) view_painter.setPen(view_pen) view_painter.drawLine(self._last_x, self._last_y, mouse_x, mouse_y) view_painter.end() self.setPixmap(view_pixmap) master_pixmap = qtg.QPixmap(self._master_pixmap) master_painter = qtg.QPainter(master_pixmap) master_pen = master_painter.pen() master_pen.setWidth(self._pen_size) master_pen.setColor(self._pen_color) master_painter.setPen(master_pen) master_painter.drawLine(self._last_x / ratio, self._last_y / ratio, mouse_x / ratio, mouse_y / ratio) master_painter.end() self._master_pixmap = qtg.QPixmap(master_pixmap) self._output_changed = True
def display_classes(self): self.tableWidgetClasses.setRowCount(len(self.canvas.classes)) row = 0 for class_name in self.canvas.classes: item = QtWidgets.QTableWidgetItem(class_name) self.tableWidgetClasses.setItem(row, 0, item) item = QtWidgets.QTableWidgetItem() icon = QtGui.QPixmap(20, 20) icon.fill(self.canvas.colors[class_name]) item.setData(QtCore.Qt.ItemDataRole.DecorationRole, icon) self.tableWidgetClasses.setItem(row, 1, item) row += 1 self.tableWidgetClasses.selectionModel().clear()
def makeTitle(): titleLayout = QHBoxLayout() # titleLayout.setSpacing(42) titleFont = QtGui.QFont("Times", 32, QtGui.QFont.Weight.Bold) title = QLabel(opts.timeclockOpts["title"]) title.setFixedWidth(820) title.setFont(titleFont) logo = QLabel() logoImage = QtGui.QPixmap("../data/assets/" + opts.timeclockOpts["logo"]) logoImage = logoImage.scaled(QtCore.QSize(100, 100)) logo.setPixmap(logoImage) if opts.timeclockOpts["darkTheme"]: logo.setStyleSheet("QLabel {background:white}") titleLayout.addWidget(title) titleLayout.addStretch() titleLayout.addWidget(logo) return titleLayout
def setupUi(self, StyleManagerWindow): StyleManagerWindow.setObjectName("StyleManagerWindow") StyleManagerWindow.resize(332, 113) font = QtGui.QFont() font.setFamily("Roboto") font.setStyleStrategy(QtGui.QFont.StyleStrategy.PreferAntialias) StyleManagerWindow.setFont(font) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("F:/Downloads/SSH-Keys.ico"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) StyleManagerWindow.setWindowIcon(icon) self.centralwidget = QtWidgets.QWidget(StyleManagerWindow) self.centralwidget.setObjectName("centralwidget") self.bChangeStyle = QtWidgets.QPushButton(self.centralwidget) self.bChangeStyle.setGeometry(QtCore.QRect(10, 10, 151, 61)) font = QtGui.QFont() font.setFamily("Roboto") font.setPointSize(16) font.setStyleStrategy(QtGui.QFont.StyleStrategy.PreferAntialias) self.bChangeStyle.setFont(font) self.bChangeStyle.setObjectName("bChangeStyle") self.bAddStyle = QtWidgets.QPushButton(self.centralwidget) self.bAddStyle.setGeometry(QtCore.QRect(170, 10, 151, 61)) font = QtGui.QFont() font.setFamily("Roboto") font.setPointSize(16) font.setStyleStrategy(QtGui.QFont.StyleStrategy.PreferAntialias) self.bAddStyle.setFont(font) self.bAddStyle.setObjectName("bAddStyle") StyleManagerWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(StyleManagerWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 332, 22)) self.menubar.setObjectName("menubar") StyleManagerWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(StyleManagerWindow) self.statusbar.setObjectName("statusbar") StyleManagerWindow.setStatusBar(self.statusbar) self.retranslateUi(StyleManagerWindow) QtCore.QMetaObject.connectSlotsByName(StyleManagerWindow)
def setupUi(self, aboutAutoSplitWidget): aboutAutoSplitWidget.setObjectName("aboutAutoSplitWidget") aboutAutoSplitWidget.resize(264, 250) aboutAutoSplitWidget.setMinimumSize(QtCore.QSize(264, 250)) aboutAutoSplitWidget.setMaximumSize(QtCore.QSize(264, 250)) font = QtGui.QFont() font.setPointSize(9) aboutAutoSplitWidget.setFont(font) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/resources/icon.ico"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) aboutAutoSplitWidget.setWindowIcon(icon) self.okButton = QtWidgets.QPushButton(aboutAutoSplitWidget) self.okButton.setGeometry(QtCore.QRect(180, 220, 75, 24)) self.okButton.setObjectName("okButton") self.createdbyLabel = QtWidgets.QLabel(aboutAutoSplitWidget) self.createdbyLabel.setGeometry(QtCore.QRect(10, 44, 161, 32)) self.createdbyLabel.setObjectName("createdbyLabel") self.versionLabel = QtWidgets.QLabel(aboutAutoSplitWidget) self.versionLabel.setGeometry(QtCore.QRect(10, 21, 161, 16)) self.versionLabel.setObjectName("versionLabel") self.donatetextLabel = QtWidgets.QLabel(aboutAutoSplitWidget) self.donatetextLabel.setGeometry(QtCore.QRect(30, 95, 204, 32)) self.donatetextLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) self.donatetextLabel.setObjectName("donatetextLabel") self.donatebuttonLabel = QtWidgets.QLabel(aboutAutoSplitWidget) self.donatebuttonLabel.setGeometry(QtCore.QRect(60, 150, 147, 47)) self.donatebuttonLabel.setAlignment( QtCore.Qt.AlignmentFlag.AlignCenter) self.donatebuttonLabel.setObjectName("donatebuttonLabel") self.iconLabel = QtWidgets.QLabel(aboutAutoSplitWidget) self.iconLabel.setGeometry(QtCore.QRect(190, 17, 62, 71)) self.iconLabel.setObjectName("iconLabel") self.retranslateUi(aboutAutoSplitWidget) self.okButton.clicked.connect(aboutAutoSplitWidget.close) QtCore.QMetaObject.connectSlotsByName(aboutAutoSplitWidget)
def __init__(self, parent = None): super().__init__(parent = parent) # Container Pixmaps # self.setPixmap(qtg.QPixmap(0, 0)) self._master_pixmap = None self._original_pixmap = None # Pixmap Attributes # self._opacity = 1 self._max_pixmap_dimension = None self._output_changed = False # Widget Attributes # self._last_x = None self._last_y = None self._scroll_quality = 5 self._pen_size = 10 self._pen_color = qtg.QColor(0, 0, 0)
def setupUi(self, CodeAbrufen): CodeAbrufen.setObjectName("CodeAbrufen") CodeAbrufen.setWindowModality( QtCore.Qt.WindowModality.ApplicationModal) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(".\\images/icon.ico"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) CodeAbrufen.setWindowIcon(icon) self.gridLayout = QtWidgets.QGridLayout(CodeAbrufen) self.gridLayout.setObjectName("gridLayout") self.groupBox = QtWidgets.QGroupBox(CodeAbrufen) font = QtGui.QFont() font.setPointSize(10) font.setBold(True) self.groupBox.setFont(font) self.groupBox.setObjectName("groupBox") self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox) self.gridLayout_2.setObjectName("gridLayout_2") self.label_5 = QtWidgets.QLabel(self.groupBox) font = QtGui.QFont() font.setPointSize(8) font.setBold(False) self.label_5.setFont(font) self.label_5.setWordWrap(True) self.label_5.setObjectName("label_5") self.gridLayout_2.addWidget(self.label_5, 0, 0, 1, 1) spacerItem = QtWidgets.QSpacerItem( 20, 13, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) self.gridLayout_2.addItem(spacerItem, 1, 0, 1, 1) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.label_6 = QtWidgets.QLabel(self.groupBox) font = QtGui.QFont() font.setPointSize(8) font.setBold(False) self.label_6.setFont(font) self.label_6.setObjectName("label_6") self.horizontalLayout.addWidget(self.label_6) self.comboBoxLaufzeit = QtWidgets.QComboBox(self.groupBox) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.comboBoxLaufzeit.sizePolicy().hasHeightForWidth()) self.comboBoxLaufzeit.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(8) font.setBold(False) self.comboBoxLaufzeit.setFont(font) self.comboBoxLaufzeit.setObjectName("comboBoxLaufzeit") self.horizontalLayout.addWidget(self.comboBoxLaufzeit) self.gridLayout_2.addLayout(self.horizontalLayout, 2, 0, 1, 1) spacerItem1 = QtWidgets.QSpacerItem( 20, 13, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) self.gridLayout_2.addItem(spacerItem1, 3, 0, 1, 1) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.pushButtonOK = QtWidgets.QPushButton(self.groupBox) font = QtGui.QFont() font.setPointSize(8) font.setBold(False) self.pushButtonOK.setFont(font) self.pushButtonOK.setDefault(True) self.pushButtonOK.setObjectName("pushButtonOK") self.horizontalLayout_2.addWidget(self.pushButtonOK) self.pushButtonAbbrechen = QtWidgets.QPushButton(self.groupBox) font = QtGui.QFont() font.setPointSize(8) font.setBold(False) self.pushButtonAbbrechen.setFont(font) self.pushButtonAbbrechen.setObjectName("pushButtonAbbrechen") self.horizontalLayout_2.addWidget(self.pushButtonAbbrechen) self.gridLayout_2.addLayout(self.horizontalLayout_2, 4, 0, 1, 1) self.gridLayout.addWidget(self.groupBox, 0, 0, 1, 1) self.retranslateUi(CodeAbrufen) QtCore.QMetaObject.connectSlotsByName(CodeAbrufen)
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(327, 286) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(".\\ui\\../images/icon.ico"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) MainWindow.setWindowIcon(icon) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout.setObjectName("gridLayout") self.tabWidget = QtWidgets.QTabWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.tabWidget.sizePolicy().hasHeightForWidth()) self.tabWidget.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.tabWidget.setFont(font) self.tabWidget.setObjectName("tabWidget") self.tab = QtWidgets.QWidget() self.tab.setObjectName("tab") self.verticalLayout = QtWidgets.QVBoxLayout(self.tab) self.verticalLayout.setObjectName("verticalLayout") self.label = QtWidgets.QLabel(self.tab) font = QtGui.QFont() font.setPointSize(24) font.setBold(True) self.label.setFont(font) self.label.setStyleSheet("background-color: rgb(238, 246, 255);") self.label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) self.label.setObjectName("label") self.verticalLayout.addWidget(self.label) self.pushButton = QtWidgets.QPushButton(self.tab) font = QtGui.QFont() font.setPointSize(10) font.setBold(True) self.pushButton.setFont(font) self.pushButton.setDefault(True) self.pushButton.setObjectName("pushButton") self.verticalLayout.addWidget(self.pushButton) self.pushButton_2 = QtWidgets.QPushButton(self.tab) self.pushButton_2.setEnabled(False) self.pushButton_2.setObjectName("pushButton_2") self.verticalLayout.addWidget(self.pushButton_2) self.pushButton_3 = QtWidgets.QPushButton(self.tab) self.pushButton_3.setEnabled(False) self.pushButton_3.setObjectName("pushButton_3") self.verticalLayout.addWidget(self.pushButton_3) self.tabWidget.addTab(self.tab, "") self.tab_2 = QtWidgets.QWidget() self.tab_2.setObjectName("tab_2") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.tab_2) self.verticalLayout_2.setObjectName("verticalLayout_2") self.tableWidget = QtWidgets.QTableWidget(self.tab_2) self.tableWidget.setAlternatingRowColors(True) self.tableWidget.setSelectionBehavior( QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows) self.tableWidget.setRowCount(0) self.tableWidget.setColumnCount(2) self.tableWidget.setObjectName("tableWidget") self.tableWidget.horizontalHeader().setCascadingSectionResizes(False) self.tableWidget.horizontalHeader().setDefaultSectionSize(126) self.tableWidget.horizontalHeader().setStretchLastSection(True) self.verticalLayout_2.addWidget(self.tableWidget) self.pushButton_4 = QtWidgets.QPushButton(self.tab_2) self.pushButton_4.setEnabled(False) self.pushButton_4.setObjectName("pushButton_4") self.verticalLayout_2.addWidget(self.pushButton_4) self.pushButton_5 = QtWidgets.QPushButton(self.tab_2) self.pushButton_5.setEnabled(False) self.pushButton_5.setObjectName("pushButton_5") self.verticalLayout_2.addWidget(self.pushButton_5) self.tabWidget.addTab(self.tab_2, "") self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 327, 22)) self.menubar.setObjectName("menubar") self.menudatei = QtWidgets.QMenu(self.menubar) self.menudatei.setObjectName("menudatei") self.menuHilfe = QtWidgets.QMenu(self.menubar) self.menuHilfe.setObjectName("menuHilfe") self.menuBearbeiten = QtWidgets.QMenu(self.menubar) self.menuBearbeiten.setObjectName("menuBearbeiten") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) font = QtGui.QFont() font.setPointSize(7) font.setItalic(False) self.statusbar.setFont(font) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.actionCodes_importieren = QtGui.QAction(MainWindow) self.actionCodes_importieren.setObjectName("actionCodes_importieren") self.actionBeenden = QtGui.QAction(MainWindow) self.actionBeenden.setObjectName("actionBeenden") self.actionInfo = QtGui.QAction(MainWindow) self.actionInfo.setObjectName("actionInfo") self.actionEinstellungen = QtGui.QAction(MainWindow) self.actionEinstellungen.setObjectName("actionEinstellungen") self.menudatei.addAction(self.actionCodes_importieren) self.menudatei.addAction(self.actionBeenden) self.menuHilfe.addAction(self.actionInfo) self.menuBearbeiten.addAction(self.actionEinstellungen) self.menubar.addAction(self.menudatei.menuAction()) self.menubar.addAction(self.menuBearbeiten.menuAction()) self.menubar.addAction(self.menuHilfe.menuAction()) self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def draw_gui(self): self.main_layout = QtWidgets.QHBoxLayout() #self.setGeometry(1000,50,100,200) self.right_panel = QtWidgets.QVBoxLayout() ##picture## self.image = QtWidgets.QLabel() pixmap = QtGui.QPixmap( r"C:\Users\Natspir\Documents\Code\Python\NSVFXPipeline\pipeline\tools\GUI\Resources\saveAsset_GUIdraw.png" ) #pixmap.setAttribute(QtCore.Qt.WA_TranslucentBackground) #pixmap.fill(QtCore.Qt.yellow) pixmap = pixmap.scaledToHeight(200) self.image.setPixmap(pixmap) self.right_panel.addWidget(self.image) #### self.open_asset_folder_btn = QtWidgets.QPushButton("Open Asset Folder") self.open_asset_folder_btn.clicked.connect(self.open_asset_folder) self.right_panel.addWidget(self.open_asset_folder_btn) # self.type_input = self.add_line_edit("Type : ", self.asset_type) self.asset_input_fields.append(self.type_input) #self.type_input.textEdited.connect(self.update_target_path) #self.datas_Type = QtGui.QStandardItemModel() #completer = self.update_autocompletion(self.datas_Type) #self.type_input.setCompleter(completer) self.type_input.clicked.connect( lambda: self.click_on_edit_line(self.type_input)) self.name_input = self.add_line_edit("Asset name : ", self.asset_name) self.asset_input_fields.append(self.name_input) #self.name_input.textEdited.connect(self.update_target_path) #self.model2 = QtGui.QStandardItemModel() #completer = self.update_autocompletion(self.model2) #self.name_input.setCompleter(completer) #self.name_input = self.update_autocompletion(self.name_input) self.name_input.clicked.connect( lambda: self.click_on_edit_line(self.name_input)) """self.model = QtGui.QStandardItemModel() self.completer = QtWidgets.QCompleter(self.model, self) self.model.appendRow(QtGui.QStandardItem("test")) self.type_input.setCompleter(self.completer)""" self.task_input = self.add_line_edit("Task : ", self.asset_task) self.asset_input_fields.append(self.task_input) #self.task_input.textEdited.connect(self.update_target_path) #self.update_autocompletion(self.task_input) self.task_input.clicked.connect( lambda: self.click_on_edit_line(self.task_input)) self.subtask_input = self.add_line_edit("Subtask : ", self.asset_subtask) self.asset_input_fields.append(self.subtask_input) self.subtask_input.clicked.connect( lambda: self.click_on_edit_line(self.subtask_input)) self.version_input = self.add_line_edit("Version : ", self.asset_version) self.asset_input_fields.append(self.version_input) self.version_input.clicked.connect( lambda: self.click_on_edit_line(self.version_input)) self.console = QtWidgets.QLabel("") self.right_panel.addWidget(self.console) #buttons valid or cancel h_button_layout = QtWidgets.QHBoxLayout() button_validate = QtWidgets.QPushButton("Save") button_validate.clicked.connect(self.save) h_button_layout.addWidget(button_validate) button_cancel = QtWidgets.QPushButton("Cancel") button_cancel.clicked.connect(self.cancel) h_button_layout.addWidget(button_cancel) self.right_panel.addLayout(h_button_layout) self.main_layout.addLayout(self.right_panel) #left panel tree view self.left_panel = QtWidgets.QVBoxLayout() tree_view = QtWidgets.QTreeView() tree_model = QtGui.QStandardItemModel() tree_model = self.fill_tree_view(tree_model) tree_view.setModel(tree_model) if self.asset_type: pass #item = tree_view.findItems(self.asset_type) #print("item found : "+str(item)) #tree_view.expandAll() self.left_panel.addWidget(tree_view) self.main_layout.addLayout(self.left_panel) self.setLayout(self.main_layout)
def setupUi(self, SplashScreen): SplashScreen.setObjectName("SplashScreen") SplashScreen.resize(438, 281) self.centralwidget = QtWidgets.QWidget(SplashScreen) self.centralwidget.setObjectName("centralwidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget) self.verticalLayout.setContentsMargins(10, 10, 10, 10) self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName("verticalLayout") self.dropShadowFrame = QtWidgets.QFrame(self.centralwidget) font = QtGui.QFont() font.setPointSize(6) self.dropShadowFrame.setFont(font) self.dropShadowFrame.setStyleSheet( "QFrame{\n" " background-color: rgb(240, 240, 217);\n" " color:rgb(0, 0, 0);\n" " border-radius: 25px;\n" "}") self.dropShadowFrame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) self.dropShadowFrame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) self.dropShadowFrame.setObjectName("dropShadowFrame") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.dropShadowFrame) self.verticalLayout_2.setObjectName("verticalLayout_2") self.label_pic = QtWidgets.QLabel(self.dropShadowFrame) self.label_pic.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_pic.sizePolicy().hasHeightForWidth()) self.label_pic.setSizePolicy(sizePolicy) self.label_pic.setMaximumSize(QtCore.QSize(50, 50)) self.label_pic.setText("") self.label_pic.setTextFormat(QtCore.Qt.TextFormat.AutoText) self.label_pic.setPixmap( QtGui.QPixmap( "d:\\Rei Codes\\Hariku-App\\others\\splashsceen-luis\\../../assets/Hariku-logo.png" )) self.label_pic.setScaledContents(True) self.label_pic.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) self.label_pic.setObjectName("label_pic") self.verticalLayout_2.addWidget( self.label_pic, 0, QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter) self.label_desc = QtWidgets.QLabel(self.dropShadowFrame) font = QtGui.QFont() font.setFamily("OCR A Extended") font.setPointSize(10) self.label_desc.setFont(font) self.label_desc.setStyleSheet("") self.label_desc.setObjectName("label_desc") self.verticalLayout_2.addWidget(self.label_desc) self.progressBar = QtWidgets.QProgressBar(self.dropShadowFrame) self.progressBar.setStyleSheet( "QProgressBar{\n" " \n" " background-color: rgb(227, 227, 206);\n" " color:rgb(0,0,0);\n" " border-style: none;\n" " boder-color:rgb(40, 186, 130);\n" " border-radius: 10px;\n" " text-align: center;\n" "}\n" "\n" "QProgressBar::chunk {\n" "border-radius:10px;\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0.545, x2:1, y2:0.557, stop:0 rgba(24, 88, 191, 255), stop:1 rgba(40, 186, 130, 255));\n" "}") self.progressBar.setProperty("value", 24) self.progressBar.setObjectName("progressBar") self.verticalLayout_2.addWidget(self.progressBar) self.label_loading = QtWidgets.QLabel(self.dropShadowFrame) font = QtGui.QFont() font.setFamily("OCR A Extended") font.setPointSize(7) self.label_loading.setFont(font) self.label_loading.setStyleSheet("") self.label_loading.setObjectName("label_loading") self.verticalLayout_2.addWidget(self.label_loading) self.verticalLayout.addWidget(self.dropShadowFrame) SplashScreen.setCentralWidget(self.centralwidget) self.retranslateUi(SplashScreen) QtCore.QMetaObject.connectSlotsByName(SplashScreen)
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(672, 431) MainWindow.setIconSize(QtCore.QSize(200, 200)) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.tableView = QtWidgets.QTableView(self.centralwidget) self.tableView.setGeometry(QtCore.QRect(10, 80, 651, 271)) self.tableView.setObjectName("tableView") self.groupBox = QtWidgets.QGroupBox(self.centralwidget) self.groupBox.setGeometry(QtCore.QRect(180, 10, 231, 60)) self.groupBox.setObjectName("groupBox") self.comboBox = QtWidgets.QComboBox(self.groupBox) self.comboBox.setGeometry(QtCore.QRect(10, 20, 211, 31)) self.comboBox.setObjectName("comboBox") self.createButton = QtWidgets.QToolButton(self.centralwidget) self.createButton.setGeometry(QtCore.QRect(10, 10, 41, 61)) self.createButton.setLayoutDirection( QtCore.Qt.LayoutDirection.LeftToRight) self.createButton.setText("") icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("ui\\../img/create.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) self.createButton.setIcon(icon) self.createButton.setIconSize(QtCore.QSize(34, 50)) self.createButton.setObjectName("createButton") self.readButton = QtWidgets.QToolButton(self.centralwidget) self.readButton.setGeometry(QtCore.QRect(50, 10, 41, 61)) self.readButton.setText("") icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap("ui\\../img/read.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) self.readButton.setIcon(icon1) self.readButton.setIconSize(QtCore.QSize(34, 50)) self.readButton.setObjectName("readButton") self.deleteButton = QtWidgets.QToolButton(self.centralwidget) self.deleteButton.setGeometry(QtCore.QRect(130, 10, 41, 61)) self.deleteButton.setText("") icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap("ui\\../img/delete.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) self.deleteButton.setIcon(icon2) self.deleteButton.setIconSize(QtCore.QSize(34, 50)) self.deleteButton.setObjectName("deleteButton") self.updateButton = QtWidgets.QToolButton(self.centralwidget) self.updateButton.setGeometry(QtCore.QRect(90, 10, 41, 61)) self.updateButton.setText("") icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap("ui\\../img/update.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) self.updateButton.setIcon(icon3) self.updateButton.setIconSize(QtCore.QSize(34, 50)) self.updateButton.setObjectName("updateButton") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 672, 31)) self.menubar.setObjectName("menubar") self.menu = QtWidgets.QMenu(self.menubar) self.menu.setObjectName("menu") self.menu_2 = QtWidgets.QMenu(self.menubar) self.menu_2.setObjectName("menu_2") self.menu_3 = QtWidgets.QMenu(self.menubar) self.menu_3.setObjectName("menu_3") self.menu_4 = QtWidgets.QMenu(self.menubar) self.menu_4.setObjectName("menu_4") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.action = QtGui.QAction(MainWindow) self.action.setObjectName("action") self.action_2 = QtGui.QAction(MainWindow) self.action_2.setObjectName("action_2") self.action_3 = QtGui.QAction(MainWindow) self.action_3.setObjectName("action_3") self.action_4 = QtGui.QAction(MainWindow) self.action_4.setObjectName("action_4") self.action_5 = QtGui.QAction(MainWindow) self.action_5.setObjectName("action_5") self.action_6 = QtGui.QAction(MainWindow) self.action_6.setObjectName("action_6") self.action_7 = QtGui.QAction(MainWindow) self.action_7.setObjectName("action_7") self.action_8 = QtGui.QAction(MainWindow) self.action_8.setObjectName("action_8") self.action_9 = QtGui.QAction(MainWindow) self.action_9.setObjectName("action_9") self.action_1 = QtGui.QAction(MainWindow) self.action_1.setObjectName("action_1") self.action_10 = QtGui.QAction(MainWindow) self.action_10.setObjectName("action_10") self.action_11 = QtGui.QAction(MainWindow) self.action_11.setObjectName("action_11") self.action_12 = QtGui.QAction(MainWindow) self.action_12.setObjectName("action_12") self.menu.addAction(self.action_8) self.menu_2.addAction(self.action) self.menu_2.addAction(self.action_2) self.menu_2.addAction(self.action_3) self.menu_2.addAction(self.action_4) self.menu_2.addAction(self.action_5) self.menu_3.addAction(self.action_6) self.menu_3.addAction(self.action_7) self.menu_3.addAction(self.action_9) self.menu_4.addAction(self.action_1) self.menu_4.addAction(self.action_10) self.menu_4.addAction(self.action_11) self.menu_4.addAction(self.action_12) self.menubar.addAction(self.menu.menuAction()) self.menubar.addAction(self.menu_2.menuAction()) self.menubar.addAction(self.menu_3.menuAction()) self.menubar.addAction(self.menu_4.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) MainWindow.setTabOrder(self.comboBox, self.tableView)
def set_grid_color(self, color): icon = QtGui.QPixmap(20, 20) icon.fill(color) self.labelGridColor.setPixmap(icon) self.canvas.set_grid_color(color)
def set_active_point_color(self, color): icon = QtGui.QPixmap(20, 20) icon.fill(color) self.labelPointColor.setPixmap(icon) self.canvas.set_point_color(color)
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(548, 601) self.gridLayout_6 = QtWidgets.QGridLayout(Dialog) self.gridLayout_6.setObjectName("gridLayout_6") self.groupBox_4 = QtWidgets.QGroupBox(Dialog) self.groupBox_4.setTitle("") self.groupBox_4.setObjectName("groupBox_4") self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_4) self.gridLayout_2.setObjectName("gridLayout_2") self.label_4 = QtWidgets.QLabel(self.groupBox_4) self.label_4.setObjectName("label_4") self.gridLayout_2.addWidget(self.label_4, 0, 0, 1, 1) self.comboBox_attachment = QtWidgets.QComboBox(self.groupBox_4) self.comboBox_attachment.setObjectName("comboBox_attachment") self.comboBox_attachment.addItem("") self.comboBox_attachment.addItem("") self.gridLayout_2.addWidget(self.comboBox_attachment, 0, 1, 1, 1) self.label_8 = QtWidgets.QLabel(self.groupBox_4) self.label_8.setObjectName("label_8") self.gridLayout_2.addWidget(self.label_8, 0, 2, 1, 1) self.comboBox_size = QtWidgets.QComboBox(self.groupBox_4) self.comboBox_size.setObjectName("comboBox_size") self.comboBox_size.addItem("") self.comboBox_size.addItem("") self.gridLayout_2.addWidget(self.comboBox_size, 0, 3, 1, 1) self.label_7 = QtWidgets.QLabel(self.groupBox_4) self.label_7.setObjectName("label_7") self.gridLayout_2.addWidget(self.label_7, 1, 0, 1, 1) self.comboBox_position = QtWidgets.QComboBox(self.groupBox_4) self.comboBox_position.setObjectName("comboBox_position") self.comboBox_position.addItem("") self.comboBox_position.addItem("") self.comboBox_position.addItem("") self.comboBox_position.addItem("") self.comboBox_position.addItem("") self.comboBox_position.addItem("") self.comboBox_position.addItem("") self.comboBox_position.addItem("") self.comboBox_position.addItem("") self.gridLayout_2.addWidget(self.comboBox_position, 1, 1, 1, 1) self.label_9 = QtWidgets.QLabel(self.groupBox_4) self.label_9.setObjectName("label_9") self.gridLayout_2.addWidget(self.label_9, 1, 2, 1, 1) self.scaleBox = QtWidgets.QDoubleSpinBox(self.groupBox_4) self.scaleBox.setDecimals(1) self.scaleBox.setMinimum(0.1) self.scaleBox.setSingleStep(0.1) self.scaleBox.setProperty("value", 1.0) self.scaleBox.setObjectName("scaleBox") self.gridLayout_2.addWidget(self.scaleBox, 1, 3, 1, 1) self.gridLayout_6.addWidget(self.groupBox_4, 3, 0, 1, 12) self.RestoreButton = QtWidgets.QPushButton(Dialog) self.RestoreButton.setObjectName("RestoreButton") self.gridLayout_6.addWidget(self.RestoreButton, 8, 8, 1, 3) self.pushButton_videoTutorial = QtWidgets.QPushButton(Dialog) self.pushButton_videoTutorial.setObjectName("pushButton_videoTutorial") self.gridLayout_6.addWidget(self.pushButton_videoTutorial, 8, 0, 1, 8) self.groupBox_3 = QtWidgets.QGroupBox(Dialog) self.groupBox_3.setObjectName("groupBox_3") self.gridLayout_3 = QtWidgets.QGridLayout(self.groupBox_3) self.gridLayout_3.setObjectName("gridLayout_3") self.label_5 = QtWidgets.QLabel(self.groupBox_3) self.label_5.setToolTip("") self.label_5.setToolTipDuration(-1) self.label_5.setStatusTip("") self.label_5.setWhatsThis("") self.label_5.setObjectName("label_5") self.gridLayout_3.addWidget(self.label_5, 0, 0, 1, 1) self.Slider_main = QtWidgets.QSlider(self.groupBox_3) self.Slider_main.setToolTip("") self.Slider_main.setToolTipDuration(-1) self.Slider_main.setWhatsThis("") self.Slider_main.setMaximum(100) self.Slider_main.setPageStep(1) self.Slider_main.setProperty("value", 100) self.Slider_main.setSliderPosition(100) self.Slider_main.setTracking(True) self.Slider_main.setOrientation(QtCore.Qt.Orientation.Horizontal) self.Slider_main.setTickPosition( QtWidgets.QSlider.TickPosition.NoTicks) self.Slider_main.setTickInterval(5) self.Slider_main.setObjectName("Slider_main") self.gridLayout_3.addWidget(self.Slider_main, 0, 1, 1, 1) self.label_6 = QtWidgets.QLabel(self.groupBox_3) self.label_6.setObjectName("label_6") self.gridLayout_3.addWidget(self.label_6, 1, 0, 1, 1) self.Slider_review = QtWidgets.QSlider(self.groupBox_3) self.Slider_review.setMaximum(100) self.Slider_review.setPageStep(10) self.Slider_review.setProperty("value", 1) self.Slider_review.setSliderPosition(1) self.Slider_review.setOrientation(QtCore.Qt.Orientation.Horizontal) self.Slider_review.setInvertedAppearance(False) self.Slider_review.setTickPosition( QtWidgets.QSlider.TickPosition.NoTicks) self.Slider_review.setObjectName("Slider_review") self.gridLayout_3.addWidget(self.Slider_review, 1, 1, 1, 1) self.gridLayout_6.addWidget(self.groupBox_3, 2, 8, 1, 4) self.groupBox = QtWidgets.QGroupBox(Dialog) self.groupBox.setWhatsThis("") self.groupBox.setTitle("") self.groupBox.setObjectName("groupBox") self.gridLayout_5 = QtWidgets.QGridLayout(self.groupBox) self.gridLayout_5.setObjectName("gridLayout_5") self.toolButton_gear = QtWidgets.QToolButton(self.groupBox) self.toolButton_gear.setObjectName("toolButton_gear") self.gridLayout_5.addWidget(self.toolButton_gear, 1, 2, 1, 1) self.label = QtWidgets.QLabel(self.groupBox) self.label.setToolTipDuration(10000) self.label.setObjectName("label") self.gridLayout_5.addWidget(self.label, 0, 0, 1, 1) self.pushButton_randomize = QtWidgets.QPushButton(self.groupBox) self.pushButton_randomize.setObjectName("pushButton_randomize") self.gridLayout_5.addWidget(self.pushButton_randomize, 2, 1, 1, 1) self.pushButton_imageFolder = QtWidgets.QPushButton(self.groupBox) self.pushButton_imageFolder.setObjectName("pushButton_imageFolder") self.gridLayout_5.addWidget(self.pushButton_imageFolder, 2, 0, 1, 1) self.lineEdit_background = QtWidgets.QLineEdit(self.groupBox) self.lineEdit_background.setObjectName("lineEdit_background") self.gridLayout_5.addWidget(self.lineEdit_background, 0, 1, 1, 1) self.lineEdit_gear = QtWidgets.QLineEdit(self.groupBox) self.lineEdit_gear.setObjectName("lineEdit_gear") self.gridLayout_5.addWidget(self.lineEdit_gear, 1, 1, 1, 1) self.label_2 = QtWidgets.QLabel(self.groupBox) self.label_2.setToolTipDuration(10000) self.label_2.setObjectName("label_2") self.gridLayout_5.addWidget(self.label_2, 1, 0, 1, 1) self.toolButton_background = QtWidgets.QToolButton(self.groupBox) self.toolButton_background.setObjectName("toolButton_background") self.gridLayout_5.addWidget(self.toolButton_background, 0, 2, 1, 1) self.gridLayout_6.addWidget(self.groupBox, 1, 0, 1, 12) self.groupBox_5 = QtWidgets.QGroupBox(Dialog) self.groupBox_5.setObjectName("groupBox_5") self.gridLayout = QtWidgets.QGridLayout(self.groupBox_5) self.gridLayout.setObjectName("gridLayout") self.label_11 = QtWidgets.QLabel(self.groupBox_5) self.label_11.setObjectName("label_11") self.gridLayout.addWidget(self.label_11, 0, 0, 1, 1) self.lineEdit_color_main = QtWidgets.QLineEdit(self.groupBox_5) self.lineEdit_color_main.setObjectName("lineEdit_color_main") self.gridLayout.addWidget(self.lineEdit_color_main, 0, 1, 1, 1) self.toolButton_color_main = QtWidgets.QToolButton(self.groupBox_5) self.toolButton_color_main.setObjectName("toolButton_color_main") self.gridLayout.addWidget(self.toolButton_color_main, 0, 2, 1, 1) self.label_12 = QtWidgets.QLabel(self.groupBox_5) self.label_12.setObjectName("label_12") self.gridLayout.addWidget(self.label_12, 0, 3, 1, 1) self.lineEdit_color_top = QtWidgets.QLineEdit(self.groupBox_5) self.lineEdit_color_top.setObjectName("lineEdit_color_top") self.gridLayout.addWidget(self.lineEdit_color_top, 0, 4, 1, 1) self.toolButton_color_top = QtWidgets.QToolButton(self.groupBox_5) self.toolButton_color_top.setObjectName("toolButton_color_top") self.gridLayout.addWidget(self.toolButton_color_top, 0, 5, 1, 1) self.label_13 = QtWidgets.QLabel(self.groupBox_5) self.label_13.setObjectName("label_13") self.gridLayout.addWidget(self.label_13, 1, 3, 1, 1) self.lineEdit_color_bottom = QtWidgets.QLineEdit(self.groupBox_5) self.lineEdit_color_bottom.setObjectName("lineEdit_color_bottom") self.gridLayout.addWidget(self.lineEdit_color_bottom, 1, 4, 1, 1) self.toolButton_color_bottom = QtWidgets.QToolButton(self.groupBox_5) self.toolButton_color_bottom.setObjectName("toolButton_color_bottom") self.gridLayout.addWidget(self.toolButton_color_bottom, 1, 5, 1, 1) self.gridLayout_6.addWidget(self.groupBox_5, 4, 0, 1, 12) spacerItem = QtWidgets.QSpacerItem( 20, 5, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Fixed) self.gridLayout_6.addItem(spacerItem, 7, 0, 1, 1) self.groupBox_2 = QtWidgets.QGroupBox(Dialog) self.groupBox_2.setTitle("") self.groupBox_2.setObjectName("groupBox_2") self.gridLayout_4 = QtWidgets.QGridLayout(self.groupBox_2) self.gridLayout_4.setObjectName("gridLayout_4") self.checkBox_reviewer = QtWidgets.QCheckBox(self.groupBox_2) self.checkBox_reviewer.setToolTipDuration(10000) self.checkBox_reviewer.setChecked(True) self.checkBox_reviewer.setObjectName("checkBox_reviewer") self.gridLayout_4.addWidget(self.checkBox_reviewer, 0, 0, 1, 1) self.checkBox_toolbar = QtWidgets.QCheckBox(self.groupBox_2) self.checkBox_toolbar.setToolTipDuration(10000) self.checkBox_toolbar.setChecked(True) self.checkBox_toolbar.setObjectName("checkBox_toolbar") self.gridLayout_4.addWidget(self.checkBox_toolbar, 1, 0, 1, 1) self.checkBox_topbottom = QtWidgets.QCheckBox(self.groupBox_2) self.checkBox_topbottom.setToolTipDuration(10000) self.checkBox_topbottom.setChecked(True) self.checkBox_topbottom.setObjectName("checkBox_topbottom") self.gridLayout_4.addWidget(self.checkBox_topbottom, 2, 0, 1, 1) self.gridLayout_6.addWidget(self.groupBox_2, 2, 0, 1, 8) self.OkButton = QtWidgets.QPushButton(Dialog) self.OkButton.setObjectName("OkButton") self.gridLayout_6.addWidget(self.OkButton, 8, 11, 1, 1) spacerItem1 = QtWidgets.QSpacerItem( 20, 5, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Fixed) self.gridLayout_6.addItem(spacerItem1, 5, 0, 1, 1) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setSizeConstraint( QtWidgets.QLayout.SizeConstraint.SetNoConstraint) self.horizontalLayout.setObjectName("horizontalLayout") self.toolButton_palace = QtWidgets.QToolButton(Dialog) icon = QtGui.QIcon() icon.addPixmap( QtGui.QPixmap("CustomBackground:AnkiPalace_no_text.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) self.toolButton_palace.setIcon(icon) self.toolButton_palace.setIconSize(QtCore.QSize(40, 40)) self.toolButton_palace.setObjectName("toolButton_palace") self.horizontalLayout.addWidget(self.toolButton_palace) self.label_3 = QtWidgets.QLabel(Dialog) self.label_3.setMinimumSize(QtCore.QSize(400, 0)) self.label_3.setWordWrap(True) self.label_3.setObjectName("label_3") self.horizontalLayout.addWidget(self.label_3) self.gridLayout_6.addLayout(self.horizontalLayout, 6, 0, 1, 12) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setSizeConstraint( QtWidgets.QLayout.SizeConstraint.SetNoConstraint) self.horizontalLayout_2.setSpacing(6) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.toolButton_website = QtWidgets.QToolButton(Dialog) self.toolButton_website.setMaximumSize(QtCore.QSize(31, 31)) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap("CustomBackground:AnKingSmall.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) self.toolButton_website.setIcon(icon1) self.toolButton_website.setIconSize(QtCore.QSize(31, 31)) self.toolButton_website.setObjectName("toolButton_website") self.horizontalLayout_2.addWidget(self.toolButton_website) self.toolButton_youtube = QtWidgets.QToolButton(Dialog) self.toolButton_youtube.setMaximumSize(QtCore.QSize(31, 31)) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap("CustomBackground:YouTube.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) self.toolButton_youtube.setIcon(icon2) self.toolButton_youtube.setIconSize(QtCore.QSize(31, 31)) self.toolButton_youtube.setObjectName("toolButton_youtube") self.horizontalLayout_2.addWidget(self.toolButton_youtube) self.toolButton_patreon = QtWidgets.QToolButton(Dialog) self.toolButton_patreon.setMaximumSize(QtCore.QSize(171, 26)) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap("CustomBackground:Patreon.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) self.toolButton_patreon.setIcon(icon3) self.toolButton_patreon.setIconSize(QtCore.QSize(200, 31)) self.toolButton_patreon.setObjectName("toolButton_patreon") self.horizontalLayout_2.addWidget(self.toolButton_patreon, 0, QtCore.Qt.AlignHCenter) self.toolButton_instagram = QtWidgets.QToolButton(Dialog) self.toolButton_instagram.setMaximumSize(QtCore.QSize(31, 31)) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap("CustomBackground:Instagram.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) self.toolButton_instagram.setIcon(icon4) self.toolButton_instagram.setIconSize(QtCore.QSize(31, 31)) self.toolButton_instagram.setObjectName("toolButton_instagram") self.horizontalLayout_2.addWidget(self.toolButton_instagram) self.toolButton_facebook = QtWidgets.QToolButton(Dialog) self.toolButton_facebook.setMaximumSize(QtCore.QSize(31, 31)) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap("CustomBackground:Facebook.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) self.toolButton_facebook.setIcon(icon5) self.toolButton_facebook.setIconSize(QtCore.QSize(31, 31)) self.toolButton_facebook.setObjectName("toolButton_facebook") self.horizontalLayout_2.addWidget(self.toolButton_facebook) self.gridLayout_6.addLayout(self.horizontalLayout_2, 0, 2, 1, 9) self.groupBox_5.raise_() self.groupBox_4.raise_() self.groupBox_3.raise_() self.groupBox_2.raise_() self.groupBox.raise_() self.pushButton_videoTutorial.raise_() self.RestoreButton.raise_() self.OkButton.raise_() self.retranslateUi(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
def __init__(self, canvas, parent=None): QtWidgets.QWidget.__init__(self, parent) self.setupUi(self) self.canvas = canvas self.pushButtonAddClass.clicked.connect(self.add_class) self.pushButtonRemoveClass.clicked.connect(self.remove_class) self.pushButtonImport.clicked.connect(self.import_metadata) self.pushButtonSave.clicked.connect(self.save) self.pushButtonLoadPoints.clicked.connect(self.load) self.pushButtonReset.clicked.connect(self.reset) self.pushButtonExport.clicked.connect(self.export) self.pushButtonExport.setIcon(QtGui.QIcon('icons:export.svg')) self.pushButtonReset.setIcon(QtGui.QIcon('icons:reset.svg')) self.pushButtonImport.setIcon(QtGui.QIcon('icons:import.svg')) self.pushButtonSave.setIcon(QtGui.QIcon('icons:save.svg')) self.pushButtonLoadPoints.setIcon(QtGui.QIcon('icons:load.svg')) self.pushButtonRemoveClass.setIcon(QtGui.QIcon('icons:delete.svg')) self.pushButtonAddClass.setIcon(QtGui.QIcon('icons:add.svg')) self.tableWidgetClasses.verticalHeader().setVisible(False) self.tableWidgetClasses.horizontalHeader().setMinimumSectionSize(1) self.tableWidgetClasses.horizontalHeader().setStretchLastSection(False) self.tableWidgetClasses.horizontalHeader().setSectionResizeMode( 0, QtWidgets.QHeaderView.ResizeMode.Stretch) self.tableWidgetClasses.setColumnWidth(1, 30) self.tableWidgetClasses.cellClicked.connect(self.cell_clicked) self.tableWidgetClasses.cellChanged.connect(self.cell_changed) self.tableWidgetClasses.selectionModel().selectionChanged.connect( self.selection_changed) self.checkBoxDisplayPoints.toggled.connect(self.display_points) self.checkBoxDisplayGrid.toggled.connect(self.display_grid) self.canvas.image_loaded.connect(self.image_loaded) self.canvas.update_point_count.connect(self.update_point_count) self.canvas.points_loaded.connect(self.points_loaded) self.canvas.metadata_imported.connect(self.display_count_tree) self.model = QtGui.QStandardItemModel() self.current_model_index = QtCore.QModelIndex() self.treeView.setModel(self.model) self.reset_model() self.treeView.doubleClicked.connect(self.select_model_item) self.previous_file_name = None # used for quick save self.spinBoxPointRadius.valueChanged.connect( self.canvas.set_point_radius) self.spinBoxGrid.valueChanged.connect(self.canvas.set_grid_size) icon = QtGui.QPixmap(20, 20) icon.fill(QtCore.Qt.GlobalColor.yellow) self.labelPointColor.setPixmap(icon) self.labelPointColor.mousePressEvent = self.change_active_point_color icon = QtGui.QPixmap(20, 20) icon.fill(QtCore.Qt.GlobalColor.white) self.labelGridColor.setPixmap(icon) self.labelGridColor.mousePressEvent = self.change_grid_color self.checkBoxImageFields.clicked.connect(self.hide_custom_fields.emit)
def __init__(self, args): super(Application, self).__init__(args) QtWebEngineQuick.initialize() splash = QtWidgets.QSplashScreen( QtGui.QPixmap(resourcePath("vi/ui/res/logo_splash.png")) ) splash.show() if version.SNAPSHOT: QMessageBox.critical( splash, "Snapshot", "This is a snapshot release... Use as you will...." ) def change_splash_text(txt): if len(txt): splash.showMessage( f" {txt} ...", QtCore.Qt.AlignmentFlag.AlignLeft, QtGui.QColor(0x808000), ) # Set up paths chat_log_directory = "" if len(sys.argv) > 1: chat_log_directory = sys.argv[1] if not os.path.exists(chat_log_directory): change_splash_text("Searching for EVE Logs") if sys.platform.startswith("darwin"): chat_log_directory = os.path.join( os.path.expanduser("~"), "Documents", "EVE", "logs", "Chatlogs" ) if not os.path.exists(chat_log_directory): chat_log_directory = os.path.join( os.path.expanduser("~"), "Library", "Application Support", "Eve Online", "p_drive", "User", "My Documents", "EVE", "logs", "Chatlogs", ) elif sys.platform.startswith("linux"): chat_log_directory = os.path.join( os.path.expanduser("~"), "Documents", "EVE", "logs", "Chatlogs" ) elif sys.platform.startswith("win32") or sys.platform.startswith("cygwin"): import ctypes.wintypes buf = ctypes.create_unicode_buffer(ctypes.wintypes.MAX_PATH) ctypes.windll.shell32.SHGetFolderPathW(0, 0x05, 0, 0, buf) documents_path = buf.value chat_log_directory = os.path.join( documents_path, "EVE", "logs", "Chatlogs" ) # Now I need to just make sure... Some old pcs could still be on XP if not os.path.exists(chat_log_directory): chat_log_directory = os.path.join( os.path.expanduser("~"), "My Documents", "EVE", "logs", "Chatlogs", ) if not os.path.exists(chat_log_directory): chat_log_directory = QtWidgets.QFileDialog.getExistingDirectory( None, caption="Select EVE Online chat logfiles directory", directory=chat_log_directory, ) if not os.path.exists(chat_log_directory): # None of the paths for logs exist, bailing out QMessageBox.critical( splash, "No path to Logs", "No logs found at: " + chat_log_directory, QMessageBox.Close, ) sys.exit(1) # Setting local directory for cache and logging change_splash_text("Setting Spyglass Directories") spyglass_dir = os.path.join( os.path.dirname(os.path.dirname(chat_log_directory)), "spyglass" ) if not os.path.exists(spyglass_dir): os.mkdir(spyglass_dir) cache.Cache.PATH_TO_CACHE = os.path.join(spyglass_dir, "cache-2.sqlite3") spyglass_log_directory = os.path.join(spyglass_dir, "logs") if not os.path.exists(spyglass_log_directory): os.mkdir(spyglass_log_directory) change_splash_text("Connecting to Cache") spyglass_cache = Cache() log_level = spyglass_cache.getFromCache("logging_level") if not log_level: log_level = logging.WARN if version.SNAPSHOT: log_level = logging.DEBUG # For Testing BACKGROUND_COLOR = spyglass_cache.getFromCache("background_color") if BACKGROUND_COLOR: self.setStyleSheet(f"background-color: {BACKGROUND_COLOR};") css = Styles().getStyle() self.setStyleSheet(css) del css # Setup logging for console and rotated log files formatter = logging.Formatter( "%(asctime)s| %(message)s", datefmt="%m/%d %I:%M:%S" ) root_logger = logging.getLogger() root_logger.setLevel(level=log_level) log_filename = spyglass_log_directory + "/output.log" file_handler = RotatingFileHandler( maxBytes=(1048576 * 5), backupCount=7, filename=log_filename, mode="a" ) file_handler.setFormatter(formatter) root_logger.addHandler(file_handler) console_handler = StreamHandler() console_handler.setFormatter(formatter) root_logger.addHandler(console_handler) logging.critical("") logging.critical( "------------------- Spyglass %s starting up -------------------", version.VERSION, ) logging.critical("") logging.critical(" Looking for chat logs at: %s", chat_log_directory) logging.critical( " Cache maintained here: %s", cache.Cache.PATH_TO_CACHE ) logging.critical(" Writing logs to: %s", spyglass_log_directory) tray_icon = systemtray.TrayIcon(self) tray_icon.show() self.main_window = viui.MainWindow( chat_log_directory, tray_icon, change_splash_text ) self.main_window.show() self.main_window.raise_()