Exemplo n.º 1
0
 def __init___(self):
     """ das hier is fuer raeume """
     PSYCPackage.__init__(self)
     UeberGui.__init__(self,pos=pos, size=size)
     self.model = None
     
     EVT_CLOSE(self, self.onClose)
Exemplo n.º 2
0
 def __init__(self, argv):
     """ was ich hiermit mache weiss ich noch net genau, eigentlich brauch
         ich es net im moment lebt es für den devel handler"""
     self.center = None
     PSYCPackage.__init__(self)
Exemplo n.º 3
0
 def __init__(self):
     """ das hier is fuer querys """
     PSYCPackage.__init__(self)
     UeberGui.__init__(self, status_tab = 0)
     self.model = None
     self.source = ''
Exemplo n.º 4
0
    def __init__(self, parent=None, ID=0, title='pyPSYC', center=None, config=None, pos=wxDefaultPosition, size=wxSize(190, 400), style=wxDEFAULT_FRAME_STYLE):
        # bei mir is friendlist, firendlist und maingui in einem
        # zumindestens sollte es das sein ob es so klappt weiss ich noch nicht
        self.global_config = config
        self.config = ConfigParser.ConfigParser()  
        self.config.read(CONFIG_FILE)
        
        if self.config:
            pos = split(self.config.get('gui', 'wx_friend_pos'), ',')
            size = split(self.config.get('gui', 'wx_friend_size'), ',')
            
        wxFrame.__init__(self, parent, ID, title, wxPoint(int(pos[0]), int(pos[1])) , wxSize(int(size[0]), int(size[1])), style)
        PSYCPackage.__init__(self)
        self.currentBuddy = None
        self.center = center
        self.model = None
        self.packagename = "Friends gui"
        # we have to register by ourselves
        # perhaps it's not the way to do it but it works
# no.. it's not working.. --lynX
#       self.center.register(FriendsPackage(self))

        # menubar, statusbar et al
        self.CreateStatusBar()
        self.SetStatusText("welcome to pyPSYC")
        menu = wxMenu()
        menu.Append(ID_CONNECT, "&Connect", "connect to the net")
        menu.Append(ID_ABOUT, "&About", "tritratrullala")
        menu.AppendSeparator()
        menu.Append(ID_EXIT, "&Exit", "leave us")
        menuBar = wxMenuBar()
        menuBar.Append(menu, "&File");
        self.SetMenuBar(menuBar)

        ##'buddy' list, perhaps ;]]
        self.BuddyList = wxListCtrl(self, ID_BUDDY_LIST, style=wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER)
        self.BuddyList.InsertColumn(0, "ST")
        self.BuddyList.InsertColumn(1, "Nick")# , wxLIST_FORMAT_RIGHT)
        self.BuddyList.SetColumnWidth(0, 20)
        ##end buddy list
        
        # define the buttons and so on at the bottom of the window 
        self.status = wxComboBox(self, ID_STATUS, "", choices=["", "This", "is a", "Place", "to put commands"], size=(150,-1), style=wxCB_DROPDOWN)
        self.menu_button = wxButton( self, ID_MENU, 'pyPSYC')
        self.exit_button = wxButton( self, ID_EXIT, 'exit')
        self.con_menu = wxBoxSizer(wxHORIZONTAL)
        self.con_menu.Add(self.menu_button, 1, wxALIGN_BOTTOM)
        self.con_menu.Add(self.exit_button, 1, wxALIGN_BOTTOM)
        
        sizer = wxFlexGridSizer(3, 0 , 0,0)
        sizer.Add(self.BuddyList, 1, wxGROW)
        sizer.Add(self.con_menu, 1,wxGROW)
        sizer.Add(self.status, 1,wxGROW)
        sizer.AddGrowableRow(0)
        sizer.AddGrowableCol(0)
        # do something so that the buttons don't vanish in a too small window
        # this is h4x0r-style but does the job at the moment
        sizer.SetItemMinSize(self.BuddyList, 30, 10)
        sizer.SetMinSize(wxSize(200,280))
        self.SetSizer(sizer)
        self.SetAutoLayout(true)

        # event handling
        EVT_BUTTON( self, ID_EXIT, self.onExit )
        EVT_BUTTON( self, ID_MENU, self.doConnect )
        #EVT_BUTTON(self, ID_CONNECT, self.doConnect)
        #EVT_BUTTON(self, ID_CLOSECHATNOTE, self.closeChat)
        EVT_MENU( self, ID_EXIT, self.onExit)
        EVT_MENU(self, ID_CONNECT, self.doConnect)