Exemplo n.º 1
0
def main():
	app = QtWidgets.QApplication(sys.argv)
	# set stylesheet

	# compile style sheet
	# arguments are a stylesheet file (using scss for syntax highlighting in sublime), second argument is the variables file
	app.setStyleSheet(sqss_compiler.compile('TBA_stylesheet.scss', 'variables.scss'))

	# with open(stylesheet,"r") as fh:
	#     app.setStyleSheet(fh.read())

	tba = exporter()

	sys.exit(app.exec_())
Exemplo n.º 2
0
def run_standalone():
    app = QtWidgets.QApplication(sys.argv)

    module_path = os.path.dirname(os.path.abspath(__file__))

    app.setStyleSheet(sqss_compiler.compile(
        os.path.join(module_path,'TBA_stylesheet.scss'),
        os.path.join(module_path,'variables.scss'),
    ))

    tba_io_object_list = TBA_IO_object_list()

    tba_io_object_list.show()  # Show the UI
    sys.exit(app.exec_())
Exemplo n.º 3
0
def run_standalone():
    print('TBA :: Run Standalone')
    app = QtWidgets.QApplication(sys.argv)

    module_path = os.path.dirname(os.path.abspath(__file__))

    app.setStyleSheet(
        sqss_compiler.compile(
            os.path.join(module_path, 'TBA_stylesheet.scss'),
            os.path.join(module_path, 'variables.scss'),
        ))

    tba_exporter = TBAAssetExporter()

    tba_exporter.show()  # Show the UI
    sys.exit(app.exec_())
Exemplo n.º 4
0
def run_standalone():
    app = QtWidgets.QApplication(sys.argv)

    module_path = os.path.dirname(os.path.abspath(__file__))

    app.setStyleSheet(
        sqss_compiler.compile(
            os.path.join(module_path, 'TBA_stylesheet.scss'),
            os.path.join(module_path, 'variables.scss'),
        ))

    my_dialog = ChipsAutocomplete()
    my_dialog.addItems(
        ['apple', 'lemon', 'orange', 'mango', 'papaya', 'strawberry'])

    my_dialog.show()  # Show the UI
    sys.exit(app.exec_())
Exemplo n.º 5
0
    def show_dialog(cls):
        if not cls.dlg_instance:
            cls.dlg_instance = TBA_IO_exporter(maya_main_window())

            module_path = os.path.dirname(os.path.abspath(__file__))

            cls.dlg_instance.setStyleSheet(
                sqss_compiler.compile(
                    os.path.join(module_path, 'TBA_stylesheet.scss'),
                    os.path.join(module_path, 'variables.scss'),
                ))

        if cls.dlg_instance.isHidden():
            cls.dlg_instance.show()
        else:
            cls.dlg_instance.raise_()
            cls.dlg_instance.activateWindow()
Exemplo n.º 6
0
    def __init__(self, exportResults, parent=None):
        super(TBAExportResultsDialog, self).__init__(parent)

        module_path = os.path.dirname(os.path.abspath(__file__))

        self.setStyleSheet(
            sqss_compiler.compile(
                os.path.join(module_path, 'TBA_stylesheet.scss'),
                os.path.join(module_path, 'variables.scss'),
            ))

        self.exportResults = exportResults
        self.platform = sys.platform

        self.setWindowTitle("Custom Dialog")
        self.setWindowFlags(self.windowFlags()
                            ^ QtCore.Qt.WindowContextHelpButtonHint)

        self.create_widgets()
        self.create_layout()
        self.create_connections()
Exemplo n.º 7
0
    def open_file_dialog(self):
        self.file_dialog = QtWidgets.QFileDialog()
        self.file_dialog.setFileMode(QtWidgets.QFileDialog.DirectoryOnly)

        if self.file_dialog.exec_():
            initial_path = "S:/"
            path = QtWidgets.QFileDialog().getExistingDirectory(self, "Choose Existing Job", initial_path, QtWidgets.QFileDialog.DirectoryOnly)
            # path = self.file_dialog.getExistingDirectory(self, "Choose Existing Job", initial_path, QtWidgets.QFileDialog.DirectoryOnly)

            self.parse_job(path)
        # self.file_dialog.setFilter("Text files (*.txt)")

    def parse_job(self, path):
        print(path)

if __name__ == "__main__":
    app = QtWidgets.QApplication(sys.argv)

    module_path = os.path.dirname(os.path.abspath(__file__))

    app.setStyleSheet(sqss_compiler.compile(
        os.path.join(module_path,'TBA_stylesheet.scss'),
        os.path.join(module_path,'variables.scss'),
    ))

    tba_job_builder = TBA_job_builder()

    tba_job_builder.show()  # Show the UI
    sys.exit(app.exec_())