/***************************************************************************
                            KMainWindow.m -  description
                             -------------------
    begin                : Fri Mar  8 13:55:08 2002
    copyright            : (C) 2000-2002 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Fri Mar  8 13:55:08 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_KMainWindow.h>
#include <kdec/kde_KXMLGUIBuilder.h>
#include <kdec/kde_KXMLGUIClient.h>
#include <kdeobjc/KDESupport.h>
#include <kdeobjc/KMainWindow.h>
#include <qtobjc/QSize.h>

#include <kdeobjc/KInstance.h>
#include <kdeobjc/KXMLGUIFactory.h>
#include <qtobjc/QDomDocument.h>
#include <qtobjc/QDomElement.h>

#include <kdeobjc/KConfig.h>


@implementation  KMainWindow


- initWithWidget: (QWidget *)parent name: (NSString *)name f: (int)f
{
	if ([self qt] == 0L) {
		[self setQt: kde_new_KMainWindow((qt_QWidget *) [parent qt], (char*) [name cString], (int)f)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- init
{
	if ([self qt] == 0L) {
		[self setQt: kde_new_KMainWindow(0, 0, [KMainWindow WType_TopLevel] | [KMainWindow WDestructiveClose])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- (void) dealloc
{
	if ([self qt] != 0L) {
		if ([self allocatedInObjcWorld] && [self parentWidget: YES] == nil) {
			kde_del_KMainWindow((kde_KMainWindow *)[self qt]);
		}
		[QtSupport removeQtKey: [self qt]];
		[self setQt: 0L];
	}
	[super dealloc];
}

- (KPopupMenu*) helpMenu: (NSString *)aboutAppText showWhatsThis: (BOOL)showWhatsThis
{
static qt_QString * _qstring_aboutAppText = 0L;
	return (KPopupMenu*) [QtSupport objectForQtKey: kde_KMainWindow_helpMenu((kde_KMainWindow *)[self qt], (qt_QString *) [aboutAppText toQString: &_qstring_aboutAppText], (int)showWhatsThis) withClass: [KPopupMenu class] allocatedInObjcWorld: YES];
}

- (KPopupMenu*) helpMenu
{
	return (KPopupMenu*) [QtSupport objectForQtKey: kde_KMainWindow_helpMenu((kde_KMainWindow *)[self qt], qt_QString_null(), 1) withClass: [KPopupMenu class] allocatedInObjcWorld: YES];
}

- (KPopupMenu*) customHelpMenu: (BOOL)showWhatsThis
{
	return (KPopupMenu*) [QtSupport objectForQtKey: kde_KMainWindow_customHelpMenu((kde_KMainWindow *)[self qt], (int)showWhatsThis) withClass: [KPopupMenu class] allocatedInObjcWorld: YES];
}

- (KPopupMenu*) customHelpMenu
{
	return (KPopupMenu*) [QtSupport objectForQtKey: kde_KMainWindow_customHelpMenu((kde_KMainWindow *)[self qt], 1) withClass: [KPopupMenu class] allocatedInObjcWorld: YES];
}

- (BOOL) restore: (int)number show: (BOOL)show
{
	return (BOOL) kde_KMainWindow_restore((kde_KMainWindow *)[self qt], (int)number, (int)show);
}

- (BOOL) restore: (int)number 
{
	return (BOOL) kde_KMainWindow_restore((kde_KMainWindow *)[self qt], (int)number, 1);
}

- (KXMLGUIFactory*) guiFactory
{
	return (KXMLGUIFactory*) [QtSupport objectForQtKey: kde_KMainWindow_guiFactory((kde_KMainWindow *)[self qt]) withClass: [KXMLGUIFactory class] allocatedInObjcWorld: YES];
}

- createGUI: (NSString *)xmlfile _conserveMemory: (BOOL)_conserveMemory
{
static qt_QString * _qstring_xmlfile = 0L;
	kde_KMainWindow_createGUI((kde_KMainWindow *)[self qt], (qt_QString *) [xmlfile toQString: &_qstring_xmlfile], (int)_conserveMemory);
	return self;
}

- createGUI
{
	kde_KMainWindow_createGUI((kde_KMainWindow *)[self qt], qt_QString_null(), 1);
	return self;
}

- setHelpMenuEnabled: (BOOL)showHelpMenu
{
	kde_KMainWindow_setHelpMenuEnabled((kde_KMainWindow *)[self qt], (int)showHelpMenu);
	return self;
}

- setHelpMenuEnabled
{
	kde_KMainWindow_setHelpMenuEnabled((kde_KMainWindow *)[self qt], 1);
	return self;
}

- (BOOL) isHelpMenuEnabled
{
	return (BOOL) kde_KMainWindow_isHelpMenuEnabled((kde_KMainWindow *)[self qt]);
}

- (KMenuBar*) menuBar
{
	return (KMenuBar*) [QtSupport objectForQtKey: kde_KMainWindow_menuBar((kde_KMainWindow *)[self qt]) withClass: [KMenuBar class] allocatedInObjcWorld: YES];
}

- (KStatusBar*) statusBar
{
	return (KStatusBar*) [QtSupport objectForQtKey: kde_KMainWindow_statusBar((kde_KMainWindow *)[self qt]) withClass: [KStatusBar class] allocatedInObjcWorld: YES];
}

- (KToolBar*) toolBar: (NSString *)name
{
	return (KToolBar*) [QtSupport objectForQtKey: kde_KMainWindow_toolBar((kde_KMainWindow *)[self qt], (char*) [name cString]) withClass: [KToolBar class] allocatedInObjcWorld: YES];
}

- (KToolBar*) toolBar
{
	return (KToolBar*) [QtSupport objectForQtKey: kde_KMainWindow_toolBar((kde_KMainWindow *)[self qt], 0) withClass: [KToolBar class] allocatedInObjcWorld: YES];
}

- (KAccel*) accel
{
	return (KAccel*) [QtSupport objectForQtKey: kde_KMainWindow_accel((kde_KMainWindow *)[self qt]) withClass: [KAccel class] allocatedInObjcWorld: YES];
}

- setFrameBorderWidth: (int)arg1
{
	kde_KMainWindow_setFrameBorderWidth((kde_KMainWindow *)[self qt], (int)arg1);
	return self;
}

//- setAutoSaveSettings: (QString* groupName saveWindowSize: (BOOL)saveWindowSize
//{
//	kde_KMainWindow_setAutoSaveSettings((kde_KMainWindow *)[self qt], (QString groupName ("MainWindow")) arg1, (int)saveWindowSize);
//	return self;
//}

//- setAutoSaveSettings
//{
//	kde_KMainWindow_setAutoSaveSettings((kde_KMainWindow *)[self qt], [QString fromLatin1], 1);
//	return self;
//}

- resetAutoSaveSettings
{
	kde_KMainWindow_resetAutoSaveSettings((kde_KMainWindow *)[self qt]);
	return self;
}

- applyMainWindowSettings: (KConfig*)config groupName: (NSString *)groupName
{
static qt_QString * _qstring_groupName = 0L;
	kde_KMainWindow_applyMainWindowSettings((kde_KMainWindow *)[self qt], (kde_KConfig*) [config qt], (qt_QString *) [groupName toQString: &_qstring_groupName]);
	return self;
}

- applyMainWindowSettings: (KConfig*)config 
{
	kde_KMainWindow_applyMainWindowSettings((kde_KMainWindow *)[self qt], (kde_KConfig*) [config qt], qt_QString_null());
	return self;
}

- saveMainWindowSettings: (KConfig*)config groupName: (NSString *)groupName
{
static qt_QString * _qstring_groupName = 0L;
	kde_KMainWindow_saveMainWindowSettings((kde_KMainWindow *)[self qt], (kde_KConfig*) [config qt], (qt_QString *) [groupName toQString: &_qstring_groupName]);
	return self;
}

- saveMainWindowSettings: (KConfig*)config 
{
	kde_KMainWindow_saveMainWindowSettings((kde_KMainWindow *)[self qt], (kde_KConfig*) [config qt], qt_QString_null());
	return self;
}

- finalizeGUI: (BOOL)force
{
	kde_KMainWindow_finalizeGUI((kde_KMainWindow *)[self qt], (int)force);
	return self;
}

- (BOOL) initialGeometrySet
{
	return (BOOL) kde_KMainWindow_initialGeometrySet((kde_KMainWindow *)[self qt]);
}

- (QSize*) sizeForCentralWidgetSize: (QSize *)size
{
	return (QSize*) [QtSupport objectForQtKey: kde_KMainWindow_sizeForCentralWidgetSize((kde_KMainWindow *)[self qt], (qt_QSize *) [size qt]) withClass: [QSize class] allocatedInObjcWorld: YES];
}

- setCaption: (NSString *)caption
{
static qt_QString * _qstring_caption = 0L;
	kde_KMainWindow_setCaption((kde_KMainWindow *)[self qt], (qt_QString *) [caption toQString: &_qstring_caption]);
	return self;
}

- setCaption: (NSString *)caption modified: (BOOL)modified
{
static qt_QString * _qstring_caption = 0L;
	kde_KMainWindow_setCaption1((kde_KMainWindow *)[self qt], (qt_QString *) [caption toQString: &_qstring_caption], (int)modified);
	return self;
}

- setPlainCaption: (NSString *)caption
{
static qt_QString * _qstring_caption = 0L;
	kde_KMainWindow_setPlainCaption((kde_KMainWindow *)[self qt], (qt_QString *) [caption toQString: &_qstring_caption]);
	return self;
}

- appHelpActivated
{
	kde_KMainWindow_appHelpActivated((kde_KMainWindow *)[self qt]);
	return self;
}

- slotStateChanged: (NSString *)newstate
{
static qt_QString * _qstring_newstate = 0L;
	kde_KMainWindow_slotStateChanged((kde_KMainWindow *)[self qt], (qt_QString *) [newstate toQString: &_qstring_newstate]);
	return self;
}

- setSettingsDirty
{
	kde_KMainWindow_setSettingsDirty((kde_KMainWindow *)[self qt]);
	return self;
}

+ (BOOL) canBeRestored: (int)number
{
	return (BOOL) kde_KMainWindow_canBeRestored((int)number);
}

+ (NSString *) classNameOfToplevel: (int)number
{
static qt_QString * _qstring = 0L;
	_qstring = kde_KMainWindow_classNameOfToplevel((int)number);
	return [NSString fromQString: _qstring];
}

- (BOOL) queryExit
{
	return (BOOL) kde_KMainWindow_queryExit((kde_KMainWindow *)[self qt]);
}

- (BOOL) queryClose
{
	return (BOOL) kde_KMainWindow_queryClose((kde_KMainWindow *)[self qt]);
}

- saveProperties: (KConfig*)arg1
{
	kde_KMainWindow_saveProperties((kde_KMainWindow *)[self qt], (kde_KConfig*) [arg1 qt]);
	return self;
}

- readProperties: (KConfig*)arg1
{
	kde_KMainWindow_readProperties((kde_KMainWindow *)[self qt], (kde_KConfig*) [arg1 qt]);
	return self;
}

- saveGlobalProperties: (KConfig*)sessionConfig
{
	kde_KMainWindow_saveGlobalProperties((kde_KMainWindow *)[self qt], (kde_KConfig*) [sessionConfig qt]);
	return self;
}

- readGlobalProperties: (KConfig*)sessionConfig
{
	kde_KMainWindow_readGlobalProperties((kde_KMainWindow *)[self qt], (kde_KConfig*) [sessionConfig qt]);
	return self;
}

- savePropertiesInternal: (KConfig*)arg1 int: (int)arg2
{
	kde_KMainWindow_savePropertiesInternal((kde_KMainWindow *)[self qt], (kde_KConfig*) [arg1 qt], (int)arg2);
	return self;
}

- (BOOL) readPropertiesInternal: (KConfig*)arg1 int: (int)arg2
{
	return (BOOL) kde_KMainWindow_readPropertiesInternal((kde_KMainWindow *)[self qt], (kde_KConfig*) [arg1 qt], (int)arg2);
}

- (BOOL) settingsDirty
{
	return (BOOL) kde_KMainWindow_settingsDirty((kde_KMainWindow *)[self qt]);
}

- (NSString *) settingsGroup
{
static qt_QString * _qstring = 0L;
	_qstring = kde_KMainWindow_settingsGroup((kde_KMainWindow *)[self qt]);
	return [NSString fromQString: _qstring];
}

- saveWindowSize: (KConfig*)config
{
	kde_KMainWindow_saveWindowSize((kde_KMainWindow *)[self qt], (kde_KConfig*) [config qt]);
	return self;
}

- restoreWindowSize: (KConfig*)config
{
	kde_KMainWindow_restoreWindowSize((kde_KMainWindow *)[self qt], (kde_KConfig*) [config qt]);
	return self;
}

- parseGeometry: (BOOL)parsewidth
{
	kde_KMainWindow_parseGeometry((kde_KMainWindow *)[self qt], (int)parsewidth);
	return self;
}

- showAboutApplication
{
	kde_KMainWindow_showAboutApplication((kde_KMainWindow *)[self qt]);
	return self;
}

@end

@implementation KMainWindow (KXMLGUIBuilderImplementation)

- (KXMLGUIClient*) builderClient
{
	return (KXMLGUIClient*) [QtSupport objectForQtKey: kde_KXMLGUIBuilder_builderClient(kde_KMainWindow_KXMLGUIBuilder([self qt])) withClass: [KXMLGUIClient class] allocatedInObjcWorld: YES];
}

- setBuilderClient: (KXMLGUIClient*)client
{
	kde_KXMLGUIBuilder_setBuilderClient(kde_KMainWindow_KXMLGUIBuilder([self qt]), (kde_KXMLGUIClient*) [client qt]);
	return self;
}

- (KInstance*) builderInstance
{
	return (KInstance*) [QtSupport objectForQtKey: kde_KXMLGUIBuilder_builderInstance(kde_KMainWindow_KXMLGUIBuilder([self qt])) withClass: [KInstance class] allocatedInObjcWorld: YES];
}

- setBuilderInstance: (KInstance*)instance
{
	kde_KXMLGUIBuilder_setBuilderInstance(kde_KMainWindow_KXMLGUIBuilder([self qt]), (kde_KInstance*) [instance qt]);
	return self;
}

- (NSArray *) containerTags
{
static qt_QStringList * _qlist = 0L;
	_qlist = kde_KXMLGUIBuilder_containerTags(kde_KMainWindow_KXMLGUIBuilder([self qt]));
	return (NSArray *) [NSMutableArray arrayWithQStringList: _qlist];
}

- (QWidget*) createContainer: (QWidget *)parent index: (int)index element: (QDomElement*)element identifier: (int)identifier
{
	return (QWidget*) [QtSupport objectForQtKey: kde_KXMLGUIBuilder_createContainer(kde_KMainWindow_KXMLGUIBuilder([self qt]), (qt_QWidget *) [parent qt], (int)index, (qt_QDomElement*) [element qt], (int)identifier) withClass: [QWidget class] allocatedInObjcWorld: YES];
}

- removeContainer: (QWidget *)container parent: (QWidget *)parent element: (QDomElement*)element identifier: (int)identifier
{
	kde_KXMLGUIBuilder_removeContainer(kde_KMainWindow_KXMLGUIBuilder([self qt]), (qt_QWidget *) [container qt], (qt_QWidget *) [parent qt], (qt_QDomElement*) [element qt], (int)identifier);
	return self;
}

- (NSArray *) customTags
{
static qt_QStringList * _qlist = 0L;
	_qlist = kde_KXMLGUIBuilder_customTags(kde_KMainWindow_KXMLGUIBuilder([self qt]));
	return (NSArray *) [NSMutableArray arrayWithQStringList: _qlist];
}

- (int) createCustomElement: (QWidget *)parent index: (int)index element: (QDomElement*)element
{
	return (int) kde_KXMLGUIBuilder_createCustomElement(kde_KMainWindow_KXMLGUIBuilder([self qt]), (qt_QWidget *) [parent qt], (int)index, (qt_QDomElement*) [element qt]);
}

- removeCustomElement: (QWidget *)parent identifier: (int)identifier
{
	kde_KXMLGUIBuilder_removeCustomElement(kde_KMainWindow_KXMLGUIBuilder([self qt]), (qt_QWidget *) [parent qt], (int)identifier);
	return self;
}

- finalizeXMLGUI: (KXMLGUIClient*)client
{
	kde_KXMLGUIBuilder_finalizeGUI(kde_KMainWindow_KXMLGUIBuilder([self qt]), (kde_KXMLGUIClient*) [client qt]);
	return self;
}

@end

@implementation KMainWindow (KXMLGUIClientImplementation)
- (KAction*) action: (NSString *)name
{
	return (KAction*) [QtSupport objectForQtKey: kde_KXMLGUIClient_action(kde_KMainWindow_KXMLGUIClient([self qt]), (char*) [name cString]) withClass: [KAction class] allocatedInObjcWorld: YES];
}

- (KAction*) actionForDomElement: (QDomElement*)element
{
	return (KAction*) [QtSupport objectForQtKey: kde_KXMLGUIClient_action1(kde_KMainWindow_KXMLGUIClient([self qt]), (qt_QDomElement*) [element qt]) withClass: [KAction class] allocatedInObjcWorld: YES];
}

- (KActionCollection*) actionCollection
{
	return (KActionCollection*) [QtSupport objectForQtKey: kde_KXMLGUIClient_actionCollection(kde_KMainWindow_KXMLGUIClient([self qt])) withClass: [KActionCollection class] allocatedInObjcWorld: YES];
}

- (KInstance*) instance
{
	return (KInstance*) [QtSupport objectForQtKey: kde_KXMLGUIClient_instance(kde_KMainWindow_KXMLGUIClient([self qt])) withClass: [KInstance class] allocatedInObjcWorld: YES];
}

- (QDomDocument*) domDocument
{
	return (QDomDocument*) [QtSupport objectForQtKey: kde_KXMLGUIClient_domDocument(kde_KMainWindow_KXMLGUIClient([self qt])) withClass: [QDomDocument class] allocatedInObjcWorld: YES];
}

- (NSString *) xmlFile
{
static qt_QString * _qstring = 0L;
	_qstring = kde_KXMLGUIClient_xmlFile(kde_KMainWindow_KXMLGUIClient([self qt]));
	return [NSString fromQString: _qstring];
}

- (NSString *) localXMLFile
{
static qt_QString * _qstring = 0L;
	_qstring = kde_KXMLGUIClient_localXMLFile(kde_KMainWindow_KXMLGUIClient([self qt]));
	return [NSString fromQString: _qstring];
}

- setXMLGUIBuildDocument: (QDomDocument*)doc
{
	kde_KXMLGUIClient_setXMLGUIBuildDocument(kde_KMainWindow_KXMLGUIClient([self qt]), (qt_QDomDocument*) [doc qt]);
	return self;
}

- (QDomDocument*) xmlguiBuildDocument
{
	return (QDomDocument*) [QtSupport objectForQtKey: kde_KXMLGUIClient_xmlguiBuildDocument(kde_KMainWindow_KXMLGUIClient([self qt])) withClass: [QDomDocument class] allocatedInObjcWorld: YES];
}

- setFactory: (KXMLGUIFactory*)factory
{
	kde_KXMLGUIClient_setFactory(kde_KMainWindow_KXMLGUIClient([self qt]), (kde_KXMLGUIFactory*) [factory qt]);
	return self;
}

- (KXMLGUIFactory*) factory
{
	return (KXMLGUIFactory*) [QtSupport objectForQtKey: kde_KXMLGUIClient_factory(kde_KMainWindow_KXMLGUIClient([self qt])) withClass: [KXMLGUIFactory class] allocatedInObjcWorld: YES];
}

- (KXMLGUIClient*) parentClient
{
	return (KXMLGUIClient*) [QtSupport objectForQtKey: kde_KXMLGUIClient_parentClient(kde_KMainWindow_KXMLGUIClient([self qt])) withClass: [KXMLGUIClient class] allocatedInObjcWorld: YES];
}

- insertChildClient: (KXMLGUIClient*)child
{
	kde_KXMLGUIClient_insertChildClient(kde_KMainWindow_KXMLGUIClient([self qt]), (kde_KXMLGUIClient*) [child qt]);
	return self;
}

- removeChildClient: (KXMLGUIClient*)child
{
	kde_KXMLGUIClient_removeChildClient(kde_KMainWindow_KXMLGUIClient([self qt]), (kde_KXMLGUIClient*) [child qt]);
	return self;
}

- setClientBuilder: (KXMLGUIBuilder*)builder
{
	kde_KXMLGUIClient_setClientBuilder(kde_KMainWindow_KXMLGUIClient([self qt]), (kde_KXMLGUIBuilder*) [builder qt]);
	return self;
}

- (KXMLGUIBuilder*) clientBuilder
{
	return (KXMLGUIBuilder*) [QtSupport objectForQtKey: kde_KXMLGUIClient_clientBuilder(kde_KMainWindow_KXMLGUIClient([self qt])) withClass: [KXMLGUIBuilder class] allocatedInObjcWorld: YES];
}

- reloadXML
{
	kde_KXMLGUIClient_reloadXML(kde_KMainWindow_KXMLGUIClient([self qt]));
	return self;
}

- unplugActionList: (NSString *)name
{
static qt_QString * _qstring_name = 0L;
	kde_KXMLGUIClient_unplugActionList(kde_KMainWindow_KXMLGUIClient([self qt]), (qt_QString *) [name toQString: &_qstring_name]);
	return self;
}

- addStateActionEnabled: (NSString *)state action: (NSString *)action
{
static qt_QString * _qstring_action = 0L;
static qt_QString * _qstring_state = 0L;
	kde_KXMLGUIClient_addStateActionEnabled(kde_KMainWindow_KXMLGUIClient([self qt]), (qt_QString *) [state toQString: &_qstring_state], (qt_QString *) [action toQString: &_qstring_action]);
	return self;
}

- addStateActionDisabled: (NSString *)state action: (NSString *)action
{
static qt_QString * _qstring_action = 0L;
static qt_QString * _qstring_state = 0L;
	kde_KXMLGUIClient_addStateActionDisabled(kde_KMainWindow_KXMLGUIClient([self qt]), (qt_QString *) [state toQString: &_qstring_state], (qt_QString *) [action toQString: &_qstring_action]);
	return self;
}

//- (StateChange) getActionsToChangeForState: (NSString *)state
//{
//static qt_QString * _qstring_state = 0L;
//	return (StateChange) kde_KXMLGUIClient_getActionsToChangeForState(kde_KMainWindow_KXMLGUIClient([self qt]), (qt_QString *) [state toQString: &_qstring_state]);
//}

+ (NSString *) findMostRecentXMLFile: (NSArray *)files doc: (NSString *)doc
{
static qt_QString * _qstring = 0L;
static qt_QString * _qstring_doc = 0L;
static qt_QStringList * _qlist_files = 0L;
	_qstring = kde_KXMLGUIClient_findMostRecentXMLFile((qt_QStringList*) [files toQStringList: (void *)&_qlist_files], (qt_QString *) [doc toQString: &_qstring_doc]);
	return [NSString fromQString: _qstring];
}

- setInstance: (KInstance*)instance
{
	kde_KXMLGUIClient_setInstance(kde_KMainWindow_KXMLGUIClient([self qt]), (kde_KInstance*) [instance qt]);
	return self;
}

- setXMLFile: (NSString *)file merge: (BOOL)merge setXMLDoc: (BOOL)setXMLDoc
{
static qt_QString * _qstring_file = 0L;
	kde_KXMLGUIClient_setXMLFile(kde_KMainWindow_KXMLGUIClient([self qt]), (qt_QString *) [file toQString: &_qstring_file], (int)merge, (int)setXMLDoc);
	return self;
}

- setXMLFile: (NSString *)file
{
static qt_QString * _qstring_file = 0L;
	kde_KXMLGUIClient_setXMLFile(kde_KMainWindow_KXMLGUIClient([self qt]), (qt_QString *) [file toQString: &_qstring_file], 0, 1);
	return self;
}

- setLocalXMLFile: (NSString *)file
{
static qt_QString * _qstring_file = 0L;
	kde_KXMLGUIClient_setLocalXMLFile(kde_KMainWindow_KXMLGUIClient([self qt]), (qt_QString *) [file toQString: &_qstring_file]);
	return self;
}

- setXML: (NSString *)document merge: (BOOL)merge
{
static qt_QString * _qstring_document = 0L;
	kde_KXMLGUIClient_setXML(kde_KMainWindow_KXMLGUIClient([self qt]), (qt_QString *) [document toQString: &_qstring_document], (int)merge);
	return self;
}

- setXML: (NSString *)document
{
static qt_QString * _qstring_document = 0L;
	kde_KXMLGUIClient_setXML(kde_KMainWindow_KXMLGUIClient([self qt]), (qt_QString *) [document toQString: &_qstring_document], 0);
	return self;
}

- setDOMDocument: (QDomDocument*)document merge: (BOOL)merge
{
	kde_KXMLGUIClient_setDOMDocument(kde_KMainWindow_KXMLGUIClient([self qt]), (qt_QDomDocument*) [document qt], (int)merge);
	return self;
}

- setDOMDocument: (QDomDocument*)document
{
	kde_KXMLGUIClient_setDOMDocument(kde_KMainWindow_KXMLGUIClient([self qt]), (qt_QDomDocument*) [document qt], 0);
	return self;
}

- conserveMemory
{
	kde_KXMLGUIClient_conserveMemory(kde_KMainWindow_KXMLGUIClient([self qt]));
	return self;
}

- stateChanged: (NSString *)newstate
{
static qt_QString * _qstring_newstate = 0L;
	kde_KXMLGUIClient_stateChanged(kde_KMainWindow_KXMLGUIClient([self qt]), (qt_QString *) [newstate toQString: &_qstring_newstate]);
	return self;
}

@end
