def __init__(self, parent, id, title, param): wx.Frame.__init__(self, parent, id, title) ABCAppInterface.__init__(self, 'ArtifactList') self.dirTmp = None self.repo = None self.__order = [ ('ID', '_id'), ('Name', 'name'), ('Dir', 'location'), ('Status', 'state'), ] self.__conversion = {} #self.__conversion['state'] = {CO.activity_UNKNOWN:'Unknown', CO.activity_RESUMED:'Resumed', CO.activity_SUSPENDED:'Suspended', CO.activity_INITIALIZED:'Initialized'} self.__obj_content = {} self.__obj_property = {} self.__obj_content["list"] = [ "ListCtrl", wx.ListCtrl(self, style=wx.LC_REPORT | wx.BORDER_NONE | wx.LC_EDIT_LABELS | wx.LC_SORT_ASCENDING) ] for i, x in enumerate(self.__order): self.__obj_content["list"][1].InsertColumn(i, x[0]) self.CreateStatusBar() self.__obj_content["list"][1].Bind(wx.EVT_LIST_ITEM_SELECTED, self.onSelect) box = wx.BoxSizer( wx.VERTICAL ) box.Add( self.__obj_content[ "list" ][1], 1, wx.EXPAND ) self.SetSizer( box ) self.SetAutoLayout(1) box.Fit(self) self.resume() self.Show(1)
def __init__(self, parent, id, title, param): wx.Frame.__init__(self, parent, id, title) ABCAppInterface.__init__(self, "TextEditor") self._definedProperties = ["pos_x", "pos_y", "dim_x", "dim_y"] self._syncSubscription = [] self._tmpDir = None self.__order = ["txtMain", "btnSave"] self.__obj_property = {} self.__obj_content = {} self.__obj_property["fileName"] = ["string", ""] self.__obj_property["dirName"] = ["string", ""] self.__obj_property["activityPin"] = ["boolean", False] self.__obj_property["activityFullSync"] = ["boolean", False] self.__obj_content["txtMain"] = ["TextCtrl", wx.TextCtrl(self, style=wx.TE_MULTILINE | wx.VSCROLL)] self.__obj_content["btnSave"] = ["Button", wx.Button(self, id=wx.ID_SAVE)] self.__obj_content["btnSave"][1].Bind(wx.EVT_BUTTON, self.onSaveBtn) self.CreateStatusBar() box = wx.BoxSizer(wx.VERTICAL) box.Add(self.__obj_content["txtMain"][1], 1, wx.EXPAND) box.Add(self.__obj_content["btnSave"][1], 0, wx.EXPAND) self.SetSizer(box) self.SetAutoLayout(1) box.Fit(self) self.SetSize(tuple([x / 4 for x in wx.DisplaySize()])) self.Bind(wx.EVT_CLOSE, self.onClose) self.Center() self.resume() self.Show(1)
def __init__(self, parent, id, title, param): wx.Frame.__init__(self, parent, id, title) ABCAppInterface.__init__(self, 'ApplicationList') self._definedProperties = ['pos_x', 'pos_y', 'dim_x', 'dim_y'] self.lastActivity=None self.__order = [ ('ID', '_id'), ('Name', 'name'), ('Status', 'state')] self.__conversion = {} self.__conversion['state'] = {CO.application_DETACHED:'Detached', CO.application_PINNED:'Pinned', CO.application_FULLSYNC:'Fullsync', CO.abc_UNKNOWN:'Unknown', CO.abc_INITIALIZED:'Initialized'} self.__obj_content = {} self.__obj_property = {} self.__obj_content["list"] = [ "ListCtrl", wx.ListCtrl(self, style=wx.LC_REPORT | wx.BORDER_NONE | wx.LC_EDIT_LABELS | wx.LC_SORT_ASCENDING) ] for i, x in enumerate(self.__order): self.__obj_content["list"][1].InsertColumn(i, x[0]) self.CreateStatusBar() menuBar = wx.MenuBar() # filemenu= wx.Menu() # # filemenu.Append(wx.ID_EXIT,"E&xit"," Terminate the program") # menuBar.Append(filemenu,"&File") # # filemenu= wx.Menu() # filemenu.Append(CO.menu_USER_ADD,"New"," Create new app") # filemenu.Append(CO.menu_USER_MODIFY,"Modify"," Modify current app") # # menuBar.Append(filemenu,"&App") # # filemenu= wx.Menu() # filemenu.Append(CO.menu_APPLICATION_PIN,"Pin"," Share the application with the activity partecipants") # menuBar.Append(filemenu,"&Action") self.SetMenuBar(menuBar) wx.EVT_MENU(self, wx.ID_EXIT, self.onExit) self.Bind(wx.EVT_CLOSE, self.onClose) self.Bind(wx.EVT_MENU, self.onNew, id=CO.menu_USER_ADD) self.Bind(wx.EVT_MENU, self.onModify, id=CO.menu_USER_MODIFY) box = wx.BoxSizer( wx.VERTICAL ) box.Add( self.__obj_content[ "list" ][1], 1, wx.EXPAND ) self.SetSizer( box ) self.SetAutoLayout(1) box.Fit(self) self.resume() self.Show(1)
def __init__(self, parent, id, title, param): wx.Frame.__init__(self, parent, id, title) ABCAppInterface.__init__(self, 'ContactList') self._definedProperties = ['pos_x', 'pos_y', 'dim_x', 'dim_y'] self.Center() self.volatileSubscription = [] self.lastActivity = None self.__order = [ ('ID', '_id'), ('Name', 'name'), ('Status', 'state'), ] self.__conversion = {} self.__conversion['state'] = {CO.user_UNKNOWN:'Unknown', CO.user_CONNECTED:'Online', CO.user_DISCONNECTED:'Offline', CO.activity_INITIALIZED:'Initialized'} self.__obj_content = {} self.__obj_property = {} self.__obj_content["list"] = [ "ListCtrl", wx.ListCtrl(self, style=wx.LC_REPORT | wx.BORDER_NONE | wx.LC_EDIT_LABELS | wx.LC_SORT_ASCENDING) ] for i, x in enumerate(self.__order): self.__obj_content["list"][1].InsertColumn(i, x[0]) self.__obj_content["list"][1].InsertColumn(i+1, 'Working on') self.CreateStatusBar() menuBar = wx.MenuBar() # filemenu= wx.Menu() # # filemenu.Append(wx.ID_EXIT,"E&xit"," Terminate the program") # menuBar.Append(filemenu,"&File") # # filemenu= wx.Menu() # filemenu.Append(CO.menu_USER_ADD,"New"," Create new user") # filemenu.Append(CO.menu_USER_MODIFY,"Modify"," Modify current user") # # menuBar.Append(filemenu,"&User") # # self.SetMenuBar(menuBar) # wx.EVT_MENU(self, wx.ID_EXIT, self.onExit) # self.Bind(wx.EVT_CLOSE, self.onClose) # # self.Bind(wx.EVT_MENU, self.onNew, id=CO.menu_USER_ADD) # self.Bind(wx.EVT_MENU, self.onModify, id=CO.menu_USER_MODIFY) # box = wx.BoxSizer( wx.VERTICAL ) box.Add( self.__obj_content[ "list" ][1], 1, wx.EXPAND ) self.SetSizer( box ) self.SetAutoLayout(1) box.Fit(self) self.resume() self.Show(1)
def __init__(self, parent, id, title, param): wx.Frame.__init__(self, parent, id, title) ABCAppInterface.__init__(self, 'activities') self.lastActivity = None self._selection = None self.__order = [ ('ID', '_id'), ('Name', 'name'), ('Status', 'state'), ] self.__conversion = {} self.__conversion['state'] = {CO.activity_UNKNOWN:'Unknown', CO.activity_RESUMED:'Resumed', CO.activity_SUSPENDED:'Suspended', CO.activity_INITIALIZED:'Initialized'} self.__obj_content = {} self.__obj_property = {} self.__obj_content["list"] = [ "ListCtrl", wx.ListCtrl(self, style=wx.LC_REPORT | wx.BORDER_NONE | wx.LC_EDIT_LABELS | wx.LC_SORT_ASCENDING) ] for i, x in enumerate(self.__order): self.__obj_content["list"][1].InsertColumn(i, x[0]) self.CreateStatusBar() menuBar = wx.MenuBar() filemenu= wx.Menu() filemenu.Append(wx.ID_EXIT,"E&xit"," Terminate the program") filemenu.Append(CO.menu_ACTIVITY_SUSPEND,"Suspend"," Suspend the program") menuBar.Append(filemenu,"&File") filemenu= wx.Menu() filemenu.Append(CO.menu_ACTIVITY_ADD,"New"," Create new activity") filemenu.Append(CO.menu_ACTIVITY_MODIFY,"Modify"," Modify current activity") menuBar.Append(filemenu,"&Activity") self.SetMenuBar(menuBar) wx.EVT_MENU(self, wx.ID_EXIT, self.onExit) self.Bind(wx.EVT_CLOSE, self.onClose) self.Bind(wx.EVT_MENU, self.onSuspend, id=CO.menu_ACTIVITY_SUSPEND) self.Bind(wx.EVT_MENU, self.onNew, id=CO.menu_ACTIVITY_ADD) self.Bind(wx.EVT_MENU, self.onModify, id=CO.menu_ACTIVITY_MODIFY) self.__obj_content["list"][1].Bind(wx.EVT_LIST_ITEM_SELECTED, self.onSelect) box = wx.BoxSizer( wx.VERTICAL ) box.Add( self.__obj_content[ "list" ][1], 1, wx.EXPAND ) self.SetSizer( box ) self.SetAutoLayout(1) box.Fit(self) self.resume() self.Show(1)
def __init__(self, parent, id, title, param): wx.Frame.__init__(self, parent, id, title) ABCAppInterface.__init__(self, 'NotificationManager') self._definedProperties = ['pos_x', 'pos_y', 'dim_x', 'dim_y'] self.lastActivity = None self.__order = [ ('Message', 'Message'), ] self.__obj_content = {} self.__obj_property = {} self.__obj_content["list"] = [ "ListCtrl", wx.ListCtrl(self, style=wx.LC_REPORT | wx.BORDER_NONE | wx.LC_EDIT_LABELS | wx.LC_SORT_ASCENDING) ] for i, x in enumerate(self.__order): self.__obj_content["list"][1].InsertColumn(i, x[0]) self.CreateStatusBar() menuBar = wx.MenuBar() # filemenu= wx.Menu() # # filemenu.Append(wx.ID_EXIT,"E&xit"," Terminate the program") # menuBar.Append(filemenu,"&File") # # filemenu= wx.Menu() # filemenu.Append(CO.menu_USER_ADD,"New"," Create new app") # filemenu.Append(CO.menu_USER_MODIFY,"Modify"," Modify current app") # # menuBar.Append(filemenu,"&Action") # # self.SetMenuBar(menuBar) # wx.EVT_MENU(self, wx.ID_EXIT, self.onExit) # self.Bind(wx.EVT_CLOSE, self.onClose) # # self.Bind(wx.EVT_MENU, self.onNew, id=CO.menu_USER_ADD) # self.Bind(wx.EVT_MENU, self.onModify, id=CO.menu_USER_MODIFY) box = wx.BoxSizer( wx.VERTICAL ) box.Add( self.__obj_content[ "list" ][1], 1, wx.EXPAND ) self.SetSizer( box ) self.SetAutoLayout(1) box.Fit(self) self.resume() self.Show(1)