Esempio n. 1
0
    def __init__(self, manager, app_preference_widget=None):
        super(KikoExporterDialog, self).__init__()

        self._manager = manager
        facade = self._manager.facade
        self._image_generation = facade.supports_image_generation()

        app_name = facade.get_app_name().capitalize()
        self.setWindowTitle(app_name + ' Kiko Exporter')
        self._layout = create_box_layout(ORIENTATION.VERTICAL)
        self.setLayout(self._layout)

        self._app_preference_widget = app_preference_widget
        if app_preference_widget:
            tab_widget = QtWidgets.QTabWidget(self)
            self._layout.addWidget(tab_widget)
            self._layout.setContentsMargins(0, 0, 0, 0)

            widget = QtWidgets.QWidget(self)
            self._layout = create_box_layout(ORIENTATION.VERTICAL)
            widget.setLayout(self._layout)
            tab_widget.addTab(widget, "Export")

            tab_widget.addTab(app_preference_widget, app_name + " Preferences")

        self.resize(500, 400)

        self._build_widgets()
        self._initialize_widgets()
        self._connect_signals()
Esempio n. 2
0
    def _build_widgets(self):
        self._build_file()

        self._secondary_layout = create_box_layout(ORIENTATION.HORIZONTAL,
                                                   margin=0, spacing=8)
        self._layout.addLayout(self._secondary_layout)
        self._tab_widget = QtWidgets.QTabWidget(self)
        self._secondary_layout.addWidget(self._tab_widget)

        self._build_tab_import()
        self._build_string()
        self._build_preview_and_buttons()
        self._build_mapping()
        self._build_app_preference_widget()