/***************************************************************************
                            KMessageBox.m -  description
                             -------------------
    begin                : Thu Mar 21 01:01:29 2002
    copyright            : (C) 2000-2002 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Thu Mar 21 01:01:29 2002, 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 <kdec/kde_KMessageBox.h>
#include <kdeobjc/KDESupport.h>
#include <kdeobjc/KMessageBox.h>
#include <kdeobjc/KGuiItem.h>
#include <qtobjc/QWidget.h>

#include <kdeobjc/KStdGuiItem.h>

@implementation  KMessageBox

- (void *) qt
{
	return _qt;
}

- setQt: (void *) qt
{
	_qt = qt;
	return self;
}

- (BOOL) allocatedInObjcWorld
{
	return _allocatedInObjcWorld;
}

- setAllocatedInObjcWorld: (BOOL) yn
{
	_allocatedInObjcWorld = yn;
	return self;
}


+ (int) questionYesNo: (QWidget *)parent text: (NSString *)text caption: (NSString *)caption buttonYes: (KGuiItem*)buttonYes buttonNo: (KGuiItem*)buttonNo dontAskAgainName: (NSString *)dontAskAgainName options: (int)options
{
static qt_QString * _qstring_dontAskAgainName = 0L;
static qt_QString * _qstring_caption = 0L;
static qt_QString * _qstring_text = 0L;
	return (int) kde_KMessageBox_questionYesNo((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QString *) [caption toQString: &_qstring_caption], (kde_KGuiItem*) [buttonYes qt], (kde_KGuiItem*) [buttonNo qt], (qt_QString *) [dontAskAgainName toQString: &_qstring_dontAskAgainName], (int)options);
}

+ (int) questionYesNo: (QWidget *)parent text: (NSString *)text 
{
static qt_QString * _qstring_text = 0L;
	return (int) kde_KMessageBox_questionYesNo((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], qt_QString_null(), [KStdGuiItem yes], [KStdGuiItem no], qt_QString_null(), [KMessageBox Notify]);
}

+ (int) questionYesNoCancel: (QWidget *)parent text: (NSString *)text caption: (NSString *)caption buttonYes: (KGuiItem*)buttonYes buttonNo: (KGuiItem*)buttonNo dontAskAgainName: (NSString *)dontAskAgainName options: (int)options
{
static qt_QString * _qstring_dontAskAgainName = 0L;
static qt_QString * _qstring_caption = 0L;
static qt_QString * _qstring_text = 0L;
	return (int) kde_KMessageBox_questionYesNoCancel((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QString *) [caption toQString: &_qstring_caption], (kde_KGuiItem*) [buttonYes qt], (kde_KGuiItem*) [buttonNo qt], (qt_QString *) [dontAskAgainName toQString: &_qstring_dontAskAgainName], (int)options);
}

+ (int) questionYesNoCancel: (QWidget *)parent text: (NSString *)text 
{
static qt_QString * _qstring_text = 0L;
	return (int) kde_KMessageBox_questionYesNoCancel((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], qt_QString_null(), [KStdGuiItem yes], [KStdGuiItem no], qt_QString_null(), [KMessageBox Notify]);
}

+ (int) questionYesNoList: (QWidget *)parent text: (NSString *)text strlist: (NSArray *)strlist caption: (NSString *)caption buttonYes: (KGuiItem*)buttonYes buttonNo: (KGuiItem*)buttonNo dontAskAgainName: (NSString *)dontAskAgainName options: (int)options
{
static qt_QString * _qstring_dontAskAgainName = 0L;
static qt_QString * _qstring_caption = 0L;
static qt_QStringList * _qlist_strlist = 0L;
static qt_QString * _qstring_text = 0L;
	return (int) kde_KMessageBox_questionYesNoList((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QStringList*) [strlist toQStringList: (void *)&_qlist_strlist], (qt_QString *) [caption toQString: &_qstring_caption], (kde_KGuiItem*) [buttonYes qt], (kde_KGuiItem*) [buttonNo qt], (qt_QString *) [dontAskAgainName toQString: &_qstring_dontAskAgainName], (int)options);
}

+ (int) questionYesNoList: (QWidget *)parent text: (NSString *)text strlist: (NSArray *)strlist 
{
static qt_QStringList * _qlist_strlist = 0L;
static qt_QString * _qstring_text = 0L;
	return (int) kde_KMessageBox_questionYesNoList((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QStringList*) [strlist toQStringList: (void *)&_qlist_strlist], qt_QString_null(), [KStdGuiItem yes], [KStdGuiItem no], qt_QString_null(), [KMessageBox Notify]);
}

+ (int) warningYesNo: (QWidget *)parent text: (NSString *)text caption: (NSString *)caption buttonYes: (KGuiItem*)buttonYes buttonNo: (KGuiItem*)buttonNo dontAskAgainName: (NSString *)dontAskAgainName options: (int)options
{
static qt_QString * _qstring_dontAskAgainName = 0L;
static qt_QString * _qstring_caption = 0L;
static qt_QString * _qstring_text = 0L;
	return (int) kde_KMessageBox_warningYesNo((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QString *) [caption toQString: &_qstring_caption], (kde_KGuiItem*) [buttonYes qt], (kde_KGuiItem*) [buttonNo qt], (qt_QString *) [dontAskAgainName toQString: &_qstring_dontAskAgainName], (int)options);
}

+ (int) warningYesNo: (QWidget *)parent text: (NSString *)text 
{
static qt_QString * _qstring_text = 0L;
	return (int) kde_KMessageBox_warningYesNo((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], qt_QString_null(), [KStdGuiItem yes], [KStdGuiItem no], qt_QString_null(), [KMessageBox Notify]);
}

+ (int) warningContinueCancel: (QWidget *)parent text: (NSString *)text caption: (NSString *)caption buttonContinue: (KGuiItem*)buttonContinue dontAskAgainName: (NSString *)dontAskAgainName options: (int)options
{
static qt_QString * _qstring_dontAskAgainName = 0L;
static qt_QString * _qstring_caption = 0L;
static qt_QString * _qstring_text = 0L;
	return (int) kde_KMessageBox_warningContinueCancel((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QString *) [caption toQString: &_qstring_caption], (kde_KGuiItem*) [buttonContinue qt], (qt_QString *) [dontAskAgainName toQString: &_qstring_dontAskAgainName], (int)options);
}

+ (int) warningContinueCancel: (QWidget *)parent text: (NSString *)text 
{
static qt_QString * _qstring_text = 0L;
	return (int) kde_KMessageBox_warningContinueCancel((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], qt_QString_null(), [KStdGuiItem cont], qt_QString_null(), [KMessageBox Notify]);
}

+ (int) warningContinueCancelList: (QWidget *)parent text: (NSString *)text strlist: (NSArray *)strlist caption: (NSString *)caption buttonContinue: (KGuiItem*)buttonContinue dontAskAgainName: (NSString *)dontAskAgainName options: (int)options
{
static qt_QString * _qstring_dontAskAgainName = 0L;
static qt_QString * _qstring_caption = 0L;
static qt_QStringList * _qlist_strlist = 0L;
static qt_QString * _qstring_text = 0L;
	return (int) kde_KMessageBox_warningContinueCancelList((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QStringList*) [strlist toQStringList: (void *)&_qlist_strlist], (qt_QString *) [caption toQString: &_qstring_caption], (kde_KGuiItem*) [buttonContinue qt], (qt_QString *) [dontAskAgainName toQString: &_qstring_dontAskAgainName], (int)options);
}

+ (int) warningContinueCancelList: (QWidget *)parent text: (NSString *)text strlist: (NSArray *)strlist 
{
static qt_QStringList * _qlist_strlist = 0L;
static qt_QString * _qstring_text = 0L;
	return (int) kde_KMessageBox_warningContinueCancelList((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QStringList*) [strlist toQStringList: (void *)&_qlist_strlist], qt_QString_null(), qt_QString_null(), qt_QString_null(), [KMessageBox Notify]);
}

+ (int) warningYesNoCancel: (QWidget *)parent text: (NSString *)text caption: (NSString *)caption buttonYes: (KGuiItem*)buttonYes buttonNo: (KGuiItem*)buttonNo dontAskAgainName: (NSString *)dontAskAgainName options: (int)options
{
static qt_QString * _qstring_dontAskAgainName = 0L;
static qt_QString * _qstring_caption = 0L;
static qt_QString * _qstring_text = 0L;
	return (int) kde_KMessageBox_warningYesNoCancel((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QString *) [caption toQString: &_qstring_caption], (kde_KGuiItem*) [buttonYes qt], (kde_KGuiItem*) [buttonNo qt], (qt_QString *) [dontAskAgainName toQString: &_qstring_dontAskAgainName], (int)options);
}

+ (int) warningYesNoCancel: (QWidget *)parent text: (NSString *)text 
{
static qt_QString * _qstring_text = 0L;
	return (int) kde_KMessageBox_warningYesNoCancel((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], qt_QString_null(), [KStdGuiItem yes], [KStdGuiItem no], qt_QString_null(), [KMessageBox Notify]);
}

+ error: (QWidget *)parent text: (NSString *)text caption: (NSString *)caption options: (int)options
{
static qt_QString * _qstring_caption = 0L;
static qt_QString * _qstring_text = 0L;
	kde_KMessageBox_error((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QString *) [caption toQString: &_qstring_caption], (int)options);
	return self;
}

+ error: (QWidget *)parent text: (NSString *)text 
{
static qt_QString * _qstring_text = 0L;
	kde_KMessageBox_error((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], qt_QString_null(), [KMessageBox Notify]);
	return self;
}

+ detailedError: (QWidget *)parent text: (NSString *)text details: (NSString *)details caption: (NSString *)caption options: (int)options
{
static qt_QString * _qstring_caption = 0L;
static qt_QString * _qstring_details = 0L;
static qt_QString * _qstring_text = 0L;
	kde_KMessageBox_detailedError((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QString *) [details toQString: &_qstring_details], (qt_QString *) [caption toQString: &_qstring_caption], (int)options);
	return self;
}

+ detailedError: (QWidget *)parent text: (NSString *)text details: (NSString *)details 
{
static qt_QString * _qstring_details = 0L;
static qt_QString * _qstring_text = 0L;
	kde_KMessageBox_detailedError((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QString *) [details toQString: &_qstring_details], qt_QString_null(), [KMessageBox Notify]);
	return self;
}

+ queuedDetailedError: (QWidget *)parent text: (NSString *)text details: (NSString *)details caption: (NSString *)caption
{
static qt_QString * _qstring_caption = 0L;
static qt_QString * _qstring_details = 0L;
static qt_QString * _qstring_text = 0L;
	kde_KMessageBox_queuedDetailedError((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QString *) [details toQString: &_qstring_details], (qt_QString *) [caption toQString: &_qstring_caption]);
	return self;
}

+ queuedDetailedError: (QWidget *)parent text: (NSString *)text details: (NSString *)details 
{
static qt_QString * _qstring_details = 0L;
static qt_QString * _qstring_text = 0L;
	kde_KMessageBox_queuedDetailedError((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QString *) [details toQString: &_qstring_details], qt_QString_null());
	return self;
}

+ sorry: (QWidget *)parent text: (NSString *)text caption: (NSString *)caption options: (int)options
{
static qt_QString * _qstring_caption = 0L;
static qt_QString * _qstring_text = 0L;
	kde_KMessageBox_sorry((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QString *) [caption toQString: &_qstring_caption], (int)options);
	return self;
}

+ sorry: (QWidget *)parent text: (NSString *)text 
{
static qt_QString * _qstring_text = 0L;
	kde_KMessageBox_sorry((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], qt_QString_null(), [KMessageBox Notify]);
	return self;
}

+ detailedSorry: (QWidget *)parent text: (NSString *)text details: (NSString *)details caption: (NSString *)caption options: (int)options
{
static qt_QString * _qstring_caption = 0L;
static qt_QString * _qstring_details = 0L;
static qt_QString * _qstring_text = 0L;
	kde_KMessageBox_detailedSorry((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QString *) [details toQString: &_qstring_details], (qt_QString *) [caption toQString: &_qstring_caption], (int)options);
	return self;
}

+ detailedSorry: (QWidget *)parent text: (NSString *)text details: (NSString *)details 
{
static qt_QString * _qstring_details = 0L;
static qt_QString * _qstring_text = 0L;
	kde_KMessageBox_detailedSorry((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QString *) [details toQString: &_qstring_details], qt_QString_null(), [KMessageBox Notify]);
	return self;
}

+ information: (QWidget *)parent text: (NSString *)text caption: (NSString *)caption dontShowAgainName: (NSString *)dontShowAgainName options: (int)options
{
static qt_QString * _qstring_dontShowAgainName = 0L;
static qt_QString * _qstring_caption = 0L;
static qt_QString * _qstring_text = 0L;
	kde_KMessageBox_information((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QString *) [caption toQString: &_qstring_caption], (qt_QString *) [dontShowAgainName toQString: &_qstring_dontShowAgainName], (int)options);
	return self;
}

+ information: (QWidget *)parent text: (NSString *)text 
{
static qt_QString * _qstring_text = 0L;
	kde_KMessageBox_information((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], qt_QString_null(), qt_QString_null(), [KMessageBox Notify]);
	return self;
}

+ enableAllMessages
{
	kde_KMessageBox_enableAllMessages();
	return self;
}

+ about: (QWidget *)parent text: (NSString *)text caption: (NSString *)caption options: (int)options
{
static qt_QString * _qstring_caption = 0L;
static qt_QString * _qstring_text = 0L;
	kde_KMessageBox_about((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QString *) [caption toQString: &_qstring_caption], (int)options);
	return self;
}

+ about: (QWidget *)parent text: (NSString *)text 
{
static qt_QString * _qstring_text = 0L;
	kde_KMessageBox_about((qt_QWidget *) [parent qt], (qt_QString *) [text toQString: &_qstring_text], qt_QString_null(), [KMessageBox Notify]);
	return self;
}

+ (int) messageBox: (QWidget *)parent type: (int)type text: (NSString *)text caption: (NSString *)caption buttonYes: (KGuiItem*)buttonYes buttonNo: (KGuiItem*)buttonNo options: (int)options
{
static qt_QString * _qstring_caption = 0L;
static qt_QString * _qstring_text = 0L;
	return (int) kde_KMessageBox_messageBox((qt_QWidget *) [parent qt], (int)type, (qt_QString *) [text toQString: &_qstring_text], (qt_QString *) [caption toQString: &_qstring_caption], (kde_KGuiItem*) [buttonYes qt], (kde_KGuiItem*) [buttonNo qt], (int)options);
}

+ (int) messageBox: (QWidget *)parent type: (int)type text: (NSString *)text 
{
static qt_QString * _qstring_text = 0L;
	return (int) kde_KMessageBox_messageBox((qt_QWidget *) [parent qt], (int)type, (qt_QString *) [text toQString: &_qstring_text], qt_QString_null(), [KStdGuiItem yes], [KStdGuiItem no], [KMessageBox Notify]);
}

+ queuedMessageBox: (QWidget *)parent type: (int)type text: (NSString *)text caption: (NSString *)caption
{
static qt_QString * _qstring_caption = 0L;
static qt_QString * _qstring_text = 0L;
	kde_KMessageBox_queuedMessageBox((qt_QWidget *) [parent qt], (int)type, (qt_QString *) [text toQString: &_qstring_text], (qt_QString *) [caption toQString: &_qstring_caption]);
	return self;
}

+ queuedMessageBox: (QWidget *)parent type: (int)type text: (NSString *)text 
{
static qt_QString * _qstring_text = 0L;
	kde_KMessageBox_queuedMessageBox((qt_QWidget *) [parent qt], (int)type, (qt_QString *) [text toQString: &_qstring_text], qt_QString_null());
	return self;
}

+ (int) Ok
{
	return (int) KMESSAGEBOX_Ok;
}

+ (int) Cancel
{
	return (int) KMESSAGEBOX_Cancel;
}

+ (int) Yes
{
	return (int) KMESSAGEBOX_Yes;
}

+ (int) No
{
	return (int) KMESSAGEBOX_No;
}

+ (int) Continue
{
	return (int) KMESSAGEBOX_Continue;
}

+ (int) QuestionYesNo
{
	return (int) KMESSAGEBOX_QuestionYesNo;
}

+ (int) WarningYesNo
{
	return (int) KMESSAGEBOX_WarningYesNo;
}

+ (int) WarningContinueCancel
{
	return (int) KMESSAGEBOX_WarningContinueCancel;
}

+ (int) WarningYesNoCancel
{
	return (int) KMESSAGEBOX_WarningYesNoCancel;
}

+ (int) Information
{
	return (int) KMESSAGEBOX_Information;
}

+ (int) Sorry
{
	return (int) KMESSAGEBOX_Sorry;
}

+ (int) Error
{
	return (int) KMESSAGEBOX_Error;
}

+ (int) QuestionYesNoCancel
{
	return (int) KMESSAGEBOX_QuestionYesNoCancel;
}

+ (int) Notify
{
	return (int) KMESSAGEBOX_Notify;
}

+ (int) AllowLink
{
	return (int) KMESSAGEBOX_AllowLink;
}

@end
