[seiscomp, scanloc] Install, add .gitignore

This commit is contained in:
2025-10-09 15:07:02 +02:00
commit 20f5301bb1
2848 changed files with 1315858 additions and 0 deletions

View File

@ -0,0 +1,49 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef ABOUTWIDGET
#define ABOUTWIDGET
#include <QWidget>
#include <QPixmap>
#include <seiscomp/gui/core/ui_aboutwidget.h>
namespace Seiscomp {
namespace Gui {
class AboutWidget : public QWidget {
Q_OBJECT
public:
AboutWidget(QWidget* parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
~AboutWidget();
private:
Ui::AboutWidget _ui;
};
}
}
#endif

View File

@ -0,0 +1,384 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_APPLICATION_H
#define SEISCOMP_GUI_APPLICATION_H
#include <QApplication>
#include <QString>
#include <QRectF>
#ifndef Q_MOC_RUN
#include <seiscomp/client/application.h>
#endif
#include <seiscomp/gui/core/maps.h>
#include <seiscomp/gui/core/scheme.h>
#include <seiscomp/gui/core/messagethread.h>
#ifndef Q_MOC_RUN
#include <seiscomp/gui/core/messages.h>
#endif
#include <seiscomp/gui/core/ui_showplugins.h>
#define SCApp (Seiscomp::Gui::Application::Instance())
#define SCScheme (SCApp->scheme())
class QAbstractItemView;
class QHeaderView;
class QSplashScreen;
namespace Seiscomp {
namespace Core {
DEFINE_SMARTPOINTER(Message);
}
namespace Communication {
DEFINE_SMARTPOINTER(Connection);
}
namespace IO {
DEFINE_SMARTPOINTER(DatabaseInterface);
}
namespace Logging {
class FileOutput;
}
namespace DataModel {
DEFINE_SMARTPOINTER(DatabaseQuery);
DEFINE_SMARTPOINTER(Network);
DEFINE_SMARTPOINTER(Station);
DEFINE_SMARTPOINTER(Notifier);
DEFINE_SMARTPOINTER(Object);
}
namespace Gui {
class ConnectionDialog;
struct MessageGroups {
std::string pick;
std::string amplitude;
std::string magnitude;
std::string location;
std::string focalMechanism;
std::string event;
};
class SC_GUI_API Application : public QObject, public Client::Application {
Q_OBJECT
public:
//! Application flags
enum Flags {
//! Show splash screen on startup
SHOW_SPLASH = 0x001,
//! The application wants a database connection
WANT_DATABASE = 0x002,
//! The application wants a messaging connection
WANT_MESSAGING = 0x004,
//! The connection dialog should be opened when
//! either one of the connections that has been
//! requested with 'WANT_[SERVICE]' failed to create
OPEN_CONNECTION_DIALOG = 0x008,
//! If WANT_DATABASE is enabled and no custom settings
//! are provided in the configuration file it tries to
//! fetch the database connection from the messaging
FETCH_DATABASE = 0x010,
//! Should received notifier messages be applied or not
AUTO_APPLY_NOTIFIER = 0x020,
//! Should received notifier messages be interpreted or not
//! When this flag is not set the signals 'addObject',
//! 'removeObject' and 'updateObject' are not fired
INTERPRETE_NOTIFIER = 0x040,
LOAD_STATIONS = 0x080,
LOAD_INVENTORY = 0x100,
LOAD_CONFIGMODULE = 0x200,
DEFAULT = SHOW_SPLASH |
WANT_DATABASE |
WANT_MESSAGING |
OPEN_CONNECTION_DIALOG |
FETCH_DATABASE |
AUTO_APPLY_NOTIFIER |
INTERPRETE_NOTIFIER
};
enum Type {
//! Console application
Tty,
//! GUI client application
GuiClient
};
public:
Application(int& argc, char **argv, int flags = DEFAULT, Type type = GuiClient);
virtual ~Application();
public:
//! Returns the pointer to the application's instance.
static Application *Instance();
//! Checks if the installed Qt version is at least the
//! one passed in 'ver'
static bool minQtVersion(const char *ver);
//! Creates a CSV table into a string.
static QString createCSV(const QAbstractItemView* view,
const QHeaderView *header = nullptr);
//! Copies all selected items of specified item view to clipboard as CSV
static void copyToClipboard(const QAbstractItemView* view,
const QHeaderView *header = nullptr);
Type type() const;
Scheme &scheme();
QSettings &settings();
const QSettings &settings() const;
bool startFullScreen() const;
bool nonInteractive() const;
bool isReadOnlyMessaging() const { return _readOnlyMessaging; }
const MapsDesc &mapsDesc() const;
const MessageGroups &messageGroups() const;
Core::TimeSpan maxEventAge() const;
QColor configGetColor(const std::string& query, const QColor& base) const;
Gradient configGetColorGradient(const std::string& query, const Gradient& base) const;
QFont configGetFont(const std::string& query, const QFont& base) const;
QPen configGetPen(const std::string& query, const QPen& base) const;
QBrush configGetBrush(const std::string& query, const QBrush& base) const;
void configSetColorGradient(const std::string& query, const Gradient &gradient);
void setFilterCommandsEnabled(bool);
const std::string &commandTarget() const;
void sendCommand(Command command, const std::string& parameter);
void sendCommand(Command command, const std::string& parameter, Core::BaseObject*);
//! Sets the mainwidget which is used as hint to close the
//! splashscreen when the widget is shown
void setMainWidget(QWidget*);
void showMessage(const char*) override;
void showWarning(const char*) override;
bool notify(QObject *receiver, QEvent *e);
bool sendMessage(Seiscomp::Core::Message* msg);
bool sendMessage(const char* group, Seiscomp::Core::Message* msg);
//! This method allows to emit notifier locally. They are not being sent over
//! the messaging but interpreted and signalled to other local components.
void emitNotifier(Seiscomp::DataModel::Notifier* n);
QFont font() const;
void setFont(const QFont &font);
QPalette palette() const;
void setPalette(const QPalette &pal);
protected:
bool init() override;
bool run() override;
void done() override;
void exit(int returnCode) override;
bool initConfiguration() override;
bool initSubscriptions() override;
void schemaValidationNames(std::vector<std::string> &modules,
std::vector<std::string> &plugins) const override;
bool validateParameters() override;
bool handleInitializationError(int) override;
void handleInterrupt(int) throw() override;
virtual QString splashImagePath() const;
signals:
void changedConnection();
void changedDatabase();
void connectionEstablished();
void connectionLost();
void showNotification(NotificationLevel level, QString message);
void messageSkipped(Seiscomp::Client::Packet*);
void messageAvailable(Seiscomp::Core::Message*, Seiscomp::Client::Packet*);
void notifierAvailable(Seiscomp::DataModel::Notifier*);
void addObject(const QString &parentID, Seiscomp::DataModel::Object*);
void removeObject(const QString &parentID, Seiscomp::DataModel::Object*);
void updateObject(const QString &parentID, Seiscomp::DataModel::Object*);
public slots:
void showSettings();
void quit();
private slots:
void createConnection(QString host, QString user, QString group,
int TimeOut, QString peerCertificate);
void destroyConnection();
void databaseChanged();
void messagesAvailable();
void onConnectionEstablished();
void onConnectionLost();
void connectionError(int code);
void objectDestroyed(QObject*);
void closedLastWindow();
void showAbout();
void showHelpIndex();
void showAppHelp();
void showPlugins();
void timerSOH();
void handleSignalNotification();
private:
void startMessageThread();
void closeMessageThread();
void createSettingsDialog();
ConnectionDialog *cdlg();
private:
static Application *_instance;
protected:
struct _GUI_Core_Settings : System::Application::AbstractSettings {
bool fullScreen{false};
bool interactive{true};
std::string guiGroup{"GUI"};
std::string commandTargetClient;
struct _MapsDesc : MapsDesc {
_MapsDesc();
QString format;
void accept(SettingsLinker &linker);
} mapsDesc;
void accept(SettingsLinker &linker);
} _settings;
QApplication *_app;
Type _type;
Scheme *_scheme;
mutable QSettings *_qSettings;
QTimer _timerSOH;
bool _readOnlyMessaging;
Core::TimeSpan _eventTimeAgo;
MessageGroups _messageGroups;
QWidget *_mainWidget;
QSplashScreen *_splash;
ConnectionDialog *_dlgConnection;
bool _settingsOpened;
bool _filterCommands;
MessageThread *_thread;
int _flags;
QSocketNotifier *_signalNotifier;
int _signalSocketFd[2];
};
template <typename T>
class Kicker : public Application {
public:
Kicker(int& argc, char **argv, int flags = DEFAULT)
: Application(argc, argv, flags) {}
protected:
virtual void setupUi(T*) {}
virtual bool initUi(T*) { return true; }
virtual bool run() {
showMessage("Setup user interface");
T* w = new T;
if ( !initUi(w) ) {
showMessage("Kicker initialization failed, abort");
delete w;
return false;
}
setupUi(w);
setMainWidget(w);
if ( startFullScreen() )
w->showFullScreen();
else
w->showNormal();
return Application::run();
}
};
}
}
#endif

View File

@ -0,0 +1,133 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_CONNECTIONDIALOG_H
#define SEISCOMP_GUI_CONNECTIONDIALOG_H
#include <seiscomp/gui/core/ui_connectiondialog.h>
#include <seiscomp/gui/qt.h>
#ifndef Q_MOC_RUN
#include <seiscomp/io/database.h>
#include <seiscomp/messaging/connection.h>
#endif
#include <QDialog>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API ConnectionDialog : public QDialog {
Q_OBJECT
// ------------------------------------------------------------------
// X'truction
// ------------------------------------------------------------------
public:
ConnectionDialog(Seiscomp::Client::ConnectionPtr*,
Seiscomp::IO::DatabaseInterfacePtr*,
QWidget* parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
~ConnectionDialog();
public:
void setUsername(const QString& username);
void setClientParameters(const QString& server,
const QString& username,
const QString& primaryGroup,
const QStringList& groups,
int timeout,
const QString &peerCertificate);
bool setMessagingEnabled(bool);
bool setDatabaseParameters(const QString &uri);
bool setDatabaseParameters(const QString &type, const QString &connection);
bool setDefaultDatabaseParameters(const QString &uri);
bool setDefaultDatabaseParameters(const QString &type, const QString &connection);
std::string databaseURI() const;
bool connectToMessaging();
bool connectToDatabase();
bool hasConnectionChanged() const;
bool hasDatabaseChanged() const;
// ------------------------------------------------------------------
// Public signals
// ------------------------------------------------------------------
signals:
void aboutToConnect(QString host, QString user, QString group,
int timeout, QString peerCertificate);
void aboutToDisconnect();
void databaseChanged();
// ------------------------------------------------------------------
// Public slots
// ------------------------------------------------------------------
public slots:
void onConnectionError(int code);
int exec();
// ------------------------------------------------------------------
// Protected slots
// ------------------------------------------------------------------
protected slots:
void onConnect();
void onSwitchToReported();
void onDatabaseConnect();
void onItemChanged(QListWidgetItem *item);
void onSelectAll();
void onDeselectAll();
void onPeerCertificateOpen();
// ------------------------------------------------------------------
// Members
// ------------------------------------------------------------------
private:
::Ui::ConnectionDialog _ui;
Seiscomp::Client::ConnectionPtr* _connection;
Seiscomp::IO::DatabaseInterfacePtr* _db;
QStringList _requestedGroups;
bool _requestAllGroups;
bool _messagingEnabled;
bool _changedDatabase;
bool _changedConnection;
QString _reportedDbType;
QString _reportedDbParameters;
};
}
}
#endif

View File

@ -0,0 +1,67 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_CONNECTIONSTATELABEL_H
#define SEISCOMP_GUI_CONNECTIONSTATELABEL_H
#include <seiscomp/gui/qt.h>
#include <QLabel>
#include <QPixmap>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API ConnectionStateLabel : public QLabel {
Q_OBJECT
public:
ConnectionStateLabel(QWidget *parent = nullptr, Qt::WindowFlags f = {});
void setPixmaps(const QPixmap &connected, const QPixmap &disconnected);
public slots:
void start(const QString &source);
void stop();
signals:
void customInfoWidgetRequested(const QPoint &pos);
protected:
void mousePressEvent(QMouseEvent *event);
QPixmap _connected;
QPixmap _disconnected;
};
}
}
#endif

View File

@ -0,0 +1,384 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_DIAGRAMWIDGET_H
#define SEISCOMP_GUI_DIAGRAMWIDGET_H
#include <QWidget>
#include <QMenu>
#include <QLabel>
#include <QDialog>
#include <QVector>
#include <QPointF>
#include <QPen>
#include <seiscomp/gui/core/gradient.h>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API DiagramWidget : public QWidget {
Q_OBJECT
// ------------------------------------------------------------------
// Enumerations
// ------------------------------------------------------------------
public:
enum Type {
Rectangular,
Spherical
};
enum SymbolType {
Circle,
Triangle,
TriangleUpsideDown,
Rectangle,
Diamond
};
enum SelectionMode {
SelectActiveState,
SelectEnableState
};
// ------------------------------------------------------------------
// X'truction
// ------------------------------------------------------------------
public:
DiagramWidget(QWidget * parent = 0, Type type = Rectangular, Qt::WindowFlags f = Qt::WindowFlags());
~DiagramWidget();
// ------------------------------------------------------------------
// Qt event overrides
// ------------------------------------------------------------------
protected:
void resizeEvent(QResizeEvent *event);
void paintEvent(QPaintEvent *event);
void mouseDoubleClickEvent(QMouseEvent *event);
void mousePressEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
void contextMenuEvent(QContextMenuEvent *event);
// ------------------------------------------------------------------
// Signals
// ------------------------------------------------------------------
signals:
void hover(int id);
void clicked(int id);
void valueActivated(int id);
void valueDeactivated(int id);
void valueActiveStateChanged(int id, bool state);
void valueEnabled(int id);
void valueDisabled(int id);
void valueEnableStateChanged(int id, bool state);
void beginSelection();
void endSelection();
void adjustZoomRect(QRectF& zoomRect);
// ------------------------------------------------------------------
// Interface
// ------------------------------------------------------------------
public:
void setType(Type);
void setColumnCount(int);
int columnCount() const;
void setBackgroundColor(const QColor& c);
void setErrorBarPens(const QPen &penError, const QPen &penDefaultError);
void setMargin(int margin);
void setMarkerDistance(double xDist, double yDist);
void setMarkerDistance(QPointF distances);
void setIndicies(int x, int y);
void setAbscissaName(const QString&);
void setOrdinateName(const QString&);
void setValueDisabledColor(const QColor&);
void setDisabledValuesHidden(bool);
void setDrawGridLines(bool);
void clear();
int count() const;
bool isEmpty() const;
void addValue(qreal abzisse, qreal ordinate);
void addValue(const QPointF& point);
void addValue(const QPointF& point, const QColor& color);
void addValue(int x, int y, qreal abzisse, qreal ordinate);
void addValue(int x, int y, const QPointF& point);
void addValue(int x, int y, const QPointF& point, const QColor& color);
QPointF value(int id) const;
float value(int id, int x) const { return _values[id].cols[x].value; }
void setDisplayRect(const QRectF& rect);
QRectF displayRect() const;
QRectF boundingRect() const;
const QRect &diagramRect() const { return _diagramArea; }
QVector<int> getValues(const QRectF& rect) const;
QVector<int> getSelectedValues() const;
QRectF getSelectedValuesRect() const;
void selectValues(const QRectF& targetRect);
void setValue(int id, int x, qreal v, qreal lowerError = -1, qreal upperError = -1,
bool defaultError = false);
void setValue(int id, const QPointF& p);
void setValue(int id, int x, int y, const QPointF& p);
void setValueColor(int id, const QColor& c);
void setValueColor(int id, int x, const QColor& c);
void setValueValid(int id, int x, bool valid);
void setValueSymbol(int id, SymbolType type);
void setValueSelected(int id, bool selected);
void setValueEnabled(int id, bool enabled);
bool isValueValid(int id, int x) const;
bool isValueSelected(int id) const;
bool isValueEnabled(int id) const;
bool isValueShown(int id) const;
void showValue(int id, bool = true);
void hideValue(int id, bool = true);
void updateBoundingRect();
int hoveredValue() const { return _hoverId; }
public slots:
void setDrawErrorBars(bool);
// ------------------------------------------------------------------
// Protected interface
// ------------------------------------------------------------------
protected:
virtual void updateContextMenu(QMenu &menu);
virtual void handleContextMenuAction(QAction *action);
virtual void diagramAreaUpdated(const QRect &);
virtual void paintSphericalBackground(QPainter &);
virtual void drawValues(QPainter &painter);
virtual void drawValue(int id, QPainter& painter, const QPointF& p,
SymbolType type, bool valid) const;
// ------------------------------------------------------------------
// Implementation
// ------------------------------------------------------------------
private slots:
void zoomIntoSelectedValues();
void resetZoom();
void selectActiveState();
void selectEnableState();
private:
QPointF projectRectangular(const QPointF& p) const;
QPointF unProjectRectangular(const QPointF& p) const;
QPointF projectSpherical(const QPointF& p) const;
QPointF unProjectSpherical(const QPointF& p) const;
bool containsRectangular(const QRectF&, const QPointF&) const;
bool containsSpherical(const QRectF&, const QPointF&) const;
void updateBoundingRect(const QPointF& p);
void changeState(int id, bool state);
void toggleState(int id);
void restoreState(int id);
void paintRectangular(QPainter &painter);
void paintSpherical(QPainter &painter);
void clipRectRectangular(QRectF &rect);
void clipRectSpherical(QRectF &rect);
void adjustZoomRectangular(QRectF& zoomRect);
void adjustZoomSpherical(QRectF& zoomRect);
void drawAbscissa(QPainter& painter, int y, bool drawMarker, bool topAligned);
void drawOrdinate(QPainter& painter, int x, int abzisseHeight, qreal abzisseValue, bool leftAligned);
void drawHText(QPainter& painter, int x, int y, qreal value, Qt::Alignment al, bool topAligned) const;
void drawVText(QPainter& painter, int x, int y, qreal value, Qt::Alignment al, bool leftAligned) const;
int findValue(const QPoint& p) const;
void checkSelection(int id);
void updateSelection();
void saveStates();
void updateDiagramArea();
// ------------------------------------------------------------------
// Members
// ------------------------------------------------------------------
protected:
typedef QPointF (DiagramWidget::*ProjectFunc)(const QPointF&) const;
typedef QPointF (DiagramWidget::*UnProjectFunc)(const QPointF&) const;
typedef bool (DiagramWidget::*ContainsFunc)(const QRectF&, const QPointF&) const;
typedef void (DiagramWidget::*AdjustZoomFunc)(QRectF&);
struct ValueItem {
ValueItem() : type(Circle) {}
ValueItem(int nc, int x, int y, const QPointF& p_, bool active)
: isActive(active), isEnabled(true), isVisible(true), type(Circle) {
saveActiveState = isActive;
saveEnableState = isEnabled;
cols.resize(nc); cols[x].value = p_.x(); cols[y].value = p_.y();
}
ValueItem(int nc, int x, int y, const QPointF& p_, bool active, const QColor& c_)
: isActive(active), isEnabled(true), isVisible(true), type(Circle) {
saveActiveState = isActive;
saveEnableState = isEnabled;
cols.resize(nc); cols[x].value = p_.x(); cols[y].value = p_.y(); cols[y].color = c_;
}
void setColumns(int nc) { cols.resize(nc); }
QPointF pt(int x, int y) const { return QPointF(cols[x].value, cols[y].value); }
void setPt(int x, int y, const QPointF& p_) {
cols[x].value = p_.x(); cols[x].lowerError = -1; cols[x].upperError = -1;
cols[y].value = p_.y(); cols[y].lowerError = -1; cols[y].upperError = -1;
}
float ptx(int x) const { return cols[x].value; }
bool valid(int x, int y) const { return cols[x].valid && cols[y].valid; }
struct ColumnValueItem {
float value;
float lowerError{-1}, upperError{-1};
bool defaultError{false};
QColor color;
bool valid{true};
};
QVector<ColumnValueItem> cols;
bool isActive;
bool isEnabled;
bool isVisible;
bool saveActiveState;
bool saveEnableState;
SymbolType type;
};
enum RubberBandOperation {
Select,
SelectPlus,
SelectMinus
};
QString _nameX;
QString _nameY;
SelectionMode _mode;
Type _type;
QColor _disabledColor;
QColor _background;
QPen _penErrorBar;
QPen _penDefaultErrorBar;
ProjectFunc project;
UnProjectFunc unProject;
ContainsFunc contains;
AdjustZoomFunc adjustZoom;
QRect _clientArea;
QRect _diagramArea;
QPointF _markerDistance;
QVector<ValueItem> _values;
QVector<int> _selected;
QRectF _boundingRect;
QRectF _displayRect;
QRectF _requestRect;
int _columns;
int _xIndex;
int _yIndex;
int _horMargin, _verMargin; // horizintal/vertical margins
int _tickLength, _tickLengthA; // unannotated/annotated tick length
int _annotOffset;
int _textHeight;
QRectF _rubberBand;
RubberBandOperation _rubberBandOperation;
bool _hideDisabledValues;
bool _drawGridLines;
bool _drawErrorBars;
QPointF _draggingStart;
bool _dragStart;
bool _dragZoom;
bool _dragging;
bool _selecting;
bool _indicesChanged;
int _hoverId;
QAction* _zoomAction;
QAction* _resetAction;
QAction* _toggleUncertainties;
QAction* _actionActivate;
QAction* _actionEnable;
};
}
}
#endif

View File

@ -0,0 +1,94 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_FLOWLAYOUT_H
#define SEISCOMP_GUI_FLOWLAYOUT_H
#include <seiscomp/gui/qt.h>
#include <QLayout>
#include <QRect>
#include <QWidgetItem>
#include <QStyle>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API FlowLayout : public QLayout {
// ------------------------------------------------------------------
// X'truction
// ------------------------------------------------------------------
public:
FlowLayout(QWidget *parent, int margin = -1, int hSpacing = -1, int vSpacing = -1);
FlowLayout(int margin = -1, int hSpacing = -1, int vSpacing = -1);
~FlowLayout();
// ------------------------------------------------------------------
// Public interface
// ------------------------------------------------------------------
public:
int horizontalSpacing() const;
int verticalSpacing() const;
// ------------------------------------------------------------------
// QLayout interface
// ------------------------------------------------------------------
public:
void addItem(QLayoutItem *item) override;
Qt::Orientations expandingDirections() const override;
bool hasHeightForWidth() const override;
int heightForWidth(int) const override;
int count() const override;
QLayoutItem *itemAt(int index) const override;
QSize minimumSize() const override;
void setGeometry(const QRect &rect) override;
QSize sizeHint() const override;
QLayoutItem *takeAt(int index) override;
// ------------------------------------------------------------------
// Protected interface
// ------------------------------------------------------------------
protected:
virtual int doLayout(const QRect &rect, bool testOnly) const;
// ------------------------------------------------------------------
// Private members
// ------------------------------------------------------------------
int smartSpacing(QStyle::PixelMetric pm) const;
protected:
QVector<QLayoutItem *> _itemList;
int _hSpace;
int _vSpace;
};
}
}
#endif

View File

@ -0,0 +1,59 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_CORE_GRADIENT_H
#define SEISCOMP_GUI_CORE_GRADIENT_H
#include <seiscomp/gui/qt.h>
#include <QColor>
#include <QMap>
#include <QPair>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API Gradient : public QMap<qreal, QPair<QColor, QString> > {
public:
typedef QPair<QColor, QString> ValueType;
public:
Gradient();
public:
//! Sets the color and text at a specified position
void setColorAt(qreal position, const QColor &color,
const QString& text = "");
//! Returns the color at position. If position falls between
//! two color positions, the resulting color will be
//! interpolated linearly between both colors. When the discrete flag
//! is set, the interpolation will be disabled
QColor colorAt(qreal position, bool discrete = false) const;
};
}
}
# endif

View File

@ -0,0 +1,66 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_INFOTEXT_H
#define SEISCOMP_GUI_INFOTEXT_H
#include <seiscomp/gui/core/ui_infotext.h>
#include <seiscomp/gui/qt.h>
#include <QDialog>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API InfoText : public QDialog {
// ------------------------------------------------------------------
// X'truction
// ------------------------------------------------------------------
public:
InfoText(QWidget* parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
~InfoText();
// ------------------------------------------------------------------
// Public interface
// ------------------------------------------------------------------
public:
void setText(const QString& text);
void appendText(const QString& text);
void setReadOnly(bool readOnly);
bool isReadOnly() const;
// ------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------
private:
Ui::InfoText _ui;
};
}
}
#endif

View File

@ -0,0 +1,90 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SC_GUI_INSPECTOR_H
#define SC_GUI_INSPECTOR_H
#include <QTreeWidget>
#include <QTableWidget>
#include <QTimer>
#include <QStack>
#include <seiscomp/gui/core/ui_inspector.h>
#ifndef Q_MOC_RUN
#include <seiscomp/core/baseobject.h>
#endif
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API Inspector : public QWidget {
Q_OBJECT
public:
Inspector(QWidget * parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
~Inspector();
public:
void setObject(Core::BaseObject *obj);
void selectObject(Core::BaseObject *obj);
private:
void addObject(QTreeWidgetItem *parent);
void addProperty(const std::string &name, const std::string &type,
const std::string &value, bool isIndex = false,
bool isOptional = false, bool isReference = false);
void selectObject(QTreeWidgetItem *parent, Core::BaseObject *obj);
bool filterTree(QTreeWidgetItem *parent, const std::string &type,
const std::string &attr, const std::string &value,
QTreeWidgetItem **firstMatch,
bool parentMatch = false);
private slots:
void selectionChanged();
void filterChanged(QString);
void applyFilter();
void linkClicked(QString);
void back();
private:
typedef QPair<Core::BaseObject*, Core::BaseObject*> State;
Core::BaseObject *_object;
Core::BaseObject *_currentSelection;
Ui::Inspector _ui;
QStack<State> _history;
QTimer _filterTimer;
};
}
}
#endif

View File

@ -0,0 +1,41 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_LOCATOR_H
#define SEISCOMP_GUI_LOCATOR_H
#include <seiscomp/gui/qt.h>
#include <seiscomp/seismology/locatorinterface.h>
namespace Seiscomp {
namespace Gui {
DataModel::Origin* relocate(Seismology::LocatorInterface *loc, DataModel::Origin* origin);
}
}
#endif

View File

@ -0,0 +1,137 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_MAINWINDOW_H
#define SEISCOMP_GUI_MAINWINDOW_H
#ifndef Q_MOC_RUN
#include <seiscomp/core/baseobject.h>
#endif
#include <seiscomp/gui/core/connectionstatelabel.h>
#include <seiscomp/gui/core/messages.h>
#include <QMainWindow>
namespace Seiscomp {
namespace Core {
DEFINE_SMARTPOINTER(Message);
}
namespace Client {
DEFINE_SMARTPOINTER(Connection);
DEFINE_SMARTPOINTER(Packet);
}
namespace IO {
DEFINE_SMARTPOINTER(DatabaseInterface);
}
namespace Logging {
class FileOutput;
}
namespace DataModel {
DEFINE_SMARTPOINTER(DatabaseQuery);
DEFINE_SMARTPOINTER(Network);
DEFINE_SMARTPOINTER(Station);
DEFINE_SMARTPOINTER(Notifier);
DEFINE_SMARTPOINTER(Object);
}
namespace Gui {
class SC_GUI_API MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow(QWidget * parent = 0, Qt::WindowFlags = Qt::WindowFlags());
~MainWindow();
public:
bool restoreGeometry(const QByteArray & geometry);
protected:
void paintEvent(QPaintEvent *e);
void showEvent(QShowEvent*);
void dropEvent(QDropEvent *);
void dragEnterEvent(QDragEnterEvent *);
virtual void toggledFullScreen(bool);
signals:
void fullScreenToggled(bool);
public slots:
void showNormal();
void showFullScreen();
void setTitle(QString);
QString title() const;
private slots:
void onChangedConnection();
void toggleFullScreen();
void connectionEstablished();
void connectionLost();
void inspectConfig();
void inspectInventory();
void showNotification(NotificationLevel level, QString message);
protected:
QAction* _actionToggleFullScreen;
QAction* _actionShowSettings;
private:
QMenuBar *_menuBar;
QWidget *_menuWidget;
ConnectionStateLabel *_connectionState;
QString _title;
bool _showFullscreen;
};
}
}
#endif

View File

@ -0,0 +1,65 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_MAPS_H
#define SEISCOMP_GUI_MAPS_H
#include <seiscomp/gui/qt.h>
#include <QString>
namespace Seiscomp {
namespace Gui {
/**
* ----------------------------------------------------------------------------
* TileStore version history
* ----------------------------------------------------------------------------
* 1
* - Initial version
* 2
* - Allow TileStore::load to return null images
* 3
* - Do not inherit from MapTree and remove MapTreeNode completely
* - Add maxLevel query
* - Replace TextureID with Tile
* - All parameters with type MapTreeNode are replaced by parameters
* with type Tile
* 4 - Add two new methods to notify about asynchronous tile loading
* success and cancellation
*/
#define TILESTORE_VERSION 4
struct SC_GUI_API MapsDesc {
QString location;
QString type;
bool isMercatorProjected;
size_t cacheSize;
};
}
}
#endif

View File

@ -0,0 +1,126 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_MESSAGE_H
#define SEISCOMP_GUI_MESSAGE_H
#ifndef Q_MOC_RUN
#include <seiscomp/core/message.h>
#include <seiscomp/core/enumeration.h>
#endif
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace Gui {
MAKEENUM(
Command,
EVALUES(
CM_UNDEFINED,
CM_SHOW_ORIGIN,
CM_SHOW_STREAMS,
CM_SHOW_MAGNITUDE,
CM_OBSERVE_LOCATION,
CM_SHOW_NOTIFICATION
),
ENAMES(
"undefined",
"show origin",
"show streams",
"show magnitude",
"observe location",
"show notification"
)
);
MAKEENUM(
NotificationLevel,
EVALUES(
NL_UNDEFINED,
NL_INFO,
NL_WARNING,
NL_CRITICAL,
NL_FAILURE
),
ENAMES(
"undefined",
"info",
"warning",
"critical",
"failure"
)
);
DEFINE_SMARTPOINTER(CommandMessage);
class SC_GUI_API CommandMessage : public Seiscomp::Core::Message {
DECLARE_SC_CLASS(CommandMessage);
DECLARE_SERIALIZATION;
// ------------------------------------------------------------------
// X'truction
// ------------------------------------------------------------------
private:
CommandMessage();
CommandMessage(const std::string client, Command command);
// ------------------------------------------------------------------
// Message interface
// ------------------------------------------------------------------
public:
void setParameter(const std::string&);
void setObject(Core::BaseObject*);
const std::string& client() const;
Command command() const;
const std::string& parameter() const;
Core::BaseObject* object() const;
bool empty() const;
// ------------------------------------------------------------------
// Implementation
// ------------------------------------------------------------------
private:
std::string _client;
Command _command;
std::string _parameter;
Core::BaseObjectPtr _object;
DECLARE_SC_CLASSFACTORY_FRIEND(CommandMessage);
friend class Application;
};
}
}
#endif

View File

@ -0,0 +1,66 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_MESSAGETHREAD_H
#define SEISCOMP_GUI_MESSAGETHREAD_H
#ifndef Q_MOC_RUN
#include <seiscomp/gui/qt.h>
#include <seiscomp/messaging/connection.h>
#endif
#include <QtGui>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API MessageThread : public QThread {
Q_OBJECT
public:
MessageThread(Seiscomp::Client::Connection *c);
~MessageThread();
void run();
Seiscomp::Client::Connection *connection() const;
void setReconnectOnErrorEnabled(bool e);
signals:
void messagesAvailable();
void connectionLost();
void connectionEstablished();
void connectionError(int code);
private:
bool _reconnectOnError;
Seiscomp::Client::Connection *_connection;
};
}
}
#endif

View File

@ -0,0 +1,65 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_OPTIONALDOUBLESPINBOX_H
#define SEISCOMP_GUI_OPTIONALDOUBLESPINBOX_H
#include <seiscomp/gui/qt.h>
#include <QDoubleSpinBox>
class QToolButton;
namespace Seiscomp {
namespace Gui {
class SC_GUI_API OptionalDoubleSpinBox : public QDoubleSpinBox {
Q_OBJECT
public:
OptionalDoubleSpinBox(QWidget *parent = 0);
public:
/**
* @brief Returns whether the value is valid or not. A valid value
* is larger than the defined minimum of the value range.
* @return Flag indicating validity
*/
bool isValid() const;
private slots:
void resetContent();
void changedContent();
private:
QToolButton *_resetButton;
int _spacing;
};
}
}
#endif

View File

@ -0,0 +1,79 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_QUESTIONBOX_H
#define SEISCOMP_GUI_QUESTIONBOX_H
#include <seiscomp/gui/core/ui_questionbox.h>
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API QuestionBox {
// ------------------------------------------------------------------
// X'truction
// ------------------------------------------------------------------
public:
QuestionBox(QWidget* parent = 0, Qt::WindowFlags = Qt::WindowFlags());
~QuestionBox();
// ------------------------------------------------------------------
// Public interface
// ------------------------------------------------------------------
public:
void setText(const QString& text);
QString text() const;
void setInfo(const QString& text);
QString info() const;
// ------------------------------------------------------------------
// Reimplemented derived interface
// ------------------------------------------------------------------
public:
int exec();
// ------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------
private:
QWidget* _parent;
Qt::WindowFlags _flags;
QString _text;
QString _info;
bool _show;
int _lastResult;
};
}
}
#endif

View File

@ -0,0 +1,195 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_RECORDPOLYLINE_H
#define SEISCOMP_GUI_RECORDPOLYLINE_H
#include <QPen>
#include <QPolygon>
#include <QPainter>
#include <QVector>
#ifndef Q_MOC_RUN
#include <seiscomp/core/record.h>
#include <seiscomp/core/typedarray.h>
#include <seiscomp/core/recordsequence.h>
#endif
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace Gui {
DEFINE_SMARTPOINTER(AbstractRecordPolyline);
class SC_GUI_API AbstractRecordPolyline : public Seiscomp::Core::BaseObject {
public:
virtual void draw(QPainter &) = 0;
virtual void drawGaps(QPainter &, int yofs, int height, const QBrush &gapBrush, const QBrush &overlapBrush) = 0;
virtual void draw(QPainter &, int yofs, int height, const QBrush &gapBrush, const QBrush &overlapBrush) = 0;
virtual bool isEmpty() const = 0;
qreal baseline() const;
protected:
qreal _baseline;
};
DEFINE_SMARTPOINTER(RecordPolyline);
class SC_GUI_API RecordPolyline : public AbstractRecordPolyline,
public QVector<QPolygon> {
public:
RecordPolyline();
public:
//! creates the record polyline and returns the virtual height
//! of that polyline
void create(Record const *, double pixelPerSecond,
double amplMin, double amplMax, double amplOffset,
int height, float *timingQuality = nullptr,
bool optimization = true);
//! creates the record polyline and returns the virtual height
//! of that polyline
void create(RecordSequence const *, double pixelPerSecond,
double amplMin, double amplMax, double amplOffset,
int height, float *timingQuality = nullptr,
QVector<QPair<int,int> >* gaps = nullptr,
bool optimization = true);
void create(RecordSequence const *,
const Core::Time &start,
const Core::Time &end,
double pixelPerSecond,
double amplMin, double amplMax, double amplOffset,
int height, float *timingQuality = nullptr,
QVector<QPair<int,int> >* gaps = nullptr,
bool optimization = true);
void createStepFunction(RecordSequence const *, double pixelPerSecond,
double amplMin, double amplMax, double amplOffset,
int height, float multiplier = 1.0);
void createSteps(RecordSequence const *, double pixelPerSecond,
double amplMin, double amplMax, double amplOffset,
int height, QVector<QPair<int,int> >* gaps = nullptr);
void createSteps(RecordSequence const *,
const Core::Time &start,
const Core::Time &end,
double pixelPerSecond,
double amplMin, double amplMax, double amplOffset,
int height, QVector<QPair<int,int> >* gaps = nullptr);
// Returns the number of points
int points() const;
public:
void draw(QPainter&) override;
void drawGaps(QPainter &, int yofs, int height, const QBrush &gapBrush, const QBrush &overlapBrush) override;
void draw(QPainter &, int yofs, int height, const QBrush &gapBrush, const QBrush &overlapBrush) override;
bool isEmpty() const override { return QVector<QPolygon>::isEmpty(); }
private:
template <typename T>
void pushRecord(QPolygon *&poly, const T *data, int count,
bool merge,
double yscl, double amplOffset,
bool optimization,
int x0, double sampleWidth,
int &collapsedSamples,
int &y_min, int &y_max,
int &x_out, int &y_out,
int &x_pos, int &y_pos);
};
DEFINE_SMARTPOINTER(RecordPolylineF);
class SC_GUI_API RecordPolylineF : public AbstractRecordPolyline,
public QVector<QPolygonF> {
public:
RecordPolylineF();
public:
//! creates the record polyline and returns the virtual height
//! of that polyline
void create(Record const *, double pixelPerSecond,
double amplMin, double amplMax, double amplOffset,
int height, float *timingQuality = nullptr,
bool optimization = true);
//! creates the record polyline and returns the virtual height
//! of that polyline
void create(RecordSequence const *, double pixelPerSecond,
double amplMin, double amplMax, double amplOffset,
int height, float *timingQuality = nullptr,
QVector<QPair<qreal,qreal> >* gaps = nullptr,
bool optimization = true);
void create(RecordSequence const *,
const Core::Time &start,
const Core::Time &end,
double pixelPerSecond,
double amplMin, double amplMax, double amplOffset,
int height, float *timingQuality = nullptr,
QVector<QPair<qreal,qreal> >* gaps = nullptr,
bool optimization = true);
// Returns the number of points
int points() const;
public:
void draw(QPainter &) override;
void drawGaps(QPainter &, int yofs, int height, const QBrush &gapBrush, const QBrush &overlapBrush) override;
void draw(QPainter &, int yofs, int height, const QBrush &gapBrush, const QBrush &overlapBrush) override;
bool isEmpty() const override { return QVector<QPolygonF>::isEmpty(); }
private:
template <typename T>
void pushRecord(QPolygonF *&poly, const T *data, int count,
bool merge,
double yscl, double amplOffset,
bool optimization,
qreal x0, double sampleWidth,
int &collapsedSamples,
qreal &y_min, qreal &y_max,
qreal &x_out, qreal &y_out,
qreal &x_pos, qreal &y_pos);
};
inline qreal AbstractRecordPolyline::baseline() const {
return _baseline;
}
}
}
# endif

View File

@ -0,0 +1,165 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_SLCONNECTION_H
#define SEISCOMP_GUI_SLCONNECTION_H
#include <string>
#include <QThread>
#include <QtCore>
#ifndef Q_MOC_RUN
#include <seiscomp/core/record.h>
#include <seiscomp/io/recordinput.h>
#endif
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace Gui {
//! \brief This class provides a thread to receive records from
//! \brief a stream source.
class SC_GUI_API RecordStreamThread : public QThread {
Q_OBJECT
public:
RecordStreamThread(const std::string& recordStreamURL);
~RecordStreamThread();
public:
bool connect();
void setStartTime(const Seiscomp::Core::Time&);
void setEndTime(const Seiscomp::Core::Time&);
void setTimeWindow(const Seiscomp::Core::TimeWindow&);
bool setTimeout(int seconds);
bool addStation(const std::string& network, const std::string& station);
// Needs to be called after connect()
bool addStream(const std::string& network, const std::string& station,
const std::string& location, const std::string& channel);
// Needs to be called after connect()
bool addStream(const std::string& network, const std::string& station,
const std::string& location, const std::string& channel,
const Seiscomp::Core::Time &stime, const Seiscomp::Core::Time &etime);
// Needs to be called after connect()
bool addStream(const std::string& network, const std::string& station,
const std::string& location, const std::string& channel,
double gain);
void stop(bool waitForTermination);
//! Returns the used stream URL
const std::string& recordStreamURL() const;
//! Returns the array data type this record stream thread is
//! configured to use (default: Array::FLOAT).
Array::DataType dataType() const;
//! Set the array data type this record stream thread should
//! use (default: Array::FLOAT). NOTE: The data type must be
//! set before calling run() to have any impact.
void setDataType(Array::DataType dataType);
//! Returns the array data type this record stream thread is
//! configured to use (default: Array::FLOAT).
Record::Hint recordHint() const;
//! Set the record save hint (default: Record::DATA_ONLY).
//! NOTE: The hint must be set before calling run() to have any impact.
void setRecordHint(Record::Hint hint);
//! Returns the current recordthread ID
int ID() const;
signals:
//! This signal will be fired whenever a new record has been
//! read from the stream source. The receiver has to take care
//! to store the record inside a RecordPtr to prevent memory leaks.
//! The RecordStreamThread does not destroy any objects read from
//! the stream source.
void receivedRecord(Seiscomp::Record*);
//! This signal will be fired if an error occurs.
void handleError(const QString &);
protected:
void run();
private:
typedef std::map<std::string, double> GainMap;
int _id;
std::string _recordStreamURL;
bool _requestedClose;
bool _readingStreams;
Seiscomp::IO::RecordStreamPtr _recordStream;
QMutex _mutex;
static int _numberOfThreads;
GainMap _gainMap;
Array::DataType _dataType;
Record::Hint _recordHint;
};
class SC_GUI_API RecordStreamState : public QObject {
Q_OBJECT
protected:
RecordStreamState();
public:
static RecordStreamState& Instance();
int connectionCount() const;
QList<RecordStreamThread*> connections() const;
private:
void openedConnection(RecordStreamThread*);
void closedConnection(RecordStreamThread*);
signals:
void connectionEstablished(RecordStreamThread*);
void connectionClosed(RecordStreamThread*);
void firstConnectionEstablished();
void lastConnectionClosed();
private:
static RecordStreamState _instance;
int _connectionCount;
QList<RecordStreamThread*> _activeThreads;
friend class RecordStreamThread;
};
} // namespace Gui
} // namespace Seiscomp
#endif

View File

@ -0,0 +1,675 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_RECORDVIEW_H
#define SEISCOMP_GUI_RECORDVIEW_H
#ifndef Q_MOC_RUN
#include <seiscomp/gui/core/recordviewitem.h>
#include <seiscomp/gui/core/timescale.h>
#include <seiscomp/math/filter.h>
#endif
#include <QScrollArea>
#include <QTimer>
#include <QSet>
namespace Seiscomp {
namespace DataModel {
SC_GUI_API
bool operator<(const Seiscomp::DataModel::WaveformStreamID& left,
const Seiscomp::DataModel::WaveformStreamID& right);
}
}
namespace Seiscomp {
class RecordSequence;
namespace Gui {
class TimeScale;
class RecordStreamThread;
class SC_GUI_API RecordView : public QWidget {
Q_OBJECT
public:
enum SelectionMode {
NoSelection = 0,
SingleSelection,
ExtendedSelection
};
enum SelectionOperationFlag {
SelectNone = 0x00,
Select = 0x01,
SelectPlus = 0x02,
SelectMinus = 0x04,
SelectAll = Select | SelectPlus | SelectMinus
};
Q_DECLARE_FLAGS(SelectionOperation, SelectionOperationFlag)
public:
//! Default c'tor
//! The mode defaults to ringbuffer with a buffer
//! size of 30 minutes
RecordView(QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags(),
TimeScale *timeScale = 0);
//! Creates a RecordView using a time window
RecordView(const Seiscomp::Core::TimeWindow&,
QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags(),
TimeScale *timeScale = 0);
//! Creates a RecordView using a timespan and
//! a ringbuffer
RecordView(const Seiscomp::Core::TimeSpan&,
QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags(),
TimeScale *timeScale = 0);
~RecordView();
public:
//! Sets the timewindow used for the stream data.
//! Incoming records will only be inserted when they
//! fit into the timewindow.
void setTimeWindow(const Seiscomp::Core::TimeWindow& tw);
//! Sets the buffersize used for the stream data.
//! When setting the buffersize, incoming records will be
//! appended to the end of the stream. Records that do not
//! fit into the buffer will be removed from the front of
//! the buffer: ringbuffer mode
void setBufferSize(const Seiscomp::Core::TimeSpan& ts);
//! Returns the number of record stream
int rowCount() const;
//! Returns the number of visible streams
int visibleRowCount() const;
//! Returns the stream ID used for a row
DataModel::WaveformStreamID streamID(int row) const;
//! Returns whether a row is enabled or not
bool isEnabled(int row) const;
//! Returns the item in row 'row'
RecordViewItem* itemAt(int row) const;
//! Returns the item for streamID
RecordViewItem* item(const DataModel::WaveformStreamID& streamID) const;
//! Adds a new item to the view.
//! If there already has been added an item
//! for streamID, nullptr is returned.
RecordViewItem* addItem(const DataModel::WaveformStreamID&,
const QString& stationCode,
int slotCount = 0);
//! Adds an existing item to the view
bool addItem(RecordViewItem* item);
//! Removes a particular row
bool removeItem(int row);
//! Removes a RecordViewItem
bool removeItem(RecordViewItem*);
//! Removes and returns the item from the given row in the recordview;
//! otherwise returns nullptr.
RecordViewItem* takeItem(int row);
//! Removes the item from the view and returns true or false
bool takeItem(RecordViewItem*);
//! Cycles through all rows that row 'row' is the first
//! row in the view
void cycleToRow(int row);
//! Removes all available rows
void clear();
//! Clears all available records
void clearRecords();
//! Clears all available markers
void clearMarker();
//! Sets the height of a row in pixels
void setRowHeight(int height, bool allowStretch = false);
//! Returns the current row height
int rowHeight() const;
//! Sets the default row height
void setDefaultRowHeight(int height);
//! Sets the number of column to use when a new row is created
void setDefaultItemColumns(int numCols);
//! Sets the spacing between each row in pixels
void setRowSpacing(int spacing);
//! Sets the width of the label for each row
void setLabelWidth(int width);
//! Returns the label width
int labelWidth() const;
//! Sets the spacing between the label and the recordwidget
void setHorizontalSpacing(int);
//! Returns the horizontal spacing
int horizontalSpacing() const;
//! En-/Disables showing frames around the labels and the
//! recordwidgets
void setFramesEnabled(bool);
//! Sets frame margin of the labels and the recordwidgets
void setFrameMargin(int margin);
//! Sets the zoom factor used for zoom in/out slots
void setZoomFactor(float factor);
float zoomFactor() const;
//! Returns the current zoom spot
QPointF zoomSpot() const;
void setMinimumRowHeight(int);
void setMaximumRowHeight(int);
void setRelativeRowHeight(int desiredNumberOfTraces);
//! Returns the current alignment
Seiscomp::Core::Time alignment() const;
//! Returns the current item
RecordViewItem* currentItem() const;
QList<RecordViewItem*> selectedItems() const;
bool hasSelectedItems() const;
double timeRangeMin() const;
double timeRangeMax() const;
double timeScale() const;
Core::Time mapToTime(int x) const;
//! Returns all streams belonging to a station
QList<RecordViewItem*> stationStreams(const std::string& networkCode,
const std::string& stationCode) const;
//! Copies the view state from another recordview
bool copyState(RecordView *from);
//! Moves all items to another RecordView
bool moveItemsTo(RecordView *to);
//! Moves selected streams to another RecordView
bool moveSelectionTo(RecordView *to);
//! Sets the default actions for interactive keyboard
//! navigation:
//! - Left/Right: Moves the records left/right
//! - '+'/'-': Zooms the records vertically
//! - 'y'/'x': Zooms tehe records horizontally
//! - 'f': Toggles filtering
//! - 'r': Toggles showing filtered and raw records
void setDefaultActions();
//! Sets the datasource to read records from.
//! This method initializes the reader thread and
//! holds it until start() is called
bool setDataSource(const QString& streamURL);
//! Connects to the data source
virtual bool connectToDataSource();
//! Starts reading from the set data source
virtual bool start();
//! Stops reading from the data source
virtual void stop();
//! Returns the current recordstream thread
RecordStreamThread* recordStreamThread() const;
QWidget* infoWidget() const;
TimeScale* timeWidget() const;
/**
* @brief Returns the time window covered by all available data
* @return The data time window
*/
Core::TimeWindow coveredTimeRange() const;
Core::TimeWindow visibleTimeRange() const;
public slots:
void setRecordUpdateInterval(int ms);
//! Feeds a record into the RecordView
//! A new row is appended if rec's stream id
//! is fed for the first time
bool feed(const Seiscomp::Record *rec);
bool feed(const Seiscomp::RecordPtr rec);
bool feed(Seiscomp::Record *rec);
void scrollLeft();
void scrollLeftSlowly();
void scrollRight();
void scrollRightSlowly();
void scrollLineUp();
void scrollLineDown();
void scrollPageUp();
void scrollPageDown();
void scrollToTop();
void scrollToBottom();
void selectPreviousRow();
void selectNextRow();
void selectFirstRow();
void selectLastRow();
void enableFilter(bool);
void enableFilter(int, bool);
//! Whether to show the current selected recordstream or
//! both recordstreams
void showAllRecords(bool enable);
//! Whether to show record borders
void showRecordBorders(bool enable);
//! Whether to draw the background using alternating colors
//! The item background will be drawn using QPalette::Base and
//! QPalette::AlternateBase
void setAlternatingRowColors(bool enable);
//! Enables/disables the scrollbar
void showScrollBar(bool show);
//! Whether to automatically insert new items for new records
//! when using feed(...)
void setAutoInsertItem(bool enable);
void setAbsoluteTimeEnabled(bool enable);
void setAutoScale(bool enable);
void setAutoMaxScale(bool enable);
bool isFilterEnabled() const;
void setScale(double t, double a = 0.0f);
void setTimeRange(double t1, double t2);
void setSelection(double t1, double t2);
void move(double offset);
void setSelectionEnabled(bool);
void setSelectionMode(SelectionMode mode);
void clearSelection();
//! Sets the justification of the records regarding the
//! alignment time. 0 (Left) ... 1 (Right)
void setJustification(float);
//! Aligns the RecordView regarding the justification in
//! the current viewport on the set alignment time
void align();
void horizontalZoom(float factor);
void horizontalZoomIn() { horizontalZoom( _zoomFactor); }
void horizontalZoomOut() { horizontalZoom(1.0f/_zoomFactor); }
void verticalZoom(float factor);
void verticalZoomIn() { verticalZoom(_zoomFactor); }
void verticalZoomOut() { verticalZoom(1.0f/_zoomFactor); }
void zoom(float factor);
void zoomIn() { zoom(_zoomFactor); }
void zoomOut() { zoom(1.0f/_zoomFactor); }
void scaleAmplitudesUp();
void scaleAmplitudesDown();
void scaleVisibleAmplitudes();
void scaleAllRecords();
//! Sets the zoom spot. p is in global screen coordinates
void setZoomSpotFromGlobal(const QPoint& p);
//! Sets the relative zoom spot in logical coords
void setZoomSpot(const QPointF& p);
//! Sets the zoom rectangle in global coordinates.
void setZoomRectFromGlobal(const QRect &rect);
void setZoomRect(const QRectF &rect);
//! Sort the items by text of the label using the text in
//! row 'row'
void sortByText(int row);
//! Sort the items by text of the label using first text in
//! row 'row1' and then text in row 'row2'
void sortByText(int row1, int row2);
//! Sort the items by text of the label using first text in
//! row 'row1' and then text in row 'row2' and then text in row 'row3'
void sortByText(int row1, int row2, int row3);
//! Sort the items by text of the label using first text in
//! row 'row1' and then text in row 'row2' and then text in row 'row3'
//! and then text in row 'row4'.
void sortByText(int row1, int row2, int row3, int row4);
//! Sort the items by the value set in column 'column'
void sortByValue(int column);
//! Sort the items by the value set in column1 and then
//! by value in column2
void sortByValue(int column1, int column2);
//! Sort the items by the value set in column1 then
//! by value in column2 and finally by value in column3
void sortByValue(int column1, int column2, int column3);
//! Sort the items by the value set in column1 then
//! by value in column2 then by value in column3 and finally by value
//! in column4
void sortByValue(int column1, int column2, int column3, int column4);
//! Sort the items by text of a row and then by the value set in
//! a column
void sortByTextAndValue(int row, int column);
//! Sort the items by the data set with RecordViewItem::setData
void sortByData();
//! Finds a row by its text using regular expressions.
//! The first occurence according the sorting is returned.
//! If no item matches then -1 is returned.
int findByText(int row, QRegExp &regexp, int startRow = 0) const;
//! Sort the items by the time value of the markers with
//! text markerText
void sortByMarkerTime(const QString& markerText);
void setAlignment(const Seiscomp::Core::Time& time);
//! Aligns all rows on their marker with text set to
//! text.
void alignOnMarker(const QString& text);
//! Sets the cursor text for all rows
void setCursorText(const QString& text);
//! Selects an item
void setItemSelected(RecordViewItem* item, bool select);
void deselectAllItems();
void setCurrentItem(RecordViewItem* item);
void ensureVisible(int row);
void showSlot(int slot);
void showComponent(char componentCode);
//! Enables zooming by drawing a zoomrect with
//! the mouse
void setZoomEnabled(bool = true);
/**
* @brief Enables rubber band selection with the mouse
* @param enable Whether to enable or disable it
* @param filter Which operations are enabled
*/
void setRubberBandSelectionEnabled(bool enable = true,
SelectionOperation filter = SelectAll);
/**
* @brief Restores the default selection mode (rows) and disables
* either rubberband selection or zooming.
*/
void restoreSelectionMode();
void setDefaultDisplay();
//! Sets the parameters used to filter the traces
void setFilter(RecordWidget::Filter *filter);
bool setFilterByName(const QString&);
//! Returns the set filter instance
RecordWidget::Filter *filter() const;
void updateRecords();
void setRecordBorderDrawMode(RecordWidget::RecordBorderDrawMode mode);
signals:
void updatedRecords();
void fedRecord(RecordViewItem*, const Seiscomp::Record*);
void updatedInterval(double da, double dt, double ofs);
void toggledFilter(bool);
void scaleChanged(double time, double amplitude);
void timeRangeChanged(double tmin, double tmax);
void selectionChanged(double smin, double smax);
void alignmentChanged(const Seiscomp::Core::Time&);
void amplScaleChanged(double);
//! This signal will be emitted whenever a new item
//! has been automatically added to the view.
//! Connected classes can set the columns of the item
//! depending on the first record used for creation
//! of the item.
void addedItem(const Seiscomp::Record*, Seiscomp::Gui::RecordViewItem*);
//! This signal is emitted whenever an item will be enabled
//! or disabled
void changedItem(RecordViewItem*, bool enabled);
//! This signal will be emitted when a time (absolut time)
//! has been selected inside a RecordWidget
void selectedTime(Seiscomp::Gui::RecordWidget*, Seiscomp::Core::Time);
void progressStarted();
void progressChanged(int value);
void progressFinished();
//! This signal will be emitted whenever the selection
//! changes and when in SingleSelection mode
void currentItemChanged(RecordViewItem* current, RecordViewItem* last);
//! This signal is emitted whenever the selection changes.
void selectionChanged();
void cursorTextChanged(const QString&);
//! This signal is emitted when a filter string is dropped into the
//! recordview and the filter has been set and enabled successfully
void filterChanged(const QString&);
#ifndef Q_MOC_RUN
// Hack to set the signal public for Qt 4 wich are protected by default.
public:
#endif
/**
* @brief This signal is being emitted if the user selected an area
* with the rubber band selection tool.
* @param rect The selected rectangle in global coordinates
* @param tmin The minimum absolute time of the selected time range
* @param tmax The maximum absolute time of the selected time range
* @param operation The operation to apply.
*/
void selectedRubberBand(QRect rect,
QList<Seiscomp::Gui::RecordViewItem*>,
double tmin, double tmax,
Seiscomp::Gui::RecordView::SelectionOperation operation);
private slots:
void onItemClicked(RecordViewItem*, bool buttonDown = false,
Qt::KeyboardModifiers = Qt::NoModifier);
void selectedTime(Seiscomp::Core::Time);
void sliderAction(int action);
protected:
//! This method can be reimplemented in derived
//! classes to create a custom record widget
virtual RecordWidget *createRecordWidget(
const DataModel::WaveformStreamID &streamID
) const;
//! This method can be reimplemented in derived
//! classes to create a custom label
virtual RecordLabel *createLabel(RecordViewItem*) const;
bool event(QEvent* event);
void showEvent(QShowEvent *event);
void closeEvent(QCloseEvent *event);
void changeEvent(QEvent* e);
void resizeEvent(QResizeEvent *event);
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
void closeThread();
private:
void setupUi();
void colorItem(RecordViewItem* item, int row);
void colorItem(RecordViewItem*);
void scaleContent();
template <typename T>
void sortRows(std::list< std::pair<T, RecordViewItem*> >&);
void layoutRows();
void applyBufferChange();
double mapToUnit(int x) const;
// bool buildFilter(const QString& text, std::vector<Seiscomp::Math::Filtering::IIR::Filter<float>* >* filterList);
private:
enum Mode {
TIME_WINDOW,
RING_BUFFER
};
typedef QMap<DataModel::WaveformStreamID, RecordViewItem*> Items;
typedef QVector<RecordViewItem*> Rows;
typedef QSet<RecordViewItem*> SelectionList;
SelectionMode _selectionMode;
RecordStreamThread* _thread;
RecordViewItem* _currentItem;
TimeScale* _timeScaleWidget;
QScrollArea* _scrollArea;
QWidget* _timeScaleInfo;
QLayout* _timeScaleAuxLayout;
QAction* _filterAction;
QAction* _absTimeAction;
QTimer _recordUpdateTimer;
SelectionList _selectedItems;
Mode _mode;
Seiscomp::Core::Time _timeStart;
Seiscomp::Core::TimeSpan _timeSpan;
Items _items;
Rows _rows;
Core::Time _alignment;
QPointF _zoomSpot;
int _rowHeight;
int _minRowHeight;
int _maxRowHeight;
int _numberOfRows;
int _defaultRowHeight;
float _zoomFactor;
double _tmin, _tmax;
float _amin, _amax; // amplitude range
double _timeScale; // pixels per second
double _minTimeScale;
double _amplScale; // amplitude units per pixel
bool _filtering; // the filter state
bool _alternatingColors;
bool _showAllRecords;
bool _showRecordBorders;
bool _autoInsertItems;
bool _autoScale;
bool _autoMaxScale;
bool _frames;
int _frameMargin;
int _horizontalSpacing;
int _rowSpacing;
int _labelWidth;
int _labelColumns;
RecordWidget::RecordBorderDrawMode _recordBorderDrawMode;
RecordWidget::Filter *_filter;
friend class RecordViewItem;
};
}
}
#endif

View File

@ -0,0 +1,283 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_RECORDVIEWITEM_H
#define SEISCOMP_GUI_RECORDVIEWITEM_H
#ifndef Q_MOC_RUN
#include <seiscomp/core/recordsequence.h>
#include <seiscomp/math/filter.h>
#include <seiscomp/gui/core/recordwidget.h>
#endif
#include <QFrame>
namespace Seiscomp {
namespace Gui {
class RecordView;
class RecordViewItem;
class SC_GUI_API RecordLabel : public QWidget {
Q_OBJECT
public:
RecordLabel(QWidget *parent=0, const char *name=0);
~RecordLabel();
public:
RecordViewItem* recordViewItem() const;
void setBackgroundColor(const QColor&);
virtual void setText(const QString &str, int item=0) = 0;
virtual void setColor(QColor col, int item=0) = 0;
virtual void setFont(const QFont& f, int item=0) = 0;
virtual void setWidth(int width, int item=0) = 0;
virtual void setAlignment(Qt::Alignment al, int item=0) = 0;
virtual void setEditable(bool, int item=0) = 0;
virtual QString text(int item) const = 0;
virtual const QFont& font(int item) const = 0;
virtual void setOrientation(Qt::Orientation) = 0;
virtual int itemCount() const = 0;
void setInteractive(bool interactive);
bool isInteractive() const;
bool isEnabled() const { return _enabled; }
public slots:
void setEnabled(bool enabled);
signals:
//! This signal is emitted when the label has been double-clicked
//! and the label is not interactive
void doubleClicked();
//! This signal is emitted when the label has been double-clicked
//! and the label is interactive
void statusChanged(bool);
//! This signal is emitted when a text entry has been double-clicked
void editRequested(int item, QRect rect);
protected:
void mouseDoubleClickEvent(QMouseEvent *e);
virtual void visibilityChanged(bool) {}
private:
RecordViewItem* _parent;
bool _enabled;
bool _interactive;
friend class RecordViewItem;
};
class SC_GUI_API StandardRecordLabel : public RecordLabel {
public:
StandardRecordLabel(int items=3, QWidget *parent=0, const char* = 0);
~StandardRecordLabel();
public:
void setText(const QString &str, int item=0);
void setColor(QColor col, int item=0);
void setFont(const QFont& f, int item=0);
void setWidth(int width, int item=0);
void setAlignment(Qt::Alignment al, int item=0);
void setEditable(bool, int item=0);
QString text(int item) const;
const QFont& font(int item) const;
void setOrientation(Qt::Orientation o);
int itemCount() const;
protected:
void paintEvent(QPaintEvent *e);
protected:
struct Item {
Item() : colorSet(false) {}
QString text;
QColor color;
bool colorSet;
QFont font;
Qt::Alignment align;
bool editable;
int width;
};
bool _vertical;
QVector<Item> _items;
};
class SC_GUI_API RecordViewItem : public QWidget {
Q_OBJECT
private:
RecordViewItem(RecordView *parent=0, bool withFrame=false, int frameMargin=0,
int hSpacing=0);
RecordViewItem(RecordView *parent, RecordWidget *widget,
RecordSequence* records,
bool withFrame=false, int frameMargin=0, int hSpacing=0);
public:
~RecordViewItem();
public:
RecordView* recordView() const;
bool feed(const Seiscomp::Record *rec);
void setValue(int column, double d);
double value(int column) const;
int columnCount() const;
//! Returns the row inside the RecordView
int row() const;
//! Returns the streamID used for this item
const DataModel::WaveformStreamID& streamID() const;
void setRecords(RecordSequence*);
RecordSequence* records(char componentCode = '?') const;
RecordSequence* filteredRecords(char componentCode = '?') const;
void setBuffer(RecordSequence*);
float timingQuality(char componentCode) const;
bool showSlot(int slot);
bool showRecords(char componentCode);
char currentComponent() const;
void setLabel(RecordLabel* label);
void setLabelText(const QString& text);
void setRecordWidget(RecordWidget *widget);
RecordWidget *widget() { return _widget; }
const RecordWidget *widget() const { return _widget; }
RecordLabel *label () { return _label; }
const RecordLabel *label () const { return _label; }
void enableFiltering(bool);
bool isFilteringEnabled() const;
void setBackgroundColor(const QColor&);
QColor backgroundColor() const;
bool isSelected() const;
bool isHighlighted() const;
void setData(const QVariant&);
const QVariant& data() const;
void setDraggingEnabled(bool);
void setRowHeight(int h);
void setVisible(bool visible);
void forceInvisibilty(bool force);
bool isInvisibilityForced() const;
int mapComponentToSlot(char) const;
char mapSlotToComponent(int) const;
bool insertComponent(char, int);
protected:
void mousePressEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
private:
void setupUi(bool withFrame, int frameMargin, int hSpacing);
void setupConnection();
void setColor();
void clearRecords();
int createComponentToSlotMapping(char);
private slots:
void setSelected(bool);
private slots:
void setHighlight(bool);
void onClickedOnTime(Seiscomp::Core::Time);
void handleLayoutRequest();
signals:
void firstRecordAdded(const Seiscomp::Record*);
void clicked(RecordViewItem*, bool buttonDown, Qt::KeyboardModifiers);
void clickedOnTime(Seiscomp::Gui::RecordViewItem*, Seiscomp::Core::Time);
void componentChanged(RecordViewItem*, char);
private:
typedef QMap<char, int> SlotMap;
RecordView *_parent;
SlotMap _slotMapping;
RecordSequence *_seqTemplate;
RecordWidget *_widget;
RecordLabel *_label;
int _row;
bool _filtering;
bool _selected;
bool _highlight;
char _requestedComponent;
char _currentComponent;
QVector<double> _values;
QLayout *_labelLayout;
QLayout *_widgetLayout;
QVariant _data;
QPoint _dragStart;
bool _enableDragging;
bool _visible;
bool _forceInvisibility;
friend class RecordView;
};
}
}
#endif

View File

@ -0,0 +1,866 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_RECORDWIDGET_H
#define SEISCOMP_GUI_RECORDWIDGET_H
#include <QWidget>
#include <QFrame>
#include <QMouseEvent>
#include <QPaintEvent>
#include <QResizeEvent>
#include <QScrollBar>
#include <QHBoxLayout>
#ifndef Q_MOC_RUN
#include <seiscomp/core/record.h>
#include <seiscomp/datamodel/waveformstreamid.h>
#include <seiscomp/math/filter.h>
#include "recordpolyline.h"
#endif
namespace Seiscomp {
namespace Gui {
class RecordWidget;
//! \brief RecordMarker - marks a certain timestamp in the record
//! \brief sequence with a color and a type.
//!
//! Furthermore a marker can be moved on the stream. This class
//! is useful to correct picks visually.
class SC_GUI_API RecordMarker : public QObject {
Q_OBJECT
public:
RecordMarker(RecordWidget *parent,
const Seiscomp::Core::Time& pos,
Qt::Alignment = Qt::AlignVCenter);
RecordMarker(RecordWidget *parent,
const Seiscomp::Core::Time& pos,
const QString& text,
Qt::Alignment = Qt::AlignVCenter);
RecordMarker(RecordWidget *parent,
const RecordMarker&);
virtual ~RecordMarker();
protected:
void setParent(RecordWidget*);
public:
RecordWidget* parent() const;
void setColor(QColor c);
QColor color() const;
void setAlignment(Qt::Alignment);
Qt::Alignment alignment() const;
void setModifiedColor(QColor c);
QColor modifiedColor() const;
const Seiscomp::Core::Time& time() const;
void setCorrectedTime(const Seiscomp::Core::Time&);
const Seiscomp::Core::Time& correctedTime() const;
void setText(const QString&);
const QString& text() const;
void addAlias(const QString&);
void setDescription(const QString&);
const QString& description() const;
bool matches(const QString &text) const;
//! Returns the text to render
//! When description is empty then text is used else
//! the description itself is going to be rendered
const QString& renderText() const;
void setVisible(bool visible);
bool isVisible() const;
bool isHidden() const;
void setMovable(bool enable);
bool isMovable() const;
void setMoveCopy(bool enable);
bool isMoveCopyEnabled() const;
bool isEnabled() const;
//! Sets internal data to data. This can be used for
//! user data to store anything that a QVariant can store.
void setData(const QVariant& data);
//! Returns the user data set in setData
QVariant data() const;
//! Sets an id for the marker. This id is application depended
//! and can be chosen freely
void setId(int id);
//! Returns the id for the marker
int id() const;
bool isModified() const;
//! Sets the corrected time to the start time
void reset();
//! Sets the start time to the corrected time
void apply();
void update();
virtual RecordMarker *copy();
//! Draws the background of a marker. This method is called before
//! the traces are drawn.
virtual void drawBackground(QPainter &painter, RecordWidget *context,
int x, int y1, int y2,
QColor color, qreal lineWidth);
//! Draws the marker. This method is called after the traces are drawn.
virtual void draw(QPainter &painter, RecordWidget *context,
int x, int y1, int y2,
QColor color, qreal lineWidth);
virtual QString toolTip() const;
public slots:
virtual void setEnabled(bool enable);
private:
RecordWidget *_parent;
QColor _color;
QColor _modifierColor;
Seiscomp::Core::Time _time;
Seiscomp::Core::Time _correctedTime;
QString _text;
QString _description;
QVector<QString> _aliases;
bool _visible;
bool _moveable;
bool _moveCopy;
bool _enabled;
int _id;
Qt::Alignment _alignment;
QVariant _data;
friend class RecordWidget;
};
//!\brief RecordWidgetDecorator - decorates a RecordWidget
//!
//! This class can be used to draw custom decorations before
//! and after the RecordWidget paints its data.
class RecordWidgetDecorator : public QObject {
Q_OBJECT
public:
RecordWidgetDecorator(QObject *parent = 0);
public:
virtual void drawDecoration(QPainter *painter, RecordWidget *widget) = 0;
};
//!\brief RecordWidget - draws seismograms in a rectangular widget
//!
//! This class is only responsible for drawing, it gets records assigned as
//! pointers and is (optional) responsible for their (de)allocation. Only filtered
//! recordstreams are owned by the RecordWidget.
class SC_GUI_API RecordWidget : public QWidget {
Q_OBJECT
public:
enum DrawMode {
Single,
InRows,
Stacked,
SameOffset
};
enum ShadowWidgetFlags {
Raw = 0x01,
Filtered = 0x02
};
enum AxisPosition {
Left,
Right
};
enum RecordBorderDrawMode {
TopLine,
BottomLine,
Box
};
typedef Math::Filtering::InPlaceFilter<double> Filter;
struct Trace {
Trace() = default;
double dyMin{0}; // Data minimum value
double dyMax{0}; // Data maximum value
double dOffset{0}; // Data offset
double absMax{0};
int pyMin{0}; //
int pyMax{0};
double fyMin{-1};
double fyMax{1};
double yMin{0};
double yMax{0};
double yOffset{0}; // The used offset
float timingQuality{-1};
int timingQualityCount{0};
bool dirty{false};
bool visible{false};
AbstractRecordPolylinePtr poly;
QString status;
void reset() {
dyMin = dyMax = dOffset = absMax = 0;
fyMin = -1; fyMax = 1;
pyMin = pyMax = 0;
visible = false;
poly = nullptr;
}
bool validTrace() const {
return poly && !poly->isEmpty();
}
};
public:
RecordWidget(QWidget *parent=0);
RecordWidget(const DataModel::WaveformStreamID& streamID, QWidget *parent=0);
~RecordWidget();
public:
void enableRecordFiltering(int slot, bool enable);
bool isRecordFilteringEnabled(int slot);
bool isRecordVisible(int slot);
bool setRecordVisible(int slot, bool visible);
void setCustomBackgroundColor(QColor c);
void removeCustomBackgroundColor();
bool setRecords(int slot, RecordSequence*, bool owner = true);
bool setRecordID(int slot, const QString &id);
bool setRecordLabel(int slot, const QString &label);
bool setRecordColor(int slot, QColor c);
bool setRecordPen(int slot, const QPen &pen);
bool setRecordAntialiasing(int slot, bool antialiasing);
bool setRecordOptimization(int slot, bool enable);
bool setRecordStepFunction(int slot, bool enable);
bool setRecordBackgroundColor(int slot, QColor c);
bool removeRecordBackgroundColor(int slot);
bool setRecordFilter(int slot, const Filter *f);
bool setRecordScale(int slot, double scale);
bool setRecordUserData(int slot, QVariant data);
bool setRecordStatus(int slot, bool filtered, QString status);
RecordSequence *records() const;
RecordSequence *records(int slot) const;
RecordSequence *filteredRecords(int slot) const;
RecordSequence *takeRecords(int slot);
RecordSequence *createRecords(int slot, bool owner = true);
const Filter *recordFilter(int slot) const;
QString recordID(int slot) const;
QString recordLabel(int slot) const;
bool recordStepFunction(int slot) const;
QColor recordColor(int slot) const;
QPen recordPen(int slot) const;
const double *recordScale(int slot) const;
Trace *traceInfo(int slot, bool filtered = false);
const Trace *traceInfo(int slot, bool filtered = false) const;
QVariant recordUserData(int slot);
int setCurrentRecords(int slot);
int currentRecords() const;
public:
const QRect &canvasRect() const;
void setDrawMode(DrawMode mode);
DrawMode drawMode() const;
void setRecordBorderDrawMode(RecordBorderDrawMode mode);
RecordBorderDrawMode recordBorderDrawMode() const;
void setDrawOffset(bool f);
bool drawOffset() const { return _drawOffset; }
void setDrawSPS(bool f);
bool drawSPS() const { return _drawSPS; }
void setDrawRecordID(bool f);
bool drawRecordID() const { return _drawRecordID; }
void setRowSpacing(int);
int rowSpacing() const;
void setAxisSpacing(int);
int axisSpacing() const;
void setDrawAxis(bool f);
bool drawAxis() const { return _drawAxis; }
void setAxisWidth(int width);
int axisWidth() const;
void setAxisPosition(AxisPosition position);
AxisPosition axisPosition() const;
void setValuePrecision(int p);
int valuePrecision() const { return _valuePrecision; }
//! Sets a shadow widget that gets informed about record changes.
//! Available record slots are copied by reference
//! in that way that the listener is not the owner of the
//! data. Available marker are copied by value.
void setShadowWidget(RecordWidget *shadow, bool copyMarker,
int flags = Raw);
//! Returns the current shadow widget
RecordWidget *shadowWidget() const { return _shadowWidget; }
//! Sets the source widget for all markers.
//! This instance does not hold any marker but displays
//! the source widgets markers. All marker query function
//! are forwarded to source.
void setMarkerSourceWidget(RecordWidget *source);
//! Returns the current marker source widget
RecordWidget *markerSourceWidget() const { return _markerSourceWidget; }
void setDecorator(RecordWidgetDecorator *decorator);
RecordWidgetDecorator *decorator() const { return _decorator; }
//! Returns the fetched timing quality average
float timingQuality(int slot) const;
double timeScale() const { return _pixelPerSecond; }
double amplScale() const { return _amplScale; }
double tmin() const { return _tmin; }
double tmax() const { return _tmax; }
double amplMin() const { return _amplitudeRange[0]; }
double amplMax() const { return _amplitudeRange[1]; }
double smin() const { return _smin; }
double smax() const { return _smax; }
Seiscomp::Core::Time alignment() { return _alignment; }
Seiscomp::Core::Time centerTime();
//! Returns the trace plot position of the given slot
int streamYPos(int slot) const;
//! Returns the trace height of the given slot
int streamHeight(int slot) const;
//! Returns the amplitude range of the available data in the normalization
//! window
QPair<double,double> amplitudeDataRange(int slot) const;
//! Returns the amplitude range of the trace slot where first corresponds
//! to the lower pixel row and second to the upper pixel row
QPair<double,double> amplitudeRange(int slot) const;
void ensureVisibility(const Seiscomp::Core::Time &time, int pixelMargin);
//! Method to inform the widget about a newly inserted
//! record.
virtual void fed(int slot, const Seiscomp::Record *rec);
//! Causes the widget to rebuild its internal data
//! according its size and parameters
void setDirty();
//! Whether to show the current selected recordstream or
//! both recordstreams
void showAllRecords(bool enable);
//! Whether to show record borders
void showRecordBorders(bool enable);
//! Whether to show scaled or raw values. The default is false.
void showScaledValues(bool enable);
bool areScaledValuesShown() const { return _showScaledValues; }
//! Adds a marker to the widget. The ownership takes
//! the widget.
bool addMarker(RecordMarker*);
//! Inserts a marker at pos in the marker list
bool insertMarker(int pos, RecordMarker* marker);
int indexOfMarker(RecordMarker* marker) const;
//! Removes a record marker and returns the instance
RecordMarker *takeMarker(int pos);
RecordMarker *takeMarker(RecordMarker*);
//! Removes and deletes a record marker.
bool removeMarker(int pos);
bool removeMarker(RecordMarker*);
//! Returns the number of markers added to the widget.
int markerCount() const;
//! Returns the i-th marker.
RecordMarker* marker(int i) const;
//! Returns the marker with text set to txt
RecordMarker* marker(const QString& txt, bool movableOnly = false) const;
//! Returns the marker with text set to txt and which is enabled
RecordMarker* enabledMarker(const QString& txt) const;
//! Removes and deletes all marker inserted previously.
void clearMarker();
//! Sets the current marker
void setCurrentMarker(RecordMarker *);
//! Returns the currently focused marker
RecordMarker *currentMarker() const;
//! Returns the current marker under the mouse
RecordMarker *hoveredMarker() const;
//! Returns the marker under position p. If moveableOnly is set
//! to true, only movable markers are checked.
RecordMarker* markerAt(const QPoint& p, bool movableOnly = true, int maxDist = 5) const;
RecordMarker* markerAt(int x, int y, bool movableOnly = true, int maxDist = 5) const;
//! Returns the nearest marker left from time t
RecordMarker* lastMarker(const Seiscomp::Core::Time& t);
//! Returns the nearest marker right from time t
RecordMarker* nextMarker(const Seiscomp::Core::Time& t);
//! Returns the nearest marker at time t
RecordMarker* nearestMarker(const Seiscomp::Core::Time& t, int maxDist = -1);
//! Returns whether the widget has markers that are movable or not
bool hasMovableMarkers() const;
//! Sets the text to be displayed on the cursor
void setCursorText(const QString& text);
//! Returns the current cursor text
QString cursorText() const;
void setCursorPos(const QPoint&);
void setCursorPos(const Seiscomp::Core::Time&);
const Seiscomp::Core::Time& cursorPos() const;
const double *value(const Seiscomp::Core::Time&) const;
//! Returns the time on the left visible side of the widget
Seiscomp::Core::Time leftTime() const;
//! Returns the time on the right visible side of the widget
Seiscomp::Core::Time rightTime() const;
Seiscomp::Core::TimeWindow visibleTimeWindow() const;
Seiscomp::Core::TimeWindow selectedTimeWindow() const;
const Seiscomp::Core::TimeWindow & normalizationWindow() const;
bool isActive() const;
bool isFilteringEnabled() const;
bool isGlobalOffsetEnabled() const;
//! Maps a time to a position relative to the widget
int mapTime(const Core::Time&) const;
//! Maps a time to a position relative to the trace canvas
int mapCanvasTime(const Core::Time&) const;
//! Maps a widget position to a time
Core::Time unmapTime(int x) const;
const DataModel::WaveformStreamID& streamID() const;
void setSlotCount(int);
int slotCount() const;
//! Sets internal data to data. This can be used for
//! user data to store anything that a QVariant can store.
void setData(const QVariant& data);
//! Returns the user data set in setData
QVariant data() const;
public slots:
void setAmplAutoScaleEnabled(bool enable);
//! Sets clipping for drawmode InRows.
void setClippingEnabled(bool);
bool isClippingEnabled() const;
void enableGlobalOffset(bool enable);
void setSelected(double t1, double t2);
void setSelected(Seiscomp::Core::Time t1, Seiscomp::Core::Time t2);
void setScale(double, double=0);
void setTimeScale(double);
void setTimeRange(double, double);
void setAmplRange(double, double);
void setMinimumAmplRange(double, double);
void showTimeRange(double, double);
void translate(double);
void setEnabled(bool enabled);
void setAlignment(Seiscomp::Core::Time t);
void alignOnMarker(const QString& text);
void setAmplScale(double);
void enableFiltering(bool enable);
void setGridSpacing(double, double, double);
void setGridVSpacing(double, double, double);
void setGridVRange(double, double);
void setGridVScale(double);
void setActive(bool);
void setAutoMaxScale(bool);
void setNormalizationWindow(const Seiscomp::Core::TimeWindow&);
void setOffsetWindow(const Seiscomp::Core::TimeWindow&);
//! Sets the maximum slot index for which setFilter(filter) is
//! applied. The semantics of 'any' is bound to value -1.
void setFilterSlotMax(int max);
//! Sets the record filter. The filter will be cloned and will not
//! be touched by the widget. The caller is responsible to destroy
//! the filter used as parameter.
void setFilter(Filter* filter);
void updateRecords();
void clearRecords();
private slots:
void scroll(int);
signals:
//! This signal is emitted when a time (absolut time)
//! has been selected inside the widget. It does not
//! happen when a marker has been hit.
void selectedTime(Seiscomp::Core::Time);
//! This signal is emitted when a time range (absolut time)
//! has been selected inside the widget by holding
//! the left mouse button.
void selectedTimeRange(Seiscomp::Core::Time, Seiscomp::Core::Time);
//! This signal is emitted when a time range (absolut time)
//! is selected while still holding the left mouse button.
void selectedTimeRangeChanged(Seiscomp::Core::Time, Seiscomp::Core::Time);
//! Whenever a current (active) marker has changed
//! this signal will be emittet.
void currentMarkerChanged(Seiscomp::Gui::RecordMarker*);
void cursorMoved(QPoint p);
//! Whenever the cursor changes this signal is emitted.
//! The first parameter is the owner of the cursor and
//! the second parameter is the slot where the cursor has
//! been moved. This usually equals the current slot but
//! when drawing all slots in rows then it might differ.
void cursorUpdated(RecordWidget*, int);
void mouseOver(bool);
//! This signal is emitted when the user clicks with the
//! middle mousebutton into the trace
void clickedOnTime(Seiscomp::Core::Time);
void traceUpdated(Seiscomp::Gui::RecordWidget*);
//! This signal is emitted when the layout of the widget
//! changes. Whenever a new slot has been added or removed
//! and the drawingMode is InRows then a layoutRequest is made.
void layoutRequest();
void axisSettingsChanged(Seiscomp::Gui::RecordWidget*);
protected:
void init();
bool event(QEvent *);
void paintEvent(QPaintEvent*);
void mousePressEvent(QMouseEvent*);
void mouseReleaseEvent(QMouseEvent*);
void mouseDoubleClickEvent(QMouseEvent*);
void mouseMoveEvent(QMouseEvent*);
void resizeEvent(QResizeEvent*);
void enterEvent(QEvent*);
void leaveEvent(QEvent*);
void enabledChange(bool) { update(); }
virtual void changedRecords(int slot, RecordSequence*);
virtual void drawActiveCursor(QPainter &painter, int x, int y);
virtual void drawCustomBackground(QPainter &painter);
virtual void customPaintTracesBegin(QPainter &painter);
virtual void customPaintTracesEnd(QPainter &painter);
virtual void createPolyline(int slot, AbstractRecordPolylinePtr &polyline,
RecordSequence const *, double pixelPerSecond,
double amplMin, double amplMax, double amplOffset,
int height, bool optimization, bool highPrecision);
virtual const double *value(int slot, const Seiscomp::Core::Time&) const;
protected:
struct Stream {
enum Index {
Raw = 0,
Filtered = 1
};
Stream(bool owner);
~Stream();
void setDirty();
void free();
RecordSequence *records[2];
Trace traces[2];
bool ownRawRecords;
bool ownFilteredRecords;
bool visible;
bool filtering;
QString id;
QPen pen;
bool antialiasing;
bool stepFunction;
QColor customBackgroundColor;
bool hasCustomBackgroundColor;
bool optimize;
double scale;
// The value range axis, if enabled
QString axisLabel;
double axisSpacing[2];
bool axisDirty;
// Internal variables to track the current trace position
// in widget coordinated
int posY;
int height;
QVariant userData;
Filter *filter;
};
protected:
Stream *getStream(int);
const Stream *getStream(int) const;
bool createFilter();
bool createFilter(int slot);
void filterRecords(Stream *s);
bool setFilteredRecords(int slot, RecordSequence* seq, bool owner);
Record* filteredRecord(Filter *&filter,
const Record*, const Record*,
double tolerance) const;
void prepareRecords(Stream *s);
void drawRecords(Stream *s, int slot);
void drawTrace(QPainter &painter,
const Trace *trace,
const RecordSequence *seq,
const QPen &pen,
const QPoint &paintOffset) const;
void drawRecordBorders(QPainter &painter, const RecordSequence *seq) const;
void drawMarkers(QPainter &painter, QFont &font, const QColor &fg);
void drawAxis(QPainter &painter, const QPen &p);
int canvasWidth() const;
int canvasHeight() const;
private:
typedef QVector<Stream*> StreamMap;
QVariant _data;
DrawMode _drawMode;
RecordBorderDrawMode _recordBorderDrawMode;
Seiscomp::Core::Time _alignment;
bool _clipRows{true};
double _tmin; // time range min
double _tmax; // time range max
double _smin, _smax; // selection
double _pixelPerSecond;
double _amplScale; // pixel per amplitude unit (0=normalize)
double _gridHSpacing[2];
double _gridHOffset;
double _gridVRange[2];
double _gridVSpacing[2];
double _gridVOffset;
double _gridVScale;
double _amplitudeRange[2];
bool _useFixedAmplitudeRange{false};
bool _useMinAmplitudeRange{false};
bool _active{false};
bool _filtering{false};
bool _showScaledValues{false};
bool _drawRecords{false};
bool _drawRecordID{true};
bool _drawOffset{true};
bool _drawSPS{false};
bool _showAllRecords{false};
bool _showRecordBorders{false};
bool _autoMaxScale{false};
bool _enabled;
bool _useGlobalOffset{false};
bool _drawAxis;
int _tracePaintOffset;
int _axisWidth;
AxisPosition _axisPosition;
int _axisSpacing;
int _rowSpacing;
StreamMap _streams;
int _currentSlot;
int _requestedSlot;
int _maxFilterSlot;
int _currentCursorYPos;
int _valuePrecision;
QColor _customBackgroundColor;
bool _hasCustomBackground;
Seiscomp::DataModel::WaveformStreamID _streamID;
QVector<RecordMarker*> _marker;
RecordMarker *_activeMarker;
RecordMarker *_hoveredMarker;
QScrollBar *_scrollBar;
QRect _canvasRect;
int _margins[4];
QString _cursorText;
Seiscomp::Core::Time _cursorPos;
Seiscomp::Core::Time _startDragPos;
Seiscomp::Core::TimeWindow _normalizationWindow;
Seiscomp::Core::TimeWindow _offsetWindow;
RecordWidget *_shadowWidget;
RecordWidget *_markerSourceWidget;
RecordWidgetDecorator *_decorator;
int _shadowWidgetFlags;
};
inline const QRect &RecordWidget::canvasRect() const {
return _canvasRect;
}
inline int RecordWidget::rowSpacing() const {
return _rowSpacing;
}
inline int RecordWidget::axisSpacing() const {
return _axisSpacing;
}
inline int RecordWidget::axisWidth() const {
return _axisWidth;
}
inline RecordWidget::AxisPosition RecordWidget::axisPosition() const {
return _axisPosition;
}
inline int RecordWidget::canvasWidth() const {
return _canvasRect.width();
}
inline int RecordWidget::canvasHeight() const {
return _canvasRect.height();
}
}
}
# endif

View File

@ -0,0 +1,209 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_RULER_H
#define SEISCOMP_GUI_RULER_H
#include <seiscomp/gui/qt.h>
#include <QFrame>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API Ruler : public QFrame
{
Q_OBJECT
public:
enum Position { Bottom, Top, Left, Right };
Ruler(QWidget* = 0, Qt::WindowFlags f = Qt::WindowFlags(), Position pos = Bottom);
~Ruler() {}
void setPosition(Position, bool allowLabelTextRotation = false);
void setReverseDirection(bool reverse);
void setRange(double, double);
void setLimits(double leftValue, double rightValue, double minRange, double maxRange);
void setScale(double);
bool setSelected(double, double);
bool setSelectionHandle(int handle, double pos);
bool setSelectionHandleEnabled(int handle, bool enable);
void setAnnot(double = -1); // -1 is "auto", 0 is none
void setTicks(double = -1); // -1 is "auto", 0 is none
void setSelectionHandleCount(int);
bool isSelectionEnabled() const { return _enableSelection; }
int selectionHandleCount() const;
double selectionHandlePos(int) const;
void setWheelEnabled(bool scale, bool translate);
double minimumRange() const { return _min; }
double maximumRange() const { return _max; }
double minimumSelection() const;
double maximumSelection() const;
double scale() const { return _scl; }
double pixelPerUnit() const { return _scl; }
double dA() const { return _drx[0]; }
double dT() const { return _drx[1]; }
double dOfs() const { return _ofs; }
virtual QSize sizeHint() const;
//! Functions for position independent drawing
int rulerWidth() const { return isHorizontal() ? width() : height(); }
int rulerHeight() const { return isHorizontal() ? height() : width(); }
bool isBottom() const { return _position == Bottom; }
bool isTop() const { return _position == Top; }
bool isLeft() const { return _position == Left; }
bool isRight() const { return _position == Right; }
bool isHorizontal() const { return isBottom() || isTop(); }
bool isVertical() const { return !isHorizontal(); }
public slots:
void showRange(double, double);
void translate(double);
void setAutoScaleEnabled(bool);
void setSelectionEnabled(bool);
void setRangeSelectionEnabled(
bool enabled,
bool emitRangeChangeWhileDragging = false
);
void changed(int pos = -1);
signals:
void scaleChanged(double);
void changedSelection(double, double);
void selectionHandleMoved(int handle, double pos, Qt::KeyboardModifiers);
void selectionHandleMoveFinished();
void changedInterval(double dA, double dT, double ofs);
void dragged(double diffTime);
void dragStarted();
void dragFinished();
void rangeChangeRequested(double tmin, double tmax);
protected:
void paintEvent(QPaintEvent*);
void mousePressEvent(QMouseEvent*);
void mouseReleaseEvent(QMouseEvent*);
void mouseMoveEvent(QMouseEvent*);
void wheelEvent(QWheelEvent*);
void resizeEvent(QResizeEvent*);
//! Should be reimplemented in derived classes to
//! customize the displayed string. str holds the string
//! used for displaying and value describes the position
//! on the ruler.
virtual bool getTickText(double pos, double lastPos,
int line, QString &str) const;
virtual void updateIntervals();
void enterEvent(QEvent *e);
void leaveEvent(QEvent *e);
void setLineCount(int lines, int spacing = 4);
virtual void drawSelection(QPainter &p);
void drawRangeSelection(QPainter &p);
//! Converts ruler position to point in widget coordinates, rx is the
//! position on the ruler, ry the distance from the rulers baseline
QPoint r2wPos(int rx, int ry) const;
//! Converts widget coordinates to ruler position
QPoint w2rPos(int x, int y) const;
//! Converts ruler rectangle to rectangle in widget coordinates.
//! rx is the position on the ruler, ry the distance from the rulers
//! baseline
QRect r2wRect(int rx, int ry, int rw, int rh) const;
//! Draws text at the specified ruler position (rx) with
//! the specified distance (ry) from the rulers baseline.
//! If allowRotate is set to 'true' the text is rotated
//! by 90 degrees if the ruler is in a vertical mode.
bool rulerDrawText(QPainter &p, int rx, int ry,
const QString &text, bool allowClip = false,
bool allowRotate = false) const;
bool rulerDrawTextAtLine(QPainter &p, int rx, int line,
const QString &text, bool allowClip = false,
bool allowRotate = false) const;
void checkLimit(double &tmin, double &tmax);
void changeRange(double tmin, double tmax);
protected:
struct Handle {
Handle() : enabled(true) {}
double pos;
bool enabled;
bool operator<(const Handle &other) const {
return pos < other.pos;
}
};
Position _position;
double _ofs{0};
double _scl{1.0},
_min{0}, _max{0}, // ruler range
_da{-1}, // annotation interval
_dt{-1}, // tick mark interval
_limitLeft, _limitRight,
_limitMinRange, _limitMaxRange;
int _pos{0}, _tickLong, _tickShort, _lc, _lineSpacing;
QVector<Handle> _selectionHandles;
int _currentSelectionHandle{-1};
double _drx[2]; // current intervals
int _dragMode{0};
double _dragStart;
int _iDragStart;
int _rangemin{0}, _rangemax{0};
bool _rangeValid;
bool _enableSelection;
bool _enableRangeSelection{false};
bool _enableLabelRotation{false};
bool _leftToRight{true}; // Or bottomToTop
bool _emitRangeChangeWhileDragging{false};
bool _hover{false};
bool _wheelScale{true};
bool _wheelTranslate{true};
bool _autoScale{false};
};
} // ns Gui
} // ns Seiscomp
# endif // _RULER_H_

View File

@ -0,0 +1,377 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_SCHEME_H
#define SEISCOMP_GUI_SCHEME_H
#include <QColor>
#include <QPen>
#include <QBrush>
#include <QPoint>
#include <QFont>
#include <seiscomp/gui/qt.h>
#include <seiscomp/gui/core/gradient.h>
#include <seiscomp/gui/core/recordwidget.h>
class QTabWidget;
namespace Seiscomp {
namespace Gui {
class SC_GUI_API Scheme {
public:
Scheme();
void applyTabPosition(QTabWidget *tab);
struct Colors {
Colors();
struct Splash {
Splash();
QColor version;
QColor message;
};
struct Picks {
Picks();
QColor manual;
QColor automatic;
QColor undefined;
QColor disabled;
};
struct Arrivals {
Arrivals();
QColor manual;
QColor automatic;
QColor theoretical;
QColor undefined;
QColor disabled;
QPen uncertainties;
QPen defaultUncertainties;
Gradient residuals;
};
struct Magnitudes {
Magnitudes();
QColor set;
QColor unset;
QColor disabled;
Gradient residuals;
};
struct RecordStates {
RecordStates();
QColor unrequested;
QColor requested;
QColor inProgress;
QColor notAvailable;
};
struct BrushPen {
QPen pen;
QBrush brush;
};
struct RecordBorders {
RecordBorders();
BrushPen standard;
BrushPen signatureValid;
BrushPen signatureInvalid;
};
struct Records {
Records();
QColor alignment;
QColor background;
QColor alternateBackground;
QColor foreground;
QColor alternateForeground;
QColor spectrogram;
QPen offset;
QPen gridPen;
QPen subGridPen;
QBrush gaps;
QBrush overlaps;
RecordStates states;
RecordBorders borders;
};
struct Stations {
Stations();
QColor text;
QColor associated;
QColor selected;
QColor triggering;
QColor triggered0;
QColor triggered1;
QColor triggered2;
QColor disabled;
QColor idle;
};
struct QC {
QC();
QColor delay0;
QColor delay1;
QColor delay2;
QColor delay3;
QColor delay4;
QColor delay5;
QColor delay6;
QColor delay7;
QColor qcWarning;
QColor qcError;
QColor qcOk;
QColor qcNotSet;
};
struct ConfigGradient {
Gradient gradient;
bool discrete;
};
struct OriginSymbol {
OriginSymbol();
bool classic;
ConfigGradient depth;
};
struct OriginStatus {
OriginStatus();
QColor automatic;
QColor manual;
};
struct GroundMotion {
GroundMotion();
QColor gmNotSet;
QColor gm0;
QColor gm1;
QColor gm2;
QColor gm3;
QColor gm4;
QColor gm5;
QColor gm6;
QColor gm7;
QColor gm8;
QColor gm9;
};
struct RecordView {
RecordView();
QColor selectedTraceZoom;
};
struct Map {
Map();
QColor lines;
QColor outlines;
QPen directivity;
QPen grid;
QColor stationAnnotations;
QColor cityLabels;
QColor cityOutlines;
QColor cityCapital;
QColor cityNormal;
struct {
QPen normalText;
QPen normalBorder;
QBrush normalBackground;
QPen highlightedText;
QPen highlightedBorder;
QBrush highlightedBackground;
int textSize;
} annotations;
};
struct Legend {
Legend();
QColor background;
QColor border;
QColor text;
QColor headerText;
};
public:
QColor background;
Splash splash;
Records records;
Gradient spectrogram;
Picks picks;
Arrivals arrivals;
Magnitudes magnitudes;
Stations stations;
QC qc;
OriginSymbol originSymbol;
OriginStatus originStatus;
GroundMotion gm;
RecordView recordView;
Map map;
Legend legend;
QMap<std::string, QColor> agencies;
};
struct Fonts {
Fonts();
void setBase(const QFont& f);
QFont base;
QFont smaller;
QFont normal;
QFont large;
QFont highlight;
QFont heading1;
QFont heading2;
QFont heading3;
QFont cityLabels;
QFont splashVersion;
QFont splashMessage;
};
struct Splash {
Splash();
struct Pos {
QPoint pos;
int align;
};
Pos version;
Pos message;
};
struct Map {
Map();
int stationSize;
int originSymbolMinSize;
bool vectorLayerAntiAlias;
bool bilinearFilter;
bool showGrid;
bool showLayers;
bool showCities;
bool showLegends;
int cityPopulationWeight;
bool toBGR;
int polygonRoughness;
std::string projection;
};
struct Marker {
Marker();
int lineWidth;
};
struct RecordBorders {
RecordBorders();
Gui::RecordWidget::RecordBorderDrawMode drawMode;
};
struct Records {
Records();
int lineWidth;
bool antiAliasing;
bool optimize;
RecordBorders recordBorders;
};
struct Precision {
Precision();
int depth;
int distance;
int location;
int magnitude;
int originTime;
int pickTime;
int traceValues;
int rms;
int uncertainties;
};
struct Unit {
Unit();
bool distanceInKM;
};
struct DateTime {
DateTime();
bool useLocalTime;
};
public:
bool showMenu;
bool showStatusBar;
int tabPosition;
Splash splash;
Colors colors;
Marker marker;
Records records;
Map map;
Precision precision;
Unit unit;
DateTime dateTime;
Fonts fonts;
QFont font(int relativeFontSize, bool bold = false, bool italic = false);
void fetch();
};
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
SC_GUI_API QColor blend(const QColor& c1, const QColor& c2, int percentOfC1);
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
SC_GUI_API QColor blend(const QColor& c1, const QColor& c2);
}
}
#endif

View File

@ -0,0 +1,244 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_CORE_SPECTROGRAMRENDERER_H
#define SEISCOMP_GUI_CORE_SPECTROGRAMRENDERER_H
#ifndef Q_MOC_RUN
#include <seiscomp/core/recordsequence.h>
#include <seiscomp/math/restitution/transferfunction.h>
#include <seiscomp/io/recordfilter/spectralizer.h>
#endif
#include <seiscomp/gui/core/lut.h>
#include <QPainter>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API SpectrogramRenderer {
// ----------------------------------------------------------------------
// Public types
// ----------------------------------------------------------------------
public:
enum class NormalizationMode {
Fixed,
Frequency,
Time
};
// ----------------------------------------------------------------------
// X'truction
// ----------------------------------------------------------------------
public:
//! C'tor
SpectrogramRenderer();
// ----------------------------------------------------------------------
// Public Interface
// ----------------------------------------------------------------------
public:
//! Sets the spectrogram options and calls reset().
bool setOptions(const IO::Spectralizer::Options &opts);
const IO::Spectralizer::Options &options() const { return _options; }
//! Sets the scale of the raw stream data which is 1/gain to convert
//! to sensor units
void setScale(double scale);
//! Sets the color gradient. Key range is normalized to [0,1].
void setGradient(const Gradient &gradient);
//! Sets the gradient range
void setGradientRange(double lowerBound, double upperBound);
double gradientLowerBound() const { return _gradient.lowerBound(); }
double gradientUpperBound() const { return _gradient.upperBound(); }
//! Resets the spectrogram and deletes all data
void reset();
//! Feeds a record for processing. Records must be timely ordered
//! otherwise gaps are produced.
bool feed(const Record *rec);
bool feedSequence(const RecordSequence *seq);
//! Resets the view and feeds the sequence
void setRecords(const RecordSequence *seq);
void setAlignment(const Core::Time &align);
void setTimeRange(double tmin, double tmax);
//! Sets the current time window of the data
void setTimeWindow(const Core::TimeWindow &tw);
//! Sets the frequency range to be displayed. A value lower or equal to
//! zero refers to the global minimum or the global maximum
//! respectively.
void setFrequencyRange(OPT(double) fmin, OPT(double) fmax);
const OPT(double) &frequencyLowerBound() const { return _fmin; }
const OPT(double) &frequencyUpperBound() const { return _fmax; }
void setNormalizeAmplitudes(bool f);
void setNormalizationMode(NormalizationMode mode);
bool normalizeAmplitudes() const { return _normalizationMode != NormalizationMode::Fixed; }
void setLogScale(bool f);
bool logScale() const { return _logarithmic; }
void setSmoothTransform(bool);
bool smoothTransform() const { return _smoothTransform; }
//! Sets the transfer function for deconvolution
void setTransferFunction(Math::Restitution::FFT::TransferFunction *tf);
bool isDirty() const { return _dirty; }
//! Creates the spectrogram. This is usually done in render if the
//! spectrogram is dirty but can called from outside.
void renderSpectrogram();
//! Renders the spectrogram with the given painter into the given rect.
void render(QPainter &p, const QRect &rect, bool labelLeftAlign = true,
bool renderLabels = false);
//! Renders the y axis. This call must precede a call to render otherwise
//! the frequency range can by out of sync.
void renderAxis(QPainter &p, const QRect &rect, bool leftAlign = true,
int paddingOuter = 6, int paddingInner = 0,
bool stretch = false);
QPair<double,double> range() const;
// ----------------------------------------------------------------------
// Private Interface
// ----------------------------------------------------------------------
private:
struct SpecImage {
QImage data;
Core::Time startTime;
Core::TimeSpan dt;
double minimumFrequency;
double maximumFrequency;
int width;
};
DEFINE_SMARTPOINTER(PowerSpectrum);
struct PowerSpectrum : public Core::BaseObject {
PowerSpectrum(const IO::Spectrum &spectrum, double scale)
: startTime(spectrum.startTime()), endTime(spectrum.endTime())
, dt(spectrum.dt()), frequency(spectrum.maximumFrequency()) {
centerTime = startTime + Core::TimeSpan(static_cast<double>(length()) * 0.5);
auto d = spectrum.data();
minimumAmplitude = maximumAmplitude = -1;
if ( d ) {
data = new DoubleArray(d->size());
for ( int i = 0; i < d->size(); ++i ) {
(*data)[i] = (*d)[i].real() * (*d)[i].real() + (*d)[i].imag() * (*d)[i].imag();
if ( minimumAmplitude < 0 || minimumAmplitude > (*data)[i] ) {
minimumAmplitude = (*data)[i];
}
if ( maximumAmplitude < (*data)[i] ) {
maximumAmplitude = (*data)[i];
}
}
if ( minimumAmplitude > 0 ) {
double norm = scale * 0.5 / frequency;
minimumAmplitude = log10(minimumAmplitude * norm * norm);
maximumAmplitude = log10(maximumAmplitude * norm * norm);
}
}
}
bool isValid() const { return data && data->size() > 0; }
Core::TimeSpan length() const { return endTime - startTime; }
const Core::Time &center() const { return centerTime; }
double minimumFrequency() const { return 0; }
double maximumFrequency() const { return frequency; }
Core::Time startTime;
Core::Time endTime;
Core::Time centerTime;
Core::TimeSpan dt;
double frequency;
DoubleArrayPtr data;
double minimumAmplitude;
double maximumAmplitude;
};
void setDirty();
void addSpectrum(const PowerSpectrum *);
void fillRow(SpecImage &img, DoubleArray *spec,
int column, int offset);
// ----------------------------------------------------------------------
// Private members
// ----------------------------------------------------------------------
private:
typedef QList<PowerSpectrumPtr> PowerSpectra;
typedef QList<SpecImage> SpecImageList;
typedef StaticColorLUT<512> Gradient512;
typedef Math::Restitution::FFT::TransferFunctionPtr TransferFunctionPtr;
QImage::Format _imageFormat;
TransferFunctionPtr _transferFunction;
Core::TimeWindow _timeWindow;
Core::Time _alignment;
double _tmin, _tmax;
double _scale;
OPT(double) _fmin, _fmax;
double _ampMin, _ampMax;
IO::Spectralizer::Options _options;
IO::SpectralizerPtr _spectralizer;
PowerSpectra _spectra;
SpecImageList _images;
Gradient512 _gradient;
NormalizationMode _normalizationMode;
double _normalizationAmpRange[2];
bool _logarithmic;
bool _smoothTransform;
bool _dirty;
double _renderedFmin;
double _renderedFmax;
};
inline QPair<double,double> SpectrogramRenderer::range() const {
return QPair<double,double>(_renderedFmin, _renderedFmax);
}
}
}
#endif

View File

@ -0,0 +1,133 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_CORE_SPECTROGRAMWIDGET_H
#define SEISCOMP_GUI_CORE_SPECTROGRAMWIDGET_H
#include <QWidget>
#include <seiscomp/gui/core/spectrogramrenderer.h>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API SpectrogramWidget : public QWidget {
Q_OBJECT
// ----------------------------------------------------------------------
// Public types
// ----------------------------------------------------------------------
public:
typedef IO::Spectralizer::Options SpectrumOptions;
// ----------------------------------------------------------------------
// X'truction
// ----------------------------------------------------------------------
public:
SpectrogramWidget(QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
// ----------------------------------------------------------------------
// Public Interface
// ----------------------------------------------------------------------
public:
//! Sets the spectrogram options and calls reset().
bool setSpectrumOptions(const SpectrumOptions &opts);
const SpectrumOptions &spectrumOptions() const;
//! Sets the scale of the raw stream data which is 1/gain
void setScale(double scale);
//! Sets the gradient range
void setGradientRange(double lowerBound, double upperBound);
double gradientLowerBound() const;
double gradientUpperBound() const;
//! Resets the spectrogram and deletes all data
void reset();
//! Feeds a record for processing. Records must be timely ordered
//! otherwise gaps are produced.
bool feed(const Record *rec);
bool feedSequence(const RecordSequence *seq);
//! Resets the view and feeds the sequence
void setRecords(const RecordSequence *seq);
void setAlignment(const Core::Time &align);
void setTimeRange(double tmin, double tmax);
//! Sets the current time window of the data
void setTimeWindow(const Core::TimeWindow &tw);
//! Sets the frequency range to be displayed. A value lower or equal to
//! zero refers to the global minimum or the global maximum
//! respectively.
void setFrequencyRange(OPT(double) fmin, OPT(double) fmax);
const OPT(double) &frequencyLowerBound() const;
const OPT(double) &frequencyUpperBound() const;
void setNormalizeAmplitudes(bool f);
bool normalizeAmplitudes() const;
void setLogScale(bool f);
bool logScale() const;
void setSmoothTransform(bool st);
bool smoothTransform() const;
//! Sets the transfer function for deconvolution
void setTransferFunction(Math::Restitution::FFT::TransferFunction *tf);
// ----------------------------------------------------------------------
// Public slots
// ----------------------------------------------------------------------
public slots:
void updateSpectrogram();
// ----------------------------------------------------------------------
// Protected Qt Interface
// ----------------------------------------------------------------------
protected:
void resizeEvent(QResizeEvent *);
void paintEvent(QPaintEvent *);
// ----------------------------------------------------------------------
// Private members
// ----------------------------------------------------------------------
private:
SpectrogramRenderer _renderer;
};
}
}
#endif

View File

@ -0,0 +1,142 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_CORE_SPECTRUMWIDGET_H
#define SEISCOMP_GUI_CORE_SPECTRUMWIDGET_H
#include <QWidget>
#include <seiscomp/gui/plot/datay.h>
#include <seiscomp/gui/plot/graph.h>
#ifndef Q_MOC_RUN
#include <seiscomp/math/fft.h>
#include <seiscomp/processing/response.h>
#endif
namespace Seiscomp {
namespace Gui {
class SC_GUI_API SpectrumWidget : public QWidget {
Q_OBJECT
// ----------------------------------------------------------------------
// X'truction
// ----------------------------------------------------------------------
public:
SpectrumWidget(QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
// ----------------------------------------------------------------------
// Public interface
// ----------------------------------------------------------------------
public:
void setMargin(int m) { _margin = qMax(0, m); }
/**
* @brief Sets the spectrum values and the Nyquist frequency as the
* frequency of the last spectrum value.
* @param freqNyquist The last spectrum value is measured for that frequency
* @param spec The spectrum values from 0Hz to [fNyquist]Hz
*/
void setSpectrum(double freqNyquist, const Math::ComplexArray &spec,
Processing::Response *resp = nullptr,
QString exportBasename = QString());
//! Access the x-axis
Axis &xAxis() { return _xAxis; }
//! Access the y-axis
Axis &yAxis() { return _yAxis; }
// ----------------------------------------------------------------------
// Public slots
// ----------------------------------------------------------------------
public slots:
void setAmplitudeSpectrum();
void setPhaseSpectrum();
void setPowerSpectrum();
void setLogScaleX(bool logScale);
void setLogScaleY(bool logScale);
void setShowSpectrum(bool show);
void setShowCorrected(bool show);
void setShowResponse(bool show);
/**
* @brief Exports all visible spectra into a simple ASCII file
*/
void exportSpectra();
// ----------------------------------------------------------------------
// QWidget interface
// ----------------------------------------------------------------------
protected:
void resizeEvent(QResizeEvent *e);
void paintEvent(QPaintEvent *e);
// ----------------------------------------------------------------------
// Private methods
// ----------------------------------------------------------------------
private:
void updateData();
void draw(QPainter &, const Graph *);
void updateRanges();
void updateAxisLabels();
// ----------------------------------------------------------------------
// Private members
// ----------------------------------------------------------------------
private:
enum Mode {
Amplitude,
Power,
Phase
};
QString _exportBasename;
double _freqNyquist;
Math::ComplexArray _spec;
Processing::ResponsePtr _resp;
Mode _mode;
Graph _graphPowerSpectrum;
Graph _graphResponseCorrectedPowerSpectrum;
Graph _graphResponsePowerSpectrum;
DataY _powerSpectrum;
DataY _responseCorrectedPowerSpectrum;
DataY _responsePowerSpectrum;
int _margin;
Axis _xAxis;
Axis _yAxis;
Axis _yAxis2;
};
}
}
#endif

View File

@ -0,0 +1,99 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_CORE_STREAMWIDGET_H
#define SEISCOMP_GUI_CORE_STREAMWIDGET_H
#include <vector>
#include <map>
#include <list>
#include <QWidget>
#include <QGroupBox>
#ifndef Q_MOC_RUN
#include <seiscomp/core/baseobject.h>
#include <seiscomp/core/recordsequence.h>
#include <seiscomp/core/datetime.h>
#include <seiscomp/core/timewindow.h>
#include <seiscomp/gui/core/recordstreamthread.h>
#include <seiscomp/gui/core/recordwidget.h>
#include <seiscomp/gui/core/timescale.h>
#include <seiscomp/gui/qt.h>
#endif
namespace Seiscomp {
namespace Gui {
class SC_GUI_API StreamWidget : public QWidget {
Q_OBJECT
public:
StreamWidget(const std::string& recordStreamURL,
const std::string& waveformStreamID,
const double windowLength=600,
QWidget* parent=0);
~StreamWidget();
protected:
virtual void closeEvent(QCloseEvent*);
virtual void showEvent(QShowEvent*);
virtual void resizeEvent(QResizeEvent* evt);
signals:
void StreamWidgetClosed(StreamWidget* widget);
private slots:
void updateRecordWidget(Seiscomp::Record* record);
void updateRecordWidgetAlignment();
private:
void startWaveformDataAcquisition();
void stopWaveformDataAcquisition();
private:
QTimer* _timer;
QGroupBox* _groupBox;
std::unique_ptr<RecordStreamThread> _thread;
RecordWidget* _recordWidget;
RecordSequence* _recordSequence;
Core::TimeSpan _ringBufferSize;
TimeScale* _timeScale;
std::string _recordStreamURL;
std::string _waveformStreamID;
};
} // namespace Gui
} // namespace Seiscomp
#endif

View File

@ -0,0 +1,104 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_CORE_TENSORRENDERER_H
#define SEISCOMP_GUI_CORE_TENSORRENDERER_H
#include <QImage>
#include <QColor>
#ifndef Q_MOC_RUN
#include <seiscomp/math/matrix3.h>
#include <seiscomp/math/tensor.h>
#endif
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API TensorRenderer {
// ----------------------------------------------------------------------
// X'struction
// ----------------------------------------------------------------------
public:
TensorRenderer();
// ----------------------------------------------------------------------
// Public interface
// ----------------------------------------------------------------------
public:
void setShadingEnabled(bool);
bool isShadingEnabled() const { return _shading; }
void setMaterial(float ambient, float diffuse);
void setMargin(int);
void setProjectMargin(int);
void setBorderColor(QColor);
void setTColor(QColor);
void setPColor(QColor);
QPoint project(Math::Vector3f &v) const;
QPoint project(Math::Vector3d &v) const;
QPoint project(double azimuth, double dist = 1.0) const;
QPoint projectMargin(double azimuth, int margin, double dist = 1.0) const;
// Unprojects a point in screen coordinates. Returns false if the
// point is not on the sphere (x,y is then valid on the plane and
// z is undefined), true otherwise
bool unproject(Math::Vector3d &v, const QPointF &p) const;
void renderBorder(QImage& img);
// strike, dip and slip are expected to be in degrees
void render(QImage& img, double strike, double dip, double slip);
void render(QImage& img, const Math::Matrix3f &m);
void render(QImage& img, const Math::Matrix3d &m);
void render(QImage& img, const Math::Tensor2Sd &t, const Math::Matrix3f &m);
void render(QImage& img, const Math::Tensor2Sd &t);
void renderNP(QImage& img, double strike, double dip, double slip, QColor color);
private:
QColor _colorT;
QColor _colorP;
QColor _border;
bool _shading;
QPoint _center;
int _radius;
int _ballRadius;
int _projectRadius;
int _margin;
int _projectMargin;
float _materialAmbient;
float _materialDiffuse;
};
}
}
#endif

View File

@ -0,0 +1,73 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_TIMESCALE_H
#define SEISCOMP_GUI_TIMESCALE_H
#include "ruler.h"
#include <seiscomp/core/datetime.h>
#define REPAINT_WITHOUT_ERASE FALSE
#define REPAINT_AFTER_ERASE TRUE
namespace Seiscomp {
namespace Gui {
class SC_GUI_API TimeScale : public Ruler {
Q_OBJECT
public:
TimeScale(QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags(), Position pos = Bottom);
~TimeScale(){}
void setTimeRange(double tmin, double tmax) {
setRange(tmin, tmax);
}
double tmin() const { return _min; }
double tmax() const { return _max; }
void setAlignment(const Core::Time& t);
const Core::Time &alignment() const { return _alignment; }
public slots:
void setAbsoluteTimeEnabled(bool absoluteTime, bool absoluteDate = true);
protected:
bool getTickText(double pos, double lastPos,
int line, QString &str) const;
void updateIntervals();
protected:
Core::Time _alignment;
bool _showAbsoluteValues;
bool _showAbsoluteDate;
const char *_primaryTimeFormat;
const char *_secondaryTimeFormat;
const char *_relativeTimeFormat;
};
}
}
# endif

View File

@ -0,0 +1,193 @@
/********************************************************************************
** Form generated from reading UI file 'aboutwidget.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_ABOUTWIDGET_H
#define UI_ABOUTWIDGET_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QTabWidget>
#include <QtWidgets/QTextEdit>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_AboutWidget
{
public:
QVBoxLayout *vboxLayout;
QTabWidget *tabWidget;
QWidget *tab;
QGridLayout *gridLayout;
QLabel *label_3;
QLabel *labelVersion;
QLabel *label_6;
QLabel *label_7;
QLabel *label;
QLabel *label_5;
QLabel *label_4;
QSpacerItem *spacerItem;
QLabel *label_2;
QWidget *tab_2;
QVBoxLayout *vboxLayout1;
QTextEdit *textLicense;
QHBoxLayout *hboxLayout;
QSpacerItem *spacerItem1;
QPushButton *buttonOk;
void setupUi(QWidget *AboutWidget)
{
if (AboutWidget->objectName().isEmpty())
AboutWidget->setObjectName(QString::fromUtf8("AboutWidget"));
AboutWidget->resize(357, 292);
vboxLayout = new QVBoxLayout(AboutWidget);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
tabWidget = new QTabWidget(AboutWidget);
tabWidget->setObjectName(QString::fromUtf8("tabWidget"));
tab = new QWidget();
tab->setObjectName(QString::fromUtf8("tab"));
gridLayout = new QGridLayout(tab);
#ifndef Q_OS_MAC
gridLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
gridLayout->setContentsMargins(9, 9, 9, 9);
#endif
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
label_3 = new QLabel(tab);
label_3->setObjectName(QString::fromUtf8("label_3"));
gridLayout->addWidget(label_3, 1, 1, 1, 1);
labelVersion = new QLabel(tab);
labelVersion->setObjectName(QString::fromUtf8("labelVersion"));
gridLayout->addWidget(labelVersion, 0, 1, 1, 1);
label_6 = new QLabel(tab);
label_6->setObjectName(QString::fromUtf8("label_6"));
gridLayout->addWidget(label_6, 2, 1, 1, 1);
label_7 = new QLabel(tab);
label_7->setObjectName(QString::fromUtf8("label_7"));
gridLayout->addWidget(label_7, 4, 1, 1, 1);
label = new QLabel(tab);
label->setObjectName(QString::fromUtf8("label"));
QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(label->sizePolicy().hasHeightForWidth());
label->setSizePolicy(sizePolicy);
gridLayout->addWidget(label, 0, 0, 1, 1);
label_5 = new QLabel(tab);
label_5->setObjectName(QString::fromUtf8("label_5"));
gridLayout->addWidget(label_5, 5, 1, 1, 1);
label_4 = new QLabel(tab);
label_4->setObjectName(QString::fromUtf8("label_4"));
gridLayout->addWidget(label_4, 5, 0, 1, 1);
spacerItem = new QSpacerItem(351, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
gridLayout->addItem(spacerItem, 6, 0, 1, 2);
label_2 = new QLabel(tab);
label_2->setObjectName(QString::fromUtf8("label_2"));
gridLayout->addWidget(label_2, 1, 0, 1, 1);
tabWidget->addTab(tab, QString());
tab_2 = new QWidget();
tab_2->setObjectName(QString::fromUtf8("tab_2"));
vboxLayout1 = new QVBoxLayout(tab_2);
#ifndef Q_OS_MAC
vboxLayout1->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout1->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1"));
textLicense = new QTextEdit(tab_2);
textLicense->setObjectName(QString::fromUtf8("textLicense"));
textLicense->setReadOnly(true);
vboxLayout1->addWidget(textLicense);
tabWidget->addTab(tab_2, QString());
vboxLayout->addWidget(tabWidget);
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
hboxLayout->setContentsMargins(0, 0, 0, 0);
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
spacerItem1 = new QSpacerItem(271, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout->addItem(spacerItem1);
buttonOk = new QPushButton(AboutWidget);
buttonOk->setObjectName(QString::fromUtf8("buttonOk"));
hboxLayout->addWidget(buttonOk);
vboxLayout->addLayout(hboxLayout);
retranslateUi(AboutWidget);
QObject::connect(buttonOk, SIGNAL(clicked()), AboutWidget, SLOT(close()));
QMetaObject::connectSlotsByName(AboutWidget);
} // setupUi
void retranslateUi(QWidget *AboutWidget)
{
AboutWidget->setWindowTitle(QCoreApplication::translate("AboutWidget", "About SeisComP::GUI", nullptr));
label_3->setText(QCoreApplication::translate("AboutWidget", "GFZ Potsdam", nullptr));
labelVersion->setText(QCoreApplication::translate("AboutWidget", "-", nullptr));
label_6->setText(QCoreApplication::translate("AboutWidget", "German Research Centre for Geosciences", nullptr));
label_7->setText(QCoreApplication::translate("AboutWidget", "gempa GmbH (http://www.gempa.de)", nullptr));
label->setText(QCoreApplication::translate("AboutWidget", "Version:", nullptr));
label_5->setText(QCoreApplication::translate("AboutWidget", "geofon_dc@gfz-potsdam.de", nullptr));
label_4->setText(QCoreApplication::translate("AboutWidget", "Contact:", nullptr));
label_2->setText(QCoreApplication::translate("AboutWidget", "Authors:", nullptr));
tabWidget->setTabText(tabWidget->indexOf(tab), QCoreApplication::translate("AboutWidget", "About", nullptr));
tabWidget->setTabText(tabWidget->indexOf(tab_2), QCoreApplication::translate("AboutWidget", "License", nullptr));
buttonOk->setText(QCoreApplication::translate("AboutWidget", "Ok", nullptr));
} // retranslateUi
};
namespace Ui {
class AboutWidget: public Ui_AboutWidget {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_ABOUTWIDGET_H

View File

@ -0,0 +1,393 @@
/********************************************************************************
** Form generated from reading UI file 'connectiondialog.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_CONNECTIONDIALOG_H
#define UI_CONNECTIONDIALOG_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QGroupBox>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QListWidget>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QSpinBox>
#include <QtWidgets/QSplitter>
#include <QtWidgets/QToolButton>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_ConnectionDialog
{
public:
QGridLayout *gridLayout;
QHBoxLayout *hboxLayout;
QSpacerItem *spacerItem;
QPushButton *btnClose;
QGroupBox *groupDatabase;
QGridLayout *gridLayout1;
QHBoxLayout *hboxLayout1;
QPushButton *btnDbSwitchToReported;
QSpacerItem *spacerItem1;
QPushButton *btnDbConnect;
QComboBox *comboDbType;
QLineEdit *editDbConnection;
QLabel *labelDbType;
QLabel *labelDbConnection;
QLabel *label_7;
QLineEdit *labelDbReported;
QSplitter *splitter;
QGroupBox *groupMessaging;
QGridLayout *gridLayout2;
QLabel *label_4;
QSpinBox *timeoutSpinBox;
QHBoxLayout *hboxLayout2;
QSpacerItem *spacerItem2;
QPushButton *btnConnect;
QLineEdit *editPrimaryGroup;
QLabel *label_5;
QLabel *label_2;
QLineEdit *editServer;
QLineEdit *editUser;
QLabel *label;
QSpacerItem *verticalSpacer;
QLabel *label_3;
QHBoxLayout *horizontalLayout;
QLineEdit *editPeerCertificate;
QToolButton *btnPeerCertificateOpen;
QGroupBox *groupSubscriptions;
QVBoxLayout *vboxLayout;
QListWidget *listSubscriptions;
QHBoxLayout *hboxLayout3;
QPushButton *btnSelectAll;
QSpacerItem *spacerItem3;
QPushButton *btnDeselectAll;
void setupUi(QDialog *ConnectionDialog)
{
if (ConnectionDialog->objectName().isEmpty())
ConnectionDialog->setObjectName(QString::fromUtf8("ConnectionDialog"));
ConnectionDialog->resize(868, 652);
QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(ConnectionDialog->sizePolicy().hasHeightForWidth());
ConnectionDialog->setSizePolicy(sizePolicy);
gridLayout = new QGridLayout(ConnectionDialog);
gridLayout->setSpacing(4);
gridLayout->setContentsMargins(4, 4, 4, 4);
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
hboxLayout->setContentsMargins(0, 0, 0, 0);
#endif
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
spacerItem = new QSpacerItem(261, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout->addItem(spacerItem);
btnClose = new QPushButton(ConnectionDialog);
btnClose->setObjectName(QString::fromUtf8("btnClose"));
hboxLayout->addWidget(btnClose);
gridLayout->addLayout(hboxLayout, 2, 0, 1, 1);
groupDatabase = new QGroupBox(ConnectionDialog);
groupDatabase->setObjectName(QString::fromUtf8("groupDatabase"));
QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Maximum);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(groupDatabase->sizePolicy().hasHeightForWidth());
groupDatabase->setSizePolicy(sizePolicy1);
gridLayout1 = new QGridLayout(groupDatabase);
#ifndef Q_OS_MAC
gridLayout1->setSpacing(6);
#endif
#ifndef Q_OS_MAC
gridLayout1->setContentsMargins(9, 9, 9, 9);
#endif
gridLayout1->setObjectName(QString::fromUtf8("gridLayout1"));
hboxLayout1 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout1->setSpacing(6);
#endif
#ifndef Q_OS_MAC
hboxLayout1->setContentsMargins(0, 0, 0, 0);
#endif
hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
btnDbSwitchToReported = new QPushButton(groupDatabase);
btnDbSwitchToReported->setObjectName(QString::fromUtf8("btnDbSwitchToReported"));
btnDbSwitchToReported->setEnabled(false);
hboxLayout1->addWidget(btnDbSwitchToReported);
spacerItem1 = new QSpacerItem(71, 27, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout1->addItem(spacerItem1);
btnDbConnect = new QPushButton(groupDatabase);
btnDbConnect->setObjectName(QString::fromUtf8("btnDbConnect"));
hboxLayout1->addWidget(btnDbConnect);
gridLayout1->addLayout(hboxLayout1, 3, 1, 1, 1);
comboDbType = new QComboBox(groupDatabase);
comboDbType->setObjectName(QString::fromUtf8("comboDbType"));
comboDbType->setModelColumn(0);
gridLayout1->addWidget(comboDbType, 0, 1, 1, 1);
editDbConnection = new QLineEdit(groupDatabase);
editDbConnection->setObjectName(QString::fromUtf8("editDbConnection"));
gridLayout1->addWidget(editDbConnection, 1, 1, 1, 1);
labelDbType = new QLabel(groupDatabase);
labelDbType->setObjectName(QString::fromUtf8("labelDbType"));
gridLayout1->addWidget(labelDbType, 0, 0, 1, 1);
labelDbConnection = new QLabel(groupDatabase);
labelDbConnection->setObjectName(QString::fromUtf8("labelDbConnection"));
gridLayout1->addWidget(labelDbConnection, 1, 0, 1, 1);
label_7 = new QLabel(groupDatabase);
label_7->setObjectName(QString::fromUtf8("label_7"));
gridLayout1->addWidget(label_7, 2, 0, 1, 1);
labelDbReported = new QLineEdit(groupDatabase);
labelDbReported->setObjectName(QString::fromUtf8("labelDbReported"));
labelDbReported->setReadOnly(true);
gridLayout1->addWidget(labelDbReported, 2, 1, 1, 1);
gridLayout->addWidget(groupDatabase, 1, 0, 1, 1);
splitter = new QSplitter(ConnectionDialog);
splitter->setObjectName(QString::fromUtf8("splitter"));
splitter->setOrientation(Qt::Horizontal);
groupMessaging = new QGroupBox(splitter);
groupMessaging->setObjectName(QString::fromUtf8("groupMessaging"));
QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Minimum);
sizePolicy2.setHorizontalStretch(0);
sizePolicy2.setVerticalStretch(0);
sizePolicy2.setHeightForWidth(groupMessaging->sizePolicy().hasHeightForWidth());
groupMessaging->setSizePolicy(sizePolicy2);
gridLayout2 = new QGridLayout(groupMessaging);
#ifndef Q_OS_MAC
gridLayout2->setSpacing(6);
#endif
#ifndef Q_OS_MAC
gridLayout2->setContentsMargins(9, 9, 9, 9);
#endif
gridLayout2->setObjectName(QString::fromUtf8("gridLayout2"));
label_4 = new QLabel(groupMessaging);
label_4->setObjectName(QString::fromUtf8("label_4"));
gridLayout2->addWidget(label_4, 2, 0, 1, 1);
timeoutSpinBox = new QSpinBox(groupMessaging);
timeoutSpinBox->setObjectName(QString::fromUtf8("timeoutSpinBox"));
gridLayout2->addWidget(timeoutSpinBox, 2, 1, 1, 1);
hboxLayout2 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout2->setSpacing(6);
#endif
hboxLayout2->setContentsMargins(0, 0, 0, 0);
hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
spacerItem2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout2->addItem(spacerItem2);
btnConnect = new QPushButton(groupMessaging);
btnConnect->setObjectName(QString::fromUtf8("btnConnect"));
hboxLayout2->addWidget(btnConnect);
gridLayout2->addLayout(hboxLayout2, 6, 0, 1, 2);
editPrimaryGroup = new QLineEdit(groupMessaging);
editPrimaryGroup->setObjectName(QString::fromUtf8("editPrimaryGroup"));
gridLayout2->addWidget(editPrimaryGroup, 3, 1, 1, 1);
label_5 = new QLabel(groupMessaging);
label_5->setObjectName(QString::fromUtf8("label_5"));
gridLayout2->addWidget(label_5, 3, 0, 1, 1);
label_2 = new QLabel(groupMessaging);
label_2->setObjectName(QString::fromUtf8("label_2"));
gridLayout2->addWidget(label_2, 1, 0, 1, 1);
editServer = new QLineEdit(groupMessaging);
editServer->setObjectName(QString::fromUtf8("editServer"));
gridLayout2->addWidget(editServer, 1, 1, 1, 1);
editUser = new QLineEdit(groupMessaging);
editUser->setObjectName(QString::fromUtf8("editUser"));
gridLayout2->addWidget(editUser, 0, 1, 1, 1);
label = new QLabel(groupMessaging);
label->setObjectName(QString::fromUtf8("label"));
gridLayout2->addWidget(label, 0, 0, 1, 1);
verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
gridLayout2->addItem(verticalSpacer, 5, 1, 1, 1);
label_3 = new QLabel(groupMessaging);
label_3->setObjectName(QString::fromUtf8("label_3"));
gridLayout2->addWidget(label_3, 4, 0, 1, 1);
horizontalLayout = new QHBoxLayout();
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
editPeerCertificate = new QLineEdit(groupMessaging);
editPeerCertificate->setObjectName(QString::fromUtf8("editPeerCertificate"));
sizePolicy2.setHeightForWidth(editPeerCertificate->sizePolicy().hasHeightForWidth());
editPeerCertificate->setSizePolicy(sizePolicy2);
horizontalLayout->addWidget(editPeerCertificate);
btnPeerCertificateOpen = new QToolButton(groupMessaging);
btnPeerCertificateOpen->setObjectName(QString::fromUtf8("btnPeerCertificateOpen"));
horizontalLayout->addWidget(btnPeerCertificateOpen);
gridLayout2->addLayout(horizontalLayout, 4, 1, 1, 1);
splitter->addWidget(groupMessaging);
groupSubscriptions = new QGroupBox(splitter);
groupSubscriptions->setObjectName(QString::fromUtf8("groupSubscriptions"));
groupSubscriptions->setEnabled(false);
sizePolicy2.setHeightForWidth(groupSubscriptions->sizePolicy().hasHeightForWidth());
groupSubscriptions->setSizePolicy(sizePolicy2);
vboxLayout = new QVBoxLayout(groupSubscriptions);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
listSubscriptions = new QListWidget(groupSubscriptions);
listSubscriptions->setObjectName(QString::fromUtf8("listSubscriptions"));
QSizePolicy sizePolicy3(QSizePolicy::Expanding, QSizePolicy::MinimumExpanding);
sizePolicy3.setHorizontalStretch(0);
sizePolicy3.setVerticalStretch(0);
sizePolicy3.setHeightForWidth(listSubscriptions->sizePolicy().hasHeightForWidth());
listSubscriptions->setSizePolicy(sizePolicy3);
vboxLayout->addWidget(listSubscriptions);
hboxLayout3 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout3->setSpacing(6);
#endif
hboxLayout3->setContentsMargins(0, 0, 0, 0);
hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3"));
btnSelectAll = new QPushButton(groupSubscriptions);
btnSelectAll->setObjectName(QString::fromUtf8("btnSelectAll"));
hboxLayout3->addWidget(btnSelectAll);
spacerItem3 = new QSpacerItem(70, 30, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout3->addItem(spacerItem3);
btnDeselectAll = new QPushButton(groupSubscriptions);
btnDeselectAll->setObjectName(QString::fromUtf8("btnDeselectAll"));
hboxLayout3->addWidget(btnDeselectAll);
vboxLayout->addLayout(hboxLayout3);
splitter->addWidget(groupSubscriptions);
gridLayout->addWidget(splitter, 0, 0, 1, 1);
QWidget::setTabOrder(editUser, editServer);
QWidget::setTabOrder(editServer, timeoutSpinBox);
QWidget::setTabOrder(timeoutSpinBox, editPrimaryGroup);
QWidget::setTabOrder(editPrimaryGroup, btnConnect);
QWidget::setTabOrder(btnConnect, listSubscriptions);
QWidget::setTabOrder(listSubscriptions, comboDbType);
QWidget::setTabOrder(comboDbType, editDbConnection);
QWidget::setTabOrder(editDbConnection, btnDbSwitchToReported);
QWidget::setTabOrder(btnDbSwitchToReported, btnDbConnect);
QWidget::setTabOrder(btnDbConnect, btnClose);
retranslateUi(ConnectionDialog);
QObject::connect(btnClose, SIGNAL(clicked()), ConnectionDialog, SLOT(accept()));
QMetaObject::connectSlotsByName(ConnectionDialog);
} // setupUi
void retranslateUi(QDialog *ConnectionDialog)
{
ConnectionDialog->setWindowTitle(QCoreApplication::translate("ConnectionDialog", "Setup connection", nullptr));
btnClose->setText(QCoreApplication::translate("ConnectionDialog", "Continue", nullptr));
groupDatabase->setTitle(QCoreApplication::translate("ConnectionDialog", "Database", nullptr));
btnDbSwitchToReported->setText(QCoreApplication::translate("ConnectionDialog", "Switch to reported", nullptr));
btnDbConnect->setText(QCoreApplication::translate("ConnectionDialog", "Connect", nullptr));
labelDbType->setText(QCoreApplication::translate("ConnectionDialog", "Type:", nullptr));
labelDbConnection->setText(QCoreApplication::translate("ConnectionDialog", "Connection:", nullptr));
label_7->setText(QCoreApplication::translate("ConnectionDialog", "Reported:", nullptr));
groupMessaging->setTitle(QCoreApplication::translate("ConnectionDialog", "Messaging", nullptr));
label_4->setText(QCoreApplication::translate("ConnectionDialog", "Timeout in sec.:", nullptr));
btnConnect->setText(QCoreApplication::translate("ConnectionDialog", "Connect", nullptr));
label_5->setText(QCoreApplication::translate("ConnectionDialog", "Primary group:", nullptr));
label_2->setText(QCoreApplication::translate("ConnectionDialog", "Server:", nullptr));
editServer->setText(QCoreApplication::translate("ConnectionDialog", "localhost", nullptr));
editUser->setText(QCoreApplication::translate("ConnectionDialog", "user", nullptr));
label->setText(QCoreApplication::translate("ConnectionDialog", "User:", nullptr));
label_3->setText(QCoreApplication::translate("ConnectionDialog", "Peer certificate:", nullptr));
#if QT_CONFIG(tooltip)
btnPeerCertificateOpen->setToolTip(QCoreApplication::translate("ConnectionDialog", "Select peer certificate file", nullptr));
#endif // QT_CONFIG(tooltip)
btnPeerCertificateOpen->setText(QCoreApplication::translate("ConnectionDialog", "...", nullptr));
groupSubscriptions->setTitle(QCoreApplication::translate("ConnectionDialog", "Subscriptions", nullptr));
btnSelectAll->setText(QCoreApplication::translate("ConnectionDialog", "Select All", nullptr));
btnDeselectAll->setText(QCoreApplication::translate("ConnectionDialog", "Deselect All", nullptr));
} // retranslateUi
};
namespace Ui {
class ConnectionDialog: public Ui_ConnectionDialog {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_CONNECTIONDIALOG_H

View File

@ -0,0 +1,265 @@
/********************************************************************************
** Form generated from reading UI file 'diagramfilter.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_DIAGRAMFILTER_H
#define UI_DIAGRAMFILTER_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog>
#include <QtWidgets/QDoubleSpinBox>
#include <QtWidgets/QFrame>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_FilterSettings
{
public:
QVBoxLayout *vboxLayout;
QHBoxLayout *hboxLayout;
QLabel *label;
QComboBox *comboFilter;
QFrame *line;
QFrame *frameNoFilter;
QVBoxLayout *vboxLayout1;
QLabel *label_7;
QSpacerItem *spacerItem;
QFrame *frameAzimuthAroundEpicenter;
QVBoxLayout *vboxLayout2;
QHBoxLayout *hboxLayout1;
QLabel *label_2;
QDoubleSpinBox *spinAzimuthCenter;
QLabel *label_3;
QSpacerItem *spacerItem1;
QLabel *label_4;
QLabel *label_6;
QDoubleSpinBox *spinAzimuthExtent;
QLabel *label_5;
QSpacerItem *spacerItem2;
QHBoxLayout *hboxLayout2;
QSpacerItem *spacerItem3;
QPushButton *okButton;
QPushButton *cancelButton;
void setupUi(QDialog *FilterSettings)
{
if (FilterSettings->objectName().isEmpty())
FilterSettings->setObjectName(QString::fromUtf8("FilterSettings"));
FilterSettings->resize(317, 132);
vboxLayout = new QVBoxLayout(FilterSettings);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
hboxLayout->setContentsMargins(0, 0, 0, 0);
#endif
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
label = new QLabel(FilterSettings);
label->setObjectName(QString::fromUtf8("label"));
QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(label->sizePolicy().hasHeightForWidth());
label->setSizePolicy(sizePolicy);
hboxLayout->addWidget(label);
comboFilter = new QComboBox(FilterSettings);
comboFilter->addItem(QString());
comboFilter->addItem(QString());
comboFilter->setObjectName(QString::fromUtf8("comboFilter"));
hboxLayout->addWidget(comboFilter);
vboxLayout->addLayout(hboxLayout);
line = new QFrame(FilterSettings);
line->setObjectName(QString::fromUtf8("line"));
line->setFrameShape(QFrame::HLine);
line->setFrameShadow(QFrame::Sunken);
vboxLayout->addWidget(line);
frameNoFilter = new QFrame(FilterSettings);
frameNoFilter->setObjectName(QString::fromUtf8("frameNoFilter"));
frameNoFilter->setFrameShape(QFrame::NoFrame);
frameNoFilter->setFrameShadow(QFrame::Raised);
vboxLayout1 = new QVBoxLayout(frameNoFilter);
#ifndef Q_OS_MAC
vboxLayout1->setSpacing(6);
#endif
vboxLayout1->setContentsMargins(0, 0, 0, 0);
vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1"));
label_7 = new QLabel(frameNoFilter);
label_7->setObjectName(QString::fromUtf8("label_7"));
vboxLayout1->addWidget(label_7);
spacerItem = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
vboxLayout1->addItem(spacerItem);
vboxLayout->addWidget(frameNoFilter);
frameAzimuthAroundEpicenter = new QFrame(FilterSettings);
frameAzimuthAroundEpicenter->setObjectName(QString::fromUtf8("frameAzimuthAroundEpicenter"));
frameAzimuthAroundEpicenter->setFrameShape(QFrame::NoFrame);
frameAzimuthAroundEpicenter->setFrameShadow(QFrame::Raised);
vboxLayout2 = new QVBoxLayout(frameAzimuthAroundEpicenter);
#ifndef Q_OS_MAC
vboxLayout2->setSpacing(6);
#endif
vboxLayout2->setContentsMargins(0, 0, 0, 0);
vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2"));
hboxLayout1 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout1->setSpacing(6);
#endif
#ifndef Q_OS_MAC
hboxLayout1->setContentsMargins(0, 0, 0, 0);
#endif
hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
label_2 = new QLabel(frameAzimuthAroundEpicenter);
label_2->setObjectName(QString::fromUtf8("label_2"));
sizePolicy.setHeightForWidth(label_2->sizePolicy().hasHeightForWidth());
label_2->setSizePolicy(sizePolicy);
hboxLayout1->addWidget(label_2);
spinAzimuthCenter = new QDoubleSpinBox(frameAzimuthAroundEpicenter);
spinAzimuthCenter->setObjectName(QString::fromUtf8("spinAzimuthCenter"));
spinAzimuthCenter->setDecimals(1);
spinAzimuthCenter->setMaximum(360.000000000000000);
spinAzimuthCenter->setMinimum(-360.000000000000000);
hboxLayout1->addWidget(spinAzimuthCenter);
label_3 = new QLabel(frameAzimuthAroundEpicenter);
label_3->setObjectName(QString::fromUtf8("label_3"));
sizePolicy.setHeightForWidth(label_3->sizePolicy().hasHeightForWidth());
label_3->setSizePolicy(sizePolicy);
hboxLayout1->addWidget(label_3);
spacerItem1 = new QSpacerItem(10, 5, QSizePolicy::Fixed, QSizePolicy::Minimum);
hboxLayout1->addItem(spacerItem1);
label_4 = new QLabel(frameAzimuthAroundEpicenter);
label_4->setObjectName(QString::fromUtf8("label_4"));
sizePolicy.setHeightForWidth(label_4->sizePolicy().hasHeightForWidth());
label_4->setSizePolicy(sizePolicy);
hboxLayout1->addWidget(label_4);
label_6 = new QLabel(frameAzimuthAroundEpicenter);
label_6->setObjectName(QString::fromUtf8("label_6"));
sizePolicy.setHeightForWidth(label_6->sizePolicy().hasHeightForWidth());
label_6->setSizePolicy(sizePolicy);
hboxLayout1->addWidget(label_6);
spinAzimuthExtent = new QDoubleSpinBox(frameAzimuthAroundEpicenter);
spinAzimuthExtent->setObjectName(QString::fromUtf8("spinAzimuthExtent"));
spinAzimuthExtent->setDecimals(1);
spinAzimuthExtent->setMaximum(180.000000000000000);
spinAzimuthExtent->setMinimum(0.000000000000000);
spinAzimuthExtent->setValue(45.000000000000000);
hboxLayout1->addWidget(spinAzimuthExtent);
label_5 = new QLabel(frameAzimuthAroundEpicenter);
label_5->setObjectName(QString::fromUtf8("label_5"));
sizePolicy.setHeightForWidth(label_5->sizePolicy().hasHeightForWidth());
label_5->setSizePolicy(sizePolicy);
hboxLayout1->addWidget(label_5);
vboxLayout2->addLayout(hboxLayout1);
spacerItem2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
vboxLayout2->addItem(spacerItem2);
vboxLayout->addWidget(frameAzimuthAroundEpicenter);
hboxLayout2 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout2->setSpacing(6);
#endif
hboxLayout2->setContentsMargins(0, 0, 0, 0);
hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
spacerItem3 = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout2->addItem(spacerItem3);
okButton = new QPushButton(FilterSettings);
okButton->setObjectName(QString::fromUtf8("okButton"));
hboxLayout2->addWidget(okButton);
cancelButton = new QPushButton(FilterSettings);
cancelButton->setObjectName(QString::fromUtf8("cancelButton"));
hboxLayout2->addWidget(cancelButton);
vboxLayout->addLayout(hboxLayout2);
retranslateUi(FilterSettings);
QObject::connect(okButton, SIGNAL(clicked()), FilterSettings, SLOT(accept()));
QObject::connect(cancelButton, SIGNAL(clicked()), FilterSettings, SLOT(reject()));
QMetaObject::connectSlotsByName(FilterSettings);
} // setupUi
void retranslateUi(QDialog *FilterSettings)
{
FilterSettings->setWindowTitle(QCoreApplication::translate("FilterSettings", "Filter settings", nullptr));
label->setText(QCoreApplication::translate("FilterSettings", "Filter:", nullptr));
comboFilter->setItemText(0, QCoreApplication::translate("FilterSettings", "None", nullptr));
comboFilter->setItemText(1, QCoreApplication::translate("FilterSettings", "Azimuth around epicenter", nullptr));
label_7->setText(QCoreApplication::translate("FilterSettings", "No filter. Displays all values.", nullptr));
label_2->setText(QCoreApplication::translate("FilterSettings", "Center:", nullptr));
label_3->setText(QCoreApplication::translate("FilterSettings", "deg", nullptr));
label_4->setText(QCoreApplication::translate("FilterSettings", "Extent:", nullptr));
label_6->setText(QCoreApplication::translate("FilterSettings", "+/-", nullptr));
label_5->setText(QCoreApplication::translate("FilterSettings", "deg", nullptr));
okButton->setText(QCoreApplication::translate("FilterSettings", "OK", nullptr));
cancelButton->setText(QCoreApplication::translate("FilterSettings", "Cancel", nullptr));
} // retranslateUi
};
namespace Ui {
class FilterSettings: public Ui_FilterSettings {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_DIAGRAMFILTER_H

View File

@ -0,0 +1,86 @@
/********************************************************************************
** Form generated from reading UI file 'infotext.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_INFOTEXT_H
#define UI_INFOTEXT_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QTextEdit>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_InfoText
{
public:
QVBoxLayout *vboxLayout;
QTextEdit *textEdit;
QHBoxLayout *hboxLayout;
QSpacerItem *spacerItem;
QPushButton *closeButton;
void setupUi(QDialog *InfoText)
{
if (InfoText->objectName().isEmpty())
InfoText->setObjectName(QString::fromUtf8("InfoText"));
InfoText->resize(319, 336);
vboxLayout = new QVBoxLayout(InfoText);
vboxLayout->setSpacing(4);
vboxLayout->setContentsMargins(6, 6, 6, 6);
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
textEdit = new QTextEdit(InfoText);
textEdit->setObjectName(QString::fromUtf8("textEdit"));
textEdit->setReadOnly(true);
vboxLayout->addWidget(textEdit);
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
hboxLayout->setContentsMargins(0, 0, 0, 0);
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
spacerItem = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout->addItem(spacerItem);
closeButton = new QPushButton(InfoText);
closeButton->setObjectName(QString::fromUtf8("closeButton"));
hboxLayout->addWidget(closeButton);
vboxLayout->addLayout(hboxLayout);
retranslateUi(InfoText);
QObject::connect(closeButton, SIGNAL(clicked()), InfoText, SLOT(reject()));
QMetaObject::connectSlotsByName(InfoText);
} // setupUi
void retranslateUi(QDialog *InfoText)
{
InfoText->setWindowTitle(QCoreApplication::translate("InfoText", "Information", nullptr));
closeButton->setText(QCoreApplication::translate("InfoText", "Close", nullptr));
} // retranslateUi
};
namespace Ui {
class InfoText: public Ui_InfoText {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_INFOTEXT_H

View File

@ -0,0 +1,102 @@
/********************************************************************************
** Form generated from reading UI file 'inspector.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_INSPECTOR_H
#define UI_INSPECTOR_H
#include <QtCore/QVariant>
#include <QtGui/QIcon>
#include <QtWidgets/QApplication>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QSplitter>
#include <QtWidgets/QTableWidget>
#include <QtWidgets/QToolButton>
#include <QtWidgets/QTreeWidget>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_Inspector
{
public:
QVBoxLayout *vboxLayout;
QToolButton *buttonBack;
QLineEdit *editFilter;
QSplitter *splitter;
QTreeWidget *treeWidget;
QTableWidget *tableWidget;
void setupUi(QWidget *Inspector)
{
if (Inspector->objectName().isEmpty())
Inspector->setObjectName(QString::fromUtf8("Inspector"));
Inspector->resize(657, 498);
vboxLayout = new QVBoxLayout(Inspector);
vboxLayout->setSpacing(4);
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
buttonBack = new QToolButton(Inspector);
buttonBack->setObjectName(QString::fromUtf8("buttonBack"));
buttonBack->setEnabled(false);
const QIcon icon = QIcon(QString::fromUtf8(":/icons/icons/undo.png"));
buttonBack->setIcon(icon);
vboxLayout->addWidget(buttonBack);
editFilter = new QLineEdit(Inspector);
editFilter->setObjectName(QString::fromUtf8("editFilter"));
vboxLayout->addWidget(editFilter);
splitter = new QSplitter(Inspector);
splitter->setObjectName(QString::fromUtf8("splitter"));
splitter->setOrientation(Qt::Horizontal);
treeWidget = new QTreeWidget(splitter);
treeWidget->setObjectName(QString::fromUtf8("treeWidget"));
splitter->addWidget(treeWidget);
tableWidget = new QTableWidget(splitter);
tableWidget->setObjectName(QString::fromUtf8("tableWidget"));
tableWidget->setAlternatingRowColors(true);
splitter->addWidget(tableWidget);
vboxLayout->addWidget(splitter);
retranslateUi(Inspector);
QMetaObject::connectSlotsByName(Inspector);
} // setupUi
void retranslateUi(QWidget *Inspector)
{
Inspector->setWindowTitle(QCoreApplication::translate("Inspector", "Inspector", nullptr));
#if QT_CONFIG(tooltip)
buttonBack->setToolTip(QString());
#endif // QT_CONFIG(tooltip)
buttonBack->setText(QCoreApplication::translate("Inspector", "...", nullptr));
#if QT_CONFIG(shortcut)
buttonBack->setShortcut(QCoreApplication::translate("Inspector", "Backspace", nullptr));
#endif // QT_CONFIG(shortcut)
#if QT_CONFIG(tooltip)
editFilter->setToolTip(QCoreApplication::translate("Inspector", "Define an object filter, e.g. 'Network.code=GE'. Wildcards are allowed to match a value.", nullptr));
#endif // QT_CONFIG(tooltip)
} // retranslateUi
};
namespace Ui {
class Inspector: public Ui_Inspector {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_INSPECTOR_H

View File

@ -0,0 +1,194 @@
/********************************************************************************
** Form generated from reading UI file 'questionbox.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_QUESTIONBOX_H
#define UI_QUESTIONBOX_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QDialog>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_QuestionBox
{
public:
QVBoxLayout *vboxLayout;
QHBoxLayout *hboxLayout;
QVBoxLayout *vboxLayout1;
QLabel *labelIcon;
QSpacerItem *spacerItem;
QVBoxLayout *vboxLayout2;
QLabel *labelMessage;
QLabel *labelInfo;
QSpacerItem *spacerItem1;
QVBoxLayout *vboxLayout3;
QCheckBox *checkBox;
QHBoxLayout *hboxLayout1;
QPushButton *yesButton;
QSpacerItem *spacerItem2;
QPushButton *noButton;
void setupUi(QDialog *QuestionBox)
{
if (QuestionBox->objectName().isEmpty())
QuestionBox->setObjectName(QString::fromUtf8("QuestionBox"));
QuestionBox->resize(231, 131);
QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(QuestionBox->sizePolicy().hasHeightForWidth());
QuestionBox->setSizePolicy(sizePolicy);
QuestionBox->setSizeGripEnabled(false);
QuestionBox->setModal(true);
vboxLayout = new QVBoxLayout(QuestionBox);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
hboxLayout->setContentsMargins(0, 0, 0, 0);
#endif
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
vboxLayout1 = new QVBoxLayout();
#ifndef Q_OS_MAC
vboxLayout1->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout1->setContentsMargins(0, 0, 0, 0);
#endif
vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1"));
labelIcon = new QLabel(QuestionBox);
labelIcon->setObjectName(QString::fromUtf8("labelIcon"));
QSizePolicy sizePolicy1(QSizePolicy::Maximum, QSizePolicy::Maximum);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(labelIcon->sizePolicy().hasHeightForWidth());
labelIcon->setSizePolicy(sizePolicy1);
labelIcon->setFrameShape(QFrame::NoFrame);
vboxLayout1->addWidget(labelIcon);
spacerItem = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum);
vboxLayout1->addItem(spacerItem);
hboxLayout->addLayout(vboxLayout1);
vboxLayout2 = new QVBoxLayout();
#ifndef Q_OS_MAC
vboxLayout2->setSpacing(6);
#endif
vboxLayout2->setContentsMargins(0, 0, 0, 0);
vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2"));
labelMessage = new QLabel(QuestionBox);
labelMessage->setObjectName(QString::fromUtf8("labelMessage"));
sizePolicy.setHeightForWidth(labelMessage->sizePolicy().hasHeightForWidth());
labelMessage->setSizePolicy(sizePolicy);
labelMessage->setFrameShape(QFrame::NoFrame);
vboxLayout2->addWidget(labelMessage);
labelInfo = new QLabel(QuestionBox);
labelInfo->setObjectName(QString::fromUtf8("labelInfo"));
sizePolicy.setHeightForWidth(labelInfo->sizePolicy().hasHeightForWidth());
labelInfo->setSizePolicy(sizePolicy);
labelInfo->setMinimumSize(QSize(0, 0));
labelInfo->setFrameShape(QFrame::NoFrame);
vboxLayout2->addWidget(labelInfo);
hboxLayout->addLayout(vboxLayout2);
vboxLayout->addLayout(hboxLayout);
spacerItem1 = new QSpacerItem(20, 10, QSizePolicy::Minimum, QSizePolicy::Maximum);
vboxLayout->addItem(spacerItem1);
vboxLayout3 = new QVBoxLayout();
#ifndef Q_OS_MAC
vboxLayout3->setSpacing(6);
#endif
vboxLayout3->setContentsMargins(0, 0, 0, 0);
vboxLayout3->setObjectName(QString::fromUtf8("vboxLayout3"));
checkBox = new QCheckBox(QuestionBox);
checkBox->setObjectName(QString::fromUtf8("checkBox"));
vboxLayout3->addWidget(checkBox);
hboxLayout1 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout1->setSpacing(6);
#endif
hboxLayout1->setContentsMargins(0, 0, 0, 0);
hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
yesButton = new QPushButton(QuestionBox);
yesButton->setObjectName(QString::fromUtf8("yesButton"));
hboxLayout1->addWidget(yesButton);
spacerItem2 = new QSpacerItem(54, 31, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout1->addItem(spacerItem2);
noButton = new QPushButton(QuestionBox);
noButton->setObjectName(QString::fromUtf8("noButton"));
hboxLayout1->addWidget(noButton);
vboxLayout3->addLayout(hboxLayout1);
vboxLayout->addLayout(vboxLayout3);
retranslateUi(QuestionBox);
QObject::connect(yesButton, SIGNAL(clicked()), QuestionBox, SLOT(accept()));
QObject::connect(noButton, SIGNAL(clicked()), QuestionBox, SLOT(reject()));
QMetaObject::connectSlotsByName(QuestionBox);
} // setupUi
void retranslateUi(QDialog *QuestionBox)
{
QuestionBox->setWindowTitle(QCoreApplication::translate("QuestionBox", "Question", nullptr));
labelIcon->setText(QString());
labelMessage->setText(QString());
labelInfo->setText(QString());
checkBox->setText(QCoreApplication::translate("QuestionBox", "Do not show this message again", nullptr));
yesButton->setText(QCoreApplication::translate("QuestionBox", "Yes", nullptr));
noButton->setText(QCoreApplication::translate("QuestionBox", "No", nullptr));
} // retranslateUi
};
namespace Ui {
class QuestionBox: public Ui_QuestionBox {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_QUESTIONBOX_H

View File

@ -0,0 +1,99 @@
/********************************************************************************
** Form generated from reading UI file 'showplugins.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_SHOWPLUGINS_H
#define UI_SHOWPLUGINS_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QTextEdit>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_ShowPlugins
{
public:
QVBoxLayout *vboxLayout;
QLabel *labelHeadline;
QTextEdit *content;
QHBoxLayout *hboxLayout;
QSpacerItem *spacerItem;
QPushButton *closeButton;
void setupUi(QDialog *ShowPlugins)
{
if (ShowPlugins->objectName().isEmpty())
ShowPlugins->setObjectName(QString::fromUtf8("ShowPlugins"));
ShowPlugins->resize(492, 326);
vboxLayout = new QVBoxLayout(ShowPlugins);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
labelHeadline = new QLabel(ShowPlugins);
labelHeadline->setObjectName(QString::fromUtf8("labelHeadline"));
vboxLayout->addWidget(labelHeadline);
content = new QTextEdit(ShowPlugins);
content->setObjectName(QString::fromUtf8("content"));
content->setReadOnly(true);
vboxLayout->addWidget(content);
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
hboxLayout->setContentsMargins(0, 0, 0, 0);
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
spacerItem = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout->addItem(spacerItem);
closeButton = new QPushButton(ShowPlugins);
closeButton->setObjectName(QString::fromUtf8("closeButton"));
hboxLayout->addWidget(closeButton);
vboxLayout->addLayout(hboxLayout);
retranslateUi(ShowPlugins);
QObject::connect(closeButton, SIGNAL(clicked()), ShowPlugins, SLOT(reject()));
QMetaObject::connectSlotsByName(ShowPlugins);
} // setupUi
void retranslateUi(QDialog *ShowPlugins)
{
ShowPlugins->setWindowTitle(QCoreApplication::translate("ShowPlugins", "Loaded Plugins", nullptr));
labelHeadline->setText(QCoreApplication::translate("ShowPlugins", "TextLabel", nullptr));
content->setHtml(QCoreApplication::translate("ShowPlugins", "<html><head><meta name=\"qrichtext\" content=\"1\" /></head><body style=\" white-space: pre-wrap; font-family:DejaVu Sans; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;\"><p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"></p></body></html>", nullptr));
closeButton->setText(QCoreApplication::translate("ShowPlugins", "Close", nullptr));
} // retranslateUi
};
namespace Ui {
class ShowPlugins: public Ui_ShowPlugins {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_SHOWPLUGINS_H

View File

@ -0,0 +1,157 @@
/********************************************************************************
** Form generated from reading UI file 'uncertainties.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_UNCERTAINTIES_H
#define UI_UNCERTAINTIES_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QDialog>
#include <QtWidgets/QDoubleSpinBox>
#include <QtWidgets/QFrame>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_Uncertainties
{
public:
QVBoxLayout *vboxLayout;
QCheckBox *cbAsymmetric;
QFrame *line;
QGridLayout *gridLayout;
QDoubleSpinBox *spinLowerUncertainty;
QLabel *labelUpperUncertainty;
QDoubleSpinBox *spinUpperUncertainty;
QLabel *labelLowerUncertainty;
QSpacerItem *spacerItem;
QHBoxLayout *hboxLayout;
QSpacerItem *spacerItem1;
QPushButton *okButton;
QPushButton *cancelButton;
void setupUi(QDialog *Uncertainties)
{
if (Uncertainties->objectName().isEmpty())
Uncertainties->setObjectName(QString::fromUtf8("Uncertainties"));
Uncertainties->resize(212, 151);
vboxLayout = new QVBoxLayout(Uncertainties);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
cbAsymmetric = new QCheckBox(Uncertainties);
cbAsymmetric->setObjectName(QString::fromUtf8("cbAsymmetric"));
vboxLayout->addWidget(cbAsymmetric);
line = new QFrame(Uncertainties);
line->setObjectName(QString::fromUtf8("line"));
line->setFrameShape(QFrame::HLine);
line->setFrameShadow(QFrame::Sunken);
vboxLayout->addWidget(line);
gridLayout = new QGridLayout();
#ifndef Q_OS_MAC
gridLayout->setSpacing(6);
#endif
gridLayout->setContentsMargins(0, 0, 0, 0);
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
spinLowerUncertainty = new QDoubleSpinBox(Uncertainties);
spinLowerUncertainty->setObjectName(QString::fromUtf8("spinLowerUncertainty"));
spinLowerUncertainty->setDecimals(4);
spinLowerUncertainty->setSingleStep(0.500000000000000);
gridLayout->addWidget(spinLowerUncertainty, 0, 1, 1, 1);
labelUpperUncertainty = new QLabel(Uncertainties);
labelUpperUncertainty->setObjectName(QString::fromUtf8("labelUpperUncertainty"));
labelUpperUncertainty->setEnabled(false);
gridLayout->addWidget(labelUpperUncertainty, 1, 0, 1, 1);
spinUpperUncertainty = new QDoubleSpinBox(Uncertainties);
spinUpperUncertainty->setObjectName(QString::fromUtf8("spinUpperUncertainty"));
spinUpperUncertainty->setEnabled(false);
spinUpperUncertainty->setDecimals(4);
spinUpperUncertainty->setSingleStep(0.500000000000000);
gridLayout->addWidget(spinUpperUncertainty, 1, 1, 1, 1);
labelLowerUncertainty = new QLabel(Uncertainties);
labelLowerUncertainty->setObjectName(QString::fromUtf8("labelLowerUncertainty"));
gridLayout->addWidget(labelLowerUncertainty, 0, 0, 1, 1);
vboxLayout->addLayout(gridLayout);
spacerItem = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
vboxLayout->addItem(spacerItem);
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
hboxLayout->setContentsMargins(0, 0, 0, 0);
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
spacerItem1 = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout->addItem(spacerItem1);
okButton = new QPushButton(Uncertainties);
okButton->setObjectName(QString::fromUtf8("okButton"));
hboxLayout->addWidget(okButton);
cancelButton = new QPushButton(Uncertainties);
cancelButton->setObjectName(QString::fromUtf8("cancelButton"));
hboxLayout->addWidget(cancelButton);
vboxLayout->addLayout(hboxLayout);
retranslateUi(Uncertainties);
QObject::connect(okButton, SIGNAL(clicked()), Uncertainties, SLOT(accept()));
QObject::connect(cancelButton, SIGNAL(clicked()), Uncertainties, SLOT(reject()));
QMetaObject::connectSlotsByName(Uncertainties);
} // setupUi
void retranslateUi(QDialog *Uncertainties)
{
Uncertainties->setWindowTitle(QCoreApplication::translate("Uncertainties", "Uncertainty", nullptr));
cbAsymmetric->setText(QCoreApplication::translate("Uncertainties", "Asymmetric uncertainty", nullptr));
labelUpperUncertainty->setText(QCoreApplication::translate("Uncertainties", "Upper uncertainty:", nullptr));
labelLowerUncertainty->setText(QCoreApplication::translate("Uncertainties", "Lower uncertainty:", nullptr));
okButton->setText(QCoreApplication::translate("Uncertainties", "OK", nullptr));
cancelButton->setText(QCoreApplication::translate("Uncertainties", "Cancel", nullptr));
} // retranslateUi
};
namespace Ui {
class Uncertainties: public Ui_Uncertainties {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_UNCERTAINTIES_H

View File

@ -0,0 +1,66 @@
/********************************************************************************
** Form generated from reading UI file 'xmlview.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_XMLVIEW_H
#define UI_XMLVIEW_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QTreeWidget>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_XMLViewDialog
{
public:
QGridLayout *gridLayout;
QTreeWidget *treeWidget;
void setupUi(QWidget *XMLViewDialog)
{
if (XMLViewDialog->objectName().isEmpty())
XMLViewDialog->setObjectName(QString::fromUtf8("XMLViewDialog"));
XMLViewDialog->resize(336, 330);
gridLayout = new QGridLayout(XMLViewDialog);
#ifndef Q_OS_MAC
gridLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
gridLayout->setContentsMargins(9, 9, 9, 9);
#endif
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
treeWidget = new QTreeWidget(XMLViewDialog);
treeWidget->setObjectName(QString::fromUtf8("treeWidget"));
treeWidget->setAlternatingRowColors(true);
treeWidget->setIndentation(10);
gridLayout->addWidget(treeWidget, 0, 0, 1, 1);
retranslateUi(XMLViewDialog);
QMetaObject::connectSlotsByName(XMLViewDialog);
} // setupUi
void retranslateUi(QWidget *XMLViewDialog)
{
XMLViewDialog->setWindowTitle(QCoreApplication::translate("XMLViewDialog", "XMLView", nullptr));
} // retranslateUi
};
namespace Ui {
class XMLViewDialog: public Ui_XMLViewDialog {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_XMLVIEW_H

View File

@ -0,0 +1,66 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_CORE_UNCERTAINTIES_H
#define SEISCOMP_GUI_CORE_UNCERTAINTIES_H
#include <QDialog>
#include <seiscomp/gui/core/ui_uncertainties.h>
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API EditUncertainties : public QDialog {
Q_OBJECT
public:
EditUncertainties(QWidget * parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
~EditUncertainties();
void setUncertainties(double lower, double upper);
double lowerUncertainty() const;
double upperUncertainty() const;
signals:
void uncertaintiesChanged(double, double);
private slots:
void lowerChanged(double);
void upperChanged(double);
void symmetryChanged(bool);
private:
Ui::Uncertainties _ui;
};
}
}
#endif

View File

@ -0,0 +1,97 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_UTIL_H
#define SEISCOMP_GUI_UTIL_H
#include <seiscomp/gui/qt.h>
#include <seiscomp/core/datetime.h>
#include <seiscomp/core/defs.h>
#include <QWidget>
#include <vector>
class QLabel;
namespace Seiscomp {
namespace Gui {
SC_GUI_API extern QChar degrees;
SC_GUI_API extern std::string colorConvertError;
SC_GUI_API bool fromString(QColor &value, const std::string &str);
SC_GUI_API QColor readColor(const std::string &query, const std::string &str,
const QColor &base, bool *ok = nullptr);
SC_GUI_API Qt::PenStyle stringToPenStyle(const std::string &str);
SC_GUI_API Qt::PenStyle readPenStyle(const std::string &query, const std::string &str,
Qt::PenStyle base, bool *ok = nullptr);
SC_GUI_API Qt::BrushStyle stringToBrushStyle(const std::string &str);
SC_GUI_API Qt::BrushStyle readBrushStyle(const std::string &query, const std::string &str,
Qt::BrushStyle base, bool *ok = nullptr);
SC_GUI_API QString latitudeToString(double lat, bool withValue = true, bool withUnit = true, int precision = 2);
SC_GUI_API QString longitudeToString(double lon, bool withValue = true, bool withUnit = true, int precision = 2);
SC_GUI_API QString depthToString(double depth, int precision = 0);
SC_GUI_API QString timeToString(const Core::Time &t, const char *fmt, bool addTimeZone = false);
SC_GUI_API void timeToLabel(QLabel *label, const Core::Time &t, const char *fmt, bool addTimeZone = false);
SC_GUI_API QString elapsedTimeString(const Core::TimeSpan &dt);
SC_GUI_API void setMaxWidth(QWidget *w, int numCharacters);
SC_GUI_API void fixWidth(QWidget *w, int numCharacters);
SC_GUI_API void setBold(QWidget *w, bool bold = true);
SC_GUI_API void setItalic(QWidget *w, bool italic = true);
class SC_GUI_API ElideFadeDrawer : public QObject {
public:
ElideFadeDrawer(QObject *parent = 0);
protected:
bool eventFilter(QObject *obj, QEvent *event);
};
class SC_GUI_API EllipsisDrawer : public QObject {
public:
EllipsisDrawer(QObject *parent = 0);
protected:
bool eventFilter(QObject *obj, QEvent *event);
};
template <typename T>
class ObjectChangeList : public std::vector<std::pair<typename Core::SmartPointer<T>::Impl, bool> > {
};
}
}
#endif

View File

@ -0,0 +1,51 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_CORE_XMLVIEW_H
#define SEISCOMP_GUI_CORE_XMLVIEW_H
#include <QtGui>
#include <seiscomp/gui/core/ui_xmlview.h>
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API XMLView : public QWidget {
Q_OBJECT
public:
XMLView(QWidget * parent = 0, Qt::WindowFlags f = Qt::WindowFlags(),
bool deleteOnClose = true);
~XMLView();
void setContent(const QString& content);
private:
Ui::XMLViewDialog _ui;
};
}
}
#endif

View File

@ -0,0 +1,485 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_AMPLITUDEVIEW_H
#define SEISCOMP_GUI_AMPLITUDEVIEW_H
#include <seiscomp/gui/datamodel/ui_amplitudeview.h>
#include <seiscomp/gui/core/recordview.h>
#include <seiscomp/gui/core/connectionstatelabel.h>
#include <seiscomp/gui/core/utils.h>
#ifndef Q_MOC_RUN
#include <seiscomp/seismology/ttt.h>
#include <seiscomp/datamodel/databasequery.h>
#include <seiscomp/datamodel/origin.h>
#include <seiscomp/datamodel/magnitude.h>
#include <seiscomp/datamodel/pick.h>
#include <seiscomp/datamodel/amplitude.h>
#include <seiscomp/processing/amplitudeprocessor.h>
#include <seiscomp/processing/magnitudeprocessor.h>
#include <seiscomp/math/matrix3.h>
#endif
#include <QActionGroup>
#include <QComboBox>
#include <QSpinBox>
#include <QCheckBox>
#include <QMovie>
#include <QSet>
#include <QLabel>
#include <QLineEdit>
namespace Seiscomp {
namespace DataModel {
class SensorLocation;
}
namespace Gui {
class TimeScale;
class AmplitudeView;
namespace PrivateAmplitudeView {
class AmplitudeRecordLabel;
class SC_GUI_API ThreeComponentTrace : public QObject {
Q_OBJECT
public:
ThreeComponentTrace() = default;
~ThreeComponentTrace();
public:
void setTransformationEnabled(bool);
void showProcessedData(bool);
void setRecordWidget(RecordWidget *);
void setFilter(RecordWidget::Filter *, const std::string &filterID);
bool transform(int comp = -1, Record *rec = nullptr);
bool setProcessedData(int comp,
const std::string &networkCode,
const std::string &stationCode,
const std::string &locationCode,
const Core::Time &startTime,
double samplingFrequency,
DoubleArrayPtr data);
void removeProcessedData(int comp);
private slots:
void widgetDestroyed(QObject *obj);
private:
void transformedRecord(int comp, const Record *rec);
public:
// One component
struct Component {
std::string channelCode;
int recordSlot;
RecordSequence *raw{nullptr};
RecordSequence *transformed{nullptr};
RecordSequence *processed{nullptr};
RecordWidget::Filter *filter{nullptr};
RecordStreamThread *thread{nullptr};
};
AmplitudeRecordLabel *label;
Math::Matrix3d transformation;
Component traces[3];
std::string filterID;
RecordWidget *widget{nullptr};
bool enableTransformation{false};
bool showProcessed{false};
};
class SC_GUI_API AmplitudeRecordLabel : public StandardRecordLabel {
Q_OBJECT
public:
AmplitudeRecordLabel(int items=3, QWidget *parent=0, const char* name = 0);
~AmplitudeRecordLabel();
public:
void setControlledItem(RecordViewItem *controlledItem);
RecordViewItem *controlledItem() const;
void setLinkedItem(bool sm);
void enabledExpandButton(RecordViewItem *controlledItem);
void disableExpandButton();
void unlink();
bool isLinkedItem() const;
bool isExpanded() const;
void setLabelColor(QColor);
void removeLabelColor();
void updateProcessingInfo();
protected:
void visibilityChanged(bool);
void resizeEvent(QResizeEvent *e);
void paintEvent(QPaintEvent *e);
public slots:
void extentButtonPressed();
private slots:
void enableExpandable(const Seiscomp::Record*);
private:
bool _isLinkedItem;
bool _isExpanded;
QPushButton *_btnExpand;
RecordViewItem *_linkedItem;
bool _hasLabelColor;
QColor _labelColor;
public:
double latitude;
double longitude;
const DataModel::SensorLocation *location;
Core::TimeWindow timeWindow;
ThreeComponentTrace data;
Math::Matrix3f orientationZNE;
Math::Matrix3f orientationZRT;
Processing::AmplitudeProcessorPtr processor;
Processing::MagnitudeProcessorPtr magnitudeProcessor;
Processing::AmplitudeProcessor::Config initialAmpConfig;
double initialMinSNR;
QString infoText;
bool isError;
bool hasGotData;
bool isEnabledByConfig;
friend class Gui::AmplitudeView;
};
}
class AmplitudeViewPrivate;
class SC_GUI_API AmplitudeView : public QMainWindow {
public:
struct SC_GUI_API Config {
typedef QPair<QString, QString> FilterEntry;
typedef QVector<FilterEntry> FilterList;
typedef QList<QString> StringList;
QString recordURL;
FilterList filters;
bool showAllComponents;
bool loadStrongMotionData;
double allComponentsMaximumStationDistance;
double defaultAddStationsDistance;
bool ignoreDisabledStations;
bool hideStationsWithoutData;
QColor timingQualityLow;
QColor timingQualityMedium;
QColor timingQualityHigh;
Core::TimeSpan preOffset;
Core::TimeSpan postOffset;
Config();
void addFilter(const QString &f, const QString &n) {
filters.push_back(QPair<QString, QString>(f, n));
}
};
Q_OBJECT
public:
//! Default c'tor
AmplitudeView(QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
~AmplitudeView();
public:
bool setConfig(const Config &c, QString *error = nullptr);
void setDatabase(Seiscomp::DataModel::DatabaseQuery*);
//! Sets an origin and inserts the traces for each arrival
//! in the view.
bool setOrigin(Seiscomp::DataModel::Origin*, const std::string &magType);
bool hasModifiedAmplitudes() const;
void getChangedAmplitudes(ObjectChangeList<DataModel::Amplitude> &list) const;
void stop();
void selectTrace(const Seiscomp::DataModel::WaveformStreamID &wid);
void selectTrace(const std::string &code);
const std::string &currentMagnitudeType() const;
void setStrongMotionCodes(const std::vector<std::string> &codes);
public slots:
void setDefaultDisplay();
void applyAmplitudes();
void changeFilter(int);
void setArrivalState(int arrivalId, bool state);
void setStationEnabled(const std::string& networkCode,
const std::string& stationCode,
bool state);
void setCurrentStation(const std::string& networkCode,
const std::string& stationCode);
signals:
void magnitudeCreated(Seiscomp::DataModel::Magnitude*);
void amplitudesConfirmed(Seiscomp::DataModel::Origin*, QList<Seiscomp::DataModel::AmplitudePtr>);
private slots:
void receivedRecord(Seiscomp::Record*);
void updateTraceInfo(RecordViewItem*, const Seiscomp::Record*);
void onAddedItem(const Seiscomp::Record*, Seiscomp::Gui::RecordViewItem*);
void onSelectedTime(Seiscomp::Core::Time);
void onSelectedTimeRange(Seiscomp::Core::Time, Seiscomp::Core::Time);
void onChangingTimeRange(Seiscomp::Core::Time, Seiscomp::Core::Time);
void onSelectedTime(Seiscomp::Gui::RecordWidget*, Seiscomp::Core::Time);
void setAlignment(Seiscomp::Core::Time);
void acquisitionFinished();
void commit();
void itemSelected(RecordViewItem*, RecordViewItem*);
void updateMainCursor(RecordWidget*,int);
void updateSubCursor(RecordWidget*,int);
void updateItemLabel(RecordViewItem*, char);
void updateItemRecordState(const Seiscomp::Record*);
void updateRecordValue(Seiscomp::Core::Time);
void showTraceScaleToggled(bool);
void showTheoreticalArrivals(bool);
void resetScale();
void resetDefaultTimeWindows();
void limitFilterToZoomTrace(bool);
void toggleFilter();
void addNewFilter(const QString&);
void scaleVisibleAmplitudes();
void changeScale(double, double);
void changeTimeRange(double, double);
void sortAlphabetically();
void sortByDistance();
void showZComponent();
void showNComponent();
void showEComponent();
void alignOnOriginTime();
void alignOnPArrivals();
void pickNone(bool);
void pickAmplitudes(bool);
void scaleAmplUp();
void scaleAmplDown();
void scaleTimeUp();
void scaleTimeDown();
void scaleReset();
void scrollLeft();
void scrollFineLeft();
void scrollRight();
void scrollFineRight();
void createAmplitude();
void setAmplitude();
void confirmAmplitude();
void deleteAmplitude();
void setCurrentRowEnabled(bool);
void setCurrentRowDisabled(bool);
void loadNextStations();
void showUsedStations(bool);
void moveTraces(double offset);
void move(double offset);
void zoom(float factor);
void applyTimeRange(double,double);
void sortByState();
void alignByState();
void componentByState();
void updateLayoutFromState();
void firstConnectionEstablished();
void lastConnectionClosed();
void beginWaitForRecords();
void doWaitForRecords(int value);
void endWaitForRecords();
void showFullscreen(bool);
void recalculateAmplitude();
void recalculateAmplitudes();
void enableAutoScale();
void disableAutoScale();
void zoomSelectionHandleMoved(int,double,Qt::KeyboardModifiers);
void zoomSelectionHandleMoveFinished();
void selectionHandleMoved(int,double,Qt::KeyboardModifiers);
void selectionHandleMoveFinished();
void addStations();
void searchStation();
void search(const QString&);
void nextSearch();
void abortSearchStation();
void openConnectionInfo(const QPoint &);
void ttInterfaceChanged(QString);
void ttTableChanged(QString);
protected:
void showEvent(QShowEvent* event);
RecordLabel* createLabel(RecordViewItem*) const;
private:
void figureOutTravelTimeTable();
void init();
RecordViewItem* addStream(const DataModel::SensorLocation *,
const DataModel::WaveformStreamID& streamID,
const Core::Time &referenceTime,
bool showDisabled);
RecordViewItem* addRawStream(const DataModel::SensorLocation *,
const DataModel::WaveformStreamID& streamID,
const Core::Time &referenceTime);
void queueStream(const DataModel::WaveformStreamID& streamID, int component);
void setupItem(const char comps[3], RecordViewItem*);
bool addTheoreticalArrivals(RecordViewItem*,
const std::string& netCode,
const std::string& staCode,
const std::string& locCode);
bool fillTheoreticalArrivals();
void resetState();
void updateOriginInformation();
void loadNextStations(float distance);
void setCursorText(const QString&);
void setCursorPos(const Seiscomp::Core::Time&, bool always = false);
void setTimeRange(double, double);
void acquireStreams();
bool applyFilter(RecordViewItem *item = nullptr);
//! Makes sure that the time range [tmin, tmax] is visible.
//! When the interval is larger than the visible area
//! the time range will be left aligned.
void ensureVisibility(double &tmin, double &tmax);
void ensureVisibility(const Seiscomp::Core::Time &time, int pixelMargin);
RecordMarker *updatePhaseMarker(Seiscomp::Gui::RecordViewItem*,
const Processing::AmplitudeProcessor *proc,
const Processing::AmplitudeProcessor::Result &res);
void setPhaseMarker(Seiscomp::Gui::RecordWidget*, const Seiscomp::Core::Time&);
void updateCurrentRowState();
void setMarkerState(Seiscomp::Gui::RecordWidget*, bool);
bool setArrivalState(Seiscomp::Gui::RecordWidget* w, int arrivalId, bool state);
void resetAmplitude(RecordViewItem *item, const QString &text, bool enable);
void fetchManualAmplitudes(std::vector<RecordMarker*>* marker = nullptr) const;
void showComponent(char componentCode);
void fetchComponent(char componentCode);
void addAmplitude(Gui::RecordViewItem*,
DataModel::Amplitude*,
DataModel::Pick*, Core::Time reference, int id);
void addFilter(const QString& name, const QString& filter);
void changeFilter(int, bool force);
void closeThreads();
char currentComponent() const;
void searchByText(const QString &text);
void newAmplitudeAvailable(const Processing::AmplitudeProcessor*,
const Processing::AmplitudeProcessor::Result &);
private:
AmplitudeViewPrivate *_d_ptr;
};
}
}
#endif

View File

@ -0,0 +1,179 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_CALCULATEAMPLITUDES_H
#define SEISCOMP_GUI_CALCULATEAMPLITUDES_H
#include <seiscomp/gui/core/recordstreamthread.h>
#ifndef Q_MOC_RUN
#include <seiscomp/datamodel/timewindow.h>
#include <seiscomp/datamodel/waveformstreamid.h>
#include <seiscomp/processing/amplitudeprocessor.h>
#endif
#include <seiscomp/gui/qt.h>
#include <QDialog>
#include <map>
#include <set>
#include <seiscomp/gui/datamodel/ui_calculateamplitudes.h>
namespace Seiscomp {
class Record;
namespace DataModel {
DEFINE_SMARTPOINTER(Amplitude);
class Pick;
class Origin;
class DatabaseQuery;
}
namespace Gui {
class SC_GUI_API CalculateAmplitudes : public QDialog {
Q_OBJECT
public:
typedef std::pair<DataModel::AmplitudePtr, bool> AmplitudeEntry;
typedef std::multimap<std::string, AmplitudeEntry> PickAmplitudeMap;
typedef PickAmplitudeMap::iterator iterator;
typedef std::pair<iterator, iterator> iterator_range;
typedef std::set<std::string> TypeSet;
public:
CalculateAmplitudes(DataModel::Origin *origin,
QWidget * parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
~CalculateAmplitudes();
void setOrigin(DataModel::Origin *origin);
void setStreamURL(const std::string& streamURL);
void setDatabase(DataModel::DatabaseQuery *);
void setRecomputeAmplitudes(bool);
void setAmplitudeCache(PickAmplitudeMap *cache);
void setAmplitudeTypes(const TypeSet &types);
public:
int exec();
void done(int r);
bool process();
//! Iterate over the computed/fetched amplitudes.
iterator begin();
iterator end();
//! Returns the amplitudes belonging to a pick that has been
//! fetched or calculated
iterator_range pickAmplitudes(const std::string &pickID);
iterator amplitude(const std::string &amplitudeID);
bool isNewlyCreated(const iterator&) const;
DataModel::AmplitudePtr amplitude(const iterator&) const;
//! Sets the state of an amplitude that stand for 'newly created'
void setState(iterator it, bool);
void setSilentMode(bool f);
private slots:
void receivedRecord(Seiscomp::Record*);
void finishedAcquisition();
void filterStateChanged(int index);
void filterTypeChanged(int index);
private:
void closeAcquisition();
void addProcessor(const std::string &type,
const DataModel::Pick *pick,
const DataModel::SensorLocation *loc,
double dist);
void addProcessor(Processing::AmplitudeProcessor *,
const DataModel::Pick *pick,
int c);
void subscribeData(Processing::AmplitudeProcessor *,
const DataModel::Pick *pick,
int c);
void checkPriority(const AmplitudeEntry &newAmp);
int addProcessingRow(const std::string &streamID, const std::string &type);
void emitAmplitude(const Processing::AmplitudeProcessor *,
const Processing::AmplitudeProcessor::Result &res);
void setError(int row, QString text);
void setInfo(int row, QString text);
void setMessage(int row, QString text);
void setProgress(int row, int progress);
void setValue(int row, double value);
void filterView(int startRow = 0, int cnt = -1);
void updateTitle();
private:
typedef std::vector<Processing::AmplitudeProcessorPtr> ProcessorSlot;
typedef std::map<std::string, ProcessorSlot> ProcessorMap;
typedef std::multimap<Processing::AmplitudeProcessorCPtr, int> TableRowMap;
typedef std::map<std::string, Seiscomp::Util::KeyValuesPtr> ParameterMap;
typedef std::map<std::string, Seiscomp::Processing::StreamPtr> StreamMap;
::Ui::CalculateAmplitudes _ui;
ProcessorMap _processors;
ParameterMap _parameters;
StreamMap _streams;
TableRowMap _rows;
PickAmplitudeMap _amplitudes;
PickAmplitudeMap *_externalAmplitudeCache;
Core::TimeWindow _timeWindow;
RecordStreamThread *_thread;
DataModel::DatabaseQuery *_query;
DataModel::Origin *_origin;
TypeSet _amplitudeTypes;
bool _recomputeAmplitudes;
bool _computeSilently;
};
}
}
#endif

View File

@ -0,0 +1,323 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_EVENTEDIT_H
#define SEISCOMP_GUI_EVENTEDIT_H
#include <QWidget>
#include <string>
#include <list>
#ifndef Q_MOC_RUN
#include <seiscomp/datamodel/event.h>
#include <seiscomp/datamodel/origin.h>
#include <seiscomp/datamodel/magnitude.h>
#include <seiscomp/datamodel/focalmechanism.h>
#include <seiscomp/datamodel/momenttensor.h>
#include <seiscomp/datamodel/journalentry.h>
#include <seiscomp/datamodel/databasequery.h>
#endif
#include <seiscomp/gui/qt.h>
#include <seiscomp/gui/datamodel/originsymbol.h>
#include <seiscomp/gui/datamodel/tensorsymbol.h>
#include <seiscomp/gui/map/mapwidget.h>
#include <seiscomp/gui/datamodel/ui_eventedit.h>
namespace Seiscomp {
namespace Gui {
// Extends tensor symbol by label and reference position
class SC_GUI_API ExtTensorSymbol : public TensorSymbol {
public:
ExtTensorSymbol(const Math::Tensor2Sd &t,
const DataModel::FocalMechanism *fm,
Map::Decorator* decorator = nullptr);
~ExtTensorSymbol() {};
public:
void setSelected(bool selected) { _selected = selected; }
void setDrawAgency(bool enabled) { _drawAgency = enabled; }
void setDrawMagnitude(bool enabled) { _drawMagnitude = enabled; }
void setDrawDepth(bool enabled) { _drawDepth = enabled; }
void setReferencePositionEnabled(bool enabled) { _refPosEnabled = enabled; }
void setReferencePosition(const QPointF &refPos) { _refPos = refPos; }
const QString& agencyID() const { return _agency; }
const Core::Time& created() const { return _created; }
protected:
virtual void customDraw(const Map::Canvas *canvas, QPainter &painter);
private:
bool _selected;
bool _refPosEnabled;
QPointF _refPos;
QString _agency;
QString _magnitude;
QString _depth;
Core::Time _created;
bool _drawAgency;
bool _drawMagnitude;
bool _drawDepth;
};
// Adds context menu entries to control drawing of focal mechanism symbols
class SC_GUI_API FMMap : public MapWidget {
Q_OBJECT
public:
FMMap(const MapsDesc &maps, QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags())
: MapWidget(maps, parent, f) { init(); }
FMMap(Map::ImageTree* mapTree, QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags())
: MapWidget(mapTree, parent, f) { init(); }
virtual ~FMMap();
virtual void draw(QPainter&);
void addFM(const DataModel::FocalMechanism *fm);
void clear();
void setCurrentFM(const std::string &id);
void setEvent(const DataModel::Event *event);
protected:
void contextMenuEvent(QContextMenuEvent *e);
private:
void init();
void updateSmartLayout();
private:
typedef std::map<std::string, ExtTensorSymbol*> FMSymbols;
FMSymbols _fmSymbols;
OriginSymbol *_originSymbol;
bool _drawAgency;
bool _drawMagnitude;
bool _drawDepth;
bool _smartLayout;
bool _groupByAgency;
bool _smartLayoutDirty;
QRectF _fmBoundings;
};
// Derived from Observer to receive local object modifications, because
// messages sent by other controls won't be received by the client
// application again.
class SC_GUI_API EventEdit : public QWidget, public DataModel::Observer {
Q_OBJECT
public:
EventEdit(DataModel::DatabaseQuery* reader,
Map::ImageTree *mapTreeOrigin = nullptr,
QWidget *parent = 0);
~EventEdit();
public:
//! Sets the usage of messaging to notify about object changes.
//! When disabled a local EventParameters instance is searched for and
//! all updates and adds are applied to this instance.
void setMessagingEnabled(bool);
signals:
void originSelected(Seiscomp::DataModel::Origin*, Seiscomp::DataModel::Event* = nullptr);
void originMergeRequested(QList<Seiscomp::DataModel::Origin*>);
void fmSelected(Seiscomp::DataModel::FocalMechanism*, Seiscomp::DataModel::Event* = nullptr);
public slots:
void addObject(const QString& parentID, Seiscomp::DataModel::Object* obj);
void updateObject(const QString& parentID, Seiscomp::DataModel::Object* obj);
void removeObject(const QString& parentID, Seiscomp::DataModel::Object* obj);
void setEvent(Seiscomp::DataModel::Event *event, Seiscomp::DataModel::Origin *origin);
void updateOrigin(Seiscomp::DataModel::Origin*);
void updateFM(Seiscomp::DataModel::FocalMechanism*);
void showTab(int);
private slots:
void sortOriginItems(int);
void sortFMItems(int);
void originSelected(QTreeWidgetItem *item, int);
void fmSelected(QTreeWidgetItem *item, int);
void sortMagnitudeItems(int);
void currentTypeChanged(int);
void currentTypeCertaintyChanged(int);
void currentOriginChanged(QTreeWidgetItem*, QTreeWidgetItem*);
void currentFMChanged(QTreeWidgetItem*, QTreeWidgetItem*);
void currentMagnitudeChanged(QTreeWidgetItem*, QTreeWidgetItem*);
void originTreeCustomContextMenu(const QPoint &);
void originTreeHeaderCustomContextMenu(const QPoint &);
void fmTreeCustomContextMenu(const QPoint &);
void fmTreeHeaderCustomContextMenu(const QPoint &);
void magnitudeTreeCustomContextMenu(const QPoint &);
void fixOrigin();
void fixFM();
void releaseOrigin();
void releaseFM();
void fixMagnitudeType();
void releaseMagnitudeType();
void fixMw();
void fixFmMw();
void releaseMw();
void triggerMw();
void evalResultAvailable(const QString &originID,
const QString &className,
const QString &script,
const QString &result);
void evalResultError(const QString &originID,
const QString &className,
const QString &script,
int error);
public:
const DataModel::Event *currentEvent() const;
void handleOrigins(const QList<DataModel::Origin*> &origins);
private:
void init();
void updateContent();
void updateEvent();
void updateOrigin();
void updateMagnitude();
void updateFM();
void updateMT();
void updateJournal();
void resetContent();
void resetOrigin();
void resetMagnitude();
void resetFM();
void resetMT(bool resetCurrent = false);
bool sendJournal(const std::string &action,
const std::string &params);
void addMagnitude(DataModel::Magnitude *mag);
void addJournal(DataModel::JournalEntry *entry);
void updatePreferredOriginIndex();
void updatePreferredMagnitudeIndex();
void updatePreferredFMIndex();
void onObjectAdded(DataModel::Object* parent, DataModel::Object* newChild);
void onObjectRemoved(DataModel::Object* parent, DataModel::Object* oldChild);
void onObjectModified(DataModel::Object* object);
void insertOriginRow(DataModel::Origin *);
void updateOriginRow(int row, DataModel::Origin *);
void updateMagnitudeRow(int row, DataModel::Magnitude *);
void insertFMRow(DataModel::FocalMechanism *);
void updateFMRow(int row, DataModel::FocalMechanism *);
void storeOrigin(DataModel::Origin *);
void storeFM(DataModel::FocalMechanism *);
void storeDerivedOrigin(DataModel::Origin *);
void clearOrigins();
void clearFMs();
void mergeOrigins(const QList<DataModel::Origin*> &origins);
void setFMActivity(bool);
private:
typedef std::list<DataModel::OriginPtr> OriginList;
typedef std::list<DataModel::FocalMechanismPtr> FMList;
struct ProcessColumn {
int pos;
QString script;
};
Ui::EventEdit _ui;
QList<DataModel::EventType> _eventTypesWhitelist;
DataModel::DatabaseQuery* _reader;
Map::ImageTreePtr _mapTreeOrigin;
Map::ImageTreePtr _mapTreeFM;
QLabel *_fmActivity;
QMovie *_fmActivityMovie;
DataModel::EventPtr _currentEvent;
bool _updateLocalEPInstance;
bool _blockObserver;
// origin tab
OriginList _origins;
MapWidget *_originMap;
QRectF _originBoundings;
DataModel::OriginPtr _currentOrigin;
DataModel::MagnitudePtr _currentMagnitude;
int _fixOriginDefaultActionCount;
int _preferredOriginIdx;
int _preferredMagnitudeIdx;
QStringList _originTableHeader;
QVector<int> _originColumnMap;
int _customColumn;
QString _customColumnLabel;
std::string _commentID;
QString _customDefaultText;
QMap<std::string, QColor> _customColorMap;
QVector<ProcessColumn> _scriptColumns;
QHash<QString, int> _scriptColumnMap;
QTreeWidget *_originTree;
// focal mechanism tab
FMList _fms;
OriginList _derivedOrigins;
FMMap *_fmMap;
DataModel::FocalMechanismPtr _currentFM;
DataModel::MomentTensorPtr _currentMT;
int _fixFMDefaultActionCount;
int _preferredFMIdx;
QStringList _fmTableHeader;
QVector<int> _fmColumnMap;
OriginSymbol *_fmPrefOriginSymbol;
};
}
}
#endif

View File

@ -0,0 +1,136 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_EVENTLAYER_H
#define SEISCOMP_GUI_EVENTLAYER_H
#include <seiscomp/gui/map/layer.h>
#include <seiscomp/gui/map/legend.h>
#include <seiscomp/gui/datamodel/originsymbol.h>
#include <QMap>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API EventLayer : public Map::Layer {
Q_OBJECT
// ----------------------------------------------------------------------
// X'truction
// ----------------------------------------------------------------------
public:
//! C'tor
EventLayer(QObject* parent = nullptr);
//! D'tor
~EventLayer();
// ----------------------------------------------------------------------
// Layer interface
// ----------------------------------------------------------------------
public:
virtual void draw(const Map::Canvas *, QPainter &);
virtual void calculateMapPosition(const Map::Canvas *canvas);
virtual bool isInside(const QMouseEvent *event, const QPointF &geoPos);
virtual void handleEnterEvent();
virtual void handleLeaveEvent();
virtual bool filterMouseMoveEvent(QMouseEvent *event, const QPointF &geoPos);
virtual bool filterMouseDoubleClickEvent(QMouseEvent *event, const QPointF &geoPos);
// ----------------------------------------------------------------------
// Slots
// ----------------------------------------------------------------------
public slots:
virtual void clear();
virtual void addEvent(Seiscomp::DataModel::Event*,bool);
virtual void updateEvent(Seiscomp::DataModel::Event*);
virtual void removeEvent(Seiscomp::DataModel::Event*);
// ----------------------------------------------------------------------
// Signals
// ----------------------------------------------------------------------
signals:
void eventHovered(const std::string &eventID);
void eventSelected(const std::string &eventID);
// ----------------------------------------------------------------------
// Protected members
// ----------------------------------------------------------------------
protected:
typedef QMap<std::string, OriginSymbol*> SymbolMap;
SymbolMap _eventSymbols;
mutable std::string _hoverId;
mutable bool _hoverChanged;
};
class EventLegend : public Map::Legend {
Q_OBJECT
// ----------------------------------------------------------------------
// X'truction
// ----------------------------------------------------------------------
public:
//! C'tor
EventLegend(QObject* parent = nullptr);
//! D'tor
~EventLegend();
// ----------------------------------------------------------------------
// Legend interface
// ----------------------------------------------------------------------
public:
virtual void contextResizeEvent(const QSize &size);
virtual void draw(const QRect &rect, QPainter &p);
// ----------------------------------------------------------------------
// Private members
// ----------------------------------------------------------------------
private:
typedef QPair<QString, int> StringWithWidth;
typedef QPair<QColor, StringWithWidth> DepthItem;
typedef QPair<int, StringWithWidth> MagItem;
QVector<DepthItem> _depthItems;
QVector<MagItem> _magItems;
int _depthWidth;
int _magWidth;
int _magHeight;
};
}
}
#endif

View File

@ -0,0 +1,404 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_ORIGINLISTVIEW_H
#define SEISCOMP_GUI_ORIGINLISTVIEW_H
#include <seiscomp/gui/core/connectiondialog.h>
#include <seiscomp/gui/core/utils.h>
#include <seiscomp/gui/qt.h>
#ifndef Q_MOC_RUN
#include <seiscomp/core/baseobject.h>
#include <seiscomp/core/timewindow.h>
#include <seiscomp/geo/boundingbox.h>
#endif
#include <QWidget>
// Ui forward declarations
class QTreeWidget;
class QTreeWidgetItem;
namespace Ui {
class EventListView;
class EventListViewRegionFilterDialog;
}
namespace Seiscomp {
namespace DataModel {
DEFINE_SMARTPOINTER(Event);
DEFINE_SMARTPOINTER(Origin);
DEFINE_SMARTPOINTER(FocalMechanism);
DEFINE_SMARTPOINTER(Pick);
DEFINE_SMARTPOINTER(Station);
DEFINE_SMARTPOINTER(Amplitude);
class OriginReference;
class DatabaseQuery;
class Notifier;
}
namespace Client {
DEFINE_SMARTPOINTER(Connection);
}
namespace Geo {
DEFINE_SMARTPOINTER(GeoFeature);
}
namespace Gui {
namespace Private {
class EventTreeItem;
class OriginTreeItem;
class FocalMechanismTreeItem;
class EventFilterWidget;
}
class CommandMessage;
class SC_GUI_API EventListView : public QWidget {
Q_OBJECT
// ------------------------------------------------------------------
// Public types
// ------------------------------------------------------------------
public:
typedef QMap<QString, DataModel::StationPtr> StationMap;
struct Filter {
Filter(const Seiscomp::Core::TimeWindow& tw = Seiscomp::Core::TimeWindow())
: startTime(tw.startTime()), endTime(tw.endTime()) {}
Seiscomp::Core::Time startTime;
Seiscomp::Core::Time endTime;
OPT(float) minLatitude, maxLatitude;
OPT(float) minLongitude, maxLongitude;
OPT(float) minDepth, maxDepth;
OPT(float) minMagnitude, maxMagnitude;
std::string eventID;
bool isNull() const;
};
// ------------------------------------------------------------------
// X'truction
// ------------------------------------------------------------------
public:
EventListView(Seiscomp::DataModel::DatabaseQuery* reader,
bool withOrigins = true, bool withFocalMechanisms = false,
QWidget * parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
~EventListView();
public:
void setRelativeMinimumEventTime(const Seiscomp::Core::TimeSpan&);
void add(Seiscomp::DataModel::Event* event,
Seiscomp::DataModel::Origin* origin);
//! Sets the usage of messaging to notify about new objects or updates.
//! When disabled a local EventParameters instance is searched for and
//! all updates and adds are applied to this instance.
void setMessagingEnabled(bool);
void setEventModificationsEnabled(bool);
void setSortingEnabled(bool);
void moveSection(int, int);
void setControlsHidden(bool);
void setCustomControls(QWidget*) const;
void setFMLinkEnabled(bool);
QList<Seiscomp::DataModel::Event*> selectedEvents();
QTreeWidget *eventTree() { return _treeWidget; }
Seiscomp::DataModel::Event *eventFromTreeItem(QTreeWidgetItem *item) const;
int eventCount() const;
//! \since 15.0.0
int visibleEventCount() const;
signals:
void originAdded();
void focalMechanismAdded();
void originSelected(Seiscomp::DataModel::Origin*,
Seiscomp::DataModel::Event* = nullptr);
void originUpdated(Seiscomp::DataModel::Origin*);
void focalMechanismSelected(Seiscomp::DataModel::FocalMechanism*,
Seiscomp::DataModel::Event* = nullptr);
void focalMechanismUpdated(Seiscomp::DataModel::FocalMechanism*);
void eventSelected(Seiscomp::DataModel::Event*);
void eventFMSelected(Seiscomp::DataModel::Event*);
void originReferenceAdded(const std::string &, Seiscomp::DataModel::OriginReference*);
//! Emitted when the event list is cleared
void reset();
void eventAddedToList(Seiscomp::DataModel::Event*, bool fromNotification);
void eventUpdatedInList(Seiscomp::DataModel::Event*);
void eventRemovedFromList(Seiscomp::DataModel::Event*);
//! \since 15.0.0
void visibleEventCountChanged();
//! Emitted when a bigger update process has finished, such as show/hide
//! of a subset of events.
void eventsUpdated();
public slots:
void setAutoSelect(bool);
void onCommand(Seiscomp::Gui::CommandMessage* cmsg);
void messageAvailable(Seiscomp::Core::Message*, Seiscomp::Client::Packet*);
void notifierAvailable(Seiscomp::DataModel::Notifier*);
void updateOrigin(Seiscomp::DataModel::Origin* origin);
void insertOrigin(Seiscomp::DataModel::Origin* origin,
Seiscomp::DataModel::Event* baseEvent,
const Seiscomp::Gui::ObjectChangeList<Seiscomp::DataModel::Pick>&,
const std::vector<Seiscomp::DataModel::AmplitudePtr>&);
void updateFocalMechanism(Seiscomp::DataModel::FocalMechanism *fm);
void insertFocalMechanism(Seiscomp::DataModel::FocalMechanism *fm,
Seiscomp::DataModel::Event *event,
Seiscomp::DataModel::Origin *origin = 0);
void setInterval(const Seiscomp::Core::TimeWindow&);
void selectFirstEnabledEvent();
void selectEvent(int index);
void selectEventID(const std::string& publicID);
/**
* @brief Activates the previous visible event.
* This is similar to selecting the event before (visually below) the
* current event in the list.
*/
void setPreviousEvent();
/**
* @brief Activates the next visible event.
* This is similar to selecting the event after (visually above) the
* current event in the list.
*/
void setNextEvent();
void readFromDatabase();
void readFromDatabase(const Seiscomp::Gui::EventListView::Filter&);
void clear();
void clearDatabaseFilter();
void selectEventFM(const QString &);
protected slots:
void itemSelected(QTreeWidgetItem*,int);
void itemPressed(QTreeWidgetItem*,int);
void copyRowToClipboard();
void readLastDays();
void readInterval();
void onShowOtherEvents(int checked);
void onShowForeignEvents(int checked);
void onHideOutsideRegion(int checked);
void onFilterRegionModeChanged(int mode);
void updateAgencyState();
private slots:
void sortItems(int);
void headerContextMenuRequested(const QPoint &);
void waitDialogDestroyed(QObject *o);
void regionSelectionChanged(int index);
void changeRegion();
void itemEntered(QTreeWidgetItem *item, int);
void itemExpanded(QTreeWidgetItem * item);
void currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous);
void indicatorResized(const QSize &size);
void evalResultAvailable(const QString &publicID,
const QString &className,
const QString &script,
const QString &result);
void evalResultError(const QString &publicID,
const QString &className,
const QString &script,
int error);
protected:
bool eventFilter(QObject *obj, QEvent *event);
private:
void initTree();
Private::EventTreeItem* addEvent(Seiscomp::DataModel::Event*, bool fromNotification);
Private::OriginTreeItem* addOrigin(Seiscomp::DataModel::Origin*, QTreeWidgetItem* parent, bool highPriority);
Private::FocalMechanismTreeItem* addFocalMechanism(Seiscomp::DataModel::FocalMechanism*, QTreeWidgetItem* parent);
Private::EventTreeItem* findEvent(const std::string&);
Private::OriginTreeItem* findOrigin(const std::string&);
Private::FocalMechanismTreeItem* findFocalMechanism(const std::string&);
void removeExpiredEvents();
void updateHideState();
bool updateHideState(QTreeWidgetItem *item);
void updateOriginProcessColumns(QTreeWidgetItem *item, bool highPriority);
void updateEventProcessColumns(QTreeWidgetItem *item, bool highPriority);
bool sendJournalAndWait(const std::string &objectID,
const std::string &action,
const std::string &params, const char *group);
void loadItem(QTreeWidgetItem*);
public:
struct ProcessColumn {
int pos;
QString script;
};
struct ItemConfig {
ItemConfig() : createFMLink(false) {}
QColor disabledColor;
bool createFMLink;
QStringList header;
QVector<int> columnMap;
int customColumn;
std::string originCommentID;
std::string eventCommentID;
QString customDefaultText;
QMap<std::string, QColor> customColorMap;
QVector<ProcessColumn> originScriptColumns;
QVector<ProcessColumn> eventScriptColumns;
QSet<int> eventScriptPositions;
QHash<QString, int> originScriptColumnMap;
QHash<QString, int> eventScriptColumnMap;
QSet<int> hiddenEventTypes;
QSet<QString> preferredAgencies;
};
struct Region {
QString name;
Geo::GeoBoundingBox bbox;
const Geo::GeoFeature *poly{nullptr};
};
typedef QList<Region> FilterRegions;
private:
::Ui::EventListView *_ui;
Private::EventFilterWidget *_filterWidget;
ItemConfig _itemConfig;
FilterRegions _filterRegions;
QTreeWidget *_treeWidget;
QTreeWidgetItem *_unassociatedEventItem;
QWidget *_commandWaitDialog;
QMovie *_busyIndicator;
QLabel *_busyIndicatorLabel;
//StationMap _associatedStations;
Seiscomp::DataModel::DatabaseQuery *_reader;
Seiscomp::Core::TimeSpan _timeAgo;
Filter _filter;
bool _autoSelect;
bool _withOrigins;
bool _withFocalMechanisms;
bool _updateLocalEPInstance;
//bool _withComments;
bool _blockSelection;
bool _blockRemovingOfExpiredEvents;
bool _blockCountSignal;
bool _hideOtherEvents;
bool _hideForeignEvents;
bool _hideOutsideRegion;
bool _checkEventAgency;
bool _showOnlyLatestPerAgency;
int _regionIndex;
mutable int _visibleEventCount;
};
class SC_GUI_API EventListViewRegionFilterDialog : public QDialog {
Q_OBJECT
// ------------------------------------------------------------------
// X'truction
// ------------------------------------------------------------------
public:
EventListViewRegionFilterDialog(QWidget *parent, EventListView::Region *target,
EventListView::FilterRegions *regionList);
~EventListViewRegionFilterDialog();
// ------------------------------------------------------------------
// QDialog interface
// ------------------------------------------------------------------
public:
virtual void accept();
// ------------------------------------------------------------------
// Slots
// ------------------------------------------------------------------
private slots:
void regionSelectionChanged(const QString &);
void showError(const QString &);
// ------------------------------------------------------------------
// Private members
// ------------------------------------------------------------------
private:
::Ui::EventListViewRegionFilterDialog *_ui;
EventListView::Region *_target;
EventListView::FilterRegions *_regionList;
};
}
}
#endif

View File

@ -0,0 +1,204 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_EVENTSUMMARY_H
#define SEISCOMP_GUI_EVENTSUMMARY_H
#include <string>
#include <set>
#include <QWidget>
#include <QHBoxLayout>
#include <QLabel>
#ifndef Q_MOC_RUN
#include <seiscomp/datamodel/event.h>
#include <seiscomp/datamodel/focalmechanism.h>
#include <seiscomp/datamodel/origin.h>
#include <seiscomp/datamodel/magnitude.h>
#include <seiscomp/datamodel/databasequery.h>
#endif
#include <seiscomp/gui/core/gradient.h>
#include <seiscomp/gui/map/mapwidget.h>
#include <seiscomp/gui/qt.h>
namespace Ui {
class EventSummary;
}
namespace Seiscomp {
namespace Gui {
class OriginSymbol;
class SC_GUI_API EventSummaryMagnitudeRow : public QHBoxLayout {
Q_OBJECT
public:
EventSummaryMagnitudeRow(const std::string &type,
QWidget *parent = 0);
void reset();
void select(bool);
void set(const std::string &id, const double *value, int stationCount);
signals:
void clicked(const std::string &magID);
protected:
bool eventFilter(QObject *obj, QEvent *event);
private:
void setMagnitude(const double *value, int stationCount);
public:
std::string magnitudeID;
QLabel *label;
QLabel *value;
};
class SC_GUI_API EventSummary : public QWidget {
Q_OBJECT
public:
EventSummary(const MapsDesc &maps,
DataModel::DatabaseQuery* reader,
QWidget *parent = 0);
EventSummary(Map::ImageTree* mapTree,
DataModel::DatabaseQuery* reader,
QWidget * parent = 0);
~EventSummary();
public:
DataModel::Event *currentEvent() const;
DataModel::Origin *currentOrigin() const;
//! Negative value switches to default behaviour
void setDefaultEventRadius(double radius);
void setSecondDisplayUpToMaxMinutes(int);
void addVisibleMagnitudeType(const std::string &mag);
QList<QFrame*> separators() const;
signals:
void selected(Seiscomp::DataModel::Origin*, Seiscomp::DataModel::Event*);
void magnitudeSelected(const std::string &magnitudeID);
public slots:
void addObject(const QString& parentID, Seiscomp::DataModel::Object* obj);
void updateObject(const QString& parentID, Seiscomp::DataModel::Object* obj);
void removeObject(const QString& parentID, Seiscomp::DataModel::Object* obj);
void updateOrigin(Seiscomp::DataModel::Origin* origin);
void setEvent(Seiscomp::DataModel::Event *event,
Seiscomp::DataModel::Origin* org = nullptr,
bool fixed = false);
void showOrigin(Seiscomp::DataModel::Origin*);
public:
QPushButton *exportButton() const;
MapWidget *mapWidget() const;
private slots:
void updateTimeAgo();
void magnitudeClicked(const std::string &magnitudeID);
private:
void init();
void setTextContrast(bool);
void mapClicked();
void setFocalMechanism(DataModel::FocalMechanism*);
void setOrigin(DataModel::Origin *origin);
void setOrigin(const std::string &originID);
void setMagnitude(const DataModel::Magnitude *mag);
void selectMagnitude(const std::string &type);
void resetContent();
void resetMagnitudes();
void updateContent();
void updateMagnitude();
void updateOrigin();
void updateAlert();
private:
struct AlertSettings {
AlertSettings() : textSize(-1) {}
bool empty() { return commentId.empty(); }
std::string commentId;
std::vector<std::string > commentBlacklist;
int textSize;
Gui::Gradient gradient;
};
private:
::Ui::EventSummary *_ui;
Map::ImageTreePtr _maptree;
MapWidget *_map;
QTimer _timeAgo;
DataModel::DatabaseQuery* _reader;
DataModel::EventPtr _currentEvent;
DataModel::OriginPtr _currentOrigin;
DataModel::MagnitudeCPtr _currentMag;
DataModel::FocalMechanismPtr _currentFocalMechanism;
OriginSymbol *_symbol;
QBoxLayout *_magnitudeRows;
typedef std::set<std::string> MagnitudeTypes;
typedef std::map<std::string, EventSummaryMagnitudeRow*> MagnitudeList;
MagnitudeTypes _visibleMagnitudes;
MagnitudeList _magnitudes;
AlertSettings _alertSettings;
bool _alertActive;
bool _fixedView;
bool _showComment;
double _defaultEventRadius;
int _maxMinutesSecondDisplay;
friend class EventSummaryMap;
};
}
}
#endif

View File

@ -0,0 +1,334 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_EVENTSUMMARYVIEW_H
#define SEISCOMP_GUI_EVENTSUMMARYVIEW_H
#include <QtGui>
#ifndef Q_MOC_RUN
#include <seiscomp/datamodel/event.h>
#include <seiscomp/datamodel/origin.h>
#include <seiscomp/datamodel/focalmechanism.h>
#include <seiscomp/datamodel/types.h>
#include <seiscomp/gui/datamodel/originlocatormap.h>
#include <seiscomp/gui/map/mapwidget.h>
#include <seiscomp/datamodel/databasequery.h>
#include <seiscomp/datamodel/magnitude.h>
#endif
#include <seiscomp/gui/core/application.h>
#include <QProcess>
namespace Ui {
class EventSummaryView;
class Hypocenter;
}
namespace Seiscomp {
namespace DataModel {
DEFINE_SMARTPOINTER(Pick);
class DatabaseReader;
}
namespace Gui {
class MagList;
class TensorSymbol;
//!
//! magnitude-type-quality display line
//!
class SC_GUI_API MagRow : public QWidget
{
Q_OBJECT
public:
MagRow(DataModel::Magnitude *netMag, bool bold, QWidget *parent = 0);
MagRow(const std::string &type, bool bold, QWidget *parent = 0);
~MagRow();
void setMagnitude(DataModel::Magnitude*);
DataModel::Magnitude *magnitude() const { return _netMag.get(); }
void setReferenceMagnitude(DataModel::Magnitude*);
DataModel::Magnitude *referenceMagnitude() const { return _netMagReference.get(); }
void setReferenceMagnitudeVisible(bool);
void setReferenceMagnitudeColor(QColor);
void setVisible(bool);
void updateContent();
private:
void init();
void setBold(bool);
private:
QHBoxLayout *_rowsLayout;
QLabel *_type;
QLabel *_magnitude;
QLabel *_magnitudeReference;
QLabel *_quality;
QLabel *_qualityReference;
QLabel *_stdev;
QLabel *_stdevReference;
DataModel::MagnitudePtr _netMag;
DataModel::MagnitudePtr _netMagReference;
bool _header;
bool _referenceMagVisible;
friend class MagList;
};
//!
//! widget for displaying the magnitude-type-quality lines
//!
class SC_GUI_API MagList : public QWidget
{
Q_OBJECT
public:
MagList(QWidget *parent = 0);
~MagList();
void addMag(DataModel::Magnitude* netMag, bool bold, bool visible);
void addMag(const std::string& type, bool bold, bool visible);
void updateMag(DataModel::Magnitude* netMag);
void updateReferenceMag(DataModel::Magnitude* netMag);
void selectMagnitude(const char *id);
void reset();
void clear();
void showAll();
void hideTypes(const std::set<std::string>&);
void setReferenceMagnitudesVisible(bool);
void setReferenceMagnitudesColor(QColor);
int rowCount() { return _magRows.size(); }
MagRow *rowAt(int i) const { return _magRows[i]; }
MagRow* row(const std::string& type) const;
// QSize sizeHint() const;
private:
QWidget* _widget;
QGridLayout* _mainLayout;
QVector<MagRow*> _magRows;
MagRow* _header;
QColor _referenceColor;
bool _space;
bool _referenceMagsVisible;
};
class SC_GUI_API EventSummaryView : public QWidget
{
Q_OBJECT
public:
EventSummaryView(const MapsDesc &maps,
Seiscomp::DataModel::DatabaseQuery* reader,
QWidget *parent = 0);
EventSummaryView(Map::ImageTree* mapTree,
Seiscomp::DataModel::DatabaseQuery* reader,
QWidget * parent = 0);
~EventSummaryView();
void setToolButtonText(const QString&);
void setScript0(const std::string&, bool oldStyle, bool exportMap);
void setScript1(const std::string&, bool oldStyle, bool exportMap);
Seiscomp::DataModel::Event* currentEvent() const;
Seiscomp::DataModel::Origin* currentOrigin() const;
Seiscomp::DataModel::Magnitude* currentMagnitude() const;
OriginLocatorMap* map() const;
bool ignoreOtherEvents() const;
public slots:
void addObject(const QString &parentID, Seiscomp::DataModel::Object *obj);
void updateObject(const QString &parentID, Seiscomp::DataModel::Object *obj);
void removeObject(const QString &parentID, Seiscomp::DataModel::Object *obj);
void showEvent(Seiscomp::DataModel::Event* event, Seiscomp::DataModel::Origin* org = nullptr);
//! Shows an origin that maybe does not belong to an event yet
void showOrigin(Seiscomp::DataModel::Origin* origin);
void updateTimeAgoLabel();
void updateEvent();
void deferredMapUpdate();
void setWaveformPropagation(bool);
void drawStations(bool);
void drawBeachballs(bool);
void drawFullTensor(bool);
void setAutoSelect(bool);
void setInteractiveEnabled(bool);
private slots:
void runScript0();
void runScript1();
void switchToAutomaticPressed();
void showVisibleMagnitudes(bool);
void setLastAutomaticOriginColor(QColor c);
void setLastAutomaticFMColor(QColor c);
void setLastAutomaticOriginVisible(bool);
void showOnlyMostRecentEvent(bool);
void ignoreOtherEvents(bool);
signals:
void toolButtonPressed();
void requestNonFakeEvent();
void newNofifier(Seiscomp::DataModel::Notifier *n);
void showInStatusbar(QString, int);
private:
void init();
void runScript(const QString&, const QString& name, bool oldStyle,
bool exportMap);
void processEventMsg(DataModel::Event* event, DataModel::Origin* org = nullptr);
bool setOriginParameter(std::string OriginID);
void setPrefMagnitudeParameter(std::string MaginitudeID);
void setOrigin(DataModel::Origin* origin);
void setAutomaticOrigin(DataModel::Origin* origin);
void setAutomaticFM(DataModel::FocalMechanism* fm);
void setMagnitudeParameter(DataModel::Origin* origin);
void setAutomaticMagnitudeParameter(DataModel::Origin* origin);
void setFMParametersVisible(bool);
void updateEventComment();
void updateEventName();
void showFocalMechanism(DataModel::FocalMechanism *fm, int ofsX, int ofsY,
QColor borderColor);
void setFM(DataModel::FocalMechanism *fm);
void clearMagnitudeParameter();
void clearPrefMagnitudeParameter();
void clearOriginParameter();
void clearAutomaticOriginParameter();
void clearAutomaticFMParameter();
void clearMap();
void updateMap(bool realignView);
void updateMagnitude(DataModel::Magnitude *mag);
bool updateLastAutomaticOrigin(DataModel::Origin *origin);
bool updateLastAutomaticFM(DataModel::FocalMechanism *fm);
// for calculating map boundaries from max sta dist
DataModel::Pick* getPick(DataModel::Arrival* arrival);
DataModel::Station* getStation(DataModel::Pick* pick);
void calcMinMax(double& latMin, double& latMax, double& lonMin, double& lonMax );
std::string description(DataModel::Origin*) const;
bool checkAndDisplay(DataModel::Event *);
void calcOriginDistances();
private:
Ui::EventSummaryView *_ui;
Ui::Hypocenter *_uiHypocenter;
MagList *_magList;
Seiscomp::DataModel::EventPtr _currentEvent;
Seiscomp::DataModel::EventPtr _lastEvent;
Seiscomp::DataModel::OriginPtr _currentOrigin;
Seiscomp::DataModel::OriginPtr _lastAutomaticOrigin;
Seiscomp::DataModel::FocalMechanismPtr _currentFocalMechanism;
Seiscomp::DataModel::FocalMechanismPtr _lastAutomaticFocalMechanism;
Seiscomp::DataModel::MagnitudePtr _currentNetMag;
Seiscomp::Gui::Map::ImageTreePtr _maptree;
OriginLocatorMap *_map;
Seiscomp::DataModel::DatabaseQuery* _reader;
QColor _automaticOriginColor;
QColor _automaticFMColor;
QColor _automaticOriginEnabledColor;
QColor _automaticOriginDisabledColor;
bool _interactive;
bool _autoSelect;
bool _displayFocMechs;
bool _recenterMap;
bool _recenterMapConfig;
bool _ignoreOtherEvents;
bool _showLastAutomaticSolution;
bool _showOnlyMostRecentEvent;
bool _enableFullTensor;
int _maxMinutesSecondDisplay;
QTimer* _mapTimer;
double _maxHotspotDist;
double _minHotspotPopulation;
std::string _hotSpotDescriptionPattern;
std::string _script0;
std::string _script1;
bool _scriptStyle0;
bool _scriptStyle1;
bool _scriptExportMap0;
bool _scriptExportMap1;
std::string _displayCommentID;
std::string _displayCommentDefault;
bool _displayComment;
std::string _displayEventCommentID;
std::string _displayEventCommentDefault;
bool _displayEventComment;
//typedef std::vector< std::pair<Seiscomp::DataModel::StationPtr, double> > StationDistances;
//StationDistances _originStations;
size_t _originStationsIndex;
std::set<std::string> _visibleMagnitudes;
};
}
}
#endif // of EVENTSUMMARYVIEW_H

View File

@ -0,0 +1,66 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_IMPORTPICKS_H
#define SEISCOMP_GUI_IMPORTPICKS_H
#include <QtGui>
#include <seiscomp/gui/datamodel/ui_importpicks.h>
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API ImportPicksDialog : public QDialog {
Q_OBJECT
public:
enum Selection {
LatestOrigin,
LatestAutomaticOrigin,
MaxPhaseOrigin,
AllOrigins
};
public:
ImportPicksDialog(QWidget * parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
Selection currentSelection() const;
bool importAllPicks() const;
bool importAllPhases() const;
bool preferTargetPhases() const;
private:
::Ui::ImportPicks _ui;
static Selection _lastSelection;
};
}
}
#endif

View File

@ -0,0 +1,126 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_INVENTORYLISTVIEW_H
#define SEISCOMP_GUI_INVENTORYLISTVIEW_H
#include <QTreeWidget>
#include <QStack>
#include <QMap>
#ifndef Q_MOC_RUN
#include <seiscomp/datamodel/object.h>
#endif
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace DataModel {
class Network;
class Station;
class Stream;
class Component;
}
namespace Gui {
class SC_GUI_API InventoryListView : public QTreeWidget,
public DataModel::Visitor {
Q_OBJECT
public:
InventoryListView(QWidget *parent, Qt::WindowFlags f = Qt::WindowFlags());
bool selectStream(const QString& streamID, bool);
void selectStreams(const QString&, bool);
QStringList selectedStreams() const;
void expandNetworks();
protected:
bool visit(DataModel::PublicObject*);
void visit(DataModel::Object*);
void finished();
signals:
void streamChanged(QString, bool);
public slots:
void clearSelection();
void setNonSelectedHidden(bool);
private slots:
void onItemChanged(QTreeWidgetItem *item, int column);
void onItemPressed(QTreeWidgetItem *item, int column);
private:
void updateChildSelection(QTreeWidgetItem *item);
void updateParentSelection(QTreeWidgetItem *item);
void setNonSelectedHidden(QTreeWidgetItem*, bool);
template <typename T>
QTreeWidgetItem* add(T*);
template <typename T>
QTreeWidgetItem* add(QTreeWidgetItem* parent, T*);
template <typename T>
QTreeWidgetItem* create(T* object);
QTreeWidgetItem* createDefaultItem();
QTreeWidgetItem* insert(DataModel::Object*);
void setRow(QTreeWidgetItem*,
const QString& first,
const QString& second = "",
const QString& third = "");
void notifyAboutStateChange(const QString& streamID, bool state, bool hightPriority = false);
private:
QStack<QTreeWidgetItem*> _itemStack;
typedef QMap<QChar, QTreeWidgetItem*> ComponentMap;
typedef QMap<QString, ComponentMap> StreamMap;
typedef QMap<QString, StreamMap> StationMap;
typedef QMap<QString, StationMap> NetworkMap;
typedef QMap<QString, QTreeWidgetItem*> StreamItems;
StreamItems _streamItems;
QTreeWidgetItem* _highestChangedItem;
};
}
}
#endif

View File

@ -0,0 +1,60 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_LOCATORSETTINGS_H
#define SEISCOMP_GUI_LOCATORSETTINGS_H
#include <QtGui>
#include <seiscomp/gui/datamodel/ui_locatorsettings.h>
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API LocatorSettings : public QDialog {
Q_OBJECT
public:
typedef QList< QPair<QString,QString> > ContentList;
public:
LocatorSettings(QWidget * parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
public:
void addRow(const QString &name, const QString &value);
void lastRowAdded();
ContentList content() const;
private:
::Ui::LocatorSettings _ui;
};
}
}
#endif

View File

@ -0,0 +1,137 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_MAGLISTVIEW_H
#define SEISCOMP_GUI_MAGLISTVIEW_H
#include <QtGui>
#include <seiscomp/gui/core/connectiondialog.h>
#include <seiscomp/gui/datamodel/ui_maglistview.h>
#ifndef Q_MOC_RUN
#include <seiscomp/core/baseobject.h>
#include <seiscomp/datamodel/magnitude.h>
#endif
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace DataModel {
DEFINE_SMARTPOINTER(Event);
DEFINE_SMARTPOINTER(Origin);
DEFINE_SMARTPOINTER(Pick);
DEFINE_SMARTPOINTER(Station);
class DatabaseQuery;
class Notifier;
}
namespace Client {
DEFINE_SMARTPOINTER(Connection);
}
namespace Gui {
class SC_GUI_API MagListView : public QWidget {
Q_OBJECT
// ------------------------------------------------------------------
// Public types
// ------------------------------------------------------------------
public:
typedef QMap<QString, DataModel::StationPtr> StationMap;
// ------------------------------------------------------------------
// X'truction
// ------------------------------------------------------------------
public:
MagListView(Seiscomp::DataModel::DatabaseQuery* reader,
bool withOrigins = true,
QWidget * parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
~MagListView();
signals:
void originAdded();
void netMagAdded();
void netMagSelected(Seiscomp::DataModel::Magnitude*,
Seiscomp::DataModel::Origin* = nullptr,
Seiscomp::DataModel::Event* = nullptr);
void originSelected(Seiscomp::DataModel::Origin*,
Seiscomp::DataModel::Event* = nullptr);
void eventSelected(Seiscomp::DataModel::Event*);
void originUpdated(Seiscomp::DataModel::Origin*);
public slots:
void setAutoSelect(bool);
void messageAvailable(Seiscomp::Core::Message*);
void notifierAvailable(Seiscomp::DataModel::Notifier*);
void expandEventItem(QTreeWidgetItem* eventItem, int col);
void expandOriginItem(QTreeWidgetItem* originItem, int col);
protected slots:
void itemSelected(QTreeWidgetItem*,int);
void readFromDatabase();
void clear();
//! HACK
void onShowAll();
private:
void initTree();
QTreeWidgetItem* addEvent(Seiscomp::DataModel::Event*);
QTreeWidgetItem* addOrigin(Seiscomp::DataModel::Origin*, bool bold, QTreeWidgetItem* parent = nullptr);
QTreeWidgetItem* addNetMag(Seiscomp::DataModel::Magnitude*, bool bold, QTreeWidgetItem* parent = nullptr);
QTreeWidgetItem* findEvent(const std::string&);
QTreeWidgetItem* findOrigin(const std::string&);
QTreeWidgetItem* findNetMag(const std::string&);
void readPicks(Seiscomp::DataModel::Origin*);
private:
::Ui::OriginListView _ui;
QTreeWidgetItem* _unassociatedEventItem;
QVector<DataModel::PickPtr> _associatedPicks;
//StationMap _associatedStations;
Seiscomp::DataModel::DatabaseQuery* _reader;
bool _autoSelect;
bool _withOrigins;
bool _blockSelection;
bool _readLock;
};
}
}
#endif

View File

@ -0,0 +1,121 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_MAGNITUDEMAP_H
#define SEISCOMP_GUI_MAGNITUDEMAP_H
#include <QtGui>
#include <seiscomp/gui/map/mapwidget.h>
#ifndef Q_MOC_RUN
#include <seiscomp/core/baseobject.h>
#endif
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace DataModel {
DEFINE_SMARTPOINTER(Origin);
DEFINE_SMARTPOINTER(Magnitude);
class StationMagnitude;
DEFINE_SMARTPOINTER(Station);
}
namespace Gui {
namespace Map {
class AnnotationLayer;
}
class SC_GUI_API MagnitudeMap : public MapWidget {
Q_OBJECT
public:
MagnitudeMap(const MapsDesc &maps,
QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
MagnitudeMap(Map::ImageTree* mapTree,
QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
~MagnitudeMap();
//! Sets the maximum distance for stations to be displayed
//! if they are not part of the origin
void setStationsMaxDist(double);
//! Make the station state changeable interactively
//! The default is TRUE
void setStationsInteractive(bool);
void setOrigin(DataModel::Origin* o);
void setMagnitude(DataModel::Magnitude* nm);
void setMagnitudeState(int id, bool state);
void setStationState(const std::string& code, bool state);
void addStationMagnitude(DataModel::StationMagnitude* staMag, int index);
public slots:
void setDrawStations(bool);
void setDrawStationAnnotations(bool);
signals:
void clickedMagnitude(int id);
void clickedStation(const std::string &net, const std::string &code);
void magnitudeChanged(int id, bool state);
void stationChanged(const std::string &code, bool state);
protected:
void mousePressEvent(QMouseEvent*);
void mouseDoubleClickEvent(QMouseEvent*);
private:
void addMagnitude(int stationId, int magId);
void setStationState(int i, bool state);
void setStationResidual(int i, double residual);
void setMagnitudeResidual(int id, double residual);
int findStation(const std::string& stationCode) const;
int addStation(const std::string &net, const std::string &sta);
void sortSymbols();
private:
DataModel::OriginPtr _origin;
Map::Layer *_symbolLayer;
Map::AnnotationLayer *_annotationLayer;
DataModel::MagnitudePtr _magnitude;
QVector<int> _magnitudes;
std::map<std::string, int> _stationCodes;
int _hoverId{-1};
double _stationsMaxDist{-1};
};
}
}
#endif

View File

@ -0,0 +1,353 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_MAGNITUDEVIEW_H
#define SEISCOMP_GUI_MAGNITUDEVIEW_H
#include <QtGui>
#include <seiscomp/gui/datamodel/ui_magnitudeview.h>
#include <seiscomp/gui/datamodel/ui_magnitudeview_filter.h>
#include <seiscomp/gui/datamodel/magnitudemap.h>
#include <seiscomp/gui/map/mapwidget.h>
#include <seiscomp/gui/core/diagramwidget.h>
#include <seiscomp/gui/datamodel/amplitudeview.h>
#include <seiscomp/gui/datamodel/calculateamplitudes.h>
#ifndef Q_MOC_RUN
#include <seiscomp/core/baseobject.h>
#include <seiscomp/datamodel/databasequery.h>
#include <seiscomp/datamodel/publicobjectcache.h>
#include <seiscomp/datamodel/event.h>
#include <seiscomp/datamodel/origin.h>
#include <seiscomp/datamodel/arrival.h>
#include <seiscomp/datamodel/pick.h>
#include <seiscomp/datamodel/station.h>
#include <seiscomp/datamodel/magnitude.h>
#include <seiscomp/datamodel/stationmagnitude.h>
#include <seiscomp/datamodel/amplitude.h>
#endif
#include <set>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API StationMagnitudeModel : public QAbstractTableModel {
Q_OBJECT
public:
StationMagnitudeModel(DataModel::Origin *origin = nullptr,
DataModel::Magnitude *netMag = nullptr,
DataModel::PublicObjectCache *cache = nullptr,
QObject *parent = 0);
void setOrigin(DataModel::Origin *origin,
DataModel::Magnitude *netMag);
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role) const;
QVariant headerData(int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
bool setData(const QModelIndex &index, const QVariant &value,
int role = Qt::EditRole);
bool insertRow(int row, const QModelIndex & parent = QModelIndex());
bool useMagnitude(int row) const;
private:
DataModel::PublicObjectCache *_cache;
DataModel::Origin *_origin;
DataModel::Magnitude *_magnitude;
QVector<Qt::CheckState> _used;
QVector<double> _distance;
QStringList _header;
int _rowCount;
};
class ModelAbstractRowFilter {
public:
MAKEENUM(
CompareOperation,
EVALUES(
Undefined,
Less,
LessEqual,
Equal,
NotEqual,
Greater,
GreaterEqual,
Like
),
ENAMES(
"None",
"Less",
"Less or equal",
"Equal",
"Not equal",
"Greater",
"Greater or equal",
"Like"
)
);
public:
virtual ~ModelAbstractRowFilter() {}
virtual int column() const = 0;
virtual CompareOperation operation() const = 0;
virtual QString value() const = 0;
virtual QString toString() = 0;
virtual bool fromString(const QString &) = 0;
virtual bool passes(QAbstractItemModel *model, int row) = 0;
};
class SC_GUI_API MagnitudeRowFilter : public QDialog {
Q_OBJECT
public:
MagnitudeRowFilter(ModelAbstractRowFilter **filter, QWidget * parent = 0,
Qt::WindowFlags f = Qt::WindowFlags());
virtual void accept();
private slots:
void addFilter();
void removeFilter();
private:
struct Row {
QLayout *layout;
QComboBox *column;
QComboBox *operation;
QLineEdit *value;
};
Row &addRow();
void popRow();
::Ui::MagnitudeRowFilter _ui;
QVector<Row> _rows;
ModelAbstractRowFilter **_filter;
};
class SC_GUI_API MagnitudeView : public QWidget {
Q_OBJECT
public:
typedef std::set<std::pair<DataModel::AmplitudePtr, bool> > AmplitudeSet;
typedef std::set<std::string> StringSet;
public:
MagnitudeView(const MapsDesc &maps,
Seiscomp::DataModel::DatabaseQuery* reader,
QWidget * parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
MagnitudeView(Map::ImageTree* mapTree,
Seiscomp::DataModel::DatabaseQuery* reader,
QWidget * parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
~MagnitudeView();
void setDrawGridLines(bool);
void setComputeMagnitudesSilently(bool);
void setMagnitudeTypeSelectionEnabled(bool);
void setAmplitudeConfig(const AmplitudeView::Config &config);
const AmplitudeView::Config &amplitudeConfig() const;
MapWidget* map() const;
void setPreferredMagnitudeID(const std::string &);
bool setDefaultAggregationType(const std::string &);
signals:
void localAmplitudesAvailable(Seiscomp::DataModel::Origin*, AmplitudeSet*, StringSet*);
void magnitudeUpdated(const QString &, Seiscomp::DataModel::Object*);
void magnitudeRemoved(const QString &, Seiscomp::DataModel::Object*);
void magnitudeSelected(const QString &, Seiscomp::DataModel::Magnitude*);
void requestClose();
public slots:
void drawStations(bool);
void drawStationAnnotations(bool);
void setOrigin(Seiscomp::DataModel::Origin *, Seiscomp::DataModel::Event *);
bool showMagnitude(const std::string &);
void addObject(const QString& parentID, Seiscomp::DataModel::Object*);
void removeObject(const QString& parentID, Seiscomp::DataModel::Object*);
void updateObject(const QString& parentID, Seiscomp::DataModel::Object*);
//! Enables/disabled the rework of magnitudes, default is true
void setReadOnly(bool);
void disableRework();
void computeMagnitudes();
void reload();
private slots:
void objectDestroyed(QObject*);
void magnitudeCreated(Seiscomp::DataModel::Magnitude*);
void amplitudesConfirmed(Seiscomp::DataModel::Origin*, QList<Seiscomp::DataModel::AmplitudePtr>);
void recalculateMagnitude();
void selectChannels();
void selectChannelsWithEdit();
void activateChannels();
void deactivateChannels();
void openWaveforms();
void magnitudesSelected();
void hoverMagnitude(int id);
void selectMagnitude(int id);
void selectStation(const std::string &net, const std::string &code);
void adjustMagnitudeRect(QRectF&);
void tableStationMagnitudesContextMenuRequested(const QPoint &pos);
void tableStationMagnitudesHeaderContextMenuRequested(const QPoint &pos);
void changeMagnitudeState(int id, bool state);
void changeStationState(int id, bool state);
void dataChanged(const QModelIndex&, const QModelIndex&);
void selectPreferredMagnitude(int idx);
void tabStateChanged(int state);
void updateContent();
void closeTab(int idx);
void debugCreateMagRef();
void evaluationStatusChanged(int index);
void magnitudeCommentChanged(QString);
protected:
void closeEvent(QCloseEvent *e);
private:
void init(Seiscomp::DataModel::DatabaseQuery* reader);
void setContent();
void resetContent();
int addMagnitude(Seiscomp::DataModel::Magnitude*);
void addStationMagnitude(Seiscomp::DataModel::StationMagnitude*, int);
void updateMagnitudeLabels();
void updateMinMaxMagnitude();
// for calculating map boundaries from max sta dist
DataModel::Station* getStation(DataModel::Pick* p);
DataModel::Pick* getPick(DataModel::Arrival* a);
void calcMinMax(Seiscomp::DataModel::Origin*, double& latMin, double& latMax, double& lonMin, double& lonMax );
//! returns distance to origin
double addStationMagnitude(DataModel::Magnitude* magnitude,
DataModel::StationMagnitude* stationMagnitude,
double weight);
struct MagnitudeStatus {
MagnitudeStatus(const std::string &t,
const DataModel::Amplitude *a,
Processing::MagnitudeProcessor::Status s,
bool isWarning = false)
: type(t), amplitude(a), status(s), warning(isWarning) {}
std::string type;
const DataModel::Amplitude *amplitude;
Processing::MagnitudeProcessor::Status status;
bool warning;
};
typedef QList<MagnitudeStatus> MagnitudeStats;
DataModel::Magnitude *
computeStationMagnitudes(const std::string &magType,
QList<DataModel::AmplitudePtr> *amps,
MagnitudeStats *errors = nullptr);
void computeMagnitude(DataModel::Magnitude *magnitude, const std::string &aggType);
bool editSelectionFilter();
void resetPreferredMagnitudeSelection();
private:
typedef CalculateAmplitudes::AmplitudeEntry AmplitudeEntry;
typedef CalculateAmplitudes::PickAmplitudeMap PickAmplitudeMap;
typedef Processing::MagnitudeProcessorFactory::ServiceNames AvailableTypes;
Seiscomp::DataModel::DatabaseQuery *_reader;
::Ui::MagnitudeView *_ui;
Map::ImageTreePtr _maptree;
MagnitudeMap *_map;
DiagramWidget *_stamagnitudes;
StationMagnitudeModel _modelStationMagnitudes;
QSortFilterProxyModel *_modelStationMagnitudesProxy;
AmplitudeView::Config _amplitudeConfig;
AmplitudeView *_amplitudeView;
QTabBar *_tabMagnitudes;
DataModel::OriginPtr _origin;
DataModel::EventPtr _event;
DataModel::MagnitudePtr _netMag;
double _minStationMagnitude;
double _maxStationMagnitude;
DataModel::PublicObjectRingBuffer _objCache;
bool _computeMagnitudesSilently;
bool _enableMagnitudeTypeSelection;
OPT(std::string) _defaultMagnitudeAggregation;
PickAmplitudeMap _amplitudes;
std::string _preferredMagnitudeID;
std::vector<std::string> _magnitudeTypes;
std::vector<std::string> _currentMagnitudeTypes;
AvailableTypes *_availableMagTypes;
};
}
}
#endif

View File

@ -0,0 +1,107 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_ORIGINDIALOG_H
#define SEISCOMP_GUI_ORIGINDIALOG_H
#include <ctime>
#include <QDialog>
#include <QDateTime>
#include <QString>
#include <seiscomp/gui/datamodel/ui_origindialog.h>
#include <seiscomp/core/datetime.h>
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API OriginDialog : public QDialog
{
Q_OBJECT
public:
static void SetDefaultDepth(double depth);
static double DefaultDepth();
OriginDialog(QWidget * parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
OriginDialog(double lon, double lat,
QWidget * parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
OriginDialog(double lon, double lat, double dep,
QWidget * parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
~OriginDialog() override;
time_t getTime_t() const;
void setTime(Core::Time t);
double longitude() const;
void setLongitude(double lon);
double latitude() const;
void setLatitude(double lat);
double depth() const;
void setDepth(double dep);
// enable advanced group box
void enableAdvancedOptions(bool enable = true, bool checkable = true);
bool advanced() const;
void setAdvanced(bool checked);
int phaseCount() const;
void setPhaseCount(int count);
double magValue() const;
void setMagValue(double mag);
QString magType() const;
void setMagType(const QString &type);
void setMagTypes(const QStringList &types);
void setSendButtonText(const QString &text);
void loadSettings(const QString &groupName = "OriginDialog");
void saveSettings(const QString &groupName = "OriginDialog");
protected slots:
void onTextEdited(const QString &text);
private:
void init(double lon, double lat, double dep);
private:
static double _defaultDepth;
Ui::OriginDialog _ui;
QStringList _magTypes;
};
} // namespace Gui
} // namespace Seiscomp
#endif

View File

@ -0,0 +1,132 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_ORIGINLOCATORMAP_H
#define SEISCOMP_GUI_ORIGINLOCATORMAP_H
#include <QtGui>
#include <seiscomp/gui/map/mapwidget.h>
#ifndef Q_MOC_RUN
#include <seiscomp/datamodel/origin.h>
#endif
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace DataModel {
DEFINE_SMARTPOINTER(Station);
}
namespace Gui {
namespace Map {
class AnnotationLayer;
}
class OriginSymbol;
class SC_GUI_API OriginLocatorMap : public MapWidget {
Q_OBJECT
public:
OriginLocatorMap(const MapsDesc &maps,
QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
OriginLocatorMap(Map::ImageTree* mapTree,
QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
//! Sets the maximum distance for stations to be displayed
//! if they are not part of the origin
void setStationsMaxDist(double);
//! Make the station state changeable interactively
//! The default is TRUE
void setStationsInteractive(bool);
void setOrigin(DataModel::Origin* o);
bool waveformPropagation() const;
bool drawStations() const;
void setArrivalState(int id, bool state);
void setStationState(const std::string& code, bool state);
void setOriginCreationEnabled(bool enable);
void addLayer(Map::Layer *layer);
public slots:
void setDrawStations(bool);
void setDrawStationLines(bool);
void setDrawStationAnnotations(bool);
void setWaveformPropagation(bool);
signals:
#ifndef Q_MOC_RUN
// This is in particular for Qt 4 where signals are protected by default.
public:
#endif
void hoverArrival(int id);
signals:
void clickedArrival(int id);
void arrivalChanged(int id, bool state);
void clickedStation(const std::string &net, const std::string &code);
void stationChanged(const std::string &stationCode, bool state);
void artificialOriginRequested(const QPointF &epicenter,
const QPoint &dialogPos);
protected:
void mousePressEvent(QMouseEvent*);
void mouseDoubleClickEvent(QMouseEvent*);
void contextMenuEvent(QContextMenuEvent*);
private:
void addArrival();
void setStationState(int i, bool state);
private:
DataModel::OriginPtr _origin;
OriginSymbol *_originSymbol;
Map::Layer *_symbolLayer;
Map::AnnotationLayer *_annotationLayer;
bool _waveformPropagation{false};
bool _enabledCreateOrigin{false};
QVector<int> _arrivals;
std::map<std::string, int> _stationCodes;
double _stationsMaxDist{-1};
};
}
}
#endif

View File

@ -0,0 +1,488 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_ORIGINLOCATORVIEW_H
#define SEISCOMP_GUI_ORIGINLOCATORVIEW_H
#include <seiscomp/gui/core/diagramwidget.h>
#include <seiscomp/gui/datamodel/originlocatormap.h>
#include <seiscomp/gui/datamodel/pickerview.h>
#include <seiscomp/gui/map/mapwidget.h>
#ifndef Q_MOC_RUN
#include <seiscomp/datamodel/databasequery.h>
#include <seiscomp/datamodel/pick.h>
#include <seiscomp/datamodel/amplitude.h>
#include <seiscomp/datamodel/origin.h>
#include <seiscomp/seismology/locatorinterface.h>
#include <seiscomp/core/baseobject.h>
#endif
#include <QAbstractItemModel>
#include <QStyledItemDelegate>
#include <set>
// Ui forward declarations
class QTreeWidgetItem;
namespace Ui {
class OriginLocatorView;
class FilterSettings;
}
namespace Seiscomp {
namespace DataModel {
DEFINE_SMARTPOINTER(Event);
DEFINE_SMARTPOINTER(Arrival);
DEFINE_SMARTPOINTER(Station);
}
namespace Gui {
class PickerView;
class RecordStreamThread;
class SC_GUI_API ArrivalModel : public QAbstractTableModel {
Q_OBJECT
public:
struct Filter {
virtual ~Filter() {}
virtual bool accepts(int row, int idx, DataModel::Arrival *) const = 0;
};
public:
ArrivalModel(DataModel::Origin* origin = nullptr, QObject *parent = 0);
public:
void setDisabledForeground(QColor c) { _disabledForeground = c; }
void setOrigin(DataModel::Origin* origin);
DataModel::Origin *origin() const;
void setRowColor(int row, const QColor&);
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role) const;
QVariant headerData(int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
bool setData(const QModelIndex &index, const QVariant &value,
int role = Qt::EditRole);
void setRowEnabled(int row, bool enabled);
bool isRowEnabled(int row) const;
void setTakeOffAngle(int row, const QVariant &val);
bool useNoArrivals() const;
bool useArrival(int row) const;
void setUseArrival(int row, DataModel::Arrival *arrival);
bool backazimuthUsed(int row) const;
void setBackazimuthUsed(int row, bool enabled);
bool horizontalSlownessUsed(int row) const;
void setHorizontalSlownessUsed(int row, bool enabled);
bool timeUsed(int row) const;
void setTimeUsed(int row, bool enabled);
int usedFlags(int row) const;
private:
static const int F_DISABLED = 1 << 31;
DataModel::Origin *_origin;
QVector<int> _used;
QVector<int> _hoverState;
QVector<QVariant> _takeOffs;
QVector<bool> _enableState;
QVector<QVariant> _backgroundColors;
QColor _disabledForeground;
QStringList _header;
std::string _pickTimeFormat;
};
class SC_GUI_API ArrivalDelegate : public QStyledItemDelegate {
Q_OBJECT
public:
ArrivalDelegate(QWidget *parent = 0);
public:
void paint(QPainter * painter, const QStyleOptionViewItem & option,
const QModelIndex & index) const;
bool editorEvent(QEvent *event, QAbstractItemModel *model,
const QStyleOptionViewItem &option,
const QModelIndex &index);
QSize sizeHint(const QStyleOptionViewItem &option,
const QModelIndex &index) const;
public slots:
bool helpEvent(QHelpEvent *event, QAbstractItemView *view,
const QStyleOptionViewItem &option,
const QModelIndex &index);
private:
int _flags[3];
QString _labels[3];
int _margin;
int _spacing;
int _statusRectWidth;
mutable int _labelWidth;
};
class SC_GUI_API DiagramFilterSettingsDialog : public QDialog {
Q_OBJECT
public:
struct Filter {
virtual ~Filter() {};
virtual bool accepts(DiagramWidget *w, int id) = 0;
};
public:
DiagramFilterSettingsDialog(QWidget *parent = 0);
~DiagramFilterSettingsDialog();
Filter *createFilter() const;
private slots:
void filterChanged(int);
private:
::Ui::FilterSettings *_ui;
};
class SC_GUI_API OriginLocatorPlot : public DiagramWidget {
Q_OBJECT
public:
OriginLocatorPlot(QWidget *parent = 0);
signals:
void focalMechanismCommitted(bool withMT = false,
QPoint pos = QPoint(0, 0));
protected slots:
virtual void linkClicked();
virtual void commitButtonClicked(bool);
virtual void commitWithMTTriggered(bool);
};
class OriginLocatorViewPrivate;
class SC_GUI_API OriginLocatorView : public QWidget {
Q_OBJECT
public:
struct SC_GUI_API Config {
double reductionVelocityP;
bool drawMapLines;
bool drawGridLines;
bool computeMissingTakeOffAngles;
double defaultEventRadius;
Config();
};
typedef std::vector<DataModel::PickPtr> PickList;
typedef std::set<std::pair<DataModel::PickPtr, bool> > PickSet;
typedef std::set<std::pair<DataModel::AmplitudePtr, bool> > AmplitudeSet;
typedef std::set<std::string> StringSet;
typedef std::map<std::string, DataModel::PickPtr> PickMap;
public:
OriginLocatorView(const MapsDesc &maps,
const PickerView::Config &pickerConfig,
QWidget * parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
OriginLocatorView(Map::ImageTree* mapTree,
const PickerView::Config &pickerConfig,
QWidget * parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
~OriginLocatorView();
signals:
void waveformsRequested();
void eventListRequested();
void locatorRequested();
void computeMagnitudesRequested();
void baseEventSet();
void baseEventRejected();
//! When a new origin has been set inside the view this signal
//! is emitted. The bool flag signal whether a new origin has been
//! created or not
void newOriginSet(Seiscomp::DataModel::Origin *newOrigin,
Seiscomp::DataModel::Event *event, bool localOrigin,
bool relocated);
void updatedOrigin(Seiscomp::DataModel::Origin* origin);
void committedOrigin(Seiscomp::DataModel::Origin* origin,
Seiscomp::DataModel::Event* baseEvent,
const Seiscomp::Gui::ObjectChangeList<Seiscomp::DataModel::Pick>& changedPicks,
const std::vector<Seiscomp::DataModel::AmplitudePtr>& newAmplitudes);
void committedFocalMechanism(Seiscomp::DataModel::FocalMechanism *fm,
Seiscomp::DataModel::Event *event,
Seiscomp::DataModel::Origin *origin);
void artificalOriginCreated(Seiscomp::DataModel::Origin*);
void magnitudesAdded(Seiscomp::DataModel::Origin*, Seiscomp::DataModel::Event*);
void undoStateChanged(bool undoState);
void redoStateChanged(bool undoState);
void requestRaise();
public slots:
void clear();
void addObject(const QString& parentID, Seiscomp::DataModel::Object*);
void updateObject(const QString& parentID, Seiscomp::DataModel::Object*);
bool setOrigin(Seiscomp::DataModel::Origin*, Seiscomp::DataModel::Event*, bool = false);
void addPick(Seiscomp::DataModel::Pick*);
void setStationEnabled(const std::string& networkCode,
const std::string& stationCode,
bool state);
void setMagnitudeCalculationEnabled(bool);
void computeMagnitudes();
void magnitudeRemoved(const QString &, Seiscomp::DataModel::Object*);
void magnitudeSelected(const QString &, Seiscomp::DataModel::Magnitude*);
void mergeOrigins(QList<Seiscomp::DataModel::Origin*>);
void setLocalAmplitudes(Seiscomp::DataModel::Origin*, AmplitudeSet*, StringSet*);
void drawStations(bool);
void drawStationAnnotations(bool);
bool undo();
bool redo();
void createArtificialOrigin();
void createArtificialOrigin(const QPointF &epicenter,
const QPoint &dialogPos);
// ----------------------------------------------------------------------
// Public interface
// ----------------------------------------------------------------------
public:
// Scripts
void setScript0(const std::string&);
void setScript1(const std::string&);
// Configuration
void setConfig(const Config&);
const Config &config() const;
/**
* @brief Adds a pick to the internal pick list which will be
* sent along with the origin at commit.
* @param pick The pick to be managed with a smart pointer.
*/
void addLocalPick(Seiscomp::DataModel::Pick *pick);
// Manual picker configuration
void setPickerConfig(const PickerView::Config&);
const PickerView::Config& pickerConfig() const;
// Misc
void setDatabase(Seiscomp::DataModel::DatabaseQuery*);
void setPickerView(PickerView*);
OriginLocatorMap* map() const;
protected:
void closeEvent(QCloseEvent *e);
private slots:
void editComment();
void setOrigin(Seiscomp::DataModel::Origin*);
void setCreatedOrigin(Seiscomp::DataModel::Origin*);
void hoverArrival(int);
void selectArrival(int);
void selectStation(const std::string &, const std::string &);
void residualsSelected();
void adjustResidualsRect(QRectF&);
void selectRow(const QModelIndex&, const QModelIndex&);
void plotTabChanged(int);
void zoomMap();
void mapKeyPressed(QKeyEvent*);
void objectDestroyed(QObject*);
void importArrivals();
void showWaveforms();
void relocate();
void commit(bool associate = true, bool ignoreDefaultEventType = false);
void customCommit();
void commitFocalMechanism(bool withMT = false, QPoint pos = QPoint(0, 0));
void commitWithOptions();
void tableArrivalsContextMenuRequested(const QPoint &pos);
void tableArrivalsHeaderContextMenuRequested(const QPoint &pos);
void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight);
void changeArrival(int,bool);
void changeArrivalEnableState(int,bool);
void artificialOriginRequested(double lat, double lon, double depth, Seiscomp::Core::Time time);
void updateBlinkState();
void locatorProfileChanged(const QString &text);
void locatorChanged(const QString &text);
void configureLocator();
void changePlotFilter();
void runScript0();
void runScript1();
void evalResultAvailable(const QString &originID,
const QString &className,
const QString &script,
const QString &result);
void evalResultError(const QString &originID,
const QString &className,
const QString &script,
int error);
void evaluateOrigin(Seiscomp::DataModel::Origin *org,
Seiscomp::DataModel::Event *event,
bool localOrigin, bool relocated);
private:
struct PhasePickWithFlags {
DataModel::PickPtr pick;
std::string phase;
int flags;
};
void init();
void createArtificialOrigin(const QPointF &epicenter,
double depth,
Seiscomp::Core::Time time,
const QPoint &dialogPos);
void updateOrigin(Seiscomp::DataModel::Origin*);
void updateContent();
void addArrival(int idx, DataModel::Arrival* arrival, const Core::Time &, const QColor&);
void readPicks(Seiscomp::DataModel::Origin*);
bool merge(void *sourcePhases, void *targetPhases, bool checkDuplicates,
bool associateOnly, bool failOnNoNewPhases);
void relocate(std::vector<PhasePickWithFlags>* additionalPicks,
bool associateOnly = false,
bool replaceExistingPhases = false);
void relocate(DataModel::Origin *org,
std::vector<PhasePickWithFlags>* additionalPicks,
bool associateOnly = false,
bool replaceExistingPhases = false,
bool useArrivalTable = true);
void applyNewOrigin(DataModel::Origin *org, bool relocated);
void pushUndo();
void startBlinking(QColor, QWidget *);
void stopBlinking();
void runScript(const QString &script, const QString &name);
void selectArrivals(const ArrivalModel::Filter *f);
void selectArrivals(const ArrivalModel::Filter &f);
void setPlotFilter(DiagramFilterSettingsDialog::Filter *f);
void applyPlotFilter();
bool sendJournal(const std::string &objectID,
const std::string &action,
const std::string &params);
DataModel::Notifier *
createJournal(const std::string &objectID, const std::string &action,
const std::string &params);
void setBaseEvent(DataModel::Event *e);
void resetCustomLabels();
void deleteSelectedArrivals();
void activateSelectedArrivals(Seiscomp::Seismology::LocatorInterface::Flags flags,
bool activate);
void renameArrivals();
void commitWithOptions(const void *options);
private:
OriginLocatorViewPrivate *_d_ptr;
};
inline DataModel::Origin *ArrivalModel::origin() const {
return _origin;
}
inline int ArrivalModel::usedFlags(int row) const {
return _used[row];
}
}
}
#endif

View File

@ -0,0 +1,141 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_ORIGIN_H
#define SEISCOMP_GUI_ORIGIN_H
#include <vector>
#include <string>
#include <QPolygon>
#include <QColor>
#include <QPoint>
#include <QPainter>
#include <seiscomp/gui/qt.h>
#include <seiscomp/gui/map/mapsymbol.h>
#ifndef Q_MOC_RUN
#include <seiscomp/datamodel/origin.h>
#endif
namespace Seiscomp {
namespace Gui {
class Canvas;
class SC_GUI_API OriginSymbol : public Map::Symbol {
public:
OriginSymbol(Map::Decorator* decorator = nullptr);
OriginSymbol(double latitude,
double longitude,
double depth = 0,
Map::Decorator* decorator = nullptr);
public:
void setPreferredMagnitudeValue(double magnitudeValue);
double preferredMagnitudeValue() const;
/**
* @brief Sets the symbol depth and updates the color according
* to scheme.colors.originSymbol.depth.gradient.
* @param depth The depth in km
*/
void setDepth(double depth);
double depth() const;
/**
* @brief Sets the symbol color and therefore overrides what
* a prior call to setDepth has been set. This method was
* added with API version 11.
* @param c The desired color
*/
void setColor(const QColor &c);
/**
* @brief Returns the current color. This method was added with API
* version 11.
* @return The current symbol color.
*/
const QColor &color() const;
/**
* @brief Sets the symbols fill color if filling is enabled. This
* overrides the default fill color set with setDepth.
* This method was added with API version 11.
* @param c The fill color
*/
void setFillColor(const QColor &c);
/**
* @brief Returns the current fill color.
* This method was added with API version 11.
* @return The fill color
*/
const QColor &fillColor() const;
void setFilled(bool val);
bool isFilled() const;
bool isInside(int x, int y) const override;
/**
* @brief Returns the size of an origin symbol in pixel depending on
* the magnitude.
* @param mag The input magnitude
* @return The size in pixels
*/
static int getSize(double mag);
protected:
void customDraw(const Map::Canvas *canvas, QPainter &painter) override;
void init();
void updateSize();
void depthColorCoding();
protected:
QColor _color;
QColor _fillColor;
bool _filled{false};
double _magnitude{0};
double _depth{0};
};
inline const QColor &OriginSymbol::color() const {
return _color;
}
inline const QColor &OriginSymbol::fillColor() const {
return _fillColor;
}
} // namespace Gui
} // namespace Seiscomp
#endif

View File

@ -0,0 +1,52 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_ORIGINTIME_H
#define SEISCOMP_GUI_ORIGINTIME_H
#include <QtGui>
#include <seiscomp/gui/datamodel/ui_origintime.h>
#include <seiscomp/core/datetime.h>
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API OriginTimeDialog : public QDialog {
public:
OriginTimeDialog(double lon, double lat,
Seiscomp::Core::Time time,
QWidget * parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
Seiscomp::Core::Time time() const;
private:
Ui::OriginTimeDialog _ui;
};
}
}
#endif

View File

@ -0,0 +1,109 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_WAVEFORMSETTINGS_H
#define SEISCOMP_GUI_WAVEFORMSETTINGS_H
#include <seiscomp/gui/datamodel/ui_pickersettings.h>
#include <seiscomp/gui/datamodel/pickerview.h>
#include <seiscomp/gui/datamodel/amplitudeview.h>
#include <seiscomp/gui/datamodel/originlocatorview.h>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API PickerSettings : public QDialog {
Q_OBJECT
public:
PickerSettings(const OriginLocatorView::Config &c1,
const PickerView::Config &c2,
const AmplitudeView::Config &c3,
QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
~PickerSettings();
public:
const Ui::PickerSettings &ui() const { return _ui; }
OriginLocatorView::Config locatorConfig() const;
PickerView::Config pickerConfig() const;
AmplitudeView::Config amplitudeConfig() const;
void setSaveEnabled(bool);
bool saveSettings() const;
int exec();
signals:
void saveRequested();
private slots:
void save();
void adjustPreTime(int);
void adjustPostTime(int);
void adjustLength(int);
void adjustPreSlider(const QTime&);
void adjustPostSlider(const QTime&);
void adjustLengthSlider(const QTime&);
void adjustAmplitudePreTime(int);
void adjustAmplitudePostTime(int);
void adjustAmplitudePreSlider(const QTime&);
void adjustAmplitudePostSlider(const QTime&);
void addPickFilter();
void removePickFilter();
void movePickFilterUp();
void movePickFilterDown();
void addAmplitudeFilter();
void removeAmplitudeFilter();
void moveAmplitudeFilterUp();
void moveAmplitudeFilterDown();
private:
Ui::PickerSettings _ui;
bool _saveSettings;
QAbstractListModel *_pickerFilterModel;
QAbstractListModel *_amplitudeFilterModel;
mutable OriginLocatorView::Config _locatorConfig;
mutable PickerView::Config _pickerConfig;
mutable AmplitudeView::Config _amplitudeConfig;
};
}
}
#endif

View File

@ -0,0 +1,633 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_PICKERVIEW_H
#define SEISCOMP_GUI_PICKERVIEW_H
#include <seiscomp/gui/core/recordview.h>
#include <seiscomp/gui/core/connectionstatelabel.h>
#include <seiscomp/gui/core/utils.h>
#ifndef Q_MOC_RUN
#include <seiscomp/io/recordfilter/iirfilter.h>
#include <seiscomp/datamodel/databasequery.h>
#include <seiscomp/datamodel/origin.h>
#include <seiscomp/datamodel/pick.h>
#include <seiscomp/seismology/ttt.h>
#include <seiscomp/math/matrix3.h>
#include <seiscomp/processing/picker.h>
#endif
#include <QActionGroup>
#include <QComboBox>
#include <QPushButton>
#include <QSpinBox>
#include <QMovie>
#include <QSet>
#include <QLabel>
#include <QLineEdit>
#include <QMainWindow>
namespace Seiscomp {
namespace DataModel {
class SensorLocation;
}
namespace Processing {
DEFINE_SMARTPOINTER(AmplitudeProcessor);
}
namespace Gui {
class TimeScale;
class PickerView;
class SpectrumWidget;
namespace PrivatePickerView {
class SC_GUI_API ThreeComponentTrace : public QObject {
Q_OBJECT
public:
ThreeComponentTrace() = default;
~ThreeComponentTrace();
public:
void setTransformationEnabled(bool enable);
void setL2Horizontals(bool);
void setPassThrough(int component, bool enable);
void setRecordWidget(RecordWidget *);
void reset();
void setFilter(RecordWidget::Filter *);
bool transform(int comp = -1, Seiscomp::Record *rec = nullptr);
private slots:
void widgetDestroyed(QObject *obj);
public:
typedef IO::RecordIIRFilter<double> Filter;
// One component
struct Component {
std::string channelCode;
RecordSequence *raw{nullptr};
RecordSequence *transformed{nullptr};
Filter filter{nullptr};
RecordStreamThread *thread{nullptr};
bool passthrough{false};
};
Math::Matrix3d transformation;
Component traces[3];
RecordWidget *widget{nullptr};
bool enableTransformation{false};
bool enableL2Horizontals{false};
};
class SC_GUI_API PickerRecordLabel : public StandardRecordLabel {
Q_OBJECT
public:
PickerRecordLabel(int items=3, QWidget *parent=0, const char* name = 0);
~PickerRecordLabel();
public:
void setConfigState(bool);
void setControlledItem(RecordViewItem *controlledItem);
RecordViewItem *controlledItem() const;
void setLinkedItem(bool sm);
void enabledExpandButton(RecordViewItem *controlledItem);
void disableExpandButton();
void unlink();
bool isLinkedItem() const;
bool isExpanded() const;
void setLabelColor(QColor);
void removeLabelColor();
protected:
void visibilityChanged(bool);
void resizeEvent(QResizeEvent *e);
void paintEvent(QPaintEvent *e);
public slots:
void extentButtonPressed();
private slots:
void enableExpandable(const Seiscomp::Record*);
private:
bool _isLinkedItem;
bool _isExpanded;
QPushButton *_btnExpand;
RecordViewItem *_linkedItem;
bool _hasLabelColor;
QColor _labelColor;
private:
double latitude;
double longitude;
int unit;
QString gainUnit[3];
ThreeComponentTrace data;
Math::Matrix3d orientationZNE;
Math::Matrix3d orientationZRT;
bool hasGotData;
bool isEnabledByConfig;
friend class Gui::PickerView;
};
}
class SC_GUI_API PickerMarkerActionPlugin : public QObject {
public:
virtual ~PickerMarkerActionPlugin() {}
public:
//! Returns the action title as added to the context menu
virtual QString title() const = 0;
virtual bool init(const DataModel::WaveformStreamID &wid,
const Core::Time &time) = 0;
//! Feed a record of the current stream (including all available
//! components)
virtual void setRecords(RecordSequence *seqZ, RecordSequence *seq1, RecordSequence *seq2) = 0;
//! Finalize the action, no more data will be fed a this point
virtual void finalize() = 0;
};
DEFINE_INTERFACE_FACTORY(PickerMarkerActionPlugin);
class SpectrumViewBase : public QWidget {
Q_OBJECT
public:
SpectrumViewBase(QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags())
: QWidget(parent, f) {}
protected slots:
virtual void modeChanged(int) = 0;
virtual void windowFuncChanged(int) = 0;
virtual void windowWidthChanged(double) = 0;
};
class PickerViewPrivate;
class SC_GUI_API PickerView : public QMainWindow {
public:
struct SC_GUI_API Config {
typedef QPair<QString, QString> FilterEntry;
typedef QVector<FilterEntry> FilterList;
typedef QList<QString> StringList;
typedef StringList PhaseList;
struct PhaseGroup {
QString name;
QList<PhaseGroup> childs;
};
typedef QList<PhaseGroup> GroupList;
typedef QPair<float, float> Uncertainty;
typedef QVector<Uncertainty> UncertaintyList;
typedef QMap<QString, UncertaintyList> UncertaintyProfiles;
typedef QPair<QString, QString> ChannelMapItem;
typedef QMultiMap<QString, ChannelMapItem> ChannelMap;
QString recordURL;
ChannelMap channelMap;
FilterList filters;
QString integrationFilter;
bool onlyApplyIntegrationFilterOnce;
GroupList phaseGroups;
PhaseList favouritePhases;
PhaseList showPhases;
UncertaintyProfiles uncertaintyProfiles;
QString uncertaintyProfile;
bool showCrossHair;
bool ignoreUnconfiguredStations;
bool ignoreDisabledStations;
bool loadAllComponents;
bool loadAllPicks;
bool loadStrongMotionData;
bool usePerStreamTimeWindows;
bool limitStations;
bool showAllComponents;
bool hideStationsWithoutData;
bool hideDisabledStations;
int limitStationCount;
double allComponentsMaximumStationDistance;
double defaultAddStationsDistance;
double defaultDepth;
bool removeAutomaticStationPicks;
bool removeAutomaticPicks;
Core::TimeSpan preOffset;
Core::TimeSpan postOffset;
Core::TimeSpan minimumTimeWindow;
double alignmentPosition;
double offsetWindowStart;
double offsetWindowEnd;
QColor timingQualityLow;
QColor timingQualityMedium;
QColor timingQualityHigh;
OPT(double) repickerSignalStart;
OPT(double) repickerSignalEnd;
Config();
void addFilter(const QString &f, const QString &n) {
filters.push_back(QPair<QString, QString>(f, n));
}
void addShowPhase(const QString &ph) {
showPhases.push_back(ph);
}
void getPickPhases(StringList &phases) const;
void getPickPhases(StringList &phases, const QList<PhaseGroup> &groups) const;
};
Q_OBJECT
public:
//! Default c'tor
//! The mode defaults to ringbuffer with a buffer
//! size of 30 minutes
PickerView(QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
//! Creates a RecordView using a time window
PickerView(const Seiscomp::Core::TimeWindow&,
QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
//! Creates a RecordView using a timespan and
//! a ringbuffer
PickerView(const Seiscomp::Core::TimeSpan&,
QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
~PickerView();
public:
bool setConfig(const Config &c, QString *error = nullptr);
void setDatabase(Seiscomp::DataModel::DatabaseQuery*);
void activateFilter(int index);
void setBroadBandCodes(const std::vector<std::string> &codes);
void setStrongMotionCodes(const std::vector<std::string> &codes);
void setAuxiliaryChannels(const std::vector<std::string> &patterns,
double minimumDistance, double maximumDistance);
//! Sets an origin an inserts the traces for each arrival
//! in the view.
bool setOrigin(Seiscomp::DataModel::Origin*,
double relTimeWindowStart,
double relTimeWindowEnd);
//! Sets an origin and keeps all available traces
bool setOrigin(Seiscomp::DataModel::Origin*);
bool hasModifiedPicks() const;
void getChangedPicks(ObjectChangeList<DataModel::Pick> &list) const;
void stop();
void selectTrace(const std::string &, const std::string &);
void selectTrace(const Seiscomp::DataModel::WaveformStreamID &wid);
signals:
void requestArtificialOrigin(double lat, double lon, double depth, Seiscomp::Core::Time time);
void originCreated(Seiscomp::DataModel::Origin*);
void arrivalChanged(int id, bool state);
void arrivalEnableStateChanged(int id, bool state);
public slots:
void setDefaultDisplay();
void applyPicks();
void changeFilter(int);
void changeRotation(int);
void changeUnit(int);
void setArrivalState(int arrivalId, bool state);
void addPick(Seiscomp::DataModel::Pick* pick);
void setStationEnabled(const std::string& networkCode,
const std::string& stationCode,
bool state);
private slots:
void receivedRecord(Seiscomp::Record*);
void updateTraceInfo(RecordViewItem*, const Seiscomp::Record*);
void currentMarkerChanged(Seiscomp::Gui::RecordMarker*);
void apply(QAction*);
void setPickPhase(QAction*);
void alignOnPhase(QAction*);
void onAddedItem(const Seiscomp::Record*, Seiscomp::Gui::RecordViewItem*);
void onSelectedTime(Seiscomp::Core::Time);
void onSelectedTime(Seiscomp::Gui::RecordWidget*, Seiscomp::Core::Time);
void setAlignment(Seiscomp::Core::Time);
void acquisitionFinished();
void handleAcquisitionError(const QString &msg);
void relocate();
void modifyOrigin();
void updateTheoreticalArrivals();
void itemSelected(RecordViewItem*, RecordViewItem*);
void updateMainCursor(RecordWidget*,int);
void updateSubCursor(RecordWidget*,int);
void updateItemLabel(RecordViewItem*, char);
void updateItemRecordState(const Seiscomp::Record*);
void updateRecordValue(Seiscomp::Core::Time);
void showTraceScaleToggled(bool);
void specLogToggled(bool);
void specSmoothToggled(bool);
void specMinValue(double);
void specMaxValue(double);
void specTimeWindow(double);
void specApply();
void limitFilterToZoomTrace(bool);
void showTheoreticalArrivals(bool);
void showUnassociatedPicks(bool);
void showSpectrogram(bool);
void showSpectrum();
void toggleFilter();
void nextFilter();
void previousFilter();
void addNewFilter(const QString&);
void scaleVisibleAmplitudes();
void zoomSelectionHandleMoved(int, double, Qt::KeyboardModifiers);
void zoomSelectionHandleMoveFinished();
void changeScale(double, double);
void changeTimeRange(double, double);
void sortAlphabetically();
void sortByDistance();
void sortByAzimuth();
void sortByResidual();
void sortByPhase(const QString&);
void showAllComponents(bool);
void showZComponent();
void showNComponent();
void showEComponent();
void alignOnOriginTime();
void alignOnPArrivals();
void alignOnSArrivals();
void pickNone(bool);
void pickP(bool);
void pickS(bool);
void scaleAmplUp();
void scaleAmplDown();
void scaleTimeUp();
void scaleTimeDown();
void scaleReset();
void scrollLeft();
void scrollFineLeft();
void scrollRight();
void scrollFineRight();
void automaticRepick();
void gotoNextMarker();
void gotoPreviousMarker();
void createPick();
void setPick();
void confirmPick();
void resetPick();
void deletePick();
void setCurrentRowEnabled(bool);
void setCurrentRowDisabled(bool);
void loadNextStations();
void showUsedStations(bool);
void moveTraces(double offset);
void move(double offset);
void zoom(float factor);
void applyTimeRange(double,double);
void sortByState();
void alignByState();
void componentByState();
void updateLayoutFromState();
void firstConnectionEstablished();
void lastConnectionClosed();
void beginWaitForRecords();
void doWaitForRecords(int value);
void endWaitForRecords();
void showFullscreen(bool);
void enableAutoScale();
void disableAutoScale();
void addStations();
void searchStation();
void search(const QString&);
void nextSearch();
void abortSearchStation();
void setPickPolarity();
void setPickOnset();
void setPickUncertainty();
void openContextMenu(const QPoint &p);
void openRecordContextMenu(const QPoint &p);
void previewUncertainty(QAction *);
void previewUncertainty(double lower, double upper);
void openConnectionInfo(const QPoint &);
void destroyedSpectrumWidget(QObject *);
void ttInterfaceChanged(QString);
void ttTableChanged(QString);
protected:
void showEvent(QShowEvent* event);
RecordLabel* createLabel(RecordViewItem*) const;
private:
void figureOutTravelTimeTable();
void init();
void initPhases();
bool fillTheoreticalArrivals();
bool fillRawPicks();
int loadPicks();
const TravelTime* findPhase(const TravelTimeList &list, const QString &phase, double delta);
RecordViewItem* addStream(const DataModel::SensorLocation *,
const DataModel::WaveformStreamID& streamID,
double distance,
const std::string& text,
bool showDisabled,
bool addTheoreticalArrivals,
const DataModel::Stream *base = nullptr);
RecordViewItem* addRawStream(const DataModel::SensorLocation *,
const DataModel::WaveformStreamID& streamID,
double distance,
const std::string& text,
bool addTheoreticalArrivals,
const DataModel::Stream *base = nullptr);
void queueStream(double dist, const DataModel::WaveformStreamID& streamID, char component);
void setupItem(const char comps[3], RecordViewItem*);
bool addTheoreticalArrivals(RecordViewItem*,
const std::string& netCode,
const std::string& staCode,
const std::string& locCode);
bool addRawPick(Seiscomp::DataModel::Pick*);
void resetState();
void alignOnPhase(const QString&, bool theoretical);
void diffStreamState(Seiscomp::DataModel::Origin* oldOrigin,
Seiscomp::DataModel::Origin* newOrigin);
void updateOriginInformation();
void loadNextStations(float distance);
void setCursorText(const QString&);
void setCursorPos(const Seiscomp::Core::Time&, bool always = false);
void setTimeRange(double, double);
void acquireStreams();
bool applyFilter(RecordViewItem *item = nullptr);
bool applyRotation(RecordViewItem *item, int type);
void updateRecordAxisLabel(RecordViewItem *item);
//! Makes sure that the time range [tmin, tmax] is visible.
//! When the interval is larger than the visible area
//! the time range will be left aligned.
void ensureVisibility(double &tmin, double &tmax);
void ensureVisibility(const Seiscomp::Core::Time &time, int pixelMargin);
void updatePhaseMarker(Seiscomp::Gui::RecordWidget*, const Seiscomp::Core::Time&);
void declareArrival(Seiscomp::Gui::RecordMarker *m, const QString &phase, bool);
void updateUncertaintyHandles(RecordMarker *marker);
void updateCurrentRowState();
void setMarkerState(Seiscomp::Gui::RecordWidget*, bool);
bool setArrivalState(Seiscomp::Gui::RecordWidget* w, int arrivalId, bool state);
void fetchManualPicks(std::vector<RecordMarker*>* marker = nullptr) const;
void showComponent(char componentCode);
void fetchComponent(char componentCode);
void addArrival(Seiscomp::Gui::RecordWidget*, Seiscomp::DataModel::Arrival*, int id);
void addFilter(const QString& name, const QString& filter);
void changeFilter(int, bool force);
void closeThreads();
char currentComponent() const;
void searchByText(const QString &text);
void emitPick(const Processing::Picker *, const Processing::Picker::Result &res);
private:
PickerViewPrivate *_d_ptr;
};
}
}
#define REGISTER_PICKER_MARKER_ACTION(Class, Service) \
Seiscomp::Core::Generic::InterfaceFactory<Seiscomp::Gui::PickerMarkerActionPlugin, Class> __##Class##InterfaceFactory__(Service)
#endif

View File

@ -0,0 +1,59 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_PICKERZOOMFRAME_H
#define SEISCOMP_GUI_PICKERZOOMFRAME_H
#include <QFrame>
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API ZoomRecordFrame : public QFrame {
Q_OBJECT
public:
ZoomRecordFrame(QWidget* parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
protected:
void wheelEvent(QWheelEvent* e);
signals:
void lineDown();
void lineUp();
void verticalZoomIn();
void verticalZoomOut();
void horizontalZoomIn();
void horizontalZoomOut();
};
}
}
#endif

View File

@ -0,0 +1,139 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_DATAMODEL_ORIGINEVALUATOR_H
#define SEISCOMP_GUI_DATAMODEL_ORIGINEVALUATOR_H
#include <list>
#include <QThread>
#include <QMutex>
#include <QHash>
#include <QSet>
#include <QProcess>
#include <QStringList>
#ifndef Q_MOC_RUN
#include <seiscomp/datamodel/databasereader.h>
#endif
namespace Seiscomp {
namespace Gui {
class PublicObjectEvaluator : public QThread {
Q_OBJECT
private:
PublicObjectEvaluator();
public:
static PublicObjectEvaluator &Instance();
bool setDatabaseURI(const char *uri);
//! Adds a job for an publicID of a specific PublicObject type and a
//! script to be called.
//! Multiple calls will increase the reference count of
//! script while removeJob will decrease it. A reference
//! count of 0 removes this script from the job list.
bool append(void *owner, const QString &publicID,
const Core::RTTI& classType, const QString &script);
bool append(void *owner, const QString &publicID,
const Core::RTTI& classType, const QStringList &scripts);
bool prepend(void *owner, const QString &publicID,
const Core::RTTI& classType, const QString &script);
bool prepend(void *owner, const QString &publicID,
const Core::RTTI& classType, const QStringList &scripts);
bool moveToFront(const QString &publicID);
//! Remove a job for an publicID and a script. This decreases
//! the reference count of script if it exists already and removes
//! it when the reference count drops to 0.
bool erase(void *owner, const QString &publicID, const QString &script);
//! Removes all scripts for an publicID and does not check for
//! reference counts.
bool erase(void *owner, const QString &publicID);
int pendingJobs() const;
//! Removes all pending jobs of owner. If owner is set to nullptr
//! all jobs are removed
void clear(void *owner);
//! Does an evaluation. The evaluation is not queued but executed
//! in place,
bool eval(DataModel::PublicObject *po, const QStringList &scripts);
QString errorMsg(int errorCode) const;
protected:
void run();
private:
bool connect();
signals:
void resultAvailable(const QString &publicID, const QString &className,
const QString &script, const QString &result);
void resultError(const QString &publicID, const QString &className,
const QString &script, int errorCode);
private:
// A script which is an owner. If two or more objects
// added the same script then owner is set to nullptr.
typedef QHash<QString,void*> Scripts;
struct Job {
Job(const QString &id, const Core::RTTI &ct)
: publicID(id), classType(ct) {}
QString publicID;
Core::RTTI classType;
Scripts scripts;
};
typedef std::list<Job> JobList;
typedef QHash<QString, JobList::iterator> JobIDMap;
static PublicObjectEvaluator *_instance;
mutable QMutex _mutexJobList;
std::string _databaseURI;
DataModel::DatabaseReader _reader;
JobIDMap _jobIDLookup;
JobList _jobs;
};
}
}
#endif

View File

@ -0,0 +1,82 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_SELECTSTATION_H
#define SEISCOMP_SELECTSTATION_H
#include <QDialog>
#include <QAbstractTableModel>
#ifndef Q_MOC_RUN
#include <seiscomp/core/datetime.h>
#include <seiscomp/datamodel/station.h>
#endif
#include <seiscomp/gui/qt.h>
#include <seiscomp/gui/datamodel/ui_selectstation.h>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API SelectStation : public QDialog {
Q_OBJECT
// ------------------------------------------------------------------
// X'struction
// ------------------------------------------------------------------
public:
explicit SelectStation(Core::Time time, bool ignoreDisabledStations,
QWidget* parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
explicit SelectStation(Core::Time time, bool ignoreDisabledStations,
const QSet<QString> &blackList,
QWidget* parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
~SelectStation();
QList<DataModel::Station*> selectedStations() const;
void setReferenceLocation(double lat, double lon);
// ------------------------------------------------------------------
// Private Interface
// ------------------------------------------------------------------
private slots:
void listMatchingStations(const QString& substr);
private:
void init(Core::Time, bool ignoreDisabledStations,
const QSet<QString> *blackList);
// ------------------------------------------------------------------
// Private data members
// ------------------------------------------------------------------
private:
Ui::SelectStation _ui;
};
} // namespace Gui
} // namespace Seiscomp
#endif

View File

@ -0,0 +1,112 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_STATIONSYMBOL_H
#define SEISCOMP_GUI_STATIONSYMBOL_H
#include <iostream>
#include <string>
#include <vector>
#include <QColor>
#include <seiscomp/datamodel/station.h>
#include <seiscomp/gui/map/mapsymbol.h>
#include <seiscomp/gui/qt.h>
#include <seiscomp/math/coord.h>
// Forward declaration
class QPainter;
namespace Seiscomp {
namespace Gui {
class SC_GUI_API StationSymbol : public Map::Symbol {
public:
StationSymbol(Map::Decorator *decorator = nullptr);
StationSymbol(double latitude,
double longitude,
Map::Decorator *decorator = nullptr);
void setColor(const QColor &color);
const QColor &color() const;
/**
* @brief Sets the color of the outline. The default is black.
* @since 15
* @param color The outline color
*/
void setOutlineColor(const QColor &color);
/**
* @brief Returns the current outline color.
* @since 15
* @return The outline color.
*/
const QColor &outlineColor() const;
void setRadius(int radius);
int radius() const;
void setFrameColor(const QColor &color);
const QColor &frameColor() const;
void setFrameSize(int);
int frameSize() const;
bool isInside(int x, int y) const override;
/**
* @brief Draws the station symbol
* @param canvas The canvas is not being used and can be nullptr
* @param painter The painter to draw with
*/
void customDraw(const Map::Canvas *canvas, QPainter &painter) override;
protected:
QPolygon generateShape(int posX, int posY, int radius);
const QPolygon &stationPolygon() const;
private:
void init();
private:
int _radius;
int _frameSize;
QPolygon _stationPolygon;
QColor _frameColor;
QColor _outlineColor;
QColor _color;
};
} // namespace Gui
} // namespace Seiscomp
#endif

View File

@ -0,0 +1,79 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_FMSYMBOL_H
#define SEISCOMP_GUI_FMSYMBOL_H
#include <seiscomp/gui/core/tensorrenderer.h>
#include <seiscomp/gui/map/mapsymbol.h>
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API TensorSymbol : public Map::Symbol
{
public:
TensorSymbol(const Math::Tensor2Sd &t,
Map::Decorator* decorator = nullptr);
~TensorSymbol();
void setShadingEnabled(bool);
void setDrawConnectorEnabled(bool);
void setBorderColor(QColor);
void setTColor(QColor);
void setPColor(QColor);
void setPosition(QPointF geoPosition);
void setOffset(QPoint offset);
public:
virtual bool isInside(int x, int y) const;
protected:
virtual void customDraw(const Map::Canvas *canvas, QPainter& painter);
void resize(int w, int h);
protected:
TensorRenderer _renderer;
QImage _buffer;
Math::Tensor2Sd _tensor;
Math::Matrix3f _rotation;
QSize _lastSize;
QPoint _offset;
bool _drawLocationConnector;
};
}
}
#endif

View File

@ -0,0 +1,117 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_TTDECORATOR_H
#define SEISCOMP_GUI_TTDECORATOR_H
#include <list>
#include <seiscomp/math/geo.h>
#include <seiscomp/seismology/ttt.h>
#include <seiscomp/datamodel/timequantity.h>
#include <seiscomp/gui/map/mapwidget.h>
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace Gui {
class SC_GUI_API TTDecorator : public Map::Decorator {
// ------------------------------------------------------------------
// Nested Types
// ------------------------------------------------------------------
private:
typedef std::vector<double> TravelTimes;
enum Direction { NORTH_SOUTH, EAST_WEST };
// ------------------------------------------------------------------
// X'struction
// ------------------------------------------------------------------
public:
TTDecorator(Map::Decorator *decorator = nullptr);
void setPreferredMagnitudeValue(double val);
double longitude() const;
void setLongitude(double longitude);
double latitude() const;
void setLatitude(double latitude);
double depth() const;
void setDepth(double depth);
const DataModel::TimeQuantity& originTime() const;
void setOriginTime(const DataModel::TimeQuantity& time);
// ------------------------------------------------------------------
// Protected Interface
// ------------------------------------------------------------------
protected:
virtual void customDraw(const Map::Canvas *canvas, QPainter& painter);
// ------------------------------------------------------------------
// Private Interface
// ------------------------------------------------------------------
private:
void computeTTT(TravelTimes& travelTimes, const std::string& phase,
double phaseDistance);
double computeTTTPolygon(const std::vector<double>& travelTimes,
std::vector<QPointF>& polygon);
void drawPolygon(const Map::Canvas *canvas, QPainter& painter,
const std::vector<QPointF>& polygon);
void annotatePropagation(const Map::Canvas *canvas, QPainter& painter,
double distance, Direction direction);
// ----------------------------------------------------------------------
// Private data members
// ----------------------------------------------------------------------
private:
std::vector<QPointF> _polygonP;
std::vector<QPointF> _polygonS;
TravelTimeTable _ttTable;
TravelTimes _travelTimesP;
TravelTimes _travelTimesS;
int _deltaDepth;
double _maxPDistance;
double _maxSDistance;
double _pDistance;
int _deltaDist;
int _rotDelta;
double _preferredMagnitudeVal;
double _longitude;
double _latitude;
double _depth;
DataModel::TimeQuantity _originTime;
};
} // namespace Gui
} // namespace Seiscomp
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,218 @@
/********************************************************************************
** Form generated from reading UI file 'calculateamplitudes.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_CALCULATEAMPLITUDES_H
#define UI_CALCULATEAMPLITUDES_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog>
#include <QtWidgets/QFrame>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QTableWidget>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_CalculateAmplitudes
{
public:
QVBoxLayout *vboxLayout;
QHBoxLayout *hboxLayout;
QLabel *label;
QLabel *source;
QFrame *frame;
QHBoxLayout *hboxLayout1;
QLabel *label_2;
QComboBox *comboFilterState;
QSpacerItem *spacerItem;
QLabel *label_3;
QComboBox *comboFilterType;
QTableWidget *table;
QHBoxLayout *hboxLayout2;
QSpacerItem *spacerItem1;
QPushButton *btnOK;
QPushButton *btnCancel;
void setupUi(QDialog *CalculateAmplitudes)
{
if (CalculateAmplitudes->objectName().isEmpty())
CalculateAmplitudes->setObjectName(QString::fromUtf8("CalculateAmplitudes"));
CalculateAmplitudes->resize(645, 624);
vboxLayout = new QVBoxLayout(CalculateAmplitudes);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
hboxLayout->setContentsMargins(0, 0, 0, 0);
#endif
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
label = new QLabel(CalculateAmplitudes);
label->setObjectName(QString::fromUtf8("label"));
QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(label->sizePolicy().hasHeightForWidth());
label->setSizePolicy(sizePolicy);
hboxLayout->addWidget(label);
source = new QLabel(CalculateAmplitudes);
source->setObjectName(QString::fromUtf8("source"));
QSizePolicy sizePolicy1(QSizePolicy::Ignored, QSizePolicy::Preferred);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(source->sizePolicy().hasHeightForWidth());
source->setSizePolicy(sizePolicy1);
hboxLayout->addWidget(source);
vboxLayout->addLayout(hboxLayout);
frame = new QFrame(CalculateAmplitudes);
frame->setObjectName(QString::fromUtf8("frame"));
frame->setFrameShape(QFrame::HLine);
frame->setFrameShadow(QFrame::Plain);
vboxLayout->addWidget(frame);
hboxLayout1 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout1->setSpacing(6);
#endif
hboxLayout1->setContentsMargins(0, 0, 0, 0);
hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
label_2 = new QLabel(CalculateAmplitudes);
label_2->setObjectName(QString::fromUtf8("label_2"));
hboxLayout1->addWidget(label_2);
comboFilterState = new QComboBox(CalculateAmplitudes);
comboFilterState->addItem(QString());
comboFilterState->addItem(QString());
comboFilterState->addItem(QString());
comboFilterState->addItem(QString());
comboFilterState->setObjectName(QString::fromUtf8("comboFilterState"));
hboxLayout1->addWidget(comboFilterState);
spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout1->addItem(spacerItem);
label_3 = new QLabel(CalculateAmplitudes);
label_3->setObjectName(QString::fromUtf8("label_3"));
hboxLayout1->addWidget(label_3);
comboFilterType = new QComboBox(CalculateAmplitudes);
comboFilterType->setObjectName(QString::fromUtf8("comboFilterType"));
QSizePolicy sizePolicy2(QSizePolicy::Maximum, QSizePolicy::Fixed);
sizePolicy2.setHorizontalStretch(0);
sizePolicy2.setVerticalStretch(0);
sizePolicy2.setHeightForWidth(comboFilterType->sizePolicy().hasHeightForWidth());
comboFilterType->setSizePolicy(sizePolicy2);
hboxLayout1->addWidget(comboFilterType);
vboxLayout->addLayout(hboxLayout1);
table = new QTableWidget(CalculateAmplitudes);
if (table->columnCount() < 4)
table->setColumnCount(4);
QTableWidgetItem *__qtablewidgetitem = new QTableWidgetItem();
table->setHorizontalHeaderItem(0, __qtablewidgetitem);
QTableWidgetItem *__qtablewidgetitem1 = new QTableWidgetItem();
table->setHorizontalHeaderItem(1, __qtablewidgetitem1);
QTableWidgetItem *__qtablewidgetitem2 = new QTableWidgetItem();
table->setHorizontalHeaderItem(2, __qtablewidgetitem2);
QTableWidgetItem *__qtablewidgetitem3 = new QTableWidgetItem();
table->setHorizontalHeaderItem(3, __qtablewidgetitem3);
table->setObjectName(QString::fromUtf8("table"));
vboxLayout->addWidget(table);
hboxLayout2 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout2->setSpacing(6);
#endif
hboxLayout2->setContentsMargins(0, 0, 0, 0);
hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
spacerItem1 = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout2->addItem(spacerItem1);
btnOK = new QPushButton(CalculateAmplitudes);
btnOK->setObjectName(QString::fromUtf8("btnOK"));
hboxLayout2->addWidget(btnOK);
btnCancel = new QPushButton(CalculateAmplitudes);
btnCancel->setObjectName(QString::fromUtf8("btnCancel"));
hboxLayout2->addWidget(btnCancel);
vboxLayout->addLayout(hboxLayout2);
retranslateUi(CalculateAmplitudes);
QObject::connect(btnCancel, SIGNAL(clicked()), CalculateAmplitudes, SLOT(reject()));
QObject::connect(btnOK, SIGNAL(clicked()), CalculateAmplitudes, SLOT(accept()));
QMetaObject::connectSlotsByName(CalculateAmplitudes);
} // setupUi
void retranslateUi(QDialog *CalculateAmplitudes)
{
CalculateAmplitudes->setWindowTitle(QCoreApplication::translate("CalculateAmplitudes", "Measure amplitudes", nullptr));
label->setText(QCoreApplication::translate("CalculateAmplitudes", "Source:", nullptr));
source->setText(QCoreApplication::translate("CalculateAmplitudes", "TextLabel", nullptr));
label_2->setText(QCoreApplication::translate("CalculateAmplitudes", "State:", nullptr));
comboFilterState->setItemText(0, QCoreApplication::translate("CalculateAmplitudes", "- Any -", nullptr));
comboFilterState->setItemText(1, QCoreApplication::translate("CalculateAmplitudes", "Success", nullptr));
comboFilterState->setItemText(2, QCoreApplication::translate("CalculateAmplitudes", "Error", nullptr));
comboFilterState->setItemText(3, QCoreApplication::translate("CalculateAmplitudes", "Progress", nullptr));
label_3->setText(QCoreApplication::translate("CalculateAmplitudes", "Type:", nullptr));
QTableWidgetItem *___qtablewidgetitem = table->horizontalHeaderItem(0);
___qtablewidgetitem->setText(QCoreApplication::translate("CalculateAmplitudes", "Stream", nullptr));
QTableWidgetItem *___qtablewidgetitem1 = table->horizontalHeaderItem(1);
___qtablewidgetitem1->setText(QCoreApplication::translate("CalculateAmplitudes", "Type", nullptr));
QTableWidgetItem *___qtablewidgetitem2 = table->horizontalHeaderItem(2);
___qtablewidgetitem2->setText(QCoreApplication::translate("CalculateAmplitudes", "Value", nullptr));
QTableWidgetItem *___qtablewidgetitem3 = table->horizontalHeaderItem(3);
___qtablewidgetitem3->setText(QCoreApplication::translate("CalculateAmplitudes", "Progress", nullptr));
btnOK->setText(QCoreApplication::translate("CalculateAmplitudes", "OK", nullptr));
btnCancel->setText(QCoreApplication::translate("CalculateAmplitudes", "Cancel", nullptr));
} // retranslateUi
};
namespace Ui {
class CalculateAmplitudes: public Ui_CalculateAmplitudes {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_CALCULATEAMPLITUDES_H

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,338 @@
/********************************************************************************
** Form generated from reading UI file 'eventfilterwidget.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_EVENTFILTERWIDGET_H
#define UI_EVENTFILTERWIDGET_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QFrame>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QToolButton>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
#include "seiscomp/gui/core/optionaldoublespinbox.h"
QT_BEGIN_NAMESPACE
class Ui_EventFilter
{
public:
QVBoxLayout *vboxLayout;
QGridLayout *gridLayout;
Seiscomp::Gui::OptionalDoubleSpinBox *toLatitude;
QFrame *frame;
Seiscomp::Gui::OptionalDoubleSpinBox *fromMagnitude;
QLabel *label_4;
QLabel *label_15;
Seiscomp::Gui::OptionalDoubleSpinBox *toLongitude;
Seiscomp::Gui::OptionalDoubleSpinBox *fromDepth;
QFrame *frame_2;
QLabel *label;
Seiscomp::Gui::OptionalDoubleSpinBox *toDepth;
QLabel *label_5;
QFrame *frame_3;
QLabel *label_14;
QLabel *label_11;
QLabel *label_8;
QLabel *label_10;
QLabel *label_12;
QLabel *label_9;
Seiscomp::Gui::OptionalDoubleSpinBox *fromLatitude;
QLabel *label_6;
QLabel *label_7;
Seiscomp::Gui::OptionalDoubleSpinBox *toMagnitude;
Seiscomp::Gui::OptionalDoubleSpinBox *fromLongitude;
QLabel *label_13;
QFrame *frame_4;
QLineEdit *editEventID;
QFrame *frame_5;
QToolButton *btnReset;
void setupUi(QWidget *EventFilter)
{
if (EventFilter->objectName().isEmpty())
EventFilter->setObjectName(QString::fromUtf8("EventFilter"));
EventFilter->resize(407, 419);
vboxLayout = new QVBoxLayout(EventFilter);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
gridLayout = new QGridLayout();
#ifndef Q_OS_MAC
gridLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
gridLayout->setContentsMargins(0, 0, 0, 0);
#endif
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
toLatitude = new Seiscomp::Gui::OptionalDoubleSpinBox(EventFilter);
toLatitude->setObjectName(QString::fromUtf8("toLatitude"));
toLatitude->setDecimals(4);
toLatitude->setMaximum(90.000000000000000);
toLatitude->setMinimum(-90.000000000000000);
toLatitude->setValue(-90.000000000000000);
gridLayout->addWidget(toLatitude, 3, 3, 1, 1);
frame = new QFrame(EventFilter);
frame->setObjectName(QString::fromUtf8("frame"));
frame->setFrameShape(QFrame::HLine);
frame->setFrameShadow(QFrame::Sunken);
gridLayout->addWidget(frame, 4, 0, 1, 4);
fromMagnitude = new Seiscomp::Gui::OptionalDoubleSpinBox(EventFilter);
fromMagnitude->setObjectName(QString::fromUtf8("fromMagnitude"));
fromMagnitude->setDecimals(1);
fromMagnitude->setMaximum(20.000000000000000);
fromMagnitude->setMinimum(-10.000000000000000);
fromMagnitude->setSingleStep(0.500000000000000);
fromMagnitude->setValue(-10.000000000000000);
gridLayout->addWidget(fromMagnitude, 12, 1, 1, 1);
label_4 = new QLabel(EventFilter);
label_4->setObjectName(QString::fromUtf8("label_4"));
QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(label_4->sizePolicy().hasHeightForWidth());
label_4->setSizePolicy(sizePolicy);
gridLayout->addWidget(label_4, 0, 0, 1, 1);
label_15 = new QLabel(EventFilter);
label_15->setObjectName(QString::fromUtf8("label_15"));
gridLayout->addWidget(label_15, 12, 2, 1, 1);
toLongitude = new Seiscomp::Gui::OptionalDoubleSpinBox(EventFilter);
toLongitude->setObjectName(QString::fromUtf8("toLongitude"));
toLongitude->setDecimals(4);
toLongitude->setMaximum(180.000000000000000);
toLongitude->setMinimum(-180.000000000000000);
toLongitude->setValue(-180.000000000000000);
gridLayout->addWidget(toLongitude, 6, 3, 1, 1);
fromDepth = new Seiscomp::Gui::OptionalDoubleSpinBox(EventFilter);
fromDepth->setObjectName(QString::fromUtf8("fromDepth"));
fromDepth->setMaximum(999.000000000000000);
fromDepth->setMinimum(-999.000000000000000);
fromDepth->setValue(-999.000000000000000);
gridLayout->addWidget(fromDepth, 9, 1, 1, 1);
frame_2 = new QFrame(EventFilter);
frame_2->setObjectName(QString::fromUtf8("frame_2"));
frame_2->setFrameShape(QFrame::HLine);
frame_2->setFrameShadow(QFrame::Sunken);
gridLayout->addWidget(frame_2, 7, 0, 1, 4);
label = new QLabel(EventFilter);
label->setObjectName(QString::fromUtf8("label"));
gridLayout->addWidget(label, 2, 0, 1, 4);
toDepth = new Seiscomp::Gui::OptionalDoubleSpinBox(EventFilter);
toDepth->setObjectName(QString::fromUtf8("toDepth"));
toDepth->setMaximum(999.000000000000000);
toDepth->setMinimum(-999.000000000000000);
toDepth->setValue(-999.000000000000000);
gridLayout->addWidget(toDepth, 9, 3, 1, 1);
label_5 = new QLabel(EventFilter);
label_5->setObjectName(QString::fromUtf8("label_5"));
QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(label_5->sizePolicy().hasHeightForWidth());
label_5->setSizePolicy(sizePolicy1);
label_5->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_5, 3, 0, 1, 1);
frame_3 = new QFrame(EventFilter);
frame_3->setObjectName(QString::fromUtf8("frame_3"));
frame_3->setFrameShape(QFrame::HLine);
frame_3->setFrameShadow(QFrame::Sunken);
gridLayout->addWidget(frame_3, 10, 0, 1, 4);
label_14 = new QLabel(EventFilter);
label_14->setObjectName(QString::fromUtf8("label_14"));
label_14->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_14, 12, 0, 1, 1);
label_11 = new QLabel(EventFilter);
label_11->setObjectName(QString::fromUtf8("label_11"));
label_11->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_11, 9, 0, 1, 1);
label_8 = new QLabel(EventFilter);
label_8->setObjectName(QString::fromUtf8("label_8"));
label_8->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_8, 6, 0, 1, 1);
label_10 = new QLabel(EventFilter);
label_10->setObjectName(QString::fromUtf8("label_10"));
gridLayout->addWidget(label_10, 8, 0, 1, 4);
label_12 = new QLabel(EventFilter);
label_12->setObjectName(QString::fromUtf8("label_12"));
gridLayout->addWidget(label_12, 9, 2, 1, 1);
label_9 = new QLabel(EventFilter);
label_9->setObjectName(QString::fromUtf8("label_9"));
gridLayout->addWidget(label_9, 6, 2, 1, 1);
fromLatitude = new Seiscomp::Gui::OptionalDoubleSpinBox(EventFilter);
fromLatitude->setObjectName(QString::fromUtf8("fromLatitude"));
fromLatitude->setDecimals(4);
fromLatitude->setMaximum(90.000000000000000);
fromLatitude->setMinimum(-90.000000000000000);
fromLatitude->setValue(-90.000000000000000);
gridLayout->addWidget(fromLatitude, 3, 1, 1, 1);
label_6 = new QLabel(EventFilter);
label_6->setObjectName(QString::fromUtf8("label_6"));
sizePolicy.setHeightForWidth(label_6->sizePolicy().hasHeightForWidth());
label_6->setSizePolicy(sizePolicy);
gridLayout->addWidget(label_6, 3, 2, 1, 1);
label_7 = new QLabel(EventFilter);
label_7->setObjectName(QString::fromUtf8("label_7"));
gridLayout->addWidget(label_7, 5, 0, 1, 4);
toMagnitude = new Seiscomp::Gui::OptionalDoubleSpinBox(EventFilter);
toMagnitude->setObjectName(QString::fromUtf8("toMagnitude"));
toMagnitude->setDecimals(1);
toMagnitude->setMaximum(20.000000000000000);
toMagnitude->setMinimum(-10.000000000000000);
toMagnitude->setSingleStep(0.500000000000000);
toMagnitude->setValue(-10.000000000000000);
gridLayout->addWidget(toMagnitude, 12, 3, 1, 1);
fromLongitude = new Seiscomp::Gui::OptionalDoubleSpinBox(EventFilter);
fromLongitude->setObjectName(QString::fromUtf8("fromLongitude"));
fromLongitude->setDecimals(4);
fromLongitude->setMaximum(180.000000000000000);
fromLongitude->setMinimum(-180.000000000000000);
fromLongitude->setValue(-180.000000000000000);
gridLayout->addWidget(fromLongitude, 6, 1, 1, 1);
label_13 = new QLabel(EventFilter);
label_13->setObjectName(QString::fromUtf8("label_13"));
gridLayout->addWidget(label_13, 11, 0, 1, 4);
frame_4 = new QFrame(EventFilter);
frame_4->setObjectName(QString::fromUtf8("frame_4"));
frame_4->setFrameShape(QFrame::HLine);
frame_4->setFrameShadow(QFrame::Sunken);
gridLayout->addWidget(frame_4, 1, 0, 1, 4);
editEventID = new QLineEdit(EventFilter);
editEventID->setObjectName(QString::fromUtf8("editEventID"));
gridLayout->addWidget(editEventID, 0, 1, 1, 3);
vboxLayout->addLayout(gridLayout);
frame_5 = new QFrame(EventFilter);
frame_5->setObjectName(QString::fromUtf8("frame_5"));
frame_5->setFrameShape(QFrame::HLine);
frame_5->setFrameShadow(QFrame::Sunken);
vboxLayout->addWidget(frame_5);
btnReset = new QToolButton(EventFilter);
btnReset->setObjectName(QString::fromUtf8("btnReset"));
vboxLayout->addWidget(btnReset);
QWidget::setTabOrder(fromLatitude, toLatitude);
QWidget::setTabOrder(toLatitude, fromLongitude);
QWidget::setTabOrder(fromLongitude, toLongitude);
QWidget::setTabOrder(toLongitude, fromDepth);
QWidget::setTabOrder(fromDepth, toDepth);
QWidget::setTabOrder(toDepth, fromMagnitude);
QWidget::setTabOrder(fromMagnitude, toMagnitude);
retranslateUi(EventFilter);
QMetaObject::connectSlotsByName(EventFilter);
} // setupUi
void retranslateUi(QWidget *EventFilter)
{
EventFilter->setWindowTitle(QCoreApplication::translate("EventFilter", "Filter Settings", nullptr));
toLatitude->setSpecialValueText(QCoreApplication::translate("EventFilter", "Unset", nullptr));
toLatitude->setSuffix(QCoreApplication::translate("EventFilter", "\302\260", nullptr));
fromMagnitude->setSpecialValueText(QCoreApplication::translate("EventFilter", "Unset", nullptr));
label_4->setText(QCoreApplication::translate("EventFilter", "Event ID", nullptr));
label_15->setText(QCoreApplication::translate("EventFilter", "to", nullptr));
toLongitude->setSpecialValueText(QCoreApplication::translate("EventFilter", "Unset", nullptr));
toLongitude->setSuffix(QCoreApplication::translate("EventFilter", "\302\260", nullptr));
fromDepth->setSpecialValueText(QCoreApplication::translate("EventFilter", "Unset", nullptr));
fromDepth->setSuffix(QCoreApplication::translate("EventFilter", "km", nullptr));
label->setText(QCoreApplication::translate("EventFilter", "Latitude range", nullptr));
toDepth->setSpecialValueText(QCoreApplication::translate("EventFilter", "Unset", nullptr));
toDepth->setSuffix(QCoreApplication::translate("EventFilter", "km", nullptr));
label_5->setText(QCoreApplication::translate("EventFilter", "from", nullptr));
label_14->setText(QCoreApplication::translate("EventFilter", "from", nullptr));
label_11->setText(QCoreApplication::translate("EventFilter", "from", nullptr));
label_8->setText(QCoreApplication::translate("EventFilter", "from", nullptr));
label_10->setText(QCoreApplication::translate("EventFilter", "Depth range", nullptr));
label_12->setText(QCoreApplication::translate("EventFilter", "to", nullptr));
label_9->setText(QCoreApplication::translate("EventFilter", "to", nullptr));
fromLatitude->setSpecialValueText(QCoreApplication::translate("EventFilter", "Unset", nullptr));
fromLatitude->setSuffix(QCoreApplication::translate("EventFilter", "\302\260", nullptr));
label_6->setText(QCoreApplication::translate("EventFilter", "to", nullptr));
label_7->setText(QCoreApplication::translate("EventFilter", "Longitude range", nullptr));
toMagnitude->setSpecialValueText(QCoreApplication::translate("EventFilter", "Unset", nullptr));
fromLongitude->setSpecialValueText(QCoreApplication::translate("EventFilter", "Unset", nullptr));
fromLongitude->setSuffix(QCoreApplication::translate("EventFilter", "\302\260", nullptr));
label_13->setText(QCoreApplication::translate("EventFilter", "Magnitude range", nullptr));
#if QT_CONFIG(tooltip)
editEventID->setToolTip(QCoreApplication::translate("EventFilter", "EventID filter which allows wildcards (* and ?)", nullptr));
#endif // QT_CONFIG(tooltip)
btnReset->setText(QCoreApplication::translate("EventFilter", "Reset all", nullptr));
} // retranslateUi
};
namespace Ui {
class EventFilter: public Ui_EventFilter {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_EVENTFILTERWIDGET_H

View File

@ -0,0 +1,379 @@
/********************************************************************************
** Form generated from reading UI file 'eventlistview.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_EVENTLISTVIEW_H
#define UI_EVENTLISTVIEW_H
#include <QtCore/QVariant>
#include <QtGui/QIcon>
#include <QtWidgets/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QDateTimeEdit>
#include <QtWidgets/QFrame>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QSpinBox>
#include <QtWidgets/QToolButton>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_EventListView
{
public:
QAction *actionCopyRowToClipboard;
QVBoxLayout *vboxLayout;
QFrame *frameList;
QFrame *frameControls;
QVBoxLayout *vboxLayout1;
QHBoxLayout *hboxLayout;
QToolButton *btnClear;
QToolButton *btnFilter;
QSpacerItem *spacerItem;
QLabel *label_3;
QSpinBox *spinBox;
QToolButton *btnReadDays;
QSpacerItem *spacerItem1;
QLabel *label;
QDateTimeEdit *dateTimeEditStart;
QLabel *label_2;
QDateTimeEdit *dateTimeEditEnd;
QToolButton *btnReadInterval;
QFrame *frameCustomControls;
QFrame *frame;
QHBoxLayout *hboxLayout1;
QCheckBox *cbHideOther;
QSpacerItem *spacerItem2;
QCheckBox *cbHideForeign;
QSpacerItem *spacerItem3;
QCheckBox *cbShowLatestOnly;
QSpacerItem *spacerItem4;
QHBoxLayout *hboxLayout2;
QFrame *frameRegionFilter;
QHBoxLayout *hboxLayout3;
QCheckBox *cbFilterRegions;
QComboBox *cbFilterRegionMode;
QComboBox *lstFilterRegions;
QToolButton *btnChangeRegion;
QLabel *lbFilterRegions;
QSpacerItem *spacerItem5;
void setupUi(QWidget *EventListView)
{
if (EventListView->objectName().isEmpty())
EventListView->setObjectName(QString::fromUtf8("EventListView"));
EventListView->resize(802, 710);
actionCopyRowToClipboard = new QAction(EventListView);
actionCopyRowToClipboard->setObjectName(QString::fromUtf8("actionCopyRowToClipboard"));
vboxLayout = new QVBoxLayout(EventListView);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
vboxLayout->setContentsMargins(0, 0, 0, 0);
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
frameList = new QFrame(EventListView);
frameList->setObjectName(QString::fromUtf8("frameList"));
QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(2);
sizePolicy.setHeightForWidth(frameList->sizePolicy().hasHeightForWidth());
frameList->setSizePolicy(sizePolicy);
frameList->setFrameShape(QFrame::NoFrame);
frameList->setFrameShadow(QFrame::Plain);
vboxLayout->addWidget(frameList);
frameControls = new QFrame(EventListView);
frameControls->setObjectName(QString::fromUtf8("frameControls"));
frameControls->setFrameShadow(QFrame::Plain);
vboxLayout1 = new QVBoxLayout(frameControls);
#ifndef Q_OS_MAC
vboxLayout1->setSpacing(6);
#endif
vboxLayout1->setContentsMargins(0, 0, 0, 0);
vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1"));
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
hboxLayout->setContentsMargins(0, 0, 0, 0);
#endif
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
btnClear = new QToolButton(frameControls);
btnClear->setObjectName(QString::fromUtf8("btnClear"));
btnClear->setEnabled(false);
QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Fixed);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(btnClear->sizePolicy().hasHeightForWidth());
btnClear->setSizePolicy(sizePolicy1);
hboxLayout->addWidget(btnClear);
btnFilter = new QToolButton(frameControls);
btnFilter->setObjectName(QString::fromUtf8("btnFilter"));
sizePolicy1.setHeightForWidth(btnFilter->sizePolicy().hasHeightForWidth());
btnFilter->setSizePolicy(sizePolicy1);
const QIcon icon = QIcon(QString::fromUtf8(":/icons/icons/filter2.png"));
btnFilter->setIcon(icon);
hboxLayout->addWidget(btnFilter);
spacerItem = new QSpacerItem(16, 29, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout->addItem(spacerItem);
label_3 = new QLabel(frameControls);
label_3->setObjectName(QString::fromUtf8("label_3"));
QSizePolicy sizePolicy2(QSizePolicy::Maximum, QSizePolicy::Preferred);
sizePolicy2.setHorizontalStretch(0);
sizePolicy2.setVerticalStretch(0);
sizePolicy2.setHeightForWidth(label_3->sizePolicy().hasHeightForWidth());
label_3->setSizePolicy(sizePolicy2);
hboxLayout->addWidget(label_3);
spinBox = new QSpinBox(frameControls);
spinBox->setObjectName(QString::fromUtf8("spinBox"));
QSizePolicy sizePolicy3(QSizePolicy::Preferred, QSizePolicy::Fixed);
sizePolicy3.setHorizontalStretch(0);
sizePolicy3.setVerticalStretch(0);
sizePolicy3.setHeightForWidth(spinBox->sizePolicy().hasHeightForWidth());
spinBox->setSizePolicy(sizePolicy3);
spinBox->setMinimum(1);
hboxLayout->addWidget(spinBox);
btnReadDays = new QToolButton(frameControls);
btnReadDays->setObjectName(QString::fromUtf8("btnReadDays"));
QSizePolicy sizePolicy4(QSizePolicy::Maximum, QSizePolicy::Fixed);
sizePolicy4.setHorizontalStretch(0);
sizePolicy4.setVerticalStretch(0);
sizePolicy4.setHeightForWidth(btnReadDays->sizePolicy().hasHeightForWidth());
btnReadDays->setSizePolicy(sizePolicy4);
btnReadDays->setMinimumSize(QSize(50, 0));
hboxLayout->addWidget(btnReadDays);
spacerItem1 = new QSpacerItem(16, 29, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout->addItem(spacerItem1);
label = new QLabel(frameControls);
label->setObjectName(QString::fromUtf8("label"));
sizePolicy2.setHeightForWidth(label->sizePolicy().hasHeightForWidth());
label->setSizePolicy(sizePolicy2);
hboxLayout->addWidget(label);
dateTimeEditStart = new QDateTimeEdit(frameControls);
dateTimeEditStart->setObjectName(QString::fromUtf8("dateTimeEditStart"));
dateTimeEditStart->setCurrentSection(QDateTimeEdit::YearSection);
hboxLayout->addWidget(dateTimeEditStart);
label_2 = new QLabel(frameControls);
label_2->setObjectName(QString::fromUtf8("label_2"));
sizePolicy2.setHeightForWidth(label_2->sizePolicy().hasHeightForWidth());
label_2->setSizePolicy(sizePolicy2);
hboxLayout->addWidget(label_2);
dateTimeEditEnd = new QDateTimeEdit(frameControls);
dateTimeEditEnd->setObjectName(QString::fromUtf8("dateTimeEditEnd"));
dateTimeEditEnd->setCurrentSection(QDateTimeEdit::YearSection);
hboxLayout->addWidget(dateTimeEditEnd);
btnReadInterval = new QToolButton(frameControls);
btnReadInterval->setObjectName(QString::fromUtf8("btnReadInterval"));
sizePolicy4.setHeightForWidth(btnReadInterval->sizePolicy().hasHeightForWidth());
btnReadInterval->setSizePolicy(sizePolicy4);
btnReadInterval->setMinimumSize(QSize(50, 0));
hboxLayout->addWidget(btnReadInterval);
vboxLayout1->addLayout(hboxLayout);
vboxLayout->addWidget(frameControls);
frameCustomControls = new QFrame(EventListView);
frameCustomControls->setObjectName(QString::fromUtf8("frameCustomControls"));
frameCustomControls->setFrameShape(QFrame::NoFrame);
frameCustomControls->setFrameShadow(QFrame::Plain);
vboxLayout->addWidget(frameCustomControls);
frame = new QFrame(EventListView);
frame->setObjectName(QString::fromUtf8("frame"));
frame->setFrameShape(QFrame::HLine);
frame->setFrameShadow(QFrame::Raised);
vboxLayout->addWidget(frame);
hboxLayout1 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout1->setSpacing(6);
#endif
hboxLayout1->setContentsMargins(0, 0, 0, 0);
hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
cbHideOther = new QCheckBox(EventListView);
cbHideOther->setObjectName(QString::fromUtf8("cbHideOther"));
cbHideOther->setChecked(true);
hboxLayout1->addWidget(cbHideOther);
spacerItem2 = new QSpacerItem(16, 23, QSizePolicy::Minimum, QSizePolicy::Minimum);
hboxLayout1->addItem(spacerItem2);
cbHideForeign = new QCheckBox(EventListView);
cbHideForeign->setObjectName(QString::fromUtf8("cbHideForeign"));
cbHideForeign->setChecked(false);
hboxLayout1->addWidget(cbHideForeign);
spacerItem3 = new QSpacerItem(16, 23, QSizePolicy::Minimum, QSizePolicy::Minimum);
hboxLayout1->addItem(spacerItem3);
cbShowLatestOnly = new QCheckBox(EventListView);
cbShowLatestOnly->setObjectName(QString::fromUtf8("cbShowLatestOnly"));
hboxLayout1->addWidget(cbShowLatestOnly);
spacerItem4 = new QSpacerItem(144, 23, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout1->addItem(spacerItem4);
vboxLayout->addLayout(hboxLayout1);
hboxLayout2 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout2->setSpacing(6);
#endif
hboxLayout2->setContentsMargins(0, 0, 0, 0);
hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
frameRegionFilter = new QFrame(EventListView);
frameRegionFilter->setObjectName(QString::fromUtf8("frameRegionFilter"));
frameRegionFilter->setFrameShape(QFrame::NoFrame);
frameRegionFilter->setFrameShadow(QFrame::Raised);
hboxLayout3 = new QHBoxLayout(frameRegionFilter);
#ifndef Q_OS_MAC
hboxLayout3->setSpacing(6);
#endif
hboxLayout3->setContentsMargins(0, 0, 0, 0);
hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3"));
cbFilterRegions = new QCheckBox(frameRegionFilter);
cbFilterRegions->setObjectName(QString::fromUtf8("cbFilterRegions"));
hboxLayout3->addWidget(cbFilterRegions);
cbFilterRegionMode = new QComboBox(frameRegionFilter);
cbFilterRegionMode->addItem(QString());
cbFilterRegionMode->addItem(QString());
cbFilterRegionMode->setObjectName(QString::fromUtf8("cbFilterRegionMode"));
hboxLayout3->addWidget(cbFilterRegionMode);
lstFilterRegions = new QComboBox(frameRegionFilter);
lstFilterRegions->setObjectName(QString::fromUtf8("lstFilterRegions"));
hboxLayout3->addWidget(lstFilterRegions);
btnChangeRegion = new QToolButton(frameRegionFilter);
btnChangeRegion->setObjectName(QString::fromUtf8("btnChangeRegion"));
hboxLayout3->addWidget(btnChangeRegion);
lbFilterRegions = new QLabel(frameRegionFilter);
lbFilterRegions->setObjectName(QString::fromUtf8("lbFilterRegions"));
hboxLayout3->addWidget(lbFilterRegions);
hboxLayout2->addWidget(frameRegionFilter);
spacerItem5 = new QSpacerItem(351, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout2->addItem(spacerItem5);
vboxLayout->addLayout(hboxLayout2);
retranslateUi(EventListView);
QMetaObject::connectSlotsByName(EventListView);
} // setupUi
void retranslateUi(QWidget *EventListView)
{
EventListView->setWindowTitle(QCoreApplication::translate("EventListView", "Event List", nullptr));
actionCopyRowToClipboard->setText(QCoreApplication::translate("EventListView", "copyRowToClipboard", nullptr));
#if QT_CONFIG(shortcut)
actionCopyRowToClipboard->setShortcut(QCoreApplication::translate("EventListView", "Ctrl+C", nullptr));
#endif // QT_CONFIG(shortcut)
#if QT_CONFIG(tooltip)
btnClear->setToolTip(QCoreApplication::translate("EventListView", "Removes all events from the list", nullptr));
#endif // QT_CONFIG(tooltip)
btnClear->setText(QCoreApplication::translate("EventListView", "Clear list", nullptr));
#if QT_CONFIG(tooltip)
btnFilter->setToolTip(QCoreApplication::translate("EventListView", "Configures the server-side event filter", nullptr));
#endif // QT_CONFIG(tooltip)
btnFilter->setText(QCoreApplication::translate("EventListView", "Filter", nullptr));
label_3->setText(QCoreApplication::translate("EventListView", "Last days:", nullptr));
#if QT_CONFIG(tooltip)
btnReadDays->setToolTip(QCoreApplication::translate("EventListView", "Reads the events of the last n days using the \"Last days:\" value", nullptr));
#endif // QT_CONFIG(tooltip)
btnReadDays->setText(QCoreApplication::translate("EventListView", "Read", nullptr));
label->setText(QCoreApplication::translate("EventListView", "From:", nullptr));
dateTimeEditStart->setDisplayFormat(QCoreApplication::translate("EventListView", "yyyy/MM/dd HH:mm:ss", nullptr));
label_2->setText(QCoreApplication::translate("EventListView", "To:", nullptr));
dateTimeEditEnd->setDisplayFormat(QCoreApplication::translate("EventListView", "yyyy/MM/dd HH:mm:ss", nullptr));
#if QT_CONFIG(tooltip)
btnReadInterval->setToolTip(QCoreApplication::translate("EventListView", "Reads the events of the given timespan using the \"From:\" and \"To:\" dates", nullptr));
#endif // QT_CONFIG(tooltip)
btnReadInterval->setText(QCoreApplication::translate("EventListView", "Read", nullptr));
#if QT_CONFIG(tooltip)
cbHideOther->setToolTip(QCoreApplication::translate("EventListView", "Hides/shows events with EventType set to OTHER/NOT_EXISTING", nullptr));
#endif // QT_CONFIG(tooltip)
cbHideOther->setText(QCoreApplication::translate("EventListView", "Hide other/fake events", nullptr));
#if QT_CONFIG(tooltip)
cbHideForeign->setToolTip(QCoreApplication::translate("EventListView", "Hides/shows events from non preferred agencies", nullptr));
#endif // QT_CONFIG(tooltip)
cbHideForeign->setText(QCoreApplication::translate("EventListView", "Show only own events", nullptr));
#if QT_CONFIG(tooltip)
cbShowLatestOnly->setToolTip(QCoreApplication::translate("EventListView", "Enables/disables the display of only one origin per agency (the latest one) or all origins", nullptr));
#endif // QT_CONFIG(tooltip)
cbShowLatestOnly->setText(QCoreApplication::translate("EventListView", "Show only latest/preferred origin per agency", nullptr));
cbFilterRegions->setText(QCoreApplication::translate("EventListView", "Hide events", nullptr));
cbFilterRegionMode->setItemText(0, QCoreApplication::translate("EventListView", "outside", nullptr));
cbFilterRegionMode->setItemText(1, QCoreApplication::translate("EventListView", "inside", nullptr));
btnChangeRegion->setText(QCoreApplication::translate("EventListView", "...", nullptr));
lbFilterRegions->setText(QCoreApplication::translate("EventListView", "region", nullptr));
} // retranslateUi
};
namespace Ui {
class EventListView: public Ui_EventListView {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_EVENTLISTVIEW_H

View File

@ -0,0 +1,306 @@
/********************************************************************************
** Form generated from reading UI file 'eventlistviewregionfilterdialog.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_EVENTLISTVIEWREGIONFILTERDIALOG_H
#define UI_EVENTLISTVIEWREGIONFILTERDIALOG_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QGroupBox>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_EventListViewRegionFilterDialog
{
public:
QVBoxLayout *vboxLayout;
QGroupBox *groupBox;
QGridLayout *gridLayout;
QLabel *label_2;
QLabel *label_6;
QComboBox *cbRegions;
QLabel *label_8;
QLabel *label;
QHBoxLayout *hboxLayout;
QLineEdit *edMaxLon;
QLabel *label_11;
QLabel *label_7;
QHBoxLayout *hboxLayout1;
QLineEdit *edMinLon;
QLabel *label_9;
QHBoxLayout *hboxLayout2;
QLineEdit *edMaxLat;
QLabel *label_10;
QLabel *label_5;
QHBoxLayout *hboxLayout3;
QLineEdit *edMinLat;
QLabel *label_3;
QLabel *label_4;
QLabel *labelPolys;
QComboBox *cbPolys;
QSpacerItem *spacerItem;
QHBoxLayout *hboxLayout4;
QSpacerItem *spacerItem1;
QPushButton *okButton;
QPushButton *cancelButton;
void setupUi(QDialog *EventListViewRegionFilterDialog)
{
if (EventListViewRegionFilterDialog->objectName().isEmpty())
EventListViewRegionFilterDialog->setObjectName(QString::fromUtf8("EventListViewRegionFilterDialog"));
EventListViewRegionFilterDialog->resize(676, 642);
vboxLayout = new QVBoxLayout(EventListViewRegionFilterDialog);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
groupBox = new QGroupBox(EventListViewRegionFilterDialog);
groupBox->setObjectName(QString::fromUtf8("groupBox"));
gridLayout = new QGridLayout(groupBox);
#ifndef Q_OS_MAC
gridLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
gridLayout->setContentsMargins(9, 9, 9, 9);
#endif
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
label_2 = new QLabel(groupBox);
label_2->setObjectName(QString::fromUtf8("label_2"));
gridLayout->addWidget(label_2, 1, 1, 1, 1);
label_6 = new QLabel(groupBox);
label_6->setObjectName(QString::fromUtf8("label_6"));
QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(label_6->sizePolicy().hasHeightForWidth());
label_6->setSizePolicy(sizePolicy);
gridLayout->addWidget(label_6, 1, 0, 1, 1);
cbRegions = new QComboBox(groupBox);
cbRegions->setObjectName(QString::fromUtf8("cbRegions"));
gridLayout->addWidget(cbRegions, 0, 1, 1, 4);
label_8 = new QLabel(groupBox);
label_8->setObjectName(QString::fromUtf8("label_8"));
gridLayout->addWidget(label_8, 1, 3, 1, 1);
label = new QLabel(groupBox);
label->setObjectName(QString::fromUtf8("label"));
sizePolicy.setHeightForWidth(label->sizePolicy().hasHeightForWidth());
label->setSizePolicy(sizePolicy);
gridLayout->addWidget(label, 0, 0, 1, 1);
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
hboxLayout->setContentsMargins(0, 0, 0, 0);
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
edMaxLon = new QLineEdit(groupBox);
edMaxLon->setObjectName(QString::fromUtf8("edMaxLon"));
edMaxLon->setMaxLength(11);
edMaxLon->setAlignment(Qt::AlignRight);
hboxLayout->addWidget(edMaxLon);
label_11 = new QLabel(groupBox);
label_11->setObjectName(QString::fromUtf8("label_11"));
hboxLayout->addWidget(label_11);
gridLayout->addLayout(hboxLayout, 2, 4, 1, 1);
label_7 = new QLabel(groupBox);
label_7->setObjectName(QString::fromUtf8("label_7"));
sizePolicy.setHeightForWidth(label_7->sizePolicy().hasHeightForWidth());
label_7->setSizePolicy(sizePolicy);
gridLayout->addWidget(label_7, 2, 0, 1, 1);
hboxLayout1 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout1->setSpacing(6);
#endif
hboxLayout1->setContentsMargins(0, 0, 0, 0);
hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
edMinLon = new QLineEdit(groupBox);
edMinLon->setObjectName(QString::fromUtf8("edMinLon"));
edMinLon->setMaxLength(11);
edMinLon->setAlignment(Qt::AlignRight);
hboxLayout1->addWidget(edMinLon);
label_9 = new QLabel(groupBox);
label_9->setObjectName(QString::fromUtf8("label_9"));
hboxLayout1->addWidget(label_9);
gridLayout->addLayout(hboxLayout1, 2, 2, 1, 1);
hboxLayout2 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout2->setSpacing(6);
#endif
hboxLayout2->setContentsMargins(0, 0, 0, 0);
hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
edMaxLat = new QLineEdit(groupBox);
edMaxLat->setObjectName(QString::fromUtf8("edMaxLat"));
edMaxLat->setMaxLength(10);
edMaxLat->setAlignment(Qt::AlignRight);
hboxLayout2->addWidget(edMaxLat);
label_10 = new QLabel(groupBox);
label_10->setObjectName(QString::fromUtf8("label_10"));
hboxLayout2->addWidget(label_10);
gridLayout->addLayout(hboxLayout2, 1, 4, 1, 1);
label_5 = new QLabel(groupBox);
label_5->setObjectName(QString::fromUtf8("label_5"));
gridLayout->addWidget(label_5, 2, 3, 1, 1);
hboxLayout3 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout3->setSpacing(6);
#endif
hboxLayout3->setContentsMargins(0, 0, 0, 0);
hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3"));
edMinLat = new QLineEdit(groupBox);
edMinLat->setObjectName(QString::fromUtf8("edMinLat"));
edMinLat->setMaxLength(10);
edMinLat->setAlignment(Qt::AlignRight);
hboxLayout3->addWidget(edMinLat);
label_3 = new QLabel(groupBox);
label_3->setObjectName(QString::fromUtf8("label_3"));
hboxLayout3->addWidget(label_3);
gridLayout->addLayout(hboxLayout3, 1, 2, 1, 1);
label_4 = new QLabel(groupBox);
label_4->setObjectName(QString::fromUtf8("label_4"));
gridLayout->addWidget(label_4, 2, 1, 1, 1);
labelPolys = new QLabel(groupBox);
labelPolys->setObjectName(QString::fromUtf8("labelPolys"));
labelPolys->setEnabled(false);
gridLayout->addWidget(labelPolys, 3, 0, 1, 1);
cbPolys = new QComboBox(groupBox);
cbPolys->setObjectName(QString::fromUtf8("cbPolys"));
cbPolys->setEnabled(false);
gridLayout->addWidget(cbPolys, 3, 1, 1, 4);
vboxLayout->addWidget(groupBox);
spacerItem = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
vboxLayout->addItem(spacerItem);
hboxLayout4 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout4->setSpacing(6);
#endif
hboxLayout4->setContentsMargins(0, 0, 0, 0);
hboxLayout4->setObjectName(QString::fromUtf8("hboxLayout4"));
spacerItem1 = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout4->addItem(spacerItem1);
okButton = new QPushButton(EventListViewRegionFilterDialog);
okButton->setObjectName(QString::fromUtf8("okButton"));
hboxLayout4->addWidget(okButton);
cancelButton = new QPushButton(EventListViewRegionFilterDialog);
cancelButton->setObjectName(QString::fromUtf8("cancelButton"));
hboxLayout4->addWidget(cancelButton);
vboxLayout->addLayout(hboxLayout4);
QWidget::setTabOrder(cbRegions, edMinLat);
QWidget::setTabOrder(edMinLat, edMaxLat);
QWidget::setTabOrder(edMaxLat, edMinLon);
QWidget::setTabOrder(edMinLon, edMaxLon);
QWidget::setTabOrder(edMaxLon, okButton);
QWidget::setTabOrder(okButton, cancelButton);
retranslateUi(EventListViewRegionFilterDialog);
QMetaObject::connectSlotsByName(EventListViewRegionFilterDialog);
} // setupUi
void retranslateUi(QDialog *EventListViewRegionFilterDialog)
{
EventListViewRegionFilterDialog->setWindowTitle(QCoreApplication::translate("EventListViewRegionFilterDialog", "Edit region", nullptr));
groupBox->setTitle(QCoreApplication::translate("EventListViewRegionFilterDialog", "Region", nullptr));
label_2->setText(QCoreApplication::translate("EventListViewRegionFilterDialog", "from", nullptr));
label_6->setText(QCoreApplication::translate("EventListViewRegionFilterDialog", "Latitude range", nullptr));
label_8->setText(QCoreApplication::translate("EventListViewRegionFilterDialog", "to", nullptr));
label->setText(QCoreApplication::translate("EventListViewRegionFilterDialog", "Template", nullptr));
edMaxLon->setText(QString());
label_11->setText(QCoreApplication::translate("EventListViewRegionFilterDialog", "\302\260 ", nullptr));
label_7->setText(QCoreApplication::translate("EventListViewRegionFilterDialog", "Longitude range", nullptr));
edMinLon->setText(QString());
label_9->setText(QCoreApplication::translate("EventListViewRegionFilterDialog", "\302\260 ", nullptr));
edMaxLat->setText(QString());
label_10->setText(QCoreApplication::translate("EventListViewRegionFilterDialog", "\302\260 ", nullptr));
label_5->setText(QCoreApplication::translate("EventListViewRegionFilterDialog", "to", nullptr));
edMinLat->setText(QString());
label_3->setText(QCoreApplication::translate("EventListViewRegionFilterDialog", "\302\260 ", nullptr));
label_4->setText(QCoreApplication::translate("EventListViewRegionFilterDialog", "from", nullptr));
#if QT_CONFIG(tooltip)
labelPolys->setToolTip(QCoreApplication::translate("EventListViewRegionFilterDialog", "If a polygon is selected then it will override the latitude/longitude rect.", nullptr));
#endif // QT_CONFIG(tooltip)
labelPolys->setText(QCoreApplication::translate("EventListViewRegionFilterDialog", "Polygon", nullptr));
okButton->setText(QCoreApplication::translate("EventListViewRegionFilterDialog", "OK", nullptr));
cancelButton->setText(QCoreApplication::translate("EventListViewRegionFilterDialog", "Cancel", nullptr));
} // retranslateUi
};
namespace Ui {
class EventListViewRegionFilterDialog: public Ui_EventListViewRegionFilterDialog {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_EVENTLISTVIEWREGIONFILTERDIALOG_H

View File

@ -0,0 +1,668 @@
/********************************************************************************
** Form generated from reading UI file 'eventsummary.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_EVENTSUMMARY_H
#define UI_EVENTSUMMARY_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QFrame>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_EventSummary
{
public:
QVBoxLayout *vboxLayout;
QLabel *originTime;
QLabel *timeAgo;
QHBoxLayout *hboxLayout;
QLabel *magnitudeText;
QLabel *magnitude;
QLabel *region;
QLabel *nearestCity;
QHBoxLayout *hboxLayout1;
QLabel *depthText;
QLabel *depth;
QHBoxLayout *hboxLayout2;
QLabel *latitude;
QSpacerItem *spacerItem;
QLabel *longitude;
QSpacerItem *spacerItem1;
QLabel *type;
QFrame *map;
QLabel *labelOpComment;
QFrame *labelOpCommentSeparator;
QFrame *magnitudes;
QFrame *separator1;
QLabel *thisLocationText;
QHBoxLayout *hboxLayout3;
QLabel *phaseCountText;
QLabel *phaseCount;
QHBoxLayout *hboxLayout4;
QLabel *azimuthalGapText;
QLabel *azimuthalGap;
QHBoxLayout *hboxLayout5;
QLabel *rmsText;
QLabel *rms;
QHBoxLayout *hboxLayout6;
QLabel *minimumDistanceText;
QLabel *minimumDistance;
QHBoxLayout *hboxLayout7;
QLabel *maximumDistanceText;
QLabel *maximumDistance;
QFrame *separator2;
QHBoxLayout *hboxLayout8;
QLabel *firstLocationText;
QLabel *firstLocation;
QHBoxLayout *hboxLayout9;
QLabel *eventIDText;
QLabel *eventID;
QHBoxLayout *hboxLayout10;
QLabel *originIDText;
QLabel *originID;
QHBoxLayout *hboxLayout11;
QLabel *originIDText_2;
QLabel *agencyID;
QHBoxLayout *hboxLayout12;
QLabel *state;
QLabel *mode;
QFrame *focalMechanism;
QVBoxLayout *vboxLayout1;
QFrame *separator3;
QHBoxLayout *hboxLayout13;
QVBoxLayout *vboxLayout2;
QFrame *frame;
QHBoxLayout *hboxLayout14;
QLabel *momentTensor;
QLabel *label;
QSpacerItem *spacerItem2;
QVBoxLayout *vboxLayout3;
QVBoxLayout *vboxLayout4;
QLabel *mw;
QLabel *fmDepth;
QSpacerItem *spacerItem3;
QSpacerItem *spacerItem4;
QHBoxLayout *hboxLayout15;
QSpacerItem *spacerItem5;
QPushButton *exportButton;
void setupUi(QWidget *EventSummary)
{
if (EventSummary->objectName().isEmpty())
EventSummary->setObjectName(QString::fromUtf8("EventSummary"));
EventSummary->resize(412, 762);
vboxLayout = new QVBoxLayout(EventSummary);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
vboxLayout->setContentsMargins(0, 0, 0, 0);
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
originTime = new QLabel(EventSummary);
originTime->setObjectName(QString::fromUtf8("originTime"));
vboxLayout->addWidget(originTime);
timeAgo = new QLabel(EventSummary);
timeAgo->setObjectName(QString::fromUtf8("timeAgo"));
vboxLayout->addWidget(timeAgo);
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
hboxLayout->setContentsMargins(0, 0, 0, 0);
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
magnitudeText = new QLabel(EventSummary);
magnitudeText->setObjectName(QString::fromUtf8("magnitudeText"));
QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(magnitudeText->sizePolicy().hasHeightForWidth());
magnitudeText->setSizePolicy(sizePolicy);
hboxLayout->addWidget(magnitudeText);
magnitude = new QLabel(EventSummary);
magnitude->setObjectName(QString::fromUtf8("magnitude"));
hboxLayout->addWidget(magnitude);
vboxLayout->addLayout(hboxLayout);
region = new QLabel(EventSummary);
region->setObjectName(QString::fromUtf8("region"));
QSizePolicy sizePolicy1(QSizePolicy::Ignored, QSizePolicy::Preferred);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(region->sizePolicy().hasHeightForWidth());
region->setSizePolicy(sizePolicy1);
vboxLayout->addWidget(region);
nearestCity = new QLabel(EventSummary);
nearestCity->setObjectName(QString::fromUtf8("nearestCity"));
vboxLayout->addWidget(nearestCity);
hboxLayout1 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout1->setSpacing(6);
#endif
hboxLayout1->setContentsMargins(0, 0, 0, 0);
hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
depthText = new QLabel(EventSummary);
depthText->setObjectName(QString::fromUtf8("depthText"));
sizePolicy.setHeightForWidth(depthText->sizePolicy().hasHeightForWidth());
depthText->setSizePolicy(sizePolicy);
hboxLayout1->addWidget(depthText);
depth = new QLabel(EventSummary);
depth->setObjectName(QString::fromUtf8("depth"));
hboxLayout1->addWidget(depth);
vboxLayout->addLayout(hboxLayout1);
hboxLayout2 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout2->setSpacing(6);
#endif
hboxLayout2->setContentsMargins(0, 0, 0, 0);
hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
latitude = new QLabel(EventSummary);
latitude->setObjectName(QString::fromUtf8("latitude"));
hboxLayout2->addWidget(latitude);
spacerItem = new QSpacerItem(2, 5, QSizePolicy::Maximum, QSizePolicy::Minimum);
hboxLayout2->addItem(spacerItem);
longitude = new QLabel(EventSummary);
longitude->setObjectName(QString::fromUtf8("longitude"));
hboxLayout2->addWidget(longitude);
spacerItem1 = new QSpacerItem(2, 5, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout2->addItem(spacerItem1);
vboxLayout->addLayout(hboxLayout2);
type = new QLabel(EventSummary);
type->setObjectName(QString::fromUtf8("type"));
sizePolicy1.setHeightForWidth(type->sizePolicy().hasHeightForWidth());
type->setSizePolicy(sizePolicy1);
vboxLayout->addWidget(type);
map = new QFrame(EventSummary);
map->setObjectName(QString::fromUtf8("map"));
QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy2.setHorizontalStretch(0);
sizePolicy2.setVerticalStretch(0);
sizePolicy2.setHeightForWidth(map->sizePolicy().hasHeightForWidth());
map->setSizePolicy(sizePolicy2);
map->setFrameShape(QFrame::NoFrame);
map->setFrameShadow(QFrame::Plain);
vboxLayout->addWidget(map);
labelOpComment = new QLabel(EventSummary);
labelOpComment->setObjectName(QString::fromUtf8("labelOpComment"));
sizePolicy1.setHeightForWidth(labelOpComment->sizePolicy().hasHeightForWidth());
labelOpComment->setSizePolicy(sizePolicy1);
labelOpComment->setWordWrap(true);
vboxLayout->addWidget(labelOpComment);
labelOpCommentSeparator = new QFrame(EventSummary);
labelOpCommentSeparator->setObjectName(QString::fromUtf8("labelOpCommentSeparator"));
labelOpCommentSeparator->setFrameShape(QFrame::HLine);
labelOpCommentSeparator->setFrameShadow(QFrame::Sunken);
vboxLayout->addWidget(labelOpCommentSeparator);
magnitudes = new QFrame(EventSummary);
magnitudes->setObjectName(QString::fromUtf8("magnitudes"));
magnitudes->setFrameShape(QFrame::NoFrame);
magnitudes->setFrameShadow(QFrame::Plain);
vboxLayout->addWidget(magnitudes);
separator1 = new QFrame(EventSummary);
separator1->setObjectName(QString::fromUtf8("separator1"));
separator1->setFrameShape(QFrame::HLine);
separator1->setFrameShadow(QFrame::Sunken);
vboxLayout->addWidget(separator1);
thisLocationText = new QLabel(EventSummary);
thisLocationText->setObjectName(QString::fromUtf8("thisLocationText"));
vboxLayout->addWidget(thisLocationText);
hboxLayout3 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout3->setSpacing(6);
#endif
hboxLayout3->setContentsMargins(0, 0, 0, 0);
hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3"));
phaseCountText = new QLabel(EventSummary);
phaseCountText->setObjectName(QString::fromUtf8("phaseCountText"));
hboxLayout3->addWidget(phaseCountText);
phaseCount = new QLabel(EventSummary);
phaseCount->setObjectName(QString::fromUtf8("phaseCount"));
hboxLayout3->addWidget(phaseCount);
vboxLayout->addLayout(hboxLayout3);
hboxLayout4 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout4->setSpacing(6);
#endif
hboxLayout4->setContentsMargins(0, 0, 0, 0);
hboxLayout4->setObjectName(QString::fromUtf8("hboxLayout4"));
azimuthalGapText = new QLabel(EventSummary);
azimuthalGapText->setObjectName(QString::fromUtf8("azimuthalGapText"));
hboxLayout4->addWidget(azimuthalGapText);
azimuthalGap = new QLabel(EventSummary);
azimuthalGap->setObjectName(QString::fromUtf8("azimuthalGap"));
hboxLayout4->addWidget(azimuthalGap);
vboxLayout->addLayout(hboxLayout4);
hboxLayout5 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout5->setSpacing(6);
#endif
hboxLayout5->setContentsMargins(0, 0, 0, 0);
hboxLayout5->setObjectName(QString::fromUtf8("hboxLayout5"));
rmsText = new QLabel(EventSummary);
rmsText->setObjectName(QString::fromUtf8("rmsText"));
hboxLayout5->addWidget(rmsText);
rms = new QLabel(EventSummary);
rms->setObjectName(QString::fromUtf8("rms"));
hboxLayout5->addWidget(rms);
vboxLayout->addLayout(hboxLayout5);
hboxLayout6 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout6->setSpacing(6);
#endif
hboxLayout6->setContentsMargins(0, 0, 0, 0);
hboxLayout6->setObjectName(QString::fromUtf8("hboxLayout6"));
minimumDistanceText = new QLabel(EventSummary);
minimumDistanceText->setObjectName(QString::fromUtf8("minimumDistanceText"));
hboxLayout6->addWidget(minimumDistanceText);
minimumDistance = new QLabel(EventSummary);
minimumDistance->setObjectName(QString::fromUtf8("minimumDistance"));
hboxLayout6->addWidget(minimumDistance);
vboxLayout->addLayout(hboxLayout6);
hboxLayout7 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout7->setSpacing(6);
#endif
hboxLayout7->setContentsMargins(0, 0, 0, 0);
hboxLayout7->setObjectName(QString::fromUtf8("hboxLayout7"));
maximumDistanceText = new QLabel(EventSummary);
maximumDistanceText->setObjectName(QString::fromUtf8("maximumDistanceText"));
hboxLayout7->addWidget(maximumDistanceText);
maximumDistance = new QLabel(EventSummary);
maximumDistance->setObjectName(QString::fromUtf8("maximumDistance"));
hboxLayout7->addWidget(maximumDistance);
vboxLayout->addLayout(hboxLayout7);
separator2 = new QFrame(EventSummary);
separator2->setObjectName(QString::fromUtf8("separator2"));
separator2->setFrameShape(QFrame::HLine);
separator2->setFrameShadow(QFrame::Sunken);
vboxLayout->addWidget(separator2);
hboxLayout8 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout8->setSpacing(6);
#endif
hboxLayout8->setContentsMargins(0, 0, 0, 0);
hboxLayout8->setObjectName(QString::fromUtf8("hboxLayout8"));
firstLocationText = new QLabel(EventSummary);
firstLocationText->setObjectName(QString::fromUtf8("firstLocationText"));
hboxLayout8->addWidget(firstLocationText);
firstLocation = new QLabel(EventSummary);
firstLocation->setObjectName(QString::fromUtf8("firstLocation"));
hboxLayout8->addWidget(firstLocation);
vboxLayout->addLayout(hboxLayout8);
hboxLayout9 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout9->setSpacing(6);
#endif
hboxLayout9->setContentsMargins(0, 0, 0, 0);
hboxLayout9->setObjectName(QString::fromUtf8("hboxLayout9"));
eventIDText = new QLabel(EventSummary);
eventIDText->setObjectName(QString::fromUtf8("eventIDText"));
hboxLayout9->addWidget(eventIDText);
eventID = new QLabel(EventSummary);
eventID->setObjectName(QString::fromUtf8("eventID"));
sizePolicy1.setHeightForWidth(eventID->sizePolicy().hasHeightForWidth());
eventID->setSizePolicy(sizePolicy1);
hboxLayout9->addWidget(eventID);
vboxLayout->addLayout(hboxLayout9);
hboxLayout10 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout10->setSpacing(6);
#endif
hboxLayout10->setContentsMargins(0, 0, 0, 0);
hboxLayout10->setObjectName(QString::fromUtf8("hboxLayout10"));
originIDText = new QLabel(EventSummary);
originIDText->setObjectName(QString::fromUtf8("originIDText"));
hboxLayout10->addWidget(originIDText);
originID = new QLabel(EventSummary);
originID->setObjectName(QString::fromUtf8("originID"));
sizePolicy1.setHeightForWidth(originID->sizePolicy().hasHeightForWidth());
originID->setSizePolicy(sizePolicy1);
hboxLayout10->addWidget(originID);
vboxLayout->addLayout(hboxLayout10);
hboxLayout11 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout11->setSpacing(6);
#endif
hboxLayout11->setContentsMargins(0, 0, 0, 0);
hboxLayout11->setObjectName(QString::fromUtf8("hboxLayout11"));
originIDText_2 = new QLabel(EventSummary);
originIDText_2->setObjectName(QString::fromUtf8("originIDText_2"));
hboxLayout11->addWidget(originIDText_2);
agencyID = new QLabel(EventSummary);
agencyID->setObjectName(QString::fromUtf8("agencyID"));
sizePolicy1.setHeightForWidth(agencyID->sizePolicy().hasHeightForWidth());
agencyID->setSizePolicy(sizePolicy1);
hboxLayout11->addWidget(agencyID);
vboxLayout->addLayout(hboxLayout11);
hboxLayout12 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout12->setSpacing(6);
#endif
hboxLayout12->setContentsMargins(0, 0, 0, 0);
hboxLayout12->setObjectName(QString::fromUtf8("hboxLayout12"));
state = new QLabel(EventSummary);
state->setObjectName(QString::fromUtf8("state"));
hboxLayout12->addWidget(state);
mode = new QLabel(EventSummary);
mode->setObjectName(QString::fromUtf8("mode"));
sizePolicy1.setHeightForWidth(mode->sizePolicy().hasHeightForWidth());
mode->setSizePolicy(sizePolicy1);
hboxLayout12->addWidget(mode);
vboxLayout->addLayout(hboxLayout12);
focalMechanism = new QFrame(EventSummary);
focalMechanism->setObjectName(QString::fromUtf8("focalMechanism"));
QSizePolicy sizePolicy3(QSizePolicy::Preferred, QSizePolicy::Minimum);
sizePolicy3.setHorizontalStretch(0);
sizePolicy3.setVerticalStretch(0);
sizePolicy3.setHeightForWidth(focalMechanism->sizePolicy().hasHeightForWidth());
focalMechanism->setSizePolicy(sizePolicy3);
focalMechanism->setMinimumSize(QSize(16, 60));
focalMechanism->setFrameShape(QFrame::NoFrame);
focalMechanism->setFrameShadow(QFrame::Raised);
vboxLayout1 = new QVBoxLayout(focalMechanism);
#ifndef Q_OS_MAC
vboxLayout1->setSpacing(6);
#endif
vboxLayout1->setContentsMargins(0, 0, 0, 0);
vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1"));
separator3 = new QFrame(focalMechanism);
separator3->setObjectName(QString::fromUtf8("separator3"));
separator3->setFrameShape(QFrame::HLine);
separator3->setFrameShadow(QFrame::Sunken);
vboxLayout1->addWidget(separator3);
hboxLayout13 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout13->setSpacing(6);
#endif
hboxLayout13->setContentsMargins(0, 0, 0, 0);
hboxLayout13->setObjectName(QString::fromUtf8("hboxLayout13"));
vboxLayout2 = new QVBoxLayout();
vboxLayout2->setSpacing(0);
#ifndef Q_OS_MAC
vboxLayout2->setContentsMargins(0, 0, 0, 0);
#endif
vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2"));
frame = new QFrame(focalMechanism);
frame->setObjectName(QString::fromUtf8("frame"));
frame->setFrameShape(QFrame::NoFrame);
frame->setFrameShadow(QFrame::Raised);
hboxLayout14 = new QHBoxLayout(frame);
hboxLayout14->setSpacing(0);
hboxLayout14->setContentsMargins(0, 0, 0, 0);
hboxLayout14->setObjectName(QString::fromUtf8("hboxLayout14"));
momentTensor = new QLabel(frame);
momentTensor->setObjectName(QString::fromUtf8("momentTensor"));
momentTensor->setEnabled(true);
QSizePolicy sizePolicy4(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizePolicy4.setHorizontalStretch(0);
sizePolicy4.setVerticalStretch(0);
sizePolicy4.setHeightForWidth(momentTensor->sizePolicy().hasHeightForWidth());
momentTensor->setSizePolicy(sizePolicy4);
momentTensor->setMinimumSize(QSize(42, 42));
momentTensor->setMaximumSize(QSize(42, 42));
momentTensor->setFrameShape(QFrame::NoFrame);
momentTensor->setFrameShadow(QFrame::Sunken);
hboxLayout14->addWidget(momentTensor);
label = new QLabel(frame);
label->setObjectName(QString::fromUtf8("label"));
hboxLayout14->addWidget(label);
vboxLayout2->addWidget(frame);
spacerItem2 = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding);
vboxLayout2->addItem(spacerItem2);
hboxLayout13->addLayout(vboxLayout2);
vboxLayout3 = new QVBoxLayout();
vboxLayout3->setSpacing(0);
vboxLayout3->setContentsMargins(0, 0, 0, 0);
vboxLayout3->setObjectName(QString::fromUtf8("vboxLayout3"));
vboxLayout4 = new QVBoxLayout();
#ifndef Q_OS_MAC
vboxLayout4->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout4->setContentsMargins(0, 0, 0, 0);
#endif
vboxLayout4->setObjectName(QString::fromUtf8("vboxLayout4"));
mw = new QLabel(focalMechanism);
mw->setObjectName(QString::fromUtf8("mw"));
QSizePolicy sizePolicy5(QSizePolicy::Preferred, QSizePolicy::Fixed);
sizePolicy5.setHorizontalStretch(0);
sizePolicy5.setVerticalStretch(0);
sizePolicy5.setHeightForWidth(mw->sizePolicy().hasHeightForWidth());
mw->setSizePolicy(sizePolicy5);
vboxLayout4->addWidget(mw);
fmDepth = new QLabel(focalMechanism);
fmDepth->setObjectName(QString::fromUtf8("fmDepth"));
sizePolicy5.setHeightForWidth(fmDepth->sizePolicy().hasHeightForWidth());
fmDepth->setSizePolicy(sizePolicy5);
vboxLayout4->addWidget(fmDepth);
vboxLayout3->addLayout(vboxLayout4);
spacerItem3 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
vboxLayout3->addItem(spacerItem3);
hboxLayout13->addLayout(vboxLayout3);
vboxLayout1->addLayout(hboxLayout13);
vboxLayout->addWidget(focalMechanism);
spacerItem4 = new QSpacerItem(20, 51, QSizePolicy::Minimum, QSizePolicy::Expanding);
vboxLayout->addItem(spacerItem4);
hboxLayout15 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout15->setSpacing(6);
#endif
hboxLayout15->setContentsMargins(0, 0, 0, 0);
hboxLayout15->setObjectName(QString::fromUtf8("hboxLayout15"));
spacerItem5 = new QSpacerItem(10, 1, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout15->addItem(spacerItem5);
exportButton = new QPushButton(EventSummary);
exportButton->setObjectName(QString::fromUtf8("exportButton"));
exportButton->setIconSize(QSize(46, 32));
hboxLayout15->addWidget(exportButton);
vboxLayout->addLayout(hboxLayout15);
retranslateUi(EventSummary);
QMetaObject::connectSlotsByName(EventSummary);
} // setupUi
void retranslateUi(QWidget *EventSummary)
{
EventSummary->setWindowTitle(QCoreApplication::translate("EventSummary", "Form", nullptr));
originTime->setText(QCoreApplication::translate("EventSummary", "1970/01/01 - 00:00:00", nullptr));
timeAgo->setText(QCoreApplication::translate("EventSummary", "-", nullptr));
magnitudeText->setText(QCoreApplication::translate("EventSummary", "M", nullptr));
magnitude->setText(QCoreApplication::translate("EventSummary", "-", nullptr));
region->setText(QCoreApplication::translate("EventSummary", "...", nullptr));
nearestCity->setText(QCoreApplication::translate("EventSummary", "200 km SW of City XYZ", nullptr));
depthText->setText(QCoreApplication::translate("EventSummary", "Depth", nullptr));
depth->setText(QCoreApplication::translate("EventSummary", "-", nullptr));
latitude->setText(QCoreApplication::translate("EventSummary", "-", nullptr));
longitude->setText(QCoreApplication::translate("EventSummary", "-", nullptr));
type->setText(QString());
labelOpComment->setText(QString());
thisLocationText->setText(QCoreApplication::translate("EventSummary", "Location:", nullptr));
phaseCountText->setText(QCoreApplication::translate("EventSummary", "Phases:", nullptr));
phaseCount->setText(QCoreApplication::translate("EventSummary", "-", nullptr));
azimuthalGapText->setText(QCoreApplication::translate("EventSummary", "Az. Gap:", nullptr));
azimuthalGap->setText(QCoreApplication::translate("EventSummary", "-", nullptr));
rmsText->setText(QCoreApplication::translate("EventSummary", "RMS Res.:", nullptr));
rms->setText(QCoreApplication::translate("EventSummary", "-", nullptr));
minimumDistanceText->setText(QCoreApplication::translate("EventSummary", "Min. Dist.:", nullptr));
minimumDistance->setText(QCoreApplication::translate("EventSummary", "-", nullptr));
maximumDistanceText->setText(QCoreApplication::translate("EventSummary", "Max. Dist.:", nullptr));
maximumDistance->setText(QCoreApplication::translate("EventSummary", "-", nullptr));
firstLocationText->setText(QCoreApplication::translate("EventSummary", "First Location:", nullptr));
firstLocation->setText(QCoreApplication::translate("EventSummary", "-", nullptr));
eventIDText->setText(QCoreApplication::translate("EventSummary", "Event ID:", nullptr));
eventID->setText(QCoreApplication::translate("EventSummary", "-", nullptr));
originIDText->setText(QCoreApplication::translate("EventSummary", "Origin ID:", nullptr));
originID->setText(QCoreApplication::translate("EventSummary", "-", nullptr));
originIDText_2->setText(QCoreApplication::translate("EventSummary", "Agency ID:", nullptr));
agencyID->setText(QCoreApplication::translate("EventSummary", "-", nullptr));
state->setText(QCoreApplication::translate("EventSummary", "-", nullptr));
mode->setText(QCoreApplication::translate("EventSummary", "-", nullptr));
momentTensor->setText(QString());
label->setText(QString());
mw->setText(QCoreApplication::translate("EventSummary", "-", nullptr));
fmDepth->setText(QCoreApplication::translate("EventSummary", "-", nullptr));
#if QT_CONFIG(tooltip)
exportButton->setToolTip(QCoreApplication::translate("EventSummary", "Run configured script with current event", nullptr));
#endif // QT_CONFIG(tooltip)
exportButton->setText(QString());
} // retranslateUi
};
namespace Ui {
class EventSummary: public Ui_EventSummary {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_EVENTSUMMARY_H

View File

@ -0,0 +1,375 @@
/********************************************************************************
** Form generated from reading UI file 'eventsummaryview.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_EVENTSUMMARYVIEW_H
#define UI_EVENTSUMMARYVIEW_H
#include <QtCore/QVariant>
#include <QtWidgets/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QFrame>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_EventSummaryView
{
public:
QAction *actionShowInvisibleMagnitudes;
QHBoxLayout *hboxLayout;
QFrame *frameRegion;
QVBoxLayout *vboxLayout;
QLabel *_lbOriginTime;
QLabel *_lbOriginTimeAutomatic;
QLabel *_lbTimeAgo;
QLabel *_lbRegion;
QLabel *_lbRegionExtra;
QFrame *frameMap;
QFrame *frameHDistance;
QVBoxLayout *vboxLayout1;
QFrame *frameMagnitudes;
QVBoxLayout *vboxLayout2;
QHBoxLayout *hboxLayout1;
QLabel *_lbPreMagType;
QLabel *_lbPreMagVal;
QSpacerItem *spacerItem;
QLabel *labelDepth;
QHBoxLayout *hboxLayout2;
QLabel *labelCustomName;
QLabel *labelCustomValue;
QFrame *frameMagnitudeDistance;
QFrame *frameVDistance;
QFrame *frameEpicenterInformation;
QFrame *frameProcessing;
QHBoxLayout *hboxLayout3;
QPushButton *btnSwitchToAutomatic;
QSpacerItem *spacerItem1;
QPushButton *btnShowDetails;
QFrame *framePlugable;
QHBoxLayout *hboxLayout4;
QPushButton *btnPlugable0;
QSpacerItem *spacerItem2;
QPushButton *btnPlugable1;
void setupUi(QWidget *EventSummaryView)
{
if (EventSummaryView->objectName().isEmpty())
EventSummaryView->setObjectName(QString::fromUtf8("EventSummaryView"));
EventSummaryView->resize(941, 678);
actionShowInvisibleMagnitudes = new QAction(EventSummaryView);
actionShowInvisibleMagnitudes->setObjectName(QString::fromUtf8("actionShowInvisibleMagnitudes"));
actionShowInvisibleMagnitudes->setCheckable(true);
actionShowInvisibleMagnitudes->setChecked(false);
hboxLayout = new QHBoxLayout(EventSummaryView);
hboxLayout->setSpacing(6);
hboxLayout->setContentsMargins(0, 0, 0, 0);
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
frameRegion = new QFrame(EventSummaryView);
frameRegion->setObjectName(QString::fromUtf8("frameRegion"));
QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(5);
sizePolicy.setVerticalStretch(5);
sizePolicy.setHeightForWidth(frameRegion->sizePolicy().hasHeightForWidth());
frameRegion->setSizePolicy(sizePolicy);
frameRegion->setMaximumSize(QSize(16777215, 16777215));
frameRegion->setBaseSize(QSize(0, 0));
frameRegion->setFrameShape(QFrame::NoFrame);
frameRegion->setFrameShadow(QFrame::Raised);
vboxLayout = new QVBoxLayout(frameRegion);
vboxLayout->setSpacing(6);
vboxLayout->setContentsMargins(0, 0, 0, 0);
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
_lbOriginTime = new QLabel(frameRegion);
_lbOriginTime->setObjectName(QString::fromUtf8("_lbOriginTime"));
QSizePolicy sizePolicy1(QSizePolicy::MinimumExpanding, QSizePolicy::Maximum);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(_lbOriginTime->sizePolicy().hasHeightForWidth());
_lbOriginTime->setSizePolicy(sizePolicy1);
vboxLayout->addWidget(_lbOriginTime);
_lbOriginTimeAutomatic = new QLabel(frameRegion);
_lbOriginTimeAutomatic->setObjectName(QString::fromUtf8("_lbOriginTimeAutomatic"));
vboxLayout->addWidget(_lbOriginTimeAutomatic);
_lbTimeAgo = new QLabel(frameRegion);
_lbTimeAgo->setObjectName(QString::fromUtf8("_lbTimeAgo"));
QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Maximum);
sizePolicy2.setHorizontalStretch(0);
sizePolicy2.setVerticalStretch(0);
sizePolicy2.setHeightForWidth(_lbTimeAgo->sizePolicy().hasHeightForWidth());
_lbTimeAgo->setSizePolicy(sizePolicy2);
vboxLayout->addWidget(_lbTimeAgo);
_lbRegion = new QLabel(frameRegion);
_lbRegion->setObjectName(QString::fromUtf8("_lbRegion"));
QSizePolicy sizePolicy3(QSizePolicy::Ignored, QSizePolicy::Maximum);
sizePolicy3.setHorizontalStretch(0);
sizePolicy3.setVerticalStretch(0);
sizePolicy3.setHeightForWidth(_lbRegion->sizePolicy().hasHeightForWidth());
_lbRegion->setSizePolicy(sizePolicy3);
_lbRegion->setScaledContents(false);
vboxLayout->addWidget(_lbRegion);
_lbRegionExtra = new QLabel(frameRegion);
_lbRegionExtra->setObjectName(QString::fromUtf8("_lbRegionExtra"));
vboxLayout->addWidget(_lbRegionExtra);
frameMap = new QFrame(frameRegion);
frameMap->setObjectName(QString::fromUtf8("frameMap"));
QSizePolicy sizePolicy4(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);
sizePolicy4.setHorizontalStretch(1);
sizePolicy4.setVerticalStretch(1);
sizePolicy4.setHeightForWidth(frameMap->sizePolicy().hasHeightForWidth());
frameMap->setSizePolicy(sizePolicy4);
frameMap->setFrameShape(QFrame::StyledPanel);
frameMap->setFrameShadow(QFrame::Sunken);
vboxLayout->addWidget(frameMap);
hboxLayout->addWidget(frameRegion);
frameHDistance = new QFrame(EventSummaryView);
frameHDistance->setObjectName(QString::fromUtf8("frameHDistance"));
QSizePolicy sizePolicy5(QSizePolicy::Maximum, QSizePolicy::Preferred);
sizePolicy5.setHorizontalStretch(0);
sizePolicy5.setVerticalStretch(0);
sizePolicy5.setHeightForWidth(frameHDistance->sizePolicy().hasHeightForWidth());
frameHDistance->setSizePolicy(sizePolicy5);
frameHDistance->setMinimumSize(QSize(8, 16));
frameHDistance->setFrameShape(QFrame::NoFrame);
frameHDistance->setFrameShadow(QFrame::Plain);
hboxLayout->addWidget(frameHDistance);
vboxLayout1 = new QVBoxLayout();
vboxLayout1->setSpacing(6);
vboxLayout1->setContentsMargins(0, 0, 0, 0);
vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1"));
frameMagnitudes = new QFrame(EventSummaryView);
frameMagnitudes->setObjectName(QString::fromUtf8("frameMagnitudes"));
sizePolicy2.setHeightForWidth(frameMagnitudes->sizePolicy().hasHeightForWidth());
frameMagnitudes->setSizePolicy(sizePolicy2);
frameMagnitudes->setMaximumSize(QSize(16777215, 400));
frameMagnitudes->setBaseSize(QSize(0, 0));
frameMagnitudes->setFrameShape(QFrame::StyledPanel);
frameMagnitudes->setFrameShadow(QFrame::Raised);
vboxLayout2 = new QVBoxLayout(frameMagnitudes);
vboxLayout2->setSpacing(4);
vboxLayout2->setContentsMargins(4, 4, 4, 4);
vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2"));
hboxLayout1 = new QHBoxLayout();
hboxLayout1->setSpacing(10);
hboxLayout1->setContentsMargins(0, 0, 0, 0);
hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
_lbPreMagType = new QLabel(frameMagnitudes);
_lbPreMagType->setObjectName(QString::fromUtf8("_lbPreMagType"));
QSizePolicy sizePolicy6(QSizePolicy::Maximum, QSizePolicy::Maximum);
sizePolicy6.setHorizontalStretch(0);
sizePolicy6.setVerticalStretch(0);
sizePolicy6.setHeightForWidth(_lbPreMagType->sizePolicy().hasHeightForWidth());
_lbPreMagType->setSizePolicy(sizePolicy6);
hboxLayout1->addWidget(_lbPreMagType);
_lbPreMagVal = new QLabel(frameMagnitudes);
_lbPreMagVal->setObjectName(QString::fromUtf8("_lbPreMagVal"));
QSizePolicy sizePolicy7(QSizePolicy::Minimum, QSizePolicy::Maximum);
sizePolicy7.setHorizontalStretch(0);
sizePolicy7.setVerticalStretch(0);
sizePolicy7.setHeightForWidth(_lbPreMagVal->sizePolicy().hasHeightForWidth());
_lbPreMagVal->setSizePolicy(sizePolicy7);
hboxLayout1->addWidget(_lbPreMagVal);
spacerItem = new QSpacerItem(20, 5, QSizePolicy::Minimum, QSizePolicy::Minimum);
hboxLayout1->addItem(spacerItem);
labelDepth = new QLabel(frameMagnitudes);
labelDepth->setObjectName(QString::fromUtf8("labelDepth"));
labelDepth->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
hboxLayout1->addWidget(labelDepth);
vboxLayout2->addLayout(hboxLayout1);
hboxLayout2 = new QHBoxLayout();
hboxLayout2->setSpacing(10);
hboxLayout2->setContentsMargins(0, 0, 0, 0);
hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
labelCustomName = new QLabel(frameMagnitudes);
labelCustomName->setObjectName(QString::fromUtf8("labelCustomName"));
sizePolicy5.setHeightForWidth(labelCustomName->sizePolicy().hasHeightForWidth());
labelCustomName->setSizePolicy(sizePolicy5);
hboxLayout2->addWidget(labelCustomName);
labelCustomValue = new QLabel(frameMagnitudes);
labelCustomValue->setObjectName(QString::fromUtf8("labelCustomValue"));
QSizePolicy sizePolicy8(QSizePolicy::Ignored, QSizePolicy::Preferred);
sizePolicy8.setHorizontalStretch(0);
sizePolicy8.setVerticalStretch(0);
sizePolicy8.setHeightForWidth(labelCustomValue->sizePolicy().hasHeightForWidth());
labelCustomValue->setSizePolicy(sizePolicy8);
hboxLayout2->addWidget(labelCustomValue);
vboxLayout2->addLayout(hboxLayout2);
frameMagnitudeDistance = new QFrame(frameMagnitudes);
frameMagnitudeDistance->setObjectName(QString::fromUtf8("frameMagnitudeDistance"));
frameMagnitudeDistance->setFrameShape(QFrame::NoFrame);
frameMagnitudeDistance->setFrameShadow(QFrame::Raised);
vboxLayout2->addWidget(frameMagnitudeDistance);
vboxLayout1->addWidget(frameMagnitudes);
frameVDistance = new QFrame(EventSummaryView);
frameVDistance->setObjectName(QString::fromUtf8("frameVDistance"));
frameVDistance->setMinimumSize(QSize(8, 8));
frameVDistance->setFrameShape(QFrame::NoFrame);
frameVDistance->setFrameShadow(QFrame::Plain);
vboxLayout1->addWidget(frameVDistance);
frameEpicenterInformation = new QFrame(EventSummaryView);
frameEpicenterInformation->setObjectName(QString::fromUtf8("frameEpicenterInformation"));
QSizePolicy sizePolicy9(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);
sizePolicy9.setHorizontalStretch(0);
sizePolicy9.setVerticalStretch(0);
sizePolicy9.setHeightForWidth(frameEpicenterInformation->sizePolicy().hasHeightForWidth());
frameEpicenterInformation->setSizePolicy(sizePolicy9);
frameEpicenterInformation->setFrameShape(QFrame::NoFrame);
vboxLayout1->addWidget(frameEpicenterInformation);
frameProcessing = new QFrame(EventSummaryView);
frameProcessing->setObjectName(QString::fromUtf8("frameProcessing"));
frameProcessing->setEnabled(true);
sizePolicy2.setHeightForWidth(frameProcessing->sizePolicy().hasHeightForWidth());
frameProcessing->setSizePolicy(sizePolicy2);
frameProcessing->setFrameShape(QFrame::StyledPanel);
frameProcessing->setFrameShadow(QFrame::Raised);
hboxLayout3 = new QHBoxLayout(frameProcessing);
hboxLayout3->setSpacing(6);
hboxLayout3->setContentsMargins(0, 0, 0, 0);
hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3"));
btnSwitchToAutomatic = new QPushButton(frameProcessing);
btnSwitchToAutomatic->setObjectName(QString::fromUtf8("btnSwitchToAutomatic"));
btnSwitchToAutomatic->setEnabled(false);
hboxLayout3->addWidget(btnSwitchToAutomatic);
spacerItem1 = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout3->addItem(spacerItem1);
btnShowDetails = new QPushButton(frameProcessing);
btnShowDetails->setObjectName(QString::fromUtf8("btnShowDetails"));
btnShowDetails->setEnabled(false);
QSizePolicy sizePolicy10(QSizePolicy::Maximum, QSizePolicy::Fixed);
sizePolicy10.setHorizontalStretch(0);
sizePolicy10.setVerticalStretch(0);
sizePolicy10.setHeightForWidth(btnShowDetails->sizePolicy().hasHeightForWidth());
btnShowDetails->setSizePolicy(sizePolicy10);
hboxLayout3->addWidget(btnShowDetails);
vboxLayout1->addWidget(frameProcessing);
framePlugable = new QFrame(EventSummaryView);
framePlugable->setObjectName(QString::fromUtf8("framePlugable"));
framePlugable->setFrameShape(QFrame::StyledPanel);
framePlugable->setFrameShadow(QFrame::Raised);
hboxLayout4 = new QHBoxLayout(framePlugable);
hboxLayout4->setSpacing(6);
hboxLayout4->setContentsMargins(0, 0, 0, 0);
hboxLayout4->setObjectName(QString::fromUtf8("hboxLayout4"));
btnPlugable0 = new QPushButton(framePlugable);
btnPlugable0->setObjectName(QString::fromUtf8("btnPlugable0"));
btnPlugable0->setEnabled(false);
sizePolicy10.setHeightForWidth(btnPlugable0->sizePolicy().hasHeightForWidth());
btnPlugable0->setSizePolicy(sizePolicy10);
btnPlugable0->setMinimumSize(QSize(0, 0));
hboxLayout4->addWidget(btnPlugable0);
spacerItem2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout4->addItem(spacerItem2);
btnPlugable1 = new QPushButton(framePlugable);
btnPlugable1->setObjectName(QString::fromUtf8("btnPlugable1"));
btnPlugable1->setEnabled(false);
sizePolicy10.setHeightForWidth(btnPlugable1->sizePolicy().hasHeightForWidth());
btnPlugable1->setSizePolicy(sizePolicy10);
btnPlugable1->setMinimumSize(QSize(0, 0));
hboxLayout4->addWidget(btnPlugable1);
vboxLayout1->addWidget(framePlugable);
hboxLayout->addLayout(vboxLayout1);
retranslateUi(EventSummaryView);
QMetaObject::connectSlotsByName(EventSummaryView);
} // setupUi
void retranslateUi(QWidget *EventSummaryView)
{
EventSummaryView->setWindowTitle(QCoreApplication::translate("EventSummaryView", "EventSummaryView", nullptr));
actionShowInvisibleMagnitudes->setText(QCoreApplication::translate("EventSummaryView", "Show invisible magnitudes", nullptr));
#if QT_CONFIG(shortcut)
actionShowInvisibleMagnitudes->setShortcut(QCoreApplication::translate("EventSummaryView", "Ctrl+Alt+Shift+I", nullptr));
#endif // QT_CONFIG(shortcut)
_lbOriginTime->setText(QCoreApplication::translate("EventSummaryView", "0000/00/00 - 00.00.00.000 UTC", nullptr));
_lbOriginTimeAutomatic->setText(QCoreApplication::translate("EventSummaryView", "0000/00/00 - 00.00.00.000 UTC", nullptr));
_lbTimeAgo->setText(QCoreApplication::translate("EventSummaryView", "00 Min. 00 Sec. ago", nullptr));
_lbRegion->setText(QCoreApplication::translate("EventSummaryView", "region", nullptr));
_lbRegionExtra->setText(QCoreApplication::translate("EventSummaryView", "regionInformation", nullptr));
_lbPreMagType->setText(QCoreApplication::translate("EventSummaryView", "mb", nullptr));
_lbPreMagVal->setText(QCoreApplication::translate("EventSummaryView", "---", nullptr));
labelDepth->setText(QCoreApplication::translate("EventSummaryView", "0 km", nullptr));
labelCustomName->setText(QCoreApplication::translate("EventSummaryView", "...", nullptr));
labelCustomValue->setText(QCoreApplication::translate("EventSummaryView", "-", nullptr));
btnSwitchToAutomatic->setText(QCoreApplication::translate("EventSummaryView", "Fix automatic solutions", nullptr));
btnShowDetails->setText(QCoreApplication::translate("EventSummaryView", "Show Details", nullptr));
btnPlugable0->setText(QCoreApplication::translate("EventSummaryView", "Button0", nullptr));
btnPlugable1->setText(QCoreApplication::translate("EventSummaryView", "Button1", nullptr));
} // retranslateUi
};
namespace Ui {
class EventSummaryView: public Ui_EventSummaryView {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_EVENTSUMMARYVIEW_H

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,255 @@
/********************************************************************************
** Form generated from reading UI file 'importpicks.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_IMPORTPICKS_H
#define UI_IMPORTPICKS_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QDialog>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QRadioButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_ImportPicks
{
public:
QVBoxLayout *vboxLayout;
QLabel *label;
QRadioButton *radioLatestOrigin;
QHBoxLayout *hboxLayout;
QSpacerItem *spacerItem;
QLabel *label_2;
QRadioButton *radioLatestAutomaticOrigin;
QHBoxLayout *hboxLayout1;
QSpacerItem *spacerItem1;
QLabel *label_5;
QRadioButton *radioMaxPhaseOrigin;
QHBoxLayout *hboxLayout2;
QSpacerItem *spacerItem2;
QLabel *label_3;
QRadioButton *radioAllOrigins;
QHBoxLayout *hboxLayout3;
QSpacerItem *spacerItem3;
QLabel *label_4;
QSpacerItem *spacerItem4;
QCheckBox *checkAllAgencies;
QCheckBox *checkAllPhases;
QCheckBox *checkPreferTargetPhases;
QHBoxLayout *hboxLayout4;
QSpacerItem *spacerItem5;
QPushButton *okButton;
QPushButton *cancelButton;
void setupUi(QDialog *ImportPicks)
{
if (ImportPicks->objectName().isEmpty())
ImportPicks->setObjectName(QString::fromUtf8("ImportPicks"));
ImportPicks->resize(415, 499);
QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(ImportPicks->sizePolicy().hasHeightForWidth());
ImportPicks->setSizePolicy(sizePolicy);
vboxLayout = new QVBoxLayout(ImportPicks);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
label = new QLabel(ImportPicks);
label->setObjectName(QString::fromUtf8("label"));
label->setWordWrap(true);
vboxLayout->addWidget(label);
radioLatestOrigin = new QRadioButton(ImportPicks);
radioLatestOrigin->setObjectName(QString::fromUtf8("radioLatestOrigin"));
radioLatestOrigin->setChecked(true);
vboxLayout->addWidget(radioLatestOrigin);
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
hboxLayout->setContentsMargins(0, 0, 0, 0);
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
spacerItem = new QSpacerItem(20, 20, QSizePolicy::Fixed, QSizePolicy::Minimum);
hboxLayout->addItem(spacerItem);
label_2 = new QLabel(ImportPicks);
label_2->setObjectName(QString::fromUtf8("label_2"));
label_2->setWordWrap(true);
hboxLayout->addWidget(label_2);
vboxLayout->addLayout(hboxLayout);
radioLatestAutomaticOrigin = new QRadioButton(ImportPicks);
radioLatestAutomaticOrigin->setObjectName(QString::fromUtf8("radioLatestAutomaticOrigin"));
vboxLayout->addWidget(radioLatestAutomaticOrigin);
hboxLayout1 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout1->setSpacing(6);
#endif
hboxLayout1->setContentsMargins(0, 0, 0, 0);
hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
spacerItem1 = new QSpacerItem(20, 20, QSizePolicy::Fixed, QSizePolicy::Minimum);
hboxLayout1->addItem(spacerItem1);
label_5 = new QLabel(ImportPicks);
label_5->setObjectName(QString::fromUtf8("label_5"));
label_5->setWordWrap(true);
hboxLayout1->addWidget(label_5);
vboxLayout->addLayout(hboxLayout1);
radioMaxPhaseOrigin = new QRadioButton(ImportPicks);
radioMaxPhaseOrigin->setObjectName(QString::fromUtf8("radioMaxPhaseOrigin"));
vboxLayout->addWidget(radioMaxPhaseOrigin);
hboxLayout2 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout2->setSpacing(6);
#endif
hboxLayout2->setContentsMargins(0, 0, 0, 0);
hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
spacerItem2 = new QSpacerItem(20, 20, QSizePolicy::Fixed, QSizePolicy::Minimum);
hboxLayout2->addItem(spacerItem2);
label_3 = new QLabel(ImportPicks);
label_3->setObjectName(QString::fromUtf8("label_3"));
label_3->setWordWrap(true);
hboxLayout2->addWidget(label_3);
vboxLayout->addLayout(hboxLayout2);
radioAllOrigins = new QRadioButton(ImportPicks);
radioAllOrigins->setObjectName(QString::fromUtf8("radioAllOrigins"));
vboxLayout->addWidget(radioAllOrigins);
hboxLayout3 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout3->setSpacing(6);
#endif
hboxLayout3->setContentsMargins(0, 0, 0, 0);
hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3"));
spacerItem3 = new QSpacerItem(20, 20, QSizePolicy::Fixed, QSizePolicy::Minimum);
hboxLayout3->addItem(spacerItem3);
label_4 = new QLabel(ImportPicks);
label_4->setObjectName(QString::fromUtf8("label_4"));
label_4->setWordWrap(true);
hboxLayout3->addWidget(label_4);
vboxLayout->addLayout(hboxLayout3);
spacerItem4 = new QSpacerItem(397, 21, QSizePolicy::Minimum, QSizePolicy::Expanding);
vboxLayout->addItem(spacerItem4);
checkAllAgencies = new QCheckBox(ImportPicks);
checkAllAgencies->setObjectName(QString::fromUtf8("checkAllAgencies"));
vboxLayout->addWidget(checkAllAgencies);
checkAllPhases = new QCheckBox(ImportPicks);
checkAllPhases->setObjectName(QString::fromUtf8("checkAllPhases"));
checkAllPhases->setChecked(true);
vboxLayout->addWidget(checkAllPhases);
checkPreferTargetPhases = new QCheckBox(ImportPicks);
checkPreferTargetPhases->setObjectName(QString::fromUtf8("checkPreferTargetPhases"));
checkPreferTargetPhases->setChecked(true);
vboxLayout->addWidget(checkPreferTargetPhases);
hboxLayout4 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout4->setSpacing(6);
#endif
hboxLayout4->setContentsMargins(0, 0, 0, 0);
hboxLayout4->setObjectName(QString::fromUtf8("hboxLayout4"));
spacerItem5 = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout4->addItem(spacerItem5);
okButton = new QPushButton(ImportPicks);
okButton->setObjectName(QString::fromUtf8("okButton"));
hboxLayout4->addWidget(okButton);
cancelButton = new QPushButton(ImportPicks);
cancelButton->setObjectName(QString::fromUtf8("cancelButton"));
hboxLayout4->addWidget(cancelButton);
vboxLayout->addLayout(hboxLayout4);
retranslateUi(ImportPicks);
QObject::connect(okButton, SIGNAL(clicked()), ImportPicks, SLOT(accept()));
QObject::connect(cancelButton, SIGNAL(clicked()), ImportPicks, SLOT(reject()));
QMetaObject::connectSlotsByName(ImportPicks);
} // setupUi
void retranslateUi(QDialog *ImportPicks)
{
ImportPicks->setWindowTitle(QCoreApplication::translate("ImportPicks", "Import picks", nullptr));
label->setText(QCoreApplication::translate("ImportPicks", "Please select the picks of the origin(s) you want to import. Streams that are picked already are going to be ignored.", nullptr));
radioLatestOrigin->setText(QCoreApplication::translate("ImportPicks", "Latest origin", nullptr));
label_2->setText(QCoreApplication::translate("ImportPicks", "Imports the picks and corresponding weights of the latest origin belonging to the event including manual solutions (e.g. created by another operator).", nullptr));
radioLatestAutomaticOrigin->setText(QCoreApplication::translate("ImportPicks", "Latest automatic origin", nullptr));
label_5->setText(QCoreApplication::translate("ImportPicks", "Imports the picks and corresponding weights of the latest automatic origin belonging to the event. Manual solutions are going to be ignored.", nullptr));
radioMaxPhaseOrigin->setText(QCoreApplication::translate("ImportPicks", "Origin with maximum phase count", nullptr));
label_3->setText(QCoreApplication::translate("ImportPicks", "Imports the picks and corresponding weights of the latest origin with the most phases belonging to the event.", nullptr));
radioAllOrigins->setText(QCoreApplication::translate("ImportPicks", "All origins referenced by this event", nullptr));
label_4->setText(QCoreApplication::translate("ImportPicks", "Imports the picks of all origins of the event. Duplicates are going to be removed. All picks are associated to the origin with a weight of 0!", nullptr));
checkAllAgencies->setText(QCoreApplication::translate("ImportPicks", "Import picks from all agencies instead of using only own picks.", nullptr));
checkAllPhases->setText(QCoreApplication::translate("ImportPicks", "Import all phases and do not map only to P and S.", nullptr));
checkPreferTargetPhases->setText(QCoreApplication::translate("ImportPicks", "Prefer phases of target in case of duplicates.", nullptr));
okButton->setText(QCoreApplication::translate("ImportPicks", "OK", nullptr));
cancelButton->setText(QCoreApplication::translate("ImportPicks", "Cancel", nullptr));
} // retranslateUi
};
namespace Ui {
class ImportPicks: public Ui_ImportPicks {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_IMPORTPICKS_H

View File

@ -0,0 +1,98 @@
/********************************************************************************
** Form generated from reading UI file 'locatorsettings.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_LOCATORSETTINGS_H
#define UI_LOCATORSETTINGS_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QTableWidget>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_LocatorSettings
{
public:
QVBoxLayout *vboxLayout;
QTableWidget *tableParameters;
QHBoxLayout *hboxLayout;
QSpacerItem *spacerItem;
QPushButton *okButton;
QPushButton *cancelButton;
void setupUi(QDialog *LocatorSettings)
{
if (LocatorSettings->objectName().isEmpty())
LocatorSettings->setObjectName(QString::fromUtf8("LocatorSettings"));
LocatorSettings->resize(453, 455);
vboxLayout = new QVBoxLayout(LocatorSettings);
vboxLayout->setSpacing(4);
vboxLayout->setContentsMargins(6, 6, 6, 6);
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
tableParameters = new QTableWidget(LocatorSettings);
tableParameters->setObjectName(QString::fromUtf8("tableParameters"));
tableParameters->setAlternatingRowColors(true);
tableParameters->setSelectionMode(QAbstractItemView::SingleSelection);
tableParameters->setSelectionBehavior(QAbstractItemView::SelectRows);
tableParameters->setSortingEnabled(true);
vboxLayout->addWidget(tableParameters);
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
hboxLayout->setContentsMargins(0, 0, 0, 0);
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
spacerItem = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout->addItem(spacerItem);
okButton = new QPushButton(LocatorSettings);
okButton->setObjectName(QString::fromUtf8("okButton"));
hboxLayout->addWidget(okButton);
cancelButton = new QPushButton(LocatorSettings);
cancelButton->setObjectName(QString::fromUtf8("cancelButton"));
hboxLayout->addWidget(cancelButton);
vboxLayout->addLayout(hboxLayout);
retranslateUi(LocatorSettings);
QObject::connect(okButton, SIGNAL(clicked()), LocatorSettings, SLOT(accept()));
QObject::connect(cancelButton, SIGNAL(clicked()), LocatorSettings, SLOT(reject()));
QMetaObject::connectSlotsByName(LocatorSettings);
} // setupUi
void retranslateUi(QDialog *LocatorSettings)
{
LocatorSettings->setWindowTitle(QCoreApplication::translate("LocatorSettings", "Dialog", nullptr));
okButton->setText(QCoreApplication::translate("LocatorSettings", "OK", nullptr));
cancelButton->setText(QCoreApplication::translate("LocatorSettings", "Cancel", nullptr));
} // retranslateUi
};
namespace Ui {
class LocatorSettings: public Ui_LocatorSettings {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_LOCATORSETTINGS_H

View File

@ -0,0 +1,98 @@
/********************************************************************************
** Form generated from reading UI file 'maglistview.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_MAGLISTVIEW_H
#define UI_MAGLISTVIEW_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QTreeWidget>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_OriginListView
{
public:
QVBoxLayout *vboxLayout;
QTreeWidget *treeWidget;
QHBoxLayout *hboxLayout;
QPushButton *btnClear;
QSpacerItem *spacerItem;
QPushButton *btnDbRead;
void setupUi(QWidget *OriginListView)
{
if (OriginListView->objectName().isEmpty())
OriginListView->setObjectName(QString::fromUtf8("OriginListView"));
OriginListView->resize(448, 649);
vboxLayout = new QVBoxLayout(OriginListView);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
treeWidget = new QTreeWidget(OriginListView);
treeWidget->setObjectName(QString::fromUtf8("treeWidget"));
vboxLayout->addWidget(treeWidget);
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
hboxLayout->setContentsMargins(0, 0, 0, 0);
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
btnClear = new QPushButton(OriginListView);
btnClear->setObjectName(QString::fromUtf8("btnClear"));
btnClear->setEnabled(false);
hboxLayout->addWidget(btnClear);
spacerItem = new QSpacerItem(201, 27, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout->addItem(spacerItem);
btnDbRead = new QPushButton(OriginListView);
btnDbRead->setObjectName(QString::fromUtf8("btnDbRead"));
btnDbRead->setEnabled(false);
hboxLayout->addWidget(btnDbRead);
vboxLayout->addLayout(hboxLayout);
retranslateUi(OriginListView);
QMetaObject::connectSlotsByName(OriginListView);
} // setupUi
void retranslateUi(QWidget *OriginListView)
{
OriginListView->setWindowTitle(QCoreApplication::translate("OriginListView", "OriginList", nullptr));
btnClear->setText(QCoreApplication::translate("OriginListView", "Clear", nullptr));
btnDbRead->setText(QCoreApplication::translate("OriginListView", "Read from DB", nullptr));
} // retranslateUi
};
namespace Ui {
class OriginListView: public Ui_OriginListView {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_MAGLISTVIEW_H

View File

@ -0,0 +1,575 @@
/********************************************************************************
** Form generated from reading UI file 'magnitudeview.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_MAGNITUDEVIEW_H
#define UI_MAGNITUDEVIEW_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QDoubleSpinBox>
#include <QtWidgets/QFrame>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel>
#include <QtWidgets/QRadioButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QSpinBox>
#include <QtWidgets/QTableView>
#include <QtWidgets/QToolButton>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_MagnitudeView
{
public:
QVBoxLayout *vboxLayout;
QFrame *frameMagnitudeTypes;
QHBoxLayout *hboxLayout;
QFrame *groupSummary;
QVBoxLayout *vboxLayout1;
QLabel *labelRegion;
QFrame *frameMap;
QVBoxLayout *vboxLayout2;
QFrame *groupMagnitude;
QGridLayout *gridLayout;
QLabel *label_3;
QLabel *lbAgencyID;
QLabel *labelAuthor;
QLabel *lbAuthor;
QSpacerItem *spacerItem;
QLabel *label_8;
QLabel *label;
QLabel *labelAgencyID;
QLabel *label_2;
QLabel *labelMagnitude;
QLabel *labelRMS;
QLabel *labelMinMag;
QLabel *labelMaxMag;
QLabel *labelNumStaMags;
QLabel *label_7;
QLabel *lbMethod;
QLabel *labelMethod;
QFrame *frame;
QLabel *lbEvaluation;
QLabel *labelEvaluation;
QFrame *groupMagnitudes;
QVBoxLayout *vboxLayout3;
QTableView *tableStationMagnitudes;
QFrame *groupReview;
QVBoxLayout *vboxLayout4;
QHBoxLayout *hboxLayout1;
QFrame *groupSettings;
QHBoxLayout *hboxLayout2;
QRadioButton *btnDefault;
QRadioButton *btnMean;
QRadioButton *btnMedian;
QRadioButton *btnTrimmedMean;
QSpinBox *spinTrimmedMeanValue;
QRadioButton *btnTrimmedMedian;
QDoubleSpinBox *spinTrimmedMedianValue;
QSpacerItem *spacerItem1;
QHBoxLayout *layoutActions;
QToolButton *btnRecalculate;
QToolButton *btnSelect;
QToolButton *btnActivate;
QToolButton *btnDeactivate;
QLabel *label_4;
QComboBox *cbEvalStatus;
QSpacerItem *spacerItem2;
QToolButton *btnWaveforms;
QToolButton *btnCommit;
void setupUi(QWidget *MagnitudeView)
{
if (MagnitudeView->objectName().isEmpty())
MagnitudeView->setObjectName(QString::fromUtf8("MagnitudeView"));
MagnitudeView->resize(894, 864);
QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(MagnitudeView->sizePolicy().hasHeightForWidth());
MagnitudeView->setSizePolicy(sizePolicy);
vboxLayout = new QVBoxLayout(MagnitudeView);
vboxLayout->setSpacing(6);
vboxLayout->setContentsMargins(0, 0, 0, 0);
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
frameMagnitudeTypes = new QFrame(MagnitudeView);
frameMagnitudeTypes->setObjectName(QString::fromUtf8("frameMagnitudeTypes"));
frameMagnitudeTypes->setFrameShape(QFrame::NoFrame);
vboxLayout->addWidget(frameMagnitudeTypes);
hboxLayout = new QHBoxLayout();
hboxLayout->setSpacing(4);
hboxLayout->setContentsMargins(0, 0, 0, 0);
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
groupSummary = new QFrame(MagnitudeView);
groupSummary->setObjectName(QString::fromUtf8("groupSummary"));
QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Preferred);
sizePolicy1.setHorizontalStretch(2);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(groupSummary->sizePolicy().hasHeightForWidth());
groupSummary->setSizePolicy(sizePolicy1);
vboxLayout1 = new QVBoxLayout(groupSummary);
vboxLayout1->setSpacing(4);
vboxLayout1->setContentsMargins(0, 0, 0, 0);
vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1"));
labelRegion = new QLabel(groupSummary);
labelRegion->setObjectName(QString::fromUtf8("labelRegion"));
QSizePolicy sizePolicy2(QSizePolicy::Ignored, QSizePolicy::Maximum);
sizePolicy2.setHorizontalStretch(0);
sizePolicy2.setVerticalStretch(0);
sizePolicy2.setHeightForWidth(labelRegion->sizePolicy().hasHeightForWidth());
labelRegion->setSizePolicy(sizePolicy2);
labelRegion->setMinimumSize(QSize(100, 0));
labelRegion->setFrameShape(QFrame::NoFrame);
vboxLayout1->addWidget(labelRegion);
frameMap = new QFrame(groupSummary);
frameMap->setObjectName(QString::fromUtf8("frameMap"));
QSizePolicy sizePolicy3(QSizePolicy::Preferred, QSizePolicy::Expanding);
sizePolicy3.setHorizontalStretch(1);
sizePolicy3.setVerticalStretch(0);
sizePolicy3.setHeightForWidth(frameMap->sizePolicy().hasHeightForWidth());
frameMap->setSizePolicy(sizePolicy3);
frameMap->setMinimumSize(QSize(120, 200));
frameMap->setFrameShape(QFrame::NoFrame);
frameMap->setFrameShadow(QFrame::Plain);
vboxLayout1->addWidget(frameMap);
hboxLayout->addWidget(groupSummary);
vboxLayout2 = new QVBoxLayout();
vboxLayout2->setSpacing(4);
vboxLayout2->setContentsMargins(0, 0, 0, 0);
vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2"));
groupMagnitude = new QFrame(MagnitudeView);
groupMagnitude->setObjectName(QString::fromUtf8("groupMagnitude"));
QSizePolicy sizePolicy4(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy4.setHorizontalStretch(0);
sizePolicy4.setVerticalStretch(1);
sizePolicy4.setHeightForWidth(groupMagnitude->sizePolicy().hasHeightForWidth());
groupMagnitude->setSizePolicy(sizePolicy4);
gridLayout = new QGridLayout(groupMagnitude);
gridLayout->setSpacing(6);
gridLayout->setContentsMargins(9, 9, 9, 9);
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
label_3 = new QLabel(groupMagnitude);
label_3->setObjectName(QString::fromUtf8("label_3"));
sizePolicy.setHeightForWidth(label_3->sizePolicy().hasHeightForWidth());
label_3->setSizePolicy(sizePolicy);
label_3->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_3, 3, 0, 1, 1);
lbAgencyID = new QLabel(groupMagnitude);
lbAgencyID->setObjectName(QString::fromUtf8("lbAgencyID"));
sizePolicy.setHeightForWidth(lbAgencyID->sizePolicy().hasHeightForWidth());
lbAgencyID->setSizePolicy(sizePolicy);
lbAgencyID->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(lbAgencyID, 7, 0, 1, 1);
labelAuthor = new QLabel(groupMagnitude);
labelAuthor->setObjectName(QString::fromUtf8("labelAuthor"));
QSizePolicy sizePolicy5(QSizePolicy::Ignored, QSizePolicy::Preferred);
sizePolicy5.setHorizontalStretch(0);
sizePolicy5.setVerticalStretch(0);
sizePolicy5.setHeightForWidth(labelAuthor->sizePolicy().hasHeightForWidth());
labelAuthor->setSizePolicy(sizePolicy5);
gridLayout->addWidget(labelAuthor, 8, 1, 1, 1);
lbAuthor = new QLabel(groupMagnitude);
lbAuthor->setObjectName(QString::fromUtf8("lbAuthor"));
lbAuthor->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(lbAuthor, 8, 0, 1, 1);
spacerItem = new QSpacerItem(20, 87, QSizePolicy::Minimum, QSizePolicy::Expanding);
gridLayout->addItem(spacerItem, 5, 0, 1, 2);
label_8 = new QLabel(groupMagnitude);
label_8->setObjectName(QString::fromUtf8("label_8"));
sizePolicy.setHeightForWidth(label_8->sizePolicy().hasHeightForWidth());
label_8->setSizePolicy(sizePolicy);
label_8->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_8, 2, 0, 1, 1);
label = new QLabel(groupMagnitude);
label->setObjectName(QString::fromUtf8("label"));
label->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label, 1, 0, 1, 1);
labelAgencyID = new QLabel(groupMagnitude);
labelAgencyID->setObjectName(QString::fromUtf8("labelAgencyID"));
sizePolicy5.setHeightForWidth(labelAgencyID->sizePolicy().hasHeightForWidth());
labelAgencyID->setSizePolicy(sizePolicy5);
gridLayout->addWidget(labelAgencyID, 7, 1, 1, 1);
label_2 = new QLabel(groupMagnitude);
label_2->setObjectName(QString::fromUtf8("label_2"));
sizePolicy.setHeightForWidth(label_2->sizePolicy().hasHeightForWidth());
label_2->setSizePolicy(sizePolicy);
label_2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_2, 4, 0, 1, 1);
labelMagnitude = new QLabel(groupMagnitude);
labelMagnitude->setObjectName(QString::fromUtf8("labelMagnitude"));
QSizePolicy sizePolicy6(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
sizePolicy6.setHorizontalStretch(0);
sizePolicy6.setVerticalStretch(0);
sizePolicy6.setHeightForWidth(labelMagnitude->sizePolicy().hasHeightForWidth());
labelMagnitude->setSizePolicy(sizePolicy6);
gridLayout->addWidget(labelMagnitude, 0, 1, 1, 1);
labelRMS = new QLabel(groupMagnitude);
labelRMS->setObjectName(QString::fromUtf8("labelRMS"));
sizePolicy6.setHeightForWidth(labelRMS->sizePolicy().hasHeightForWidth());
labelRMS->setSizePolicy(sizePolicy6);
gridLayout->addWidget(labelRMS, 1, 1, 1, 1);
labelMinMag = new QLabel(groupMagnitude);
labelMinMag->setObjectName(QString::fromUtf8("labelMinMag"));
sizePolicy6.setHeightForWidth(labelMinMag->sizePolicy().hasHeightForWidth());
labelMinMag->setSizePolicy(sizePolicy6);
gridLayout->addWidget(labelMinMag, 3, 1, 1, 1);
labelMaxMag = new QLabel(groupMagnitude);
labelMaxMag->setObjectName(QString::fromUtf8("labelMaxMag"));
sizePolicy6.setHeightForWidth(labelMaxMag->sizePolicy().hasHeightForWidth());
labelMaxMag->setSizePolicy(sizePolicy6);
gridLayout->addWidget(labelMaxMag, 4, 1, 1, 1);
labelNumStaMags = new QLabel(groupMagnitude);
labelNumStaMags->setObjectName(QString::fromUtf8("labelNumStaMags"));
sizePolicy6.setHeightForWidth(labelNumStaMags->sizePolicy().hasHeightForWidth());
labelNumStaMags->setSizePolicy(sizePolicy6);
labelNumStaMags->setLayoutDirection(Qt::LeftToRight);
labelNumStaMags->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
gridLayout->addWidget(labelNumStaMags, 2, 1, 1, 1);
label_7 = new QLabel(groupMagnitude);
label_7->setObjectName(QString::fromUtf8("label_7"));
sizePolicy.setHeightForWidth(label_7->sizePolicy().hasHeightForWidth());
label_7->setSizePolicy(sizePolicy);
label_7->setMinimumSize(QSize(0, 0));
label_7->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_7, 0, 0, 1, 1);
lbMethod = new QLabel(groupMagnitude);
lbMethod->setObjectName(QString::fromUtf8("lbMethod"));
sizePolicy.setHeightForWidth(lbMethod->sizePolicy().hasHeightForWidth());
lbMethod->setSizePolicy(sizePolicy);
lbMethod->setLayoutDirection(Qt::LeftToRight);
lbMethod->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(lbMethod, 10, 0, 1, 1);
labelMethod = new QLabel(groupMagnitude);
labelMethod->setObjectName(QString::fromUtf8("labelMethod"));
sizePolicy.setHeightForWidth(labelMethod->sizePolicy().hasHeightForWidth());
labelMethod->setSizePolicy(sizePolicy);
labelMethod->setScaledContents(false);
gridLayout->addWidget(labelMethod, 10, 1, 1, 1);
frame = new QFrame(groupMagnitude);
frame->setObjectName(QString::fromUtf8("frame"));
QSizePolicy sizePolicy7(QSizePolicy::Preferred, QSizePolicy::Fixed);
sizePolicy7.setHorizontalStretch(0);
sizePolicy7.setVerticalStretch(0);
sizePolicy7.setHeightForWidth(frame->sizePolicy().hasHeightForWidth());
frame->setSizePolicy(sizePolicy7);
frame->setFrameShape(QFrame::HLine);
frame->setFrameShadow(QFrame::Plain);
gridLayout->addWidget(frame, 6, 0, 1, 2);
lbEvaluation = new QLabel(groupMagnitude);
lbEvaluation->setObjectName(QString::fromUtf8("lbEvaluation"));
lbEvaluation->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(lbEvaluation, 9, 0, 1, 1);
labelEvaluation = new QLabel(groupMagnitude);
labelEvaluation->setObjectName(QString::fromUtf8("labelEvaluation"));
gridLayout->addWidget(labelEvaluation, 9, 1, 1, 1);
vboxLayout2->addWidget(groupMagnitude);
hboxLayout->addLayout(vboxLayout2);
groupMagnitudes = new QFrame(MagnitudeView);
groupMagnitudes->setObjectName(QString::fromUtf8("groupMagnitudes"));
sizePolicy1.setHeightForWidth(groupMagnitudes->sizePolicy().hasHeightForWidth());
groupMagnitudes->setSizePolicy(sizePolicy1);
vboxLayout3 = new QVBoxLayout(groupMagnitudes);
vboxLayout3->setSpacing(4);
vboxLayout3->setContentsMargins(0, 0, 0, 0);
vboxLayout3->setObjectName(QString::fromUtf8("vboxLayout3"));
hboxLayout->addWidget(groupMagnitudes);
vboxLayout->addLayout(hboxLayout);
tableStationMagnitudes = new QTableView(MagnitudeView);
tableStationMagnitudes->setObjectName(QString::fromUtf8("tableStationMagnitudes"));
tableStationMagnitudes->setFrameShape(QFrame::NoFrame);
tableStationMagnitudes->setFrameShadow(QFrame::Plain);
tableStationMagnitudes->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
tableStationMagnitudes->setAlternatingRowColors(true);
tableStationMagnitudes->setSelectionMode(QAbstractItemView::SingleSelection);
tableStationMagnitudes->setSelectionBehavior(QAbstractItemView::SelectRows);
vboxLayout->addWidget(tableStationMagnitudes);
groupReview = new QFrame(MagnitudeView);
groupReview->setObjectName(QString::fromUtf8("groupReview"));
groupReview->setFrameShape(QFrame::NoFrame);
groupReview->setFrameShadow(QFrame::Raised);
vboxLayout4 = new QVBoxLayout(groupReview);
vboxLayout4->setSpacing(6);
vboxLayout4->setContentsMargins(0, 0, 0, 0);
vboxLayout4->setObjectName(QString::fromUtf8("vboxLayout4"));
hboxLayout1 = new QHBoxLayout();
hboxLayout1->setSpacing(6);
hboxLayout1->setContentsMargins(0, 0, 0, 0);
hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
groupSettings = new QFrame(groupReview);
groupSettings->setObjectName(QString::fromUtf8("groupSettings"));
QSizePolicy sizePolicy8(QSizePolicy::Maximum, QSizePolicy::Maximum);
sizePolicy8.setHorizontalStretch(1);
sizePolicy8.setVerticalStretch(0);
sizePolicy8.setHeightForWidth(groupSettings->sizePolicy().hasHeightForWidth());
groupSettings->setSizePolicy(sizePolicy8);
hboxLayout2 = new QHBoxLayout(groupSettings);
hboxLayout2->setSpacing(6);
hboxLayout2->setContentsMargins(0, 0, 0, 0);
hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
btnDefault = new QRadioButton(groupSettings);
btnDefault->setObjectName(QString::fromUtf8("btnDefault"));
QSizePolicy sizePolicy9(QSizePolicy::Maximum, QSizePolicy::Fixed);
sizePolicy9.setHorizontalStretch(0);
sizePolicy9.setVerticalStretch(0);
sizePolicy9.setHeightForWidth(btnDefault->sizePolicy().hasHeightForWidth());
btnDefault->setSizePolicy(sizePolicy9);
btnDefault->setChecked(true);
hboxLayout2->addWidget(btnDefault);
btnMean = new QRadioButton(groupSettings);
btnMean->setObjectName(QString::fromUtf8("btnMean"));
sizePolicy9.setHeightForWidth(btnMean->sizePolicy().hasHeightForWidth());
btnMean->setSizePolicy(sizePolicy9);
hboxLayout2->addWidget(btnMean);
btnMedian = new QRadioButton(groupSettings);
btnMedian->setObjectName(QString::fromUtf8("btnMedian"));
hboxLayout2->addWidget(btnMedian);
btnTrimmedMean = new QRadioButton(groupSettings);
btnTrimmedMean->setObjectName(QString::fromUtf8("btnTrimmedMean"));
sizePolicy9.setHeightForWidth(btnTrimmedMean->sizePolicy().hasHeightForWidth());
btnTrimmedMean->setSizePolicy(sizePolicy9);
hboxLayout2->addWidget(btnTrimmedMean);
spinTrimmedMeanValue = new QSpinBox(groupSettings);
spinTrimmedMeanValue->setObjectName(QString::fromUtf8("spinTrimmedMeanValue"));
sizePolicy9.setHeightForWidth(spinTrimmedMeanValue->sizePolicy().hasHeightForWidth());
spinTrimmedMeanValue->setSizePolicy(sizePolicy9);
spinTrimmedMeanValue->setMaximum(100);
spinTrimmedMeanValue->setValue(25);
hboxLayout2->addWidget(spinTrimmedMeanValue);
btnTrimmedMedian = new QRadioButton(groupSettings);
btnTrimmedMedian->setObjectName(QString::fromUtf8("btnTrimmedMedian"));
sizePolicy9.setHeightForWidth(btnTrimmedMedian->sizePolicy().hasHeightForWidth());
btnTrimmedMedian->setSizePolicy(sizePolicy9);
hboxLayout2->addWidget(btnTrimmedMedian);
spinTrimmedMedianValue = new QDoubleSpinBox(groupSettings);
spinTrimmedMedianValue->setObjectName(QString::fromUtf8("spinTrimmedMedianValue"));
sizePolicy9.setHeightForWidth(spinTrimmedMedianValue->sizePolicy().hasHeightForWidth());
spinTrimmedMedianValue->setSizePolicy(sizePolicy9);
spinTrimmedMedianValue->setMaximum(100.000000000000000);
spinTrimmedMedianValue->setSingleStep(0.100000000000000);
spinTrimmedMedianValue->setValue(0.500000000000000);
hboxLayout2->addWidget(spinTrimmedMedianValue);
hboxLayout1->addWidget(groupSettings);
spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
hboxLayout1->addItem(spacerItem1);
vboxLayout4->addLayout(hboxLayout1);
layoutActions = new QHBoxLayout();
layoutActions->setSpacing(6);
layoutActions->setContentsMargins(0, 0, 0, 0);
layoutActions->setObjectName(QString::fromUtf8("layoutActions"));
btnRecalculate = new QToolButton(groupReview);
btnRecalculate->setObjectName(QString::fromUtf8("btnRecalculate"));
layoutActions->addWidget(btnRecalculate);
btnSelect = new QToolButton(groupReview);
btnSelect->setObjectName(QString::fromUtf8("btnSelect"));
layoutActions->addWidget(btnSelect);
btnActivate = new QToolButton(groupReview);
btnActivate->setObjectName(QString::fromUtf8("btnActivate"));
layoutActions->addWidget(btnActivate);
btnDeactivate = new QToolButton(groupReview);
btnDeactivate->setObjectName(QString::fromUtf8("btnDeactivate"));
layoutActions->addWidget(btnDeactivate);
label_4 = new QLabel(groupReview);
label_4->setObjectName(QString::fromUtf8("label_4"));
layoutActions->addWidget(label_4);
cbEvalStatus = new QComboBox(groupReview);
cbEvalStatus->setObjectName(QString::fromUtf8("cbEvalStatus"));
layoutActions->addWidget(cbEvalStatus);
spacerItem2 = new QSpacerItem(474, 29, QSizePolicy::Expanding, QSizePolicy::Minimum);
layoutActions->addItem(spacerItem2);
btnWaveforms = new QToolButton(groupReview);
btnWaveforms->setObjectName(QString::fromUtf8("btnWaveforms"));
layoutActions->addWidget(btnWaveforms);
btnCommit = new QToolButton(groupReview);
btnCommit->setObjectName(QString::fromUtf8("btnCommit"));
btnCommit->setEnabled(false);
layoutActions->addWidget(btnCommit);
vboxLayout4->addLayout(layoutActions);
vboxLayout->addWidget(groupReview);
retranslateUi(MagnitudeView);
QObject::connect(btnTrimmedMean, SIGNAL(toggled(bool)), spinTrimmedMeanValue, SLOT(setEnabled(bool)));
QObject::connect(btnTrimmedMedian, SIGNAL(toggled(bool)), spinTrimmedMedianValue, SLOT(setEnabled(bool)));
QMetaObject::connectSlotsByName(MagnitudeView);
} // setupUi
void retranslateUi(QWidget *MagnitudeView)
{
MagnitudeView->setWindowTitle(QCoreApplication::translate("MagnitudeView", "MagnitudeView", nullptr));
labelRegion->setText(QCoreApplication::translate("MagnitudeView", "Region", nullptr));
label_3->setText(QCoreApplication::translate("MagnitudeView", "Min: ", nullptr));
lbAgencyID->setText(QCoreApplication::translate("MagnitudeView", "Agency: ", nullptr));
labelAuthor->setText(QCoreApplication::translate("MagnitudeView", "-", nullptr));
lbAuthor->setText(QCoreApplication::translate("MagnitudeView", "Author: ", nullptr));
#if QT_CONFIG(tooltip)
label_8->setToolTip(QCoreApplication::translate("MagnitudeView", "Station Magnitude Count", nullptr));
#endif // QT_CONFIG(tooltip)
label_8->setText(QCoreApplication::translate("MagnitudeView", "Count: ", nullptr));
label->setText(QCoreApplication::translate("MagnitudeView", "+/-: ", nullptr));
labelAgencyID->setText(QCoreApplication::translate("MagnitudeView", "MagTool@GFZ", nullptr));
label_2->setText(QCoreApplication::translate("MagnitudeView", "Max: ", nullptr));
labelMagnitude->setText(QCoreApplication::translate("MagnitudeView", "-.-", nullptr));
labelRMS->setText(QCoreApplication::translate("MagnitudeView", "-.-", nullptr));
labelMinMag->setText(QCoreApplication::translate("MagnitudeView", "-.-", nullptr));
labelMaxMag->setText(QCoreApplication::translate("MagnitudeView", "-.-", nullptr));
labelNumStaMags->setText(QCoreApplication::translate("MagnitudeView", "0", nullptr));
label_7->setText(QCoreApplication::translate("MagnitudeView", "Value: ", nullptr));
lbMethod->setText(QCoreApplication::translate("MagnitudeView", "Method: ", nullptr));
labelMethod->setText(QCoreApplication::translate("MagnitudeView", "average", nullptr));
lbEvaluation->setText(QCoreApplication::translate("MagnitudeView", "Evaluation:", nullptr));
labelEvaluation->setText(QCoreApplication::translate("MagnitudeView", "-", nullptr));
btnDefault->setText(QCoreApplication::translate("MagnitudeView", "Default", nullptr));
btnMean->setText(QCoreApplication::translate("MagnitudeView", "Mean", nullptr));
btnMedian->setText(QCoreApplication::translate("MagnitudeView", "Median", nullptr));
btnTrimmedMean->setText(QCoreApplication::translate("MagnitudeView", "Trimmed mean", nullptr));
spinTrimmedMeanValue->setSuffix(QCoreApplication::translate("MagnitudeView", "%", nullptr));
btnTrimmedMedian->setText(QCoreApplication::translate("MagnitudeView", "Median trimmed mean", nullptr));
#if QT_CONFIG(tooltip)
btnRecalculate->setToolTip(QCoreApplication::translate("MagnitudeView", "Recalculate the network magnitude", nullptr));
#endif // QT_CONFIG(tooltip)
btnRecalculate->setText(QCoreApplication::translate("MagnitudeView", "Recalculate", nullptr));
#if QT_CONFIG(tooltip)
btnSelect->setToolTip(QCoreApplication::translate("MagnitudeView", "Selects channels passing the current filter", nullptr));
#endif // QT_CONFIG(tooltip)
btnSelect->setText(QCoreApplication::translate("MagnitudeView", "Select", nullptr));
#if QT_CONFIG(shortcut)
btnSelect->setShortcut(QCoreApplication::translate("MagnitudeView", "S", nullptr));
#endif // QT_CONFIG(shortcut)
#if QT_CONFIG(tooltip)
btnActivate->setToolTip(QCoreApplication::translate("MagnitudeView", "Activate selected channels", nullptr));
#endif // QT_CONFIG(tooltip)
btnActivate->setText(QCoreApplication::translate("MagnitudeView", "+", nullptr));
#if QT_CONFIG(shortcut)
btnActivate->setShortcut(QCoreApplication::translate("MagnitudeView", "+", nullptr));
#endif // QT_CONFIG(shortcut)
#if QT_CONFIG(tooltip)
btnDeactivate->setToolTip(QCoreApplication::translate("MagnitudeView", "Deactivate selected channels", nullptr));
#endif // QT_CONFIG(tooltip)
btnDeactivate->setText(QCoreApplication::translate("MagnitudeView", "-", nullptr));
#if QT_CONFIG(shortcut)
btnDeactivate->setShortcut(QCoreApplication::translate("MagnitudeView", "-", nullptr));
#endif // QT_CONFIG(shortcut)
label_4->setText(QCoreApplication::translate("MagnitudeView", "Evaluation:", nullptr));
btnWaveforms->setText(QCoreApplication::translate("MagnitudeView", "Waveforms", nullptr));
btnCommit->setText(QCoreApplication::translate("MagnitudeView", "Commit", nullptr));
} // retranslateUi
};
namespace Ui {
class MagnitudeView: public Ui_MagnitudeView {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_MAGNITUDEVIEW_H

View File

@ -0,0 +1,145 @@
/********************************************************************************
** Form generated from reading UI file 'magnitudeview_filter.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_MAGNITUDEVIEW_FILTER_H
#define UI_MAGNITUDEVIEW_FILTER_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <QtWidgets/QFrame>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QToolButton>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_MagnitudeRowFilter
{
public:
QVBoxLayout *vboxLayout;
QHBoxLayout *hboxLayout;
QLabel *labelInfo;
QToolButton *btnRemove;
QToolButton *btnAdd;
QFrame *frameFilters;
QSpacerItem *spacerItem;
QHBoxLayout *hboxLayout1;
QSpacerItem *spacerItem1;
QPushButton *okButton;
QPushButton *cancelButton;
void setupUi(QDialog *MagnitudeRowFilter)
{
if (MagnitudeRowFilter->objectName().isEmpty())
MagnitudeRowFilter->setObjectName(QString::fromUtf8("MagnitudeRowFilter"));
MagnitudeRowFilter->resize(405, 209);
vboxLayout = new QVBoxLayout(MagnitudeRowFilter);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
hboxLayout->setContentsMargins(0, 0, 0, 0);
#endif
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
labelInfo = new QLabel(MagnitudeRowFilter);
labelInfo->setObjectName(QString::fromUtf8("labelInfo"));
hboxLayout->addWidget(labelInfo);
btnRemove = new QToolButton(MagnitudeRowFilter);
btnRemove->setObjectName(QString::fromUtf8("btnRemove"));
hboxLayout->addWidget(btnRemove);
btnAdd = new QToolButton(MagnitudeRowFilter);
btnAdd->setObjectName(QString::fromUtf8("btnAdd"));
hboxLayout->addWidget(btnAdd);
vboxLayout->addLayout(hboxLayout);
frameFilters = new QFrame(MagnitudeRowFilter);
frameFilters->setObjectName(QString::fromUtf8("frameFilters"));
frameFilters->setFrameShape(QFrame::NoFrame);
frameFilters->setFrameShadow(QFrame::Raised);
vboxLayout->addWidget(frameFilters);
spacerItem = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
vboxLayout->addItem(spacerItem);
hboxLayout1 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout1->setSpacing(6);
#endif
hboxLayout1->setContentsMargins(0, 0, 0, 0);
hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
spacerItem1 = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout1->addItem(spacerItem1);
okButton = new QPushButton(MagnitudeRowFilter);
okButton->setObjectName(QString::fromUtf8("okButton"));
hboxLayout1->addWidget(okButton);
cancelButton = new QPushButton(MagnitudeRowFilter);
cancelButton->setObjectName(QString::fromUtf8("cancelButton"));
hboxLayout1->addWidget(cancelButton);
vboxLayout->addLayout(hboxLayout1);
retranslateUi(MagnitudeRowFilter);
QObject::connect(okButton, SIGNAL(clicked()), MagnitudeRowFilter, SLOT(accept()));
QObject::connect(cancelButton, SIGNAL(clicked()), MagnitudeRowFilter, SLOT(reject()));
QMetaObject::connectSlotsByName(MagnitudeRowFilter);
} // setupUi
void retranslateUi(QDialog *MagnitudeRowFilter)
{
MagnitudeRowFilter->setWindowTitle(QCoreApplication::translate("MagnitudeRowFilter", "Selection filter", nullptr));
labelInfo->setText(QString());
#if QT_CONFIG(tooltip)
btnRemove->setToolTip(QCoreApplication::translate("MagnitudeRowFilter", "Remove last filter", nullptr));
#endif // QT_CONFIG(tooltip)
btnRemove->setText(QCoreApplication::translate("MagnitudeRowFilter", "-", nullptr));
#if QT_CONFIG(tooltip)
btnAdd->setToolTip(QCoreApplication::translate("MagnitudeRowFilter", "Add another filter that is OR'ed with the others", nullptr));
#endif // QT_CONFIG(tooltip)
btnAdd->setText(QCoreApplication::translate("MagnitudeRowFilter", "+", nullptr));
okButton->setText(QCoreApplication::translate("MagnitudeRowFilter", "OK", nullptr));
cancelButton->setText(QCoreApplication::translate("MagnitudeRowFilter", "Cancel", nullptr));
} // retranslateUi
};
namespace Ui {
class MagnitudeRowFilter: public Ui_MagnitudeRowFilter {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_MAGNITUDEVIEW_FILTER_H

View File

@ -0,0 +1,113 @@
/********************************************************************************
** Form generated from reading UI file 'mergeorigins.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_MERGEORIGINS_H
#define UI_MERGEORIGINS_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QDialog>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_MergeOrigins
{
public:
QVBoxLayout *vboxLayout;
QLabel *labelInfo;
QCheckBox *checkAllAgencies;
QSpacerItem *spacerItem;
QHBoxLayout *hboxLayout;
QSpacerItem *spacerItem1;
QPushButton *okButton;
QPushButton *cancelButton;
void setupUi(QDialog *MergeOrigins)
{
if (MergeOrigins->objectName().isEmpty())
MergeOrigins->setObjectName(QString::fromUtf8("MergeOrigins"));
MergeOrigins->resize(411, 182);
vboxLayout = new QVBoxLayout(MergeOrigins);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
labelInfo = new QLabel(MergeOrigins);
labelInfo->setObjectName(QString::fromUtf8("labelInfo"));
labelInfo->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop);
labelInfo->setWordWrap(true);
vboxLayout->addWidget(labelInfo);
checkAllAgencies = new QCheckBox(MergeOrigins);
checkAllAgencies->setObjectName(QString::fromUtf8("checkAllAgencies"));
vboxLayout->addWidget(checkAllAgencies);
spacerItem = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding);
vboxLayout->addItem(spacerItem);
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
hboxLayout->setContentsMargins(0, 0, 0, 0);
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
spacerItem1 = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout->addItem(spacerItem1);
okButton = new QPushButton(MergeOrigins);
okButton->setObjectName(QString::fromUtf8("okButton"));
hboxLayout->addWidget(okButton);
cancelButton = new QPushButton(MergeOrigins);
cancelButton->setObjectName(QString::fromUtf8("cancelButton"));
hboxLayout->addWidget(cancelButton);
vboxLayout->addLayout(hboxLayout);
retranslateUi(MergeOrigins);
QObject::connect(okButton, SIGNAL(clicked()), MergeOrigins, SLOT(accept()));
QObject::connect(cancelButton, SIGNAL(clicked()), MergeOrigins, SLOT(reject()));
QMetaObject::connectSlotsByName(MergeOrigins);
} // setupUi
void retranslateUi(QDialog *MergeOrigins)
{
MergeOrigins->setWindowTitle(QCoreApplication::translate("MergeOrigins", "Merge origins", nullptr));
labelInfo->setText(QCoreApplication::translate("MergeOrigins", "%1 origins are selected to be merged. Picks are not associated with the result more than once. The first associated pick and its defined phase is taken. If the same pick is associated with a successive origin in the merge list it is ignored. In a drag and drop operation the drop target is always the first element in the merge list. ", nullptr));
checkAllAgencies->setText(QCoreApplication::translate("MergeOrigins", "Merge picks from all agencies instead of using only own picks.", nullptr));
okButton->setText(QCoreApplication::translate("MergeOrigins", "OK", nullptr));
cancelButton->setText(QCoreApplication::translate("MergeOrigins", "Cancel", nullptr));
} // retranslateUi
};
namespace Ui {
class MergeOrigins: public Ui_MergeOrigins {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_MERGEORIGINS_H

View File

@ -0,0 +1,364 @@
/********************************************************************************
** Form generated from reading UI file 'origindialog.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_ORIGINDIALOG_H
#define UI_ORIGINDIALOG_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QDateTimeEdit>
#include <QtWidgets/QDialog>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QGroupBox>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_OriginDialog
{
public:
QVBoxLayout *vboxLayout;
QGroupBox *groupBox;
QGridLayout *gridLayout;
QLabel *depthLabel;
QLabel *lonLabel;
QLabel *latLabel;
QLabel *timeLabel;
QDateTimeEdit *dateTimeEdit;
QLineEdit *latLineEdit;
QLabel *latUnitLabel;
QLabel *lonUnitLabel;
QLabel *depthUnitLabel;
QLineEdit *lonLineEdit;
QLineEdit *depthLineEdit;
QGroupBox *advancedGroupBox;
QGridLayout *gridLayout1;
QLabel *magTypeLabel;
QLabel *magLabel;
QLabel *phaseCountLabel;
QLineEdit *phaseCountLineEdit;
QLineEdit *magLineEdit;
QComboBox *magTypeComboBox;
QSpacerItem *spacerItem;
QHBoxLayout *hboxLayout;
QSpacerItem *spacerItem1;
QPushButton *sendButton;
QPushButton *cancelButton;
void setupUi(QDialog *OriginDialog)
{
if (OriginDialog->objectName().isEmpty())
OriginDialog->setObjectName(QString::fromUtf8("OriginDialog"));
OriginDialog->resize(284, 346);
QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(OriginDialog->sizePolicy().hasHeightForWidth());
OriginDialog->setSizePolicy(sizePolicy);
vboxLayout = new QVBoxLayout(OriginDialog);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
groupBox = new QGroupBox(OriginDialog);
groupBox->setObjectName(QString::fromUtf8("groupBox"));
gridLayout = new QGridLayout(groupBox);
#ifndef Q_OS_MAC
gridLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
gridLayout->setContentsMargins(9, 9, 9, 9);
#endif
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
depthLabel = new QLabel(groupBox);
depthLabel->setObjectName(QString::fromUtf8("depthLabel"));
gridLayout->addWidget(depthLabel, 3, 0, 1, 1);
lonLabel = new QLabel(groupBox);
lonLabel->setObjectName(QString::fromUtf8("lonLabel"));
gridLayout->addWidget(lonLabel, 2, 0, 1, 1);
latLabel = new QLabel(groupBox);
latLabel->setObjectName(QString::fromUtf8("latLabel"));
gridLayout->addWidget(latLabel, 1, 0, 1, 1);
timeLabel = new QLabel(groupBox);
timeLabel->setObjectName(QString::fromUtf8("timeLabel"));
QSizePolicy sizePolicy1(QSizePolicy::Maximum, QSizePolicy::Preferred);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(timeLabel->sizePolicy().hasHeightForWidth());
timeLabel->setSizePolicy(sizePolicy1);
gridLayout->addWidget(timeLabel, 0, 0, 1, 1);
dateTimeEdit = new QDateTimeEdit(groupBox);
dateTimeEdit->setObjectName(QString::fromUtf8("dateTimeEdit"));
dateTimeEdit->setAlignment(Qt::AlignRight);
dateTimeEdit->setCurrentSection(QDateTimeEdit::YearSection);
gridLayout->addWidget(dateTimeEdit, 0, 1, 1, 1);
latLineEdit = new QLineEdit(groupBox);
latLineEdit->setObjectName(QString::fromUtf8("latLineEdit"));
gridLayout->addWidget(latLineEdit, 1, 1, 1, 1);
latUnitLabel = new QLabel(groupBox);
latUnitLabel->setObjectName(QString::fromUtf8("latUnitLabel"));
gridLayout->addWidget(latUnitLabel, 1, 2, 1, 1);
lonUnitLabel = new QLabel(groupBox);
lonUnitLabel->setObjectName(QString::fromUtf8("lonUnitLabel"));
gridLayout->addWidget(lonUnitLabel, 2, 2, 1, 1);
depthUnitLabel = new QLabel(groupBox);
depthUnitLabel->setObjectName(QString::fromUtf8("depthUnitLabel"));
gridLayout->addWidget(depthUnitLabel, 3, 2, 1, 1);
lonLineEdit = new QLineEdit(groupBox);
lonLineEdit->setObjectName(QString::fromUtf8("lonLineEdit"));
gridLayout->addWidget(lonLineEdit, 2, 1, 1, 1);
depthLineEdit = new QLineEdit(groupBox);
depthLineEdit->setObjectName(QString::fromUtf8("depthLineEdit"));
gridLayout->addWidget(depthLineEdit, 3, 1, 1, 1);
vboxLayout->addWidget(groupBox);
advancedGroupBox = new QGroupBox(OriginDialog);
advancedGroupBox->setObjectName(QString::fromUtf8("advancedGroupBox"));
advancedGroupBox->setEnabled(true);
advancedGroupBox->setCheckable(true);
advancedGroupBox->setChecked(false);
gridLayout1 = new QGridLayout(advancedGroupBox);
#ifndef Q_OS_MAC
gridLayout1->setSpacing(6);
#endif
#ifndef Q_OS_MAC
gridLayout1->setContentsMargins(9, 9, 9, 9);
#endif
gridLayout1->setObjectName(QString::fromUtf8("gridLayout1"));
magTypeLabel = new QLabel(advancedGroupBox);
magTypeLabel->setObjectName(QString::fromUtf8("magTypeLabel"));
sizePolicy1.setHeightForWidth(magTypeLabel->sizePolicy().hasHeightForWidth());
magTypeLabel->setSizePolicy(sizePolicy1);
gridLayout1->addWidget(magTypeLabel, 2, 0, 1, 1);
magLabel = new QLabel(advancedGroupBox);
magLabel->setObjectName(QString::fromUtf8("magLabel"));
sizePolicy1.setHeightForWidth(magLabel->sizePolicy().hasHeightForWidth());
magLabel->setSizePolicy(sizePolicy1);
gridLayout1->addWidget(magLabel, 1, 0, 1, 1);
phaseCountLabel = new QLabel(advancedGroupBox);
phaseCountLabel->setObjectName(QString::fromUtf8("phaseCountLabel"));
sizePolicy1.setHeightForWidth(phaseCountLabel->sizePolicy().hasHeightForWidth());
phaseCountLabel->setSizePolicy(sizePolicy1);
gridLayout1->addWidget(phaseCountLabel, 0, 0, 1, 1);
phaseCountLineEdit = new QLineEdit(advancedGroupBox);
phaseCountLineEdit->setObjectName(QString::fromUtf8("phaseCountLineEdit"));
gridLayout1->addWidget(phaseCountLineEdit, 0, 1, 1, 1);
magLineEdit = new QLineEdit(advancedGroupBox);
magLineEdit->setObjectName(QString::fromUtf8("magLineEdit"));
gridLayout1->addWidget(magLineEdit, 1, 1, 1, 1);
magTypeComboBox = new QComboBox(advancedGroupBox);
magTypeComboBox->setObjectName(QString::fromUtf8("magTypeComboBox"));
magTypeComboBox->setEditable(true);
magTypeComboBox->setMaxVisibleItems(30);
gridLayout1->addWidget(magTypeComboBox, 2, 1, 1, 1);
vboxLayout->addWidget(advancedGroupBox);
spacerItem = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
vboxLayout->addItem(spacerItem);
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
hboxLayout->setContentsMargins(0, 0, 0, 0);
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout->addItem(spacerItem1);
sendButton = new QPushButton(OriginDialog);
sendButton->setObjectName(QString::fromUtf8("sendButton"));
QPalette palette;
QBrush brush(QColor(0, 0, 0, 255));
brush.setStyle(Qt::SolidPattern);
palette.setBrush(QPalette::Active, QPalette::WindowText, brush);
QBrush brush1(QColor(221, 223, 228, 255));
brush1.setStyle(Qt::SolidPattern);
palette.setBrush(QPalette::Active, QPalette::Button, brush1);
QBrush brush2(QColor(255, 255, 255, 255));
brush2.setStyle(Qt::SolidPattern);
palette.setBrush(QPalette::Active, QPalette::Light, brush2);
palette.setBrush(QPalette::Active, QPalette::Midlight, brush2);
QBrush brush3(QColor(85, 85, 85, 255));
brush3.setStyle(Qt::SolidPattern);
palette.setBrush(QPalette::Active, QPalette::Dark, brush3);
QBrush brush4(QColor(199, 199, 199, 255));
brush4.setStyle(Qt::SolidPattern);
palette.setBrush(QPalette::Active, QPalette::Mid, brush4);
palette.setBrush(QPalette::Active, QPalette::Text, brush);
palette.setBrush(QPalette::Active, QPalette::BrightText, brush2);
palette.setBrush(QPalette::Active, QPalette::ButtonText, brush);
palette.setBrush(QPalette::Active, QPalette::Base, brush2);
QBrush brush5(QColor(239, 239, 239, 255));
brush5.setStyle(Qt::SolidPattern);
palette.setBrush(QPalette::Active, QPalette::Window, brush5);
palette.setBrush(QPalette::Active, QPalette::Shadow, brush);
QBrush brush6(QColor(103, 141, 178, 255));
brush6.setStyle(Qt::SolidPattern);
palette.setBrush(QPalette::Active, QPalette::Highlight, brush6);
palette.setBrush(QPalette::Active, QPalette::HighlightedText, brush2);
QBrush brush7(QColor(0, 0, 238, 255));
brush7.setStyle(Qt::SolidPattern);
palette.setBrush(QPalette::Active, QPalette::Link, brush7);
QBrush brush8(QColor(82, 24, 139, 255));
brush8.setStyle(Qt::SolidPattern);
palette.setBrush(QPalette::Active, QPalette::LinkVisited, brush8);
QBrush brush9(QColor(232, 232, 232, 255));
brush9.setStyle(Qt::SolidPattern);
palette.setBrush(QPalette::Active, QPalette::AlternateBase, brush9);
palette.setBrush(QPalette::Inactive, QPalette::WindowText, brush);
palette.setBrush(QPalette::Inactive, QPalette::Button, brush1);
palette.setBrush(QPalette::Inactive, QPalette::Light, brush2);
palette.setBrush(QPalette::Inactive, QPalette::Midlight, brush2);
palette.setBrush(QPalette::Inactive, QPalette::Dark, brush3);
palette.setBrush(QPalette::Inactive, QPalette::Mid, brush4);
palette.setBrush(QPalette::Inactive, QPalette::Text, brush);
palette.setBrush(QPalette::Inactive, QPalette::BrightText, brush2);
palette.setBrush(QPalette::Inactive, QPalette::ButtonText, brush);
palette.setBrush(QPalette::Inactive, QPalette::Base, brush2);
palette.setBrush(QPalette::Inactive, QPalette::Window, brush5);
palette.setBrush(QPalette::Inactive, QPalette::Shadow, brush);
palette.setBrush(QPalette::Inactive, QPalette::Highlight, brush6);
palette.setBrush(QPalette::Inactive, QPalette::HighlightedText, brush2);
palette.setBrush(QPalette::Inactive, QPalette::Link, brush7);
palette.setBrush(QPalette::Inactive, QPalette::LinkVisited, brush8);
palette.setBrush(QPalette::Inactive, QPalette::AlternateBase, brush9);
QBrush brush10(QColor(128, 128, 128, 255));
brush10.setStyle(Qt::SolidPattern);
palette.setBrush(QPalette::Disabled, QPalette::WindowText, brush10);
palette.setBrush(QPalette::Disabled, QPalette::Button, brush1);
palette.setBrush(QPalette::Disabled, QPalette::Light, brush2);
palette.setBrush(QPalette::Disabled, QPalette::Midlight, brush2);
palette.setBrush(QPalette::Disabled, QPalette::Dark, brush3);
palette.setBrush(QPalette::Disabled, QPalette::Mid, brush4);
palette.setBrush(QPalette::Disabled, QPalette::Text, brush4);
palette.setBrush(QPalette::Disabled, QPalette::BrightText, brush2);
palette.setBrush(QPalette::Disabled, QPalette::ButtonText, brush10);
palette.setBrush(QPalette::Disabled, QPalette::Base, brush5);
palette.setBrush(QPalette::Disabled, QPalette::Window, brush5);
palette.setBrush(QPalette::Disabled, QPalette::Shadow, brush);
QBrush brush11(QColor(86, 117, 148, 255));
brush11.setStyle(Qt::SolidPattern);
palette.setBrush(QPalette::Disabled, QPalette::Highlight, brush11);
palette.setBrush(QPalette::Disabled, QPalette::HighlightedText, brush2);
palette.setBrush(QPalette::Disabled, QPalette::Link, brush7);
palette.setBrush(QPalette::Disabled, QPalette::LinkVisited, brush8);
palette.setBrush(QPalette::Disabled, QPalette::AlternateBase, brush9);
sendButton->setPalette(palette);
hboxLayout->addWidget(sendButton);
cancelButton = new QPushButton(OriginDialog);
cancelButton->setObjectName(QString::fromUtf8("cancelButton"));
hboxLayout->addWidget(cancelButton);
vboxLayout->addLayout(hboxLayout);
QWidget::setTabOrder(dateTimeEdit, latLineEdit);
QWidget::setTabOrder(latLineEdit, lonLineEdit);
QWidget::setTabOrder(lonLineEdit, depthLineEdit);
QWidget::setTabOrder(depthLineEdit, advancedGroupBox);
QWidget::setTabOrder(advancedGroupBox, phaseCountLineEdit);
QWidget::setTabOrder(phaseCountLineEdit, magLineEdit);
QWidget::setTabOrder(magLineEdit, magTypeComboBox);
QWidget::setTabOrder(magTypeComboBox, sendButton);
QWidget::setTabOrder(sendButton, cancelButton);
retranslateUi(OriginDialog);
QObject::connect(sendButton, SIGNAL(clicked()), OriginDialog, SLOT(accept()));
QObject::connect(cancelButton, SIGNAL(clicked()), OriginDialog, SLOT(reject()));
QMetaObject::connectSlotsByName(OriginDialog);
} // setupUi
void retranslateUi(QDialog *OriginDialog)
{
OriginDialog->setWindowTitle(QCoreApplication::translate("OriginDialog", "Artificial Origin", nullptr));
groupBox->setTitle(QCoreApplication::translate("OriginDialog", "Origin", nullptr));
depthLabel->setText(QCoreApplication::translate("OriginDialog", "Depth:", nullptr));
#if QT_CONFIG(tooltip)
lonLabel->setToolTip(QCoreApplication::translate("OriginDialog", "Longitude", nullptr));
#endif // QT_CONFIG(tooltip)
lonLabel->setText(QCoreApplication::translate("OriginDialog", "Lon:", nullptr));
#if QT_CONFIG(tooltip)
latLabel->setToolTip(QCoreApplication::translate("OriginDialog", "Latitude", nullptr));
#endif // QT_CONFIG(tooltip)
latLabel->setText(QCoreApplication::translate("OriginDialog", "Lat:", nullptr));
timeLabel->setText(QCoreApplication::translate("OriginDialog", "Time:", nullptr));
dateTimeEdit->setDisplayFormat(QCoreApplication::translate("OriginDialog", "yyyy-MM-dd hh:mm:ss", nullptr));
latUnitLabel->setText(QCoreApplication::translate("OriginDialog", "deg", nullptr));
lonUnitLabel->setText(QCoreApplication::translate("OriginDialog", "deg", nullptr));
depthUnitLabel->setText(QCoreApplication::translate("OriginDialog", "km", nullptr));
advancedGroupBox->setTitle(QCoreApplication::translate("OriginDialog", "Advanced", nullptr));
magTypeLabel->setText(QCoreApplication::translate("OriginDialog", "Magnitude Type", nullptr));
magLabel->setText(QCoreApplication::translate("OriginDialog", "Magnitude", nullptr));
#if QT_CONFIG(tooltip)
phaseCountLabel->setToolTip(QString());
#endif // QT_CONFIG(tooltip)
phaseCountLabel->setText(QCoreApplication::translate("OriginDialog", "PhaseCount", nullptr));
sendButton->setText(QCoreApplication::translate("OriginDialog", "Create", nullptr));
cancelButton->setText(QCoreApplication::translate("OriginDialog", "Cancel", nullptr));
} // retranslateUi
};
namespace Ui {
class OriginDialog: public Ui_OriginDialog {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_ORIGINDIALOG_H

View File

@ -0,0 +1,977 @@
/********************************************************************************
** Form generated from reading UI file 'originlocatorview.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_ORIGINLOCATORVIEW_H
#define UI_ORIGINLOCATORVIEW_H
#include <QtCore/QVariant>
#include <QtGui/QIcon>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QFrame>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QTableView>
#include <QtWidgets/QToolButton>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_OriginLocatorView
{
public:
QVBoxLayout *vboxLayout;
QHBoxLayout *hboxLayout;
QFrame *groupSummary;
QVBoxLayout *vboxLayout1;
QLabel *labelRegion;
QFrame *frameMap;
QFrame *groupBox;
QGridLayout *gridLayout;
QLabel *labelNumPhases;
QLabel *labelAgency;
QLabel *labelMinDistUnit;
QLabel *labelDepth;
QLabel *labelStdErrorUnit;
QLabel *lbEventID;
QLabel *labelLatitudeErrorUnit;
QLabel *labelLatitudeError;
QLabel *label_13;
QLabel *labelLongitude;
QLabel *labelCreated;
QLabel *label_11;
QLabel *labelLongitudeErrorUnit;
QLabel *labelUser;
QLabel *labelEarthModel;
QFrame *frameInfoSeparator;
QLabel *labelNumPhasesError;
QLabel *labelLatitudeUnit;
QLabel *labelStdError;
QLabel *labelLatitude;
QLabel *label_7;
QLabel *labelEventID;
QLabel *labelDepthErrorUnit;
QLabel *labelTime;
QLabel *label_12;
QLabel *lbEarthModel;
QLabel *lbMethod;
QLabel *labelMinDist;
QLabel *lbAgencyID;
QLabel *label_8;
QLabel *labelMethod;
QLabel *label_10;
QSpacerItem *spacerItem;
QLabel *label_16;
QLabel *labelNumPhasesUnit;
QLabel *lbUser;
QLabel *label_9;
QLabel *labelLongitudeError;
QLabel *labelDepthError;
QLabel *labelEvaluation;
QLabel *labelLongitudeUnit;
QLabel *label_15;
QLabel *labelAzimuthGap;
QLabel *labelDepthUnit;
QLabel *labelAzimuthGapUnit;
QLabel *lbEvaluation;
QLabel *lbComment;
QLabel *labelComment;
QFrame *groupResiduals;
QVBoxLayout *vboxLayout2;
QHBoxLayout *hboxLayout1;
QSpacerItem *spacerItem1;
QLabel *label_5;
QLabel *labelPlotFilter;
QTableView *tableArrivals;
QFrame *toolButtonGroupBox;
QGridLayout *gridLayout1;
QFrame *frameDepthType;
QHBoxLayout *hboxLayout2;
QComboBox *cbDepthType;
QFrame *frameActionsLeft;
QHBoxLayout *hboxLayout3;
QToolButton *btnRelocate;
QToolButton *btnCustom0;
QToolButton *btnCustom1;
QSpacerItem *spacerItem2;
QFrame *frameLocator;
QHBoxLayout *hboxLayout4;
QComboBox *cbLocator;
QToolButton *btnLocatorSettings;
QSpacerItem *spacerItem3;
QLabel *label_2;
QComboBox *cbLocatorProfile;
QSpacerItem *spacerItem4;
QFrame *frameFixDepth;
QHBoxLayout *hboxLayout5;
QCheckBox *cbFixedDepth;
QLineEdit *editFixedDepth;
QLabel *label_3;
QSpacerItem *spacerItem5;
QFrame *frame;
QHBoxLayout *hboxLayout6;
QCheckBox *cbDistanceCutOff;
QLineEdit *editDistanceCutOff;
QLabel *label;
QSpacerItem *spacerItem6;
QCheckBox *cbIgnoreInitialLocation;
QSpacerItem *spacerItem7;
QToolButton *buttonEditComment;
QFrame *frameActionsRight;
QHBoxLayout *hboxLayout7;
QSpacerItem *spacerItem8;
QToolButton *btnShowWaveforms;
QToolButton *btnImportAllArrivals;
QToolButton *btnMagnitudes;
QToolButton *btnCommit;
void setupUi(QWidget *OriginLocatorView)
{
if (OriginLocatorView->objectName().isEmpty())
OriginLocatorView->setObjectName(QString::fromUtf8("OriginLocatorView"));
OriginLocatorView->resize(1734, 1127);
QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(OriginLocatorView->sizePolicy().hasHeightForWidth());
OriginLocatorView->setSizePolicy(sizePolicy);
vboxLayout = new QVBoxLayout(OriginLocatorView);
vboxLayout->setSpacing(6);
vboxLayout->setContentsMargins(0, 0, 0, 0);
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
hboxLayout = new QHBoxLayout();
hboxLayout->setSpacing(6);
hboxLayout->setContentsMargins(0, 0, 0, 0);
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
groupSummary = new QFrame(OriginLocatorView);
groupSummary->setObjectName(QString::fromUtf8("groupSummary"));
QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy1.setHorizontalStretch(2);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(groupSummary->sizePolicy().hasHeightForWidth());
groupSummary->setSizePolicy(sizePolicy1);
groupSummary->setFrameShape(QFrame::NoFrame);
groupSummary->setFrameShadow(QFrame::Plain);
vboxLayout1 = new QVBoxLayout(groupSummary);
vboxLayout1->setSpacing(4);
vboxLayout1->setContentsMargins(0, 0, 0, 0);
vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1"));
labelRegion = new QLabel(groupSummary);
labelRegion->setObjectName(QString::fromUtf8("labelRegion"));
QSizePolicy sizePolicy2(QSizePolicy::Ignored, QSizePolicy::Maximum);
sizePolicy2.setHorizontalStretch(0);
sizePolicy2.setVerticalStretch(0);
sizePolicy2.setHeightForWidth(labelRegion->sizePolicy().hasHeightForWidth());
labelRegion->setSizePolicy(sizePolicy2);
QFont font;
font.setFamily(QString::fromUtf8("Sans Serif"));
font.setPointSize(14);
font.setBold(true);
font.setItalic(false);
font.setUnderline(false);
font.setWeight(75);
font.setStrikeOut(false);
labelRegion->setFont(font);
labelRegion->setFrameShape(QFrame::NoFrame);
vboxLayout1->addWidget(labelRegion);
frameMap = new QFrame(groupSummary);
frameMap->setObjectName(QString::fromUtf8("frameMap"));
QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Expanding);
sizePolicy3.setHorizontalStretch(1);
sizePolicy3.setVerticalStretch(0);
sizePolicy3.setHeightForWidth(frameMap->sizePolicy().hasHeightForWidth());
frameMap->setSizePolicy(sizePolicy3);
frameMap->setMinimumSize(QSize(120, 200));
frameMap->setMaximumSize(QSize(2000, 2000));
QPalette palette;
palette.setColor(QPalette::Active, QPalette::WindowText, QColor(0, 0, 0));
palette.setColor(QPalette::Active, QPalette::Button, QColor(221, 223, 228));
palette.setColor(QPalette::Active, QPalette::Light, QColor(255, 255, 255));
palette.setColor(QPalette::Active, QPalette::Midlight, QColor(255, 255, 255));
palette.setColor(QPalette::Active, QPalette::Dark, QColor(85, 85, 85));
palette.setColor(QPalette::Active, QPalette::Mid, QColor(199, 199, 199));
palette.setColor(QPalette::Active, QPalette::Text, QColor(0, 0, 0));
palette.setColor(QPalette::Active, QPalette::BrightText, QColor(255, 255, 255));
palette.setColor(QPalette::Active, QPalette::ButtonText, QColor(0, 0, 0));
palette.setColor(QPalette::Active, QPalette::Base, QColor(255, 255, 255));
palette.setColor(QPalette::Active, QPalette::Window, QColor(239, 239, 239));
palette.setColor(QPalette::Active, QPalette::Shadow, QColor(0, 0, 0));
palette.setColor(QPalette::Active, QPalette::Highlight, QColor(103, 141, 178));
palette.setColor(QPalette::Active, QPalette::HighlightedText, QColor(255, 255, 255));
palette.setColor(QPalette::Active, QPalette::Link, QColor(0, 0, 238));
palette.setColor(QPalette::Active, QPalette::LinkVisited, QColor(82, 24, 139));
palette.setColor(QPalette::Active, QPalette::AlternateBase, QColor(232, 232, 232));
palette.setColor(QPalette::Inactive, QPalette::WindowText, QColor(0, 0, 0));
palette.setColor(QPalette::Inactive, QPalette::Button, QColor(221, 223, 228));
palette.setColor(QPalette::Inactive, QPalette::Light, QColor(255, 255, 255));
palette.setColor(QPalette::Inactive, QPalette::Midlight, QColor(255, 255, 255));
palette.setColor(QPalette::Inactive, QPalette::Dark, QColor(85, 85, 85));
palette.setColor(QPalette::Inactive, QPalette::Mid, QColor(199, 199, 199));
palette.setColor(QPalette::Inactive, QPalette::Text, QColor(0, 0, 0));
palette.setColor(QPalette::Inactive, QPalette::BrightText, QColor(255, 255, 255));
palette.setColor(QPalette::Inactive, QPalette::ButtonText, QColor(0, 0, 0));
palette.setColor(QPalette::Inactive, QPalette::Base, QColor(255, 255, 255));
palette.setColor(QPalette::Inactive, QPalette::Window, QColor(239, 239, 239));
palette.setColor(QPalette::Inactive, QPalette::Shadow, QColor(0, 0, 0));
palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(103, 141, 178));
palette.setColor(QPalette::Inactive, QPalette::HighlightedText, QColor(255, 255, 255));
palette.setColor(QPalette::Inactive, QPalette::Link, QColor(0, 0, 238));
palette.setColor(QPalette::Inactive, QPalette::LinkVisited, QColor(82, 24, 139));
palette.setColor(QPalette::Inactive, QPalette::AlternateBase, QColor(232, 232, 232));
palette.setColor(QPalette::Disabled, QPalette::WindowText, QColor(128, 128, 128));
palette.setColor(QPalette::Disabled, QPalette::Button, QColor(221, 223, 228));
palette.setColor(QPalette::Disabled, QPalette::Light, QColor(255, 255, 255));
palette.setColor(QPalette::Disabled, QPalette::Midlight, QColor(255, 255, 255));
palette.setColor(QPalette::Disabled, QPalette::Dark, QColor(85, 85, 85));
palette.setColor(QPalette::Disabled, QPalette::Mid, QColor(199, 199, 199));
palette.setColor(QPalette::Disabled, QPalette::Text, QColor(199, 199, 199));
palette.setColor(QPalette::Disabled, QPalette::BrightText, QColor(255, 255, 255));
palette.setColor(QPalette::Disabled, QPalette::ButtonText, QColor(128, 128, 128));
palette.setColor(QPalette::Disabled, QPalette::Base, QColor(239, 239, 239));
palette.setColor(QPalette::Disabled, QPalette::Window, QColor(239, 239, 239));
palette.setColor(QPalette::Disabled, QPalette::Shadow, QColor(0, 0, 0));
palette.setColor(QPalette::Disabled, QPalette::Highlight, QColor(86, 117, 148));
palette.setColor(QPalette::Disabled, QPalette::HighlightedText, QColor(255, 255, 255));
palette.setColor(QPalette::Disabled, QPalette::Link, QColor(0, 0, 238));
palette.setColor(QPalette::Disabled, QPalette::LinkVisited, QColor(82, 24, 139));
palette.setColor(QPalette::Disabled, QPalette::AlternateBase, QColor(232, 232, 232));
frameMap->setPalette(palette);
frameMap->setFrameShape(QFrame::NoFrame);
frameMap->setFrameShadow(QFrame::Plain);
vboxLayout1->addWidget(frameMap);
hboxLayout->addWidget(groupSummary);
groupBox = new QFrame(OriginLocatorView);
groupBox->setObjectName(QString::fromUtf8("groupBox"));
QSizePolicy sizePolicy4(QSizePolicy::Maximum, QSizePolicy::Preferred);
sizePolicy4.setHorizontalStretch(1);
sizePolicy4.setVerticalStretch(0);
sizePolicy4.setHeightForWidth(groupBox->sizePolicy().hasHeightForWidth());
groupBox->setSizePolicy(sizePolicy4);
gridLayout = new QGridLayout(groupBox);
gridLayout->setSpacing(6);
gridLayout->setContentsMargins(9, 9, 9, 9);
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
labelNumPhases = new QLabel(groupBox);
labelNumPhases->setObjectName(QString::fromUtf8("labelNumPhases"));
labelNumPhases->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(labelNumPhases, 4, 1, 1, 1);
labelAgency = new QLabel(groupBox);
labelAgency->setObjectName(QString::fromUtf8("labelAgency"));
QSizePolicy sizePolicy5(QSizePolicy::Ignored, QSizePolicy::Preferred);
sizePolicy5.setHorizontalStretch(0);
sizePolicy5.setVerticalStretch(0);
sizePolicy5.setHeightForWidth(labelAgency->sizePolicy().hasHeightForWidth());
labelAgency->setSizePolicy(sizePolicy5);
gridLayout->addWidget(labelAgency, 12, 1, 1, 4);
labelMinDistUnit = new QLabel(groupBox);
labelMinDistUnit->setObjectName(QString::fromUtf8("labelMinDistUnit"));
gridLayout->addWidget(labelMinDistUnit, 8, 2, 1, 1);
labelDepth = new QLabel(groupBox);
labelDepth->setObjectName(QString::fromUtf8("labelDepth"));
labelDepth->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(labelDepth, 1, 1, 1, 1);
labelStdErrorUnit = new QLabel(groupBox);
labelStdErrorUnit->setObjectName(QString::fromUtf8("labelStdErrorUnit"));
gridLayout->addWidget(labelStdErrorUnit, 5, 2, 1, 1);
lbEventID = new QLabel(groupBox);
lbEventID->setObjectName(QString::fromUtf8("lbEventID"));
lbEventID->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(lbEventID, 11, 0, 1, 1);
labelLatitudeErrorUnit = new QLabel(groupBox);
labelLatitudeErrorUnit->setObjectName(QString::fromUtf8("labelLatitudeErrorUnit"));
gridLayout->addWidget(labelLatitudeErrorUnit, 2, 4, 1, 1);
labelLatitudeError = new QLabel(groupBox);
labelLatitudeError->setObjectName(QString::fromUtf8("labelLatitudeError"));
labelLatitudeError->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
gridLayout->addWidget(labelLatitudeError, 2, 3, 1, 1);
label_13 = new QLabel(groupBox);
label_13->setObjectName(QString::fromUtf8("label_13"));
label_13->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_13, 5, 0, 1, 1);
labelLongitude = new QLabel(groupBox);
labelLongitude->setObjectName(QString::fromUtf8("labelLongitude"));
labelLongitude->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(labelLongitude, 3, 1, 1, 1);
labelCreated = new QLabel(groupBox);
labelCreated->setObjectName(QString::fromUtf8("labelCreated"));
gridLayout->addWidget(labelCreated, 17, 1, 1, 4);
label_11 = new QLabel(groupBox);
label_11->setObjectName(QString::fromUtf8("label_11"));
label_11->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_11, 3, 0, 1, 1);
labelLongitudeErrorUnit = new QLabel(groupBox);
labelLongitudeErrorUnit->setObjectName(QString::fromUtf8("labelLongitudeErrorUnit"));
gridLayout->addWidget(labelLongitudeErrorUnit, 3, 4, 1, 1);
labelUser = new QLabel(groupBox);
labelUser->setObjectName(QString::fromUtf8("labelUser"));
sizePolicy5.setHeightForWidth(labelUser->sizePolicy().hasHeightForWidth());
labelUser->setSizePolicy(sizePolicy5);
gridLayout->addWidget(labelUser, 13, 1, 1, 4);
labelEarthModel = new QLabel(groupBox);
labelEarthModel->setObjectName(QString::fromUtf8("labelEarthModel"));
sizePolicy5.setHeightForWidth(labelEarthModel->sizePolicy().hasHeightForWidth());
labelEarthModel->setSizePolicy(sizePolicy5);
gridLayout->addWidget(labelEarthModel, 16, 1, 1, 4);
frameInfoSeparator = new QFrame(groupBox);
frameInfoSeparator->setObjectName(QString::fromUtf8("frameInfoSeparator"));
frameInfoSeparator->setFrameShape(QFrame::HLine);
frameInfoSeparator->setFrameShadow(QFrame::Sunken);
gridLayout->addWidget(frameInfoSeparator, 10, 0, 1, 5);
labelNumPhasesError = new QLabel(groupBox);
labelNumPhasesError->setObjectName(QString::fromUtf8("labelNumPhasesError"));
labelNumPhasesError->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
gridLayout->addWidget(labelNumPhasesError, 4, 3, 1, 1);
labelLatitudeUnit = new QLabel(groupBox);
labelLatitudeUnit->setObjectName(QString::fromUtf8("labelLatitudeUnit"));
gridLayout->addWidget(labelLatitudeUnit, 2, 2, 1, 1);
labelStdError = new QLabel(groupBox);
labelStdError->setObjectName(QString::fromUtf8("labelStdError"));
labelStdError->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(labelStdError, 5, 1, 1, 1);
labelLatitude = new QLabel(groupBox);
labelLatitude->setObjectName(QString::fromUtf8("labelLatitude"));
labelLatitude->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(labelLatitude, 2, 1, 1, 1);
label_7 = new QLabel(groupBox);
label_7->setObjectName(QString::fromUtf8("label_7"));
label_7->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_7, 7, 0, 1, 1);
labelEventID = new QLabel(groupBox);
labelEventID->setObjectName(QString::fromUtf8("labelEventID"));
sizePolicy5.setHeightForWidth(labelEventID->sizePolicy().hasHeightForWidth());
labelEventID->setSizePolicy(sizePolicy5);
gridLayout->addWidget(labelEventID, 11, 1, 1, 4);
labelDepthErrorUnit = new QLabel(groupBox);
labelDepthErrorUnit->setObjectName(QString::fromUtf8("labelDepthErrorUnit"));
gridLayout->addWidget(labelDepthErrorUnit, 1, 4, 1, 1);
labelTime = new QLabel(groupBox);
labelTime->setObjectName(QString::fromUtf8("labelTime"));
labelTime->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
gridLayout->addWidget(labelTime, 0, 1, 1, 4);
label_12 = new QLabel(groupBox);
label_12->setObjectName(QString::fromUtf8("label_12"));
label_12->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_12, 1, 0, 1, 1);
lbEarthModel = new QLabel(groupBox);
lbEarthModel->setObjectName(QString::fromUtf8("lbEarthModel"));
lbEarthModel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(lbEarthModel, 16, 0, 1, 1);
lbMethod = new QLabel(groupBox);
lbMethod->setObjectName(QString::fromUtf8("lbMethod"));
lbMethod->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(lbMethod, 15, 0, 1, 1);
labelMinDist = new QLabel(groupBox);
labelMinDist->setObjectName(QString::fromUtf8("labelMinDist"));
labelMinDist->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(labelMinDist, 8, 1, 1, 1);
lbAgencyID = new QLabel(groupBox);
lbAgencyID->setObjectName(QString::fromUtf8("lbAgencyID"));
lbAgencyID->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(lbAgencyID, 12, 0, 1, 1);
label_8 = new QLabel(groupBox);
label_8->setObjectName(QString::fromUtf8("label_8"));
label_8->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_8, 4, 0, 1, 1);
labelMethod = new QLabel(groupBox);
labelMethod->setObjectName(QString::fromUtf8("labelMethod"));
sizePolicy5.setHeightForWidth(labelMethod->sizePolicy().hasHeightForWidth());
labelMethod->setSizePolicy(sizePolicy5);
gridLayout->addWidget(labelMethod, 15, 1, 1, 4);
label_10 = new QLabel(groupBox);
label_10->setObjectName(QString::fromUtf8("label_10"));
label_10->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_10, 2, 0, 1, 1);
spacerItem = new QSpacerItem(201, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
gridLayout->addItem(spacerItem, 9, 0, 1, 5);
label_16 = new QLabel(groupBox);
label_16->setObjectName(QString::fromUtf8("label_16"));
label_16->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_16, 17, 0, 1, 1);
labelNumPhasesUnit = new QLabel(groupBox);
labelNumPhasesUnit->setObjectName(QString::fromUtf8("labelNumPhasesUnit"));
labelNumPhasesUnit->setAlignment(Qt::AlignCenter);
gridLayout->addWidget(labelNumPhasesUnit, 4, 2, 1, 1);
lbUser = new QLabel(groupBox);
lbUser->setObjectName(QString::fromUtf8("lbUser"));
lbUser->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(lbUser, 13, 0, 1, 1);
label_9 = new QLabel(groupBox);
label_9->setObjectName(QString::fromUtf8("label_9"));
label_9->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_9, 8, 0, 1, 1);
labelLongitudeError = new QLabel(groupBox);
labelLongitudeError->setObjectName(QString::fromUtf8("labelLongitudeError"));
labelLongitudeError->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
gridLayout->addWidget(labelLongitudeError, 3, 3, 1, 1);
labelDepthError = new QLabel(groupBox);
labelDepthError->setObjectName(QString::fromUtf8("labelDepthError"));
labelDepthError->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
gridLayout->addWidget(labelDepthError, 1, 3, 1, 1);
labelEvaluation = new QLabel(groupBox);
labelEvaluation->setObjectName(QString::fromUtf8("labelEvaluation"));
gridLayout->addWidget(labelEvaluation, 14, 1, 1, 4);
labelLongitudeUnit = new QLabel(groupBox);
labelLongitudeUnit->setObjectName(QString::fromUtf8("labelLongitudeUnit"));
gridLayout->addWidget(labelLongitudeUnit, 3, 2, 1, 1);
label_15 = new QLabel(groupBox);
label_15->setObjectName(QString::fromUtf8("label_15"));
label_15->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(label_15, 0, 0, 1, 1);
labelAzimuthGap = new QLabel(groupBox);
labelAzimuthGap->setObjectName(QString::fromUtf8("labelAzimuthGap"));
labelAzimuthGap->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(labelAzimuthGap, 7, 1, 1, 1);
labelDepthUnit = new QLabel(groupBox);
labelDepthUnit->setObjectName(QString::fromUtf8("labelDepthUnit"));
gridLayout->addWidget(labelDepthUnit, 1, 2, 1, 1);
labelAzimuthGapUnit = new QLabel(groupBox);
labelAzimuthGapUnit->setObjectName(QString::fromUtf8("labelAzimuthGapUnit"));
gridLayout->addWidget(labelAzimuthGapUnit, 7, 2, 1, 1);
lbEvaluation = new QLabel(groupBox);
lbEvaluation->setObjectName(QString::fromUtf8("lbEvaluation"));
lbEvaluation->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(lbEvaluation, 14, 0, 1, 1);
lbComment = new QLabel(groupBox);
lbComment->setObjectName(QString::fromUtf8("lbComment"));
lbComment->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(lbComment, 6, 0, 1, 1);
labelComment = new QLabel(groupBox);
labelComment->setObjectName(QString::fromUtf8("labelComment"));
labelComment->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
gridLayout->addWidget(labelComment, 6, 1, 1, 1);
hboxLayout->addWidget(groupBox);
groupResiduals = new QFrame(OriginLocatorView);
groupResiduals->setObjectName(QString::fromUtf8("groupResiduals"));
sizePolicy1.setHeightForWidth(groupResiduals->sizePolicy().hasHeightForWidth());
groupResiduals->setSizePolicy(sizePolicy1);
groupResiduals->setFrameShape(QFrame::NoFrame);
vboxLayout2 = new QVBoxLayout(groupResiduals);
vboxLayout2->setSpacing(4);
vboxLayout2->setContentsMargins(0, 0, 0, 0);
vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2"));
hboxLayout1 = new QHBoxLayout();
hboxLayout1->setSpacing(6);
hboxLayout1->setContentsMargins(0, 0, 0, 0);
hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
spacerItem1 = new QSpacerItem(40, 4, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout1->addItem(spacerItem1);
label_5 = new QLabel(groupResiduals);
label_5->setObjectName(QString::fromUtf8("label_5"));
QSizePolicy sizePolicy6(QSizePolicy::Preferred, QSizePolicy::Maximum);
sizePolicy6.setHorizontalStretch(0);
sizePolicy6.setVerticalStretch(0);
sizePolicy6.setHeightForWidth(label_5->sizePolicy().hasHeightForWidth());
label_5->setSizePolicy(sizePolicy6);
hboxLayout1->addWidget(label_5);
labelPlotFilter = new QLabel(groupResiduals);
labelPlotFilter->setObjectName(QString::fromUtf8("labelPlotFilter"));
sizePolicy6.setHeightForWidth(labelPlotFilter->sizePolicy().hasHeightForWidth());
labelPlotFilter->setSizePolicy(sizePolicy6);
hboxLayout1->addWidget(labelPlotFilter);
vboxLayout2->addLayout(hboxLayout1);
hboxLayout->addWidget(groupResiduals);
vboxLayout->addLayout(hboxLayout);
tableArrivals = new QTableView(OriginLocatorView);
tableArrivals->setObjectName(QString::fromUtf8("tableArrivals"));
tableArrivals->setFrameShape(QFrame::NoFrame);
tableArrivals->setFrameShadow(QFrame::Plain);
tableArrivals->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
tableArrivals->setAlternatingRowColors(true);
tableArrivals->setSelectionMode(QAbstractItemView::SingleSelection);
tableArrivals->setSelectionBehavior(QAbstractItemView::SelectRows);
vboxLayout->addWidget(tableArrivals);
toolButtonGroupBox = new QFrame(OriginLocatorView);
toolButtonGroupBox->setObjectName(QString::fromUtf8("toolButtonGroupBox"));
sizePolicy6.setHeightForWidth(toolButtonGroupBox->sizePolicy().hasHeightForWidth());
toolButtonGroupBox->setSizePolicy(sizePolicy6);
toolButtonGroupBox->setFrameShape(QFrame::NoFrame);
gridLayout1 = new QGridLayout(toolButtonGroupBox);
gridLayout1->setSpacing(6);
gridLayout1->setContentsMargins(0, 0, 0, 0);
gridLayout1->setObjectName(QString::fromUtf8("gridLayout1"));
frameDepthType = new QFrame(toolButtonGroupBox);
frameDepthType->setObjectName(QString::fromUtf8("frameDepthType"));
frameDepthType->setFrameShape(QFrame::NoFrame);
frameDepthType->setFrameShadow(QFrame::Raised);
hboxLayout2 = new QHBoxLayout(frameDepthType);
hboxLayout2->setSpacing(6);
hboxLayout2->setContentsMargins(0, 0, 0, 0);
hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
cbDepthType = new QComboBox(frameDepthType);
cbDepthType->setObjectName(QString::fromUtf8("cbDepthType"));
cbDepthType->setEnabled(false);
hboxLayout2->addWidget(cbDepthType);
gridLayout1->addWidget(frameDepthType, 1, 1, 1, 1);
frameActionsLeft = new QFrame(toolButtonGroupBox);
frameActionsLeft->setObjectName(QString::fromUtf8("frameActionsLeft"));
sizePolicy.setHeightForWidth(frameActionsLeft->sizePolicy().hasHeightForWidth());
frameActionsLeft->setSizePolicy(sizePolicy);
frameActionsLeft->setFrameShape(QFrame::NoFrame);
frameActionsLeft->setFrameShadow(QFrame::Raised);
hboxLayout3 = new QHBoxLayout(frameActionsLeft);
hboxLayout3->setSpacing(6);
hboxLayout3->setContentsMargins(0, 0, 0, 0);
hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3"));
btnRelocate = new QToolButton(frameActionsLeft);
btnRelocate->setObjectName(QString::fromUtf8("btnRelocate"));
btnRelocate->setEnabled(false);
hboxLayout3->addWidget(btnRelocate);
btnCustom0 = new QToolButton(frameActionsLeft);
btnCustom0->setObjectName(QString::fromUtf8("btnCustom0"));
btnCustom0->setEnabled(false);
hboxLayout3->addWidget(btnCustom0);
btnCustom1 = new QToolButton(frameActionsLeft);
btnCustom1->setObjectName(QString::fromUtf8("btnCustom1"));
btnCustom1->setEnabled(false);
hboxLayout3->addWidget(btnCustom1);
spacerItem2 = new QSpacerItem(31, 24, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout3->addItem(spacerItem2);
gridLayout1->addWidget(frameActionsLeft, 1, 0, 1, 1);
frameLocator = new QFrame(toolButtonGroupBox);
frameLocator->setObjectName(QString::fromUtf8("frameLocator"));
sizePolicy.setHeightForWidth(frameLocator->sizePolicy().hasHeightForWidth());
frameLocator->setSizePolicy(sizePolicy);
frameLocator->setFrameShape(QFrame::NoFrame);
frameLocator->setFrameShadow(QFrame::Raised);
hboxLayout4 = new QHBoxLayout(frameLocator);
hboxLayout4->setSpacing(6);
hboxLayout4->setContentsMargins(0, 0, 0, 0);
hboxLayout4->setObjectName(QString::fromUtf8("hboxLayout4"));
cbLocator = new QComboBox(frameLocator);
cbLocator->setObjectName(QString::fromUtf8("cbLocator"));
cbLocator->setEnabled(false);
hboxLayout4->addWidget(cbLocator);
btnLocatorSettings = new QToolButton(frameLocator);
btnLocatorSettings->setObjectName(QString::fromUtf8("btnLocatorSettings"));
btnLocatorSettings->setEnabled(false);
const QIcon icon = QIcon(QString::fromUtf8(":/icons/icons/configure.png"));
btnLocatorSettings->setIcon(icon);
btnLocatorSettings->setAutoRaise(true);
hboxLayout4->addWidget(btnLocatorSettings);
spacerItem3 = new QSpacerItem(20, 27, QSizePolicy::Fixed, QSizePolicy::Minimum);
hboxLayout4->addItem(spacerItem3);
label_2 = new QLabel(frameLocator);
label_2->setObjectName(QString::fromUtf8("label_2"));
hboxLayout4->addWidget(label_2);
cbLocatorProfile = new QComboBox(frameLocator);
cbLocatorProfile->setObjectName(QString::fromUtf8("cbLocatorProfile"));
cbLocatorProfile->setEnabled(false);
cbLocatorProfile->setSizeAdjustPolicy(QComboBox::AdjustToContents);
hboxLayout4->addWidget(cbLocatorProfile);
spacerItem4 = new QSpacerItem(20, 27, QSizePolicy::Fixed, QSizePolicy::Minimum);
hboxLayout4->addItem(spacerItem4);
gridLayout1->addWidget(frameLocator, 0, 0, 1, 1);
frameFixDepth = new QFrame(toolButtonGroupBox);
frameFixDepth->setObjectName(QString::fromUtf8("frameFixDepth"));
frameFixDepth->setFrameShape(QFrame::NoFrame);
frameFixDepth->setFrameShadow(QFrame::Raised);
hboxLayout5 = new QHBoxLayout(frameFixDepth);
hboxLayout5->setSpacing(6);
hboxLayout5->setContentsMargins(0, 0, 0, 0);
hboxLayout5->setObjectName(QString::fromUtf8("hboxLayout5"));
cbFixedDepth = new QCheckBox(frameFixDepth);
cbFixedDepth->setObjectName(QString::fromUtf8("cbFixedDepth"));
QSizePolicy sizePolicy7(QSizePolicy::Maximum, QSizePolicy::Fixed);
sizePolicy7.setHorizontalStretch(0);
sizePolicy7.setVerticalStretch(0);
sizePolicy7.setHeightForWidth(cbFixedDepth->sizePolicy().hasHeightForWidth());
cbFixedDepth->setSizePolicy(sizePolicy7);
hboxLayout5->addWidget(cbFixedDepth);
editFixedDepth = new QLineEdit(frameFixDepth);
editFixedDepth->setObjectName(QString::fromUtf8("editFixedDepth"));
editFixedDepth->setEnabled(false);
QSizePolicy sizePolicy8(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
sizePolicy8.setHorizontalStretch(0);
sizePolicy8.setVerticalStretch(0);
sizePolicy8.setHeightForWidth(editFixedDepth->sizePolicy().hasHeightForWidth());
editFixedDepth->setSizePolicy(sizePolicy8);
editFixedDepth->setMinimumSize(QSize(60, 0));
editFixedDepth->setAlignment(Qt::AlignRight);
hboxLayout5->addWidget(editFixedDepth);
label_3 = new QLabel(frameFixDepth);
label_3->setObjectName(QString::fromUtf8("label_3"));
QSizePolicy sizePolicy9(QSizePolicy::Maximum, QSizePolicy::Preferred);
sizePolicy9.setHorizontalStretch(0);
sizePolicy9.setVerticalStretch(0);
sizePolicy9.setHeightForWidth(label_3->sizePolicy().hasHeightForWidth());
label_3->setSizePolicy(sizePolicy9);
hboxLayout5->addWidget(label_3);
spacerItem5 = new QSpacerItem(20, 20, QSizePolicy::Maximum, QSizePolicy::Minimum);
hboxLayout5->addItem(spacerItem5);
gridLayout1->addWidget(frameFixDepth, 0, 1, 1, 1);
frame = new QFrame(toolButtonGroupBox);
frame->setObjectName(QString::fromUtf8("frame"));
QSizePolicy sizePolicy10(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy10.setHorizontalStretch(1);
sizePolicy10.setVerticalStretch(0);
sizePolicy10.setHeightForWidth(frame->sizePolicy().hasHeightForWidth());
frame->setSizePolicy(sizePolicy10);
frame->setFrameShape(QFrame::NoFrame);
frame->setFrameShadow(QFrame::Raised);
hboxLayout6 = new QHBoxLayout(frame);
hboxLayout6->setSpacing(6);
hboxLayout6->setContentsMargins(0, 0, 0, 0);
hboxLayout6->setObjectName(QString::fromUtf8("hboxLayout6"));
cbDistanceCutOff = new QCheckBox(frame);
cbDistanceCutOff->setObjectName(QString::fromUtf8("cbDistanceCutOff"));
hboxLayout6->addWidget(cbDistanceCutOff);
editDistanceCutOff = new QLineEdit(frame);
editDistanceCutOff->setObjectName(QString::fromUtf8("editDistanceCutOff"));
editDistanceCutOff->setEnabled(false);
editDistanceCutOff->setMinimumSize(QSize(60, 0));
editDistanceCutOff->setMaximumSize(QSize(60, 16777215));
editDistanceCutOff->setAlignment(Qt::AlignRight);
hboxLayout6->addWidget(editDistanceCutOff);
label = new QLabel(frame);
label->setObjectName(QString::fromUtf8("label"));
hboxLayout6->addWidget(label);
spacerItem6 = new QSpacerItem(20, 27, QSizePolicy::Fixed, QSizePolicy::Minimum);
hboxLayout6->addItem(spacerItem6);
cbIgnoreInitialLocation = new QCheckBox(frame);
cbIgnoreInitialLocation->setObjectName(QString::fromUtf8("cbIgnoreInitialLocation"));
hboxLayout6->addWidget(cbIgnoreInitialLocation);
spacerItem7 = new QSpacerItem(120, 27, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout6->addItem(spacerItem7);
buttonEditComment = new QToolButton(frame);
buttonEditComment->setObjectName(QString::fromUtf8("buttonEditComment"));
buttonEditComment->setEnabled(false);
buttonEditComment->setMaximumSize(QSize(25, 25));
const QIcon icon1 = QIcon(QString::fromUtf8(":/icons/icons/comment.png"));
buttonEditComment->setIcon(icon1);
buttonEditComment->setIconSize(QSize(24, 24));
buttonEditComment->setAutoRaise(true);
hboxLayout6->addWidget(buttonEditComment);
gridLayout1->addWidget(frame, 0, 2, 1, 1);
frameActionsRight = new QFrame(toolButtonGroupBox);
frameActionsRight->setObjectName(QString::fromUtf8("frameActionsRight"));
sizePolicy10.setHeightForWidth(frameActionsRight->sizePolicy().hasHeightForWidth());
frameActionsRight->setSizePolicy(sizePolicy10);
frameActionsRight->setFrameShape(QFrame::NoFrame);
frameActionsRight->setFrameShadow(QFrame::Raised);
hboxLayout7 = new QHBoxLayout(frameActionsRight);
hboxLayout7->setSpacing(6);
hboxLayout7->setContentsMargins(0, 0, 0, 0);
hboxLayout7->setObjectName(QString::fromUtf8("hboxLayout7"));
spacerItem8 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout7->addItem(spacerItem8);
btnShowWaveforms = new QToolButton(frameActionsRight);
btnShowWaveforms->setObjectName(QString::fromUtf8("btnShowWaveforms"));
btnShowWaveforms->setEnabled(false);
hboxLayout7->addWidget(btnShowWaveforms);
btnImportAllArrivals = new QToolButton(frameActionsRight);
btnImportAllArrivals->setObjectName(QString::fromUtf8("btnImportAllArrivals"));
btnImportAllArrivals->setEnabled(false);
hboxLayout7->addWidget(btnImportAllArrivals);
btnMagnitudes = new QToolButton(frameActionsRight);
btnMagnitudes->setObjectName(QString::fromUtf8("btnMagnitudes"));
btnMagnitudes->setEnabled(false);
hboxLayout7->addWidget(btnMagnitudes);
btnCommit = new QToolButton(frameActionsRight);
btnCommit->setObjectName(QString::fromUtf8("btnCommit"));
btnCommit->setEnabled(false);
hboxLayout7->addWidget(btnCommit);
gridLayout1->addWidget(frameActionsRight, 1, 2, 1, 1);
vboxLayout->addWidget(toolButtonGroupBox);
QWidget::setTabOrder(tableArrivals, cbLocator);
QWidget::setTabOrder(cbLocator, btnLocatorSettings);
QWidget::setTabOrder(btnLocatorSettings, cbLocatorProfile);
QWidget::setTabOrder(cbLocatorProfile, cbFixedDepth);
QWidget::setTabOrder(cbFixedDepth, editFixedDepth);
QWidget::setTabOrder(editFixedDepth, cbDistanceCutOff);
QWidget::setTabOrder(cbDistanceCutOff, editDistanceCutOff);
retranslateUi(OriginLocatorView);
QObject::connect(cbFixedDepth, SIGNAL(toggled(bool)), editFixedDepth, SLOT(setEnabled(bool)));
QObject::connect(cbFixedDepth, SIGNAL(toggled(bool)), cbDepthType, SLOT(setEnabled(bool)));
QObject::connect(cbDistanceCutOff, SIGNAL(toggled(bool)), editDistanceCutOff, SLOT(setEnabled(bool)));
QMetaObject::connectSlotsByName(OriginLocatorView);
} // setupUi
void retranslateUi(QWidget *OriginLocatorView)
{
OriginLocatorView->setWindowTitle(QCoreApplication::translate("OriginLocatorView", "OriginLocatorView", nullptr));
labelRegion->setText(QCoreApplication::translate("OriginLocatorView", "Region", nullptr));
labelNumPhases->setText(QCoreApplication::translate("OriginLocatorView", "-", nullptr));
labelAgency->setText(QCoreApplication::translate("OriginLocatorView", "GFZ Potsdam", nullptr));
labelMinDistUnit->setText(QCoreApplication::translate("OriginLocatorView", "\302\260", nullptr));
labelDepth->setText(QCoreApplication::translate("OriginLocatorView", "-", nullptr));
labelStdErrorUnit->setText(QCoreApplication::translate("OriginLocatorView", "s", nullptr));
lbEventID->setText(QCoreApplication::translate("OriginLocatorView", "EventID:", nullptr));
labelLatitudeErrorUnit->setText(QCoreApplication::translate("OriginLocatorView", "km", nullptr));
labelLatitudeError->setText(QCoreApplication::translate("OriginLocatorView", "-", nullptr));
label_13->setText(QCoreApplication::translate("OriginLocatorView", "RMS Res.:", nullptr));
labelLongitude->setText(QCoreApplication::translate("OriginLocatorView", "-", nullptr));
labelCreated->setText(QString());
label_11->setText(QCoreApplication::translate("OriginLocatorView", "Lon:", nullptr));
labelLongitudeErrorUnit->setText(QCoreApplication::translate("OriginLocatorView", "km", nullptr));
labelUser->setText(QString());
labelEarthModel->setText(QString());
labelNumPhasesError->setText(QCoreApplication::translate("OriginLocatorView", "-", nullptr));
labelLatitudeUnit->setText(QCoreApplication::translate("OriginLocatorView", "\302\260", nullptr));
labelStdError->setText(QCoreApplication::translate("OriginLocatorView", "-", nullptr));
labelLatitude->setText(QCoreApplication::translate("OriginLocatorView", "-", nullptr));
label_7->setText(QCoreApplication::translate("OriginLocatorView", " Az. Gap:", nullptr));
labelEventID->setText(QString());
labelDepthErrorUnit->setText(QString());
labelTime->setText(QString());
label_12->setText(QCoreApplication::translate("OriginLocatorView", "Depth:", nullptr));
lbEarthModel->setText(QCoreApplication::translate("OriginLocatorView", "Earth model:", nullptr));
lbMethod->setText(QCoreApplication::translate("OriginLocatorView", "Method:", nullptr));
labelMinDist->setText(QCoreApplication::translate("OriginLocatorView", "-", nullptr));
lbAgencyID->setText(QCoreApplication::translate("OriginLocatorView", "Agency:", nullptr));
label_8->setText(QCoreApplication::translate("OriginLocatorView", "Phases:", nullptr));
labelMethod->setText(QString());
label_10->setText(QCoreApplication::translate("OriginLocatorView", "Lat:", nullptr));
label_16->setText(QCoreApplication::translate("OriginLocatorView", "Updated:", nullptr));
labelNumPhasesUnit->setText(QCoreApplication::translate("OriginLocatorView", "/", nullptr));
lbUser->setText(QCoreApplication::translate("OriginLocatorView", "Author:", nullptr));
label_9->setText(QCoreApplication::translate("OriginLocatorView", "Min. Dist.:", nullptr));
labelLongitudeError->setText(QCoreApplication::translate("OriginLocatorView", "-", nullptr));
labelDepthError->setText(QString());
labelEvaluation->setText(QCoreApplication::translate("OriginLocatorView", "- (-)", nullptr));
labelLongitudeUnit->setText(QCoreApplication::translate("OriginLocatorView", "\302\260", nullptr));
label_15->setText(QCoreApplication::translate("OriginLocatorView", "Time:", nullptr));
labelAzimuthGap->setText(QCoreApplication::translate("OriginLocatorView", "-", nullptr));
labelDepthUnit->setText(QCoreApplication::translate("OriginLocatorView", "km", nullptr));
labelAzimuthGapUnit->setText(QCoreApplication::translate("OriginLocatorView", "\302\260", nullptr));
lbEvaluation->setText(QCoreApplication::translate("OriginLocatorView", "Evaluation:", nullptr));
lbComment->setText(QCoreApplication::translate("OriginLocatorView", "Custom:", nullptr));
labelComment->setText(QCoreApplication::translate("OriginLocatorView", "-", nullptr));
label_5->setText(QCoreApplication::translate("OriginLocatorView", "Filter is", nullptr));
labelPlotFilter->setText(QCoreApplication::translate("OriginLocatorView", "<a href=\"filter\">not active</a>", nullptr));
btnRelocate->setText(QCoreApplication::translate("OriginLocatorView", "Relocate", nullptr));
btnCustom0->setText(QCoreApplication::translate("OriginLocatorView", "Custom1", nullptr));
btnCustom1->setText(QCoreApplication::translate("OriginLocatorView", "Custom2", nullptr));
#if QT_CONFIG(tooltip)
btnLocatorSettings->setToolTip(QCoreApplication::translate("OriginLocatorView", "Change locator settings", nullptr));
#endif // QT_CONFIG(tooltip)
btnLocatorSettings->setText(QCoreApplication::translate("OriginLocatorView", "...", nullptr));
label_2->setText(QCoreApplication::translate("OriginLocatorView", "Profile:", nullptr));
cbFixedDepth->setText(QCoreApplication::translate("OriginLocatorView", "Fix depth", nullptr));
label_3->setText(QCoreApplication::translate("OriginLocatorView", "km", nullptr));
cbDistanceCutOff->setText(QCoreApplication::translate("OriginLocatorView", "Distance cutoff", nullptr));
label->setText(QCoreApplication::translate("OriginLocatorView", "km", nullptr));
#if QT_CONFIG(tooltip)
cbIgnoreInitialLocation->setToolTip(QCoreApplication::translate("OriginLocatorView", "Instructs the locator to ignore the passed initial location and to try to locate the event based on the given phases only.", nullptr));
#endif // QT_CONFIG(tooltip)
#if QT_CONFIG(whatsthis)
cbIgnoreInitialLocation->setWhatsThis(QCoreApplication::translate("OriginLocatorView", "Instructs the locator to ignore the passed initial location and to try to locate the event based on the given phases only.", nullptr));
#endif // QT_CONFIG(whatsthis)
cbIgnoreInitialLocation->setText(QCoreApplication::translate("OriginLocatorView", "Ignore initial location", nullptr));
#if QT_CONFIG(tooltip)
buttonEditComment->setToolTip(QCoreApplication::translate("OriginLocatorView", "Create a new comment on this event or edit an existing one.", nullptr));
#endif // QT_CONFIG(tooltip)
buttonEditComment->setText(QString());
btnShowWaveforms->setText(QCoreApplication::translate("OriginLocatorView", "Picker", nullptr));
btnImportAllArrivals->setText(QCoreApplication::translate("OriginLocatorView", "Import picks", nullptr));
btnMagnitudes->setText(QCoreApplication::translate("OriginLocatorView", "Compute magnitudes", nullptr));
btnCommit->setText(QCoreApplication::translate("OriginLocatorView", "Commit", nullptr));
} // retranslateUi
};
namespace Ui {
class OriginLocatorView: public Ui_OriginLocatorView {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_ORIGINLOCATORVIEW_H

View File

@ -0,0 +1,205 @@
/********************************************************************************
** Form generated from reading UI file 'originlocatorview_comment.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_ORIGINLOCATORVIEW_COMMENT_H
#define UI_ORIGINLOCATORVIEW_COMMENT_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <QtWidgets/QFrame>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QTextEdit>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_OriginCommentOptions
{
public:
QVBoxLayout *vboxLayout;
QHBoxLayout *hboxLayout;
QVBoxLayout *vboxLayout1;
QLabel *labelHeadline;
QSpacerItem *spacerItem;
QVBoxLayout *vboxLayout2;
QSpacerItem *verticalSpacerTop;
QHBoxLayout *hboxLayout1;
QLabel *labelAuthor;
QSpacerItem *spacerItem1;
QLabel *labelDate;
QSpacerItem *verticalSpacerBottom;
QFrame *frame;
QTextEdit *editComment;
QHBoxLayout *hboxLayout2;
QSpacerItem *spacerItem2;
QPushButton *okButton;
QPushButton *cancelButton;
void setupUi(QDialog *OriginCommentOptions)
{
if (OriginCommentOptions->objectName().isEmpty())
OriginCommentOptions->setObjectName(QString::fromUtf8("OriginCommentOptions"));
OriginCommentOptions->resize(546, 320);
vboxLayout = new QVBoxLayout(OriginCommentOptions);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
hboxLayout = new QHBoxLayout();
hboxLayout->setSpacing(12);
#ifndef Q_OS_MAC
hboxLayout->setContentsMargins(0, 0, 0, 0);
#endif
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
vboxLayout1 = new QVBoxLayout();
#ifndef Q_OS_MAC
vboxLayout1->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout1->setContentsMargins(0, 0, 0, 0);
#endif
vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1"));
labelHeadline = new QLabel(OriginCommentOptions);
labelHeadline->setObjectName(QString::fromUtf8("labelHeadline"));
labelHeadline->setEnabled(false);
QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(labelHeadline->sizePolicy().hasHeightForWidth());
labelHeadline->setSizePolicy(sizePolicy);
labelHeadline->setPixmap(QPixmap(QString::fromUtf8(":/icons/icons/comment.png")));
labelHeadline->setScaledContents(false);
vboxLayout1->addWidget(labelHeadline);
spacerItem = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
vboxLayout1->addItem(spacerItem);
hboxLayout->addLayout(vboxLayout1);
vboxLayout2 = new QVBoxLayout();
vboxLayout2->setSpacing(0);
vboxLayout2->setContentsMargins(0, 0, 0, 0);
vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2"));
verticalSpacerTop = new QSpacerItem(10, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
vboxLayout2->addItem(verticalSpacerTop);
hboxLayout1 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout1->setSpacing(6);
#endif
#ifndef Q_OS_MAC
hboxLayout1->setContentsMargins(0, 0, 0, 0);
#endif
hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
labelAuthor = new QLabel(OriginCommentOptions);
labelAuthor->setObjectName(QString::fromUtf8("labelAuthor"));
hboxLayout1->addWidget(labelAuthor);
spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout1->addItem(spacerItem1);
labelDate = new QLabel(OriginCommentOptions);
labelDate->setObjectName(QString::fromUtf8("labelDate"));
hboxLayout1->addWidget(labelDate);
vboxLayout2->addLayout(hboxLayout1);
verticalSpacerBottom = new QSpacerItem(10, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
vboxLayout2->addItem(verticalSpacerBottom);
hboxLayout->addLayout(vboxLayout2);
vboxLayout->addLayout(hboxLayout);
frame = new QFrame(OriginCommentOptions);
frame->setObjectName(QString::fromUtf8("frame"));
frame->setFrameShape(QFrame::HLine);
frame->setFrameShadow(QFrame::Plain);
vboxLayout->addWidget(frame);
editComment = new QTextEdit(OriginCommentOptions);
editComment->setObjectName(QString::fromUtf8("editComment"));
QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Expanding);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(1);
sizePolicy1.setHeightForWidth(editComment->sizePolicy().hasHeightForWidth());
editComment->setSizePolicy(sizePolicy1);
editComment->setFrameShape(QFrame::StyledPanel);
editComment->setFrameShadow(QFrame::Plain);
vboxLayout->addWidget(editComment);
hboxLayout2 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout2->setSpacing(6);
#endif
hboxLayout2->setContentsMargins(0, 0, 0, 0);
hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
spacerItem2 = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout2->addItem(spacerItem2);
okButton = new QPushButton(OriginCommentOptions);
okButton->setObjectName(QString::fromUtf8("okButton"));
hboxLayout2->addWidget(okButton);
cancelButton = new QPushButton(OriginCommentOptions);
cancelButton->setObjectName(QString::fromUtf8("cancelButton"));
hboxLayout2->addWidget(cancelButton);
vboxLayout->addLayout(hboxLayout2);
retranslateUi(OriginCommentOptions);
QObject::connect(okButton, SIGNAL(clicked()), OriginCommentOptions, SLOT(accept()));
QObject::connect(cancelButton, SIGNAL(clicked()), OriginCommentOptions, SLOT(reject()));
QMetaObject::connectSlotsByName(OriginCommentOptions);
} // setupUi
void retranslateUi(QDialog *OriginCommentOptions)
{
OriginCommentOptions->setWindowTitle(QCoreApplication::translate("OriginCommentOptions", "Edit comment", nullptr));
labelHeadline->setText(QString());
labelAuthor->setText(QString());
labelDate->setText(QString());
okButton->setText(QCoreApplication::translate("OriginCommentOptions", "OK", nullptr));
cancelButton->setText(QCoreApplication::translate("OriginCommentOptions", "Cancel", nullptr));
} // retranslateUi
};
namespace Ui {
class OriginCommentOptions: public Ui_OriginCommentOptions {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_ORIGINLOCATORVIEW_COMMENT_H

View File

@ -0,0 +1,300 @@
/********************************************************************************
** Form generated from reading UI file 'originlocatorview_commit.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_ORIGINLOCATORVIEW_COMMIT_H
#define UI_ORIGINLOCATORVIEW_COMMIT_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog>
#include <QtWidgets/QFrame>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QTextEdit>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_OriginCommitOptions
{
public:
QVBoxLayout *vboxLayout;
QCheckBox *cbAssociate;
QFrame *frameEventOptions;
QVBoxLayout *vboxLayout1;
QHBoxLayout *hboxLayout;
QCheckBox *cbFixSolution;
QCheckBox *cbFixMagnitudeType;
QGridLayout *gridLayout;
QLabel *label_21;
QLabel *label_2;
QComboBox *comboOriginStates;
QComboBox *comboEventTypes;
QLabel *label_3;
QComboBox *comboEventTypeCertainty;
QLabel *labelPreferredMagnitude;
QComboBox *comboPreferredMagnitude;
QFrame *line;
QLabel *label;
QFrame *line_3;
QLabel *labelEQName;
QLineEdit *editEQName;
QLabel *labelEQComment;
QTextEdit *editEQComment;
QComboBox *comboEQComment;
QSpacerItem *spacerItem;
QFrame *line_2;
QCheckBox *cbBackToEventList;
QHBoxLayout *hboxLayout1;
QSpacerItem *spacerItem1;
QPushButton *okButton;
QPushButton *cancelButton;
void setupUi(QDialog *OriginCommitOptions)
{
if (OriginCommitOptions->objectName().isEmpty())
OriginCommitOptions->setObjectName(QString::fromUtf8("OriginCommitOptions"));
OriginCommitOptions->resize(607, 746);
vboxLayout = new QVBoxLayout(OriginCommitOptions);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
cbAssociate = new QCheckBox(OriginCommitOptions);
cbAssociate->setObjectName(QString::fromUtf8("cbAssociate"));
cbAssociate->setChecked(true);
vboxLayout->addWidget(cbAssociate);
frameEventOptions = new QFrame(OriginCommitOptions);
frameEventOptions->setObjectName(QString::fromUtf8("frameEventOptions"));
frameEventOptions->setFrameShape(QFrame::NoFrame);
frameEventOptions->setFrameShadow(QFrame::Raised);
vboxLayout1 = new QVBoxLayout(frameEventOptions);
#ifndef Q_OS_MAC
vboxLayout1->setSpacing(6);
#endif
vboxLayout1->setContentsMargins(0, 0, 0, 0);
vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1"));
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
hboxLayout->setContentsMargins(0, 0, 0, 0);
#endif
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
cbFixSolution = new QCheckBox(frameEventOptions);
cbFixSolution->setObjectName(QString::fromUtf8("cbFixSolution"));
cbFixSolution->setChecked(true);
hboxLayout->addWidget(cbFixSolution);
vboxLayout1->addLayout(hboxLayout);
cbFixMagnitudeType = new QCheckBox(frameEventOptions);
cbFixMagnitudeType->setObjectName(QString::fromUtf8("cbFixMagnitudeType"));
cbFixMagnitudeType->setChecked(true);
vboxLayout1->addWidget(cbFixMagnitudeType);
gridLayout = new QGridLayout();
#ifndef Q_OS_MAC
gridLayout->setSpacing(6);
#endif
gridLayout->setContentsMargins(0, 0, 0, 0);
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
label_21 = new QLabel(frameEventOptions);
label_21->setObjectName(QString::fromUtf8("label_21"));
QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(label_21->sizePolicy().hasHeightForWidth());
label_21->setSizePolicy(sizePolicy);
gridLayout->addWidget(label_21, 2, 0, 1, 1);
label_2 = new QLabel(frameEventOptions);
label_2->setObjectName(QString::fromUtf8("label_2"));
sizePolicy.setHeightForWidth(label_2->sizePolicy().hasHeightForWidth());
label_2->setSizePolicy(sizePolicy);
gridLayout->addWidget(label_2, 0, 0, 1, 1);
comboOriginStates = new QComboBox(frameEventOptions);
comboOriginStates->setObjectName(QString::fromUtf8("comboOriginStates"));
gridLayout->addWidget(comboOriginStates, 2, 1, 1, 1);
comboEventTypes = new QComboBox(frameEventOptions);
comboEventTypes->setObjectName(QString::fromUtf8("comboEventTypes"));
gridLayout->addWidget(comboEventTypes, 0, 1, 1, 1);
label_3 = new QLabel(frameEventOptions);
label_3->setObjectName(QString::fromUtf8("label_3"));
gridLayout->addWidget(label_3, 1, 0, 1, 1);
comboEventTypeCertainty = new QComboBox(frameEventOptions);
comboEventTypeCertainty->setObjectName(QString::fromUtf8("comboEventTypeCertainty"));
gridLayout->addWidget(comboEventTypeCertainty, 1, 1, 1, 1);
labelPreferredMagnitude = new QLabel(frameEventOptions);
labelPreferredMagnitude->setObjectName(QString::fromUtf8("labelPreferredMagnitude"));
gridLayout->addWidget(labelPreferredMagnitude, 3, 0, 1, 1);
comboPreferredMagnitude = new QComboBox(frameEventOptions);
comboPreferredMagnitude->setObjectName(QString::fromUtf8("comboPreferredMagnitude"));
gridLayout->addWidget(comboPreferredMagnitude, 3, 1, 1, 1);
vboxLayout1->addLayout(gridLayout);
line = new QFrame(frameEventOptions);
line->setObjectName(QString::fromUtf8("line"));
line->setFrameShape(QFrame::HLine);
line->setFrameShadow(QFrame::Sunken);
vboxLayout1->addWidget(line);
label = new QLabel(frameEventOptions);
label->setObjectName(QString::fromUtf8("label"));
label->setWordWrap(true);
vboxLayout1->addWidget(label);
line_3 = new QFrame(frameEventOptions);
line_3->setObjectName(QString::fromUtf8("line_3"));
line_3->setFrameShape(QFrame::HLine);
line_3->setFrameShadow(QFrame::Sunken);
vboxLayout1->addWidget(line_3);
labelEQName = new QLabel(frameEventOptions);
labelEQName->setObjectName(QString::fromUtf8("labelEQName"));
vboxLayout1->addWidget(labelEQName);
editEQName = new QLineEdit(frameEventOptions);
editEQName->setObjectName(QString::fromUtf8("editEQName"));
vboxLayout1->addWidget(editEQName);
labelEQComment = new QLabel(frameEventOptions);
labelEQComment->setObjectName(QString::fromUtf8("labelEQComment"));
vboxLayout1->addWidget(labelEQComment);
editEQComment = new QTextEdit(frameEventOptions);
editEQComment->setObjectName(QString::fromUtf8("editEQComment"));
vboxLayout1->addWidget(editEQComment);
comboEQComment = new QComboBox(frameEventOptions);
comboEQComment->setObjectName(QString::fromUtf8("comboEQComment"));
vboxLayout1->addWidget(comboEQComment);
vboxLayout->addWidget(frameEventOptions);
spacerItem = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
vboxLayout->addItem(spacerItem);
line_2 = new QFrame(OriginCommitOptions);
line_2->setObjectName(QString::fromUtf8("line_2"));
line_2->setFrameShape(QFrame::HLine);
line_2->setFrameShadow(QFrame::Sunken);
vboxLayout->addWidget(line_2);
cbBackToEventList = new QCheckBox(OriginCommitOptions);
cbBackToEventList->setObjectName(QString::fromUtf8("cbBackToEventList"));
cbBackToEventList->setChecked(true);
vboxLayout->addWidget(cbBackToEventList);
hboxLayout1 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout1->setSpacing(6);
#endif
hboxLayout1->setContentsMargins(0, 0, 0, 0);
hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
spacerItem1 = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout1->addItem(spacerItem1);
okButton = new QPushButton(OriginCommitOptions);
okButton->setObjectName(QString::fromUtf8("okButton"));
hboxLayout1->addWidget(okButton);
cancelButton = new QPushButton(OriginCommitOptions);
cancelButton->setObjectName(QString::fromUtf8("cancelButton"));
hboxLayout1->addWidget(cancelButton);
vboxLayout->addLayout(hboxLayout1);
retranslateUi(OriginCommitOptions);
QObject::connect(okButton, SIGNAL(clicked()), OriginCommitOptions, SLOT(accept()));
QObject::connect(cancelButton, SIGNAL(clicked()), OriginCommitOptions, SLOT(reject()));
QMetaObject::connectSlotsByName(OriginCommitOptions);
} // setupUi
void retranslateUi(QDialog *OriginCommitOptions)
{
OriginCommitOptions->setWindowTitle(QCoreApplication::translate("OriginCommitOptions", "Commit location", nullptr));
#if QT_CONFIG(tooltip)
cbAssociate->setToolTip(QCoreApplication::translate("OriginCommitOptions", "If checked this origin will be associated with the current event. If unchecked, scevent will decide whether to assoiciate the origin with the current event or to create a new one.", nullptr));
#endif // QT_CONFIG(tooltip)
cbAssociate->setText(QCoreApplication::translate("OriginCommitOptions", "Force association with event %1", nullptr));
#if QT_CONFIG(tooltip)
cbFixSolution->setToolTip(QCoreApplication::translate("OriginCommitOptions", "If checked this origin will be fixed as preferred solution.", nullptr));
#endif // QT_CONFIG(tooltip)
cbFixSolution->setText(QCoreApplication::translate("OriginCommitOptions", "Fix this origin as preferred location.", nullptr));
cbFixMagnitudeType->setText(QCoreApplication::translate("OriginCommitOptions", "Fix event preferred magnitude type %1", nullptr));
label_21->setText(QCoreApplication::translate("OriginCommitOptions", "Set origin status to", nullptr));
label_2->setText(QCoreApplication::translate("OriginCommitOptions", "Set event type to", nullptr));
label_3->setText(QCoreApplication::translate("OriginCommitOptions", "Set event certainty to", nullptr));
labelPreferredMagnitude->setText(QCoreApplication::translate("OriginCommitOptions", "Set preferred magnitude type to ", nullptr));
label->setText(QCoreApplication::translate("OriginCommitOptions", "<b><u>NOTE</u></b> To fix the origin involves that successive origins are not considered as preferred origins by the event associator (scevent) until another origin is fixed again. Fixing an origin overrides the automatic rules of setting an origin as preferred origin.", nullptr));
labelEQName->setText(QCoreApplication::translate("OriginCommitOptions", "Earthquake name:", nullptr));
labelEQComment->setText(QCoreApplication::translate("OriginCommitOptions", "Event comment 'Operator':", nullptr));
cbBackToEventList->setText(QCoreApplication::translate("OriginCommitOptions", "Return to event list after commit", nullptr));
okButton->setText(QCoreApplication::translate("OriginCommitOptions", "OK", nullptr));
cancelButton->setText(QCoreApplication::translate("OriginCommitOptions", "Cancel", nullptr));
} // retranslateUi
};
namespace Ui {
class OriginCommitOptions: public Ui_OriginCommitOptions {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_ORIGINLOCATORVIEW_COMMIT_H

View File

@ -0,0 +1,225 @@
/********************************************************************************
** Form generated from reading UI file 'origintime.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_ORIGINTIME_H
#define UI_ORIGINTIME_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDateEdit>
#include <QtWidgets/QDialog>
#include <QtWidgets/QGroupBox>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QTimeEdit>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_OriginTimeDialog
{
public:
QVBoxLayout *vboxLayout;
QGroupBox *groupBox;
QHBoxLayout *hboxLayout;
QVBoxLayout *vboxLayout1;
QLabel *label;
QLabel *label_2;
QVBoxLayout *vboxLayout2;
QLabel *labelLatitude;
QLabel *labelLongitude;
QGroupBox *groupBox_2;
QHBoxLayout *hboxLayout1;
QTimeEdit *timeEdit;
QDateEdit *dateEdit;
QSpacerItem *spacerItem;
QHBoxLayout *hboxLayout2;
QSpacerItem *spacerItem1;
QPushButton *okButton;
QPushButton *cancelButton;
void setupUi(QDialog *OriginTimeDialog)
{
if (OriginTimeDialog->objectName().isEmpty())
OriginTimeDialog->setObjectName(QString::fromUtf8("OriginTimeDialog"));
OriginTimeDialog->resize(229, 209);
vboxLayout = new QVBoxLayout(OriginTimeDialog);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
groupBox = new QGroupBox(OriginTimeDialog);
groupBox->setObjectName(QString::fromUtf8("groupBox"));
hboxLayout = new QHBoxLayout(groupBox);
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
hboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
vboxLayout1 = new QVBoxLayout();
#ifndef Q_OS_MAC
vboxLayout1->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout1->setContentsMargins(0, 0, 0, 0);
#endif
vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1"));
label = new QLabel(groupBox);
label->setObjectName(QString::fromUtf8("label"));
QFont font;
font.setFamily(QString::fromUtf8("Verdana"));
font.setPointSize(12);
font.setBold(false);
font.setItalic(false);
font.setUnderline(false);
font.setWeight(50);
font.setStrikeOut(false);
label->setFont(font);
label->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
vboxLayout1->addWidget(label);
label_2 = new QLabel(groupBox);
label_2->setObjectName(QString::fromUtf8("label_2"));
label_2->setFont(font);
label_2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
vboxLayout1->addWidget(label_2);
hboxLayout->addLayout(vboxLayout1);
vboxLayout2 = new QVBoxLayout();
#ifndef Q_OS_MAC
vboxLayout2->setSpacing(6);
#endif
vboxLayout2->setContentsMargins(0, 0, 0, 0);
vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2"));
labelLatitude = new QLabel(groupBox);
labelLatitude->setObjectName(QString::fromUtf8("labelLatitude"));
QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(labelLatitude->sizePolicy().hasHeightForWidth());
labelLatitude->setSizePolicy(sizePolicy);
QFont font1;
font1.setFamily(QString::fromUtf8("Verdana"));
font1.setPointSize(12);
font1.setBold(true);
font1.setItalic(false);
font1.setUnderline(false);
font1.setWeight(75);
font1.setStrikeOut(false);
labelLatitude->setFont(font1);
vboxLayout2->addWidget(labelLatitude);
labelLongitude = new QLabel(groupBox);
labelLongitude->setObjectName(QString::fromUtf8("labelLongitude"));
sizePolicy.setHeightForWidth(labelLongitude->sizePolicy().hasHeightForWidth());
labelLongitude->setSizePolicy(sizePolicy);
labelLongitude->setFont(font1);
vboxLayout2->addWidget(labelLongitude);
hboxLayout->addLayout(vboxLayout2);
vboxLayout->addWidget(groupBox);
groupBox_2 = new QGroupBox(OriginTimeDialog);
groupBox_2->setObjectName(QString::fromUtf8("groupBox_2"));
hboxLayout1 = new QHBoxLayout(groupBox_2);
#ifndef Q_OS_MAC
hboxLayout1->setSpacing(6);
#endif
#ifndef Q_OS_MAC
hboxLayout1->setContentsMargins(9, 9, 9, 9);
#endif
hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
timeEdit = new QTimeEdit(groupBox_2);
timeEdit->setObjectName(QString::fromUtf8("timeEdit"));
hboxLayout1->addWidget(timeEdit);
dateEdit = new QDateEdit(groupBox_2);
dateEdit->setObjectName(QString::fromUtf8("dateEdit"));
dateEdit->setCurrentSection(QDateTimeEdit::DaySection);
hboxLayout1->addWidget(dateEdit);
vboxLayout->addWidget(groupBox_2);
spacerItem = new QSpacerItem(211, 16, QSizePolicy::Minimum, QSizePolicy::Expanding);
vboxLayout->addItem(spacerItem);
hboxLayout2 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout2->setSpacing(6);
#endif
hboxLayout2->setContentsMargins(0, 0, 0, 0);
hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
spacerItem1 = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout2->addItem(spacerItem1);
okButton = new QPushButton(OriginTimeDialog);
okButton->setObjectName(QString::fromUtf8("okButton"));
hboxLayout2->addWidget(okButton);
cancelButton = new QPushButton(OriginTimeDialog);
cancelButton->setObjectName(QString::fromUtf8("cancelButton"));
hboxLayout2->addWidget(cancelButton);
vboxLayout->addLayout(hboxLayout2);
retranslateUi(OriginTimeDialog);
QObject::connect(okButton, SIGNAL(clicked()), OriginTimeDialog, SLOT(accept()));
QObject::connect(cancelButton, SIGNAL(clicked()), OriginTimeDialog, SLOT(reject()));
QMetaObject::connectSlotsByName(OriginTimeDialog);
} // setupUi
void retranslateUi(QDialog *OriginTimeDialog)
{
OriginTimeDialog->setWindowTitle(QCoreApplication::translate("OriginTimeDialog", "OriginTime", nullptr));
groupBox->setTitle(QCoreApplication::translate("OriginTimeDialog", "Location", nullptr));
label->setText(QCoreApplication::translate("OriginTimeDialog", "Latitude:", nullptr));
label_2->setText(QCoreApplication::translate("OriginTimeDialog", "Longitude:", nullptr));
labelLatitude->setText(QCoreApplication::translate("OriginTimeDialog", "--.- \302\260", nullptr));
labelLongitude->setText(QCoreApplication::translate("OriginTimeDialog", "--.- \302\260", nullptr));
groupBox_2->setTitle(QCoreApplication::translate("OriginTimeDialog", "Time", nullptr));
timeEdit->setDisplayFormat(QCoreApplication::translate("OriginTimeDialog", "hh:mm:ss", nullptr));
dateEdit->setDisplayFormat(QCoreApplication::translate("OriginTimeDialog", "dd-MM-yyyy", nullptr));
okButton->setText(QCoreApplication::translate("OriginTimeDialog", "OK", nullptr));
cancelButton->setText(QCoreApplication::translate("OriginTimeDialog", "Cancel", nullptr));
} // retranslateUi
};
namespace Ui {
class OriginTimeDialog: public Ui_OriginTimeDialog {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_ORIGINTIME_H

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,160 @@
/********************************************************************************
** Form generated from reading UI file 'renamephases.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_RENAMEPHASES_H
#define UI_RENAMEPHASES_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QListWidget>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_RenamePhases
{
public:
QVBoxLayout *vboxLayout;
QHBoxLayout *hboxLayout;
QVBoxLayout *vboxLayout1;
QLabel *label;
QListWidget *listSourcePhases;
QLabel *label_3;
QVBoxLayout *vboxLayout2;
QLabel *label_2;
QListWidget *listTargetPhase;
QHBoxLayout *hboxLayout1;
QSpacerItem *spacerItem;
QPushButton *okButton;
QPushButton *cancelButton;
void setupUi(QDialog *RenamePhases)
{
if (RenamePhases->objectName().isEmpty())
RenamePhases->setObjectName(QString::fromUtf8("RenamePhases"));
RenamePhases->resize(378, 213);
vboxLayout = new QVBoxLayout(RenamePhases);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
hboxLayout->setContentsMargins(0, 0, 0, 0);
#endif
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
vboxLayout1 = new QVBoxLayout();
#ifndef Q_OS_MAC
vboxLayout1->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout1->setContentsMargins(0, 0, 0, 0);
#endif
vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1"));
label = new QLabel(RenamePhases);
label->setObjectName(QString::fromUtf8("label"));
vboxLayout1->addWidget(label);
listSourcePhases = new QListWidget(RenamePhases);
listSourcePhases->setObjectName(QString::fromUtf8("listSourcePhases"));
listSourcePhases->setSelectionMode(QAbstractItemView::ExtendedSelection);
vboxLayout1->addWidget(listSourcePhases);
hboxLayout->addLayout(vboxLayout1);
label_3 = new QLabel(RenamePhases);
label_3->setObjectName(QString::fromUtf8("label_3"));
hboxLayout->addWidget(label_3);
vboxLayout2 = new QVBoxLayout();
#ifndef Q_OS_MAC
vboxLayout2->setSpacing(6);
#endif
vboxLayout2->setContentsMargins(0, 0, 0, 0);
vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2"));
label_2 = new QLabel(RenamePhases);
label_2->setObjectName(QString::fromUtf8("label_2"));
vboxLayout2->addWidget(label_2);
listTargetPhase = new QListWidget(RenamePhases);
listTargetPhase->setObjectName(QString::fromUtf8("listTargetPhase"));
vboxLayout2->addWidget(listTargetPhase);
hboxLayout->addLayout(vboxLayout2);
vboxLayout->addLayout(hboxLayout);
hboxLayout1 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout1->setSpacing(6);
#endif
hboxLayout1->setContentsMargins(0, 0, 0, 0);
hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
spacerItem = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout1->addItem(spacerItem);
okButton = new QPushButton(RenamePhases);
okButton->setObjectName(QString::fromUtf8("okButton"));
hboxLayout1->addWidget(okButton);
cancelButton = new QPushButton(RenamePhases);
cancelButton->setObjectName(QString::fromUtf8("cancelButton"));
hboxLayout1->addWidget(cancelButton);
vboxLayout->addLayout(hboxLayout1);
retranslateUi(RenamePhases);
QObject::connect(okButton, SIGNAL(clicked()), RenamePhases, SLOT(accept()));
QObject::connect(cancelButton, SIGNAL(clicked()), RenamePhases, SLOT(reject()));
QMetaObject::connectSlotsByName(RenamePhases);
} // setupUi
void retranslateUi(QDialog *RenamePhases)
{
RenamePhases->setWindowTitle(QCoreApplication::translate("RenamePhases", "Rename phases", nullptr));
label->setText(QCoreApplication::translate("RenamePhases", "Source:", nullptr));
label_3->setText(QCoreApplication::translate("RenamePhases", ">", nullptr));
label_2->setText(QCoreApplication::translate("RenamePhases", "Target:", nullptr));
okButton->setText(QCoreApplication::translate("RenamePhases", "OK", nullptr));
cancelButton->setText(QCoreApplication::translate("RenamePhases", "Cancel", nullptr));
} // retranslateUi
};
namespace Ui {
class RenamePhases: public Ui_RenamePhases {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_RENAMEPHASES_H

View File

@ -0,0 +1,107 @@
/********************************************************************************
** Form generated from reading UI file 'selectstation.ui'
**
** Created by: Qt User Interface Compiler version 5.15.13
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_SELECTSTATION_H
#define UI_SELECTSTATION_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QTableView>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_SelectStation
{
public:
QVBoxLayout *vboxLayout;
QLabel *stationListLabel;
QLineEdit *stationLineEdit;
QTableView *table;
QHBoxLayout *hboxLayout;
QSpacerItem *spacerItem;
QPushButton *btnAdd;
void setupUi(QDialog *SelectStation)
{
if (SelectStation->objectName().isEmpty())
SelectStation->setObjectName(QString::fromUtf8("SelectStation"));
SelectStation->resize(400, 400);
vboxLayout = new QVBoxLayout(SelectStation);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
stationListLabel = new QLabel(SelectStation);
stationListLabel->setObjectName(QString::fromUtf8("stationListLabel"));
vboxLayout->addWidget(stationListLabel);
stationLineEdit = new QLineEdit(SelectStation);
stationLineEdit->setObjectName(QString::fromUtf8("stationLineEdit"));
vboxLayout->addWidget(stationLineEdit);
table = new QTableView(SelectStation);
table->setObjectName(QString::fromUtf8("table"));
table->setAlternatingRowColors(true);
table->setSelectionBehavior(QAbstractItemView::SelectRows);
vboxLayout->addWidget(table);
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
hboxLayout->setContentsMargins(0, 0, 0, 0);
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout->addItem(spacerItem);
btnAdd = new QPushButton(SelectStation);
btnAdd->setObjectName(QString::fromUtf8("btnAdd"));
hboxLayout->addWidget(btnAdd);
vboxLayout->addLayout(hboxLayout);
retranslateUi(SelectStation);
QObject::connect(btnAdd, SIGNAL(clicked()), SelectStation, SLOT(accept()));
QMetaObject::connectSlotsByName(SelectStation);
} // setupUi
void retranslateUi(QDialog *SelectStation)
{
SelectStation->setWindowTitle(QCoreApplication::translate("SelectStation", "Add station(s)", nullptr));
stationListLabel->setText(QCoreApplication::translate("SelectStation", "Station List:", nullptr));
btnAdd->setText(QCoreApplication::translate("SelectStation", "Add", nullptr));
} // retranslateUi
};
namespace Ui {
class SelectStation: public Ui_SelectStation {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_SELECTSTATION_H

View File

@ -0,0 +1,63 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_DATAMODEL_UTIL_H
#define SEISCOMP_GUI_DATAMODEL_UTIL_H
#include <seiscomp/gui/qt.h>
#ifndef Q_MOC_RUN
#include <seiscomp/datamodel/utils.h>
#endif
#include <seiscomp/gui/core/utils.h>
#include <QCheckBox>
namespace Seiscomp {
namespace Gui {
class CheckBox : public QCheckBox {
Q_OBJECT
public:
explicit CheckBox(QWidget *parent=0)
: QCheckBox(parent) {}
explicit CheckBox(const QString &text, QWidget *parent=0)
: QCheckBox(text, parent) {}
public slots:
void check() {
setChecked(true);
}
void unCheck() {
setChecked(false);
}
};
}
}
#endif

View File

@ -0,0 +1,65 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_MAP_LAYERS_ANNOTATION_LAYER_H__
#define SEISCOMP_GUI_MAP_LAYERS_ANNOTATION_LAYER_H__
#include <seiscomp/gui/map/annotations.h>
#include <seiscomp/gui/map/layer.h>
namespace Seiscomp {
namespace Gui {
namespace Map {
class Canvas;
class AnnotationLayer : public Layer {
public:
AnnotationLayer(QObject* parent = nullptr,
Annotations *annotations = nullptr);
void setAnnotations(Annotations *annotations) {
_annotations = annotations;
}
Annotations *annotations() const {
return _annotations;
}
void draw(const Seiscomp::Gui::Map::Canvas*, QPainter &painter);
private:
typedef QList<QRect> Row;
typedef QVector<Row> Grid;
Annotations *_annotations;
};
} // ns Map
} // ns Gui
} // ns Seiscomp
#endif

View File

@ -0,0 +1,173 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_MAP_ANNOTATIONS_H
#define SEISCOMP_GUI_MAP_ANNOTATIONS_H
#include <QColor>
#include <QFont>
#include <QPen>
#include <QPoint>
#include <QString>
#include <QVariant>
namespace Seiscomp {
namespace Gui {
namespace Map {
class Annotations;
class AnnotationItem;
struct AnnotationStyle : public QObject {
AnnotationStyle(QObject *parent = nullptr);
virtual ~AnnotationStyle() {}
virtual void draw(QPainter &painter, const AnnotationItem &item);
virtual QRect itemRect(QPainter &painter, const AnnotationItem &item,
const QPoint &pos) const;
struct Palette {
QPen textPen;
QPen borderPen;
QBrush brush;
};
// One for normal (0) and one for highlighted (1)
Palette palette[2];
QFont font;
};
/**
* @brief The AnnotationItem struct holds properties like text, text color etc.
* which might be used when rendering an item on a map.
*/
class AnnotationItem {
private:
AnnotationItem(Annotations *parent) : pool(parent) {}
AnnotationItem(Annotations *parent, const QString &text)
: pool(parent), text(text) {}
public:
~AnnotationItem();
public:
/**
* @brief Updates the label rect of the item based on the given position
* and style
* @param pos The position of the label rect
*/
void updateLabelRect(QPainter &painter, const QPoint &pos) {
if ( style ) {
labelRect = style->itemRect(painter, *this, pos);
}
else {
labelRect = QRect();
}
}
public:
Annotations *pool{nullptr};
QString text;
AnnotationStyle *style{nullptr};
bool visible{true};
bool highlighted{false};
QRect labelRect;
QVariant data;
friend class Annotations;
};
class Annotations : public QObject {
public:
typedef QList<AnnotationItem*> Items;
typedef Items::const_iterator const_iterator;
public:
Annotations(QObject *parent = nullptr);
~Annotations();
const_iterator begin() const {
return _items.begin();
}
const_iterator end() const {
return _items.end();
}
/**
* @brief Clears the annotation pool
* This call calls delete for each AnnotationItem.
*/
void clear();
int size() { return _items.size(); }
/**
* @brief Adds a new object to the annotation pool
* @param text The annotation text
* @return Link to an annotation item which is owned by this instance
*/
AnnotationItem *add(const QString &text);
/**
* @brief Removes annotation item from annotation pool and deletes it
* @param item The annotation item to remove
* @return true if removed, false otherwise
*/
bool remove(const AnnotationItem *item);
/**
* @brief Removes annotation item from annotation pool but does not delete
* it. The pool member in the item will be set to nullptr.
* @param item The annotation item to be taken
* @return true if taken, false otherwise
*/
bool take(const AnnotationItem *item);
/**
* @brief Sets the default annotation style used while
* creating annotation items
* @param style The annotation style to set
*/
void setDefaultStyle(AnnotationStyle *style) {
_style = style;
}
private:
Items _items;
AnnotationStyle _defaultStyle;
AnnotationStyle *_style{nullptr};
};
} // ns Map
} // ns Gui
} // ns Seiscomp
#endif

View File

@ -0,0 +1,495 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_MAP_CANVAS_H
#define SEISCOMP_GUI_MAP_CANVAS_H
#ifndef Q_MOC_RUN
#include <seiscomp/gui/core/maps.h>
#include <seiscomp/gui/map/projection.h>
#include <seiscomp/gui/map/legend.h>
#include <seiscomp/gui/map/imagetree.h>
#include <seiscomp/gui/map/layers/citieslayer.h>
#include <seiscomp/gui/map/layers/gridlayer.h>
#include <seiscomp/gui/map/layers/geofeaturelayer.h>
#include <seiscomp/gui/map/layers/symbollayer.h>
#include <seiscomp/math/coord.h>
#include <seiscomp/geo/feature.h>
#include <seiscomp/utils/timer.h>
#endif
#include <QHash>
#include <QObject>
#include <QPolygon>
class QMouseEvent;
class QMenu;
namespace Seiscomp {
namespace Gui {
namespace Map {
class Layer;
DEFINE_SMARTPOINTER(TextureCache);
// For backward compatibility
typedef SymbolLayer SymbolCollection;
class SC_GUI_API Canvas : public QObject {
Q_OBJECT
public:
Canvas(const MapsDesc &);
Canvas(ImageTree *mapTree);
~Canvas();
public:
void setFont(QFont f);
QFont font() const { return _font; }
void setBackgroundColor(QColor c);
bool setProjectionByName(const char *name);
const std::string &projectionName() const { return _projectionName; }
void setSize(int w, int h);
QSize size() const { return _buffer.size(); }
int width() const { return _buffer.width(); }
int height() const { return _buffer.height(); }
/**
* @brief Sets the margin of the legend area with respect to the
* canvas border. The default value is 10 pixels. This methods
* was added with API 11.
* @param margin The margin in pixels.
*/
void setLegendMargin(int margin);
/**
* @brief Returns the margin of the legend area with respect to the
* canvas border. This methods was added with API 11.
* @return The margin in pixels
*/
int legendMargin() const { return _margin; }
void setGrayScale(bool);
bool isGrayScale() const;
/**
* @brief Sets bilinear filtering for map tile interpolation. This is
* only used if not in preview mode.
* @param enable Boolean flag
*/
void setBilinearFilter(bool enable);
/**
* @brief Enables the preview mode. The preview mode is meant to be
* used for fast rendering the map, e.g. with antialiasing
* switched of. This is mainly used while dragging the map.
* @param enable Boolean flag
*/
void setPreviewMode(bool enable);
/**
* @brief Returns whether the canvas rendering is currently in preview
* mode or not.
* @return A boolean flag
*/
bool previewMode() const;
void setDrawGrid(bool);
bool isDrawGridEnabled() const;
void setDrawLayers(bool);
bool isDrawLayersEnabled() const;
void setDrawCities(bool);
bool isDrawCitiesEnabled() const;
bool isDrawLegendsEnabled() const;
void setImageFilter(bool);
bool isImageFilterEnabled() const;
bool displayRect(const QRectF& rect);
void setMapCenter(QPointF c);
const QPointF& mapCenter() const;
bool setZoomLevel(float);
float zoomLevel() const;
float pixelPerDegree() const;
void setView(QPoint c, float zoom);
void setView(QPointF c, float zoom);
/**
* @brief Sets the minimum pixel distance of two adjacent vertices
* to be rendered as a line when rendering GeoFeatures and polylines.
* Or in other words, if the pixel distance of two adjacent vertices is
* less than the given distance, both vertices collapse into a single
* vertex. The greater the distance the less details the rendered shape
* will have.
* @param pixel The distance in pixels
*/
void setPolygonRoughness(uint pixel);
uint polygonRoughness() const;
/**
* @brief Sets the polygon clip hint.
*
* The hint might or might not be interpreted by projections. If the
* clipHint is DoClip then polygons are clipped against the viewport
* before rendering them. This will reduce the number of vertices
* significantly but also increases processing time. The default
* is DoClip.
* @param hint The clipping hint
*/
void setPolygonClipHint(ClipHint hint);
ClipHint polygonClipHint() const;
Map::Projection *projection() const { return _projection; }
bool isVisible(double lon, double lat) const;
void setSelectedCity(const Math::Geo::CityD*);
//! Draws a geometric line (great circle) given in geographical coordinates (lon, lat)
//! Returns the distance in degree of the line
double drawLine(QPainter &painter, const QPointF &start, const QPointF &end) const;
//! Draws a polyline in geographical coordinates (lon, lat).
//! Returns number of line segments drawn.
//! Does not check for clipping
size_t drawPolyline(QPainter &painter, size_t n, const Geo::GeoCoordinate *line,
bool isClosedPolygon, bool interpolate = false,
int roughness = -1) const;
//! Does not check for clipping
size_t drawPolygon(QPainter &painter, size_t n, const Geo::GeoCoordinate *line,
bool isClosedPolygon = true, int roughness = -1,
ClipHint clipHint = DoClip) const;
//! Draws a GeoFeature as either polyline or filled polygon and
//! checks for clipping
size_t drawFeature(QPainter &painter, const Geo::GeoFeature *feature,
bool filled = false, int roughness = -1,
ClipHint clipHint = DoClip) const;
/**
* @brief Draws an image onto the current map buffer. If this function
* is called *after* @drawImageLayer then it does not have an
* effect because the map buffer has been rendered already onto
* the painter device.
* @param geoReference The geo reference of the image.
* @param image The image to be rendered.
* @param compositionMode The composition mode which will be used to
* combine the current base layer (tiles) with
* the image.
* @param filterMode The filter mode used to render the image.
*/
void drawImage(const QRectF &geoReference, const QImage &image,
CompositionMode compositionMode = CompositionMode_Default,
FilterMode filterMode = FilterMode_Auto);
void draw(QPainter &p);
void centerMap(const QPoint &centerPnt);
void translate(const QPoint &delta);
void translate(const QPointF &delta);
void drawImageLayer(QPainter &painter);
void drawVectorLayer(QPainter &painter);
void drawLayers(QPainter &painter);
void updateBuffer();
void setBuffer(QImage buffer) { _buffer = buffer; }
QImage &buffer() { return _buffer; }
//! Returns the number of layers
int layerCount() const { return _layers.count(); }
//! Returns the i-th layer if the index is valid
Layer* layer(int i) const {
if ( i < 0 || i >= _layers.count() ) return nullptr;
return _layers[i];
}
//! Canvas does take ownership of layer if the layer does not
//! have a parent at the time of appending or prepending.
bool prependLayer(Layer*);
bool addLayer(Layer*);
bool insertLayerBefore(const Layer*, Layer*);
void removeLayer(Layer*);
void lower(Layer*);
void raise(Layer*);
Layer *hoverLayer() const;
bool filterContextMenuEvent(QContextMenuEvent*, QWidget*);
bool filterKeyPressEvent(QKeyEvent *event);
bool filterKeyReleaseEvent(QKeyEvent *event);
bool filterMouseMoveEvent(QMouseEvent*);
bool filterMousePressEvent(QMouseEvent*);
bool filterMouseReleaseEvent(QMouseEvent*);
bool filterMouseDoubleClickEvent(QMouseEvent*);
QMenu* menu(QMenu*) const;
//! Returns whether the rendering is complete or if there are
//! still some updates in the pipeline that updated later. If this
//! function return false, the signal renderingCompleted() is emitted
//! once it is done.
//! This function was introduced in API 1.1.
bool renderingComplete() const;
public:
GridLayer *gridLayer();
const GridLayer *gridLayer() const;
CitiesLayer *citiesLayer();
const CitiesLayer *citiesLayer() const;
GeoFeatureLayer *geoFeatureLayer();
const GeoFeatureLayer *geoFeatureLayer() const;
SymbolLayer *symbolCollection();
const SymbolLayer *symbolCollection() const;
public slots:
//! Reloads all tiles and empties the texture cache
//! This slot was introduced in API 1.1.
void reload();
//! This slot was added in API 11
void setDrawLegends(bool);
//! This slot was added in API 11
void showLegends();
//! This slot was added in API 11
void hideLegends();
/**
* @brief Enables/disables legend stacking.
*
* If legend stacking is enabled then two toggle buttons will be
* rendered in the legends title bar to swap the visible legend. If
* stacking is disabled then all legends of a particular edge will
* be rendered next to each other. This slot was added in API 11.
*/
void setLegendStacking(bool);
void bringToFront(Seiscomp::Gui::Map::Legend*);
void setLegendEnabled(Seiscomp::Gui::Map::Legend*, bool);
/**
* @brief This handler is called when a new legend is
* added to a layer.
* This slot was introduced with API XX
* @param legend The legend
*/
void onLegendAdded(Legend *legend);
/**
* @brief This handler is called when a legend is removed
* from a layer.
* This slot was introduced with API XX
* @param legend
*/
void onLegendRemoved(Legend *legend);
signals:
//! This signal is emitted if draw() caused asynchronous data requests
//! and when those requests are finished.
//! This signal was introduced with API 1.1.
void renderingCompleted();
void bufferUpdated();
void projectionChanged(Seiscomp::Gui::Map::Projection*);
void legendVisibilityChanged(bool);
void updateRequested();
void customLayer(QPainter*);
private:
void init();
void drawCity(QPainter &painter, const Math::Geo::CityD &,
QVector< QList<QRect> > &grid,
QFont &font, QFontMetrics &fontMetrics,
int rowHeight,
bool &lastUnderline, bool &lastBold);
void drawLegends(QPainter &painter);
void setupLayer(Layer *layer);
private slots:
void updatedTiles();
void completeTiles();
void updateLayer(const Layer::UpdateHints&);
private:
struct LegendItem {
LegendItem() : legend(0), dirty(true) {}
LegendItem(Legend *legend) : legend(legend), dirty(true) {}
Legend *legend;
bool dirty;
};
typedef QVector<LegendItem> Legends;
struct LegendArea : public Legends {
LegendArea() : currentIndex(-1) {}
int find(Legend *legend) const {
for ( int i = 0; i < count(); ++i ) {
if ( at(i).legend == legend )
return i;
}
return -1;
}
bool hasIndex(int index) {
return ( index >= 0 && index < count() );
}
bool mousePressEvent(QMouseEvent *e);
bool mouseReleaseEvent(QMouseEvent *e);
int findNext(bool forward = true) const;
QRect header;
QRect decorationRects[2];
int currentIndex;
};
typedef QHash<Qt::Alignment, LegendArea> LegendAreas;
typedef QList<Layer*> Layers;
typedef QList<LayerPtr> CustomLayers;
private:
QFont _font;
Projection* _projection;
ImageTreePtr _maptree;
std::string _projectionName;
QImage _buffer;
QColor _backgroundColor{Qt::lightGray};
uint _polygonRoughness;
double _maxZoom;
QPointF _center;
float _zoomLevel{1.0f};
bool _grayScale{false};
bool _filterMap;
bool _dirtyRasterLayer{true};
bool _dirtyVectorLayers{true};
bool _previewMode{false};
bool _stackLegends{true};
Layers _layers;
Layer *_hoverLayer{nullptr};
CustomLayers _customLayers;
CitiesLayer _citiesLayer;
GridLayer _gridLayer;
GeoFeatureLayer _geoFeatureLayer;
SymbolLayer _symbolLayer;
LegendAreas _legendAreas;
int _margin{10};
bool _isDrawLegendsEnabled{true};
Util::StopWatch _tileUpdateTimer;
};
inline bool Canvas::previewMode() const {
return _previewMode;
}
inline Layer *Canvas::hoverLayer() const {
return _hoverLayer;
}
inline GridLayer *Canvas::gridLayer() {
return &_gridLayer;
}
inline const GridLayer *Canvas::gridLayer() const {
return &_gridLayer;
}
inline CitiesLayer *Canvas::citiesLayer() {
return &_citiesLayer;
}
inline const CitiesLayer *Canvas::citiesLayer() const {
return &_citiesLayer;
}
inline GeoFeatureLayer *Canvas::geoFeatureLayer() {
return &_geoFeatureLayer;
}
inline const GeoFeatureLayer *Canvas::geoFeatureLayer() const {
return &_geoFeatureLayer;
}
inline SymbolLayer *Canvas::symbolCollection() {
return &_symbolLayer;
}
inline const SymbolLayer *Canvas::symbolCollection() const {
return &_symbolLayer;
}
inline uint Canvas::polygonRoughness() const {
return _polygonRoughness;
}
inline void Canvas::setPolygonRoughness(uint pixel) {
_polygonRoughness = pixel;
}
}
}
}
#endif

View File

@ -0,0 +1,68 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_MAP_LAYERS_CITIESLAYER_H
#define SEISCOMP_GUI_MAP_LAYERS_CITIESLAYER_H
#include <seiscomp/gui/qt.h>
#include <seiscomp/gui/map/layer.h>
#include <seiscomp/math/coord.h>
namespace Seiscomp {
namespace Gui {
namespace Map {
class Canvas;
class Projection;
class SC_GUI_API CitiesLayer : public Layer {
public:
CitiesLayer(QObject* = nullptr);
virtual ~CitiesLayer();
virtual void init(const Config::Config&);
virtual void draw(const Canvas*, QPainter&);
void setSelectedCity(const Math::Geo::CityD*);
const Math::Geo::CityD* selectedCity() const;
private:
typedef QList<QRect> Row;
typedef QVector<Row> Grid;
private:
bool drawCity(QPainter&, Grid&, QFont&, bool&, bool&,
const Projection*, const Math::Geo::CityD&,
const QFontMetrics&, int, int);
private:
const Math::Geo::CityD *_selectedCity;
int _topPopulatedPlaces;
};
} // namespace Map
} // namespce Gui
} // namespace Seiscomp
#endif

View File

@ -0,0 +1,104 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_DECORATOR_H
#define SEISCOMP_GUI_DECORATOR_H
#include <memory>
#include <QPainter>
#include <seiscomp/gui/qt.h>
namespace Seiscomp {
namespace Gui {
namespace Map {
class Canvas;
/** \class Decorator
*
* Abstract class to decorate a Symbol derived class. When a derived decorator is
* passed to a symbol the map and baseObject member are automatically set by the
* respective symbol. The same is true for all other (nested) decorator which are
* associated whith the passed decorator. Therefore the user is obliged to assure
* that the other decorator operate on the same type of datamodel object (pick, origin...)
*/
class SC_GUI_API Decorator {
// ------------------------------------------------------------------
// X'struction
// ------------------------------------------------------------------
public:
Decorator(Decorator* decorator = nullptr)
: _decorator(decorator),
_visible(true) {
}
virtual ~Decorator() {}
// ------------------------------------------------------------------
// Public Interface
// ------------------------------------------------------------------
public:
void draw(const Canvas *canvas, QPainter &painter) {
if ( _decorator.get() )
_decorator->draw(canvas, painter);
customDraw(canvas, painter);
}
void setVisible(bool visible) {
if ( _decorator.get() )
_decorator->setVisible(visible);
_visible = visible;
}
bool isVisible() const {
return _visible;
}
// ------------------------------------------------------------------
// Protected Interface
// ------------------------------------------------------------------
protected:
virtual void customDraw(const Canvas *canvas, QPainter &painter) = 0;
// ------------------------------------------------------------------
// Private Members
// ------------------------------------------------------------------
private:
std::unique_ptr<Decorator> _decorator;
bool _visible;
};
} // namespace Map
} // namespace Gui
} // namespace Seiscomp
#endif

View File

@ -0,0 +1,202 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_MAP_LAYERS_GEOFEATURELAYER_H
#define SEISCOMP_GUI_MAP_LAYERS_GEOFEATURELAYER_H
#include <seiscomp/gui/map/layer.h>
#ifndef Q_MOC_RUN
#include <seiscomp/geo/featureset.h>
#include <seiscomp/geo/index/quadtree.h>
#endif
#include <QImage>
namespace Seiscomp {
namespace Gui {
namespace Map {
class Canvas;
class SC_GUI_API GeoFeatureLayer : public Layer,
virtual public Geo::GeoFeatureSetObserver {
Q_OBJECT
public:
GeoFeatureLayer(QObject *parent = nullptr);
virtual ~GeoFeatureLayer();
public:
/**
* @brief Returns a feature under the given coordinate.
* @param coord The coordinate.
* @return A pointer to the feature instance or nullptr. Do not delete
* the feature, its ownership is still at the global
* GeoFeatureSet.
*/
const Geo::GeoFeature *findFeature(const Geo::GeoCoordinate &coord) const;
/**
* @brief Convenience function for @findFeature(const Geo::GeoCoordinate &coord).
* @param lat The latitude of the coordinate
* @param lon The longitude of the coordinate
* @return See @findFeature(const Geo::GeoCoordinate &coord).
*/
const Geo::GeoFeature *findFeature(qreal lat, qreal lon) const;
/**
* @brief Renders the geofeatures on a given canvas with a given
* painter. This function is called from bufferUpdated.
* @param canvas The target canvas
* @param painter The painter to paint with
*/
void renderFeatures(Canvas *canvas, QPainter &painter);
virtual void setVisible(bool flag);
virtual void bufferUpdated(Canvas *canvas, QPainter &painter);
virtual QMenu *menu(QMenu*) const;
virtual void geoFeatureSetUpdated();
private slots:
void toggleFeatureVisibility(bool);
void disableFeatureVisibility();
void showFeatures();
void hideFeatures();
void reloadFeatures();
private:
void initLayerProperites();
private:
struct SC_GUI_API LayerProperties {
enum SymbolShape {
Disabled,
None,
Circle,
Triangle,
Square,
Diamond
};
const LayerProperties *parent{nullptr};
std::string name;
std::string title;
Qt::Orientation orientation{Qt::Vertical};
Qt::Alignment legendArea{Qt::AlignTop | Qt::AlignLeft};
QPainter::CompositionMode compositionMode{QPainter::CompositionMode_SourceOver};
std::string label;
int index{0};
bool visible{true};
QPen pen;
QBrush brush;
QFont font;
bool drawName{false};
bool debug{false};
int rank{-1};
int roughness{-1};
bool filled{false};
int symbolSize{8};
QImage symbolIcon;
QPoint symbolIconHotspot;
SymbolShape symbolShape{Disabled};
QPolygon symbolPolygon;
Qt::Alignment symbolNameAlignment{Qt::AlignTop | Qt::AlignHCenter};
int symbolNameMargin{3};
// derived members
QRect symbolRect;
LayerProperties(const std::string &name) : name(name) {}
LayerProperties(const std::string &name,
const LayerProperties *parent) {
*this = *parent;
this->name = name;
this->parent = parent;
this->title = std::string(); // Reset the legend title
}
bool isChild(const LayerProperties* child) const;
void read(const std::string &dataDir = "");
static SymbolShape getSymbolShape(const std::string &type);
};
struct CategoryNode {
CategoryNode(const Geo::Category*);
~CategoryNode();
CategoryNode *nodeForCategory(const Geo::Category *cat);
CategoryNode *nodeForProperties(const LayerProperties *props);
const Geo::Category *category;
LayerProperties *properties{nullptr};
std::vector<CategoryNode*> childs;
std::vector<CategoryNode*> childsByName;
Geo::QuadTree quadtree;
Geo::GeoBoundingBox bbox;
};
static bool compareByIndex(const LayerProperties *p1,
const LayerProperties *p2);
static bool compareNodeByIndex(const GeoFeatureLayer::CategoryNode *n1,
const GeoFeatureLayer::CategoryNode *n2);
static bool compareNodeByName(const GeoFeatureLayer::CategoryNode *n1,
const GeoFeatureLayer::CategoryNode *n2);
CategoryNode *createOrGetNodeForCategory(const Geo::Category *cat);
void buildLegends(CategoryNode *node);
QMenu *buildMenu(CategoryNode *node, QMenu *parentMenu) const;
void collectLegendItems(CategoryNode *node, QVector<LayerProperties*> &items);
void orderTree(CategoryNode *node);
void updateBbox(CategoryNode *node);
const Geo::GeoFeature *findFeature(CategoryNode *node,
const Geo::GeoCoordinate &coord) const;
bool toggleVisibility(CategoryNode *node, bool visible);
void drawFeatures(CategoryNode *node, Canvas *canvas,
QPainter &painter, const QPen &debugPen);
bool drawFeature(Canvas *canvas, QPainter *painter,
const QPen *debugPen, const LayerProperties *props,
const Geo::GeoFeature *f);
bool _initialized;
CategoryNode *_root;
};
}
}
}
#endif

View File

@ -0,0 +1,56 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_MAP_LAYERS_GRIDLAYER_H
#define SEISCOMP_GUI_MAP_LAYERS_GRIDLAYER_H
#include <seiscomp/gui/qt.h>
#include <seiscomp/gui/map/layer.h>
#include <seiscomp/math/coord.h>
namespace Seiscomp {
namespace Gui {
namespace Map {
class Canvas;
class SC_GUI_API GridLayer : public Layer {
public:
GridLayer(QObject* = nullptr);
virtual ~GridLayer();
virtual void draw(const Canvas*, QPainter&);
void setGridDistance(const QPointF&);
const QPointF& gridDistance() const;
private:
QPointF _gridDistance;
};
} // namespace Map
} // namespce Gui
} // namespace Seiscomp
#endif

View File

@ -0,0 +1,254 @@
/***************************************************************************
* Copyright (C) gempa GmbH *
* All rights reserved. *
* Contact: gempa GmbH (seiscomp-dev@gempa.de) *
* *
* GNU Affero General Public License Usage *
* This file may be used under the terms of the GNU Affero *
* Public License version 3.0 as published by the Free Software Foundation *
* and appearing in the file LICENSE included in the packaging of this *
* file. Please review the following information to ensure the GNU Affero *
* Public License version 3.0 requirements will be met: *
* https://www.gnu.org/licenses/agpl-3.0.html. *
* *
* Other Usage *
* Alternatively, this file may be used in accordance with the terms and *
* conditions contained in a signed written agreement between you and *
* gempa GmbH. *
***************************************************************************/
#ifndef SEISCOMP_GUI_MAP_IMAGETREE_H
#define SEISCOMP_GUI_MAP_IMAGETREE_H
#ifndef Q_MOC_RUN
#include <seiscomp/core/interfacefactory.h>
#include <seiscomp/core/baseobject.h>
#endif
#include <seiscomp/gui/core/maps.h>
#include <QImage>
namespace Seiscomp {
namespace Gui {
namespace Map {
DEFINE_SMARTPOINTER(TextureCache);
class ImageTree;
struct SC_GUI_API TileIndex {
typedef uint64_t Storage;
enum Traits {
Invalid = uint64_t(-1),
MaxLevel = 29,
LevelBits = 5,
RowBits = MaxLevel,
ColumnBits = MaxLevel
};
Storage id;
TileIndex();
TileIndex(uint8_t level, uint32_t row, uint32_t column);
uint8_t level() const;
uint32_t row() const;
uint32_t column() const;
TileIndex parent() const;
bool operator==(const TileIndex &other) const;
bool operator!=(const TileIndex &other) const;
bool operator<(const TileIndex &other) const;
operator bool() const;
};
std::ostream &operator<<(std::ostream &os, const TileIndex &index);
DEFINE_SMARTPOINTER(TileStore);
class SC_GUI_API TileStore : public Core::BaseObject {
public:
enum LoadResult {
OK,
Deferred,
Error
};
TileStore();
public:
const QSize &tileSize() const { return _tilesize; }
//! Sets the parent image tree that gets notificiations about
//! state changed, e.g. finishedLoading.
void setImageTree(ImageTree *tree);
public:
virtual int maxLevel() const = 0;
//! Opens a tile repository and sets the desc flags accordingly
//! if necessary.
virtual bool open(MapsDesc &desc) = 0;
/**
* @brief Load a tile for a given index.
* Loading can happen synchronously or asynchronously. The later case
* should return the status LoadResult::Deferred and an invalid
* image. If a deferred image could not be loaded by the store it
* should then call invalidate with the failed index.
* @param img The image to be populated.
* @param tile The tile index
* @return Success flag.
*/
virtual LoadResult load(QImage &img, const TileIndex &tile) = 0;
//! Return a unique ID for a node
virtual QString getID(const TileIndex &tile) const = 0;
//! Validate the existance of a tile
virtual bool validate(int level, int column, int row) const = 0;
virtual bool hasPendingRequests() const = 0;
//! Refresh the image store, e.g. invalidate its cache
virtual void refresh() = 0;
protected:
//! Async notification that a tile has been loaded.
void finishedLoading(QImage &img, const TileIndex &tile);
//! Async notification that a tile has been loaded.
void loadingComplete(QImage &img, TileIndex tile);
//! Async notification that loading a tile has been aborted
void loadingCancelled(TileIndex tile);
//! Invalidates the tile of a particular node
void invalidate(const TileIndex &tile);
protected:
ImageTree *_tree;
QSize _tilesize;
};
DEFINE_INTERFACE_FACTORY(TileStore);
#define REGISTER_TILESTORE_INTERFACE(Class, Service) \
Seiscomp::Core::Generic::InterfaceFactory<Seiscomp::Gui::Map::TileStore, Class> __##Class##InterfaceFactory__(Service)
DEFINE_SMARTPOINTER(ImageTree);
class SC_GUI_API ImageTree : public QObject, public Core::BaseObject {
Q_OBJECT
public:
ImageTree(const MapsDesc &desc);
~ImageTree();
public:
bool valid() const { return _store.get(); }
//! This function was introduced in API 1.1
bool hasPendingRequests() const { return _store && _store->hasPendingRequests(); }
//! Returns the currently attached cache instance.
//! If no cache is yet attached a new cache is
//! created and stored in the object.
TextureCache *getCache();
//! Empties the texture cache and tells the store to do a refresh
//! as well.
//! This function was introduced in API 1.1.
void refresh();
public:
void finishedLoading(QImage &img, const TileIndex &tile);
void loadingComplete(QImage &img, TileIndex tile);
void loadingCancelled(TileIndex tile);
void invalidate(const TileIndex &tile);
signals:
void tilesUpdated();
//! Emitted when all tiles are loaded and no asynchronous requests
//! are still pending.
//! This signal was introduced in API 1.1.
void tilesComplete();
protected:
TextureCachePtr _cache;
TileStorePtr _store;
bool _isMercatorProjected;
size_t _cacheSize;
friend class TileStore;
};
inline TileIndex::TileIndex() : id(Invalid) {}
inline TileIndex::TileIndex(uint8_t level, uint32_t row, uint32_t column) {
id = ((Storage(level) & ((1 << LevelBits) - 1)) << (RowBits + ColumnBits)) |
((Storage(row) & ((1 << RowBits) - 1)) << ColumnBits) |
(Storage(column) & ((1 << ColumnBits) - 1));
}
inline uint8_t TileIndex::level() const {
return (id >> (RowBits + ColumnBits)) & ((1 << LevelBits) - 1);
}
inline uint32_t TileIndex::row() const {
return (id >> ColumnBits) & ((1 << RowBits) - 1);
}
inline uint32_t TileIndex::column() const {
return id & ((1 << ColumnBits) - 1);
}
inline TileIndex TileIndex::parent() const {
auto l = level();
return l ? TileIndex(l-1, row() >> 1, column() >> 1) : TileIndex();
}
inline bool TileIndex::operator==(const TileIndex &other) const {
return id == other.id;
}
inline bool TileIndex::operator!=(const TileIndex &other) const {
return id != other.id;
}
inline bool TileIndex::operator<(const TileIndex &other) const {
return id < other.id;
}
inline TileIndex::operator bool() const {
return id != Invalid;
}
inline std::ostream &operator<<(std::ostream &os, const TileIndex &index) {
os << static_cast<int>(index.level()) << "/" << index.row() << "/" << index.column();
return os;
}
}
}
}
#endif

Some files were not shown because too many files have changed in this diff Show More