예제 #1
0
    def import_tasks(self):
        """Import the list of tasks from a .csv file."""
        path = show_open_dialog(self, "Import Shots", "CSV (*.csv)")
        if not path:
            return

        with context_reset_model(self.model):
            self._manager.import_tasks(path)
예제 #2
0
파일: artists.py 프로젝트: renaudll/csp4cg
    def _on_import(self):
        """Import the list of artists from a .csv file."""
        path = show_open_dialog(self, "Import Artists", "CSV (*.csv)")
        if not path:
            return

        with context_reset_model(self.model):
            self._manager.import_artists(path)
예제 #3
0
파일: artists.py 프로젝트: renaudll/csp4cg
    def _on_remove(self):
        """Remove selected artists from the list."""
        artists = tuple(self._iter_selected())
        if not artists:
            return

        with context_reset_model(self.model):
            self._manager.remove_artists(artists)
        self.artistDeleted.emit()
예제 #4
0
    def remove_tasks(self):
        """Remove selected tasks from the list."""
        tasks = tuple(self._iter_selected())
        if not tasks:
            return

        with context_reset_model(self.model):
            self._manager.remove_tasks(tasks)

        self.taskDeleted.emit()
예제 #5
0
 def add_task(self):
     """Add a task to the list."""
     with context_reset_model(self.model):  # TODO: Use _context_insert_row
         self._manager.add_task()
예제 #6
0
파일: artists.py 프로젝트: renaudll/csp4cg
 def _on_add(self):
     """Add an artist to the list."""
     with context_reset_model(self.model):
         self._manager.add_artist()