コード例 #1
0
    def initialize(self):
        # make the main window cover the entire screen
        if Utils.isLinux():
            self.w, self.h = self.winfo_screenwidth(), self.winfo_screenheight(
            )
            self.geometry("%dx%d+0+0" % (self.w, self.h))
        if Utils.isWindows():
            self.wm_state('zoomed')
        #create menu
        self.menu = GUI_menubar(self, self.controller)
        self.config(menu=self.menu)

        #create frame structure
        self.big_frame = tk.Frame(self,
                                  bd=2,
                                  relief=tk.FLAT,
                                  background="grey")
        self.big_frame.pack(anchor=tk.NW, expand=tk.TRUE, fill=tk.BOTH)

        self.work_frame = GUI_work_frame(self.big_frame, self.controller)
        self.work_frame.pack(side=tk.RIGHT, anchor=tk.N)

        self.display_frame = GUI_display_frame(self.big_frame, self.controller)
        self.display_frame.pack(side=tk.LEFT, expand=tk.TRUE, fill=tk.BOTH)

        #set quit function
        self.protocol("WM_DELETE_WINDOW", self.quit)
コード例 #2
0
class GUI_main(tk.Tk):
    '''
    classdocs
    '''
    def __init__(self, parent):
        '''
        Constructor
        '''
        tk.Tk.__init__(self, parent)
        self.parent = parent
        self.name = "main"

        # if on linux, set the icon
        if Utils.isLinux():
            os.path.join("..", "dcs.xbm")
            self.iconbitmap('@../dcs.xbm')
        if Utils.isWindows():
            print os.path.curdir
            if os.path.isfile("dcs.ico"):
                self.iconbitmap(default="dcs.ico")
            else:
                self.iconbitmap(default="..\dcs.ico")

        # instantiate the controller, register with the controller
        self.controller = Controller.Controller()
        self.controller.register(self, self.name)
        self.initialize()

    def initialize(self):
        # make the main window cover the entire screen
        if Utils.isLinux():
            self.w, self.h = self.winfo_screenwidth(), self.winfo_screenheight(
            )
            self.geometry("%dx%d+0+0" % (self.w, self.h))
        if Utils.isWindows():
            self.wm_state('zoomed')
        #create menu
        self.menu = GUI_menubar(self, self.controller)
        self.config(menu=self.menu)

        #create frame structure
        self.big_frame = tk.Frame(self,
                                  bd=2,
                                  relief=tk.FLAT,
                                  background="grey")
        self.big_frame.pack(anchor=tk.NW, expand=tk.TRUE, fill=tk.BOTH)

        self.work_frame = GUI_work_frame(self.big_frame, self.controller)
        self.work_frame.pack(side=tk.RIGHT, anchor=tk.N)

        self.display_frame = GUI_display_frame(self.big_frame, self.controller)
        self.display_frame.pack(side=tk.LEFT, expand=tk.TRUE, fill=tk.BOTH)

        #set quit function
        self.protocol("WM_DELETE_WINDOW", self.quit)

    def quit(self):
        ans = tkMessageBox.askokcancel('', "Really quit?")
        if ans: self.destroy()
コード例 #3
0
ファイル: main.py プロジェクト: sbobovyc/DCS
class GUI_main(tk.Tk):
    '''
    classdocs
    '''
    
    def __init__(self, parent):
        '''
        Constructor
        '''
        tk.Tk.__init__(self,parent)
        self.parent = parent
        self.name = "main"   

        # if on linux, set the icon
        if Utils.isLinux():                
            os.path.join("..", "dcs.xbm")     
            self.iconbitmap('@../dcs.xbm')    
        if Utils.isWindows():          
            print os.path.curdir  
            if os.path.isfile("dcs.ico"):
                self.iconbitmap(default="dcs.ico")
            else:               
                self.iconbitmap(default="..\dcs.ico")

                    
        # instantiate the controller, register with the controller
        self.controller = Controller.Controller()
        self.controller.register(self, self.name)
        self.initialize()
        
    def initialize(self):
        # make the main window cover the entire screen
        if Utils.isLinux():
            self.w, self.h = self.winfo_screenwidth(), self.winfo_screenheight()
            self.geometry("%dx%d+0+0" % (self.w, self.h))
        if Utils.isWindows():
            self.wm_state('zoomed')    
        #create menu
        self.menu = GUI_menubar(self, self.controller)
        self.config(menu=self.menu)
        
        
        #create frame structure
        self.big_frame = tk.Frame(self, bd=2, relief=tk.FLAT, background="grey")
        self.big_frame.pack(anchor=tk.NW, expand=tk.TRUE, fill=tk.BOTH)
        
        self.work_frame = GUI_work_frame(self.big_frame, self.controller)
        self.work_frame.pack(side=tk.RIGHT, anchor=tk.N)
        
        self.display_frame = GUI_display_frame(self.big_frame, self.controller)
        self.display_frame.pack(side=tk.LEFT, expand=tk.TRUE, fill=tk.BOTH)
        
        #set quit function
        self.protocol("WM_DELETE_WINDOW", self.quit)
        
    def quit(self):
        ans = tkMessageBox.askokcancel('', "Really quit?")
        if ans: self.destroy()
コード例 #4
0
ファイル: main.py プロジェクト: sbobovyc/Tracker
class GUI_main(tk.Tk):
    '''
    classdocs
    '''
    
    def __init__(self, parent):
        '''
        Constructor
        '''
        tk.Tk.__init__(self,parent)
        self.parent = parent
        self.name = "main"        
        
        # instantiate the controller, register with the controller
        self.controller = Controller.Controller()
        self.controller.register(self, self.name)
        self.initialize()
        
    def initialize(self):
        # make the main window cover the entire screen
        self.w, self.h = self.winfo_screenwidth(), self.winfo_screenheight()
        self.geometry("%dx%d+0+0" % (self.w, self.h))
                
        #create menu
        self.menu = GUI_menubar(self, self.controller)
        self.config(menu=self.menu)
        
        
        #create frame structure
        self.big_frame = tk.Frame(self, bd=2, relief=tk.FLAT, background="grey")
        self.big_frame.pack(anchor=tk.NW, expand=tk.TRUE, fill=tk.BOTH)
        
        self.work_frame = GUI_work_frame(self.big_frame, self.controller)
        self.work_frame.pack(side=tk.BOTTOM, anchor=tk.W)
        
        self.display_frame = GUI_display_frame(self.big_frame, self.controller)
        self.display_frame.pack(side=tk.TOP, expand=tk.TRUE, fill=tk.BOTH)
コード例 #5
0
ファイル: main.py プロジェクト: sbobovyc/Tracker
 def initialize(self):
     # make the main window cover the entire screen
     self.w, self.h = self.winfo_screenwidth(), self.winfo_screenheight()
     self.geometry("%dx%d+0+0" % (self.w, self.h))
             
     #create menu
     self.menu = GUI_menubar(self, self.controller)
     self.config(menu=self.menu)
     
     
     #create frame structure
     self.big_frame = tk.Frame(self, bd=2, relief=tk.FLAT, background="grey")
     self.big_frame.pack(anchor=tk.NW, expand=tk.TRUE, fill=tk.BOTH)
     
     self.work_frame = GUI_work_frame(self.big_frame, self.controller)
     self.work_frame.pack(side=tk.BOTTOM, anchor=tk.W)
     
     self.display_frame = GUI_display_frame(self.big_frame, self.controller)
     self.display_frame.pack(side=tk.TOP, expand=tk.TRUE, fill=tk.BOTH)
コード例 #6
0
ファイル: main.py プロジェクト: sbobovyc/DCS
 def initialize(self):
     # make the main window cover the entire screen
     if Utils.isLinux():
         self.w, self.h = self.winfo_screenwidth(), self.winfo_screenheight()
         self.geometry("%dx%d+0+0" % (self.w, self.h))
     if Utils.isWindows():
         self.wm_state('zoomed')    
     #create menu
     self.menu = GUI_menubar(self, self.controller)
     self.config(menu=self.menu)
     
     
     #create frame structure
     self.big_frame = tk.Frame(self, bd=2, relief=tk.FLAT, background="grey")
     self.big_frame.pack(anchor=tk.NW, expand=tk.TRUE, fill=tk.BOTH)
     
     self.work_frame = GUI_work_frame(self.big_frame, self.controller)
     self.work_frame.pack(side=tk.RIGHT, anchor=tk.N)
     
     self.display_frame = GUI_display_frame(self.big_frame, self.controller)
     self.display_frame.pack(side=tk.LEFT, expand=tk.TRUE, fill=tk.BOTH)
     
     #set quit function
     self.protocol("WM_DELETE_WINDOW", self.quit)