moved widget to utils widgets for consistency and reusability

additionally the filter for PHASES and LOC files has been modified to avoid false selection
This commit is contained in:
2016-06-02 09:39:01 +02:00
parent 2395c12b26
commit de89fc83ce
2 changed files with 25 additions and 23 deletions

View File

@@ -20,7 +20,8 @@ from matplotlib.widgets import MultiCursor
from PySide.QtGui import QAction, QApplication, QComboBox, QDateTimeEdit, \
QDialog, QDialogButtonBox, QDoubleSpinBox, QGroupBox, QGridLayout, \
QIcon, QKeySequence, QLabel, QLineEdit, QMessageBox, QPixmap, QSpinBox, \
QTabWidget, QToolBar, QVBoxLayout, QWidget, QPushButton, QFileDialog
QTabWidget, QToolBar, QVBoxLayout, QWidget, QPushButton, QFileDialog, \
QInputDialog
from PySide.QtCore import QSettings, Qt, QUrl, Signal, Slot
from PySide.QtWebKit import QWebView
from obspy import Stream, UTCDateTime
@@ -33,6 +34,18 @@ from pylot.core.util.utils import prepTimeAxis, getGlobalTimes, scaleWFData, \
demeanTrace, isSorted, findComboBoxIndex
def getDataType(parent):
type = QInputDialog().getItem(parent, "Select phases type", "Type:",
["manual", "automatic"])
if type[0].startswith('auto'):
type = 'auto'
else:
type = type[0]
return type
def createAction(parent, text, slot=None, shortcut=None, icon=None,
tip=None, checkable=False):
"""