# Path: apasvo/_version.py

# 
# Path: apasvo/_version.py

# 
# Path: apasvo/gui/models/eventcommands.py
# class AppendEvent(QtGui.QUndoCommand):
# class DeleteEvents(QtGui.QUndoCommand):
# class EditEvent(QtGui.QUndoCommand):
# class ClearEventList(QtGui.QUndoCommand):
# class SortEventList(QtGui.QUndoCommand):
# class DetectEvents(QtGui.QUndoCommand):
# class DetectStreamEvents(QtGui.QUndoCommand):
# class OpenStream(QtGui.QUndoCommand):
# class CloseTraces(QtGui.QUndoCommand):
#     def __init__(self, model, event):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model, row_list):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model, event, **kwargs):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model, key, order):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model, alg, **kwargs):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, trace_selector_widget, alg, trace_list=None, **kwargs):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, main_window, stream):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, main_window, trace_idx_list):
#     def undo(self):
#     def redo(self):
#     def id(self):


from PySide import QtCore
from apasvo._version import _application_name
from apasvo._version import _organization
from apasvo.gui.models import eventcommands as commands
import traceback
import sys
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
'''




class PickingTask(QtCore.QObject):
    """A class to handle an event picking/detection task.

    PickingTask objects are meant to be passed to a QThread instance
    that controls their execution.

    """

    finished = QtCore.Signal()
    error = QtCore.Signal(str, str)

    def __init__(self, document, alg, threshold=None):
        super(PickingTask, self).__init__()
        self.document = document
        self.alg = alg
        self.threshold = threshold

    def run(self):

# Path: apasvo/_version.py

# 
# Path: apasvo/_version.py

# 
# Path: apasvo/gui/models/eventcommands.py
# class AppendEvent(QtGui.QUndoCommand):
# class DeleteEvents(QtGui.QUndoCommand):
# class EditEvent(QtGui.QUndoCommand):
# class ClearEventList(QtGui.QUndoCommand):
# class SortEventList(QtGui.QUndoCommand):
# class DetectEvents(QtGui.QUndoCommand):
# class DetectStreamEvents(QtGui.QUndoCommand):
# class OpenStream(QtGui.QUndoCommand):
# class CloseTraces(QtGui.QUndoCommand):
#     def __init__(self, model, event):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model, row_list):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model, event, **kwargs):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model, key, order):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model, alg, **kwargs):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, trace_selector_widget, alg, trace_list=None, **kwargs):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, main_window, stream):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, main_window, trace_idx_list):
#     def undo(self):
#     def redo(self):
#     def id(self):


# Path: apasvo/gui/models/pickingtask.py
from PySide import QtCore
from apasvo._version import _application_name
from apasvo._version import _organization
from apasvo.gui.models import eventcommands as commands
import traceback
import sys

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
'''




class PickingTask(QtCore.QObject):
    """A class to handle an event picking/detection task.

    PickingTask objects are meant to be passed to a QThread instance
    that controls their execution.

    """

    finished = QtCore.Signal()
    error = QtCore.Signal(str, str)

    def __init__(self, document, alg, threshold=None):
        super(PickingTask, self).__init__()
        self.document = document
        self.alg = alg
        self.threshold = threshold

    def run(self):

        settings = QtCore.QSettings(_organization, _application_name)