Beispiel #1
0
 def __init__(self):
     super().__init__()
     self.chunk_directory = Directory(
         "CHUNK", QIcon(Assets.get_asset_path("document_a4_locked.png")),
         None)
     self.mod_directory = Directory(
         "MOD", QIcon(Assets.get_asset_path("document_a4.png")), None)
     self.workspace = Workspace([self.mod_directory, self.chunk_directory],
                                parent=self)
     self.workspace.fileOpened.connect(self.handle_workspace_file_opened)
     self.workspace.fileClosed.connect(self.handle_workspace_file_closed)
     self.workspace.fileActivated.connect(
         self.handle_workspace_file_activated)
     self.workspace.fileLoadError.connect(
         self.handle_workspace_file_load_error)
     self.init_actions()
     self.init_menu_bar()
     self.init_toolbar()
     self.setStatusBar(QStatusBar())
     self.setWindowTitle("MHW-Editor-Suite")
     self.init_file_tree(self.chunk_directory,
                         "Chunk directory",
                         self.open_chunk_directory_action,
                         filtered=True)
     self.init_file_tree(self.mod_directory, "Mod directory",
                         self.open_mod_directory_action)
     self.init_help()
     self.setCentralWidget(self.init_editor_tabs())
     self.load_settings()
Beispiel #2
0
        dialog.setWindowTitle("About MHW Editor Suite")
        layout = QVBoxLayout()
        dialog.setLayout(layout)
        about_text = QLabel(ABOUT_TEXT)
        about_text.setTextFormat(Qt.RichText)
        about_text.setTextInteractionFlags(Qt.TextBrowserInteraction)
        about_text.setOpenExternalLinks(True)
        layout.addWidget(about_text)
        dialog.exec()


if __name__ == '__main__':
    logging.basicConfig(level=logging.DEBUG,
                        format="%(levelname)s %(message)s")
    app = QApplication(sys.argv)
    app.setWindowIcon(QIcon(Assets.get_asset_path("icon32.svg")))
    app.setStyleSheet("""
    QMainWindow::separator:vertical,
    QSplitter::handle:horizontal {
        width: 0px;
        margin: 0 6px;
        max-height: 100px;
        border-left: 1px dotted palette(dark);
        border-right: 1px dotted palette(base);
    }
    QMainWindow::separator:horizontal,
    QSplitter::handle:vertical {
        height: 0px;
        margin: 6px 0;
        border-top: 1px dotted palette(dark);
        border-bottom: 1px dotted palette(base);