def __init__(self, controller, **kwargs): """ Initialize the List View for the Stakeholder package. :param controller: the RAMSTK master data controller instance. :type controller: :class:`ramstk.RAMSTK.RAMSTK` """ RAMSTKListView.__init__(self, controller, module='stakeholder') # Initialize private dictionary attributes. # Initialize private list attributes. # Initialize private scalar attributes. self._revision_id = None self._stakeholder_id = None # Initialize public dictionary attributes. # Initialize public list attributes. # Initialize public scalar attributes. self._make_treeview() self.treeview.set_tooltip_text( _(u"Displays the list of stakeholder inputs for the selected " u"stakeholder.")) self._lst_handler_id.append( self.treeview.connect('cursor_changed', self._do_change_row)) self._lst_handler_id.append( self.treeview.connect('button_press_event', self._on_button_press)) # _icon = gtk.gdk.pixbuf_new_from_file_at_size(self._dic_icons['tab'], # 22, 22) # _image = gtk.Image() # _image.set_from_pixbuf(_icon) _label = gtk.Label() _label.set_markup("<span weight='bold'>" + _(u"Stakeholder\nInputs") + "</span>") _label.set_alignment(xalign=0.5, yalign=0.5) _label.set_justify(gtk.JUSTIFY_CENTER) _label.show_all() _label.set_tooltip_text( _(u"Displays stakeholder inputs for the " u"selected stakeholder.")) # self.hbx_tab_label.pack_start(_image) self.hbx_tab_label.pack_end(_label) self.hbx_tab_label.show_all() _scrolledwindow = gtk.ScrolledWindow() _scrolledwindow.add(self.treeview) self.pack_start(self._make_buttonbox(), expand=False, fill=False) self.pack_end(_scrolledwindow, expand=True, fill=True) self.show_all() pub.subscribe(self._on_select_revision, 'selectedRevision')
def __init__(self, controller, **kwargs): """ Initialize the Module View. :param controller: the RAMSTK master data controller instance. :type controller: :py:class:`ramstk.RAMSTK.RAMSTK` :param str module: the module that is being loaded. """ gtk.HBox.__init__(self) ramstk.RAMSTKBaseView.__init__(self, controller, **kwargs) # Initialize private dictionary attributes. # Initialize private list attributes. # Initialize private scalar attributes. self._img_tab = gtk.Image() # Initialize public dictionary attributes. # Initialize public list attributes. # Initialize public scalar attributes. _scrolledwindow = gtk.ScrolledWindow() _scrolledwindow.add(self.treeview) self.pack_end(_scrolledwindow, expand=True, fill=True)
def _make_page(self): """ Make the Similar Item RAMSTKTreeview(). :return: a gtk.Frame() containing the instance of gtk.Treeview(). :rtype: :class:`gtk.Frame` """ # Load the quality from and quality to gtk.CellRendererCombo(). for _idx in [4, 5]: _model = self._get_cell_model(_idx) for _quality in self._dic_quality: _model.append([ _quality, ]) # Load the environment from and environment to gtk.CellRendererCombo(). for _idx in [6, 7]: _model = self._get_cell_model(_idx) for _environment in self._dic_environment: _model.append([ _environment, ]) _scrollwindow = gtk.ScrolledWindow() _scrollwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) _scrollwindow.add(self.treeview) _frame = ramstk.RAMSTKFrame(label=_(u"Similar Item Analysis")) _frame.set_shadow_type(gtk.SHADOW_ETCHED_OUT) _frame.add(_scrollwindow) self.treeview.set_grid_lines(gtk.TREE_VIEW_GRID_LINES_BOTH) return _frame
def __init__(self, controller, **kwargs): # pylint: disable=unused-argument """ Initialize the Module View for the Hardware package. :param controller: the RAMSTK Master data controller instance. :type controller: :class:`ramstk.RAMSTK.RAMSTK` """ RAMSTKModuleView.__init__(self, controller, module='hardware') # Initialize private dictionary attributes. self._dic_icons['tab'] = controller.RAMSTK_CONFIGURATION.RAMSTK_ICON_DIR + \ '/32x32/hardware.png' self._dic_icons['insert_part'] = \ controller.RAMSTK_CONFIGURATION.RAMSTK_ICON_DIR + \ '/32x32/insert_part.png' # Initialize private list attributes. # Initialize private scalar attributes. self._hardware_id = None self._revision_id = None # Initialize public dictionary attributes. # Initialize public list attributes. # Initialize public scalar attributes. self._make_treeview() self.treeview.set_tooltip_text( _(u"Displays the hierarchical list of " u"hardware items.")) self._lst_handler_id.append( self.treeview.connect('cursor_changed', self._do_change_row)) self._lst_handler_id.append( self.treeview.connect('button_press_event', self._on_button_press)) self._img_tab.set_from_file(self._dic_icons['tab']) _label = ramstk.RAMSTKLabel( _(u"Hardware"), width=-1, height=-1, tooltip=_(u"Displays the hierarchical list of hardware items.")) self.hbx_tab_label.pack_start(self._img_tab) self.hbx_tab_label.pack_end(_label) self.hbx_tab_label.show_all() _scrollwindow = gtk.ScrolledWindow() _scrollwindow.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) _scrollwindow.add_with_viewport(self._make_buttonbox()) self.pack_start(_scrollwindow, expand=False, fill=False) self.show_all() pub.subscribe(self._on_select_revision, 'selectedRevision') pub.subscribe(self._on_edit, 'wvwEditedHardware') pub.subscribe(self._on_calculate, 'calculatedAllHardware')
def __init__(self, controller, **kwargs): # pylint: disable=unused-argument """ Initialize the List View for the Failure Definition package. :param controller: the RAMSTK master data controller instance. :type controller: :class:`ramstk.RAMSTK.RAMSTK` """ RAMSTKListView.__init__(self, controller, module='failure_definition') # Initialize private dictionary attributes. # Initialize private list attributes. # Initialize private scalar attributes. self._revision_id = None self._definition_id = None # Initialize public dictionary attributes. # Initialize public list attributes. # Initialize public scalar attributes. self._make_treeview() self.treeview.set_rubber_banding(True) self.treeview.set_tooltip_text( _(u"Displays the list of failure definitions for the selected " u"revision.")) self._lst_handler_id.append( self.treeview.connect('cursor_changed', self._do_change_row)) self._lst_handler_id.append( self.treeview.connect('button_press_event', self._on_button_press)) _label = gtk.Label() _label.set_markup("<span weight='bold'>" + _(u"Failure\nDefinitions") + "</span>") _label.set_alignment(xalign=0.5, yalign=0.5) _label.set_justify(gtk.JUSTIFY_CENTER) _label.show_all() _label.set_tooltip_text( _(u"Displays failure definitions for the " u"selected revision.")) self.hbx_tab_label.pack_end(_label) self.hbx_tab_label.show_all() _scrolledwindow = gtk.ScrolledWindow() _scrolledwindow.add(self.treeview) self.pack_start(self._make_buttonbox(), expand=False, fill=False) self.pack_end(_scrolledwindow, expand=True, fill=True) self.show_all() pub.subscribe(self._on_select_revision, 'selectedRevision')
def _make_map_field_page(self): """ Make the Import Assistant page to map fields. This method allows the user to map input file fields to RAMSTK database table fields. :return: _page :rtype: :class:`gtk.ScrolledWindow` """ _page = gtk.ScrolledWindow() _page.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) _page.add(self._tvw_field_map) _model = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_STRING) _column = gtk.TreeViewColumn() _label = ramstk.RAMSTKLabel( _(u"Import File Column"), justify=gtk.JUSTIFY_CENTER) _column.set_widget(_label) _cell = gtk.CellRendererText() _cell.set_property('foreground', '#000000') _cell.set_property('cell-background', 'light gray') _column.pack_start(_cell, True) _column.set_attributes(_cell, text=0) _column.set_visible(True) self._tvw_field_map.append_column(_column) _column = gtk.TreeViewColumn() _label = ramstk.RAMSTKLabel( _(u"RAMSTK Field"), justify=gtk.JUSTIFY_CENTER) _column.set_widget(_label) _cell = gtk.CellRendererCombo() _cellmodel = gtk.ListStore(gobject.TYPE_STRING) _cellmodel.append([""]) _cell.set_property('editable', True) _cell.set_property('foreground', '#000000') _cell.set_property('has-entry', False) _cell.set_property('model', _cellmodel) _cell.set_property('text-column', 0) _cell.connect('edited', self._do_edit_cell, _model) _column.pack_start(_cell, True) _column.set_attributes(_cell, text=1) _column.set_visible(True) self._tvw_field_map.append_column(_column) self._tvw_field_map.set_model(_model) return _page
def __init__(self, controller, **kwargs): """ Initialize the Hardware:Requirement Matrix View. :param controller: the RAMSTK master data controller instance. :type controller: :py:class:`ramstk.RAMSTK.RAMSTK` """ gtk.HBox.__init__(self) ramstk.RAMSTKBaseMatrix.__init__(self, controller, **kwargs) # Initialize private dictionary attributes. # Initialize private list attributes. # Initialize private scalar attributes. self._dtc_data_controller = None self._revision_id = None self._matrix_type = kwargs['matrix_type'] # Initialize public dictionary attributes. # Initialize public list attributes. # Initialize public scalar attributes. self.hbx_tab_label = gtk.HBox() _label = gtk.Label() _label.set_markup("<span weight='bold'>" + _(u"Hardware\nRequirement") + "</span>") _label.set_alignment(xalign=0.5, yalign=0.5) _label.set_justify(gtk.JUSTIFY_CENTER) _label.show_all() _label.set_tooltip_text( _(u"Displays hardware/requirement matrix for the " u"selected revision.")) # self.hbx_tab_label.pack_start(_image) self.hbx_tab_label.pack_end(_label) self.hbx_tab_label.show_all() _scrolledwindow = gtk.ScrolledWindow() _scrolledwindow.add(self.matrix) self.pack_start(self._make_buttonbox(), expand=False, fill=False) self.pack_end(_scrolledwindow, expand=True, fill=True) self.show_all() pub.subscribe(self._on_select_revision, 'selectedRevision')
def _make_page(self): """ Make the Allocation RAMSTKTreeview(). :return: a gtk.Frame() containing the instance of gtk.Treeview(). :rtype: :class:`gtk.Frame` """ _scrollwindow = gtk.ScrolledWindow() _scrollwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) _scrollwindow.add(self.treeview) _frame = ramstk.RAMSTKFrame(label=_(u"Allocation Analysis")) _frame.set_shadow_type(gtk.SHADOW_ETCHED_OUT) _frame.add(_scrollwindow) self.treeview.set_grid_lines(gtk.TREE_VIEW_GRID_LINES_BOTH) return _frame
def _make_input_file_select_page(self): """ Make the Import Assistant page to select the input file. :return: _page :rtype: :class:`gtk.ScrolledWindow` """ # TODO: Implement NSWC (add Design Mechanic to this list). self._cmb_select_module.do_load_combo( [[_(u"Function")], [_(u"Requirement")], [_(u"Hardware")], [_(u"Validation")]]) _page = gtk.HBox() _fixed = gtk.Fixed() _label = ramstk.RAMSTKLabel(_(u"Select the RAMSTK module to import:")) _fixed.put(_label, 5, 5) _fixed.put(self._cmb_select_module, 55, 5) _page.pack_start(_fixed, False, False) _scrollwindow = gtk.ScrolledWindow() _file_chooser = gtk.FileChooserWidget( action=gtk.FILE_CHOOSER_ACTION_OPEN) _scrollwindow.add_with_viewport(_file_chooser) _page.pack_end(_scrollwindow, True, True) _file_filter = gtk.FileFilter() _file_filter.set_name(_(u"Delimited Text Files")) _file_filter.add_pattern('*.csv') _file_filter.add_pattern('*.txt') _file_chooser.add_filter(_file_filter) _file_filter = gtk.FileFilter() _file_filter.set_name(_(u"Excel Files")) _file_filter.add_pattern('*.xls*') _file_chooser.add_filter(_file_filter) _file_chooser.connect('selection_changed', self._do_select_file) return _page
def __init__(self, controller, **kwargs): # pylint: disable=unused-argument """ Initialize the Validation Module View. :param controller: the RAMSTK Master data controller instance. :type controller: :class:`ramstk.RAMSTK.RAMSTK` """ RAMSTKModuleView.__init__(self, controller, module='validation') # Initialize private dictionary attributes. self._dic_icons['tab'] = controller.RAMSTK_CONFIGURATION.RAMSTK_ICON_DIR + \ '/32x32/validation.png' # Initialize private list attributes. # Initialize private scalar attributes. self._revision_id = None self._validation_id = None # Initialize public dictionary attributes. # Initialize public list attributes. # Initialize public scalar attributes. self._make_treeview() self.treeview.set_tooltip_text( _(u"Displays the list of validation " u"tasks.")) self._lst_handler_id.append( self.treeview.connect('cursor_changed', self._do_change_row)) self._lst_handler_id.append( self.treeview.connect('button_press_event', self._on_button_press)) i = 0 for _column in self.treeview.get_columns(): _cell = _column.get_cell_renderers()[0] try: if _cell.get_property('editable'): _cell.connect('edited', self._do_edit_cell, i, self.treeview.get_model()) except TypeError: pass i += 1 self._img_tab.set_from_file(self._dic_icons['tab']) _label = ramstk.RAMSTKLabel( _(u"Validation"), width=-1, height=-1, tooltip=_(u"Displays the program validation tasks.")) self.hbx_tab_label.pack_start(self._img_tab) self.hbx_tab_label.pack_end(_label) self.hbx_tab_label.show_all() _scrollwindow = gtk.ScrolledWindow() _scrollwindow.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) _scrollwindow.add_with_viewport(self._make_buttonbox()) self.pack_start(_scrollwindow, expand=False, fill=False) self.show_all() pub.subscribe(self._on_select_revision, 'selectedRevision') pub.subscribe(self._on_edit, 'wvwEditedValidation')
def _make_page(self): """ Make the PoF RAMSTKTreeview(). :return: a gtk.Frame() containing the instance of gtk.Treeview(). :rtype: :class:`gtk.Frame` """ _scrollwindow = gtk.ScrolledWindow() _scrollwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) _scrollwindow.add(self.treeview) _frame = ramstk.RAMSTKFrame(label=_(u"Physics of Failure (PoF) Analysis")) _frame.set_shadow_type(gtk.SHADOW_ETCHED_OUT) _frame.add(_scrollwindow) self.treeview.set_grid_lines(gtk.TREE_VIEW_GRID_LINES_BOTH) for i in [0, 1, 2, 3, 4]: _column = self.treeview.get_column(self._lst_col_order[i]) if i == 0: _cell = _column.get_cell_renderers()[1] else: _cell = _column.get_cell_renderers()[0] _cell.set_property('font', 'normal bold') # Load the damage models into the gtk.CellRendererCombo(). _model = self._get_cell_model(self._lst_col_order[5]) _model.append(('', )) for _item in self._mdcRAMSTK.RAMSTK_CONFIGURATION.RAMSTK_DAMAGE_MODELS: _model.append( (self._mdcRAMSTK.RAMSTK_CONFIGURATION.RAMSTK_DAMAGE_MODELS[ _item][0], )) # Load the measureable parameter into the gtk.CellRendererCombo(). _model = self._get_cell_model(self._lst_col_order[6]) _model.append(('', )) for _item in self._mdcRAMSTK.RAMSTK_CONFIGURATION.RAMSTK_MEASURABLE_PARAMETERS: _model.append((self._mdcRAMSTK.RAMSTK_CONFIGURATION. RAMSTK_MEASURABLE_PARAMETERS[_item][1], )) # Load the load history into the gtk.CellRendererCombo(). _model = self._get_cell_model(self._lst_col_order[7]) _model.append(('', )) for _item in self._mdcRAMSTK.RAMSTK_CONFIGURATION.RAMSTK_LOAD_HISTORY: _model.append( (self._mdcRAMSTK.RAMSTK_CONFIGURATION.RAMSTK_LOAD_HISTORY[ _item][0], )) # Set the priority gtk.CellRendererSpin()'s adjustment limits and # step increments. _cell = self.treeview.get_column( self._lst_col_order[9]).get_cell_renderers()[0] _adjustment = _cell.get_property('adjustment') _adjustment.configure(5, 1, 5, -1, 0, 0) self._lst_handler_id.append( self.treeview.connect('cursor_changed', self._do_change_row)) self._lst_handler_id.append( self.treeview.connect('button_press_event', self._on_button_press)) for i in self._lst_col_order: _cell = self.treeview.get_column( self._lst_col_order[i]).get_cell_renderers() if isinstance(_cell[0], gtk.CellRendererPixbuf): pass elif isinstance(_cell[0], gtk.CellRendererToggle): _cell[0].connect('toggled', self._do_edit_cell, None, i, self.treeview.get_model()) elif isinstance(_cell[0], gtk.CellRendererCombo): _cell[0].connect('edited', self._do_edit_cell, i, self.treeview.get_model()) else: _cell[0].connect('edited', self._do_edit_cell, i, self.treeview.get_model()) return _frame
def __init__(self, controller, **kwargs): # pylint: disable=unused-argument """ Initialize the List View for the Usage Profile. :param controller: the RAMSTK master data controller instance. :type controller: :class:`ramstk.RAMSTK.RAMSTK` """ RAMSTKListView.__init__(self, controller, module='usage_profile') # Initialize private dictionary attributes. self._dic_icons['mission'] = \ controller.RAMSTK_CONFIGURATION.RAMSTK_ICON_DIR + '/32x32/mission.png' self._dic_icons['phase'] = \ controller.RAMSTK_CONFIGURATION.RAMSTK_ICON_DIR + '/32x32/phase.png' self._dic_icons['environment'] = \ controller.RAMSTK_CONFIGURATION.RAMSTK_ICON_DIR + \ '/32x32/environment.png' # Initialize private list attributes. # Initialize private scalar attributes. self._revision_id = None # Initialize public dictionary attributes. # Initialize public list attributes. # Initialize public scalar attributes. self._make_treeview() self.treeview.set_rubber_banding(True) self.treeview.set_tooltip_text( _(u"Displays the list of usage profiles for the selected " u"revision.")) self._lst_handler_id.append( self.treeview.connect('cursor_changed', self._do_change_row)) self._lst_handler_id.append( self.treeview.connect('button_press_event', self._on_button_press)) # _icon = gdk.pixbuf_new_from_file_at_size(self._dic_icons['tab'], # 22, 22) # _image = Image() # _image.set_from_pixbuf(_icon) _label = gtk.Label() _label.set_markup("<span weight='bold'>" + _(u"Usage\nProfiles") + "</span>") _label.set_alignment(xalign=0.5, yalign=0.5) _label.set_justify(gtk.JUSTIFY_CENTER) _label.show_all() _label.set_tooltip_text( _(u"Displays usage profiles for the selected " u"revision.")) # self.hbx_tab_label.pack_start(_image) self.hbx_tab_label.pack_end(_label) self.hbx_tab_label.show_all() _scrolledwindow = gtk.ScrolledWindow() _scrolledwindow.add(self.treeview) self.pack_start(self._make_buttonbox(), expand=False, fill=False) self.pack_end(_scrolledwindow, expand=True, fill=True) self.show_all() pub.subscribe(self._on_select_revision, 'selectedRevision')
def _make_page(self): """ Make the Requirement Analysis Work View page. :return: _hpaned :rtype: :class:`gtk.HPaned` """ _lst_clear = [ _(u"1. The requirement clearly states what is needed or " u"desired."), _(u"2. The requirement is unambiguous and not open to " u"interpretation."), _(u"3. All terms that can have more than one meaning are " u"qualified so that the desired meaning is readily " u"apparent."), _(u"4. Diagrams, drawings, etc. are used to increase " u"understanding of the requirement."), _(u"5. The requirement is free from spelling and " u"grammatical errors."), _(u"6. The requirement is written in non-technical " u"language using the vocabulary of the stakeholder."), _(u"7. Stakeholders understand the requirement as written."), _(u"8. The requirement is clear enough to be turned over " u"to an independent group and still be understood."), _(u"9. The requirement avoids stating how the problem is " u"to be solved or what techniques are to be used.") ] _lst_complete = [ _(u"1. Performance objectives are properly documented " u"from the user's point of view."), _(u"2. No necessary information is missing from the " u"requirement."), _(u"3. The requirement has been assigned a priority."), _(u"4. The requirement is realistic given the technology " u"that will used to implement the system."), _(u"5. The requirement is feasible to implement given the " u"defined project time frame, scope, structure and " u"budget."), _(u"6. If the requirement describes something as a " u"'standard' the specific source is cited."), _(u"7. The requirement is relevant to the problem and its " u"solution."), _(u"8. The requirement contains no implied design details."), _(u"9. The requirement contains no implied implementation " u"constraints."), _(u"10. The requirement contains no implied project " u"management constraints.") ] _lst_consistent = [ _(u"1. The requirement describes a single need or want; " u"it could not be broken into several different " u"requirements."), _(u"2. The requirement requires non-standard hardware or " u"must use software to implement."), _(u"3. The requirement can be implemented within known " u"constraints."), _(u"4. The requirement provides an adequate basis for " u"design and testing."), _(u"5. The requirement adequately supports the business " u"goal of the project."), _(u"6. The requirement does not conflict with some " u"constraint, policy or regulation."), _(u"7. The requirement does not conflict with another " u"requirement."), _(u"8. The requirement is not a duplicate of another " u"requirement."), _(u"9. The requirement is in scope for the project.") ] _lst_verifiable = [ _(u"1. The requirement is verifiable by testing, " u"demonstration, review, or analysis."), _(u"2. The requirement lacks 'weasel words' (e.g. " u"various, mostly, suitable, integrate, maybe, " u"consistent, robust, modular, user-friendly, " u"superb, good)."), _(u"3. Any performance criteria are quantified such that " u"they are testable."), _(u"4. Independent testing would be able to determine " u"whether the requirement has been satisfied."), _(u"5. The task(s) that will validate and verify the " u"final design satisfies the requirement have been " u"identified."), _(u"6. The identified V&V task(s) have been added to " u"the validation plan (e.g., DVP)") ] # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # # Build-up the containers for the tab. # # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # _hpaned = gtk.HPaned() # Create quadrant #1 (upper left) for determining if the # requirement is clear. _vpaned = gtk.VPaned() _hpaned.pack1(_vpaned, resize=False) _scrollwindow = gtk.ScrolledWindow() _scrollwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) _scrollwindow.add(self.tvwClear) _frame = ramstk.RAMSTKFrame(label=_(u"Clarity of Requirement")) _frame.set_shadow_type(gtk.SHADOW_ETCHED_OUT) _frame.add(_scrollwindow) _vpaned.pack1(_frame, resize=False) # Create quadrant #3 (lower left) for determining if the # requirement is complete. _scrollwindow = gtk.ScrolledWindow() _scrollwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) _scrollwindow.add(self.tvwComplete) _frame = ramstk.RAMSTKFrame(label=_(u"Completeness of Requirement")) _frame.set_shadow_type(gtk.SHADOW_ETCHED_OUT) _frame.add(_scrollwindow) _vpaned.pack2(_frame, resize=False) # Create quadrant #2 (upper right) for determining if the # requirement is consistent. _vpaned = gtk.VPaned() _hpaned.pack2(_vpaned, resize=False) _scrollwindow = gtk.ScrolledWindow() _scrollwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) _scrollwindow.add(self.tvwConsistent) _frame = ramstk.RAMSTKFrame(label=_(u"Consistency of Requirement")) _frame.set_shadow_type(gtk.SHADOW_ETCHED_OUT) _frame.add(_scrollwindow) _vpaned.pack1(_frame, resize=False) # Create quadrant #4 (lower right) for determining if the # requirement is verifiable. _scrollwindow = gtk.ScrolledWindow() _scrollwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) _scrollwindow.add(self.tvwVerifiable) _frame = ramstk.RAMSTKFrame(label=_(u"Verifiability of Requirement")) _frame.set_shadow_type(gtk.SHADOW_ETCHED_OUT) _frame.add(_scrollwindow) _vpaned.pack2(_frame, resize=False) # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # # Place the widgets used to display requirements analysis # # information. # # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # for _index, _treeview in enumerate([ self.tvwClear, self.tvwComplete, self.tvwConsistent, self.tvwVerifiable ]): _model = gtk.ListStore(gobject.TYPE_INT, gobject.TYPE_STRING, gobject.TYPE_INT) _treeview.set_model(_model) _treeview.set_headers_visible(False) _column = gtk.TreeViewColumn() _cell = gtk.CellRendererText() _cell.set_property('editable', 0) _cell.set_property('visible', 0) _column.pack_start(_cell, True) _column.set_attributes(_cell, text=0) _cell = gtk.CellRendererText() _cell.set_property('cell-background', '#E5E5E5') _cell.set_property('editable', 0) _cell.set_property('wrap-width', 650) _cell.set_property('wrap-mode', pango.WRAP_WORD_CHAR) _cell.set_property('yalign', 0.1) _column.pack_start(_cell, True) _column.set_attributes(_cell, markup=1) _cell = gtk.CellRendererToggle() _cell.set_property('activatable', 1) _cell.set_property('cell-background', '#E5E5E5') _cell.connect('toggled', self._do_edit_cell, None, None, _model, _index) _column.pack_start(_cell, True) _column.set_attributes(_cell, active=2) _column.set_sizing(gtk.TREE_VIEW_COLUMN_AUTOSIZE) _treeview.append_column(_column) _model = self.tvwClear.get_model() _model.clear() for _index, _clear in enumerate(_lst_clear): _model.append( [_index, "<span weight='bold'>" + _clear + "</span>", 0]) _model = self.tvwComplete.get_model() _model.clear() for _index, _complete in enumerate(_lst_complete): _model.append( [_index, "<span weight='bold'>" + _complete + "</span>", 0]) _model = self.tvwConsistent.get_model() _model.clear() for _index, _consistent in enumerate(_lst_consistent): _model.append( [_index, "<span weight='bold'>" + _consistent + "</span>", 0]) _model = self.tvwVerifiable.get_model() _model.clear() for _index, _verifiable in enumerate(_lst_verifiable): _model.append( [_index, "<span weight='bold'>" + _verifiable + "</span>", 0]) # Insert the tab. _label = gtk.Label() _label.set_markup("<span weight='bold'>" + _(u"Analysis") + "</span>") _label.set_alignment(xalign=0.5, yalign=0.5) _label.set_justify(gtk.JUSTIFY_CENTER) _label.set_tooltip_text(_(u"Analyzes the selected requirement.")) _label.show_all() self.hbx_tab_label.pack_start(_label) return _hpaned