Beispiel #1
0
  def __init__(self,parent):
    BasePanel.__init__(self,parent,USECASE_ID)
    b = Borg()
    self.dbProxy = b.dbProxy
    mainSizer = wx.BoxSizer(wx.VERTICAL)

    summBoxSizer = wx.BoxSizer(wx.HORIZONTAL)
    mainSizer.Add(summBoxSizer,0,wx.EXPAND)
    summBoxSizer.Add(self.buildTextSizer('Name',(87,30),USECASE_TEXTNAME_ID),1,wx.EXPAND)
    summBoxSizer.Add(self.buildTextSizer('Code',(87,30),USECASE_TEXTSHORTCODE_ID),1,wx.EXPAND)
    mainSizer.Add(self.buildTagCtrlSizer((87,30),USECASE_TAGS_ID),0,wx.EXPAND)
    mainSizer.Add(self.buildTextSizer('Author/s',(87,30),USECASE_TEXTAUTHOR_ID),0,wx.EXPAND)

    objtBoxSizer = wx.BoxSizer(wx.HORIZONTAL)
    mainSizer.Add(objtBoxSizer,0,wx.EXPAND)
    objtBoxSizer.Add(self.buildMLTextSizer('Description',(87,60),USECASE_TEXTDESCRIPTION_ID),1,wx.EXPAND)

    roleBox = wx.StaticBox(self)
    roleSizer = wx.StaticBoxSizer(roleBox,wx.HORIZONTAL)
    self.roleList = DimensionListCtrl(self,USECASE_LISTACTORS_ID,wx.DefaultSize,'Actor','role',self.dbProxy)
    roleSizer.Add(self.roleList,1,wx.EXPAND)
    objtBoxSizer.Add(roleSizer,1,wx.EXPAND)

    self.environmentPanel = UseCaseEnvironmentPanel(self)
    mainSizer.Add(self.environmentPanel,1,wx.EXPAND)
    self.SetSizer(mainSizer)
 def __init__(self, parent, cvName):
     BasePanel.__init__(self, parent, WEAKNESSTREATMENT_ID)
     self.theViewName = cvName
     b = Borg()
     self.dbProxy = b.dbProxy
     self.theGoalIndicator = 0
     reqList = self.dbProxy.componentViewRequirements(cvName)
     assetList = []
     effValues = ["None", "Low", "Medium", "High"]
     mainSizer = wx.BoxSizer(wx.VERTICAL)
     mainSizer.Add(
         self.buildRadioButtonSizer(
             "Type",
             (87, 30),
             [(WEAKNESSTREATMENT_RADIOGOAL_ID, "Goal"), (WEAKNESSTREATMENT_RADIOREQUIREMENT_ID, "Requirement")],
         )
     )
     mainSizer.Add(self.buildComboSizerList("", (87, 30), WEAKNESSTREATMENT_COMBOREQGOAL_ID, reqList), 0, wx.EXPAND)
     mainSizer.Add(
         self.buildComboSizerList("Asset", (87, 30), WEAKNESSTREATMENT_COMBOASSET_ID, assetList), 0, wx.EXPAND
     )
     mainSizer.Add(
         self.buildComboSizerList("Effectiveness", (87, 30), WEAKNESSTREATMENT_COMBOEFFECTIVENESS_ID, effValues),
         0,
         wx.EXPAND,
     )
     mainSizer.Add(self.buildMLTextSizer("Rationale", (87, 60), WEAKNESSTREATMENT_TEXTRATIONALE_ID), 1, wx.EXPAND)
     mainSizer.Add(self.buildCommitButtonSizer(WEAKNESSTREATMENT_BUTTONCOMMIT_ID, False), 0, wx.CENTER)
     self.SetSizer(mainSizer)
     reqCtrl = self.FindWindowById(WEAKNESSTREATMENT_COMBOREQGOAL_ID)
     reqCtrl.Bind(wx.EVT_COMBOBOX, self.onRequirementChange)
     wx.EVT_RADIOBUTTON(self, WEAKNESSTREATMENT_RADIOGOAL_ID, self.onGoalSelected)
     wx.EVT_RADIOBUTTON(self, WEAKNESSTREATMENT_RADIOREQUIREMENT_ID, self.onRequirementSelected)
     reqRadioCtrl = self.FindWindowById(WEAKNESSTREATMENT_RADIOREQUIREMENT_ID)
     reqRadioCtrl.SetValue(True)
  def __init__(self,parent,goalName,obsName,envName):
    BasePanel.__init__(self,parent,armid.GOALOBSTACLE_ID)
    self.theAssetId = None
    b = Borg()
    self.dbProxy = b.dbProxy

    mainSizer = wx.BoxSizer(wx.VERTICAL)
    mainSizer.Add(self.buildMLTextSizer('Goal',(87,30),armid.GOALOBSTACLE_TEXTGOAL_ID,True),1,wx.EXPAND)
    mainSizer.Add(self.buildMLTextSizer('Obstacle',(87,30),armid.GOALOBSTACLE_TEXTOBSTACLE_ID,True),1,wx.EXPAND)

    buttonSizer = wx.BoxSizer(wx.HORIZONTAL)
    addButton = wx.Button(self,armid.GOALOBSTACLE_BUTTONADD_ID,"Add")
    buttonSizer.Add(addButton)
    ignoreButton = wx.Button(self,armid.GOALOBSTACLE_BUTTONIGNORE_ID,"Ignore")
    buttonSizer.Add(ignoreButton)
    mainSizer.Add(buttonSizer,0,wx.CENTER)

    goalId = b.dbProxy.getDimensionId(goalName,'template_goal')
    envId = b.dbProxy.getDimensionId(envName,'environment')
    goalDef = b.dbProxy.templateGoalDefinition(goalId)
    goalCtrl = self.FindWindowById(armid.GOALOBSTACLE_TEXTGOAL_ID)
    goalCtrl.SetValue(goalDef)

    obsId = b.dbProxy.getDimensionId(obsName,'obstacle')
    obsTuple = b.dbProxy.obstacleDefinition(obsId,envId)
    obsDef = obsTuple[0]
    obsCtrl = self.FindWindowById(armid.GOALOBSTACLE_TEXTOBSTACLE_ID)
    obsCtrl.SetValue(obsDef)

    self.SetSizer(mainSizer)
Beispiel #4
0
 def __init__(self, parent):
     BasePanel.__init__(self, parent, RISK_ID)
     b = Borg()
     self.dbProxy = b.dbProxy
     self.theThreats = self.dbProxy.getDimensions('threat')
     self.theVulnerabilities = self.dbProxy.getDimensions('vulnerability')
     self.detailsList = []
Beispiel #5
0
    def __init__(self, parent, personaName, codeNet):
        BasePanel.__init__(self, parent, CODENETWORK_ID)
        b = Borg()
        self.dbProxy = b.dbProxy
        self.theCodeNetwork = codeNet

        self.theViewMenu = wx.Menu()
        self.theViewMenu.Append(CNV_MENU_ADD_ID, 'Add')
        self.theViewMenu.Append(CNV_MENU_EDIT_ID, 'Edit')
        wx.EVT_MENU(self, CNV_MENU_ADD_ID, self.onAddRelationship)
        wx.EVT_MENU(self, CNV_MENU_EDIT_ID, self.onEditRelationship)

        mainSizer = wx.BoxSizer(wx.VERTICAL)
        personas = self.dbProxy.getDimensionNames('persona')
        mainSizer.Add(
            self.buildComboSizerList('Persona', (87, 30),
                                     CODENETWORK_COMBOPERSONA_ID, personas), 0,
            wx.EXPAND)

        cnBox = wx.StaticBox(self, -1, 'Code Network')
        cnSizer = wx.StaticBoxSizer(cnBox, wx.HORIZONTAL)
        mainSizer.Add(cnSizer, 1, wx.EXPAND)
        self.codeNetView = CodeNetworkView(self, CODENETWORK_IMAGENETWORK_ID)
        self.codeNetView.Bind(wx.EVT_RIGHT_DOWN, self.onRightDown)
        self.codeNetView.reloadImage()
        cnSizer.Add(self.codeNetView, 1, wx.EXPAND)

        self.personaCtrl = self.FindWindowById(CODENETWORK_COMBOPERSONA_ID)
        self.personaCtrl.SetValue(personaName)
        self.personaCtrl.Bind(wx.EVT_COMBOBOX, self.onPersonaChange)
        self.SetSizer(mainSizer)
Beispiel #6
0
 def __init__(self,parent):
   BasePanel.__init__(self,parent,armid.RISK_ID)
   b = Borg()
   self.dbProxy = b.dbProxy
   self.theThreats = self.dbProxy.getDimensions('threat')
   self.theVulnerabilities = self.dbProxy.getDimensions('vulnerability')
   self.detailsList = []
Beispiel #7
0
  def __init__(self,parent):
    BasePanel.__init__(self,parent,USECASE_ID)
    b = Borg()
    self.dbProxy = b.dbProxy
    mainSizer = wx.BoxSizer(wx.VERTICAL)

    summBoxSizer = wx.BoxSizer(wx.HORIZONTAL)
    mainSizer.Add(summBoxSizer,0,wx.EXPAND)
    summBoxSizer.Add(self.buildTextSizer('Name',(87,30),USECASE_TEXTNAME_ID),1,wx.EXPAND)
    summBoxSizer.Add(self.buildTextSizer('Code',(87,30),USECASE_TEXTSHORTCODE_ID),1,wx.EXPAND)
    mainSizer.Add(self.buildTagCtrlSizer((87,30),USECASE_TAGS_ID),0,wx.EXPAND)
    mainSizer.Add(self.buildTextSizer('Author/s',(87,30),USECASE_TEXTAUTHOR_ID),0,wx.EXPAND)

    objtBoxSizer = wx.BoxSizer(wx.HORIZONTAL)
    mainSizer.Add(objtBoxSizer,0,wx.EXPAND)
    objtBoxSizer.Add(self.buildMLTextSizer('Description',(87,60),USECASE_TEXTDESCRIPTION_ID),1,wx.EXPAND)

    roleBox = wx.StaticBox(self)
    roleSizer = wx.StaticBoxSizer(roleBox,wx.HORIZONTAL)
    self.roleList = DimensionListCtrl(self,USECASE_LISTACTORS_ID,wx.DefaultSize,'Actor','role',self.dbProxy)
    roleSizer.Add(self.roleList,1,wx.EXPAND)
    objtBoxSizer.Add(roleSizer,1,wx.EXPAND)

    self.environmentPanel = UseCaseEnvironmentPanel(self)
    mainSizer.Add(self.environmentPanel,1,wx.EXPAND)
    self.SetSizer(mainSizer)
Beispiel #8
0
    def __init__(self, parent, goalName, obsName, envName):
        BasePanel.__init__(self, parent, GOALOBSTACLE_ID)
        self.theAssetId = None
        b = Borg()
        self.dbProxy = b.dbProxy

        mainSizer = wx.BoxSizer(wx.VERTICAL)
        mainSizer.Add(self.buildMLTextSizer("Goal", (87, 30), GOALOBSTACLE_TEXTGOAL_ID, True), 1, wx.EXPAND)
        mainSizer.Add(self.buildMLTextSizer("Obstacle", (87, 30), GOALOBSTACLE_TEXTOBSTACLE_ID, True), 1, wx.EXPAND)

        buttonSizer = wx.BoxSizer(wx.HORIZONTAL)
        addButton = wx.Button(self, GOALOBSTACLE_BUTTONADD_ID, "Add")
        buttonSizer.Add(addButton)
        ignoreButton = wx.Button(self, GOALOBSTACLE_BUTTONIGNORE_ID, "Ignore")
        buttonSizer.Add(ignoreButton)
        mainSizer.Add(buttonSizer, 0, wx.CENTER)

        goalId = b.dbProxy.getDimensionId(goalName, "template_goal")
        envId = b.dbProxy.getDimensionId(envName, "environment")
        goalDef = b.dbProxy.templateGoalDefinition(goalId)
        goalCtrl = self.FindWindowById(GOALOBSTACLE_TEXTGOAL_ID)
        goalCtrl.SetValue(goalDef)

        obsId = b.dbProxy.getDimensionId(obsName, "obstacle")
        obsTuple = b.dbProxy.obstacleDefinition(obsId, envId)
        obsDef = obsTuple[0]
        obsCtrl = self.FindWindowById(GOALOBSTACLE_TEXTOBSTACLE_ID)
        obsCtrl.SetValue(obsDef)

        self.SetSizer(mainSizer)
 def __init__(self, parent):
     BasePanel.__init__(self, parent, REFERENCECONTRIBUTION_ID)
     b = Borg()
     self.dbProxy = b.dbProxy
     mainSizer = wx.BoxSizer(wx.VERTICAL)
     refSynopses = self.dbProxy.getDimensionNames('reference_synopsis')
     mainSizer.Add(
         self.buildComboSizerList('Source', (87, 30),
                                  REFERENCECONTRIBUTION_COMBOSOURCE_ID,
                                  refSynopses), 0, wx.EXPAND)
     charSynopses = self.dbProxy.getDimensionNames(
         'characteristic_synopsis')
     mainSizer.Add(
         self.buildComboSizerList(
             'Destination', (87, 30),
             REFERENCECONTRIBUTION_COMBODESTINATION_ID, charSynopses), 0,
         wx.EXPAND)
     mainSizer.Add(
         self.buildComboSizerList('Means/End', (87, 30),
                                  REFERENCECONTRIBUTION_COMBOMEANSEND_ID,
                                  ['means', 'end']), 0, wx.EXPAND)
     contType = [
         'Make', 'SomePositive', 'Help', 'Hurt', 'SomeNegative', 'Break'
     ]
     mainSizer.Add(
         self.buildComboSizerList(
             'Contribution', (87, 30),
             REFERENCECONTRIBUTION_COMBOCONTRIBUTION_ID, contType), 0,
         wx.EXPAND)
     mainSizer.Add(
         self.buildCommitButtonSizer(REFERENCECONTRIBUTION_BUTTONCOMMIT_ID,
                                     True), 0, wx.ALIGN_CENTER)
     self.SetSizer(mainSizer)
Beispiel #10
0
  def __init__(self,parent,isCreate):
    BasePanel.__init__(self,parent,armid.IMPLIEDPROCESS_ID)
    b = Borg()
    self.dbProxy = b.dbProxy
    self.theSelectedSet = set([])
    self.theGraphName = 'impliedProc'

    mainSizer = wx.BoxSizer(wx.VERTICAL)
    personas = self.dbProxy.getDimensionNames('persona')
    mainSizer.Add(self.buildComboSizerList('Persona',(87,30),armid.IMPLIEDPROCESS_COMBOPERSONA_ID,personas),0,wx.EXPAND)

    cnBox = wx.StaticBox(self,-1,'Code Network')
    cnSizer = wx.StaticBoxSizer(cnBox,wx.HORIZONTAL)
    mainSizer.Add(cnSizer,1,wx.EXPAND)
    self.codeNetView = CodeNetworkView(self,armid.IMPLIEDPROCESS_IMAGENETWORK_ID,self.theGraphName)

    cnSizer.Add(self.codeNetView,1,wx.EXPAND)

    idnSizer = wx.BoxSizer(wx.HORIZONTAL)
    mainSizer.Add(idnSizer,1,wx.EXPAND)
    idnSizer.Add(ImpliedProcessNotebook(self),1,wx.EXPAND)

    self.codeRelationships = self.FindWindowById(armid.IMPLIEDPROCESS_LISTRELATIONSHIPS_ID)
    self.codeRelationships.Bind(wx.EVT_LIST_ITEM_SELECTED,self.onRelationshipAdded)
    self.codeRelationships.Bind(wx.EVT_LIST_ITEM_DESELECTED,self.onRelationshipRemoved)

    self.personaCtrl = self.FindWindowById(armid.IMPLIEDPROCESS_COMBOPERSONA_ID)
    self.personaCtrl.Bind(wx.EVT_COMBOBOX,self.onPersonaChange)

    mainSizer.Add(self.buildCommitButtonSizer(armid.IMPLIEDPROCESS_BUTTONCOMMIT_ID,isCreate),0,wx.ALIGN_CENTER)

    self.SetSizer(mainSizer)
  def __init__(self,parent,personaName,codeNet):
    BasePanel.__init__(self,parent,armid.CODENETWORK_ID)
    b = Borg()
    self.dbProxy = b.dbProxy
    self.theCodeNetwork = codeNet

    self.theViewMenu = wx.Menu()
    self.theViewMenu.Append(armid.CNV_MENU_ADD_ID,'Add')
    self.theViewMenu.Append(armid.CNV_MENU_EDIT_ID,'Edit')
    wx.EVT_MENU(self,armid.CNV_MENU_ADD_ID,self.onAddRelationship)
    wx.EVT_MENU(self,armid.CNV_MENU_EDIT_ID,self.onEditRelationship)

    mainSizer = wx.BoxSizer(wx.VERTICAL)
    personas = self.dbProxy.getDimensionNames('persona')
    mainSizer.Add(self.buildComboSizerList('Persona',(87,30),armid.CODENETWORK_COMBOPERSONA_ID,personas),0,wx.EXPAND)

    cnBox = wx.StaticBox(self,-1,'Code Network')
    cnSizer = wx.StaticBoxSizer(cnBox,wx.HORIZONTAL)
    mainSizer.Add(cnSizer,1,wx.EXPAND)
    self.codeNetView = CodeNetworkView(self,armid.CODENETWORK_IMAGENETWORK_ID)
    self.codeNetView.Bind(wx.EVT_RIGHT_DOWN,self.onRightDown)
    self.codeNetView.reloadImage()
    cnSizer.Add(self.codeNetView,1,wx.EXPAND)

    self.personaCtrl = self.FindWindowById(armid.CODENETWORK_COMBOPERSONA_ID)
    self.personaCtrl.SetValue(personaName)
    self.personaCtrl.Bind(wx.EVT_COMBOBOX,self.onPersonaChange)
    self.SetSizer(mainSizer)
    def __init__(self, parent):
        BasePanel.__init__(self, parent, armid.INTERFACELISTDIALOG_ID)
        b = Borg()
        mainSizer = wx.BoxSizer(wx.VERTICAL)
        ifList = b.dbProxy.getDimensionNames('interface')
        mainSizer.Add(
            self.buildComboSizerList('Name', (87, 30),
                                     armid.INTERFACELISTDIALOG_COMBONAME_ID,
                                     ifList), 0, wx.EXPAND)
        mainSizer.Add(
            self.buildComboSizerList('Type', (87, 30),
                                     armid.INTERFACELISTDIALOG_COMBOTYPE_ID,
                                     ['provided', 'required']), 0, wx.EXPAND)
        metricsSizer = wx.BoxSizer(wx.HORIZONTAL)
        mainSizer.Add(metricsSizer, 0, wx.EXPAND)
        arList = b.dbProxy.getDimensionNames('access_right')
        pList = b.dbProxy.getDimensionNames('privilege')
        metricsSizer.Add(
            self.buildComboSizerList(
                'Access Right', (87, 30),
                armid.INTERFACELISTDIALOG_COMBOACCESSRIGHT_ID, arList), 1,
            wx.EXPAND)
        metricsSizer.Add(
            self.buildComboSizerList(
                'Privilege', (87, 30),
                armid.INTERFACELISTDIALOG_COMBOPRIVILEGE_ID, pList), 1,
            wx.EXPAND)

        mainSizer.Add(wx.StaticText(self, -1, ''), 1, wx.EXPAND)
        mainSizer.Add(self.buildCommitButtonSizer(wx.ID_OK, True), 0,
                      wx.CENTER)
        self.SetSizer(mainSizer)
Beispiel #13
0
 def __init__(self,parent):
   BasePanel.__init__(self,parent,-1)
   topSizer = wx.BoxSizer(wx.VERTICAL)
   topSizer.Add(self.buildTextSizer('Name',(87,30),CODE_TEXTNAME_ID),0,wx.EXPAND)
   topSizer.Add(self.buildComboSizerList('Type',(87,30),CODE_COMBOTYPE_ID,['event','context']),0,wx.EXPAND)
   topSizer.Add(self.buildMLTextSizer('Description',(87,30),CODE_TEXTDESCRIPTION_ID),1,wx.EXPAND)
   topSizer.Add(self.buildCloseButtonSizer(),0,wx.EXPAND)
   self.SetSizer(topSizer)
Beispiel #14
0
 def __init__(self, parent):
     BasePanel.__init__(self, parent, QUOTATION_ID)
     mainSizer = wx.BoxSizer(wx.VERTICAL)
     mainSizer.Add(QuotationNotebook(self), 1, wx.EXPAND)
     mainSizer.Add(
         self.buildCommitButtonSizer(QUOTATION_BUTTONCOMMIT_ID, False), 0,
         wx.ALIGN_CENTER)
     self.SetSizer(mainSizer)
Beispiel #15
0
 def __init__(self, parent):
     BasePanel.__init__(self, parent, -1)
     topSizer = wx.BoxSizer(wx.VERTICAL)
     topSizer.Add(self.buildTextSizer("Name", (87, 30), armid.CODE_TEXTNAME_ID), 0, wx.EXPAND)
     topSizer.Add(
         self.buildComboSizerList("Type", (87, 30), armid.CODE_COMBOTYPE_ID, ["event", "context"]), 0, wx.EXPAND
     )
     topSizer.Add(self.buildMLTextSizer("Description", (87, 30), armid.CODE_TEXTDESCRIPTION_ID), 1, wx.EXPAND)
     self.SetSizer(topSizer)
Beispiel #16
0
 def __init__(self, parent):
     BasePanel.__init__(self, parent, -1)
     topSizer = wx.BoxSizer(wx.VERTICAL)
     topSizer.Add(
         self.buildTextSizer('Label', (87, 30), QUOTATION_TEXTLABEL_ID), 0,
         wx.EXPAND)
     topSizer.Add(
         self.buildMLTextSizer('Synopsis', (87, 30),
                               QUOTATION_TEXTSYNOPSIS_ID), 1, wx.EXPAND)
     self.SetSizer(topSizer)
 def __init__(self,parent):
   BasePanel.__init__(self,parent,-1)
   topSizer = wx.BoxSizer(wx.VERTICAL)
   topSizer.Add(self.buildTextSizer('Code',(87,30),QUOTATION_TEXTCODE_ID,'',True),0,wx.EXPAND)
   artBoxSizer = wx.BoxSizer(wx.HORIZONTAL)
   topSizer.Add(artBoxSizer,0,wx.EXPAND)
   artBoxSizer.Add(self.buildTextSizer('Artifact Type',(87,30),QUOTATION_TEXTARTIFACTTYPE_ID,'',True),1,wx.EXPAND)
   artBoxSizer.Add(self.buildTextSizer('Name',(87,30),QUOTATION_TEXTARTIFACTNAME_ID,'',True),1,wx.EXPAND)
   topSizer.Add(self.buildMLTextSizer('Source',(87,30),QUOTATION_TEXTSOURCE_ID),1,wx.EXPAND)
   self.SetSizer(topSizer)
Beispiel #18
0
    def __init__(self, archivos=False):

        gtk.Window.__init__(self)

        self.set_title("Batovide")
        self.set_icon_from_file(os.path.join(PATH, "Iconos", "bide.svg"))
        self.set_resizable(True)
        self.set_size_request(640, 480)
        self.set_border_width(5)
        self.set_position(gtk.WIN_POS_CENTER)

        accel_group = gtk.AccelGroup()
        self.add_accel_group(accel_group)

        self.updater = False
        self.sourceview = False

        base_widget = gtk.VBox()

        self.menu = Menu(accel_group)
        self.base_panel = BasePanel()

        base_widget.pack_start(self.menu, False, False, 0)
        base_widget.pack_start(self.base_panel, True, True, 0)

        self.add(base_widget)

        self.show_all()

        self.maximize()

        self.menu.connect('accion_ver', self.__ejecutar_accion_ver)
        self.menu.connect('accion_codigo', self.__ejecutar_accion_codigo)
        self.menu.connect('accion_proyecto', self.__ejecutar_accion_proyecto)
        self.menu.connect('accion_archivo', self.__ejecutar_accion_archivo)

        self.base_panel.connect("update", self.__new_handler)

        self.connect("destroy", self.__exit)

        # Cuando se abre el editor con archivo como parámetro.
        if archivos:
            for archivo in archivos:
                if os.path.exists(archivo):
                    if os.path.isfile(archivo):
                        extension = os.path.splitext(
                            os.path.split(archivo)[1])[1]

                        if extension == ".ide":
                            gobject.idle_add(
                                self.base_panel.external_open_proyect, archivo)

                        else:
                            gobject.idle_add(
                                self.base_panel.external_open_file, archivo)
Beispiel #19
0
 def __init__(self,parent,goalName,goalDef,goalCat,goalPri,goalFc,goalIssue,goalOrig,goalAssets,envName):
   BasePanel.__init__(self,parent,armid.GOAL_ID)
   mainSizer = wx.BoxSizer(wx.VERTICAL)
   mainSizer.Add(self.buildTextSizer('Name',(87,30),armid.GOAL_TEXTNAME_ID),0,wx.EXPAND)
   mainSizer.Add(self.buildTextSizer('Originator',(87,30),armid.GOAL_TEXTORIGINATOR_ID),0,wx.EXPAND)
   self.environmentPanel = ReqToGoalEnvironmentPanel(self,goalDef,goalCat,goalPri,goalFc,goalIssue,goalAssets,envName)
   mainSizer.Add(self.environmentPanel,1,wx.EXPAND)
   mainSizer.Add(self.buildCommitButtonSizer(armid.GOAL_BUTTONCOMMIT_ID,True),0,wx.CENTER)
   origCtrl = self.FindWindowById(armid.GOAL_TEXTORIGINATOR_ID)
   origCtrl.SetValue(goalOrig)
   self.SetSizer(mainSizer)
 def __init__(self,parent):
   BasePanel.__init__(self,parent,COUNTERMEASURE_ID)
   b = Borg()
   self.dbProxy = b.dbProxy
   self.theCountermeasureName = ''
   self.theTags = []
   self.theCountermeasureDescription = ''
   self.theCountermeasureType = ''
   self.theCommitVerb = 'Create'
   self.environmentPanel = CountermeasureEnvironmentPanel(self,self.dbProxy)
   self.theEnvironmentProperties = []
 def __init__(self, parent):
     BasePanel.__init__(self, parent, -1)
     topSizer = wx.BoxSizer(wx.VERTICAL)
     topSizer.Add(
         self.buildTextSizer('Name', (87, 30),
                             INTERNALDOCUMENT_TEXTNAME_ID), 0, wx.EXPAND)
     topSizer.Add(
         self.buildMLTextSizer('Description', (87, 30),
                               INTERNALDOCUMENT_TEXTDESCRIPTION_ID), 1,
         wx.EXPAND)
     self.SetSizer(topSizer)
 def __init__(self, parent, appl, controller):
     '''
     Constructor
     '''
     DebugLog.info_print("Construct main Panel")
     self.hide_show = True
     BasePanel.__init__(self, parent, appl, controller)
     self.pack()
     self.msg_decoder = MsgCodec()
     self.after(2000, self.updateUI)
     self.call_count = 0
Beispiel #23
0
 def __init__(self,parent,responseType,panel):
   BasePanel.__init__(self,parent,armid.RESPONSE_ID)
   b = Borg()
   self.dbProxy = b.dbProxy
   self.theResponseName = ''
   self.theRiskName = ''
   self.theTags = []
   self.theCommitVerb = 'Create'
   self.environmentPanel = panel(self,self.dbProxy)
   self.theEnvironmentProperties = []
   self.theResponseVerb = responseType
Beispiel #24
0
  def __init__(self,parent):
    BasePanel.__init__(self,parent,armid.TRACEABILITY_ID)
    b = Borg()
    self.dbProxy = b.dbProxy
    self.traces = self.dbProxy.riskAnalysisModel(initContxt)

    mainSizer = wx.BoxSizer(wx.VERTICAL)
    columnList = ['From','Name','To','Name']
    mainSizer.Add(self.buildTraceListCtrl(self,armid.TRACEABILITY_LISTTRACES_ID,columnList,self.traces),1,wx.EXPAND)
    mainSizer.Add(self.buildAddDeleteCloseButtonSizer(self,armid.TRACEABILITY_BUTTONADD_ID,armid.TRACEABILITY_BUTTONDELETE_ID,wx.HORIZONTAL),0,wx.EXPAND | wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)
Beispiel #25
0
  def __init__(self,parent):
    BasePanel.__init__(self,parent,TRACEABILITY_ID)
    b = Borg()
    self.dbProxy = b.dbProxy
    self.traces = self.dbProxy.riskAnalysisModel(initContxt)

    mainSizer = wx.BoxSizer(wx.VERTICAL)
    columnList = ['From','Name','To','Name']
    mainSizer.Add(self.buildTraceListCtrl(self,TRACEABILITY_LISTTRACES_ID,columnList,self.traces),1,wx.EXPAND)
    mainSizer.Add(self.buildAddDeleteCloseButtonSizer(self,TRACEABILITY_BUTTONADD_ID,TRACEABILITY_BUTTONDELETE_ID,wx.HORIZONTAL),0,wx.EXPAND | wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)
Beispiel #26
0
 def __init__(self, parent):
     BasePanel.__init__(self, parent, COUNTERMEASURE_ID)
     b = Borg()
     self.dbProxy = b.dbProxy
     self.theCountermeasureName = ''
     self.theTags = []
     self.theCountermeasureDescription = ''
     self.theCountermeasureType = ''
     self.theCommitVerb = 'Create'
     self.environmentPanel = CountermeasureEnvironmentPanel(
         self, self.dbProxy)
     self.theEnvironmentProperties = []
Beispiel #27
0
 def __init__(self, parent, responseType, panel):
     BasePanel.__init__(self, parent, RESPONSE_ID)
     b = Borg()
     self.dbProxy = b.dbProxy
     self.theResponseName = ''
     self.theRiskName = ''
     self.theTags = []
     self.theCommitVerb = 'Create'
     self.environmentPanel = panel(self, self.dbProxy)
     self.environmentPanel.Disable()
     self.theEnvironmentProperties = []
     self.theResponseVerb = responseType
  def __init__(self,parent,pName,fromCode,toCode,rtName):
    BasePanel.__init__(self,parent,IMPLIEDCHARACTERISTIC_ID)
    b = Borg()
    self.dbProxy = b.dbProxy
    
    charName = ''
    qualName = 'Unknown'
    varName = 'Intrinsic'

    try:
      charName,qualName,varName = self.dbProxy.impliedCharacteristic(pName,fromCode,toCode,rtName)
    except NoImpliedCharacteristic, e:
      self.dbProxy.initialiseImpliedCharacteristic(pName,fromCode,toCode,rtName)
 def __init__(self,parent):
   BasePanel.__init__(self,parent,REFERENCECONTRIBUTION_ID)
   b = Borg()
   self.dbProxy = b.dbProxy
   mainSizer = wx.BoxSizer(wx.VERTICAL)
   refSynopses = self.dbProxy.getDimensionNames('reference_synopsis')
   mainSizer.Add(self.buildComboSizerList('Source',(87,30),REFERENCECONTRIBUTION_COMBOSOURCE_ID,refSynopses),0,wx.EXPAND)
   charSynopses = self.dbProxy.getDimensionNames('characteristic_synopsis')
   mainSizer.Add(self.buildComboSizerList('Destination',(87,30),REFERENCECONTRIBUTION_COMBODESTINATION_ID,charSynopses),0,wx.EXPAND)
   mainSizer.Add(self.buildComboSizerList('Means/End',(87,30),REFERENCECONTRIBUTION_COMBOMEANSEND_ID,['means','end']),0,wx.EXPAND)
   contType = ['Make','SomePositive','Help','Hurt','SomeNegative','Break']
   mainSizer.Add(self.buildComboSizerList('Contribution',(87,30),REFERENCECONTRIBUTION_COMBOCONTRIBUTION_ID,contType),0,wx.EXPAND)
   mainSizer.Add(self.buildCommitButtonSizer(REFERENCECONTRIBUTION_BUTTONCOMMIT_ID,True),0,wx.ALIGN_CENTER)
   self.SetSizer(mainSizer)
Beispiel #30
0
    def __init__(self):

        gtk.Window.__init__(self)

        self.set_title("JAMediaVideo")
        self.set_icon_from_file(os.path.join(BASE_PATH,
            "Iconos", "JAMediaVideo.svg"))
        self.set_resizable(True)
        self.set_default_size(437, 328)
        self.set_border_width(4)
        self.modify_bg(0, get_colors("toolbars"))
        self.set_position(gtk.WIN_POS_CENTER)

        self.pistas = []

        vbox = gtk.VBox()
        self.add(vbox)
        self.show_all()

        self.toolbar = Toolbar()
        self.toolbar_salir = ToolbarSalir()
        self.toolbar_accion = ToolbarAccion()
        self.base_panel = BasePanel()

        vbox.pack_start(self.toolbar, False, True, 4)
        vbox.pack_start(self.toolbar_salir, False, True, 4)
        vbox.pack_start(self.toolbar_accion, False, True, 4)
        vbox.pack_start(self.base_panel, True, True, 0)

        self.toolbar.connect("accion", self.__set_accion)
        self.toolbar.connect('salir', self.__confirmar_salir)
        self.toolbar.connect("config-show", self.__config_show)
        self.toolbar.connect("mode-change", self.__mode_change)

        self.toolbar_salir.connect('salir', self.__salir)
        self.base_panel.connect("accion-list", self.__accion_list)
        self.base_panel.connect("in-run", self.__jamediaconvert_in_run)
        self.base_panel.connect("pendientes", self.__jamediaconvert_info)
        self.base_panel.connect("cancel-toolbars", self.__cancel_toolbars)

        self.toolbar_accion.connect("aviso", self.__update_accions)

        self.connect("delete-event", self.__salir)

        self.show_all()
        self.realize()

        gobject.idle_add(self.__run)
        print "JAMediaVideo process:", os.getpid()
    def __init__(self, parent, pName, fromCode, toCode, rtName):
        BasePanel.__init__(self, parent, IMPLIEDCHARACTERISTIC_ID)
        b = Borg()
        self.dbProxy = b.dbProxy

        charName = ''
        qualName = 'Unknown'
        varName = 'Intrinsic'

        try:
            charName, qualName, varName = self.dbProxy.impliedCharacteristic(
                pName, fromCode, toCode, rtName)
        except NoImpliedCharacteristic, e:
            self.dbProxy.initialiseImpliedCharacteristic(
                pName, fromCode, toCode, rtName)
Beispiel #32
0
  def __init__(self,parent,refName,descName,dimName):
    BasePanel.__init__(self,parent,CHARACTERISTICREFERENCEPANEL_ID)
    self.theId = None
    b = Borg()
    self.dbProxy = b.dbProxy
    isCreate = True
    self.newArtifactString = '[New artifact reference]'
    self.newConceptString = '[New concept reference]'
    
    mainSizer = wx.BoxSizer(wx.VERTICAL)

    dims = ['document','asset','attacker','countermeasure','domainproperty','environment','goal','misusecase','obstacle','persona','requirement','response','risk','role','task','threat','vulnerability']
    mainSizer.Add(self.buildComboSizerList('Type',(87,30),CHARACTERISTICREFERENCE_COMBODIMENSION_ID,dims),0,wx.EXPAND)
    mainSizer.Add(self.buildComboSizerList('Artifact',(87,30),CHARACTERISTICREFERENCE_COMBODOCUMENT_ID,[]),0,wx.EXPAND)

    self.docNameCtrl = self.FindWindowById(CHARACTERISTICREFERENCE_COMBODOCUMENT_ID)
    self.docNameCtrl.Disable()

    if (dimName != ''):
      dimCtrl = self.FindWindowById(CHARACTERISTICREFERENCE_COMBODIMENSION_ID)
      dimCtrl.SetValue(dimName)
      isCreate = False
       
    mainSizer.Add(self.buildComboSizerList('Reference',(87,30),CHARACTERISTICREFERENCE_COMBOREFERENCE_ID,[self.newArtifactString,self.newConceptString]),0,wx.EXPAND)

    mainSizer.Add(self.buildMLTextSizer('Description',(87,60),CHARACTERISTICREFERENCE_TEXTDESCRIPTION_ID),1,wx.EXPAND)
    descCtrl = self.FindWindowById(CHARACTERISTICREFERENCE_TEXTDESCRIPTION_ID)

    if (refName != ''):
      refCtrl = self.FindWindowById(CHARACTERISTICREFERENCE_COMBOREFERENCE_ID)
      refs = [self.newArtifactString,self.newConceptString]
      dimTable = dimName + '_reference'
      refs += self.dbProxy.getDimensionNames(dimTable)
      refCtrl.SetItems(refs)
      refCtrl.SetValue(refName)
      descCtrl.SetValue(descName)

    mainSizer.Add(self.buildCommitButtonSizer(CHARACTERISTICREFERENCE_BUTTONCOMMIT_ID,isCreate),0,wx.CENTER)

    if (dimName != ''):
      buttonCtrl = self.FindWindowById(CHARACTERISTICREFERENCE_BUTTONCOMMIT_ID)
      buttonCtrl.SetLabel('Edit')

    wx.EVT_COMBOBOX(self,CHARACTERISTICREFERENCE_COMBODIMENSION_ID,self.onDimensionChange)
    wx.EVT_COMBOBOX(self,CHARACTERISTICREFERENCE_COMBODOCUMENT_ID,self.onDocumentChange)
    wx.EVT_COMBOBOX(self,CHARACTERISTICREFERENCE_COMBOREFERENCE_ID,self.onReferenceChange)
    self.SetSizer(mainSizer)
    mainSizer.Layout()
Beispiel #33
0
    def __init__(self, parent):
        BasePanel.__init__(self, parent, QUOTATIONS_ID)
        b = Borg()
        self.dbProxy = b.dbProxy

        mainSizer = wx.BoxSizer(wx.VERTICAL)

        self.qlCtrl = QuotationListCtrl(self, QUOTATIONS_LISTQUOTATIONS_ID)
        self.qlCtrl.load(self.dbProxy.getQuotations())
        mainSizer.Add(self.qlCtrl, 1, wx.EXPAND)

        buttonSizer = wx.BoxSizer(wx.HORIZONTAL)
        okButton = wx.Button(self, wx.ID_OK, "Ok")
        buttonSizer.Add(okButton)
        mainSizer.Add(buttonSizer, 0, wx.CENTER)
        self.SetSizer(mainSizer)
Beispiel #34
0
  def __init__(self,parent):
    BasePanel.__init__(self,parent,armid.QUOTATIONS_ID)
    b = Borg()
    self.dbProxy = b.dbProxy

    mainSizer = wx.BoxSizer(wx.VERTICAL)

    self.qlCtrl = QuotationListCtrl(self,armid.QUOTATIONS_LISTQUOTATIONS_ID)
    self.qlCtrl.load(self.dbProxy.getQuotations())
    mainSizer.Add(self.qlCtrl,1,wx.EXPAND)

    buttonSizer = wx.BoxSizer(wx.HORIZONTAL)
    okButton = wx.Button(self,wx.ID_OK,"Ok")
    buttonSizer.Add(okButton)
    mainSizer.Add(buttonSizer,0,wx.CENTER)
    self.SetSizer(mainSizer)
Beispiel #35
0
    def __init__(self, archivos=[]):

        Gtk.Window.__init__(self)

        self.set_title("JAMediaEditor")
        self.set_icon_from_file(os.path.join(BASE_PATH, "Iconos", "JAMediaEditor.svg"))
        self.set_resizable(True)
        self.set_size_request(640, 480)
        self.set_border_width(5)
        self.set_position(Gtk.WindowPosition.CENTER)

        self._help = False

        accel_group = Gtk.AccelGroup()
        self.add_accel_group(accel_group)

        base_widget = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)

        self.menu = Menu(accel_group)
        self.base_panel = BasePanel()
        self.toolbar_estado = ToolbarEstado()
        self.jamediapygihack = JAMediaPyGiHack()

        base_widget.pack_start(self.menu, False, False, 0)
        base_widget.pack_start(self.base_panel, True, True, 0)
        base_widget.pack_start(self.jamediapygihack, True, True, 0)
        base_widget.pack_start(self.toolbar_estado, False, False, 0)

        self.add(base_widget)
        self.show_all()
        self.maximize()

        self.jamediapygihack.hide()

        self.menu.connect("accion_ver", self.__ejecutar_accion_ver)
        self.menu.connect("accion_codigo", self.__ejecutar_accion_codigo)
        self.menu.connect("accion_proyecto", self.__ejecutar_accion_proyecto)
        self.menu.connect("accion_archivo", self.__ejecutar_accion_archivo)
        self.menu.connect("run_jamediapygihack", self.__run_jamediapygihack)
        self.menu.connect("help", self.__run_help)
        self.jamediapygihack.connect("salir", self.__run_editor)
        self.jamediapygihack.connect("abrir", self.__open_modulo)
        self.base_panel.connect("update", self.__set_toolbar_archivo_and_menu)
        self.base_panel.connect("proyecto_abierto", self.__set_toolbar_proyecto_and_menu)
        self.base_panel.connect("ejecucion", self.__set_toolbars_ejecucion)
        self.base_panel.connect("help", self.__run_help)
        self.connect("delete-event", self.__exit)

        # Cuando se abre el editor con archivo como parámetro.
        for archivo in archivos:
            archivo = os.path.realpath(archivo)
            if os.path.exists(archivo):
                if os.path.isfile(archivo):
                    extension = os.path.splitext(os.path.split(archivo)[1])[1]
                    if extension == ".ide":
                        GLib.idle_add(self.base_panel.external_open_proyect, archivo)
                    else:
                        GLib.idle_add(self.base_panel.external_open_file, archivo)
        # FIXME: Agregar informe de utilizacion de recursos
        print "JAMediaEditor:", os.getpid()
  def __init__(self,parent):
    BasePanel.__init__(self,parent,INTERFACELISTDIALOG_ID)
    b = Borg()
    mainSizer = wx.BoxSizer(wx.VERTICAL)
    ifList = b.dbProxy.getDimensionNames('interface')
    mainSizer.Add(self.buildEditableComboSizerList('Name',(87,30),INTERFACELISTDIALOG_COMBONAME_ID,ifList),0,wx.EXPAND)
    mainSizer.Add(self.buildComboSizerList('Type',(87,30),INTERFACELISTDIALOG_COMBOTYPE_ID,['provided','required']),0,wx.EXPAND)
    metricsSizer = wx.BoxSizer(wx.HORIZONTAL)
    mainSizer.Add(metricsSizer,0,wx.EXPAND)
    arList = b.dbProxy.getDimensionNames('access_right')
    pList = b.dbProxy.getDimensionNames('privilege')
    metricsSizer.Add(self.buildComboSizerList('Access Right',(87,30),INTERFACELISTDIALOG_COMBOACCESSRIGHT_ID,arList),1,wx.EXPAND)
    metricsSizer.Add(self.buildComboSizerList('Privilege',(87,30),INTERFACELISTDIALOG_COMBOPRIVILEGE_ID,pList),1,wx.EXPAND)

    mainSizer.Add(wx.StaticText(self,-1,''),1,wx.EXPAND)
    mainSizer.Add(self.buildCommitButtonSizer(wx.ID_OK,True),0,wx.CENTER)
    self.SetSizer(mainSizer)
Beispiel #37
0
    def __init__(self, parent, cvName, envName):
        BasePanel.__init__(self, parent, WEAKNESSANALYSIS_ID)
        self.theAssetId = None
        mainSizer = wx.BoxSizer(wx.VERTICAL)
        nbBox = wx.StaticBox(self, -1)
        nbSizer = wx.StaticBoxSizer(nbBox, wx.VERTICAL)
        mainSizer.Add(nbSizer, 1, wx.EXPAND)
        nbSizer.Add(WeaknessAnalysisNotebook(self, cvName, envName), 1, wx.EXPAND)

        buttonSizer = wx.BoxSizer(wx.HORIZONTAL)
        applyButton = wx.Button(self, WEAKNESSANALYSIS_BUTTONCOMMIT_ID, "Apply")
        buttonSizer.Add(applyButton)
        closeButton = wx.Button(self, wx.ID_CANCEL, "Cancel")
        buttonSizer.Add(closeButton)
        mainSizer.Add(buttonSizer, 0, wx.CENTER)

        self.SetSizer(mainSizer)
Beispiel #38
0
 def __init__(self,parent,cvName):
   BasePanel.__init__(self,parent,armid.WEAKNESSTREATMENT_ID)
   self.theViewName = cvName
   b = Borg()
   self.dbProxy = b.dbProxy
   reqList = self.dbProxy.componentViewRequirements(cvName)
   assetList = []
   effValues = ['None','Low','Medium','High']
   mainSizer = wx.BoxSizer(wx.VERTICAL)
   mainSizer.Add(self.buildComboSizerList('Requirement',(87,30),armid.WEAKNESSTREATMENT_COMBOREQUIREMENT_ID,reqList),0,wx.EXPAND)
   mainSizer.Add(self.buildComboSizerList('Asset',(87,30),armid.WEAKNESSTREATMENT_COMBOASSET_ID,assetList),0,wx.EXPAND)
   mainSizer.Add(self.buildComboSizerList('Effectiveness',(87,30),armid.WEAKNESSTREATMENT_COMBOEFFECTIVENESS_ID,effValues),0,wx.EXPAND)
   mainSizer.Add(self.buildMLTextSizer('Rationale',(87,60),armid.WEAKNESSTREATMENT_TEXTRATIONALE_ID),1,wx.EXPAND)
   mainSizer.Add(self.buildCommitButtonSizer(armid.WEAKNESSTREATMENT_BUTTONCOMMIT_ID,False),0,wx.CENTER)
   self.SetSizer(mainSizer)
   reqCtrl = self.FindWindowById(armid.WEAKNESSTREATMENT_COMBOREQUIREMENT_ID)
   reqCtrl.Bind(wx.EVT_COMBOBOX,self.onRequirementChange)
 def __init__(self, parent, cvName):
     BasePanel.__init__(self, parent, armid.WEAKNESSTREATMENT_ID)
     self.theViewName = cvName
     b = Borg()
     self.dbProxy = b.dbProxy
     self.theGoalIndicator = 0
     reqList = self.dbProxy.componentViewRequirements(cvName)
     assetList = []
     effValues = ['None', 'Low', 'Medium', 'High']
     mainSizer = wx.BoxSizer(wx.VERTICAL)
     mainSizer.Add(
         self.buildRadioButtonSizer('Type', (87, 30), [
             (armid.WEAKNESSTREATMENT_RADIOGOAL_ID, 'Goal'),
             (armid.WEAKNESSTREATMENT_RADIOREQUIREMENT_ID, 'Requirement')
         ]))
     mainSizer.Add(
         self.buildComboSizerList('', (87, 30),
                                  armid.WEAKNESSTREATMENT_COMBOREQGOAL_ID,
                                  reqList), 0, wx.EXPAND)
     mainSizer.Add(
         self.buildComboSizerList('Asset', (87, 30),
                                  armid.WEAKNESSTREATMENT_COMBOASSET_ID,
                                  assetList), 0, wx.EXPAND)
     mainSizer.Add(
         self.buildComboSizerList(
             'Effectiveness', (87, 30),
             armid.WEAKNESSTREATMENT_COMBOEFFECTIVENESS_ID, effValues), 0,
         wx.EXPAND)
     mainSizer.Add(
         self.buildMLTextSizer('Rationale', (87, 60),
                               armid.WEAKNESSTREATMENT_TEXTRATIONALE_ID), 1,
         wx.EXPAND)
     mainSizer.Add(
         self.buildCommitButtonSizer(
             armid.WEAKNESSTREATMENT_BUTTONCOMMIT_ID, False), 0, wx.CENTER)
     self.SetSizer(mainSizer)
     reqCtrl = self.FindWindowById(armid.WEAKNESSTREATMENT_COMBOREQGOAL_ID)
     reqCtrl.Bind(wx.EVT_COMBOBOX, self.onRequirementChange)
     wx.EVT_RADIOBUTTON(self, armid.WEAKNESSTREATMENT_RADIOGOAL_ID,
                        self.onGoalSelected)
     wx.EVT_RADIOBUTTON(self, armid.WEAKNESSTREATMENT_RADIOREQUIREMENT_ID,
                        self.onRequirementSelected)
     reqRadioCtrl = self.FindWindowById(
         armid.WEAKNESSTREATMENT_RADIOREQUIREMENT_ID)
     reqRadioCtrl.SetValue(True)
Beispiel #40
0
 def __init__(self, parent, goalName, goalDef, goalCat, goalPri, goalFc,
              goalIssue, goalOrig, goalAssets, envName):
     BasePanel.__init__(self, parent, GOAL_ID)
     mainSizer = wx.BoxSizer(wx.VERTICAL)
     mainSizer.Add(self.buildTextSizer('Name', (87, 30), GOAL_TEXTNAME_ID),
                   0, wx.EXPAND)
     mainSizer.Add(
         self.buildTextSizer('Originator', (87, 30),
                             GOAL_TEXTORIGINATOR_ID), 0, wx.EXPAND)
     self.environmentPanel = ReqToGoalEnvironmentPanel(
         self, goalDef, goalCat, goalPri, goalFc, goalIssue, goalAssets,
         envName)
     mainSizer.Add(self.environmentPanel, 1, wx.EXPAND)
     mainSizer.Add(self.buildCommitButtonSizer(GOAL_BUTTONCOMMIT_ID, True),
                   0, wx.CENTER)
     origCtrl = self.FindWindowById(GOAL_TEXTORIGINATOR_ID)
     origCtrl.SetValue(goalOrig)
     self.SetSizer(mainSizer)
    def __init__(self, parent, cvName, envName):
        BasePanel.__init__(self, parent, armid.WEAKNESSANALYSIS_ID)
        self.theAssetId = None
        mainSizer = wx.BoxSizer(wx.VERTICAL)
        nbBox = wx.StaticBox(self, -1)
        nbSizer = wx.StaticBoxSizer(nbBox, wx.VERTICAL)
        mainSizer.Add(nbSizer, 1, wx.EXPAND)
        nbSizer.Add(WeaknessAnalysisNotebook(self, cvName, envName), 1,
                    wx.EXPAND)

        buttonSizer = wx.BoxSizer(wx.HORIZONTAL)
        applyButton = wx.Button(self, armid.WEAKNESSANALYSIS_BUTTONCOMMIT_ID,
                                "Apply")
        buttonSizer.Add(applyButton)
        closeButton = wx.Button(self, wx.ID_CANCEL, "Cancel")
        buttonSizer.Add(closeButton)
        mainSizer.Add(buttonSizer, 0, wx.CENTER)

        self.SetSizer(mainSizer)
Beispiel #42
0
    def __init__(self, handle):
        
        activity.Activity.__init__(self, handle, False)
        
        accel_group = gtk.AccelGroup()
        self.add_accel_group(accel_group)

        self.menu = Menu(accel_group)
        
        toolbar = ToolbarBox()
        
        item = gtk.ToolItem()
        item.set_expand(True)
        item.add(self.menu)
        toolbar.toolbar.insert(item, -1)
        
        separator = gtk.SeparatorToolItem()
        separator.props.draw = False
        separator.set_expand(True)
        toolbar.toolbar.insert(separator, -1)
        separator.show()
        toolbar.toolbar.insert(StopButton(self), -1)
        
        self.set_toolbar_box(toolbar)
        
        self.updater = False
        self.sourceview = False
        
        self.base_panel = BasePanel()
        self.set_canvas(self.base_panel)
        
        self.show_all()
        
        self.maximize()
        
        self.menu.connect('accion_ver', self.__ejecutar_accion_ver)
        self.menu.connect('accion_codigo', self.__ejecutar_accion_codigo)
        self.menu.connect('accion_proyecto', self.__ejecutar_accion_proyecto)
        self.menu.connect('accion_archivo', self.__ejecutar_accion_archivo)
        
        self.base_panel.connect("update", self.__new_handler)
        
        self.connect("destroy", self.__exit)
Beispiel #43
0
    def __init__(self, parent, messenger=None,
                 size=(6.00,3.70), dpi=96, **kwds):

        BasePanel.__init__(self, parent,  messenger=messenger)

        matplotlib.rc('axes', axisbelow=True)
        matplotlib.rc('lines', linewidth=2)
        matplotlib.rc('xtick',  labelsize=11, color='k')
        matplotlib.rc('ytick',  labelsize=11, color='k')
        matplotlib.rc('grid',  linewidth=0.5, linestyle='-')

        self.conf = PlotConfig()

        self.win_config = None


        self.parent    = parent
        self.figsize = size
        self.dpi     = dpi
    def __init__(self):

        Gtk.EventBox.__init__(self)

        vbox = Gtk.VBox()

        self.toolbar = Toolbar()
        vbox.pack_start(self.toolbar, False, False, 0)

        self.base_panel = BasePanel()
        vbox.pack_start(self.base_panel, True, True, 0)

        self.add(vbox)
        self.show_all()

        self.toolbar.connect("import", self.__import)
        self.toolbar.connect("accion-menu", self.__set_accion)
        self.toolbar.connect("salir", self.__emit_salir)
        self.base_panel.connect("update", self.__update)
Beispiel #45
0
    def __init__(self):

        Gtk.Window.__init__(self)

        #self.set_title("")
        #self.set_icon_from_file(".png")
        self.set_resizable(True)
        self.set_size_request(640, 480)
        self.set_border_width(5)
        self.set_position(Gtk.WindowPosition.CENTER)

        accel_group = Gtk.AccelGroup()
        self.add_accel_group(accel_group)

        self.updater = False
        self.sourceview = False

        base_widget = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)

        self.menu = Menu(accel_group)
        #toolbar = MainToolbar()
        self.base_panel = BasePanel()
        #trytoolbar = TryToolbar()

        base_widget.pack_start(self.menu, False, False, 0)
        #base_widget.pack_start(toolbar, False, False, 0)
        base_widget.pack_start(self.base_panel, True, True, 0)
        #base_widget.pack_start(trytoolbar, False, False, 0)

        self.add(base_widget)

        self.show_all()

        self.maximize()

        self.menu.connect('accion_ver', self.__ejecutar_accion_ver)
        self.menu.connect('accion_codigo', self.__ejecutar_accion_codigo)
        self.menu.connect('accion_proyecto', self.__ejecutar_accion_proyecto)
        self.menu.connect('accion_archivo', self.__ejecutar_accion_archivo)

        self.base_panel.connect("update", self.__new_handler)

        self.connect("destroy", self.__exit)
Beispiel #46
0
    def __init__(self, parent, isCreate):
        BasePanel.__init__(self, parent, IMPLIEDPROCESS_ID)
        b = Borg()
        self.dbProxy = b.dbProxy
        self.theSelectedSet = set([])
        self.theGraphName = 'impliedProc'

        mainSizer = wx.BoxSizer(wx.VERTICAL)
        personas = self.dbProxy.getDimensionNames('persona')
        mainSizer.Add(
            self.buildComboSizerList('Persona', (87, 30),
                                     IMPLIEDPROCESS_COMBOPERSONA_ID, personas),
            0, wx.EXPAND)

        cnBox = wx.StaticBox(self, -1, 'Code Network')
        cnSizer = wx.StaticBoxSizer(cnBox, wx.HORIZONTAL)
        mainSizer.Add(cnSizer, 1, wx.EXPAND)
        self.codeNetView = CodeNetworkView(self,
                                           IMPLIEDPROCESS_IMAGENETWORK_ID,
                                           self.theGraphName)

        cnSizer.Add(self.codeNetView, 1, wx.EXPAND)

        idnSizer = wx.BoxSizer(wx.HORIZONTAL)
        mainSizer.Add(idnSizer, 1, wx.EXPAND)
        idnSizer.Add(ImpliedProcessNotebook(self), 1, wx.EXPAND)

        self.codeRelationships = self.FindWindowById(
            IMPLIEDPROCESS_LISTRELATIONSHIPS_ID)
        self.codeRelationships.Bind(wx.EVT_LIST_ITEM_SELECTED,
                                    self.onRelationshipAdded)
        self.codeRelationships.Bind(wx.EVT_LIST_ITEM_DESELECTED,
                                    self.onRelationshipRemoved)

        self.personaCtrl = self.FindWindowById(IMPLIEDPROCESS_COMBOPERSONA_ID)
        self.personaCtrl.Bind(wx.EVT_COMBOBOX, self.onPersonaChange)

        mainSizer.Add(
            self.buildCommitButtonSizer(IMPLIEDPROCESS_BUTTONCOMMIT_ID,
                                        isCreate), 0, wx.ALIGN_CENTER)

        self.SetSizer(mainSizer)
 def __init__(self, parent):
     BasePanel.__init__(self, parent, -1)
     topSizer = wx.BoxSizer(wx.VERTICAL)
     topSizer.Add(
         self.buildTextSizer('Code', (87, 30), armid.QUOTATION_TEXTCODE_ID,
                             '', True), 0, wx.EXPAND)
     artBoxSizer = wx.BoxSizer(wx.HORIZONTAL)
     topSizer.Add(artBoxSizer, 0, wx.EXPAND)
     artBoxSizer.Add(
         self.buildTextSizer('Artifact Type', (87, 30),
                             armid.QUOTATION_TEXTARTIFACTTYPE_ID, '', True),
         1, wx.EXPAND)
     artBoxSizer.Add(
         self.buildTextSizer('Name', (87, 30),
                             armid.QUOTATION_TEXTARTIFACTNAME_ID, '', True),
         1, wx.EXPAND)
     topSizer.Add(
         self.buildMLTextSizer('Source', (87, 30),
                               armid.QUOTATION_TEXTSOURCE_ID), 1, wx.EXPAND)
     self.SetSizer(topSizer)
Beispiel #48
0
    def __init__(self, top, processor):

        gtk.Window.__init__(self)

        self.set_title("Canales")
        self.set_resizable(False)
        self.set_border_width(2)
        self.set_position(gtk.WIN_POS_CENTER)
        self.set_transient_for(top)

        self.__processor = processor
        vbox = gtk.VBox()
        self.__menu = Menu()
        self.__base_panel = BasePanel(self.__processor)

        vbox.pack_start(self.__menu, False, False, 0)
        vbox.pack_start(self.__base_panel, True, True, 0)
        self.add(vbox)
        self.show_all()

        self.__menu.connect("save", self.__save_file)
        self.__base_panel.connect("has_pixbuf", self.__has_pixbuf)
Beispiel #49
0
    def __init__(self):
        
        Gtk.Window.__init__(self)
        
        #self.set_title("")
        #self.set_icon_from_file(".png")
        self.set_resizable(True)
        self.set_size_request(640, 480)
        self.set_border_width(5)
        self.set_position(Gtk.WindowPosition.CENTER)
        
        accel_group = Gtk.AccelGroup()
        self.add_accel_group(accel_group)
        
        self.updater = False
        self.sourceview = False
        
        base_widget = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
        
        self.menu = Menu(accel_group)
        #toolbar = MainToolbar()
        self.base_panel = BasePanel()
        #trytoolbar = TryToolbar()
        
        base_widget.pack_start(self.menu, False, False, 0)
        #base_widget.pack_start(toolbar, False, False, 0)
        base_widget.pack_start(self.base_panel, True, True, 0)
        #base_widget.pack_start(trytoolbar, False, False, 0)
        
        self.add(base_widget)
        
        self.show_all()
        
        self.maximize()

        self.menu.connect('accion_ver', self.__ejecutar_accion_ver)
        self.menu.connect('accion_codigo', self.__ejecutar_accion_codigo)
        self.menu.connect('accion_proyecto', self.__ejecutar_accion_proyecto)
        self.menu.connect('accion_archivo', self.__ejecutar_accion_archivo)
        
        self.base_panel.connect("update", self.__new_handler)
        
        self.connect("destroy", self.__exit)
Beispiel #50
0
    def __init__(self):

        Gtk.EventBox.__init__(self)

        vbox = Gtk.VBox()

        self.toolbar = Toolbar()
        vbox.pack_start(self.toolbar, False, False, 0)

        self.base_panel = BasePanel()
        vbox.pack_start(self.base_panel, True, True, 0)

        self.add(vbox)
        self.show_all()

        self.toolbar.connect("import", self.__import)
        self.toolbar.connect("accion-menu", self.__set_accion)
        self.toolbar.connect("salir", self.__emit_salir)
        self.base_panel.connect("update", self.__update)
Beispiel #51
0
class JAMediaPyGiHack(Gtk.EventBox):

    __gtype_name__ = 'JAMediaPyGiHack'

    __gsignals__ = {
    'salir': (GObject.SIGNAL_RUN_FIRST,
        GObject.TYPE_NONE, [])}

    def __init__(self):

        Gtk.EventBox.__init__(self)

        vbox = Gtk.VBox()

        self.toolbar = Toolbar()
        vbox.pack_start(self.toolbar, False, False, 0)

        self.base_panel = BasePanel()
        vbox.pack_start(self.base_panel, True, True, 0)

        self.add(vbox)
        self.show_all()

        self.toolbar.connect("import", self.__import)
        self.toolbar.connect("accion-menu", self.__set_accion)
        self.toolbar.connect("salir", self.__emit_salir)
        self.base_panel.connect("update", self.__update)

    def __emit_salir(self, widget):

        self.emit('salir')

    def __update(self, widget, view):

        if view == "Terminal":
            pass

        elif view == "Gstreamer - Inspect 1.0" or \
            view == "Apis PyGiHack":
            self.toolbar.update(view)

    def __set_accion(self, widget, menu, wid_lab, valor):

        self.base_panel.set_accion(menu, wid_lab, valor)

    def __import(self, widget, paquete, modulo):

        self.base_panel.import_modulo(paquete, modulo)
Beispiel #52
0
    def __init__(self, top, processor):

        gtk.Window.__init__(self)

        self.set_title("Canales")
        self.set_resizable(False)
        self.set_border_width(2)
        self.set_position(gtk.WIN_POS_CENTER)
        self.set_transient_for(top)

        self.__processor = processor
        vbox = gtk.VBox()
        self.__menu = Menu()
        self.__base_panel = BasePanel(self.__processor)

        vbox.pack_start(self.__menu, False, False, 0)
        vbox.pack_start(self.__base_panel, True, True, 0)
        self.add(vbox)
        self.show_all()

        self.__menu.connect("save", self.__save_file)
        self.__base_panel.connect("has_pixbuf", self.__has_pixbuf)
class JAMediaPyGiHack(Gtk.EventBox):

    __gtype_name__ = 'JAMediaPyGiHack'

    __gsignals__ = {'salir': (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [])}

    def __init__(self):

        Gtk.EventBox.__init__(self)

        vbox = Gtk.VBox()

        self.toolbar = Toolbar()
        vbox.pack_start(self.toolbar, False, False, 0)

        self.base_panel = BasePanel()
        vbox.pack_start(self.base_panel, True, True, 0)

        self.add(vbox)
        self.show_all()

        self.toolbar.connect("import", self.__import)
        self.toolbar.connect("accion-menu", self.__set_accion)
        self.toolbar.connect("salir", self.__emit_salir)
        self.base_panel.connect("update", self.__update)

    def __emit_salir(self, widget):
        self.emit('salir')

    def __update(self, widget, view):
        if view == "Terminal":
            pass
        elif view == "Gstreamer - Inspect 1.0" or view == "Apis PyGiHack":
            self.toolbar.update(view)

    def __set_accion(self, widget, menu, wid_lab, valor):
        self.base_panel.set_accion(menu, wid_lab, valor)

    def __import(self, widget, paquete, modulo):
        self.base_panel.import_modulo(paquete, modulo)
Beispiel #54
0
 def __init__(self, parent):
     BasePanel.__init__(self, parent, armid.CONCEPTREFERENCE_ID)
     self.theId = None
     b = Borg()
     self.dbProxy = b.dbProxy
Beispiel #55
0
 def __init__(self, parent):
     BasePanel.__init__(self, parent, armid.VALUETYPE_ID)
Beispiel #56
0
 def __init__(self, parent, dp):
     BasePanel.__init__(self, parent, TASK_ID)
     self.dbProxy = dp
Beispiel #57
0
 def __init__(self,parent):
   BasePanel.__init__(self,parent,COMPONENT_ID)
   self.theComponentId = None
   b = Borg()
   self.dbProxy = b.dbProxy