Example #1
0
template<> QTime stringToValue<QTime>(QString s_, QObject *concerning) {
    QString s = s_.trimmed();
    if (s == missingValue<QString>())
        return missingValue<QTime>();
    QTime time = QTime::fromString(s, "h:m:s");
    if (!time.isValid())
            time = QTime::fromString(s, "h:m");
    if (!time.isValid()) {
        QString msg = "Cannot convert '" + s + "' to a time" + hint(s);
        throw Exception(msg, concerning);
    }
    return time;
}
Example #2
0
static void log(int level, const char *fmt, va_list ap)
{
	if(!g_time.isValid())
		g_time.start();

	if(level <= g_level)
	{
		QString str;
		str.vsprintf(fmt, ap);

		const char *lstr;
		switch(level)
		{
			case LOG_LEVEL_ERROR:   lstr = "ERR"; break;
			case LOG_LEVEL_WARNING: lstr = "WARN"; break;
			case LOG_LEVEL_INFO:    lstr = "INFO"; break;
			case LOG_LEVEL_DEBUG:
			default:
				lstr = "DEBUG"; break;
		}

		QTime t(0, 0);
		t = t.addMSecs(g_time.elapsed());
		fprintf(stderr, "[%s] %s %s\n", lstr, qPrintable(t.toString("HH:mm:ss.zzz")), qPrintable(str));
	}
}
Example #3
0
int Tano::Xmltv::timeZoneDiff()
{
    QDateTime local = QDateTime::currentDateTime();
    local.setTime(QTime(0, 0));
    QDateTime utc = local.toUTC();
    local.setTimeSpec(Qt::LocalTime);
    QDateTime offset = local.toUTC();
    QTime properTimeOffset = QTime(offset.time().hour(), offset.time().minute());
    offset.setTimeSpec(Qt::LocalTime);
    utc.setTimeSpec(Qt::UTC);

    bool isNegative;
    if (offset.secsTo(utc) < 0) {
        isNegative = true;
    } else {
        isNegative = false;
        properTimeOffset.setHMS(24 - properTimeOffset.hour() - (properTimeOffset.minute()/60.0) - (properTimeOffset.second()/3600.0), properTimeOffset.minute() - (properTimeOffset.second()/60.0), properTimeOffset.second());
        if (!properTimeOffset.isValid()) { //Midnight case
            properTimeOffset.setHMS(0,0,0);
        }
    }

    if (isNegative)
        return properTimeOffset.secsTo(QTime(0, 0));
    else
        return - properTimeOffset.secsTo(QTime(0, 0));
}
Example #4
0
QDateTime stamp2TS(const QString &ts)
{
	if(ts.length() != 17)
		return QDateTime();

	int year  = ts.mid(0,4).toInt();
	int month = ts.mid(4,2).toInt();
	int day   = ts.mid(6,2).toInt();

	int hour  = ts.mid(9,2).toInt();
	int min   = ts.mid(12,2).toInt();
	int sec   = ts.mid(15,2).toInt();

	QDate xd;
	xd.setYMD(year, month, day);
	if(!xd.isValid())
		return QDateTime();

	QTime xt;
	xt.setHMS(hour, min, sec);
	if(!xt.isValid())
		return QDateTime();

	return QDateTime(xd, xt);
}
Example #5
0
bool MainWindow::eventFilter(QObject *object, QEvent *event)
{
    if ( object == d_plot->canvas() && event->type() == QEvent::Paint )
    {
        static int counter;
        static QTime timeStamp;

        if ( !timeStamp.isValid() )
        {
            timeStamp.start();
            counter = 0;
        }
        else
        {
            counter++;

            const double elapsed = timeStamp.elapsed() / 1000.0;
            if ( elapsed >= 1 )
            {
                QString fps;
                fps.setNum(qRound(counter / elapsed));
                fps += " Fps";

                d_frameCount->setText(fps);

                counter = 0;
                timeStamp.start();
            }
        }
    }

    return QMainWindow::eventFilter(object, event);
};
Example #6
0
static DATE QDateTimeToDATE(const QDateTime &dt)
{
    if (!dt.isValid() || dt.isNull())
        return 949998;
    
    SYSTEMTIME stime;
    memset(&stime, 0, sizeof(stime));
    QDate date = dt.date();
    QTime time = dt.time();
    if (date.isValid() && !date.isNull()) {
        stime.wDay = date.day();
        stime.wMonth = date.month();
        stime.wYear = date.year();
    }
    if (time.isValid() && !time.isNull()) {
        stime.wMilliseconds = time.msec();
        stime.wSecond = time.second();
        stime.wMinute = time.minute();
        stime.wHour = time.hour();
    }
    
    double vtime;
    SystemTimeToVariantTime(&stime, &vtime);
    
    return vtime;
}
Example #7
0
void QNmeaPositionInfoSourcePrivate::notifyNewUpdate(QGeoPositionInfo *update, bool hasFix)
{
    // include <QDebug> before uncommenting
    //qDebug() << "QNmeaPositionInfoSourcePrivate::notifyNewUpdate()" << update->timestamp() << hasFix << m_invokedStart << (m_requestTimer && m_requestTimer->isActive());

    QDate date = update->timestamp().date();
    if (date.isValid()) {
        m_currentDate = date;
    } else {
        // some sentence have time but no date
        QTime time = update->timestamp().time();
        if (time.isValid() && m_currentDate.isValid())
            update->setTimestamp(QDateTime(m_currentDate, time, Qt::UTC));
    }

    if (hasFix && update->isValid()) {
        if (m_requestTimer && m_requestTimer->isActive()) {
            m_requestTimer->stop();
            emitUpdated(*update);
        } else if (m_invokedStart) {
            if (m_updateTimer && m_updateTimer->isActive()) {
                // for periodic updates, only want the most recent update
                m_pendingUpdate = *update;
                if (m_noUpdateLastInterval) {
                    emitPendingUpdate();
                    m_noUpdateLastInterval = false;
                }
            } else {
                emitUpdated(*update);
            }
        }
        m_lastUpdate = *update;
    }
}
void DB::FileInfo::parseKFileMetaInfo( const DB::FileName& fileName )
{
    KFileMetaInfo metainfo( fileName.absolute() );
    if ( !metainfo.isValid() )
        return;

    // Date.
    if ( metainfo.keys().contains( QString::fromLatin1( "CreationDate" ) ) ) {
        QDate date = metainfo.item( QString::fromLatin1( "CreationDate" )).value().toDate();
        if ( date.isValid() ) {
            m_date.setDate( date );

            if ( metainfo.keys().contains( QString::fromLatin1( "CreationTime" ) ) ) {
                QTime time = metainfo.item(QString::fromLatin1( "CreationTime" )).value().toTime();
                if ( time.isValid() )
                    m_date.setTime( time );
            }
        }
    }

    // Angle
    if ( metainfo.keys().contains( QString::fromLatin1( "Orientation" ) ) )
        m_angle = orientationToAngle( metainfo.item( QString::fromLatin1( "Orientation" ) ).value().toInt() );

    // Description
    if ( metainfo.keys().contains( QString::fromLatin1( "Comment" ) ) )
        m_description = metainfo.item( QString::fromLatin1( "Comment" ) ).value().toString();
}
Example #9
0
//Currently unused
void GraspSelectionState::onNext()
{
    static QTime activeTimer;
    qint64 minElapsedMSecs = 600;
    if(!activeTimer.isValid() || activeTimer.elapsed() >= minElapsedMSecs)
    {

        activeTimer.start();
        OnlinePlannerController::getInstance()->incrementGraspIndex();
        const GraspPlanningState * currentGrasp = OnlinePlannerController::getInstance()->getCurrentGrasp();
        Hand *hand = OnlinePlannerController::getInstance()->getGraspDemoHand();

        int next_grasp_index =OnlinePlannerController::getInstance()->currentGraspIndex + 1;
        if (next_grasp_index == OnlinePlannerController::getInstance()->getNumGrasps())
        {
            next_grasp_index = 0;
        }
        const GraspPlanningState *nextGrasp = OnlinePlannerController::getInstance()->getGrasp(next_grasp_index);
        if(nextGrasp)
        {
            graspSelectionView->showNextGrasp(hand, nextGrasp);
        }

        if(currentGrasp)
        {
            currentGrasp->execute(OnlinePlannerController::getInstance()->getRefHand());
            OnlinePlannerController::getInstance()->alignHand();
            graspSelectionView->showSelectedGrasp(hand, currentGrasp);
            QString graspID;
            bciControlWindow->currentState->setText(stateName +"- Grasp: " + graspID.setNum(currentGrasp->getAttribute("graspId")) );
        }

    }
    csm->setCursorPosition(-1,0,0);
}
Example #10
0
void GraspSelectionState::onPlannerUpdated()
{
    static QTime activeTimer;
    qint64 minElapsedMSecs = 300;
    if(!activeTimer.isValid() || activeTimer.elapsed() >= minElapsedMSecs)
    {
    DBGA("GraspSelectionState::onPlannerUpdated: " << this->name().toStdString());
    OnlinePlannerController::getInstance()->sortGrasps();
    OnlinePlannerController::getInstance()->resetGraspIndex();
    const GraspPlanningState *bestGrasp = OnlinePlannerController::getInstance()->getCurrentGrasp();
    Hand *hand = OnlinePlannerController::getInstance()->getGraspDemoHand();
    int next_grasp_index =OnlinePlannerController::getInstance()->currentGraspIndex + 1;
    if (next_grasp_index == OnlinePlannerController::getInstance()->getNumGrasps())
    {
        next_grasp_index = 0;
    }
    const GraspPlanningState *nextGrasp = OnlinePlannerController::getInstance()->getGrasp(next_grasp_index);
    if(nextGrasp)
    {
        graspSelectionView->showNextGrasp(hand, nextGrasp);
    }
    if(bestGrasp)
    {
        graspSelectionView->showSelectedGrasp(hand,bestGrasp);
        QString graspID;
        bciControlWindow->currentState->setText(stateName + ": Grasp: " + graspID.setNum(bestGrasp->getAttribute("graspId")) );
    }
    else
    {
        DBGA("GraspSelectionState::onPlannerUpdated::No best grasp found");
    }
    OnlinePlannerController::getInstance()->analyzeNextGrasp();
    }
    OnlinePlannerController::getInstance()->renderPending = false;
}
Example #11
0
void QxtScheduleHeaderWidget::paintSection(QPainter * painter, const QRect & rect, int logicalIndex) const
{
    if (model())
    {
        switch (orientation())
        {
        case Qt::Horizontal:
        {
            QHeaderView::paintSection(painter, rect, logicalIndex);
        }
        break;
        case Qt::Vertical:
        {
            QTime time = model()->headerData(logicalIndex, Qt::Vertical, Qt::DisplayRole).toTime();
            if (time.isValid())
            {
                QRect temp = rect;
                temp.adjust(1, 1, -1, -1);

                painter->fillRect(rect, this->palette().background());

                if (time.minute() == 0)
                {
                    painter->drawLine(temp.topLeft() + QPoint(temp.width() / 3, 0), temp.topRight());
                    painter->drawText(temp, Qt::AlignTop | Qt::AlignRight, time.toString("hh:mm"));
                }
            }
        }
        break;
        default:
            Q_ASSERT(false); //this will never happen... normally
        }
    }
}
// =============================================================================
void DialogTimeFollower::onTimeout()
{
    // User clicked on stop
    QString color = "black";
    bool startTimeIsValid = mTimeTrackingModel->startTimeIsValid();
    bool endTimeIsValid = mTimeTrackingModel->endTimeIsValid();
    ui->pushButtonStart->setVisible(startTimeIsValid == false || endTimeIsValid == true);
    ui->pushButtonStop->setVisible(endTimeIsValid == false && startTimeIsValid == true);
    ui->pushButtonPause->setVisible(endTimeIsValid == false && startTimeIsValid == true);
    if(endTimeIsValid) {
        color = "blue";
    }

    bool isNegativ;
    QTime remainingTime = mTimeTrackingModel->differenceFromStartToNow(isNegativ);
    if(remainingTime.isValid()) {
        QString label = remainingTime.toString("hh:mm");
        if(isNegativ) {
            label = "-" + label;
        }
        ui->labelDayRemaining->setText("<font color='" + color + "'>" + label + "</font>");
    } else {
        ui->labelDayRemaining->setText("Zzz..");
    }

    ui->labelMonthWorked->setText("Month: " + MiscDateTime::secondsToHours(mTimeTrackingModel->getMonthlySeconds()));
    ui->labelBalance->setText("Bal: " + MiscDateTime::secondsToHours(mTimeTrackingModel->getMonthlyOverDueSeconds()));
}
QDateTime KTiffPlugin::tiffDate(const QString& s) const
{
    QDateTime dt;
    QRegExp rxDate("^([0-9]{4}):([0-9]{2}):([0-9]{2})\\s"
                   "([0-9]{2}):([0-9]{2}):([0-9]{2})$");

    if (rxDate.indexIn(s) != -1)
    {
        int year = rxDate.cap(1).toInt();
        int month = rxDate.cap(2).toInt();
        int day = rxDate.cap(3).toInt();
        int hour = rxDate.cap(4).toInt();
        int min = rxDate.cap(5).toInt();
        int sec = rxDate.cap(6).toInt();

        QDate d = QDate(year, month, day);
        QTime t = QTime(hour, min, sec);

        if (d.isValid() && t.isValid())
        {
            dt.setDate(d);
            dt.setTime(t);
        }
    }

    return dt;
}
//-------------------------------------------------------------------------------------------
double LexicalCast::fromTime(const char* p) const
{
  for (int i = 0; i < _timeFormatLength; i++) {
    if (*(p + i) == '\0')
      return Kst::NOPOINT;
  }

  const QString time = QString::fromLatin1(p, _timeFormatLength);
  double sec = Kst::NOPOINT;
  if (_timeWithDate) {
    QDateTime t = QDateTime::fromString(time, _timeFormat);
    if (t.isValid()) {
      t.setTimeSpec(Qt::UTC);
#if QT_VERSION >= 0x040700
      sec = t.toMSecsSinceEpoch() / 1000.0;
#else
      sec = t.toTime_t();
#endif
    }
  } else {
    const QTime t = QTime::fromString(time, _timeFormat);
    if (t.isValid())
      sec = QTime(0, 0, 0).msecsTo(t) / 1000.0;
  }
  return sec;
}
Example #15
0
void FileBoom::checkWaitTime() {
    QNetworkReply *reply = qobject_cast<QNetworkReply*>(this->sender());

    if (!reply) {
        emit error(NetworkError);
        return;
    }

    QRegExp re("(http://fboom.me|)/file/url.html\\?file=[^'\"]+");
    QString redirect = reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toString();

    if (re.indexIn(redirect) == 0) {
        QUrl url(re.cap());

        if (url.host().isEmpty()) {
            url.setScheme("http");
            url.setHost("fboom.me");
        }

        emit downloadRequestReady(QNetworkRequest(url));
    }
    else {
        QString response(reply->readAll());

        if (re.indexIn(response) >= 0) {
            QUrl url(re.cap());

            if (url.host().isEmpty()) {
                url.setScheme("http");
                url.setHost("fboom.me");
            }

            emit downloadRequestReady(QNetworkRequest(url));
        }
        else if (response.contains("Downloading is not possible")) {
            QTime time = QTime::fromString(response.section("Please wait", 1, 1).section("to download", 0, 0).trimmed(), "hh:mm:ss");

            if (time.isValid()) {
                this->startWait(QTime::currentTime().msecsTo(time));
                this->connect(this, SIGNAL(waitFinished()), this, SLOT(onWaitFinished()));
            }
            else {
                emit error(UnknownError);
            }
        }
        else {
            m_captchaKey = response.section("/file/captcha.html?v=", 1, 1).section('"', 0, 0);

            if (m_captchaKey.isEmpty()) {
                emit error(UnknownError);
            }
            else {
                emit statusChanged(CaptchaRequired);
            }
        }
    }

    reply->deleteLater();
}
void ClassAppointment::setStartsAt(const QTime &startTime) {
    if (startTime.isValid()) {
        m_startsAt = startTime;
        emit startsAtChanged(startTime);
        return;
    }
    qDebug() << "invalid start time";
}
    bool TriggerTimeRange::isActive(ExecutionState* state)
    {
        QTime startTime = QTime::fromString(
                QString::fromStdString(getParameter("TIME_START", state)));
        if (!startTime.isValid()) {
            state->getLogger()->error("Cannot parse start time, aborting");
            throw ExecutionAbortedException();
        }
        QTime duration = QTime::fromString(QString::fromStdString(getParameter("DURATION", state)));
        if (!duration.isValid()) {
            state->getLogger()->error("Cannot parse duration, aborting");
            throw ExecutionAbortedException();
        }
        QDateTime now = QDateTime::currentDateTime();

        return isActive(startTime, duration, now, state);
    }
void ClassAppointment::setEndsAt(const QTime &endTime) {
    if (endTime.isValid() && endTime > m_startsAt) {
        m_endsAt = endTime;
        emit endsAtChanged(endTime);
        return;
    }
    qDebug() << "invalid end time";
}
// =============================================================================
void PreferencesDialog::onTimeChangedPauseTime(const QTime &time)
{
    if(time.isValid()) {
        TimeTrackingSettings::getInstance()->setPeriodPauseTime(time);
    } else {
        DEBUG("Invalid time for pause");
    }
}
void QDateTimeModel::setTime(const QTime &time)
{
    Q_D(QDateTimeModel);
    if (time.isValid() && time > d->minimum.time() && time < d->maximum.time()) {
        d->value.setTime(time);
        emit dateTimeChanged(d->value);
    }
}
// =============================================================================
void PreferencesDialog::onTimeChangedDefaultAction(const QTime &time)
{
    if(time.isValid()) {
        TimeTrackingSettings::getInstance()->setPeriodDefaultAction(time);
    } else {
        DEBUG("Invalid time");
    }
}
Example #22
0
/*!
 * \brief sets a date, if date is invalid a
 * empty date is shown
 */
void QDateEditEx::setTime(const QTime &time)
{
    if (d->nullable && !time.isValid()) {
        d->setNull(true);
    } else {
        d->setNull(false);
        QDateEdit::setTime(time);
    }
}
// TODO: test this function!
// slot for 5Hz timer
void BoxStates::refreshAbsentTimes()
{
	checkAbsentTimes();
	
    QTime t;

	// timebase
    t = timeBaseState.lastAliveTime;
    if(t.isValid()){
        timeBaseState.txtAbsentSince.setText(getAbsentText(t));
        t = timeBaseState.baseTime;
        if(t.isValid()){
            QTime now = MainWindow::app()->getTimeBaseTime();
            int msecs = timeBaseState.lastAliveTime.msecsTo(now); // milliseconds
            QTime extrapolatedBaseTime(timeBaseState.baseTime);
            extrapolatedBaseTime = extrapolatedBaseTime.addMSecs(msecs);
            timeBaseState.txtBaseTime.setText(MainWindow::convertTimeToString(extrapolatedBaseTime) + QString(" (%1ms)").arg(MainWindow::app()->localTimeOffset_ms));
        }
    }

	// triggerstations
    t = triggerStationState[START].lastAliveTime;
    if(t.isValid()){
        triggerStationState[START].txtAbsentSince.setText(getAbsentText(t));
    }

    t = triggerStationState[GOAL].lastAliveTime;
    if(t.isValid()){
		triggerStationState[GOAL].txtAbsentSince.setText(getAbsentText(t));
    }
	
	// matrix display
	t = matrixDisplayState[1].lastAliveTime;
    if(t.isValid()){
        matrixDisplayState[1].txtAbsentSince.setText(getAbsentText(t));
    }

    t = matrixDisplayState[2].lastAliveTime;
    if(t.isValid()){
		matrixDisplayState[2].txtAbsentSince.setText(getAbsentText(t));
    }

	// boatboxes
    for(int id=1; id<=N_BOATBOXES; id++){
        t = boatBoxState[id].lastAliveTime[START];
        if(t.isValid()){
            boatBoxState[id].txtAbsentSince[START].setText(getAbsentText(t));
        }
        t = boatBoxState[id].lastAliveTime[GOAL];
        if(t.isValid()){
            boatBoxState[id].txtAbsentSince[GOAL].setText(getAbsentText(t));
        }
    }
}
void QNmeaSimulatedReader::processNextSentence()
{
    QGeoPositionInfo info;
    bool hasFix = false;
    int timeToNextUpdate = -1;
    QTime prevTime;
    if (m_pendingUpdates.size() > 0)
        prevTime = m_pendingUpdates.head().info.timestamp().time();

    // find the next update with a valid time (as long as the time is valid,
    // we can calculate when the update should be emitted)
    while (m_proxy->m_device && m_proxy->m_device->bytesAvailable() > 0) {
        char buf[1024];
        qint64 size = m_proxy->m_device->readLine(buf, sizeof(buf));
        if (size <= 0)
            continue;
        if (m_proxy->parsePosInfoFromNmeaData(buf, size, &info, &hasFix)) {
            QTime time = info.timestamp().time();
            if (time.isValid()) {
                if (!prevTime.isValid()) {
                    timeToNextUpdate = 0;
                    break;
                }
                timeToNextUpdate = prevTime.msecsTo(time);
                if (timeToNextUpdate >= 0)
                    break;
            } else {
                timeToNextUpdate = 0;
                break;
            }
        }
    }

    if (timeToNextUpdate < 0)
        return;

    m_pendingUpdates.dequeue();

    QPendingGeoPositionInfo pending;
    pending.info = info;
    pending.hasFix = hasFix;
    m_pendingUpdates.enqueue(pending);
    m_currTimerId = startTimer(timeToNextUpdate);
}
/*!
  Set a time
  \param time Time to display
*/
void QwtAnalogClock::setTime( const QTime &time )
{
    if ( time.isValid() )
    {
        setValue( ( time.hour() % 12 ) * 60.0 * 60.0
                  + time.minute() * 60.0 + time.second() );
    }
    else
        setValid( false );
}
Example #26
0
int Helper::TimeToSecs(QTime time)
{
    if (time.isValid())
    {
        int secs = time.hour()*60*60+time.minute()*60+time.second();
        return secs;
    }

    return NULL;
}
Example #27
0
int KDayPeriod::hourInPeriod(const QTime &time) const
{
    int hourInPeriod = -1;
    if (time.isValid() && isValid(time)) {
        hourInPeriod = time.hour() - periodStart().hour() + d->m_offsetFromStart;
        while (d->m_offsetIfZero > 0 && hourInPeriod <= 0) {
            hourInPeriod = hourInPeriod + d->m_offsetIfZero;
        }
    }
    return hourInPeriod;
}
Example #28
0
void modCalcDayLength::slotComputePosTime()
{
	long double jd0 = getDateTime().djd();
	getGeoLocation();

	KSNumbers * num = new KSNumbers(jd0);
	KSSun *Sun = new KSSun(((KStars*) parent()->parent()->parent())->data());
	Sun->findPosition(num);

	QTime setQtime = Sun->riseSetTime( jd0 , geoPlace, false );
	QTime riseQtime = Sun->riseSetTime( jd0 , geoPlace, true );
	QTime transitQtime = Sun->transitTime(jd0 , geoPlace);

	dms setAz = Sun->riseSetTimeAz(jd0, geoPlace, false);
	dms riseAz = Sun->riseSetTimeAz(jd0, geoPlace, true);
	dms transAlt = Sun->transitAltitude(jd0, geoPlace);

	if (setQtime.isValid() ) {
		azSetBox->show( setAz );
		elTransitBox->show( transAlt );
		azRiseBox->show( riseAz );

		setTimeBox->showTime( setQtime );
		riseTimeBox->showTime( riseQtime );
		transitTimeBox->showTime( transitQtime );

		QTime dayLQtime = lengthOfDay (setQtime,riseQtime);

		dayLBox->showTime( dayLQtime );
	} else if (transAlt.Degrees() > 0. ) {
		azSetBox->setDMS(i18n("Circumpolar"));
		elTransitBox->show( transAlt );
		azRiseBox->setDMS(i18n("Circumpolar"));

		setTimeBox->showTime( setQtime );
		riseTimeBox->showTime( riseQtime );
		transitTimeBox->showTime( transitQtime );

		dayLBox->setEntry("24:00:00");

	} else if (transAlt.Degrees() < 0. ) {
		azSetBox->setDMS("does not rise");
		elTransitBox->setDMS("does not rise");
		azRiseBox->setDMS("does not rise");

		setTimeBox->clearFields();
		riseTimeBox->clearFields();
		transitTimeBox->clearFields();

		dayLBox->showTime( QTime(0,0,0) );
	}

	delete num;
}
Example #29
0
DAOCollection::DAOCollection(QString path, QString sCollectionID) : mCollection(sCollectionID)
{

    QTime time = QTime::fromString("PT1M12S", "PTm'M's'S'");
    // time is 12:01.00
    qDebug()<<time.isValid();
    qDebug()<<time.minute();
    if (openCollection(path))
        qDebug()<< "Collection is opened !!";
    else
        qDebug()<< "Problem with the collection...";
}
Example #30
0
void
FirebirdParam::setTime(QTime value)
{
    clear();
    if (!value.isValid()) {
	setNull();
    } else {
	_var->sqltype = SQL_TYPE_TIME;
	_var->sqllen = sizeof(ISC_TIME);
	_procs->isc_encode_sql_time(makeTM(value), (ISC_TIME*)_buffer);
    }
}