# Path: apasvo/gui/views/settingsdialog.py
# COLOR_KEYS = ("method", "evaluation_mode", "evaluation_status")
# 
# Path: apasvo/gui/views/settingsdialog.py
# DEFAULT_COLOR_KEY = "method"
# 
# Path: apasvo/gui/views/settingsdialog.py
# DEFAULT_COLOR_SCHEME = ((rc.method_stalta, DEFAULT_STALTA_COLOR),
#                         (rc.method_stalta_takanami, DEFAULT_STALTA_TAKANAMI_COLOR),
#                         (rc.method_ampa, DEFAULT_AMPA_COLOR),
#                         (rc.method_ampa_takanami, DEFAULT_AMPA_TAKANAMI_COLOR),
#                         (rc.method_takanami, DEFAULT_TAKANAMI_COLOR),
#                         (rc.method_other, DEFAULT_OTHER_COLOR))
# 
# Path: apasvo/picking/apasvotrace.py
# ALLOWED_METHODS = (
#     method_other,
#     method_takanami,
#     method_stalta,
#     method_stalta_takanami,
#     method_ampa,
#     method_ampa_takanami
# )
# PHASE_VALUES = (
#     "P",
#     "S",
#     "Other",
# )
# DEFAULT_DTYPE = '=f8'  # Set the default datatype as 8 bits floating point, native ordered
# DEFAULT_DELTA = 0.02
# def generate_csv(records, fout, delimiter=',', lineterminator='\n'):
#     def __init__(self,
#                  trace,
#                  time,
#                  name='',
#                  comments='',
#                  method=method_other,
#                  phase_hint=None,
#                  polarity='undecidable',
#                  aic=None,
#                  n0_aic=None,
#                  *args, **kwargs):
#     def cf_value(self):
#     def _samples_to_seconds(self, value):
#     def _seconds_to_samples(self, value):
#     def __setattr__(self, key, value):
#     def __getattribute__(self, item):
#     def plot_aic(self, show_envelope=True, num=None, **kwargs):
#     def __init__(self,
#                  data=None,
#                  header=None,
#                  label='',
#                  description='',
#                  filename='',
#                  normalize=True,
#                  use_filtered=False,
#                  **kwargs):
#     def fs(self):
#     def delta(self):
#     def signal(self):
#     def starttime(self):
#     def endtime(self):
#     def short_name(self):
#     def name(self):
#     def detect(self, alg, threshold=None, peak_window=1.0,
#                takanami=False, takanami_margin=5.0, action='append', debug=False, **kwargs):
#     def sort_events(self, key='time', reverse=False):
#     def refine_events(self, events, t_start=None, t_end=None, takanami_margin=5.0):
#     def bandpass_filter(self, freqmin, freqmax, *args, **kwargs):
#     def save_cf(self, fname, fmt=rawfile.format_text,
#                 dtype=rawfile.datatype_float64,
#                 byteorder=rawfile.byteorder_native):
#     def plot_signal(self, t_start=0.0, t_end=np.inf, show_events=True,
#                     show_x=True, show_cf=True, show_specgram=True,
#                     show_envelope=True, threshold=None, num=None, **kwargs):
#     def add_event_from_copy(self, event):
# def _detect(parameters):
#     def __init__(self, traces, description='', filename='', **kwargs):
#     def detect(self, alg, trace_list=None, allow_multiprocessing=True, **kwargs):
#     def export_picks(self, filename, trace_list=None, format="NLLOC_OBS", debug=False, **kwargs):
# def read(filename,
#          format=None,
#          dtype='float64',
#          byteorder='native',
#          description='',
#          normalize=True,
#          *args, **kwargs):
# class ApasvoEvent(Pick):
# class ApasvoTrace(op.Trace):
# class ApasvoStream(op.Stream):
# 
# Path: apasvo/_version.py

# 
# Path: apasvo/_version.py



from PySide import QtCore
from PySide import QtGui
from apasvo.gui.views.settingsdialog import COLOR_KEYS
from apasvo.gui.views.settingsdialog import DEFAULT_COLOR_KEY
from apasvo.gui.views.settingsdialog import DEFAULT_COLOR_SCHEME
from apasvo.picking import apasvotrace as rc
from apasvo._version import _application_name
from apasvo._version import _organization
import obspy as op
import eventcommands as commands
@license:    GPL

@contact:    jemromerol@gmail.com

  This file is part of APASVO.

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  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 EventListModel(QtCore.QAbstractTableModel):
    """A Table Model class to handle a list of seismic events.
    """

    emptyList = QtCore.Signal(bool)
    eventCreated = QtCore.Signal(rc.ApasvoEvent)
    eventDeleted = QtCore.Signal(rc.ApasvoEvent)

# Path: apasvo/gui/views/settingsdialog.py
# COLOR_KEYS = ("method", "evaluation_mode", "evaluation_status")
# 
# Path: apasvo/gui/views/settingsdialog.py
# DEFAULT_COLOR_KEY = "method"
# 
# Path: apasvo/gui/views/settingsdialog.py
# DEFAULT_COLOR_SCHEME = ((rc.method_stalta, DEFAULT_STALTA_COLOR),
#                         (rc.method_stalta_takanami, DEFAULT_STALTA_TAKANAMI_COLOR),
#                         (rc.method_ampa, DEFAULT_AMPA_COLOR),
#                         (rc.method_ampa_takanami, DEFAULT_AMPA_TAKANAMI_COLOR),
#                         (rc.method_takanami, DEFAULT_TAKANAMI_COLOR),
#                         (rc.method_other, DEFAULT_OTHER_COLOR))
# 
# Path: apasvo/picking/apasvotrace.py
# ALLOWED_METHODS = (
#     method_other,
#     method_takanami,
#     method_stalta,
#     method_stalta_takanami,
#     method_ampa,
#     method_ampa_takanami
# )
# PHASE_VALUES = (
#     "P",
#     "S",
#     "Other",
# )
# DEFAULT_DTYPE = '=f8'  # Set the default datatype as 8 bits floating point, native ordered
# DEFAULT_DELTA = 0.02
# def generate_csv(records, fout, delimiter=',', lineterminator='\n'):
#     def __init__(self,
#                  trace,
#                  time,
#                  name='',
#                  comments='',
#                  method=method_other,
#                  phase_hint=None,
#                  polarity='undecidable',
#                  aic=None,
#                  n0_aic=None,
#                  *args, **kwargs):
#     def cf_value(self):
#     def _samples_to_seconds(self, value):
#     def _seconds_to_samples(self, value):
#     def __setattr__(self, key, value):
#     def __getattribute__(self, item):
#     def plot_aic(self, show_envelope=True, num=None, **kwargs):
#     def __init__(self,
#                  data=None,
#                  header=None,
#                  label='',
#                  description='',
#                  filename='',
#                  normalize=True,
#                  use_filtered=False,
#                  **kwargs):
#     def fs(self):
#     def delta(self):
#     def signal(self):
#     def starttime(self):
#     def endtime(self):
#     def short_name(self):
#     def name(self):
#     def detect(self, alg, threshold=None, peak_window=1.0,
#                takanami=False, takanami_margin=5.0, action='append', debug=False, **kwargs):
#     def sort_events(self, key='time', reverse=False):
#     def refine_events(self, events, t_start=None, t_end=None, takanami_margin=5.0):
#     def bandpass_filter(self, freqmin, freqmax, *args, **kwargs):
#     def save_cf(self, fname, fmt=rawfile.format_text,
#                 dtype=rawfile.datatype_float64,
#                 byteorder=rawfile.byteorder_native):
#     def plot_signal(self, t_start=0.0, t_end=np.inf, show_events=True,
#                     show_x=True, show_cf=True, show_specgram=True,
#                     show_envelope=True, threshold=None, num=None, **kwargs):
#     def add_event_from_copy(self, event):
# def _detect(parameters):
#     def __init__(self, traces, description='', filename='', **kwargs):
#     def detect(self, alg, trace_list=None, allow_multiprocessing=True, **kwargs):
#     def export_picks(self, filename, trace_list=None, format="NLLOC_OBS", debug=False, **kwargs):
# def read(filename,
#          format=None,
#          dtype='float64',
#          byteorder='native',
#          description='',
#          normalize=True,
#          *args, **kwargs):
# class ApasvoEvent(Pick):
# class ApasvoTrace(op.Trace):
# class ApasvoStream(op.Stream):
# 
# Path: apasvo/_version.py

# 
# Path: apasvo/_version.py



# Path: apasvo/gui/models/eventlistmodel.py
from PySide import QtCore
from PySide import QtGui
from apasvo.gui.views.settingsdialog import COLOR_KEYS
from apasvo.gui.views.settingsdialog import DEFAULT_COLOR_KEY
from apasvo.gui.views.settingsdialog import DEFAULT_COLOR_SCHEME
from apasvo.picking import apasvotrace as rc
from apasvo._version import _application_name
from apasvo._version import _organization
import obspy as op
import eventcommands as commands

@license:    GPL

@contact:    jemromerol@gmail.com

  This file is part of APASVO.

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  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 EventListModel(QtCore.QAbstractTableModel):
    """A Table Model class to handle a list of seismic events.
    """

    emptyList = QtCore.Signal(bool)
    eventCreated = QtCore.Signal(rc.ApasvoEvent)
    eventDeleted = QtCore.Signal(rc.ApasvoEvent)

    eventModified = QtCore.Signal(rc.ApasvoEvent)