/***************************************************************************
                            QMenuBar.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_QMenuBar.h>
#include <qtc/qt_QMenuData.h>
#include <qtobjc/QMenuBar.h>
#include <qtobjc/QFont.h>
#include <qtobjc/QPoint.h>

#include <qtobjc/QPainter.h>
#include <qtobjc/QStyle.h>
#include <qtobjc/QPopupMenu.h>
#include <qtobjc/QWidget.h>
#include <qtobjc/QCustomMenuItem.h>
#include <qtobjc/QIconSet.h>
#include <qtobjc/QPixmap.h>
#include <qtobjc/QKeySequence.h>

@implementation  QMenuBar


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

- init
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QMenuBar(0, 0)];
		[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) {
			qt_del_QMenuBar((qt_QMenuBar *)[self qt]);
		}
		[QtSupport removeQtKey: [self qt]];
		[self setQt: 0L];
	}
	[super dealloc];
}

- updateIntItem: (int)identifier
{
	qt_QMenuBar_updateItem((qt_QMenuBar *)[self qt], (int)identifier);
	return self;
}

- show
{
	qt_QMenuBar_show((qt_QMenuBar *)[self qt]);
	return self;
}

- hide
{
	qt_QMenuBar_hide((qt_QMenuBar *)[self qt]);
	return self;
}

- (BOOL) eventFilter: (QObject *)arg1 event: (QEvent *)arg2
{
	return (BOOL) qt_QMenuBar_eventFilter((qt_QMenuBar *)[self qt], (qt_QObject *) [arg1 qt], (qt_QEvent *) [arg2 qt]);
}

- (int) heightForWidth: (int)arg1
{
	return (int) qt_QMenuBar_heightForWidth((qt_QMenuBar *)[self qt], (int)arg1);
}

- (int) separator
{
	return (int) qt_QMenuBar_separator((qt_QMenuBar *)[self qt]);
}

- setSeparator: (int)when
{
	qt_QMenuBar_setSeparator((qt_QMenuBar *)[self qt], (int)when);
	return self;
}

- setDefaultUp: (BOOL)arg1
{
	qt_QMenuBar_setDefaultUp((qt_QMenuBar *)[self qt], (int)arg1);
	return self;
}

- (BOOL) isDefaultUp
{
	return (BOOL) qt_QMenuBar_isDefaultUp((qt_QMenuBar *)[self qt]);
}

- (BOOL) customWhatsThis
{
	return (BOOL) qt_QMenuBar_customWhatsThis((qt_QMenuBar *)[self qt]);
}

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

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

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

- activateItemAt: (int)index
{
	qt_QMenuBar_activateItemAt((qt_QMenuBar *)[self qt], (int)index);
	return self;
}

//+ initialize
//{
//	qt_QMenuBar_initialize();
//	return self;
//}

//+ cleanup
//{
//	qt_QMenuBar_cleanup();
//	return self;
//}

- drawContents: (QPainter *)arg1
{
	qt_QMenuBar_drawContents((qt_QMenuBar *)[self qt], (qt_QPainter *) [arg1 qt]);
	return self;
}

- fontChange: (QFont *)arg1
{
	qt_QMenuBar_fontChange((qt_QMenuBar *)[self qt], (qt_QFont *) [arg1 qt]);
	return self;
}

- menuContentsChanged
{
	qt_QMenuBar_menuContentsChanged((qt_QMenuBar *)[self qt]);
	return self;
}

- menuStateChanged
{
	qt_QMenuBar_menuStateChanged((qt_QMenuBar *)[self qt]);
	return self;
}

- styleChange: (QStyle*)arg1
{
	qt_QMenuBar_styleChange((qt_QMenuBar *)[self qt], (qt_QStyle*) [arg1 qt]);
	return self;
}

- (int) itemAtPos: (QPoint*)arg1
{
	return (int) qt_QMenuBar_itemAtPos((qt_QMenuBar *)[self qt], (qt_QPoint*) [arg1 qt]);
}

- hidePopups
{
	qt_QMenuBar_hidePopups((qt_QMenuBar *)[self qt]);
	return self;
}

- (QRect*) itemRect: (int)item
{
	return (QRect*) [QtSupport objectForQtKey: qt_QMenuBar_itemRect((qt_QMenuBar *)[self qt], (int)item) withClass: [QRect class] allocatedInObjcWorld: YES];
}

+ (int) Never
{
	return (int) QMENUBAR_Never;
}

+ (int) InWindowsStyle
{
	return (int) QMENUBAR_InWindowsStyle;
}

@end

@implementation QMenuBar (QMenuDataImplementation)

- (unsigned int) count
{
	return (unsigned int) qt_QMenuData_count(qt_QMenuBar_QMenuData([self qt]));
}

- (int) insertTextItem: (NSString *)text receiver: (QObject *)receiver slot: (NSString *)member accel: (QKeySequence*)accel identifier: (int)identifier index: (int)index
{
	identifier = [self insertTextItem: text identifier: identifier index: index];
	[self connectItem: identifier receiver: receiver slot: member];
	[self setAccel: accel identifier: identifier];
	return identifier;
}

- (int) insertTextItem: (NSString *)text receiver: (QObject *)receiver slot: (NSString *)member
{
	int identifier = [self insertTextItem: text identifier: -1 index: -1];
	[self connectItem: identifier receiver: receiver slot: member];
	return identifier;
}

- (int) insertIconSetItem: (QIconSet*)icon text: (NSString *)text receiver: (QObject *)receiver slot: (NSString *)member accel: (QKeySequence*)accel identifier: (int)identifier index: (int)index
{
static qt_QString * _qstring_text = 0L;
	return (int) qt_QMenuData_insertItem1(qt_QMenuBar_QMenuData([self qt]), (qt_QIconSet*) [icon qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QObject *) [receiver qt], (char*) [member cString], (qt_QKeySequence*) [accel qt], (int)identifier, (int)index);
}

- (int) insertIconSetItem: (QIconSet*)icon text: (NSString *)text receiver: (QObject *)receiver slot: (NSString *)member
{
static qt_QString * _qstring_text = 0L;
	return (int) qt_QMenuData_insertItem1(qt_QMenuBar_QMenuData([self qt]), (qt_QIconSet*) [icon qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QObject *) [receiver qt], (char*) [member cString], 0, -1, -1);
}

- (int) insertPixmapItem: (QPixmap *)pixmap receiver: (QObject *)receiver slot: (NSString *)member accel: (QKeySequence*)accel identifier: (int)identifier index: (int)index
{
	return (int) qt_QMenuData_insertItem2(qt_QMenuBar_QMenuData([self qt]), (qt_QPixmap *) [pixmap qt], (qt_QObject *) [receiver qt], (char*) [member cString], (qt_QKeySequence*) [accel qt], (int)identifier, (int)index);
}

- (int) insertPixmapItem: (QPixmap *)pixmap receiver: (QObject *)receiver slot: (NSString *)member
{
	return (int) qt_QMenuData_insertItem2(qt_QMenuBar_QMenuData([self qt]), (qt_QPixmap *) [pixmap qt], (qt_QObject *) [receiver qt], (char*) [member cString], 0, -1, -1);
}

- (int) insertIconSetItem: (QIconSet*)icon pixmap: (QPixmap *)pixmap receiver: (QObject *)receiver slot: (NSString *)member accel: (QKeySequence*)accel identifier: (int)identifier index: (int)index
{
	return (int) qt_QMenuData_insertItem3(qt_QMenuBar_QMenuData([self qt]), (qt_QIconSet*) [icon qt], (qt_QPixmap *) [pixmap qt], (qt_QObject *) [receiver qt], (char*) [member cString], (qt_QKeySequence*) [accel qt], (int)identifier, (int)index);
}

- (int) insertIconSetItem: (QIconSet*)icon pixmap: (QPixmap *)pixmap receiver: (QObject *)receiver slot: (NSString *)member
{
	return (int) qt_QMenuData_insertItem3(qt_QMenuBar_QMenuData([self qt]), (qt_QIconSet*) [icon qt], (qt_QPixmap *) [pixmap qt], (qt_QObject *) [receiver qt], (char*) [member cString], 0, -1, -1);
}

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

- (int) insertTextItem: (NSString *)text identifier: (int)identifier
{
	return [self insertTextItem: text identifier: identifier index: -1];
}

- (int) insertTextItem: (NSString *)text
{
static qt_QString * _qstring_text = 0L;
	return (int) qt_QMenuData_insertItem4(qt_QMenuBar_QMenuData([self qt]), (qt_QString *) [text toQString: &_qstring_text], -1, -1);
}

- (int) insertIconSetItem: (QIconSet*)icon text: (NSString *)text identifier: (int)identifier index: (int)index
{
static qt_QString * _qstring_text = 0L;
	return (int) qt_QMenuData_insertItem5(qt_QMenuBar_QMenuData([self qt]), (qt_QIconSet*) [icon qt], (qt_QString *) [text toQString: &_qstring_text], (int)identifier, (int)index);
}

- (int) insertIconSetItem: (QIconSet*)icon text: (NSString *)text
{
static qt_QString * _qstring_text = 0L;
	return (int) qt_QMenuData_insertItem5(qt_QMenuBar_QMenuData([self qt]), (qt_QIconSet*) [icon qt], (qt_QString *) [text toQString: &_qstring_text], -1, -1);
}

- (int) insertTextItem: (NSString *)text popup: (QPopupMenu*)popup identifier: (int)identifier index: (int)index
{
static qt_QString * _qstring_text = 0L;
	return (int) qt_QMenuData_insertItem6(qt_QMenuBar_QMenuData([self qt]), (qt_QString *) [text toQString: &_qstring_text], (qt_QPopupMenu*) [popup qt], (int)identifier, (int)index);
}

- (int) insertTextItem: (NSString *)text popup: (QPopupMenu*)popup
{
static qt_QString * _qstring_text = 0L;
	return (int) qt_QMenuData_insertItem6(qt_QMenuBar_QMenuData([self qt]), (qt_QString *) [text toQString: &_qstring_text], (qt_QPopupMenu*) [popup qt], -1, -1);
}

- (int) insertIconSetItem: (QIconSet*)icon text: (NSString *)text popup: (QPopupMenu*)popup identifier: (int)identifier index: (int)index
{
static qt_QString * _qstring_text = 0L;
	return (int) qt_QMenuData_insertItem7(qt_QMenuBar_QMenuData([self qt]), (qt_QIconSet*) [icon qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QPopupMenu*) [popup qt], (int)identifier, (int)index);
}

- (int) insertIconSetItem: (QIconSet*)icon text: (NSString *)text popup: (QPopupMenu*)popup
{
static qt_QString * _qstring_text = 0L;
	return (int) qt_QMenuData_insertItem7(qt_QMenuBar_QMenuData([self qt]), (qt_QIconSet*) [icon qt], (qt_QString *) [text toQString: &_qstring_text], (qt_QPopupMenu*) [popup qt], -1, -1);
}

- (int) insertPixmapItem: (QPixmap *)pixmap identifier: (int)identifier index: (int)index
{
	return (int) qt_QMenuData_insertItem8(qt_QMenuBar_QMenuData([self qt]), (qt_QPixmap *) [pixmap qt], (int)identifier, (int)index);
}

- (int) insertPixmapItem: (QPixmap *)pixmap
{
	return (int) qt_QMenuData_insertItem8(qt_QMenuBar_QMenuData([self qt]), (qt_QPixmap *) [pixmap qt], -1, -1);
}

- (int) insertIconSetItem: (QIconSet*)icon pixmap: (QPixmap *)pixmap identifier: (int)identifier index: (int)index
{
	return (int) qt_QMenuData_insertItem9(qt_QMenuBar_QMenuData([self qt]), (qt_QIconSet*) [icon qt], (qt_QPixmap *) [pixmap qt], (int)identifier, (int)index);
}

- (int) insertIconSetItem: (QIconSet*)icon pixmap: (QPixmap *)pixmap
{
	return (int) qt_QMenuData_insertItem9(qt_QMenuBar_QMenuData([self qt]), (qt_QIconSet*) [icon qt], (qt_QPixmap *) [pixmap qt], -1, -1);
}

- (int) insertPixmapItem: (QPixmap *)pixmap popup: (QPopupMenu*)popup identifier: (int)identifier index: (int)index
{
	return (int) qt_QMenuData_insertItem10(qt_QMenuBar_QMenuData([self qt]), (qt_QPixmap *) [pixmap qt], (qt_QPopupMenu*) [popup qt], (int)identifier, (int)index);
}

- (int) insertPixmapItem: (QPixmap *)pixmap popup: (QPopupMenu*)popup
{
	return (int) qt_QMenuData_insertItem10(qt_QMenuBar_QMenuData([self qt]), (qt_QPixmap *) [pixmap qt], (qt_QPopupMenu*) [popup qt], -1, -1);
}

- (int) insertIconSetItem: (QIconSet*)icon pixmap: (QPixmap *)pixmap popup: (QPopupMenu*)popup identifier: (int)identifier index: (int)index
{
	return (int) qt_QMenuData_insertItem11(qt_QMenuBar_QMenuData([self qt]), (qt_QIconSet*) [icon qt], (qt_QPixmap *) [pixmap qt], (qt_QPopupMenu*) [popup qt], (int)identifier, (int)index);
}

- (int) insertIconSetItem: (QIconSet*)icon pixmap: (QPixmap *)pixmap popup: (QPopupMenu*)popup
{
	return (int) qt_QMenuData_insertItem11(qt_QMenuBar_QMenuData([self qt]), (qt_QIconSet*) [icon qt], (qt_QPixmap *) [pixmap qt], (qt_QPopupMenu*) [popup qt], -1, -1);
}

- (int) insertWidgetItem: (QWidget *)widget identifier: (int)identifier index: (int)index
{
	return (int) qt_QMenuData_insertItem12(qt_QMenuBar_QMenuData([self qt]), (qt_QWidget *) [widget qt], (int)identifier, (int)index);
}

- (int) insertWidgetItem: (QWidget *)widget
{
	return (int) qt_QMenuData_insertItem12(qt_QMenuBar_QMenuData([self qt]), (qt_QWidget *) [widget qt], -1, -1);
}

- (int) insertIconSetItem: (QIconSet*)icon custom: (QCustomMenuItem*)custom identifier: (int)identifier index: (int)index
{
	return (int) qt_QMenuData_insertItem13(qt_QMenuBar_QMenuData([self qt]), (qt_QIconSet*) [icon qt], (qt_QCustomMenuItem*) [custom qt], (int)identifier, (int)index);
}

- (int) insertIconSetItem: (QIconSet*)icon custom: (QCustomMenuItem*)custom
{
	return (int) qt_QMenuData_insertItem13(qt_QMenuBar_QMenuData([self qt]), (qt_QIconSet*) [icon qt], (qt_QCustomMenuItem*) [custom qt], -1, -1);
}

- (int) insertCustomMenuItem: (QCustomMenuItem*)custom identifier: (int)identifier index: (int)index
{
	return (int) qt_QMenuData_insertItem14(qt_QMenuBar_QMenuData([self qt]), (qt_QCustomMenuItem*) [custom qt], (int)identifier, (int)index);
}

- (int) insertCustomMenuItem: (QCustomMenuItem*)custom
{
	return (int) qt_QMenuData_insertItem14(qt_QMenuBar_QMenuData([self qt]), (qt_QCustomMenuItem*) [custom qt], -1, -1);
}

- (int) insertSeparator: (int)index
{
	return (int) qt_QMenuData_insertSeparator(qt_QMenuBar_QMenuData([self qt]), (int)index);
}

- (int) insertSeparator
{
	return (int) qt_QMenuData_insertSeparator(qt_QMenuBar_QMenuData([self qt]), -1);
}

- removeIntItem: (int)identifier
{
	qt_QMenuData_removeItem(qt_QMenuBar_QMenuData([self qt]), (int)identifier);
	return self;
}

- removeItemAt: (int)index
{
	qt_QMenuData_removeItemAt(qt_QMenuBar_QMenuData([self qt]), (int)index);
	return self;
}

- clear
{
	qt_QMenuData_clear(qt_QMenuBar_QMenuData([self qt]));
	return self;
}

- (QKeySequence*) accel: (int)identifier
{
	return (QKeySequence*) [QtSupport objectForQtKey: qt_QMenuData_accel(qt_QMenuBar_QMenuData([self qt]), (int)identifier) withClass: [QKeySequence class] allocatedInObjcWorld: YES];
}

- setAccel: (QKeySequence*)key identifier: (int)identifier
{
	qt_QMenuData_setAccel(qt_QMenuBar_QMenuData([self qt]), (qt_QKeySequence*) [key qt], (int)identifier);
	return self;
}

- (QIconSet*) iconSet: (int)identifier
{
	return (QIconSet*) [QtSupport objectForQtKey: qt_QMenuData_iconSet(qt_QMenuBar_QMenuData([self qt]), (int)identifier) withClass: [QIconSet class] allocatedInObjcWorld: YES];
}

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

- (QPixmap*) pixmap: (int)identifier
{
	return (QPixmap*) [QtSupport objectForQtKey: qt_QMenuData_pixmap(qt_QMenuBar_QMenuData([self qt]), (int)identifier) withClass: [QPixmap class] allocatedInObjcWorld: YES];
}

- setWhatsThis: (int)identifier string: (NSString *)arg1
{
static qt_QString * _qstring_arg1 = 0L;
	qt_QMenuData_setWhatsThis(qt_QMenuBar_QMenuData([self qt]), (int)identifier, (qt_QString *) [arg1 toQString: &_qstring_arg1]);
	return self;
}

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

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

- changeIntItem: (int)identifier pixmap: (QPixmap *)pixmap
{
	qt_QMenuData_changeItem1(qt_QMenuBar_QMenuData([self qt]), (int)identifier, (qt_QPixmap *) [pixmap qt]);
	return self;
}

- changeIntItem: (int)identifier icon: (QIconSet*)icon text: (NSString *)text
{
static qt_QString * _qstring_text = 0L;
	qt_QMenuData_changeItem2(qt_QMenuBar_QMenuData([self qt]), (int)identifier, (qt_QIconSet*) [icon qt], (qt_QString *) [text toQString: &_qstring_text]);
	return self;
}

- changeIntItem: (int)identifier icon: (QIconSet*)icon pixmap: (QPixmap *)pixmap
{
	qt_QMenuData_changeItem3(qt_QMenuBar_QMenuData([self qt]), (int)identifier, (qt_QIconSet*) [icon qt], (qt_QPixmap *) [pixmap qt]);
	return self;
}

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

- changePixmapItem: (QPixmap *)pixmap identifier: (int)identifier
{
	qt_QMenuData_changeItem5(qt_QMenuBar_QMenuData([self qt]), (qt_QPixmap *) [pixmap qt], (int)identifier);
	return self;
}

- changeIconSetItem: (QIconSet*)icon text: (NSString *)text identifier: (int)identifier
{
static qt_QString * _qstring_text = 0L;
	qt_QMenuData_changeItem6(qt_QMenuBar_QMenuData([self qt]), (qt_QIconSet*) [icon qt], (qt_QString *) [text toQString: &_qstring_text], (int)identifier);
	return self;
}

- (BOOL) isItemActive: (int)identifier
{
	return (BOOL) qt_QMenuData_isItemActive(qt_QMenuBar_QMenuData([self qt]), (int)identifier);
}

- (BOOL) isItemEnabled: (int)identifier
{
	return (BOOL) qt_QMenuData_isItemEnabled(qt_QMenuBar_QMenuData([self qt]), (int)identifier);
}

- setItemEnabled: (int)identifier enable: (BOOL)enable
{
	qt_QMenuData_setItemEnabled(qt_QMenuBar_QMenuData([self qt]), (int)identifier, (int)enable);
	return self;
}

- (BOOL) isItemChecked: (int)identifier
{
	return (BOOL) qt_QMenuData_isItemChecked(qt_QMenuBar_QMenuData([self qt]), (int)identifier);
}

- setItemChecked: (int)identifier check: (BOOL)check
{
	qt_QMenuData_setItemChecked(qt_QMenuBar_QMenuData([self qt]), (int)identifier, (int)check);
	return self;
}

- updateIntItem: (int)identifier
{
	qt_QMenuData_updateItem(qt_QMenuBar_QMenuData([self qt]), (int)identifier);
	return self;
}

- (int) indexOf: (int)identifier
{
	return (int) qt_QMenuData_indexOf(qt_QMenuBar_QMenuData([self qt]), (int)identifier);
}

- (int) idAt: (int)index
{
	return (int) qt_QMenuData_idAt(qt_QMenuBar_QMenuData([self qt]), (int)index);
}

- setId: (int)index identifier: (int)identifier
{
	qt_QMenuData_setId(qt_QMenuBar_QMenuData([self qt]), (int)index, (int)identifier);
	return self;
}

- (BOOL) connectItem: (int)identifier receiver: (QObject *)receiver slot: (NSString *)member
{
	qt_Slot *	slotId;
	
	if ([member hasSuffix: @")"]) {
		return (BOOL) qt_QMenuData_connectItem(	qt_QMenuBar_QMenuData([self qt]),
												identifier,
												[receiver qt],
												(char *)[[NSString stringWithFormat: @"1%@", member] cString] );
	} else {
		slotId = (qt_Slot *) [QtSupport slotIdForReceiver: receiver slot: member];
		
		return (BOOL) qt_QMenuData_connectItem(	qt_QMenuBar_QMenuData([self qt]),
												identifier,
												(qt_QObject *) slotId,
												([member hasSuffix: @":"]) ? "1UserDataSlot(int)" : "1UserDataSlot()" );
	}
}

- (BOOL) disconnectItem: (int)identifier receiver: (QObject *)receiver slot: (NSString *)member
{
	return (BOOL) qt_QMenuData_disconnectItem(qt_QMenuBar_QMenuData([self qt]), (int)identifier, (qt_QObject *) [receiver qt], (char*) [member cString]);
}

- (BOOL) setItemParameter: (int)identifier param: (int)param
{
	return (BOOL) qt_QMenuData_setItemParameter(qt_QMenuBar_QMenuData([self qt]), (int)identifier, (int)param);
}

- (int) itemParameter: (int)identifier
{
	return (int) qt_QMenuData_itemParameter(qt_QMenuBar_QMenuData([self qt]), (int)identifier);
}

- (QMenuItem*) findItem: (int)identifier
{
	return (QMenuItem*) [QtSupport objectForQtKey: qt_QMenuData_findItem(qt_QMenuBar_QMenuData([self qt]), (int)identifier) withClass: [QMenuItem class] allocatedInObjcWorld: YES];
}

//- (QMenuItem*) findItem: (int)identifier parent: (QMenuData**)parent
//{
//	return (QMenuItem*) [QtSupport objectForQtKey: qt_QMenuData_findItem1(qt_QMenuBar_QMenuData([self qt]), (int)identifier, (qt_QMenuData**) [parent qt]) withClass: [QMenuItem class] allocatedInObjcWorld: YES];
//}

- (QMenuItem*) findPopup: (QPopupMenu*)arg1 index: (int*)index
{
	return (QMenuItem*) [QtSupport objectForQtKey: qt_QMenuData_findPopup(qt_QMenuBar_QMenuData([self qt]), (qt_QPopupMenu*) [arg1 qt], (int*)index) withClass: [QMenuItem class] allocatedInObjcWorld: YES];
}

- (QMenuItem*) findPopup: (QPopupMenu*)arg1
{
	return (QMenuItem*) [QtSupport objectForQtKey: qt_QMenuData_findPopup(qt_QMenuBar_QMenuData([self qt]), (qt_QPopupMenu*) [arg1 qt], 0) withClass: [QMenuItem class] allocatedInObjcWorld: YES];
}

- activateItemAt: (int)index
{
	qt_QMenuData_activateItemAt(qt_QMenuBar_QMenuData([self qt]), (int)index);
	return self;
}

- menuContentsChanged
{
	qt_QMenuData_menuContentsChanged(qt_QMenuBar_QMenuData([self qt]));
	return self;
}

- menuStateChanged
{
	qt_QMenuData_menuStateChanged(qt_QMenuBar_QMenuData([self qt]));
	return self;
}

- menuInsPopup: (QPopupMenu*)arg1
{
	qt_QMenuData_menuInsPopup(qt_QMenuBar_QMenuData([self qt]), (qt_QPopupMenu*) [arg1 qt]);
	return self;
}

- menuDelPopup: (QPopupMenu*)arg1
{
	qt_QMenuData_menuDelPopup(qt_QMenuBar_QMenuData([self qt]), (qt_QPopupMenu*) [arg1 qt]);
	return self;
}

@end
