Пример #1
0
    def __init__(self, parent):

        wx.Panel.__init__(self, parent)

# default settings
        self.format_preset=[".png",".jpg",".tiff"]
        self.zeros_preset =["0" , "1" , "2", "3", "4" ,"5" ,"6" ,"7" ,"8"]
#buttons
#---input
        self.b_i_format=wx.Choice(self,wx.ID_ANY,(7,130),(70,30),self.format_preset)
        self.b_zeros=wx.Choice(self,wx.ID_ANY,(7,190),(50,30),self.zeros_preset)

#--output
        b_o_dir=wx.Button(self,wx.ID_ANY,"Browse",(7,250),(70,25),wx.BU_EXACTFIT)
        b_o_file=wx.Button(self,wx.ID_ANY,"Edit",(7,310),(50,25),wx.BU_EXACTFIT)
        self.b_fps=GUIelements.iChoice(self,(2,3),"fps")

        b_accept=wx.Button(self,wx.ID_ANY,"Accept",(67,410),(70,25),wx.BU_EXACTFIT)

#static text
        s_dummy1 = wx.StaticText(self,-1,"Video Configuration:",(7,20))

        self.s_o_dir = iwx.iStaticText(self,-1,"Output Directory:")
        self.s_o_file = iwx.iStaticText(self,-1,"Output Filename:")
        self.s_zeros = iwx.iStaticText(self,-1,"Leading Zeros:")
        self.s_format = iwx.iStaticText(self,-1,"Input File Format:")	

#events


        b_o_dir.Bind(wx.EVT_BUTTON, lambda evt, string=self.s_o_dir: self.OnBrowseDir(evt, string) )
        b_o_file.Bind(wx.EVT_BUTTON, lambda evt, string=self.s_o_file: self.OnEdit(evt, string) )
        
        
        self.bs=wx.BoxSizer(wx.VERTICAL)       	
        self.bs.Add(s_dummy1,1,         wx.ALL,10)
        self.bs.Add(self.s_o_dir,1,     wx.ALL,10)
        self.bs.Add(b_o_dir,1,          wx.ALL,10)
        self.bs.Add(self.s_format,1,    wx.ALL,10)
        self.bs.Add(self.b_i_format,1,  wx.ALL,10)
        self.bs.Add(self.b_fps,1,       wx.ALL,10)
        self.bs.Add(self.s_o_file,1,    wx.ALL,10)
        self.bs.Add(b_o_file,1,         wx.ALL,10)
        self.bs.Add(b_accept,1,         wx.ALL,10)
        self.bs.Add(self.s_zeros,1,     wx.ALL,10)
        self.bs.Add(self.b_zeros,1,     wx.ALL,10)
        self.SetAutoLayout(True)
        self.SetSizer(self.bs)
        self.Layout()
        
        
        
        b_accept.Bind(wx.EVT_BUTTON,  self.OnAccept )


	#self.Bind(wx.EVT_BUTTON, self.OnProcess,b_process)


        self.Show(True)
Пример #2
0
    def __init__(self, parent,size,):

        wx.Panel.__init__(self, parent,size=size)

# default settings___________________________________________
	
# layout_____________________________________________________

# callbacks__________________________________________________

# internal methods___________________________________________

# interface methods__________________________________________


#buttons
#---input
        b_i_file=wx.Button(self,wx.ID_ANY,"Browse",(7,70),(70,25),wx.BU_EXACTFIT)
	self.b_i_format=wx.Choice(self,wx.ID_ANY,(7,130),(70,30),self.format_preset)
	self.b_zeros=wx.Choice(self,wx.ID_ANY,(7,190),(50,30),self.zeros_preset)

#--output
        b_o_dir=wx.Button(self,wx.ID_ANY,"Browse",(7,250),(70,25),wx.BU_EXACTFIT)
        b_o_file=wx.Button(self,wx.ID_ANY,"Edit",(7,310),(50,25),wx.BU_EXACTFIT)
	self.b_fps=wx.Choice(self,wx.ID_ANY,(7,370),(50,30),self.fps_preset)

	b_accept=wx.Button(self,wx.ID_ANY,"Accept",(67,410),(70,25),wx.BU_EXACTFIT)

#static text
        s_dummy1 = wx.StaticText(self,-1,"Video Configuration:",(7,20))

	self.s_i_file = iwx.iStaticText(self,-1,"Input Files:",(7,50))
	self.s_o_dir = iwx.iStaticText(self,-1,"Output Directory:",(7,230))
	self.s_o_file = iwx.iStaticText(self,-1,"Output Filename:",(7,290))
	self.s_zeros = iwx.iStaticText(self,-1,"Leading Zeros:",(7,170))
	self.s_format = iwx.iStaticText(self,-1,"Input File Format:",(7,110))	
	self.s_fps = iwx.iStaticText(self,-1,"Frame Rate [fps]:",(7,350))
	
#events


	b_o_dir.Bind(wx.EVT_BUTTON, lambda evt, string=self.s_o_dir: self.OnBrowseDir(evt, string) )
	b_o_file.Bind(wx.EVT_BUTTON, lambda evt, string=self.s_o_file: self.OnEdit(evt, string) )
	b_i_file.Bind(wx.EVT_BUTTON, lambda evt, string=self.s_i_file: self.OnBrowseFile(evt, string) )


	




	b_accept.Bind(wx.EVT_BUTTON,  self.OnAccept )


	#self.Bind(wx.EVT_BUTTON, self.OnProcess,b_process)


        self.Show(True)
Пример #3
0
    def make_layout(self,parent):
        wx.Panel.__init__(self, parent)
        fgs0 =wx.FlexGridSizer(rows=2,cols=2)
        bs0  =wx.BoxSizer(wx.VERTICAL)
        bs1  =wx.BoxSizer(wx.VERTICAL)
        bs2  =wx.BoxSizer(wx.VERTICAL)



        self.b_reset=wx.Button(  self,-1,"Reset",(70,30))
        self.b_browse=wx.Button( self,-1,"Browse",(70,30))
        self.b_desc=wx.Button(   self,-1,"View / Edit",(100,30))


        space=wx.Size(100,100)
        self.chkbx = wx.CheckBox(self,wx.ID_ANY,"Convert")
        self.choice_codec=wx.Choice(self,    wx.ID_ANY, size=(100,30), choices=self.choices["codec"])
        self.choice_bitrate=wx.Choice(self,  wx.ID_ANY, size=(100,30), choices=self.choices["bitrate"])
        self.choice_scale=wx.Choice(self,    wx.ID_ANY, size=(100,30), choices=self.choices["scale"])
        self.choice_fps=wx.Choice(self,      wx.ID_ANY, size=(100,30), choices=self.choices["fps"])

        
        self.wd_s_path = iwx.iStaticText(self,-1,"Path:")
        self.wd_s_name = iwx.iStaticText(self,-1,"Name:")
        self.wd_s_desc = iwx.iStaticText(self,-1,"Details:")
        wd_dummy1 = wx.StaticText(self,-1,"_________________________")       
        self.b_process=wx.Button(self,-1,"Import",(70,30))




        bs0.Add(self.b_browse)
        bs0.Add(self.b_desc)
        bs0.Add(self.b_reset)

        bs1.Add(space)
        bs1.Add(self.chkbx)
        bs1.Add(self.choice_codec)        
        bs1.Add(self.choice_bitrate)        
        bs1.Add(self.choice_scale)        
        bs1.Add(self.choice_fps)        
        bs1.Add(self.b_process)
    
        bs2.Add(wd_dummy1)
        bs2.Add(self.wd_s_path)
        bs2.Add(self.wd_s_name)
        bs2.Add(self.wd_s_desc)


        fgs0.Add(bs0)
        fgs0.Add(bs2)
        fgs0.Add(bs1) 

        self.SetSizer(fgs0)
        self.Layout()
        self.Fit()








        self.Show(True)
Пример #4
0
    def __init__(self, parent, WD):
        self.WD = WD
        self.cont = False
       # wx.Frame.__init__(self, parent, title="Project Details", size=(300,500))
        wx.Dialog.__init__(self, parent, title="Project Details", size=(300,500))

# default settings


#status bar
        #self.CreateStatusBar() # A StatusBar in the bottom of the window
#menu

        filemenu= wx.Menu()


        menuAbout = filemenu.Append(wx.ID_ABOUT, "&About"," Information about this program")
        menuExit = filemenu.Append(wx.ID_EXIT,"&Exit"," Terminate the program")



        menuBar = wx.MenuBar()
        menuBar.Append(filemenu,"&File") # Adding the "filemenu" to the MenuBar
       # self.SetMenuBar(menuBar)  # Adding the MenuBar to the Frame content.

#buttons
        b_name=wx.Button(self,wx.ID_ANY,"Edit",(7,70),(50,25),wx.BU_EXACTFIT)
        b_date=wx.Button(self,wx.ID_ANY,"Edit",(7,130),(50,25),wx.BU_EXACTFIT)
        b_author=wx.Button(self,wx.ID_ANY,"Edit",(7,190),(50,25),wx.BU_EXACTFIT)
	b_scenes=wx.Button(self,wx.ID_ANY,"Edit",(7,250),(50,25),wx.BU_EXACTFIT)
	b_fps=wx.Button(self,wx.ID_ANY,"Edit",(7,310),(50,25),wx.BU_EXACTFIT)
	b_res=wx.Button(self,wx.ID_ANY,"Edit",(7,370),(50,25),wx.BU_EXACTFIT)

        b_name_c=wx.Button(self,wx.ID_ANY,"Clear",(67,70),(50,25),wx.BU_EXACTFIT)
        b_date_c=wx.Button(self,wx.ID_ANY,"Clear",(67,130),(50,25),wx.BU_EXACTFIT)
        b_author_c=wx.Button(self,wx.ID_ANY,"Clear",(67,190),(50,25),wx.BU_EXACTFIT)
	b_scenes_c=wx.Button(self,wx.ID_ANY,"Clear",(67,250),(50,25),wx.BU_EXACTFIT)
	b_fps_c=wx.Button(self,wx.ID_ANY,"Clear",(67,310),(50,25),wx.BU_EXACTFIT)
	b_res_c=wx.Button(self,wx.ID_ANY,"Clear",(67,370),(50,25),wx.BU_EXACTFIT)

	b_reset=wx.Button(self,wx.ID_ANY,"Reset",(7,410),(50,25),wx.BU_EXACTFIT)

	b_accept=wx.Button(self,5,"Accept",(67,410),(50,25),wx.BU_EXACTFIT)

#static text
        s_dummy1 = wx.StaticText(self,-1,"Video Configuration:",(7,20))

	self.s_name = iwx.iStaticText(self,-1,"Name:",(7,50))
	self.s_date = iwx.iStaticText(self,-1,"Creation Date:",(7,110))
	self.s_author = iwx.iStaticText(self,-1,"Author:",(7,170))
	self.s_scenes = iwx.iStaticText(self,-1,"# of scenes:",(7,230))
	self.s_fps = iwx.iStaticText(self,-1,"fps:",(7,290))
	self.s_res = iwx.iStaticText(self,-1,"Resolution:",(7,350))
#events
        # Set events.
        self.Bind(wx.EVT_MENU, self.OnAbout, menuAbout)
        self.Bind(wx.EVT_MENU, self.OnExit, menuExit)

        b_name.Bind(wx.EVT_BUTTON, lambda evt,string=self.s_name,att="name": self.OnEdit(evt, string,att) )
        b_author.Bind(wx.EVT_BUTTON, lambda evt, string=self.s_author,att="author": self.OnEdit(evt, string,att) )
	b_date.Bind(wx.EVT_BUTTON, lambda evt, string=self.s_date,att="date": self.OnEdit(evt, string,att) )
	b_scenes.Bind(wx.EVT_BUTTON, lambda evt, string=self.s_scenes,att="scenes": self.OnEdit(evt, string,att) )
	b_fps.Bind(wx.EVT_BUTTON, lambda evt, string=self.s_fps,att="fps": self.OnEdit(evt, string,att) )
	b_res.Bind(wx.EVT_BUTTON, lambda evt, string=self.s_res,att="res": self.OnEdit(evt, string,att) )

	b_name_c.Bind(wx.EVT_BUTTON, lambda evt, string=self.s_name: self.OnClear(evt, string) )
	b_author_c.Bind(wx.EVT_BUTTON, lambda evt, string=self.s_author: self.OnClear(evt, string) )
	b_date_c.Bind(wx.EVT_BUTTON, lambda evt, string=self.s_date: self.OnClear(evt, string) )
	b_scenes_c.Bind(wx.EVT_BUTTON, lambda evt, string=self.s_scenes: self.OnClear(evt, string) )
	b_scenes_c.Bind(wx.EVT_BUTTON, lambda evt, string=self.s_scenes: self.OnClear(evt, string) )
	b_fps_c.Bind(wx.EVT_BUTTON, lambda evt, string=self.s_fps: self.OnClear(evt, string) )
	b_res_c.Bind(wx.EVT_BUTTON, lambda evt, string=self.s_res: self.OnClear(evt, string) )


	b_reset.Bind(wx.EVT_BUTTON,  self.OnReset )
	b_accept.Bind(wx.EVT_BUTTON,  self.OnAccept )


	#self.Bind(wx.EVT_BUTTON, self.OnProcess,b_process)
	self.s_name.AddString(self.WD.name)
	self.s_date.AddString(self.WD.date)
	self.s_author.AddString(self.WD.author)
	self.s_scenes.AddString(self.WD.scenes)
	self.s_fps.AddString(self.WD.fps)
	self.s_res.AddString(self.WD.res)




        self.Show(True)