All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Public Slots | Public Member Functions | Static Public Member Functions
GeopsySLinkGui::SeedLinkLoaderOptions Class Reference

Brief description of class still missing. More...

#include <SeedLinkLoaderOptions.h>

Inheritance diagram for GeopsySLinkGui::SeedLinkLoaderOptions:
QGpGuiTools::Dialog QGpGuiTools::FrameGrabber

List of all members.

Public Slots

void bufferToggled ()
void fromTimeToggled ()
void on_maxDurationUnit_activated (int index)

Public Member Functions

void getParam (SeedLink *sl)
 SeedLinkLoaderOptions (QWidget *parent=0)
void updateAllFields ()

Static Public Member Functions

static void restore (SeedLink *sl)

Detailed Description

Brief description of class still missing.

Full description of class still missing


Constructor & Destructor Documentation

Description of constructor still missing

References bufferToggled(), fromTimeToggled(), and TRACE.

    : Dialog(parent)
{
  TRACE;
  setupUi(this);

  connect (fromNowBut, SIGNAL(toggled(bool)), this, SLOT(fromTimeToggled()));
  connect (fromBut, SIGNAL(toggled(bool)), this, SLOT(fromTimeToggled()));
  connect (unlimitedBut, SIGNAL(toggled(bool)), this, SLOT(bufferToggled()));
  connect (createNewBut, SIGNAL(toggled(bool)), this, SLOT(bufferToggled()));
  connect (rotateBut, SIGNAL(toggled(bool)), this, SLOT(bufferToggled()));
}

Member Function Documentation

References TRACE.

Referenced by SeedLinkLoaderOptions(), and updateAllFields().

{
  TRACE;
  bool c=! unlimitedBut->isChecked();
  maxDurationLabel->setEnabled(c);
  maxDuration->setEnabled(c);
  maxDurationUnit->setEnabled(c);
}

References TRACE.

Referenced by SeedLinkLoaderOptions(), and updateAllFields().

{
  TRACE;
  fromTime->setEnabled(fromBut->isChecked());
}

References GeopsySLink::SeedLink::setBufferType(), GeopsySLink::SeedLink::setFromTime(), GeopsySLink::SeedLink::setMaximumDuration(), and TRACE.

{
  TRACE;
  if(fromNowBut->isChecked()) sl->setFromTime(QDateTime());
  else sl->setFromTime(fromTime->dateTime());

  if(unlimitedBut->isChecked()) sl->setBufferType(SeedLinkStream::Unlimited);
  else if(createNewBut->isChecked()) sl->setBufferType(SeedLinkStream::CreateNew);
  else sl->setBufferType(SeedLinkStream::Rotate);

  double fac=unitFactor(maxDurationUnit->currentIndex());
  sl->setMaximumDuration(maxDuration->value() * fac);
}

References QGpCoreTools::tr(), and TRACE.

Referenced by updateAllFields().

{
  TRACE;
  switch (index) {
  case 3:
    maxDuration->setSuffix(tr(" day(s)"));
    break;
  case 2:
    maxDuration->setSuffix(tr(" h"));
    break;
  case 1:
    maxDuration->setSuffix(tr(" min"));
    break;
  default:
    maxDuration->setSuffix(tr(" s"));
    break;
  }
}

References GeopsySLink::SeedLink::setBufferType(), GeopsySLink::SeedLink::setFromTime(), GeopsySLink::SeedLink::setMaximumDuration(), and TRACE.

Referenced by GeopsySLinkGui::SeedLinkLoader::SeedLinkLoader().

{
  TRACE;
  static const char * dateFormat="dd/MM/yyyy hh:mm:ss";

  QSettings reg;
  reg.beginGroup("DialogOptions");
  reg.beginGroup("SeedLinkLoaderOptions");

  if(reg.value("fromBox/fromNowBut", true).toBool()) sl->setFromTime(QDateTime());
  else {
    QString d=reg.value("fromBox/fromTime", QDateTime::currentDateTime().toString(dateFormat)).toString();
    sl->setFromTime(QDateTime::fromString(d, dateFormat) );
  }

  if(reg.value("bufferBox/unlimitedBut", true).toBool()) sl->setBufferType(SeedLinkStream::Unlimited);
  else if(reg.value("bufferBox/createNewBut", false).toBool()) sl->setBufferType(SeedLinkStream::CreateNew);
  else sl->setBufferType(SeedLinkStream::Rotate);

  double fac=unitFactor(reg.value("bufferBox/maxDurationUnit", 2).toInt());
  // DoubleSpinBox has three values in settings: nDecimals, singleStep, currentValue
  QStringList spinBoxProp=reg.value("bufferBox/maxDuration", "2,1,1").toStringList();
  if(spinBoxProp.count()==3)
    sl->setMaximumDuration(spinBoxProp[2].toDouble() * fac);
  else
    sl->setMaximumDuration(fac);
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines