Ejemplo n.º 1
0
	def add_page(self,index):
		new_tab=experiment_tab()
		new_tab.init(index)
		new_tab.close_button.connect("clicked", self.callback_view_toggle_tab,new_tab.tab_name)

		self.notebook.append_page(new_tab,new_tab.title_hbox)
		self.notebook.set_tab_reorderable(new_tab,True)
Ejemplo n.º 2
0
 def add_page(self, index):
     tab = experiment_tab(index)
     self.notebook.addTab(tab, tab.tab_name.split("@")[0])
Ejemplo n.º 3
0
    def __init__(self):
        super().__init__()

        #1+s
        self.connected_boards = []
        self.connected_access_controls = []
        self.controllers = {}
        self.GUI_filepath = os.path.dirname(os.path.abspath(__file__))
        self.app = None  # Overwritten with QtGui.QApplication instance in main.
        self.active_user = None
        self.task_df, self.exp_df, self.setup_df, self.mouse_df = load_data_csv(
        )

        ROOT, task_dir, experiment_dir, setup_dir, mice_dir, data_dir, AC_logger_dir, protocol_dir = all_paths

        self.paths = {
            'ROOT': ROOT,
            'task_dir': task_dir,
            'experiment_dir': experiment_dir,
            'setup_dir': setup_dir,
            'mice_dir': mice_dir,
            'data_dir': data_dir,
            'AC_logger_dir': AC_logger_dir,
            'protocol_dir': protocol_dir
        }

        self.setup_df['connected'] = False

        self.tab_widget = QtGui.QTabWidget(self)

        ################ Setup the tabs ##################
        self.mouse_window_tab = mouse_window(self)
        self.setup_window_tab = setups_tab(self)
        self.schedule_tab = scheduler(self)
        self.system_tab = system_tab(self)
        self.experiment_tab = experiment_tab(self)

        self.tab_widget.addTab(self.system_tab, 'System Overview')
        self.tab_widget.addTab(self.experiment_tab, 'Experiments')
        self.tab_widget.addTab(self.mouse_window_tab, 'Mouse Overview')
        self.tab_widget.addTab(self.setup_window_tab, 'Setup Overview')
        self.tab_widget.addTab(self.schedule_tab, 'Task scheduler')

        ##################################################

        self.mouse_window_tab.setEnabled(False)
        self.setup_window_tab.setEnabled(False)
        self.schedule_tab.setEnabled(False)
        self.system_tab.setup_groupbox.setEnabled(False)
        self.system_tab.log_groupbox.setEnabled(False)
        self.system_tab.experiment_groupbox.setEnabled(False)
        #self.system_tab.
        self.experiment_tab.setEnabled(False)
        ################ Setup the tabs ##################

        self.login = login_dialog()
        self.add_user = add_user_dialog()

        self.system_tab.login_button.clicked.connect(self.change_user)
        self.system_tab.add_user_button.clicked.connect(self.add_user_)
        self.system_tab.logout_button.clicked.connect(self.logout_user)

        self.setGeometry(10, 30, 700, 800)  # Left, top, width, height.
        self.setCentralWidget(self.tab_widget)
        self.show()

        self.refresh_timer = QtCore.QTimer(
        )  # Timer to regularly call refresh() when not running.
        self.refresh_timer.timeout.connect(self.refresh)
        self.refresh_timer.start(100)

        self.refresh()  # Refresh tasks and ports lists.
Ejemplo n.º 4
0
 def add_page(self, filename):
     name = inp_get_token_value(filename, "#sim_menu_name")
     tab = experiment_tab(int(filename[5:-4]))
     self.notebook.addTab(tab, name.split("@")[0])
Ejemplo n.º 5
0
	def add_page(self,index):
		tab=experiment_tab(index)
		self.notebook.addTab(tab,tab.tab_name.split("@")[0])