def __init__(self, psd): self.psd = psd self.editor_view = None self.main_window = None resources.qInitResources() self.app = QtGui.QApplication(sys.argv) self.bridge = JsHooks(self.psd, self)
index += 1 self.comic_files_path = list(set(self.comic_files_path)) self.comic_files_path.sort() print(self.comic_files_path) def get_help(self): help_window = HelpWindow(self) help_window.show() def execute(self): # name = self.output_name.text() if os.name == 'nt': path = QFileDialog.getSaveFileUrl( self, "请保存文件", os.path.join(os.path.expanduser('~'), "Desktop"), "pdf files(*.pdf)") # type: (QUrl, str) else: path = QFileDialog.getSaveFileUrl( self, "请保存文件", '/', "pdf files(*.pdf)") # type: (QUrl, str) name = path[0].url() logic.thread_it(logic.rea, self.comic_files_path, name, self.log_box) if __name__ == '__main__': import resources resources.qInitResources() app = QApplication(sys.argv) app.setStyleSheet(Const.QSS) root = RootWindows() root.show() sys.exit(app.exec())
self.print_line(result, operation_no, _type="out") return self.clear_input() def set_input_color(self, *color): assert isinstance(color, (tuple, list)) and len(color) == 3 self._input.setStyleSheet(""" border-color: rgb(18, 18, 18); color: {}; font: bold "Times New Roman"; """.format(QtGui.QColor(*color).name())) def text_changed(self, text): if text.startswith(SetInterpreter.COMMENT_SYMBOL): self.set_input_color(122, 122, 122) elif text.startswith(SetInterpreter.PRINT_SYMBOL): self.set_input_color(87, 173, 104) else: self.set_input_color(27, 121, 173) if __name__ == '__main__': qInitResources() app = QtWidgets.QApplication(sys.argv) ui = InterpreterUI() ui.show() sys.exit(app.exec_())
def __init__(self, psd, psd_gui): QObject.__init__(self) self.psd_project = psd.psd_project self.visualizer = self.psd_project.visualizer self.psd_gui = psd_gui resources.qInitResources()
import platform import traceback from datetime import datetime as dt from PySide.QtCore import Qt, Slot, Signal, QSettings, QDir, QThread, QTimer from PySide.QtGui import ( QMainWindow, QApplication, QMessageBox, QIcon, QSystemTrayIcon, QPixmap) import resources from sync import Sync from views import SyncView, LoginView, View from localsettings import get_settings, SettingsKeys resources.qInitResources() class SyncWindow(QMainWindow): """ Application main window. This class is meant to handle every widget needed by the application, as well as other needed global objects and behavior. """ failedLogIn = Signal() syncStarted = Signal() loginRequested = Signal((str, str,)) statusChanged = Signal((str, str, int,)) def __init__(self, parent=None):