* @brief GUI for the ScosTime application
* @author Enar Vaikene
*
- * Copyright (c) 2012 Enar Vaikene
+ * Copyright (c) 2012-2019 Enar Vaikene
*
* This file is part of the eVaf C++ cross-platform application development framework.
*
dt = dt.addDays(days - 1);
return QDateTime(dt, QTime(hours, minutes, secs, msecs), Qt::UTC);
- break;
}
case ISO:
{
QDateTime dt = QDateTime::fromString(tmp, Qt::ISODate);
dt.setTimeSpec(Qt::UTC);
return dt;
- break;
}
case CUC:
{
// Get the CUC coarse and fine values
bool ok = false;
- int coarse = s.left(8).toLong(&ok, 16);
+ int const coarse = static_cast<int>(s.left(8).toLong(&ok, 16));
if (!ok)
{
return QDateTime();
int fine = 0;
if (s.size() == 12)
{
- fine = s.mid(8, 4).toLong(&ok, 16);
+ fine = static_cast<int>(s.mid(8, 4).toLong(&ok, 16));
if (!ok)
{
return QDateTime();
// Get the date/time value
QDateTime tm = mEpoch.addSecs(coarse);
- tm = tm.addMSecs(rint((double(fine) / 58.0 * 885.0) / 1000.0));
+ tm = tm.addMSecs(static_cast<int>(rint((double(fine) / 58.0 * 885.0) / 1000.0)));
return tm;
-
- break;
}
default:
{
bool Module::init(QString const & args)
{
- Q_UNUSED(args);
+ Q_UNUSED(args)
// Get the main window interface and fill it with the widgets
SdiWindow::iSdiWindow * win = evafQueryInterface<SdiWindow::iSdiWindow>("iSdiWindow");
- EVAF_TEST_X(win, "No iSdiWindow interface");
+ EVAF_TEST_X(win, "No iSdiWindow interface")
Gui::Panel * panel = new Gui::Panel;
win->addPanel("PswGen", panel);
wConvertDateTime->setEnabled(true);
wConvertDateTime->setText(tr("&to ASD", VER_MODULE_NAME_STR));
}
- else if (mDateTime.type() == Internal::DateTime::ISO)
+ else if (mDateTime.type() == Internal::DateTime::ASD)
{
wConvertDateTime->setEnabled(true);
wConvertDateTime->setText(tr("&to ISO", VER_MODULE_NAME_STR));