Link Search Menu Expand Document

CLASSIFIER : GRFileSelector

uid: class-GRFileSelector-CVEViewer-MetaModel@g-scop.grenoble-inp.fr

About

Abstract

A GRFileSelector is a graphic node to select a file an path on the local directory. It is planar panel where directories and files are displayed. It enable single or multiple selection but also new file definition ny editing a selected file name. Some filters on file extension are also available plus classical actions, select or unselect all, cancel or accept button.

GRFileSelector

To create a GRFileSelector :

fs=cve.viewer.GRFileSelector()

Then it is controlled by object methods.## Class Diagram

Class diagram of class of GRFileSelector.

Inherits

attribute type cardinality
path vstring [1,1]
files vstring [1,1]
filter vstring [1,1]
select-directory vboolean [1,1]
multiple vboolean [1,1]
allow-new-file vboolean [1,1]
accept vboolean [1,1]
action vstring [1,1]

Methods

  • set_path(self,..) :

          Set current path
          :param self:
          :param path: the path to display
          :return: True if success
    
  • get_path(self,..) :

          Get current path
          :param self:
          :return: current pathe string
    
  • get_files(self,..) :

          Get files
          :param self:
          :return: A list of selected filenames in current path
    
  • add_filter(self,..) :

          Add a new extension filter
          :param self:
          :param tfilter: the extension *.xxx
    
  • remove_filter(self,..) :

          Remove an extension filter
          :param self:
          :param tfilter: the extension *.xxx to be removed
    
  • set_multiple(self,..) :

          Set capacity to select multiple files
          :param self:
          :param multiple: True if multiple files are selectable
          :return: True if success
    
  • select_directory(self,..) :

          Set if a directory should be selected
          :param self:
          :param select: boolean
          :return: True if success
    
  • allow_new_file(self,..) :

          Allow to edit file name thus to create an unknown path
          :param self:
          :param allow: authorization value
          :return: True if success