コード例 #1
0
ファイル: masterGUI.py プロジェクト: iam-tom/video_tools
    def __init__(self,title,config):
    
    
    #        calculate screen size etc
        ss_string = subprocess.Popen('xrandr | grep "\*" | cut -d" " -f4',shell=True,stdout=subprocess.PIPE).communicate()[0]
        x_pos=ss_string.find('x')
        sw = int(ss_string[0:(x_pos)])
        sh = int(ss_string[x_pos+1:len(ss_string)])
        
        
        
        
        
        self.f = wx.Frame(None, title=title, size=(sw,sh) )
        
        splitter = wx.SplitterWindow(self.f,-1)
        
        self.p1 = wx.Panel(splitter,-1)
        self.p2 = wx.Panel(splitter,-1)
        
        splitter.SplitVertically(self.p1,self.p2)
        self.nb = wx.Notebook(self.p1)     
        


        
               
        config["size"] = (sw/2,sh)
        self.page1 = tlmGUI.tlmGUI(self.nb)
        self.page3 = wdGUI.wdGUI(self.nb)
        self.page4 = warpGUI.warpGUI(self.nb) 
        self.nb.AddPage(self.page1, "TLM")
        self.nb.AddPage(self.page3,"IMPORT")
        self.nb.AddPage(self.page4,"WARP")
        self.active_page = self.page1
        
        self.nb.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED,self.OnTabChanged)
        
        sizer = wx.BoxSizer()
        sizer.Add(self.nb, 1, wx.EXPAND)
        
#        graphical elements

        self.list = GUIelements.imgList(self.p2,(200,500))

        ok_b = wx.Button(self.p2,wx.ID_OK,"OK",(10,550),(80,80),wx.BU_EXACTFIT)
        ok_b.Bind(wx.EVT_BUTTON, self.OnOk)
        
        
        
        self.p1.SetSizer(sizer)
        self.p2.SetSizer(sizer)

        

        self.f.Show()
コード例 #2
0
ファイル: warpGUI_test.py プロジェクト: iam-tom/video_tools
#!/usr/bin/python

import project_config
pc=project_config.path_config("paths")
import wx
import iwx
import warpGUI

if __name__=="__main__":
    print "WARP GUI TEST"
    app=wx.App(False)
    f=wx.Frame(None,-1,size=(900,1000))
    wg=warpGUI.warpGUI(f) 
    f.Show()
    app.MainLoop()