/***************************************************************************
                            QInputDialog.m -  description
                             -------------------
    begin                : Wed Nov 21 12:08:37 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 12:08:37 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.                       *
 *                                                                         *
 ***************************************************************************/

#include <qtc/qt_QString.h>
#include <qtc/qt_QCString.h>
#include <qtc/qt_QInputDialog.h>
#include <qtc/qt_QStringList.h>
#include <qtobjc/QInputDialog.h>

@implementation  QInputDialog


+ (NSString *) getText: (NSString *)caption label: (NSString *)label echo: (int)echo text: (NSString *)text ok: (int*)ok parent: (QWidget *)parent name: (NSString *)name
{
static qt_QString * _qstring = 0L;
static qt_QString * _qstring_text = 0L;
static qt_QString * _qstring_label = 0L;
static qt_QString * _qstring_caption = 0L;
	_qstring = qt_QInputDialog_getText((qt_QString *) [caption toQString: &_qstring_caption], (qt_QString *) [label toQString: &_qstring_label], (int)echo, (qt_QString *) [text toQString: &_qstring_text], (int*)ok, (qt_QWidget *) [parent qt], (char*) [name cString]);
	return [NSString fromQString: _qstring];
}

+ (int) getInteger: (NSString *)caption label: (NSString *)label num: (int)num from: (int)from to: (int)to step: (int)step ok: (int*)ok parent: (QWidget *)parent name: (NSString *)name
{
static qt_QString * _qstring_label = 0L;
static qt_QString * _qstring_caption = 0L;
	return (int) qt_QInputDialog_getInteger((qt_QString *) [caption toQString: &_qstring_caption], (qt_QString *) [label toQString: &_qstring_label], (int)num, (int)from, (int)to, (int)step, (int*)ok, (qt_QWidget *) [parent qt], (char*) [name cString]);
}

+ (int) getInteger: (NSString *)caption label: (NSString *)label 
{
static qt_QString * _qstring_label = 0L;
static qt_QString * _qstring_caption = 0L;
	return (int) qt_QInputDialog_getInteger((qt_QString *) [caption toQString: &_qstring_caption], (qt_QString *) [label toQString: &_qstring_label], 0, -2147483647, 2147483647, 1, 0, 0, 0);
}

+ (double) getDouble: (NSString *)caption label: (NSString *)label num: (double)num from: (double)from to: (double)to decimals: (int)decimals ok: (int*)ok parent: (QWidget *)parent name: (NSString *)name
{
static qt_QString * _qstring_label = 0L;
static qt_QString * _qstring_caption = 0L;
	return (double) qt_QInputDialog_getDouble((qt_QString *) [caption toQString: &_qstring_caption], (qt_QString *) [label toQString: &_qstring_label], (double)num, (double)from, (double)to, (int)decimals, (int*)ok, (qt_QWidget *) [parent qt], (char*) [name cString]);
}

+ (double) getDouble: (NSString *)caption label: (NSString *)label 
{
static qt_QString * _qstring_label = 0L;
static qt_QString * _qstring_caption = 0L;
	return (double) qt_QInputDialog_getDouble((qt_QString *) [caption toQString: &_qstring_caption], (qt_QString *) [label toQString: &_qstring_label], 0, -2147483647, 2147483647, 1, 0, 0, 0);
}

+ (NSString *) getItem: (NSString *)caption label: (NSString *)label list: (NSArray *)list current: (int)current editable: (BOOL)editable ok: (int*)ok parent: (QWidget *)parent name: (NSString *)name
{
static qt_QString * _qstring = 0L;
static qt_QStringList * _qlist_list = 0L;
static qt_QString * _qstring_label = 0L;
static qt_QString * _qstring_caption = 0L;
	_qstring = qt_QInputDialog_getItem((qt_QString *) [caption toQString: &_qstring_caption], (qt_QString *) [label toQString: &_qstring_label], (qt_QStringList*) [list toQStringList: (void *)&_qlist_list], (int)current, (int)editable, (int*)ok, (qt_QWidget *) [parent qt], (char*) [name cString]);
	return [NSString fromQString: _qstring];
}

@end
