#include <HVPlugin.h>
Public Member Functions | |
| virtual void | addPreferenceTab (QTabWidget *parent) |
| virtual ToolBase * | createTool (int id, QWidget *wsParent) const |
| virtual void | createToolActions (QObject *toolFactory) |
| HVPlugin () | |
| virtual const char * | interfaceVersion () const |
| virtual void | setHelp (ApplicationHelp *h) |
| virtual void | setPreferences () |
| virtual QString | tag () const |
| virtual QString | title () const |
| HVPlugin::HVPlugin | ( | ) | [inline] |
{_tab=0;}
| void HVPlugin::addPreferenceTab | ( | QTabWidget * | parent | ) | [virtual] |
Add a new tab to Preference tabWidget
Reimplemented from GeopsyGui::GeopsyGuiInterface.
References QGpCoreTools::tr(), and TRACE.
{
TRACE;
_tab=new TabHVPreferences();
parent->addTab(_tab,tr("HV"));
}
| ToolBase * HVPlugin::createTool | ( | int | id, |
| QWidget * | wsParent | ||
| ) | const [virtual] |
Implements GeopsyGui::GeopsyGuiInterface.
References TRACE.
{
TRACE;
switch (id) {
case 0:
return new ToolSpectrum(wsParent);
break;
case 1:
return new ToolHV(wsParent);
break;
case 2:
return new ToolSpectrumRotate(wsParent);
break;
case 3:
return new ToolHVRotate(wsParent);
break;
default:
break;
}
return 0;
}
| void HVPlugin::createToolActions | ( | QObject * | toolFactory | ) | [virtual] |
Implements GeopsyGui::GeopsyGuiInterface.
References GeopsyGui::GeopsyGuiInterface::addAction(), QGpCoreTools::tr(), and TRACE.
{
TRACE;
QAction * a;
a=new QAction(toolFactory);
a->setText(tr("Spectrum"));
a->setIcon(QIcon(":/images/spectrum-22x22.png"));
connect(a, SIGNAL(triggered()), toolFactory, SLOT(showTool()) );
addAction(a);
a=new QAction(toolFactory);
a->setText(tr("H/V"));
a->setIcon(QIcon(":/images/hv-22x22.png"));
connect(a, SIGNAL(triggered()), toolFactory, SLOT(showTool()) );
addAction(a);
a=new QAction(toolFactory);
a->setText(tr("Spectrum Rotate"));
a->setIcon(QIcon(":/images/spectrumrotate-22x22.png"));
connect(a, SIGNAL(triggered()), toolFactory, SLOT(showTool()) );
addAction(a);
a=new QAction(toolFactory);
a->setText(tr("H/V Rotate"));
a->setIcon(QIcon(":/images/hvrotate-22x22.png"));
connect(a, SIGNAL(triggered()), toolFactory, SLOT(showTool()) );
addAction(a);
}
| virtual const char* HVPlugin::interfaceVersion | ( | ) | const [inline, virtual] |
Returns the geopsycore version of the plugin (at compile time)
Implements GeopsyCore::GeopsyCoreInterface.
{return GEOPSYCORE_VERSION;}
| void HVPlugin::setHelp | ( | ApplicationHelp * | h | ) | [virtual] |
Reimplemented from GeopsyGui::GeopsyGuiInterface.
References QGpCoreTools::ApplicationHelp::addExample(), QGpCoreTools::ApplicationHelp::addGroup(), QGpCoreTools::ApplicationHelp::addOption(), tag(), QGpCoreTools::tr(), and TRACE.
{
TRACE;
h->addGroup(tr("Spectrum (tag=%1, slot=0)").arg(tag()), "spectrum" );
setCommonHelp(h);
h->addOption("-curves","Output spectral curves for all windows");
h->addOption("-average","Output average spectral curve");
h->addGroup(tr("H/V (tag=%1, slot=1)").arg(tag()), "hv" );
setCommonHelp(h);
h->addOption("-curves","Output H/V curves for all windows");
h->addOption("-average","Output H/V average curve");
h->addGroup(tr("Spectrum Rotate (tag=%1, slot=2)").arg(tag()), "spectrumrotate" );
setCommonHelp(h);
h->addGroup(tr("H/V Rotate (tag=%1, slot=3)").arg(tag()), "hvrotate" );
setCommonHelp(h);
h->addExample( "geopsy -db /home/mwathele/M2/database.gpy -- -tool geopsyhv -slot 1 -group "
"\"/333 sources/Central station\" -- -param tmp.log -autowin -peaks -clearpeaks -addpeak \"4,6\" -peaks",
"Open a database and start H/V processing on group of signals named \"/333 sources/Central station\". "
"Automatic windowing is used. Parameters are defined by \"tmp.log\". A template for this parameter "
"file can be created with the graphical user interface (\"Save results\" in H/V result viewer). "
"The default peaks are printed. Then, the list of peaks is cleared and a new one is added between "
"4 and 6 Hz.");
}
| void HVPlugin::setPreferences | ( | ) | [virtual] |
Set properties of the HV tab
Reimplemented from GeopsyGui::GeopsyGuiInterface.
References TabHVPreferences::setPreferences(), and TRACE.
{
TRACE;
if(!_tab) return;
_tab->setPreferences();
_tab=0;
}
| virtual QString HVPlugin::tag | ( | ) | const [inline, virtual] |
| virtual QString HVPlugin::title | ( | ) | const [inline, virtual] |
Implements GeopsyCore::GeopsyCoreInterface.
References QGpCoreTools::tr().
{return tr("H/V and Spectal ratios");}