/***************************************************************************
                            qt_QTime.cpp -  description
                             -------------------
    begin                : Tue Nov 20 20:51:20 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Tue Nov 20 20:51:20 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

extern "C" {
#include "qt_QTime.h"
}

#include <qdatetime.h>

class QTimeBridge : public QTime
{
public:
	QTimeBridge() : QTime() {}
	QTimeBridge(int h, int m, int s, int ms) : QTime(h, m, s, ms) {}
};

qt_QTime * qt_new_QTime(){
	return (qt_QTime *) new QTimeBridge();
}
qt_QTime * qt_new_QTime1(int h, int m, int s, int ms){
	return (qt_QTime *) new QTimeBridge((int)h, (int)m, (int)s, (int)ms);
}
int qt_QTime_isNull( qt_QTime* instPointer){
	return (int) ((QTimeBridge*)instPointer)->isNull();
}
int qt_QTime_isValid( qt_QTime* instPointer){
	return (int) ((QTimeBridge*)instPointer)->isValid();
}
int qt_QTime_hour( qt_QTime* instPointer){
	return (int) ((QTimeBridge*)instPointer)->hour();
}
int qt_QTime_minute( qt_QTime* instPointer){
	return (int) ((QTimeBridge*)instPointer)->minute();
}
int qt_QTime_second( qt_QTime* instPointer){
	return (int) ((QTimeBridge*)instPointer)->second();
}
int qt_QTime_msec( qt_QTime* instPointer){
	return (int) ((QTimeBridge*)instPointer)->msec();
}
qt_QString * qt_QTime_toString( qt_QTime* instPointer,int f){
	return (qt_QString *)new QString(((QTimeBridge*)instPointer)->toString((Qt::DateFormat)f));
}
qt_QString * qt_QTime_toString1( qt_QTime* instPointer,qt_QString * format){
	return (qt_QString *)new QString(((QTimeBridge*)instPointer)->toString((QString&)* (QString*)format));
}
int qt_QTime_setHMS( qt_QTime* instPointer,int h, int m, int s, int ms){
	return (int) ((QTimeBridge*)instPointer)->setHMS((int)h, (int)m, (int)s, (int)ms);
}
qt_QTime * qt_QTime_addSecs( qt_QTime* instPointer,int secs){
	QTime _t= ((QTimeBridge*)instPointer)->addSecs((int)secs);
	return (qt_QTime *)new QTime(_t.hour(),_t.minute(),_t.second(),_t.msec());
}
int qt_QTime_secsTo( qt_QTime* instPointer,qt_QTime * arg1){
	return (int) ((QTimeBridge*)instPointer)->secsTo((QTime&)* (QTime*)arg1);
}
qt_QTime * qt_QTime_addMSecs( qt_QTime* instPointer,int ms){
	QTime _t= ((QTimeBridge*)instPointer)->addMSecs((int)ms);
	return (qt_QTime *)new QTime(_t.hour(),_t.minute(),_t.second(),_t.msec());
}
int qt_QTime_msecsTo( qt_QTime* instPointer,qt_QTime * arg1){
	return (int) ((QTimeBridge*)instPointer)->msecsTo((QTime&)* (QTime*)arg1);
}
void qt_QTime_start( qt_QTime* instPointer){
	((QTimeBridge*)instPointer)->start();
	return;
}
int qt_QTime_restart( qt_QTime* instPointer){
	return (int) ((QTimeBridge*)instPointer)->restart();
}
int qt_QTime_elapsed( qt_QTime* instPointer){
	return (int) ((QTimeBridge*)instPointer)->elapsed();
}
qt_QTime * qt_QTime_currentTime( ){
	QTime _t= QTimeBridge::currentTime();
	return (qt_QTime *)new QTime(_t.hour(),_t.minute(),_t.second(),_t.msec());
}
qt_QTime * qt_QTime_fromString( qt_QString * s, int f){
	QTime _t= QTimeBridge::fromString((QString&)* (QString*)s, (Qt::DateFormat)f);
	return (qt_QTime *)new QTime(_t.hour(),_t.minute(),_t.second(),_t.msec());
}
int qt_QTime_isValid1( int h, int m, int s, int ms){
	return (int) QTimeBridge::isValid((int)h, (int)m, (int)s, (int)ms);
}
