def __init__(self, parent, *args, **kwargs):
        Frame.__init__(self, parent, *args, **kwargs)

        #VARIABLES
        self.filelist = []
        self.file = " "
        folderWithData = open('save.txt', 'r')
        self.folder = folderWithData.readline().replace("\n", "")
        folderWithData.close()
        self.canvas = []
        self.TOOLBAR = []
        self.number = 3
        ##############################

        self.win = parent
        self.win.geometry("1440x730")
        self.win.title("FLOOT - GUI for FLUKA to ROOT converter")
        #MENU
        self.menu = Menu(self.win)
        self.menu.add_command(label="CONVERT", command=self.CONVERT)
        self.menu.add_command(label="PLOT", command=self.PLOT)
        self.menu.add_command(label="CONVERT AND PLOT",
                              command=self.CONVERT_AND_PLOT)
        self.menu.add_command(label="CONVERT ALL DIRECTORY",
                              command=self.CONVERT_ALL_DIRECTORY)
        self.menu.add_command(label="CHANGE DIRECTORY", command=self.FOLDER)
        self.menu.add_command(label="HELP", command=self.HELP)
        self.menu.add_command(label="QUIT", command=self.EXIT)
        self.l1 = Label(self.win, text="START")

        # TREES
        self.tree = tkt.Tree(self.win,
                             self.folder,
                             'FLUKA_DIR',
                             get_contents_callback=get_contents)

        self.canv_logo = Canvas(self.win, width=400, height=200)
        ############################################
        self.grid()
        self.l1.grid(column=0, row=0, sticky=NE + SW)
        self.tree.grid(column=0, row=1, rowspan=3, sticky=NE + SW)
        self.canv_logo.grid(column=0, row=4, rowspan=2, sticky=N + S + W + E)
        self.logo = PhotoImage(file="./FLOOT_Logo/floot1.gif")
        self.canv_logo.image = self.logo

        self.canv_logo.create_image(190, 105, image=self.logo)
        #Configuration
        self.win.configure(menu=self.menu)
        self.tree.configure(background='#EEEEEE',
                            relief='sunken',
                            borderwidth=3)
        self.tree.root.expand()

        self.tree.focus_set()

        tkMessageBox.showinfo(
            "FLOOT",
            "Welcome to FLOOT!\n You are using program to convert FLUKA .bnn.lis and .tab.lis files into root TH1F, TH2D and TH3D histograms.\nSend feedback to the author: \nPatryk Pasterny\[email protected]\[email protected]"
        )
Exemplo n.º 2
0
    def __init__(self, parent, *args, **kwargs):
        Frame.__init__(self, parent, *args, **kwargs)

        #VARIABLES
        self.filelist = []
        self.file = " "
        self.folder = "./Test/Data"
        self.canvas = []
        self.TOOLBAR = []
        self.number = 3
        ##############################

        self.win = parent
        self.win.geometry("1440x730")
        self.win.title("FLOOT - GUI for FLUKA to ROOT converter")
        #MENU
        self.menu = Menu(self.win)
        self.menu.add_command(label="CONVERT", command=self.CONVERT)
        self.menu.add_command(label="CONVERT AND PLOT",
                              command=self.CONVERT_AND_PLOT)
        self.menu.add_command(label="CHANGE DIRECTORY", command=self.FOLDER)
        self.menu.add_command(label="HELP", command=self.HELP)
        self.menu.add_command(label="QUIT", command=self.EXIT)
        self.l1 = Label(self.win, text="START")

        # TREES
        self.tree = tkt.Tree(self.win,
                             './Test/Data',
                             'FLUKA_DIR',
                             get_contents_callback=get_contents)

        self.canv_logo = Canvas(self.win, width=600, height=300)
        ############################################
        self.grid()
        self.l1.grid(column=0, row=0, sticky=NE + SW)
        self.tree.grid(column=0, row=1, rowspan=5, sticky=NE + SW)
        self.canv_logo.grid(column=2, row=3)
        self.logo = PhotoImage(file="floot.gif")
        self.canv_logo.image = self.logo

        self.canv_logo.create_image(290, 169, image=self.logo)
        #Configuration
        self.win.configure(menu=self.menu)
        self.tree.configure(background='#EEEEEE',
                            relief='sunken',
                            borderwidth=3)
        self.tree.root.expand()

        self.win.rowconfigure(0, minsize=10)
        self.win.rowconfigure(1, minsize=300)
        self.win.rowconfigure(2, minsize=10)
        self.win.rowconfigure(3, minsize=300)
        self.win.rowconfigure(4, minsize=10)

        self.win.columnconfigure(0, minsize=200)
        self.win.columnconfigure(1, minsize=500)
        self.win.columnconfigure(2, minsize=500)

        self.tree.focus_set()
Exemplo n.º 3
0
 def FOLDER(self):
     self.tree.delete(0, END)
     folder = tkFileDialog.askdirectory()
     if (folder != '' and isinstance(folder, str)):
         self.folder = folder
         self.tree = tkt.Tree(self.win,
                              self.folder,
                              "FLUKA_DIR",
                              get_contents_callback=get_contents)
         self.tree.configure(background='#EEEEEE',
                             relief='sunken',
                             borderwidth=3)
         self.tree.grid(column=0, row=1, rowspan=5, sticky=NE + SW)
         self.tree.root.expand()
         self.STATUS("NEW DIRECTORY SELECTED")