Skip to content
Snippets Groups Projects
Commit 4e43986b authored by Toumji Abdallah's avatar Toumji Abdallah
Browse files

Added a help option in the menu that diplay a help window of the current step

parent f3250e5a
Branches
No related tags found
No related merge requests found
......@@ -54,6 +54,7 @@ class Application(tk.Frame):
self.file_menu = tk.Menu(self.menu_bar, tearoff=0)
self.file_menu.add_command(label='Tool Selection', command=self.tool_selection)
self.file_menu.add_command(label='Help', command=self.display_help)
self.file_menu.add_command(label='Quit', command=self.root.quit)
self.menu_bar['menu'] = self.file_menu
......@@ -70,6 +71,25 @@ class Application(tk.Frame):
tool_selection_button = tk.Button(self.main_frame, text='Back to Tool Selection', command=self.tool_selection)
tool_selection_button.grid(row=1, column=0, columnspan=2)
def display_help(self):
""" This method is used to display the help window of the application.
The help window contains information about the application and how to use it.
"""
self.help_window = tk.Toplevel(self.root)
self.help_window.title('Help')
self.help_label = tk.Label(self.help_window, text='Help')
self.help_label.pack()
self.help_text = tk.Text(self.help_window)
self.help_text.pack(expand=True, fill='both')
current_help = json.load(open(os.path.join(os.path.dirname(__file__), 'res/Help.json')))
current_help = current_help[str(self.actual_step)]
self.help_text.insert(tk.END, current_help)
self.help_text.config(state='disabled')
def start_bids_project(self):
""" This method is used to start the creation process of a new BIDS project.
......
{
"0": "In this step, you will first need to fill the name of the dataset.\nYou will then need to choose the files you want to create between the following :\n - participants.json : Gives more information on the participants.tsv file.\n - README.md : Gives an overview of the project.\n - CHANGES : Provides a chronological list of changes to the dataset.\n - LICENCE : Provides the full licence text for the dataset.\n - CITATION.cff : A Citation File Format (CFF) file that provides citation information for the dataset. \n And finally you will choose the directory in which you want to save the dataset.",
"1": "In this step you will need to fill the forms for each file you chose in the previous step.\nIf the file is a json the name of the fields follow a certain rule :\n - Bold : Required field\n - Normal : Recommended field\n - Italic : Optional field\nIf the file is a tsv file, you will be presented a table to fill, there will be a list of recommended fields and a button to fill all empty cells with n/a on the right.\n When you want to validate the table you will first need to use the test validation button.\nIf the file is neither of those, you will be presented a text area to fill.",
"2": "In this step you will only need to indicate the number of sessions per participant in the dataset.",
"3": "In this step you will be able to integrate your experiment data into the dataset.\nFor this you will first need to use the integrate data button, it will open a new window which will let you choose the file you want to integrate.\nThen the next button will let you choose which subject and session you want to integrate the data to.\nFinally you will need to fill basic information on the data you integrated.",
"4": "This is the last step, you will be able to integrate or create sidecars for the dataset.\nFor this step you have three options :\n - Integrate sidecar : This will let you integrate a sidecar to the dataset by choosing the type of experiment file the sidecar will be applied to, the type of the sidecar and the files it will be applied to.\n - Integrate and modify : This will work the same as the previous option but will add a step that will let you modify the sidecar.\n - Create sidecar : This will let you create a sidecar from scratch by choosing the type of experiment file the sidecar will be applied to and the type of the sidecar, you will then need to fill the information of the file before selecting the files it will be applied to."
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment