/***************************************************************************
                            QInputDialog.cpp -  description
                             -------------------
    begin                : Wed Nov 21 17:05:56 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 17:05:56 2001, using kalyptus 0.9.
 ***************************************************************************/

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

#define _BOOL_H_
#include <qinputdialog.h>
#include <qstring.h>
#include <qcstring.h>

#include <qtjava/QtSupport.h>
#include <qtjava/QInputDialog.h>

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QInputDialog_getText(JNIEnv *env, jclass obj, jstring caption, jstring label, jint echo, jstring text, jintArray ok, jobject parent, jstring name)
{
	QString  _qstring;
static QCString * _qstring_name = 0;
static QString * _qstring_text = 0;
static QString * _qstring_label = 0;
static QString * _qstring_caption = 0;
	_qstring = QInputDialog::getText((QString&) * (QString *) QtSupport::toQString(env, caption, &_qstring_caption), (QString&) * (QString *) QtSupport::toQString(env, label, &_qstring_label), (QLineEdit::EchoMode) echo, (QString&) * (QString *) QtSupport::toQString(env, text, &_qstring_text),  (bool*) QtSupport::toIntPtr(env, ok), (QWidget*) QtSupport::getQt(env, parent), (char*) QtSupport::toCharString(env, name, &_qstring_name));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QInputDialog_getInteger__Ljava_lang_String_2Ljava_lang_String_2IIII_3ILorg_kde_qt_QWidget_2Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring caption, jstring label, jint num, jint from, jint to, jint step, jintArray ok, jobject parent, jstring name)
{
static QCString * _qstring_name = 0;
static QString * _qstring_label = 0;
static QString * _qstring_caption = 0;
	return (jint) QInputDialog::getInteger((QString&) * (QString *) QtSupport::toQString(env, caption, &_qstring_caption), (QString&) * (QString *) QtSupport::toQString(env, label, &_qstring_label), (int) num, (int) from, (int) to, (int) step,  (bool*) QtSupport::toIntPtr(env, ok), (QWidget*) QtSupport::getQt(env, parent), (char*) QtSupport::toCharString(env, name, &_qstring_name));
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QInputDialog_getInteger__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring caption, jstring label)
{
static QString * _qstring_label = 0;
static QString * _qstring_caption = 0;
	return (jint) QInputDialog::getInteger((QString&) * (QString *) QtSupport::toQString(env, caption, &_qstring_caption), (QString&) * (QString *) QtSupport::toQString(env, label, &_qstring_label), 0, -2147483647, 2147483647, 1, 0, 0, 0);
}

JNIEXPORT jdouble JNICALL
Java_org_kde_qt_QInputDialog_getDouble__Ljava_lang_String_2Ljava_lang_String_2DDDI_3ILorg_kde_qt_QWidget_2Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring caption, jstring label, jdouble num, jdouble from, jdouble to, jint decimals, jintArray ok, jobject parent, jstring name)
{
static QCString * _qstring_name = 0;
static QString * _qstring_label = 0;
static QString * _qstring_caption = 0;
	return (jdouble) QInputDialog::getDouble((QString&) * (QString *) QtSupport::toQString(env, caption, &_qstring_caption), (QString&) * (QString *) QtSupport::toQString(env, label, &_qstring_label), (double) num, (double) from, (double) to, (int) decimals,  (bool*) QtSupport::toIntPtr(env, ok), (QWidget*) QtSupport::getQt(env, parent), (char*) QtSupport::toCharString(env, name, &_qstring_name));
}

JNIEXPORT jdouble JNICALL
Java_org_kde_qt_QInputDialog_getDouble__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring caption, jstring label)
{
static QString * _qstring_label = 0;
static QString * _qstring_caption = 0;
	return (jdouble) QInputDialog::getDouble((QString&) * (QString *) QtSupport::toQString(env, caption, &_qstring_caption), (QString&) * (QString *) QtSupport::toQString(env, label, &_qstring_label), 0, -2147483647, 2147483647, 1, 0, 0, 0);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QInputDialog_getItem(JNIEnv *env, jclass obj, jstring caption, jstring label, jobjectArray list, jint current, jboolean editable, jintArray ok, jobject parent, jstring name)
{
	QString  _qstring;
static QCString * _qstring_name = 0;
static QStringList * _qlist_list = 0;
static QString * _qstring_label = 0;
static QString * _qstring_caption = 0;
	_qstring = QInputDialog::getItem((QString&) * (QString *) QtSupport::toQString(env, caption, &_qstring_caption), (QString&) * (QString *) QtSupport::toQString(env, label, &_qstring_label), (QStringList&) * (QStringList *) QtSupport::toQStringList(env, list, &_qlist_list), (int) current, (bool) editable,  (bool*) QtSupport::toIntPtr(env, ok), (QWidget*) QtSupport::getQt(env, parent), (char*) QtSupport::toCharString(env, name, &_qstring_name));
	return QtSupport::fromQString(env, &_qstring);
}

