예제 #1
0
 def _createStructure(self):
     """
     Create the model object which this edit controller  creates)
     Abstract method.
     @see: L{Plane_EditCommand._createStructure}
     """
     raise AbstractMethod()
예제 #2
0
 def _getExitActionText(self):
     """
     Raises AbstractMethod. Subclasses must override this method.
     @see: self._createActions()
     @see: attribute, self.command_for_exit_action
     """
     raise AbstractMethod()
예제 #3
0
    def _addGroupBoxes(self):
        """
        Subclasses should add various groupboxes present inside the Atom chooser
        groupbox.

        AbstractMethod
        """
        raise AbstractMethod()
예제 #4
0
 def _modifyStructure(self, params):
     """
     Abstract method that modifies the current object being edited.
     @param params: The parameters used as an input to modify the structure
                    (object created using this editCommand)
     @type  params: tuple
     @see: L{Plane_EditCommand._modifyStructure}
     """
     raise AbstractMethod()
예제 #5
0
 def _getStructureType(self):
     """
     Subclasses must override this method to define their own structure type.
     Returns the type of the structure this editCommand supports.
     This is used in isinstance test.
     @see: self.hasValidStructure()
     """
     print "bug: EditCommand._getStructureType not overridden in a subclass"
     raise AbstractMethod()
예제 #6
0
    def gather_parameters(self):
        """
        Return a tuple of the current parameters. This is an
        abstract method which must be overloaded in the specific
        generator. Each subclass (specific generator) determines
        how many parameters are contained in this tuple, and in
        what order. The superclass code assumes only that the
        param tuple can be correctly compared by same_vals.

        This method must validate the parameters, and
        raise an exception if they are invalid.
        """
        raise AbstractMethod()
예제 #7
0
 def _action_in_controlArea_to_show_this_flyout(self):
     """
     To be cleaned up. The current implementation of command toolbar code 
     needs an action in the 'Control Area' of the command toolbar 
     to be provided as an argument in order to update the Flyout toolbar
     Example: If its BuildAtoms FlyoutToolbar, in order to display it, 
     the updateCommandToolbar method needs the 'depositAtomsAction' 
     i.e. the action corresponding to BuildAtoms command to be send 
     as an argument (so that it knows to check the Control Area' button 
     under which this action is defined as a subitem.  this is confusing
     and will be cleaned up. Also it is buggy in case of , for example,
     Paste mode whose action is not present as a submenu in any of the 
     Conteol Area buttons. 
     """
     raise AbstractMethod()
예제 #8
0
    def build_struct(self, name, params, position):
        """
        Build the structure (model object) which this generator is supposed
        to generate. This is an abstract method and must be overloaded in
        the specific generator.

        (WARNING: I am guessing the standard type names for tuple and
        position.)

        @param name: The name which should be given to the toplevel Node of the
                     generated structure. The name is also passed in self.name.
                     (TODO: remove one of those two ways of passing that info.)
                     The caller will emit history messages which assume this
                     name is used. If self.create_name_from_prefix is true,
                     the caller will have set this name to self.prefix appended
                     with a serial number.
        @type  name: str

        @param params: The parameter tuple returned from
                       self.gather_parameters(). For more info,
                       see docstring of gather_parameters in this class.
        @type  params: tuple

        @param position: The position in 3d model space at which to
                         create the generated structure. (The precise
                         way this is used, if at all, depends on the
                         specific generator.)
        @type position:  position

        @return: The new structure, i.e. some flavor of a Node, which
                 has not yet been added to the model.  Its structure
                 should depend only on the values of the passed
                 params, since if the user asks to build twice, this
                 method may not be called if the params have not
                 changed.
        """
        raise AbstractMethod()
예제 #9
0
 def _addWhatsThisText(self):
     """
     Add what's this text.
     Abstract method.
     """
     raise AbstractMethod()
예제 #10
0
 def _addGroupBoxes(self):
     """
     Add various group boxes to this PM.
     Abstract method.
     """
     raise AbstractMethod()
예제 #11
0
 def getElementsButtonList(self):
     """
     Subclasses should override this and return the list of buttons in the
     Atom chooser.
     """
     raise AbstractMethod()
예제 #12
0
 def _gatherParameters(self):
     """
     Abstract method to be overridden by subclasses to return all
     the parameters needed to modify or (re)create the current structure.
     """
     raise AbstractMethod()
예제 #13
0
 def _loadGroupBox2(self, pmGroupBox):
     """
     Load widgets in groupbox 2.
     Abstract method (overriden in subclasses)
     """
     raise AbstractMethod()
예제 #14
0
 def change_motor_size(self, gl_update = True):
     """
     Slot method to change the jig's size and/or spoke radius.
     Abstract method
     """
     raise AbstractMethod()