示例#1
0
文件: GUI.py 项目: CapnOdin/PySong
					widget.item(rowid, tags=())
			elif(boolean):
				self.set_songs(rowid, widget, True)
		
	
	def generate(self):
		if(self.widgetVars["style"].get() in PySong.auxiliary.getStyles()):
			style = self.widgetVars["style"].get()
		else:
			style = PySong.handleNewStyle(self.widgetVars["style"].get())
			self.pstyle.config(values = PySong.auxiliary.getStyles())
		
		pdf = PySong.SongBooklet(self.widgetVars["name"].get(), style, self.widgetVars["logo"].get(), self.widgetVars["indexing"].get())
		pdf.songLst = [{"title" : self.tree.set(x, "title"), "text" : self.tree.set(x, "song"), "options" : eval(self.tree.set(x, "options"))} for x in self.tree.tag_has("red")]
		pdf.makeBooklet(self.widgetVars["booklet"].get())


# main
root = ttk.setup_master()
root.title("SongBooklet")

icon = tk.PhotoImage(data = DataFile.Valknut)

root.iconphoto(root, icon)

root.focus_force()

app = Application(root)

root.mainloop()
示例#2
0
        return (name, extension, date, size, fdir, owner, carousel)

    def handle_click(self, event):
        if self.TreeView.identify_region(event.x, event.y) == "separator":
            return "break"
        elif self.TreeView.identify_region(
                event.x, event.y) == "cell" or self.TreeView.identify_region(
                    event.x, event.y) == "tree":
            self.item = self.TreeView.identify('item', event.x, event.y)
            #print("ITEM IS " + item)
            item_content = self.TreeView.item(self.item)
            self.item_id = item_content["tags"][0]
            conn = db.connectDB("test.db")
            self.Filedb = Files(conn)
            CS = self.Filedb.getCarouselStatus(self.item_id)
            conn.close()
            self.carouselState.set(CS)


root = ttk.setup_master()
root.title("RuralSync")
root.geometry("1000x340")
root.resizable(False, False)
style = ttk.Style()
style.configure("TButton", background="tomato")
style.configure("Remove.TButton", background="red")
style.configure("bottom.TFrame", width=40)
app = Application(master=root)
#root.protocol("WM_DELETE_WINDOW",app.on_close_window)
app.mainloop()
示例#3
0
 def setUp(self):
     self.root = setup_master()
     self.text = tkinter.Text(self.root)
示例#4
0
 def setUp(self):
     self.root = ttk.setup_master()
示例#5
0
 def setUp(self):
     self.root = setup_master()
     self.scaling = float(self.root.call('tk', 'scaling'))
     if not self.root.wantobjects():
         self.wantobjects = False
示例#6
0
 def setUp(self):
     self.root = ttk.setup_master()
示例#7
0
 def setUp(self):
     self.root = setup_master()
     self.text = tkinter.Text(self.root)
示例#8
0
 def setUp(self):
     self.root = setup_master()
     self.scaling = float(self.root.call('tk', 'scaling'))
     if not self.root.wantobjects():
         self.wantobjects = False
示例#9
0
 def setUp(self):
     self.root = ttk.setup_master()
     self.wantobjects = self.root.wantobjects()
示例#10
0
 def setUp(self):
     self.root = ttk.setup_master()
     self.wantobjects = self.root.wantobjects()