Пример #1
0
    def __init__(self, root):
        super().__init__(root)

        self["padding"] = (10, 10, 12, 12)
        self.root = root
        self.fileStorage = self.root.fileStorage
        self.selectedBatchTime = optionGet("LastBatchTime", [(0, 20)], "list") # zkontrolovat ""

        # variables    
        self.status = StringVar()
        self.useBatchTimeVar = BooleanVar()
              
        # frames
        self.parametersF = ParameterFrame(self)
        self.fileStorageFrame= FileStorageFrame(self)
        self.saveToFrame = SaveToFrame(self, parent = "processor")
        self.optionFrame = OptionFrame(self, text = "Options")
        self.timeLabFrame = ttk.Labelframe(self, text = "Time")
        self.timeLabFrame.root = self
        self.timeFrame = TimeFrame(self.timeLabFrame)
        
        # buttons
        self.process = ttk.Button(self, text = "Process Files", command = self.processFun,
                                  state = "disabled")
        self.useBatchTime = ttk.Checkbutton(self.timeLabFrame, text = "Use batch time",
                                            variable = self.useBatchTimeVar,
                                            command = self.toggledUseBatchTime)
        self.setBatchTimeBut = ttk.Button(self.timeLabFrame, text = "Set", width = 3,
                                          command = self.setBatchTime)

        # labels
        self.statusBar = ttk.Label(self, textvariable = self.status)
        self.modeLab = ttk.Label(self, text = m.fullname[m.mode], font = ("Helvetica", "16"))
       
        # adding to grid
        self.parametersF.grid(column = 0, row = 3, columnspan = 4, sticky = (N, W), padx = 4)
        self.fileStorageFrame.grid(column = 3, row = 0, pady = 5, padx = 4)
        self.timeLabFrame.grid(column = 1, row = 5, padx = 30, sticky = (N, W))
        self.timeFrame.grid(column = 0, row = 0, columnspan = 2, sticky = (E, W))
        
        self.process.grid(column = 3, row = 7, sticky = (S, E), padx = 4, pady = 3)
        self.useBatchTime.grid(column = 0, row = 1, pady = 5)
        self.setBatchTimeBut.grid(column = 1, row = 1, pady = 5)

        self.statusBar.grid(column = 0, row = 7, columnspan = 3, sticky = (N, S, E, W), padx = 6,
                            pady = 3)
        self.modeLab.grid(column = 0, row = 0)
       
        self.saveToFrame.grid(column = 1, row = 1, columnspan = 3, sticky = (N, S, E, W),
                              padx = 6, pady = 2)

        self.optionFrame.grid(column = 0, row = 5, sticky = (N, E), padx = 6)
  
        # what should be enlarged
        self.columnconfigure(2, weight = 1)
        self.rowconfigure(2, weight = 3)
        self.rowconfigure(4, weight = 2)
        self.rowconfigure(6, weight = 2)
Пример #2
0
    def __init__(self, root):
        super().__init__(root)

        self["padding"] = (10, 10, 12, 12)
        self.root = root  # potreba pouze pro progressbar

        # variables
        self.status = StringVar()

        # frames
        self.parametersF = ParameterFrame(self)
        self.fileStorageFrame = FileStorageFrame(self)
        self.saveToFrame = SaveToFrame(self, parent="processor")
        self.timeFrame = TimeFrame(self)
        self.optionFrame = OptionFrame(self, text="Options")

        # buttons
        self.process = ttk.Button(self,
                                  text="Process Files",
                                  command=self.processFun,
                                  state="disabled")

        # labels
        self.statusBar = ttk.Label(self, textvariable=self.status)

        # adding to grid
        self.parametersF.grid(column=0,
                              row=3,
                              columnspan=4,
                              sticky=(N, W),
                              padx=4)
        self.fileStorageFrame.grid(column=3, row=0, pady=5, padx=4)
        self.timeFrame.grid(column=1, row=5, padx=30, pady=15, sticky=(N, W))

        self.process.grid(column=3, row=7, sticky=(S, E), padx=4, pady=3)

        self.statusBar.grid(column=0,
                            row=7,
                            columnspan=3,
                            sticky=(N, S, E, W),
                            padx=6,
                            pady=3)

        self.saveToFrame.grid(column=1,
                              row=1,
                              columnspan=3,
                              sticky=(N, S, E, W),
                              padx=6,
                              pady=2)

        self.optionFrame.grid(column=0, row=5, sticky=(N, E), padx=6)

        # what should be enlarged
        self.columnconfigure(2, weight=1)
        self.rowconfigure(2, weight=3)
        self.rowconfigure(4, weight=2)
        self.rowconfigure(6, weight=2)
Пример #3
0
    def __init__(self, root):
        super().__init__(root)

        self["padding"] = (7, 7, 9, 9)

        self.root = root
        self.fileStorage = self.root.fileStorage

        # file selection
        self.saveToVar = StringVar()
        self.saveToVar.set(True)
        self.fileStorageFrame = FileStorageFrame(self)
        self.fileStorageFrame.grid(column = 1, row = 0, columnspan = 2, sticky = (N, S, E, W),
                                   pady = 5, padx = 2)

        # statusbar
        self.status = StringVar()
        
        self.statusBar = ttk.Label(self, textvariable = self.status)
        self.statusBar.grid(column = 0, row = 4, columnspan = 2, sticky = (S, E, W))
        
        # control button
        self.process = ttk.Button(self, text = "Control", command = self.controlFun)
        self.process.grid(column = 2, row = 4, sticky = E)
        self.process.state(["disabled"])
        
        # report
        self.reportFrame = ttk.LabelFrame(self, text = "Report")
        self.reportFrame.grid(column = 0, row = 0, rowspan = 4, sticky = (N, S, E, W), padx = 5)
        self.reportFrame.columnconfigure(0, weight = 1)
        self.reportFrame.rowconfigure(0, weight = 1)

        self.upFrame = ttk.Frame(self.reportFrame)
        self.upFrame.grid(column = 0, row = 0, columnspan = 2, sticky = (N, S, E, W))
        self.upFrame.columnconfigure(0, weight = 1)
        self.upFrame.rowconfigure(0, weight = 1)
        
        self.contentTree = ttk.Treeview(self.upFrame, selectmode = "none")
        self.contentTree.grid(column = 0, row = 0, sticky = (N, S, E, W))
        self.contentTree["columns"] = ("description", "importance")
        self.contentTree.column("#0", width = 250, anchor = "w")
        self.contentTree.heading("#0", text = "Problem",
                                 command = self.orderReportByNames)
        self.contentTree.column("description", width = 200, anchor = "e")
        self.contentTree.heading("description", text = "Description",
                                 command = self.orderReportByResults)
        self.contentTree.column("importance", width = 60, anchor = "e")
        self.contentTree.heading("importance", text = "Importance",
                                 command = self.orderReportByImportance)      
        self.scrollbar = ttk.Scrollbar(self.upFrame, orient = VERTICAL,
                                       command = self.contentTree.yview)
        self.scrollbar.grid(column = 1, row = 0, sticky = (N, S, E))
        self.contentTree.configure(yscrollcommand = self.scrollbar.set)
        
        self.saveToFrame = SaveToFrame(self.reportFrame, label = False)
        self.saveToFrame.grid(column = 0, row = 1, sticky = (E, W))

        self.saveBut = ttk.Button(self.reportFrame, text = "Save", command = self.saveFun)
        self.saveBut.grid(column = 1, row = 1, sticky = E, padx = 2)
    
        self.controlReport = ControlReport() #!
                       
        self.contentTree.tag_bind("file", "<Double-1>", lambda e: self.treeDoubleClick(e))
        
        # method selection frame                
        self.controlFrame = ControlFrame(self)
        self.controlFrame.grid(column = 1, row = 1, columnspan = 2, sticky = (N, W), padx = 10,
                               pady = 55)


        # time frame
        self.timeFrame = TimeFrame(self)
        self.timeFrame.grid(column = 1, row = 2, columnspan = 2, sticky = (N, W), padx = 10)


        self.columnconfigure(0, weight = 1)
        self.rowconfigure(2, weight = 1)