/***************************************************************************
                            KToolBar.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_KToolBar.h>
#include <kdeobjc/KDESupport.h>
#include <kdeobjc/KToolBar.h>
#include <kdeobjc/KConfig.h>
#include <kdeobjc/KInstance.h>
#include <kdeobjc/KXMLGUIClient.h>
#include <qtobjc/QDomElement.h>
#include <qtobjc/QIconSet.h>
#include <qtobjc/QMainWindow.h>
#include <qtobjc/QPixmap.h>
#include <qtobjc/QPopupMenu.h>

#include <kdeobjc/KGlobal.h>
#include <qtobjc/QComboBox.h>

@implementation  KToolBar


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

- initWithWidget: (QWidget *)parent 
{
	if ([self qt] == 0L) {
		[self setQt: kde_new_KToolBar((qt_QWidget *) [parent qt], 0, 0, 1)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithMainWindow: (QMainWindow*)parentWindow dock: (int)dock newLine: (BOOL)newLine name: (NSString *)name honor_style: (BOOL)honor_style readConfig: (BOOL)readConfig
{
	if ([self qt] == 0L) {
		[self setQt: kde_new_KToolBar1((qt_QMainWindow*) [parentWindow qt], (int)dock, (int)newLine, (char*) [name cString], (int)honor_style, (int)readConfig)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithMainWindow: (QMainWindow*)parentWindow dock: (int)dock 
{
	if ([self qt] == 0L) {
		[self setQt: kde_new_KToolBar1((qt_QMainWindow*) [parentWindow qt], (int)dock, 0, 0, 0, 1)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithMainWindow: (QMainWindow*)parentWindow dockWidget: (QWidget *)dock newLine: (BOOL)newLine name: (NSString *)name honor_style: (BOOL)honor_style readConfig: (BOOL)readConfig
{
	if ([self qt] == 0L) {
		[self setQt: kde_new_KToolBar2((qt_QMainWindow*) [parentWindow qt], (qt_QWidget *) [dock qt], (int)newLine, (char*) [name cString], (int)honor_style, (int)readConfig)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithMainWindow: (QMainWindow*)parentWindow dockWidget: (QWidget *)dock
{
	if ([self qt] == 0L) {
		[self setQt: kde_new_KToolBar2((qt_QMainWindow*) [parentWindow qt], (qt_QWidget *) [dock qt], 0, 0, 0, 1)];
		[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_KToolBar((kde_KToolBar *)[self qt]);
		}
		[QtSupport removeQtKey: [self qt]];
		[self setQt: 0L];
	}
	[super dealloc];
}

- (int) insertButton: (NSString *)icon identifier: (int)identifier enabled: (BOOL)enabled text: (NSString *)text index: (int)index _instance: (KInstance*)_instance
{
static qt_QString * _qstring_text = 0L;
static qt_QString * _qstring_icon = 0L;
	return (int) kde_KToolBar_insertButton((kde_KToolBar *)[self qt], (qt_QString *) [icon toQString: &_qstring_icon], (int)identifier, (int)enabled, (qt_QString *) [text toQString: &_qstring_text], (int)index, (kde_KInstance*) [_instance qt]);
}

- (int) insertButton: (NSString *)icon identifier: (int)identifier 
{
static qt_QString * _qstring_icon = 0L;
	return (int) kde_KToolBar_insertButton((kde_KToolBar *)[self qt], (qt_QString *) [icon toQString: &_qstring_icon], (int)identifier, 1, qt_QString_null(), -1, [KGlobal instance]);
}

- (int) insertButton: (NSString *)icon identifier: (int)identifier signal: (NSString *)signal receiver: (QObject *)receiver slot: (NSString *)slot enabled: (BOOL)enabled text: (NSString *)text index: (int)index _instance: (KInstance*)_instance
{
static qt_QString * _qstring_text = 0L;
static qt_QString * _qstring_icon = 0L;
	return (int) kde_KToolBar_insertButton1((kde_KToolBar *)[self qt], (qt_QString *) [icon toQString: &_qstring_icon], (int)identifier, (char*) [signal cString], (qt_QObject *) [receiver qt], (char*) [slot cString], (int)enabled, (qt_QString *) [text toQString: &_qstring_text], (int)index, (kde_KInstance*) [_instance qt]);
}

- (int) insertButton: (NSString *)icon identifier: (int)identifier signal: (NSString *)signal receiver: (QObject *)receiver slot: (NSString *)slot 
{
static qt_QString * _qstring_icon = 0L;
	return (int) kde_KToolBar_insertButton1((kde_KToolBar *)[self qt], (qt_QString *) [icon toQString: &_qstring_icon], (int)identifier, (char*) [signal cString], (qt_QObject *) [receiver qt], (char*) [slot cString], 1, qt_QString_null(), -1, [KGlobal instance]);
}

- (int) insertButtonWithPixmap: (QPixmap *)pixmap identifier: (int)identifier enabled: (BOOL)enabled text: (NSString *)text index: (int)index
{
static qt_QString * _qstring_text = 0L;
	return (int) kde_KToolBar_insertButton2((kde_KToolBar *)[self qt], (qt_QPixmap *) [pixmap qt], (int)identifier, (int)enabled, (qt_QString *) [text toQString: &_qstring_text], (int)index);
}

- (int) insertButtonWithPixmap: (QPixmap *)pixmap identifier: (int)identifier
{
	return (int) kde_KToolBar_insertButton2((kde_KToolBar *)[self qt], (qt_QPixmap *) [pixmap qt], (int)identifier, 1, qt_QString_null(), -1);
}

- (int) insertButtonWithPixmap: (QPixmap *)pixmap identifier: (int)identifier signal: (NSString *)signal receiver: (QObject *)receiver slot: (NSString *)slot enabled: (BOOL)enabled text: (NSString *)text index: (int)index
{
static qt_QString * _qstring_text = 0L;
	return (int) kde_KToolBar_insertButton3((kde_KToolBar *)[self qt], (qt_QPixmap *) [pixmap qt], (int)identifier, (char*) [signal cString], (qt_QObject *) [receiver qt], (char*) [slot cString], (int)enabled, (qt_QString *) [text toQString: &_qstring_text], (int)index);
}

- (int) insertButtonWithPixmap: (QPixmap *)pixmap identifier: (int)identifier signal: (NSString *)signal receiver: (QObject *)receiver slot: (NSString *)slot
{
	return (int) kde_KToolBar_insertButton3((kde_KToolBar *)[self qt], (qt_QPixmap *) [pixmap qt], (int)identifier, (char*) [signal cString], (qt_QObject *) [receiver qt], (char*) [slot cString], 1, qt_QString_null(), -1);
}

- (int) insertButtonWithPixmap: (QPixmap *)pixmap identifier: (int)identifier popup: (QPopupMenu*)popup enabled: (BOOL)enabled text: (NSString *)_text index: (int)index
{
static qt_QString * _qstring__text = 0L;
	return (int) kde_KToolBar_insertButton4((kde_KToolBar *)[self qt], (qt_QPixmap *) [pixmap qt], (int)identifier, (qt_QPopupMenu*) [popup qt], (int)enabled, (qt_QString *) [_text toQString: &_qstring__text], (int)index);
}

- (int) insertButtonWithPixmap: (QPixmap *)pixmap identifier: (int)identifier popup: (QPopupMenu*)popup enabled: (BOOL)enabled text: (NSString *)_text
{
static qt_QString * _qstring__text = 0L;
	return (int) kde_KToolBar_insertButton4((kde_KToolBar *)[self qt], (qt_QPixmap *) [pixmap qt], (int)identifier, (qt_QPopupMenu*) [popup qt], (int)enabled, (qt_QString *) [_text toQString: &_qstring__text], -1);
}

- (int) insertLined: (NSString *)text identifier: (int)identifier signal: (NSString *)signal receiver: (QObject *)receiver slot: (NSString *)slot enabled: (BOOL)enabled toolTipText: (NSString *)toolTipText size: (int)size index: (int)index
{
static qt_QString * _qstring_toolTipText = 0L;
static qt_QString * _qstring_text = 0L;
	return (int) kde_KToolBar_insertLined((kde_KToolBar *)[self qt], (qt_QString *) [text toQString: &_qstring_text], (int)identifier, (char*) [signal cString], (qt_QObject *) [receiver qt], (char*) [slot cString], (int)enabled, (qt_QString *) [toolTipText toQString: &_qstring_toolTipText], (int)size, (int)index);
}

- (int) insertLined: (NSString *)text identifier: (int)identifier signal: (NSString *)signal receiver: (QObject *)receiver slot: (NSString *)slot 
{
static qt_QString * _qstring_text = 0L;
	return (int) kde_KToolBar_insertLined((kde_KToolBar *)[self qt], (qt_QString *) [text toQString: &_qstring_text], (int)identifier, (char*) [signal cString], (qt_QObject *) [receiver qt], (char*) [slot cString], 1, qt_QString_null(), 70, -1);
}

- (int) insertCombo: (NSArray *)list identifier: (int)identifier writable: (BOOL)writable signal: (NSString *)signal receiver: (QObject *)receiver slot: (NSString *)slot enabled: (BOOL)enabled tooltiptext: (NSString *)tooltiptext size: (int)size index: (int)index policy: (int)policy
{
static qt_QString * _qstring_tooltiptext = 0L;
static qt_QStringList * _qlist_list = 0L;
	return (int) kde_KToolBar_insertCombo((kde_KToolBar *)[self qt], (qt_QStringList*) [list toQStringList: (void *)&_qlist_list], (int)identifier, (int)writable, (char*) [signal cString], (qt_QObject *) [receiver qt], (char*) [slot cString], (int)enabled, (qt_QString *) [tooltiptext toQString: &_qstring_tooltiptext], (int)size, (int)index, (int)policy);
}

- (int) insertCombo: (NSArray *)list identifier: (int)identifier writable: (BOOL)writable signal: (NSString *)signal receiver: (QObject *)receiver slot: (NSString *)slot 
{
static qt_QStringList * _qlist_list = 0L;
	return (int) kde_KToolBar_insertCombo((kde_KToolBar *)[self qt], (qt_QStringList*) [list toQStringList: (void *)&_qlist_list], (int)identifier, (int)writable, (char*) [signal cString], (qt_QObject *) [receiver qt], (char*) [slot cString], 1, qt_QString_null(), 70, -1, [QComboBox AtBottom]);
}

- (int) insertCombo: (NSString *)text identifier: (int)identifier writable: (BOOL)writable signal: (NSString *)signal recevier: (QObject *)recevier slot: (NSString *)slot enabled: (BOOL)enabled tooltiptext: (NSString *)tooltiptext size: (int)size index: (int)index policy: (int)policy
{
static qt_QString * _qstring_tooltiptext = 0L;
static qt_QString * _qstring_text = 0L;
	return (int) kde_KToolBar_insertCombo1((kde_KToolBar *)[self qt], (qt_QString *) [text toQString: &_qstring_text], (int)identifier, (int)writable, (char*) [signal cString], (qt_QObject *) [recevier qt], (char*) [slot cString], (int)enabled, (qt_QString *) [tooltiptext toQString: &_qstring_tooltiptext], (int)size, (int)index, (int)policy);
}

- (int) insertCombo: (NSString *)text identifier: (int)identifier writable: (BOOL)writable signal: (NSString *)signal recevier: (QObject *)recevier slot: (NSString *)slot 
{
static qt_QString * _qstring_text = 0L;
	return (int) kde_KToolBar_insertCombo1((kde_KToolBar *)[self qt], (qt_QString *) [text toQString: &_qstring_text], (int)identifier, (int)writable, (char*) [signal cString], (qt_QObject *) [recevier qt], (char*) [slot cString], 1, qt_QString_null(), 70, -1, [QComboBox AtBottom]);
}

- (int) insertSeparator: (int)index identifier: (int)identifier
{
	return (int) kde_KToolBar_insertSeparator((kde_KToolBar *)[self qt], (int)index, (int)identifier);
}

- (int) insertSeparator
{
	return (int) kde_KToolBar_insertSeparator((kde_KToolBar *)[self qt], -1, -1);
}

- (int) insertLineSeparator: (int)index identifier: (int)identifier
{
	return (int) kde_KToolBar_insertLineSeparator((kde_KToolBar *)[self qt], (int)index, (int)identifier);
}

- (int) insertLineSeparator
{
	return (int) kde_KToolBar_insertLineSeparator((kde_KToolBar *)[self qt], -1, -1);
}

- (int) insertWidget: (int)identifier width: (int)width _widget: (QWidget *)_widget index: (int)index
{
	return (int) kde_KToolBar_insertWidget((kde_KToolBar *)[self qt], (int)identifier, (int)width, (qt_QWidget *) [_widget qt], (int)index);
}

- (int) insertWidget: (int)identifier width: (int)width _widget: (QWidget *)_widget 
{
	return (int) kde_KToolBar_insertWidget((kde_KToolBar *)[self qt], (int)identifier, (int)width, (qt_QWidget *) [_widget qt], -1);
}

- (int) insertAnimatedWidget: (int)identifier receiver: (QObject *)receiver slot: (NSString *)slot icons: (NSString *)icons index: (int)index
{
static qt_QString * _qstring_icons = 0L;
	return (int) kde_KToolBar_insertAnimatedWidget((kde_KToolBar *)[self qt], (int)identifier, (qt_QObject *) [receiver qt], (char*) [slot cString], (qt_QString *) [icons toQString: &_qstring_icons], (int)index);
}

- (int) insertAnimatedWidget: (int)identifier receiver: (QObject *)receiver slot: (NSString *)slot icons: (NSString *)icons 
{
static qt_QString * _qstring_icons = 0L;
	return (int) kde_KToolBar_insertAnimatedWidget((kde_KToolBar *)[self qt], (int)identifier, (qt_QObject *) [receiver qt], (char*) [slot cString], (qt_QString *) [icons toQString: &_qstring_icons], -1);
}

- (KAnimWidget*) animatedWidget: (int)identifier
{
	return (KAnimWidget*) [QtSupport objectForQtKey: kde_KToolBar_animatedWidget((kde_KToolBar *)[self qt], (int)identifier) withClass: [KAnimWidget class] allocatedInObjcWorld: YES];
}

- addConnection: (int)identifier signal: (NSString *)signal receiver: (QObject *)receiver slot: (NSString *)slot
{
	kde_KToolBar_addConnection((kde_KToolBar *)[self qt], (int)identifier, (char*) [signal cString], (qt_QObject *) [receiver qt], (char*) [slot cString]);
	return self;
}

- setItemEnabled: (int)identifier enabled: (BOOL)enabled
{
	kde_KToolBar_setItemEnabled((kde_KToolBar *)[self qt], (int)identifier, (int)enabled);
	return self;
}

- setButtonPixmap: (int)identifier _pixmap: (QPixmap *)_pixmap
{
	kde_KToolBar_setButtonPixmap((kde_KToolBar *)[self qt], (int)identifier, (qt_QPixmap *) [_pixmap qt]);
	return self;
}

- setButtonIcon: (int)identifier _icon: (NSString *)_icon
{
static qt_QString * _qstring__icon = 0L;
	kde_KToolBar_setButtonIcon((kde_KToolBar *)[self qt], (int)identifier, (qt_QString *) [_icon toQString: &_qstring__icon]);
	return self;
}

- setButtonIconSet: (int)identifier iconset: (QIconSet*)iconset
{
	kde_KToolBar_setButtonIconSet((kde_KToolBar *)[self qt], (int)identifier, (qt_QIconSet*) [iconset qt]);
	return self;
}

- setDelayedPopup: (int)identifier _popup: (QPopupMenu*)_popup toggle: (BOOL)toggle
{
	kde_KToolBar_setDelayedPopup((kde_KToolBar *)[self qt], (int)identifier, (qt_QPopupMenu*) [_popup qt], (int)toggle);
	return self;
}

- setDelayedPopup: (int)identifier _popup: (QPopupMenu*)_popup 
{
	kde_KToolBar_setDelayedPopup((kde_KToolBar *)[self qt], (int)identifier, (qt_QPopupMenu*) [_popup qt], 0);
	return self;
}

- setAutoRepeat: (int)identifier flag: (BOOL)flag
{
	kde_KToolBar_setAutoRepeat((kde_KToolBar *)[self qt], (int)identifier, (int)flag);
	return self;
}

- setAutoRepeat: (int)identifier 
{
	kde_KToolBar_setAutoRepeat((kde_KToolBar *)[self qt], (int)identifier, 1);
	return self;
}

- setToggle: (int)identifier flag: (BOOL)flag
{
	kde_KToolBar_setToggle((kde_KToolBar *)[self qt], (int)identifier, (int)flag);
	return self;
}

- setToggle: (int)identifier 
{
	kde_KToolBar_setToggle((kde_KToolBar *)[self qt], (int)identifier, 1);
	return self;
}

- toggleButton: (int)identifier
{
	kde_KToolBar_toggleButton((kde_KToolBar *)[self qt], (int)identifier);
	return self;
}

- setButton: (int)identifier flag: (BOOL)flag
{
	kde_KToolBar_setButton((kde_KToolBar *)[self qt], (int)identifier, (int)flag);
	return self;
}

- (BOOL) isButtonOn: (int)identifier
{
	return (BOOL) kde_KToolBar_isButtonOn((kde_KToolBar *)[self qt], (int)identifier);
}

- setLinedText: (int)identifier text: (NSString *)text
{
static qt_QString * _qstring_text = 0L;
	kde_KToolBar_setLinedText((kde_KToolBar *)[self qt], (int)identifier, (qt_QString *) [text toQString: &_qstring_text]);
	return self;
}

- (NSString *) getLinedText: (int)identifier
{
static qt_QString * _qstring = 0L;
	_qstring = kde_KToolBar_getLinedText((kde_KToolBar *)[self qt], (int)identifier);
	return [NSString fromQString: _qstring];
}

- insertComboItem: (int)identifier text: (NSString *)text index: (int)index
{
static qt_QString * _qstring_text = 0L;
	kde_KToolBar_insertComboItem((kde_KToolBar *)[self qt], (int)identifier, (qt_QString *) [text toQString: &_qstring_text], (int)index);
	return self;
}

- insertComboList: (int)identifier list: (NSArray *)list index: (int)index
{
static qt_QStringList * _qlist_list = 0L;
	kde_KToolBar_insertComboList((kde_KToolBar *)[self qt], (int)identifier, (qt_QStringList*) [list toQStringList: (void *)&_qlist_list], (int)index);
	return self;
}

- removeComboItem: (int)identifier index: (int)index
{
	kde_KToolBar_removeComboItem((kde_KToolBar *)[self qt], (int)identifier, (int)index);
	return self;
}

- setCurrentComboItem: (int)identifier index: (int)index
{
	kde_KToolBar_setCurrentComboItem((kde_KToolBar *)[self qt], (int)identifier, (int)index);
	return self;
}

- changeComboItem: (int)identifier text: (NSString *)text index: (int)index
{
static qt_QString * _qstring_text = 0L;
	kde_KToolBar_changeComboItem((kde_KToolBar *)[self qt], (int)identifier, (qt_QString *) [text toQString: &_qstring_text], (int)index);
	return self;
}

- changeComboItem: (int)identifier text: (NSString *)text 
{
static qt_QString * _qstring_text = 0L;
	kde_KToolBar_changeComboItem((kde_KToolBar *)[self qt], (int)identifier, (qt_QString *) [text toQString: &_qstring_text], -1);
	return self;
}

- clearCombo: (int)identifier
{
	kde_KToolBar_clearCombo((kde_KToolBar *)[self qt], (int)identifier);
	return self;
}

- (NSString *) getComboItem: (int)identifier index: (int)index
{
static qt_QString * _qstring = 0L;
	_qstring = kde_KToolBar_getComboItem((kde_KToolBar *)[self qt], (int)identifier, (int)index);
	return [NSString fromQString: _qstring];
}

- (KComboBox*) getCombo: (int)identifier
{
	return (KComboBox*) [QtSupport objectForQtKey: kde_KToolBar_getCombo((kde_KToolBar *)[self qt], (int)identifier) withClass: [KComboBox class] allocatedInObjcWorld: YES];
}

- (KLineEdit*) getLined: (int)identifier
{
	return (KLineEdit*) [QtSupport objectForQtKey: kde_KToolBar_getLined((kde_KToolBar *)[self qt], (int)identifier) withClass: [KLineEdit class] allocatedInObjcWorld: YES];
}

- (KToolBarButton*) getButton: (int)identifier
{
	return (KToolBarButton*) [QtSupport objectForQtKey: kde_KToolBar_getButton((kde_KToolBar *)[self qt], (int)identifier) withClass: [KToolBarButton class] allocatedInObjcWorld: YES];
}

- alignItemRight: (int)identifier right: (BOOL)right
{
	kde_KToolBar_alignItemRight((kde_KToolBar *)[self qt], (int)identifier, (int)right);
	return self;
}

- alignItemRight: (int)identifier 
{
	kde_KToolBar_alignItemRight((kde_KToolBar *)[self qt], (int)identifier, 1);
	return self;
}

- (QWidget*) getWidget: (int)identifier
{
	return (QWidget*) [QtSupport objectForQtKey: kde_KToolBar_getWidget((kde_KToolBar *)[self qt], (int)identifier) withClass: [QWidget class] allocatedInObjcWorld: YES];
}

- setItemAutoSized: (int)identifier yes: (BOOL)yes
{
	kde_KToolBar_setItemAutoSized((kde_KToolBar *)[self qt], (int)identifier, (int)yes);
	return self;
}

- setItemAutoSized: (int)identifier 
{
	kde_KToolBar_setItemAutoSized((kde_KToolBar *)[self qt], (int)identifier, 1);
	return self;
}

- clear
{
	kde_KToolBar_clear((kde_KToolBar *)[self qt]);
	return self;
}

- removeIntItem: (int)identifier
{
	kde_KToolBar_removeItem((kde_KToolBar *)[self qt], (int)identifier);
	return self;
}

- hideItem: (int)identifier
{
	kde_KToolBar_hideItem((kde_KToolBar *)[self qt], (int)identifier);
	return self;
}

- showItem: (int)identifier
{
	kde_KToolBar_showItem((kde_KToolBar *)[self qt], (int)identifier);
	return self;
}

- setFullSize: (BOOL)flag
{
	kde_KToolBar_setFullSize((kde_KToolBar *)[self qt], (int)flag);
	return self;
}

- setFullSize
{
	kde_KToolBar_setFullSize((kde_KToolBar *)[self qt], 1);
	return self;
}

- (BOOL) fullSize
{
	return (BOOL) kde_KToolBar_fullSize((kde_KToolBar *)[self qt]);
}

- enableMoving: (BOOL)flag
{
	kde_KToolBar_enableMoving((kde_KToolBar *)[self qt], (int)flag);
	return self;
}

- enableMoving
{
	kde_KToolBar_enableMoving((kde_KToolBar *)[self qt], 1);
	return self;
}

- setBarPos: (int)bpos
{
	kde_KToolBar_setBarPos((kde_KToolBar *)[self qt], (int)bpos);
	return self;
}

- (int) barPos
{
	return (int) kde_KToolBar_barPos((kde_KToolBar *)[self qt]);
}

- (BOOL) enable: (int)stat
{
	return (BOOL) kde_KToolBar_enable((kde_KToolBar *)[self qt], (int)stat);
}

- setMaxHeight: (int)h
{
	kde_KToolBar_setMaxHeight((kde_KToolBar *)[self qt], (int)h);
	return self;
}

- (int) maxHeight
{
	return (int) kde_KToolBar_maxHeight((kde_KToolBar *)[self qt]);
}

- setMaxWidth: (int)dw
{
	kde_KToolBar_setMaxWidth((kde_KToolBar *)[self qt], (int)dw);
	return self;
}

- (int) maxWidth
{
	return (int) kde_KToolBar_maxWidth((kde_KToolBar *)[self qt]);
}

- setTitle: (NSString *)_title
{
static qt_QString * _qstring__title = 0L;
	kde_KToolBar_setTitle((kde_KToolBar *)[self qt], (qt_QString *) [_title toQString: &_qstring__title]);
	return self;
}

- enableFloating: (BOOL)arrrrrrgh
{
	kde_KToolBar_enableFloating((kde_KToolBar *)[self qt], (int)arrrrrrgh);
	return self;
}

- setIconTextWithId: (int)it
{
	kde_KToolBar_setIconText((kde_KToolBar *)[self qt], (int)it);
	return self;
}

- setIconTextWithId: (int)it update: (BOOL)update
{
	kde_KToolBar_setIconText1((kde_KToolBar *)[self qt], (int)it, (int)update);
	return self;
}

- (int) iconText
{
	return (int) kde_KToolBar_iconText((kde_KToolBar *)[self qt]);
}

- setIconSize: (int)size
{
	kde_KToolBar_setIconSize((kde_KToolBar *)[self qt], (int)size);
	return self;
}

- setIconSize: (int)size update: (BOOL)update
{
	kde_KToolBar_setIconSize1((kde_KToolBar *)[self qt], (int)size, (int)update);
	return self;
}

- (int) iconSize
{
	return (int) kde_KToolBar_iconSize((kde_KToolBar *)[self qt]);
}

- setEnableContextMenu: (BOOL)enable
{
	kde_KToolBar_setEnableContextMenu((kde_KToolBar *)[self qt], (int)enable);
	return self;
}

- setEnableContextMenu
{
	kde_KToolBar_setEnableContextMenu((kde_KToolBar *)[self qt], 1);
	return self;
}

- (BOOL) contextMenuEnabled
{
	return (BOOL) kde_KToolBar_contextMenuEnabled((kde_KToolBar *)[self qt]);
}

- setItemNoStyle: (int)identifier no_style: (BOOL)no_style
{
	kde_KToolBar_setItemNoStyle((kde_KToolBar *)[self qt], (int)identifier, (int)no_style);
	return self;
}

- setItemNoStyle: (int)identifier 
{
	kde_KToolBar_setItemNoStyle((kde_KToolBar *)[self qt], (int)identifier, 1);
	return self;
}

- setFlat: (BOOL)flag
{
	kde_KToolBar_setFlat((kde_KToolBar *)[self qt], (int)flag);
	return self;
}

- (int) count
{
	return (int) kde_KToolBar_count((kde_KToolBar *)[self qt]);
}

- saveState
{
	kde_KToolBar_saveState((kde_KToolBar *)[self qt]);
	return self;
}

- saveSettings: (KConfig*)config configGroup: (NSString *)configGroup
{
static qt_QString * _qstring_configGroup = 0L;
	kde_KToolBar_saveSettings((kde_KToolBar *)[self qt], (kde_KConfig*) [config qt], (qt_QString *) [configGroup toQString: &_qstring_configGroup]);
	return self;
}

- applySettings: (KConfig*)config configGroup: (NSString *)configGroup
{
static qt_QString * _qstring_configGroup = 0L;
	kde_KToolBar_applySettings((kde_KToolBar *)[self qt], (kde_KConfig*) [config qt], (qt_QString *) [configGroup toQString: &_qstring_configGroup]);
	return self;
}

- setXMLGUIClient: (KXMLGUIClient*)client
{
	kde_KToolBar_setXMLGUIClient((kde_KToolBar *)[self qt], (kde_KXMLGUIClient*) [client qt]);
	return self;
}

- setText: (NSString *)txt
{
static qt_QString * _qstring_txt = 0L;
	kde_KToolBar_setText((kde_KToolBar *)[self qt], (qt_QString *) [txt toQString: &_qstring_txt]);
	return self;
}

- (NSString *) text
{
static qt_QString * _qstring = 0L;
	_qstring = kde_KToolBar_text((kde_KToolBar *)[self qt]);
	return [NSString fromQString: _qstring];
}

- setStretchableWidget: (QWidget *)w
{
	kde_KToolBar_setStretchableWidget((kde_KToolBar *)[self qt], (qt_QWidget *) [w qt]);
	return self;
}

- (QSizePolicy*) sizePolicy
{
	return (QSizePolicy*) [QtSupport objectForQtKey: kde_KToolBar_sizePolicy((kde_KToolBar *)[self qt]) withClass: [QSizePolicy class] allocatedInObjcWorld: YES];
}

- (BOOL) highlight
{
	return (BOOL) kde_KToolBar_highlight((kde_KToolBar *)[self qt]);
}

- (QSize*) sizeHint
{
	return (QSize*) [QtSupport objectForQtKey: kde_KToolBar_sizeHint((kde_KToolBar *)[self qt]) withClass: [QSize class] allocatedInObjcWorld: YES];
}

- (QSize*) minimumSizeHint
{
	return (QSize*) [QtSupport objectForQtKey: kde_KToolBar_minimumSizeHint((kde_KToolBar *)[self qt]) withClass: [QSize class] allocatedInObjcWorld: YES];
}

- (QSize*) minimumSize
{
	return (QSize*) [QtSupport objectForQtKey: kde_KToolBar_minimumSize((kde_KToolBar *)[self qt]) withClass: [QSize class] allocatedInObjcWorld: YES];
}

- hide
{
	kde_KToolBar_hide((kde_KToolBar *)[self qt]);
	return self;
}

- show
{
	kde_KToolBar_show((kde_KToolBar *)[self qt]);
	return self;
}

- updateRects: (BOOL)arg1
{
	kde_KToolBar_updateRects((kde_KToolBar *)[self qt], (int)arg1);
	return self;
}

- updateRects
{
	kde_KToolBar_updateRects((kde_KToolBar *)[self qt], 0);
	return self;
}

- loadState: (QDomElement*)e
{
	kde_KToolBar_loadState((kde_KToolBar *)[self qt], (qt_QDomElement*) [e qt]);
	return self;
}

- saveState: (QDomElement*)e
{
	kde_KToolBar_saveState1((kde_KToolBar *)[self qt], (qt_QDomElement*) [e qt]);
	return self;
}

- positionYourself: (BOOL)force
{
	kde_KToolBar_positionYourself((kde_KToolBar *)[self qt], (int)force);
	return self;
}

- positionYourself
{
	kde_KToolBar_positionYourself((kde_KToolBar *)[self qt], 0);
	return self;
}

- setIconText: (NSString *)txt
{
static qt_QString * _qstring_txt = 0L;
	kde_KToolBar_setIconText2((kde_KToolBar *)[self qt], (qt_QString *) [txt toQString: &_qstring_txt]);
	return self;
}

- (BOOL) event: (QEvent *)e
{
	return (BOOL) kde_KToolBar_event((kde_KToolBar *)[self qt], (qt_QEvent *) [e qt]);
}

- applyAppearanceSettings: (KConfig*)config _configGroup: (NSString *)_configGroup forceGlobal: (BOOL)forceGlobal
{
static qt_QString * _qstring__configGroup = 0L;
	kde_KToolBar_applyAppearanceSettings((kde_KToolBar *)[self qt], (kde_KConfig*) [config qt], (qt_QString *) [_configGroup toQString: &_qstring__configGroup], (int)forceGlobal);
	return self;
}

- applyAppearanceSettings: (KConfig*)config _configGroup: (NSString *)_configGroup 
{
static qt_QString * _qstring__configGroup = 0L;
	kde_KToolBar_applyAppearanceSettings((kde_KToolBar *)[self qt], (kde_KConfig*) [config qt], (qt_QString *) [_configGroup toQString: &_qstring__configGroup], 0);
	return self;
}

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

+ (int) IconOnly
{
	return (int) KTOOLBAR_IconOnly;
}

+ (int) IconTextRight
{
	return (int) KTOOLBAR_IconTextRight;
}

+ (int) TextOnly
{
	return (int) KTOOLBAR_TextOnly;
}

+ (int) IconTextBottom
{
	return (int) KTOOLBAR_IconTextBottom;
}

+ (int) Toggle
{
	return (int) KTOOLBAR_Toggle;
}

+ (int) Show
{
	return (int) KTOOLBAR_Show;
}

+ (int) Hide
{
	return (int) KTOOLBAR_Hide;
}

+ (int) Unmanaged
{
	return (int) KTOOLBAR_Unmanaged;
}

+ (int) Floating
{
	return (int) KTOOLBAR_Floating;
}

+ (int) Top
{
	return (int) KTOOLBAR_Top;
}

+ (int) Bottom
{
	return (int) KTOOLBAR_Bottom;
}

+ (int) Right
{
	return (int) KTOOLBAR_Right;
}

+ (int) Left
{
	return (int) KTOOLBAR_Left;
}

+ (int) Flat
{
	return (int) KTOOLBAR_Flat;
}

@end
