Logo Search packages:      
Sourcecode: harpia version File versions  Download package

def harpia::harpiagcfrontend::S2iHarpiaFrontend::__init__ (   self  ) 

Constructor. Initializes the GladeWindow object for signal connecting, creates a dictionary for the Blocks and BlocksProperties and loads the configurations.

Definition at line 88 of file harpiagcfrontend.py.

00088                           :
            """
            Constructor. Initializes the GladeWindow object for signal connecting, creates a dictionary for the Blocks and BlocksProperties and loads the configurations.
            """
            
            self.exampleMenuItens = []
            
            self.m_sDataDir = os.environ['HARPIA_DATA_DIR']
            filename = self.m_sDataDir+'glade/harpia_gui-1.0.glade'

            widget_list = [
                  'HarpiaFrontend',          'SearchEntry',          'SearchButton',
                  'BlockDescription',        'WorkArea',
                  'BlocksTreeView',          'StatusLabel',
                  'ProcessImage',            'ProcessToolBar',       'CodeToolBar',
                  'UpdateToolBar', 'toolbar1', 'examples_menu', 'fake_separator'
                  ]

            handlers = [
                  'on_NewMenuBar_activate',          'on_OpenMenuBar_activate',
                  'on_SaveMenuBar_activate',         'on_SaveASMenuBar_activate',
                  'on_QuitMenuBar_activate',         'on_CutMenuBar_activate',
                  'on_CopyMenuBar_activate',         'on_PasteMenuBar_activate',
                  'on_DeleteMenuBar_activate',       'on_AboutMenuBar_activate',
                  'on_NewToolBar_clicked',           'on_OpenToolBar_clicked',
                  'on_SaveToolBar_clicked',          'on_ProcessToolBar_clicked',        'on_CodeToolBar_clicked',
                  'on_ZoomOutToolBar_clicked',       'on_ZoomInToolBar_clicked',
                  'on_SearchButton_clicked',         'on_BlocksTreeView_row_activated',
                  'on_BlocksTreeView_cursor_changed','on_HarpiaFrontend_destroy',
                  'on_ZoomDefaultToolBar_clicked',   'on_Preferences_clicked',
                  'on_Export_clicked',               'on_CloseMenuBar_activate',
                  'on_UpdateToolBar_clicked',        'on_tip_activate',
                  'on_reset_tip_activate'
                  ]

            top_window = 'HarpiaFrontend'
            
            # Initializes the Gladewindow
            GladeWindow.__init__(self, filename, top_window, widget_list, handlers)
            
            self.top_window.maximize() #asking politely to maximize out app =]
            
            # Blocks
            self.Blocks =  s2idirectory.groups
                        
            for x in s2idirectory.block:
                  self.Blocks[s2idirectory.block[x]["TreeGroup"]].append(s2idirectory.block[x]["Label"])

            # Blocks Properties
            self.BlocksProperties =  dict()
            
            for x in s2idirectory.block:
                  self.BlocksProperties[s2idirectory.block[x]["Label"]] = {"Inputs":s2idirectory.block[x]["Inputs"],"Outputs":s2idirectory.block[x]["Outputs"]}
            
            
            #cpscotti .. taking out more dumb code..


            self.widgets['HarpiaFrontend'].set_icon_from_file(self.m_sDataDir+"images/harpia_ave.png")

            self.m_oIconUpdate = gtk.Image()

            self.m_oIconUpdate.set_from_file(self.m_sDataDir+"images/system-software-update.png")

            self.m_oIconUpdate.show_all()

            self.widgets['UpdateToolBar'].set_icon_widget(self.m_oIconUpdate)
            
            self.g_sTreeViewPath = "0,0"
            
            if os.name=="nt":
                  if not os.path.exists('../updhrp.bat'):
                        self.widgets['toolbar1'].remove(self.widgets['UpdateToolBar'])
            else:
                  if not os.path.exists('../updhrp.sh'):
                        self.widgets['toolbar1'].remove(self.widgets['UpdateToolBar'])



            self.m_nStatus = 0
            
            self.SaveAs = False
            
            #Member Diagram references
            self.m_oGcDiagrams = {}
            
            self.m_oSessionIDs = {}

            self.m_oCopyBuffer = (-1, -1) #tuple (fromPage, [listOfBlocks]) ...listOfConns?

            self.m_nCurrentIDSession = None
            
            self.LoadExamplesMenu()

            self.__InsertBlocks()


            self.on_CloseMenuBar_activate() #removing the dummie page
            self.on_NewToolBar_clicked() #creating blank page
            
            #Tip of The Day code
            tipOfTheDayWind = TipOfTheDay.TipOfTheDay()
            tipOfTheDayWind.run()
            
      #----------------------------------------------------------------------


Generated by  Doxygen 1.6.0   Back to index