mirror of
https://github.com/TriM-Organization/Musicreater.git
synced 2025-09-05 20:06:23 +00:00
思想确认,具体请看群内,正在进一步修改UI,以及插件效果。
This commit is contained in:
@ -8,6 +8,8 @@ import tkinter as tk
|
||||
import tkinter.simpledialog as sdialog
|
||||
import tkinter.filedialog as fdialog
|
||||
|
||||
from tkinter import *
|
||||
|
||||
root = tk.Tk()
|
||||
|
||||
class disp:
|
||||
@ -21,9 +23,22 @@ class disp:
|
||||
'title' : self.setTitle,
|
||||
'geometry': self.setGeometry,
|
||||
'iconbitmap': self.setIcon,
|
||||
'menu': self.setMenu,
|
||||
'widget': self.setWidget,
|
||||
}
|
||||
'''注:此处为引导传参,若传参错误且debug模式关闭则不会有任何反馈'''
|
||||
|
||||
for func,args in kwgs:
|
||||
if func in self.FUNCLIST.keys():
|
||||
if type(args) == type([]):
|
||||
self.FUNCLIST[func](*args)
|
||||
if type(args) == type({}):
|
||||
self.FUNCLIST[func](**args)
|
||||
else:
|
||||
self.FUNCLIST[func](args)
|
||||
elif debug:
|
||||
raise KeyError(f'无法定位函数{func}')
|
||||
|
||||
def setTitle(self,title:str = '') -> None:
|
||||
self.root.title = title
|
||||
|
||||
@ -44,4 +59,15 @@ class disp:
|
||||
else:
|
||||
menu.add_separator()
|
||||
mainMenuBar.add_cascade(label=menuName,menu=menu)
|
||||
menus.append(menu)
|
||||
menus.append(menu)
|
||||
|
||||
def setWidget(self,**kwgs) -> None:
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
||||
class ProgressBar:
|
||||
|
||||
def __init__(self,root) -> None:
|
||||
pass
|
Reference in New Issue
Block a user