def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.environment_is_valid = True

        self.setTitle(title_prefix + 'Arguments and Environment')

        self.tree_environment.setColumnWidth(0, 150)
        self.check_show_environment.stateChanged.connect(self.update_ui_state)
        self.tree_environment.itemChanged.connect(self.check_environment)

        self.argument_list_editor = ListWidgetEditor(self.label_arguments,
                                                     self.list_arguments,
                                                     self.label_arguments_help,
                                                     self.button_add_argument,
                                                     self.button_remove_argument,
                                                     self.button_edit_argument,
                                                     self.button_up_argument,
                                                     self.button_down_argument,
                                                     '<new argument {0}>')

        self.environment_list_editor = TreeWidgetEditor(self.label_environment,
                                                        self.tree_environment,
                                                        self.label_environment_help,
                                                        self.button_add_environment_variable,
                                                        self.button_remove_environment_variable,
                                                        self.button_edit_environment_variable,
                                                        self.button_up_environment_variable,
                                                        self.button_down_environment_variable,
                                                        ['<new name {0}>', '<new value {0}>'])
Exemple #2
0
    def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.setTitle(title_prefix + 'Stdio Redirection')

        self.registerField('stdin_redirection', self.combo_stdin_redirection)
        self.registerField('stdin_file', self.combo_stdin_file, 'currentText')
        self.registerField('stdout_redirection', self.combo_stdout_redirection)
        self.registerField('stdout_file', self.edit_stdout_file)
        self.registerField('stderr_redirection', self.combo_stderr_redirection)
        self.registerField('stderr_file', self.edit_stderr_file)

        self.combo_stdin_redirection.currentIndexChanged.connect(
            self.update_ui_state)
        self.combo_stdin_redirection.currentIndexChanged.connect(
            self.emit_complete_changed)
        self.combo_stdout_redirection.currentIndexChanged.connect(
            self.update_ui_state)
        self.combo_stdout_redirection.currentIndexChanged.connect(
            self.emit_complete_changed)
        self.combo_stderr_redirection.currentIndexChanged.connect(
            self.update_ui_state)
        self.combo_stderr_redirection.currentIndexChanged.connect(
            self.emit_complete_changed)

        self.combo_stdin_file_checker = MandatoryEditableComboBoxChecker(
            self, self.label_stdin_file, self.combo_stdin_file)
        self.edit_stdout_file_checker = MandatoryLineEditChecker(
            self, self.label_stdout_file, self.edit_stdout_file)
        self.edit_stderr_file_checker = MandatoryLineEditChecker(
            self, self.label_stderr_file, self.edit_stderr_file)
Exemple #3
0
    def isComplete(self):
        executable = self.get_executable()
        start_mode = self.get_field('python.start_mode')

        # In web interface mode there is nothing to configure at all
        if start_mode == Constants.PYTHON_START_MODE_WEB_INTERFACE:
            return ProgramPage.isComplete(self)

        if len(executable) == 0:
            return False

        if start_mode == Constants.PYTHON_START_MODE_SCRIPT_FILE and \
           not self.combo_script_file_selector.complete:
            return False

        if start_mode == Constants.PYTHON_START_MODE_MODULE_NAME and \
           not self.edit_module_name_checker.complete:
            return False

        if start_mode == Constants.PYTHON_START_MODE_COMMAND and \
           not self.edit_command_checker.complete:
            return False

        return self.combo_working_directory_selector.complete and ProgramPage.isComplete(
            self)
    def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.environment_is_valid = True

        self.setTitle(title_prefix + 'Arguments and Environment')

        self.tree_environment.setColumnWidth(0, 150)
        self.check_show_environment.stateChanged.connect(self.update_ui_state)
        self.tree_environment.itemChanged.connect(self.check_environment)

        self.argument_list_editor = ListWidgetEditor(
            self.label_arguments, self.list_arguments,
            self.label_arguments_help, self.button_add_argument,
            self.button_remove_argument, self.button_edit_argument,
            self.button_up_argument, self.button_down_argument,
            '<new argument {0}>')

        self.environment_list_editor = TreeWidgetEditor(
            self.label_environment, self.tree_environment,
            self.label_environment_help, self.button_add_environment_variable,
            self.button_remove_environment_variable,
            self.button_edit_environment_variable,
            self.button_up_environment_variable,
            self.button_down_environment_variable,
            ['<new name {0}>', '<new value {0}>'])
    def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.edit_mode            = False
        self.identifier_is_unique = False

        self.setTitle(title_prefix + 'General Information')
        self.setSubTitle('Specify name, identifier, programming language and description for the program.')

        self.edit_identifier.setValidator(QRegExpValidator(QRegExp('^[a-zA-Z0-9_][a-zA-Z0-9._-]{2,}$'), self))
        self.combo_language.insertSeparator(Constants.LANGUAGE_SEPARATOR)

        self.registerField('name', self.edit_name)
        self.registerField('identifier', self.edit_identifier)
        self.registerField('language', self.combo_language)
        self.registerField('description', self.text_description, 'plainText', self.text_description.textChanged)

        self.edit_name.textChanged.connect(self.auto_generate_identifier)
        self.check_auto_generate.stateChanged.connect(self.update_ui_state)
        self.edit_identifier.textChanged.connect(self.check_identifier)
        self.combo_language.currentIndexChanged.connect(self.update_ui_state)
        self.combo_language.currentIndexChanged.connect(self.check_language)

        self.edit_name_checker       = MandatoryLineEditChecker(self, self.label_name, self.edit_name)
        self.edit_identifier_checker = MandatoryLineEditChecker(self, self.label_identifier, self.edit_identifier)

        self.check_language(self.combo_language.currentIndex())
    def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.language = Constants.LANGUAGE_CSHARP

        self.setTitle('{0}{1} Configuration'.format(
            title_prefix, Constants.language_display_names[self.language]))

        self.registerField('csharp.version', self.combo_version)
        self.registerField('csharp.start_mode', self.combo_start_mode)
        self.registerField('csharp.executable', self.combo_executable,
                           'currentText')
        self.registerField('csharp.working_directory',
                           self.combo_working_directory, 'currentText')

        self.combo_start_mode.currentIndexChanged.connect(self.update_ui_state)
        self.combo_start_mode.currentIndexChanged.connect(
            self.completeChanged.emit)
        self.check_show_advanced_options.stateChanged.connect(
            self.update_ui_state)
        self.label_spacer.setText('')

        self.combo_executable_selector = MandatoryTypedFileSelector(
            self, self.label_executable, self.combo_executable,
            self.label_executable_type, self.combo_executable_type,
            self.label_executable_help)
        self.combo_working_directory_selector = MandatoryDirectorySelector(
            self, self.label_working_directory, self.combo_working_directory)
        self.option_list_editor = ListWidgetEditor(
            self.label_options, self.list_options, self.label_options_help,
            self.button_add_option, self.button_remove_option,
            self.button_edit_option, self.button_up_option,
            self.button_down_option, '<new Mono option {0}>')
Exemple #7
0
    def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.language              = Constants.LANGUAGE_JAVA
        self.bin_directory         = '/tmp'
        self.class_path_candidates = []

        self.setTitle('{0}{1} Configuration'.format(title_prefix, Constants.language_display_names[self.language]))

        self.registerField('java.version', self.combo_version)
        self.registerField('java.start_mode', self.combo_start_mode)
        self.registerField('java.main_class', self.combo_main_class, 'currentText')
        self.registerField('java.jar_file', self.combo_jar_file, 'currentText')
        self.registerField('java.working_directory', self.combo_working_directory, 'currentText')

        self.combo_start_mode.currentIndexChanged.connect(self.update_ui_state)
        self.combo_start_mode.currentIndexChanged.connect(self.completeChanged.emit)
        self.check_show_class_path.stateChanged.connect(self.update_ui_state)
        self.button_add_class_path_entry.clicked.connect(self.add_class_path_entry)
        self.check_show_advanced_options.stateChanged.connect(self.update_ui_state)
        self.label_main_class_error.setVisible(False)
        self.label_spacer.setText('')

        self.combo_main_class_checker         = MandatoryEditableComboBoxChecker(self,
                                                                                 self.label_main_class,
                                                                                 self.combo_main_class)
        self.combo_jar_file_selector          = MandatoryTypedFileSelector(self,
                                                                           self.label_jar_file,
                                                                           self.combo_jar_file,
                                                                           self.label_jar_file_type,
                                                                           self.combo_jar_file_type,
                                                                           self.label_jar_file_help)
        self.combo_working_directory_selector = MandatoryDirectorySelector(self,
                                                                           self.label_working_directory,
                                                                           self.combo_working_directory)
        self.class_path_list_editor           = ListWidgetEditor(self.label_class_path,
                                                                 self.list_class_path,
                                                                 self.label_class_path_help,
                                                                 None,
                                                                 self.button_remove_class_path_entry,
                                                                 self.button_edit_class_path_entry,
                                                                 self.button_up_class_path_entry,
                                                                 self.button_down_class_path_entry,
                                                                 '<new class path entry {0}>')
        self.option_list_editor               = ListWidgetEditor(self.label_options,
                                                                 self.list_options,
                                                                 self.label_options_help,
                                                                 self.button_add_option,
                                                                 self.button_remove_option,
                                                                 self.button_edit_option,
                                                                 self.button_up_option,
                                                                 self.button_down_option,
                                                                 '<new JVM option {0}>')
    def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.language              = Constants.LANGUAGE_JAVA
        self.bin_directory         = '/tmp'
        self.class_path_candidates = []

        self.setTitle('{0}{1} Configuration'.format(title_prefix, Constants.language_display_names[self.language]))

        self.registerField('java.version', self.combo_version)
        self.registerField('java.start_mode', self.combo_start_mode)
        self.registerField('java.main_class', self.combo_main_class, 'currentText')
        self.registerField('java.jar_file', self.combo_jar_file, 'currentText')
        self.registerField('java.working_directory', self.combo_working_directory, 'currentText')

        self.combo_start_mode.currentIndexChanged.connect(self.update_ui_state)
        self.combo_start_mode.currentIndexChanged.connect(self.completeChanged.emit)
        self.check_show_class_path.stateChanged.connect(self.update_ui_state)
        self.button_add_class_path_entry.clicked.connect(self.add_class_path_entry)
        self.check_show_advanced_options.stateChanged.connect(self.update_ui_state)
        self.label_main_class_error.setVisible(False)
        self.label_spacer.setText('')

        self.combo_main_class_checker         = MandatoryEditableComboBoxChecker(self,
                                                                                 self.label_main_class,
                                                                                 self.combo_main_class)
        self.combo_jar_file_selector          = MandatoryTypedFileSelector(self,
                                                                           self.label_jar_file,
                                                                           self.combo_jar_file,
                                                                           self.label_jar_file_type,
                                                                           self.combo_jar_file_type,
                                                                           self.label_jar_file_help)
        self.combo_working_directory_selector = MandatoryDirectorySelector(self,
                                                                           self.label_working_directory,
                                                                           self.combo_working_directory)
        self.class_path_list_editor           = ListWidgetEditor(self.label_class_path,
                                                                 self.list_class_path,
                                                                 self.label_class_path_help,
                                                                 None,
                                                                 self.button_remove_class_path_entry,
                                                                 self.button_edit_class_path_entry,
                                                                 self.button_up_class_path_entry,
                                                                 self.button_down_class_path_entry,
                                                                 '<new class path entry {0}>')
        self.option_list_editor               = ListWidgetEditor(self.label_options,
                                                                 self.list_options,
                                                                 self.label_options_help,
                                                                 self.button_add_option,
                                                                 self.button_remove_option,
                                                                 self.button_edit_option,
                                                                 self.button_up_option,
                                                                 self.button_down_option,
                                                                 '<new JVM option {0}>')
Exemple #9
0
    def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.language = Constants.LANGUAGE_DELPHI
        self.edit_mode = False
        self.build_system_fpcmake_help_template = self.label_build_system_fpcmake_help.text(
        )
        self.build_system_lazbuild_help_template = self.label_build_system_lazbuild_help.text(
        )
        self.lazbuild_available = False

        self.setTitle('{0}{1} Configuration'.format(
            title_prefix, Constants.language_display_names[self.language]))

        self.registerField('delphi.start_mode', self.combo_start_mode)
        self.registerField('delphi.executable', self.edit_executable)
        self.registerField('delphi.compile_from_source',
                           self.check_compile_from_source)
        self.registerField('delphi.build_system', self.combo_build_system)
        self.registerField('delphi.working_directory',
                           self.combo_working_directory, 'currentText')

        self.combo_start_mode.currentIndexChanged.connect(self.update_ui_state)
        self.combo_start_mode.currentIndexChanged.connect(
            self.completeChanged.emit)
        self.check_compile_from_source.stateChanged.connect(
            self.update_ui_state)
        self.combo_build_system.currentIndexChanged.connect(
            self.update_ui_state)
        self.combo_build_system.currentIndexChanged.connect(
            self.check_build_system)
        self.check_show_advanced_options.stateChanged.connect(
            self.update_ui_state)
        self.label_spacer.setText('')

        self.edit_executable_checker = MandatoryLineEditChecker(
            self, self.label_executable, self.edit_executable)
        self.combo_working_directory_selector = MandatoryDirectorySelector(
            self, self.label_working_directory, self.combo_working_directory)
        self.make_option_list_editor = ListWidgetEditor(
            self.label_make_options, self.list_make_options,
            self.label_make_options_help, self.button_add_make_option,
            self.button_remove_make_option, self.button_edit_make_option,
            self.button_up_make_option, self.button_down_make_option,
            '<new Make option {0}>')
        self.lazbuild_option_list_editor = ListWidgetEditor(
            self.label_lazbuild_options, self.list_lazbuild_options,
            self.label_lazbuild_options_help, self.button_add_lazbuild_option,
            self.button_remove_lazbuild_option,
            self.button_edit_lazbuild_option, self.button_up_lazbuild_option,
            self.button_down_lazbuild_option, '<new Lazbuild option {0}>')
    def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.language                            = Constants.LANGUAGE_DELPHI
        self.edit_mode                           = False
        self.build_system_fpcmake_help_template  = self.label_build_system_fpcmake_help.text()
        self.build_system_lazbuild_help_template = self.label_build_system_lazbuild_help.text()
        self.lazbuild_available                  = False

        self.setTitle('{0}{1} Configuration'.format(title_prefix, Constants.language_display_names[self.language]))

        self.registerField('delphi.start_mode', self.combo_start_mode)
        self.registerField('delphi.executable', self.edit_executable)
        self.registerField('delphi.compile_from_source', self.check_compile_from_source)
        self.registerField('delphi.build_system', self.combo_build_system)
        self.registerField('delphi.working_directory', self.combo_working_directory, 'currentText')

        self.combo_start_mode.currentIndexChanged.connect(self.update_ui_state)
        self.combo_start_mode.currentIndexChanged.connect(self.completeChanged.emit)
        self.check_compile_from_source.stateChanged.connect(self.update_ui_state)
        self.combo_build_system.currentIndexChanged.connect(self.update_ui_state)
        self.combo_build_system.currentIndexChanged.connect(self.check_build_system)
        self.check_show_advanced_options.stateChanged.connect(self.update_ui_state)
        self.label_spacer.setText('')

        self.edit_executable_checker          = MandatoryLineEditChecker(self,
                                                                         self.label_executable,
                                                                         self.edit_executable)
        self.combo_working_directory_selector = MandatoryDirectorySelector(self,
                                                                           self.label_working_directory,
                                                                           self.combo_working_directory)
        self.make_option_list_editor          = ListWidgetEditor(self.label_make_options,
                                                                 self.list_make_options,
                                                                 self.label_make_options_help,
                                                                 self.button_add_make_option,
                                                                 self.button_remove_make_option,
                                                                 self.button_edit_make_option,
                                                                 self.button_up_make_option,
                                                                 self.button_down_make_option,
                                                                 '<new Make option {0}>')
        self.lazbuild_option_list_editor      = ListWidgetEditor(self.label_lazbuild_options,
                                                                 self.list_lazbuild_options,
                                                                 self.label_lazbuild_options_help,
                                                                 self.button_add_lazbuild_option,
                                                                 self.button_remove_lazbuild_option,
                                                                 self.button_edit_lazbuild_option,
                                                                 self.button_up_lazbuild_option,
                                                                 self.button_down_lazbuild_option,
                                                                 '<new Lazbuild option {0}>')
    def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.language     = Constants.LANGUAGE_PYTHON
        self.url_template = self.label_url.text()

        self.setTitle('{0}{1} Configuration'.format(title_prefix, Constants.language_display_names[self.language]))

        self.registerField('python.version', self.combo_version)
        self.registerField('python.start_mode', self.combo_start_mode)
        self.registerField('python.script_file', self.combo_script_file, 'currentText')
        self.registerField('python.module_name', self.edit_module_name)
        self.registerField('python.command', self.edit_command)
        self.registerField('python.working_directory', self.combo_working_directory, 'currentText')

        self.combo_start_mode.currentIndexChanged.connect(self.update_ui_state)
        self.combo_start_mode.currentIndexChanged.connect(self.completeChanged.emit)
        self.check_show_advanced_options.stateChanged.connect(self.update_ui_state)
        self.label_spacer.setText('')

        self.combo_script_file_selector       = MandatoryTypedFileSelector(self,
                                                                           self.label_script_file,
                                                                           self.combo_script_file,
                                                                           self.label_script_file_type,
                                                                           self.combo_script_file_type,
                                                                           self.label_script_file_help)
        self.edit_module_name_checker         = MandatoryLineEditChecker(self,
                                                                         self.label_module_name,
                                                                         self.edit_module_name)
        self.edit_command_checker             = MandatoryLineEditChecker(self,
                                                                         self.label_command,
                                                                         self.edit_command)
        self.combo_working_directory_selector = MandatoryDirectorySelector(self,
                                                                           self.label_working_directory,
                                                                           self.combo_working_directory)
        self.option_list_editor               = ListWidgetEditor(self.label_options,
                                                                 self.list_options,
                                                                 self.label_options_help,
                                                                 self.button_add_option,
                                                                 self.button_remove_option,
                                                                 self.button_edit_option,
                                                                 self.button_up_option,
                                                                 self.button_down_option,
                                                                 '<new Python option {0}>')
Exemple #12
0
    def isComplete(self):
        start_mode = self.get_field('start_mode')

        if start_mode == Constants.START_MODE_CRON and \
           not self.edit_start_fields_checker.complete:
            return False

        return ProgramPage.isComplete(self)
    def isComplete(self):
        executable = self.get_executable()
        start_mode = self.get_field("php.start_mode")

        # In web interface mode there is nothing to configure at all
        if start_mode == Constants.PYTHON_START_MODE_WEB_INTERFACE:
            return ProgramPage.isComplete(self)

        if len(executable) == 0:
            return False

        if start_mode == Constants.PHP_START_MODE_SCRIPT_FILE and not self.combo_script_file_selector.complete:
            return False

        if start_mode == Constants.PHP_START_MODE_COMMAND and not self.edit_command_checker.complete:
            return False

        return self.combo_working_directory_selector.complete and ProgramPage.isComplete(self)
    def __init__(self, title_prefix=""):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.language = Constants.LANGUAGE_PHP
        self.url_template = self.label_url.text()

        self.setTitle("{0}{1} Configuration".format(title_prefix, Constants.language_display_names[self.language]))

        self.registerField("php.version", self.combo_version)
        self.registerField("php.start_mode", self.combo_start_mode)
        self.registerField("php.script_file", self.combo_script_file, "currentText")
        self.registerField("php.command", self.edit_command)
        self.registerField("php.working_directory", self.combo_working_directory, "currentText")

        self.combo_start_mode.currentIndexChanged.connect(self.update_ui_state)
        self.combo_start_mode.currentIndexChanged.connect(self.completeChanged.emit)
        self.check_show_advanced_options.stateChanged.connect(self.update_ui_state)
        self.label_spacer.setText("")

        self.combo_script_file_selector = MandatoryTypedFileSelector(
            self,
            self.label_script_file,
            self.combo_script_file,
            self.label_script_file_type,
            self.combo_script_file_type,
            self.label_script_file_help,
        )
        self.edit_command_checker = MandatoryLineEditChecker(self, self.label_command, self.edit_command)
        self.combo_working_directory_selector = MandatoryDirectorySelector(
            self, self.label_working_directory, self.combo_working_directory
        )
        self.option_list_editor = ListWidgetEditor(
            self.label_options,
            self.list_options,
            self.label_options_help,
            self.button_add_option,
            self.button_remove_option,
            self.button_edit_option,
            self.button_up_option,
            self.button_down_option,
            "<new PHP option {0}>",
        )
    def __init__(self,
                 download_kind,
                 download_directory,
                 downloads,
                 title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.download_kind = download_kind  # 'logs' or 'files'
        self.download_directory = download_directory  # absolute path on host in host format
        self.conflict_resolution_in_progress = False
        self.auto_conflict_resolution = None
        self.download_successful = False
        self.root_directory = None
        self.remaining_downloads = downloads
        self.download = None
        self.created_directories = set()
        self.target_path = None  # abolsute path on host in host format
        self.chunked_downloader = None
        self.replace_help_template = self.label_replace_help.text()
        self.canceled = False

        self.setTitle(title_prefix + 'Download')

        self.progress_file.setVisible(False)

        self.check_rename_new_file.stateChanged.connect(self.update_ui_state)
        self.edit_new_name.textChanged.connect(self.check_new_name)
        self.button_reset_new_name.clicked.connect(self.reset_new_name)
        self.button_replace.clicked.connect(self.resolve_conflict_by_replace)
        self.button_rename.clicked.connect(self.resolve_conflict_by_rename)
        self.button_skip.clicked.connect(self.skip_conflict)
        self.button_start_download.clicked.connect(self.start_download)

        self.label_replace_icon.clear()
        self.label_replace_icon.setPixmap(load_pixmap('warning-icon.png'))

        self.edit_new_name_checker = MandatoryLineEditChecker(
            self, self.label_new_name, self.edit_new_name)

        self.log(u'Going to download {0} to {1}'.format(
            self.download_kind, self.download_directory))
        self.edit_log.moveCursor(QTextCursor.StartOfLine)
Exemple #16
0
    def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.interval_help_template = self.label_start_mode_interval_help.text()

        self.setTitle(title_prefix + 'Schedule')

        self.registerField('start_mode', self.combo_start_mode)
        self.registerField('continue_after_error', self.check_continue_after_error)
        self.registerField('start_interval', self.spin_start_interval)
        self.registerField('start_fields', self.edit_start_fields)

        self.combo_start_mode.currentIndexChanged.connect(self.update_ui_state)
        self.spin_start_interval.valueChanged.connect(self.update_interval_help)

        self.edit_start_fields_checker = MandatoryLineEditChecker(self, self.label_start_fields, self.edit_start_fields,
                                                                  r'^ *(@\S+|\S+ +\S+ +\S+ +\S+ +\S+) *$')
Exemple #17
0
    def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.language = Constants.LANGUAGE_PYTHON
        self.url_template = self.label_url.text()

        self.setTitle('{0}{1} Configuration'.format(
            title_prefix, Constants.language_display_names[self.language]))

        self.registerField('python.version', self.combo_version)
        self.registerField('python.start_mode', self.combo_start_mode)
        self.registerField('python.script_file', self.combo_script_file,
                           'currentText')
        self.registerField('python.module_name', self.edit_module_name)
        self.registerField('python.command', self.edit_command)
        self.registerField('python.working_directory',
                           self.combo_working_directory, 'currentText')

        self.combo_start_mode.currentIndexChanged.connect(self.update_ui_state)
        self.combo_start_mode.currentIndexChanged.connect(
            self.completeChanged.emit)
        self.check_show_advanced_options.stateChanged.connect(
            self.update_ui_state)
        self.label_spacer.setText('')

        self.combo_script_file_selector = MandatoryTypedFileSelector(
            self, self.label_script_file, self.combo_script_file,
            self.label_script_file_type, self.combo_script_file_type,
            self.label_script_file_help)
        self.edit_module_name_checker = MandatoryLineEditChecker(
            self, self.label_module_name, self.edit_module_name)
        self.edit_command_checker = MandatoryLineEditChecker(
            self, self.label_command, self.edit_command)
        self.combo_working_directory_selector = MandatoryDirectorySelector(
            self, self.label_working_directory, self.combo_working_directory)
        self.option_list_editor = ListWidgetEditor(
            self.label_options, self.list_options, self.label_options_help,
            self.button_add_option, self.button_remove_option,
            self.button_edit_option, self.button_up_option,
            self.button_down_option, '<new Python option {0}>')
    def isComplete(self):
        executable = self.get_executable()
        start_mode = self.get_field("vbnet.start_mode")

        if len(executable) == 0:
            return False

        if start_mode == Constants.VBNET_START_MODE_EXECUTABLE and not self.combo_executable_selector.complete:
            return False

        return self.combo_working_directory_selector.complete and ProgramPage.isComplete(self)
    def __init__(self, title_prefix='', last_directory=None):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.edit_mode   = False
        self.folder_icon = QIcon(load_pixmap('folder-icon.png'))
        self.file_icon   = QIcon(load_pixmap('file-icon.png'))

        if last_directory != None:
            self.last_directory = last_directory
        else:
            self.last_directory = get_home_path()

        self.setTitle(title_prefix + 'Files')

        self.list_files.itemSelectionChanged.connect(self.update_ui_state)
        self.button_add_files.clicked.connect(self.show_add_files_dialog)
        self.button_add_directory.clicked.connect(self.show_add_directory_dialog)
        self.button_remove_selected_files.clicked.connect(self.remove_selected_files)
    def __init__(self, title_prefix=""):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.language = Constants.LANGUAGE_VBNET

        self.setTitle("{0}{1} Configuration".format(title_prefix, Constants.language_display_names[self.language]))

        self.registerField("vbnet.version", self.combo_version)
        self.registerField("vbnet.start_mode", self.combo_start_mode)
        self.registerField("vbnet.executable", self.combo_executable, "currentText")
        self.registerField("vbnet.working_directory", self.combo_working_directory, "currentText")

        self.combo_start_mode.currentIndexChanged.connect(self.update_ui_state)
        self.combo_start_mode.currentIndexChanged.connect(self.completeChanged.emit)
        self.check_show_advanced_options.stateChanged.connect(self.update_ui_state)
        self.label_spacer.setText("")

        self.combo_executable_selector = MandatoryTypedFileSelector(
            self,
            self.label_executable,
            self.combo_executable,
            self.label_executable_type,
            self.combo_executable_type,
            self.label_executable_help,
        )
        self.combo_working_directory_selector = MandatoryDirectorySelector(
            self, self.label_working_directory, self.combo_working_directory
        )
        self.option_list_editor = ListWidgetEditor(
            self.label_options,
            self.list_options,
            self.label_options_help,
            self.button_add_option,
            self.button_remove_option,
            self.button_edit_option,
            self.button_up_option,
            self.button_down_option,
            "<new Mono option {0}>",
        )
    def isComplete(self):
        executable = self.get_executable()
        start_mode = self.get_field('octave.start_mode')

        if len(executable) == 0:
            return False

        if start_mode == Constants.OCTAVE_START_MODE_SCRIPT_FILE and \
           not self.combo_script_file_selector.complete:
            return False

        return self.combo_working_directory_selector.complete and ProgramPage.isComplete(self)
Exemple #22
0
    def isComplete(self):
        executable = self.get_executable()
        start_mode = self.get_field('octave.start_mode')

        if len(executable) == 0:
            return False

        if start_mode == Constants.OCTAVE_START_MODE_SCRIPT_FILE and \
           not self.combo_script_file_selector.complete:
            return False

        return self.combo_working_directory_selector.complete and ProgramPage.isComplete(self)
    def isComplete(self):
        if not self.edit_executable_checker.complete:
            return False

        if not self.lazbuild_available and \
           self.get_field('delphi.build_system') == Constants.DELPHI_BUILD_SYSTEM_LAZBUILD:
            return False

        if not self.combo_working_directory_selector.complete:
            return False

        return ProgramPage.isComplete(self)
    def isComplete(self):
        if not self.edit_executable_checker.complete:
            return False

        if not self.lazbuild_available and \
           self.get_field('delphi.build_system') == Constants.DELPHI_BUILD_SYSTEM_LAZBUILD:
            return False

        if not self.combo_working_directory_selector.complete:
            return False

        return ProgramPage.isComplete(self)
Exemple #25
0
    def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.edit_mode = False
        self.conflict_resolution_in_progress = False
        self.auto_conflict_resolution = None
        self.upload_successful = False
        self.language_api_name = None
        self.program = None
        self.program_defined = False
        self.root_directory = None
        self.remaining_uploads = None
        self.upload = None
        self.command = None
        self.created_directories = set()
        self.target_path = None  # abolsute path on RED Brick in POSIX format
        self.chunked_uploader = None
        self.replace_help_template = self.label_replace_help.text()
        self.warnings = 0
        self.canceled = False

        self.setTitle(title_prefix + 'Upload')

        self.progress_file.setVisible(False)

        self.check_rename_new_file.stateChanged.connect(self.update_ui_state)
        self.edit_new_name.textChanged.connect(self.check_new_name)
        self.button_reset_new_name.clicked.connect(self.reset_new_name)
        self.button_replace.clicked.connect(self.resolve_conflict_by_replace)
        self.button_rename.clicked.connect(self.resolve_conflict_by_rename)
        self.button_skip.clicked.connect(self.skip_conflict)
        self.button_start_upload.clicked.connect(self.start_upload)

        self.label_replace_icon.clear()
        self.label_replace_icon.setPixmap(load_pixmap('warning-icon.png'))

        self.edit_new_name_checker = MandatoryLineEditChecker(
            self, self.label_new_name, self.edit_new_name)
Exemple #26
0
    def __init__(self, title_prefix='', last_directory=None):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.edit_mode = False
        self.folder_icon = QIcon(load_pixmap('folder-icon.png'))
        self.file_icon = QIcon(load_pixmap('file-icon.png'))

        if last_directory != None:
            self.last_directory = last_directory
        else:
            self.last_directory = get_home_path()

        self.setTitle(title_prefix + 'Files')

        self.list_files.itemSelectionChanged.connect(self.update_ui_state)
        self.button_add_files.clicked.connect(self.show_add_files_dialog)
        self.button_add_directory.clicked.connect(
            self.show_add_directory_dialog)
        self.button_remove_selected_files.clicked.connect(
            self.remove_selected_files)
    def isComplete(self):
        executable = self.get_executable()
        start_mode = self.get_field('csharp.start_mode')

        if len(executable) == 0:
            return False

        if start_mode == Constants.CSHARP_START_MODE_EXECUTABLE and \
           not self.combo_executable_selector.complete:
            return False

        return self.combo_working_directory_selector.complete and ProgramPage.isComplete(
            self)
    def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.edit_mode                       = False
        self.conflict_resolution_in_progress = False
        self.auto_conflict_resolution        = None
        self.upload_successful               = False
        self.language_api_name               = None
        self.program                         = None
        self.program_defined                 = False
        self.root_directory                  = None
        self.remaining_uploads               = None
        self.upload                          = None
        self.command                         = None
        self.created_directories             = set()
        self.target_path                     = None # abolsute path on RED Brick in POSIX format
        self.chunked_uploader                = None
        self.replace_help_template           = self.label_replace_help.text()
        self.warnings                        = 0
        self.canceled                        = False

        self.setTitle(title_prefix + 'Upload')

        self.progress_file.setVisible(False)

        self.check_rename_new_file.stateChanged.connect(self.update_ui_state)
        self.edit_new_name.textChanged.connect(self.check_new_name)
        self.button_reset_new_name.clicked.connect(self.reset_new_name)
        self.button_replace.clicked.connect(self.resolve_conflict_by_replace)
        self.button_rename.clicked.connect(self.resolve_conflict_by_rename)
        self.button_skip.clicked.connect(self.skip_conflict)
        self.button_start_upload.clicked.connect(self.start_upload)

        self.label_replace_icon.clear()
        self.label_replace_icon.setPixmap(load_pixmap('warning-icon-44.png'))

        self.edit_new_name_checker = MandatoryLineEditChecker(self, self.label_new_name, self.edit_new_name)
    def __init__(self, download_kind, download_directory, downloads, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.download_kind                   = download_kind # 'logs' or 'files'
        self.download_directory              = download_directory # absolute path on host in host format
        self.conflict_resolution_in_progress = False
        self.auto_conflict_resolution        = None
        self.download_successful             = False
        self.root_directory                  = None
        self.remaining_downloads             = downloads
        self.download                        = None
        self.created_directories             = set()
        self.target_path                     = None # abolsute path on host in host format
        self.chunked_downloader              = None
        self.replace_help_template           = self.label_replace_help.text()
        self.canceled                        = False

        self.setTitle(title_prefix + 'Download')

        self.progress_file.setVisible(False)

        self.check_rename_new_file.stateChanged.connect(self.update_ui_state)
        self.edit_new_name.textChanged.connect(self.check_new_name)
        self.button_reset_new_name.clicked.connect(self.reset_new_name)
        self.button_replace.clicked.connect(self.resolve_conflict_by_replace)
        self.button_rename.clicked.connect(self.resolve_conflict_by_rename)
        self.button_skip.clicked.connect(self.skip_conflict)
        self.button_start_download.clicked.connect(self.start_download)

        self.label_replace_icon.clear()
        self.label_replace_icon.setPixmap(load_pixmap('warning-icon-44.png'))

        self.edit_new_name_checker = MandatoryLineEditChecker(self, self.label_new_name, self.edit_new_name)

        self.log('Going to download {0} to {1}'.format(self.download_kind, self.download_directory))
        self.edit_log.moveCursor(QTextCursor.StartOfLine)
Exemple #30
0
    def isComplete(self):
        executable = self.get_executable()
        start_mode = self.get_field("ruby.start_mode")

        if len(executable) == 0:
            return False

        if start_mode == Constants.RUBY_START_MODE_SCRIPT_FILE and not self.combo_script_file_selector.complete:
            return False

        if start_mode == Constants.RUBY_START_MODE_COMMAND and not self.edit_command_checker.complete:
            return False

        return self.combo_working_directory_selector.complete and ProgramPage.isComplete(self)
    def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.setTitle(title_prefix + 'Stdio Redirection')

        self.registerField('stdin_redirection', self.combo_stdin_redirection)
        self.registerField('stdin_file', self.combo_stdin_file, 'currentText')
        self.registerField('stdout_redirection', self.combo_stdout_redirection)
        self.registerField('stdout_file', self.edit_stdout_file)
        self.registerField('stderr_redirection', self.combo_stderr_redirection)
        self.registerField('stderr_file', self.edit_stderr_file)

        self.combo_stdin_redirection.currentIndexChanged.connect(self.update_ui_state)
        self.combo_stdin_redirection.currentIndexChanged.connect(self.emit_complete_changed)
        self.combo_stdout_redirection.currentIndexChanged.connect(self.update_ui_state)
        self.combo_stdout_redirection.currentIndexChanged.connect(self.emit_complete_changed)
        self.combo_stderr_redirection.currentIndexChanged.connect(self.update_ui_state)
        self.combo_stderr_redirection.currentIndexChanged.connect(self.emit_complete_changed)

        self.combo_stdin_file_checker = MandatoryEditableComboBoxChecker(self, self.label_stdin_file, self.combo_stdin_file)
        self.edit_stdout_file_checker = MandatoryLineEditChecker(self, self.label_stdout_file, self.edit_stdout_file)
        self.edit_stderr_file_checker = MandatoryLineEditChecker(self, self.label_stderr_file, self.edit_stderr_file)
    def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.language = Constants.LANGUAGE_CSHARP

        self.setTitle('{0}{1} Configuration'.format(title_prefix, Constants.language_display_names[self.language]))

        self.registerField('csharp.version', self.combo_version)
        self.registerField('csharp.start_mode', self.combo_start_mode)
        self.registerField('csharp.executable', self.combo_executable, 'currentText')
        self.registerField('csharp.working_directory', self.combo_working_directory, 'currentText')

        self.combo_start_mode.currentIndexChanged.connect(self.update_ui_state)
        self.combo_start_mode.currentIndexChanged.connect(self.completeChanged.emit)
        self.check_show_advanced_options.stateChanged.connect(self.update_ui_state)
        self.label_spacer.setText('')

        self.combo_executable_selector        = MandatoryTypedFileSelector(self,
                                                                           self.label_executable,
                                                                           self.combo_executable,
                                                                           self.label_executable_type,
                                                                           self.combo_executable_type,
                                                                           self.label_executable_help)
        self.combo_working_directory_selector = MandatoryDirectorySelector(self,
                                                                           self.label_working_directory,
                                                                           self.combo_working_directory)
        self.option_list_editor               = ListWidgetEditor(self.label_options,
                                                                 self.list_options,
                                                                 self.label_options_help,
                                                                 self.button_add_option,
                                                                 self.button_remove_option,
                                                                 self.button_up_option,
                                                                 self.button_down_option,
                                                                 '<new Mono option {0}>')
Exemple #33
0
    def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.edit_mode = False
        self.identifier_is_unique = False

        self.setTitle(title_prefix + 'General Information')
        self.setSubTitle(
            'Specify name, identifier, programming language and description for the program.'
        )

        self.edit_identifier.setValidator(
            QRegExpValidator(QRegExp('^[a-zA-Z0-9_][a-zA-Z0-9._-]{2,}$'),
                             self))
        self.combo_language.insertSeparator(Constants.LANGUAGE_SEPARATOR)

        self.registerField('name', self.edit_name)
        self.registerField('identifier', self.edit_identifier)
        self.registerField('language', self.combo_language)
        self.registerField('description', self.text_description, 'plainText',
                           self.text_description.textChanged)

        self.edit_name.textChanged.connect(self.auto_generate_identifier)
        self.check_auto_generate.stateChanged.connect(self.update_ui_state)
        self.edit_identifier.textChanged.connect(self.check_identifier)
        self.combo_language.currentIndexChanged.connect(self.update_ui_state)
        self.combo_language.currentIndexChanged.connect(self.check_language)

        self.edit_name_checker = MandatoryLineEditChecker(
            self, self.label_name, self.edit_name)
        self.edit_identifier_checker = MandatoryLineEditChecker(
            self, self.label_identifier, self.edit_identifier)

        self.check_language(self.combo_language.currentIndex())
Exemple #34
0
    def isComplete(self):
        executable = self.get_executable()
        start_mode = self.get_field('ruby.start_mode')

        if len(executable) == 0:
            return False

        if start_mode == Constants.RUBY_START_MODE_SCRIPT_FILE and \
           not self.combo_script_file_selector.complete:
            return False

        if start_mode == Constants.RUBY_START_MODE_COMMAND and \
           not self.edit_command_checker.complete:
            return False

        return self.combo_working_directory_selector.complete and ProgramPage.isComplete(self)
    def isComplete(self):
        executable = self.get_executable()
        start_mode = self.get_field('java.start_mode')

        if len(executable) == 0:
            return False

        if start_mode == Constants.JAVA_START_MODE_MAIN_CLASS and \
           not self.combo_main_class_checker.complete:
            return False

        if start_mode == Constants.JAVA_START_MODE_JAR_FILE and \
           not self.combo_jar_file_selector.complete:
            return False

        return self.combo_working_directory_selector.complete and ProgramPage.isComplete(self)
Exemple #36
0
    def isComplete(self):
        executable = self.get_executable()
        start_mode = self.get_field('java.start_mode')

        if len(executable) == 0:
            return False

        if start_mode == Constants.JAVA_START_MODE_MAIN_CLASS and \
           not self.combo_main_class_checker.complete:
            return False

        if start_mode == Constants.JAVA_START_MODE_JAR_FILE and \
           not self.combo_jar_file_selector.complete:
            return False

        return self.combo_working_directory_selector.complete and ProgramPage.isComplete(self)
    def isComplete(self):
        stdin_redirection  = self.get_field('stdin_redirection')
        stdout_redirection = self.get_field('stdout_redirection')
        stderr_redirection = self.get_field('stderr_redirection')

        if stdin_redirection == Constants.STDIN_REDIRECTION_FILE and \
           not self.combo_stdin_file_checker.complete:
            return False

        if stdout_redirection == Constants.STDOUT_REDIRECTION_FILE and \
           not self.edit_stdout_file_checker.complete:
            return False

        if stderr_redirection == Constants.STDERR_REDIRECTION_FILE and \
           not self.edit_stderr_file_checker.complete:
            return False

        return ProgramPage.isComplete(self)
    def isComplete(self):
        flavor     = self.get_field('javascript.flavor')
        executable = self.get_executable()
        start_mode = self.get_field('javascript.start_mode')

        if flavor == Constants.JAVASCRIPT_FLAVOR_NODEJS:
            if len(executable) == 0:
                return False

            if start_mode == Constants.JAVASCRIPT_START_MODE_SCRIPT_FILE and \
               not self.combo_script_file_selector.complete:
                return False

            if start_mode == Constants.JAVASCRIPT_START_MODE_COMMAND and \
               not self.edit_command_checker.complete:
                return False

        return self.combo_working_directory_selector.complete and ProgramPage.isComplete(self)
Exemple #39
0
    def isComplete(self):
        stdin_redirection = self.get_field('stdin_redirection')
        stdout_redirection = self.get_field('stdout_redirection')
        stderr_redirection = self.get_field('stderr_redirection')

        if stdin_redirection == Constants.STDIN_REDIRECTION_FILE and \
           not self.combo_stdin_file_checker.complete:
            return False

        if stdout_redirection == Constants.STDOUT_REDIRECTION_FILE and \
           not self.edit_stdout_file_checker.complete:
            return False

        if stderr_redirection == Constants.STDERR_REDIRECTION_FILE and \
           not self.edit_stderr_file_checker.complete:
            return False

        return ProgramPage.isComplete(self)
Exemple #40
0
    def isComplete(self):
        flavor = self.get_field('javascript.flavor')
        executable = self.get_executable()
        start_mode = self.get_field('javascript.start_mode')

        if flavor == Constants.JAVASCRIPT_FLAVOR_NODEJS:
            if len(executable) == 0:
                return False

            if start_mode == Constants.JAVASCRIPT_START_MODE_SCRIPT_FILE and \
               not self.combo_script_file_selector.complete:
                return False

            if start_mode == Constants.JAVASCRIPT_START_MODE_COMMAND and \
               not self.edit_command_checker.complete:
                return False

        return self.combo_working_directory_selector.complete and ProgramPage.isComplete(
            self)
    def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.setTitle(title_prefix + 'Summary')
    def isComplete(self):
        if not self.edit_executable_checker.complete:
            return False

        return self.combo_working_directory_selector.complete and ProgramPage.isComplete(self)
Exemple #43
0
    def isComplete(self):
        if not self.edit_executable_checker.complete:
            return False

        return self.combo_working_directory_selector.complete and ProgramPage.isComplete(
            self)
Exemple #44
0
 def isComplete(self):
     return self.edit_name_checker.complete and \
            self.edit_identifier_checker.complete and \
            self.identifier_is_unique and \
            self.get_field('language') != Constants.LANGUAGE_INVALID and \
            ProgramPage.isComplete(self)
Exemple #45
0
    def isComplete(self):
        if self.edit_mode:
            return self.list_files.count() > 0 and ProgramPage.isComplete(self)

        return ProgramPage.isComplete(self)
    def isComplete(self):
        if self.edit_mode:
            return self.list_files.count() > 0 and ProgramPage.isComplete(self)

        return ProgramPage.isComplete(self)
Exemple #47
0
 def isComplete(self):
     return self.upload_successful and ProgramPage.isComplete(self)
 def isComplete(self):
     return self.edit_name_checker.complete and \
            self.edit_identifier_checker.complete and \
            self.identifier_is_unique and \
            self.get_field('language') != Constants.LANGUAGE_INVALID and \
            ProgramPage.isComplete(self)
 def isComplete(self):
     return self.environment_is_valid and ProgramPage.isComplete(self)
 def isComplete(self):
     return self.environment_is_valid and ProgramPage.isComplete(self)
 def isComplete(self):
     return self.download_successful and ProgramPage.isComplete(self)
Exemple #52
0
    def __init__(self, title_prefix=''):
        ProgramPage.__init__(self)

        self.setupUi(self)

        self.setTitle(title_prefix + 'Summary')