Ejemplo n.º 1
0
    def create_ftp_prefs(self):
        ''' Create the general preference items.

        '''
        general_page = self.pref_manager.add_page('Ftp')
        server_group = general_page.add_group('server')
        mss_group = general_page.add_group('mss server')

        # The Ftp Server IP.
        item = psy_pm.TextEditPrefItem(name = 'host',
                                       label = 'host',
                                       value = '',
                                       tool_tip = 'The IP address of the Ftp server.')
        server_group.add_item(item)

        # The Ftp Server username.
        item = psy_pm.TextEditPrefItem(name = 'username',
                                       label = 'username',
                                       value = '',
                                       tool_tip = 'The username of the Ftp server.')
        server_group.add_item(item)

        # The Ftp Server username.
        item = psy_pm.TextEditPrefItem(name = 'password',
                                       label = 'password',
                                       value = '',
                                       tool_tip = 'The password of the Ftp user.')
        server_group.add_item(item)

        # The name of the file with the blast details.
        item = psy_pm.TextEditPrefItem(name = 'filename',
                                       label = 'filename',
                                       value = '',
                                       tool_tip = 'The name of the file holding the blast details.')
        server_group.add_item(item)


        # The MSS homepage server section.
        # The Ftp Server IP.
        item = psy_pm.TextEditPrefItem(name = 'mss_host',
                                       label = 'host',
                                       value = '',
                                       tool_tip = 'The IP address of the MSS homepage Ftp server.')
        mss_group.add_item(item)

        # The Ftp Server username.
        item = psy_pm.TextEditPrefItem(name = 'mss_username',
                                       label = 'username',
                                       value = '',
                                       tool_tip = 'The username of the MSS hompage Ftp server.')
        mss_group.add_item(item)

        # The Ftp Server username.
        item = psy_pm.TextEditPrefItem(name = 'mss_password',
                                       label = 'password',
                                       value = '',
                                       tool_tip = 'The password of the MSS homepage Ftp user.')
        mss_group.add_item(item)
Ejemplo n.º 2
0
    def __init__(self, **args):
        CollectionNode.__init__(self, **args)

        pref_item = pref_manager.TextEditPrefItem(name='filter_name',
                                                  label='filter name',
                                                  value='test filter')
        self.pref_manager.add_item(item=pref_item)

        pref_item = pref_manager.DirBrowsePrefItem(name='directory_browse',
                                                   label='browse',
                                                   value='',
                                                   start_directory='/home')
        self.pref_manager.add_item(item=pref_item)

        pref_item = pref_manager.FloatSpinPrefItem(name='filter_cutoff',
                                                   label='filter cutoff',
                                                   value='4.5')
        self.pref_manager.add_item(item=pref_item)
Ejemplo n.º 3
0
    def create_output_prefs(self):
        ''' Create the output preferences.
        '''
        output_page = self.pref_manager.add_page('output')
        files_group = output_page.add_group('files')

        # The output folder.
        item = psy_pm.DirBrowsePrefItem(
            name='output_dir',
            label='output directory',
            value='',
            tool_tip='The directory where the resulting files are saved.')
        files_group.add_item(item=item)

        # The file prefix.
        item = psy_pm.TextEditPrefItem(
            name='prefix',
            label='prefix',
            value='',
            tool_tip='The string prepended to the filename.')
        files_group.add_item(item=item)
Ejemplo n.º 4
0
    def create_filter_preferences(self):
        ''' Create the filter preferences.
        '''
        pref_page = self.pref_manager.add_page('Filter')
        type_group = pref_page.add_group('type')
        tag_group = pref_page.add_group('tag')

        # TODO: Add a more advanced filter options providing the possibility of
        # combinig multiple values with logical operators.

        # The event types to search for.
        item = psy_pm.MultiChoicePrefItem(name='event_type',
                                          label='event type',
                                          limit=(),
                                          value=[],
                                          tool_tip='The event types to load.')
        type_group.add_item(item)

        # The event tags to search for.
        item = psy_pm.TextEditPrefItem(name='event_tag',
                                       label='event tag',
                                       value='',
                                       tool_tip='The tag to search for.')
        tag_group.add_item(item)
Ejemplo n.º 5
0
    def __init__(self):
        ''' The constructor.

        '''
        InteractivePlugin.__init__(self,
                                   name = 'pick',
                                   category = 'edit',
                                   tags = None
                                  )
        # Create the logging logger instance.
        logger_prefix = psysmon.logConfig['package_prefix']
        loggerName = logger_prefix + "." + __name__ + "." + self.__class__.__name__
        self.logger = logging.getLogger(loggerName)

        self.icons['active'] = icons.hand_2_icon_16
        self.cursor = wx.CURSOR_CROSS

        # The pick catalog library used to manage the catalogs.
        self.library = pick_core.Library('pick library')

        # The name of the selected catalog.
        self.selected_catalog_name = None

        # A flag indicating if the pick catalog was loaded for a selected
        # event.
        self.catalog_loaded_for_selected_event = False

        # The lines of the picks.
        self.pick_lines = {}

        # Add the pages to the preferences manager.
        to_page = self.pref_manager.add_page('tool options')
        cat_group = to_page.add_group('catalog')
        po_group = to_page.add_group('pick options')

        # Add the plugin preferences.
        item = psy_pm.SingleChoicePrefItem(name = 'catalog_mode',
                                          label = 'mode',
                                          value = 'time',
                                          limit = ['time',],
                                          tool_tip = 'Select a pick catalog to work on.')
        cat_group.add_item(item)

        item = psy_pm.SingleChoicePrefItem(name = 'pick_catalog',
                                          label = 'pick catalog',
                                          value = '',
                                          limit = [],
                                          tool_tip = 'Select a pick catalog to work on.',
                                          hooks = {'on_value_change': self.on_select_catalog})
        cat_group.add_item(item)

        item = psy_pm.ActionItem(name = 'create_new_catalog',
                                 label = 'create new catalog',
                                 mode = 'button',
                                 action = self.on_create_new_catalog)
        cat_group.add_item(item)



        item = psy_pm.TextEditPrefItem(name = 'label',
                                       label = 'label',
                                       value = 'P',
                                       tool_tip = 'The label of the pick.')
        po_group.add_item(item)

        item = psy_pm.FloatSpinPrefItem(name = 'delete_snap_length',
                                       label = 'delete snap [s]',
                                       value = 0.1,
                                       limit = (0, 1000),
                                       tool_tip = 'The snap length used when deleting picks.')
        po_group.add_item(item)