Brief description of class still missing. More...
#include <SeedLinkLoaderOptions.h>
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) |
Brief description of class still missing.
Full description of class still missing
| GeopsySLinkGui::SeedLinkLoaderOptions::SeedLinkLoaderOptions | ( | QWidget * | parent = 0 | ) |
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())); }
| void GeopsySLinkGui::SeedLinkLoaderOptions::bufferToggled | ( | ) | [slot] |
References TRACE.
Referenced by SeedLinkLoaderOptions(), and updateAllFields().
{
TRACE;
bool c=! unlimitedBut->isChecked();
maxDurationLabel->setEnabled(c);
maxDuration->setEnabled(c);
maxDurationUnit->setEnabled(c);
}
| void GeopsySLinkGui::SeedLinkLoaderOptions::fromTimeToggled | ( | ) | [slot] |
References TRACE.
Referenced by SeedLinkLoaderOptions(), and updateAllFields().
{
TRACE;
fromTime->setEnabled(fromBut->isChecked());
}
| void GeopsySLinkGui::SeedLinkLoaderOptions::getParam | ( | SeedLink * | sl | ) |
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);
}
| void GeopsySLinkGui::SeedLinkLoaderOptions::on_maxDurationUnit_activated | ( | int | index | ) | [slot] |
References QGpCoreTools::tr(), and TRACE.
Referenced by updateAllFields().
| void GeopsySLinkGui::SeedLinkLoaderOptions::restore | ( | SeedLink * | sl | ) | [static] |
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);
}
References bufferToggled(), fromTimeToggled(), on_maxDurationUnit_activated(), and TRACE.
{
TRACE;
bufferToggled();
fromTimeToggled();
on_maxDurationUnit_activated(maxDurationUnit->currentIndex());
}