/***************************************************************************
                            QWidget.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_QWidget.h>
#include <qtc/qt_QPaintDevice.h>
#include <qtobjc/QWidget.h>
#include <qtobjc/QFont.h>

#include <qtobjc/QLayout.h>
#include <qtobjc/QStyle.h>
#include <qtobjc/QPixmap.h>
#include <qtobjc/QPalette.h>
#include <qtobjc/QCursor.h>
#include <qtobjc/QBitmap.h>
#include <qtobjc/QRegion.h>
#include <qtobjc/QSizePolicy.h>
#include <qtobjc/QPoint.h>
#include <qtobjc/QRect.h>

@implementation  QWidget


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

- initWithWidget: (QWidget *)parent name: (NSString *)name
{
	return [self initWithWidget: parent name: name f: 0];
}

- initWithWidget: (QWidget *)parent
{
	return [self initWithWidget: parent name: nil];
}

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

- (unsigned int) winId
{
	return (unsigned int) qt_QWidget_winId((qt_QWidget *)[self qt]);
}

- setName: (NSString *)name
{
	qt_QWidget_setName((qt_QWidget *)[self qt], (char*) [name cString]);
	return self;
}

//- (QStyle*) style
//{
//	return (QStyle*) [QtSupport objectForQtKey: qt_QWidget_style((qt_QWidget *)[self qt]) withClass: [QStyle class] allocatedInObjcWorld: YES];
//}

- setStyle: (QStyle*)arg1
{
	qt_QWidget_setStyle((qt_QWidget *)[self qt], (qt_QStyle*) [arg1 qt]);
	return self;
}

- (QStyle*) setStyleFromString: (NSString *)arg1
{
static qt_QString * _qstring_arg1 = 0L;
	return (QStyle*) [QtSupport objectForQtKey: qt_QWidget_setStyle1((qt_QWidget *)[self qt], (qt_QString *) [arg1 toQString: &_qstring_arg1]) withClass: [QStyle class] allocatedInObjcWorld: YES];
}

- (BOOL) isTopLevel
{
	return (BOOL) qt_QWidget_isTopLevel((qt_QWidget *)[self qt]);
}

- (BOOL) isDialog
{
	return (BOOL) qt_QWidget_isDialog((qt_QWidget *)[self qt]);
}

- (BOOL) isPopup
{
	return (BOOL) qt_QWidget_isPopup((qt_QWidget *)[self qt]);
}

- (BOOL) isDesktop
{
	return (BOOL) qt_QWidget_isDesktop((qt_QWidget *)[self qt]);
}

- (BOOL) isModal
{
	return (BOOL) qt_QWidget_isModal((qt_QWidget *)[self qt]);
}

- (BOOL) isEnabled
{
	return (BOOL) qt_QWidget_isEnabled((qt_QWidget *)[self qt]);
}

- (BOOL) isEnabledTo: (QWidget *)arg1
{
	return (BOOL) qt_QWidget_isEnabledTo((qt_QWidget *)[self qt], (qt_QWidget *) [arg1 qt]);
}

- (BOOL) isEnabledToTLW
{
	return (BOOL) qt_QWidget_isEnabledToTLW((qt_QWidget *)[self qt]);
}

- (QRect*) frameGeometry
{
	return (QRect*) [QtSupport objectForQtKey: qt_QWidget_frameGeometry((qt_QWidget *)[self qt]) withClass: [QRect class] allocatedInObjcWorld: YES];
}

- (QRect*) geometry
{
	return (QRect*) [QtSupport objectForQtKey: qt_QWidget_geometry((qt_QWidget *)[self qt]) withClass: [QRect class] allocatedInObjcWorld: YES];
}

- (int) x
{
	return (int) qt_QWidget_x((qt_QWidget *)[self qt]);
}

- (int) y
{
	return (int) qt_QWidget_y((qt_QWidget *)[self qt]);
}

- (QPoint*) pos
{
	return (QPoint*) [QtSupport objectForQtKey: qt_QWidget_pos((qt_QWidget *)[self qt]) withClass: [QPoint class] allocatedInObjcWorld: YES];
}

- (QSize*) frameSize
{
	return (QSize*) [QtSupport objectForQtKey: qt_QWidget_frameSize((qt_QWidget *)[self qt]) withClass: [QSize class] allocatedInObjcWorld: YES];
}

- (QSize*) size
{
	return (QSize*) [QtSupport objectForQtKey: qt_QWidget_size((qt_QWidget *)[self qt]) withClass: [QSize class] allocatedInObjcWorld: YES];
}

- (int) width
{
	return (int) qt_QWidget_width((qt_QWidget *)[self qt]);
}

- (int) height
{
	return (int) qt_QWidget_height((qt_QWidget *)[self qt]);
}

- (QRect*) rect
{
	return (QRect*) [QtSupport objectForQtKey: qt_QWidget_rect((qt_QWidget *)[self qt]) withClass: [QRect class] allocatedInObjcWorld: YES];
}

- (QRect*) childrenRect
{
	return (QRect*) [QtSupport objectForQtKey: qt_QWidget_childrenRect((qt_QWidget *)[self qt]) withClass: [QRect class] allocatedInObjcWorld: YES];
}

- (QRegion*) childrenRegion
{
	return (QRegion*) [QtSupport objectForQtKey: qt_QWidget_childrenRegion((qt_QWidget *)[self qt]) withClass: [QRegion class] allocatedInObjcWorld: YES];
}

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

- (QSize*) maximumSize
{
	return (QSize*) [QtSupport objectForQtKey: qt_QWidget_maximumSize((qt_QWidget *)[self qt]) withClass: [QSize class] allocatedInObjcWorld: YES];
}

- (int) minimumWidth
{
	return (int) qt_QWidget_minimumWidth((qt_QWidget *)[self qt]);
}

- (int) minimumHeight
{
	return (int) qt_QWidget_minimumHeight((qt_QWidget *)[self qt]);
}

- (int) maximumWidth
{
	return (int) qt_QWidget_maximumWidth((qt_QWidget *)[self qt]);
}

- (int) maximumHeight
{
	return (int) qt_QWidget_maximumHeight((qt_QWidget *)[self qt]);
}

- setMinimumSize: (QSize *)arg1
{
	qt_QWidget_setMinimumSize((qt_QWidget *)[self qt], (qt_QSize *) [arg1 qt]);
	return self;
}

- setMinimumSize: (int)minw minh: (int)minh
{
	qt_QWidget_setMinimumSize1((qt_QWidget *)[self qt], (int)minw, (int)minh);
	return self;
}

- setMaximumSize: (QSize *)arg1
{
	qt_QWidget_setMaximumSize((qt_QWidget *)[self qt], (qt_QSize *) [arg1 qt]);
	return self;
}

- setMaximumSize: (int)maxw maxh: (int)maxh
{
	qt_QWidget_setMaximumSize1((qt_QWidget *)[self qt], (int)maxw, (int)maxh);
	return self;
}

- setMinimumWidth: (int)minw
{
	qt_QWidget_setMinimumWidth((qt_QWidget *)[self qt], (int)minw);
	return self;
}

- setMinimumHeight: (int)minh
{
	qt_QWidget_setMinimumHeight((qt_QWidget *)[self qt], (int)minh);
	return self;
}

- setMaximumWidth: (int)maxw
{
	qt_QWidget_setMaximumWidth((qt_QWidget *)[self qt], (int)maxw);
	return self;
}

- setMaximumHeight: (int)maxh
{
	qt_QWidget_setMaximumHeight((qt_QWidget *)[self qt], (int)maxh);
	return self;
}

- (QSize*) sizeIncrement
{
	return (QSize*) [QtSupport objectForQtKey: qt_QWidget_sizeIncrement((qt_QWidget *)[self qt]) withClass: [QSize class] allocatedInObjcWorld: YES];
}

- setSizeIncrement: (QSize *)arg1
{
	qt_QWidget_setSizeIncrement((qt_QWidget *)[self qt], (qt_QSize *) [arg1 qt]);
	return self;
}

- setSizeIncrement: (int)w h: (int)h
{
	qt_QWidget_setSizeIncrement1((qt_QWidget *)[self qt], (int)w, (int)h);
	return self;
}

- (QSize*) baseSize
{
	return (QSize*) [QtSupport objectForQtKey: qt_QWidget_baseSize((qt_QWidget *)[self qt]) withClass: [QSize class] allocatedInObjcWorld: YES];
}

- setBaseSize: (QSize *)arg1
{
	qt_QWidget_setBaseSize((qt_QWidget *)[self qt], (qt_QSize *) [arg1 qt]);
	return self;
}

- setBaseSize: (int)basew baseh: (int)baseh
{
	qt_QWidget_setBaseSize1((qt_QWidget *)[self qt], (int)basew, (int)baseh);
	return self;
}

- setFixedSize: (QSize *)arg1
{
	qt_QWidget_setFixedSize((qt_QWidget *)[self qt], (qt_QSize *) [arg1 qt]);
	return self;
}

- setFixedSize: (int)w h: (int)h
{
	qt_QWidget_setFixedSize1((qt_QWidget *)[self qt], (int)w, (int)h);
	return self;
}

- setFixedWidth: (int)w
{
	qt_QWidget_setFixedWidth((qt_QWidget *)[self qt], (int)w);
	return self;
}

- setFixedHeight: (int)h
{
	qt_QWidget_setFixedHeight((qt_QWidget *)[self qt], (int)h);
	return self;
}

- (QPoint*) mapToGlobal: (QPoint*)arg1
{
	return (QPoint*) [QtSupport objectForQtKey: qt_QWidget_mapToGlobal((qt_QWidget *)[self qt], (qt_QPoint*) [arg1 qt]) withClass: [QPoint class] allocatedInObjcWorld: YES];
}

- (QPoint*) mapFromGlobal: (QPoint*)arg1
{
	return (QPoint*) [QtSupport objectForQtKey: qt_QWidget_mapFromGlobal((qt_QWidget *)[self qt], (qt_QPoint*) [arg1 qt]) withClass: [QPoint class] allocatedInObjcWorld: YES];
}

- (QPoint*) mapToParent: (QPoint*)arg1
{
	return (QPoint*) [QtSupport objectForQtKey: qt_QWidget_mapToParent((qt_QWidget *)[self qt], (qt_QPoint*) [arg1 qt]) withClass: [QPoint class] allocatedInObjcWorld: YES];
}

- (QPoint*) mapFromParent: (QPoint*)arg1
{
	return (QPoint*) [QtSupport objectForQtKey: qt_QWidget_mapFromParent((qt_QWidget *)[self qt], (qt_QPoint*) [arg1 qt]) withClass: [QPoint class] allocatedInObjcWorld: YES];
}

- (QPoint*) mapTo: (QWidget *)arg1 point: (QPoint*)arg2
{
	return (QPoint*) [QtSupport objectForQtKey: qt_QWidget_mapTo((qt_QWidget *)[self qt], (qt_QWidget *) [arg1 qt], (qt_QPoint*) [arg2 qt]) withClass: [QPoint class] allocatedInObjcWorld: YES];
}

- (QPoint*) mapFrom: (QWidget *)arg1 point: (QPoint*)arg2
{
	return (QPoint*) [QtSupport objectForQtKey: qt_QWidget_mapFrom((qt_QWidget *)[self qt], (qt_QWidget *) [arg1 qt], (qt_QPoint*) [arg2 qt]) withClass: [QPoint class] allocatedInObjcWorld: YES];
}

- (QWidget*) topLevelWidget
{
	return (QWidget*) [QtSupport objectForQtKey: qt_QWidget_topLevelWidget((qt_QWidget *)[self qt]) withClass: [QWidget class] allocatedInObjcWorld: YES];
}

- (int) backgroundMode
{
	return (int) qt_QWidget_backgroundMode((qt_QWidget *)[self qt]);
}

- setBackgroundMode: (int)arg1
{
	qt_QWidget_setBackgroundMode((qt_QWidget *)[self qt], (int)arg1);
	return self;
}

- setBackgroundMode: (int)arg1 int: (int)arg2
{
	qt_QWidget_setBackgroundMode1((qt_QWidget *)[self qt], (int)arg1, (int)arg2);
	return self;
}

- (QColor*) foregroundColor
{
	return (QColor*) [QtSupport objectForQtKey: qt_QWidget_foregroundColor((qt_QWidget *)[self qt]) withClass: [QColor class] allocatedInObjcWorld: YES];
}

- (QColor*) eraseColor
{
	return (QColor*) [QtSupport objectForQtKey: qt_QWidget_eraseColor((qt_QWidget *)[self qt]) withClass: [QColor class] allocatedInObjcWorld: YES];
}

- setEraseColor: (QColor *)arg1
{
	qt_QWidget_setEraseColor((qt_QWidget *)[self qt], (qt_QColor *) [arg1 qt]);
	return self;
}

- (QPixmap*) erasePixmap
{
	return (QPixmap*) [QtSupport objectForQtKey: qt_QWidget_erasePixmap((qt_QWidget *)[self qt]) withClass: [QPixmap class] allocatedInObjcWorld: YES];
}

- setErasePixmap: (QPixmap *)arg1
{
	qt_QWidget_setErasePixmap((qt_QWidget *)[self qt], (qt_QPixmap *) [arg1 qt]);
	return self;
}

- (QColorGroup*) colorGroup
{
	return (QColorGroup*) [QtSupport objectForQtKey: qt_QWidget_colorGroup((qt_QWidget *)[self qt]) withClass: [QColorGroup class] allocatedInObjcWorld: YES];
}

- (QPalette*) palette
{
	return (QPalette*) [QtSupport objectForQtKey: qt_QWidget_palette((qt_QWidget *)[self qt]) withClass: [QPalette class] allocatedInObjcWorld: YES];
}

- (BOOL) ownPalette
{
	return (BOOL) qt_QWidget_ownPalette((qt_QWidget *)[self qt]);
}

- setPalette: (QPalette *)arg1
{
	qt_QWidget_setPalette((qt_QWidget *)[self qt], (qt_QPalette *) [arg1 qt]);
	return self;
}

- unsetPalette
{
	qt_QWidget_unsetPalette((qt_QWidget *)[self qt]);
	return self;
}

- (QColor*) paletteForegroundColor
{
	return (QColor*) [QtSupport objectForQtKey: qt_QWidget_paletteForegroundColor((qt_QWidget *)[self qt]) withClass: [QColor class] allocatedInObjcWorld: YES];
}

- setPaletteForegroundColor: (QColor *)arg1
{
	qt_QWidget_setPaletteForegroundColor((qt_QWidget *)[self qt], (qt_QColor *) [arg1 qt]);
	return self;
}

- (QColor*) paletteBackgroundColor
{
	return (QColor*) [QtSupport objectForQtKey: qt_QWidget_paletteBackgroundColor((qt_QWidget *)[self qt]) withClass: [QColor class] allocatedInObjcWorld: YES];
}

- setPaletteBackgroundColor: (QColor *)arg1
{
	qt_QWidget_setPaletteBackgroundColor((qt_QWidget *)[self qt], (qt_QColor *) [arg1 qt]);
	return self;
}

- (QPixmap*) paletteBackgroundPixmap
{
	return (QPixmap*) [QtSupport objectForQtKey: qt_QWidget_paletteBackgroundPixmap((qt_QWidget *)[self qt]) withClass: [QPixmap class] allocatedInObjcWorld: YES];
}

- setPaletteBackgroundPixmap: (QPixmap *)arg1
{
	qt_QWidget_setPaletteBackgroundPixmap((qt_QWidget *)[self qt], (qt_QPixmap *) [arg1 qt]);
	return self;
}

- (QBrush*) backgroundBrush
{
	return (QBrush*) [QtSupport objectForQtKey: qt_QWidget_backgroundBrush((qt_QWidget *)[self qt]) withClass: [QBrush class] allocatedInObjcWorld: YES];
}

- (QFont*) font
{
	return (QFont*) [QtSupport objectForQtKey: qt_QWidget_font((qt_QWidget *)[self qt]) withClass: [QFont class] allocatedInObjcWorld: YES];
}

- (BOOL) ownFont
{
	return (BOOL) qt_QWidget_ownFont((qt_QWidget *)[self qt]);
}

- setFont: (QFont *)arg1
{
	qt_QWidget_setFont((qt_QWidget *)[self qt], (qt_QFont *) [arg1 qt]);
	return self;
}

- unsetFont
{
	qt_QWidget_unsetFont((qt_QWidget *)[self qt]);
	return self;
}

- (QFontMetrics*) fontMetrics
{
	return (QFontMetrics*) [QtSupport objectForQtKey: qt_QWidget_fontMetrics((qt_QWidget *)[self qt]) withClass: [QFontMetrics class] allocatedInObjcWorld: YES];
}

- (QFontInfo*) fontInfo
{
	return (QFontInfo*) [QtSupport objectForQtKey: qt_QWidget_fontInfo((qt_QWidget *)[self qt]) withClass: [QFontInfo class] allocatedInObjcWorld: YES];
}

- (QCursor*) cursor
{
	return (QCursor*) [QtSupport objectForQtKey: qt_QWidget_cursor((qt_QWidget *)[self qt]) withClass: [QCursor class] allocatedInObjcWorld: YES];
}

- (BOOL) ownCursor
{
	return (BOOL) qt_QWidget_ownCursor((qt_QWidget *)[self qt]);
}

- setCursor: (QCursor *)arg1
{
	qt_QWidget_setCursor((qt_QWidget *)[self qt], (qt_QCursor *) [arg1 qt]);
	return self;
}

- unsetCursor
{
	qt_QWidget_unsetCursor((qt_QWidget *)[self qt]);
	return self;
}

- (NSString *) caption
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QWidget_caption((qt_QWidget *)[self qt]);
	return [NSString fromQString: _qstring];
}

- (QPixmap*) icon
{
	return (QPixmap*) [QtSupport objectForQtKey: qt_QWidget_icon((qt_QWidget *)[self qt]) withClass: [QPixmap class] allocatedInObjcWorld: YES];
}

- (NSString *) iconText
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QWidget_iconText((qt_QWidget *)[self qt]);
	return [NSString fromQString: _qstring];
}

- (BOOL) hasMouseTracking
{
	return (BOOL) qt_QWidget_hasMouseTracking((qt_QWidget *)[self qt]);
}

- (BOOL) hasMouse
{
	return (BOOL) qt_QWidget_hasMouse((qt_QWidget *)[self qt]);
}

- setMask: (QBitmap *)arg1
{
	qt_QWidget_setMask((qt_QWidget *)[self qt], (qt_QBitmap *) [arg1 qt]);
	return self;
}

- setRegionMask: (QRegion *)arg1
{
	qt_QWidget_setMask1((qt_QWidget *)[self qt], (qt_QRegion *) [arg1 qt]);
	return self;
}

- clearMask
{
	qt_QWidget_clearMask((qt_QWidget *)[self qt]);
	return self;
}

- (QColor*) backgroundColor
{
	return (QColor*) [QtSupport objectForQtKey: qt_QWidget_backgroundColor((qt_QWidget *)[self qt]) withClass: [QColor class] allocatedInObjcWorld: YES];
}

- setBackgroundColor: (QColor *)arg1
{
	qt_QWidget_setBackgroundColor((qt_QWidget *)[self qt], (qt_QColor *) [arg1 qt]);
	return self;
}

- (QPixmap*) backgroundPixmap
{
	return (QPixmap*) [QtSupport objectForQtKey: qt_QWidget_backgroundPixmap((qt_QWidget *)[self qt]) withClass: [QPixmap class] allocatedInObjcWorld: YES];
}

- setBackgroundPixmap: (QPixmap *)arg1
{
	qt_QWidget_setBackgroundPixmap((qt_QWidget *)[self qt], (qt_QPixmap *) [arg1 qt]);
	return self;
}

- (BOOL) isActiveWindow
{
	return (BOOL) qt_QWidget_isActiveWindow((qt_QWidget *)[self qt]);
}

- setActiveWindow
{
	qt_QWidget_setActiveWindow((qt_QWidget *)[self qt]);
	return self;
}

- (BOOL) isFocusEnabled
{
	return (BOOL) qt_QWidget_isFocusEnabled((qt_QWidget *)[self qt]);
}

- (int) focusPolicy
{
	return (int) qt_QWidget_focusPolicy((qt_QWidget *)[self qt]);
}

- setFocusPolicy: (int)arg1
{
	qt_QWidget_setFocusPolicy((qt_QWidget *)[self qt], (int)arg1);
	return self;
}

- (BOOL) hasFocus
{
	return (BOOL) qt_QWidget_hasFocus((qt_QWidget *)[self qt]);
}

- setFocusProxy: (QWidget *)arg1
{
	qt_QWidget_setFocusProxy((qt_QWidget *)[self qt], (qt_QWidget *) [arg1 qt]);
	return self;
}

- (QWidget*) focusProxy
{
	return (QWidget*) [QtSupport objectForQtKey: qt_QWidget_focusProxy((qt_QWidget *)[self qt]) withClass: [QWidget class] allocatedInObjcWorld: YES];
}

- grabMouse
{
	qt_QWidget_grabMouse((qt_QWidget *)[self qt]);
	return self;
}

- grabMouse: (QCursor *)arg1
{
	qt_QWidget_grabMouse1((qt_QWidget *)[self qt], (qt_QCursor *) [arg1 qt]);
	return self;
}

- releaseMouse
{
	qt_QWidget_releaseMouse((qt_QWidget *)[self qt]);
	return self;
}

- grabKeyboard
{
	qt_QWidget_grabKeyboard((qt_QWidget *)[self qt]);
	return self;
}

- releaseKeyboard
{
	qt_QWidget_releaseKeyboard((qt_QWidget *)[self qt]);
	return self;
}

- (BOOL) isUpdatesEnabled
{
	return (BOOL) qt_QWidget_isUpdatesEnabled((qt_QWidget *)[self qt]);
}

//- repaintUnclipped: (QRegion *)arg1 erase: (BOOL)erase
//{
//	qt_QWidget_repaintUnclipped((qt_QWidget *)[self qt], (qt_QRegion *) [arg1 qt], (int)erase);
//	return self;
//}

//- repaintUnclipped: (QRegion *)arg1
//{
//	qt_QWidget_repaintUnclipped((qt_QWidget *)[self qt], (qt_QRegion *) [arg1 qt], 1);
//	return self;
//}

- (BOOL) close: (BOOL)alsoDelete
{
	return (BOOL) qt_QWidget_close((qt_QWidget *)[self qt], (int)alsoDelete);
}

- (BOOL) isVisible
{
	return (BOOL) qt_QWidget_isVisible((qt_QWidget *)[self qt]);
}

- (BOOL) isVisibleTo: (QWidget *)arg1
{
	return (BOOL) qt_QWidget_isVisibleTo((qt_QWidget *)[self qt], (qt_QWidget *) [arg1 qt]);
}

- (BOOL) isVisibleToTLW
{
	return (BOOL) qt_QWidget_isVisibleToTLW((qt_QWidget *)[self qt]);
}

- (QRect*) visibleRect
{
	return (QRect*) [QtSupport objectForQtKey: qt_QWidget_visibleRect((qt_QWidget *)[self qt]) withClass: [QRect class] allocatedInObjcWorld: YES];
}

- (BOOL) isHidden
{
	return (BOOL) qt_QWidget_isHidden((qt_QWidget *)[self qt]);
}

- (BOOL) isMinimized
{
	return (BOOL) qt_QWidget_isMinimized((qt_QWidget *)[self qt]);
}

- (BOOL) isMaximized
{
	return (BOOL) qt_QWidget_isMaximized((qt_QWidget *)[self qt]);
}

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

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

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

- setSizePolicy: (QSizePolicy*)arg1
{
	qt_QWidget_setSizePolicy((qt_QWidget *)[self qt], (qt_QSizePolicy*) [arg1 qt]);
	return self;
}

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

- adjustSize
{
	qt_QWidget_adjustSize((qt_QWidget *)[self qt]);
	return self;
}

- (QLayout*) layout
{
	return (QLayout*) [QtSupport objectForQtKey: qt_QWidget_layout((qt_QWidget *)[self qt]) withClass: [QLayout class] allocatedInObjcWorld: YES];
}

- updateGeometry
{
	qt_QWidget_updateGeometry((qt_QWidget *)[self qt]);
	return self;
}

- reparent: (QWidget *)parent int: (int)arg1 point: (QPoint*)arg2 showIt: (BOOL)showIt
{
	qt_QWidget_reparent((qt_QWidget *)[self qt], (qt_QWidget *) [parent qt], (int)arg1, (qt_QPoint*) [arg2 qt], (int)showIt);
	return self;
}

- reparent: (QWidget *)parent int: (int)arg1 point: (QPoint*)arg2 
{
	qt_QWidget_reparent((qt_QWidget *)[self qt], (qt_QWidget *) [parent qt], (int)arg1, (qt_QPoint*) [arg2 qt], 0);
	return self;
}

- reparent: (QWidget *)parent point: (QPoint*)arg1 showIt: (BOOL)showIt
{
	qt_QWidget_reparent1((qt_QWidget *)[self qt], (qt_QWidget *) [parent qt], (qt_QPoint*) [arg1 qt], (int)showIt);
	return self;
}

- reparent: (QWidget *)parent point: (QPoint*)arg1 
{
	qt_QWidget_reparent1((qt_QWidget *)[self qt], (qt_QWidget *) [parent qt], (qt_QPoint*) [arg1 qt], 0);
	return self;
}

- recreate: (QWidget *)parent f: (int)f p: (QPoint*)p showIt: (BOOL)showIt
{
	qt_QWidget_recreate((qt_QWidget *)[self qt], (qt_QWidget *) [parent qt], (int)f, (qt_QPoint*) [p qt], (int)showIt);
	return self;
}

- recreate: (QWidget *)parent f: (int)f p: (QPoint*)p 
{
	qt_QWidget_recreate((qt_QWidget *)[self qt], (qt_QWidget *) [parent qt], (int)f, (qt_QPoint*) [p qt], 0);
	return self;
}

- erase
{
	qt_QWidget_erase((qt_QWidget *)[self qt]);
	return self;
}

- erase: (int)x y: (int)y w: (int)w h: (int)h
{
	qt_QWidget_erase1((qt_QWidget *)[self qt], (int)x, (int)y, (int)w, (int)h);
	return self;
}

- erase: (QRect*)arg1
{
	qt_QWidget_erase2((qt_QWidget *)[self qt], (qt_QRect*) [arg1 qt]);
	return self;
}

- eraseRegion: (QRegion *)arg1
{
	qt_QWidget_erase3((qt_QWidget *)[self qt], (qt_QRegion *) [arg1 qt]);
	return self;
}

- scroll: (int)dx dy: (int)dy
{
	qt_QWidget_scroll((qt_QWidget *)[self qt], (int)dx, (int)dy);
	return self;
}

- scroll: (int)dx dy: (int)dy rect: (QRect*)arg1
{
	qt_QWidget_scroll1((qt_QWidget *)[self qt], (int)dx, (int)dy, (qt_QRect*) [arg1 qt]);
	return self;
}

- drawText: (int)x y: (int)y string: (NSString *)arg1
{
static qt_QString * _qstring_arg1 = 0L;
	qt_QWidget_drawText((qt_QWidget *)[self qt], (int)x, (int)y, (qt_QString *) [arg1 toQString: &_qstring_arg1]);
	return self;
}

- drawText: (QPoint*)arg1 string: (NSString *)arg2
{
static qt_QString * _qstring_arg2 = 0L;
	qt_QWidget_drawText1((qt_QWidget *)[self qt], (qt_QPoint*) [arg1 qt], (qt_QString *) [arg2 toQString: &_qstring_arg2]);
	return self;
}

- (QWidget*) focusWidget
{
	return (QWidget*) [QtSupport objectForQtKey: qt_QWidget_focusWidget((qt_QWidget *)[self qt]) withClass: [QWidget class] allocatedInObjcWorld: YES];
}

- (QRect*) microFocusHint
{
	return (QRect*) [QtSupport objectForQtKey: qt_QWidget_microFocusHint((qt_QWidget *)[self qt]) withClass: [QRect class] allocatedInObjcWorld: YES];
}

- (BOOL) acceptDrops
{
	return (BOOL) qt_QWidget_acceptDrops((qt_QWidget *)[self qt]);
}

- setAcceptDrops: (BOOL)on
{
	qt_QWidget_setAcceptDrops((qt_QWidget *)[self qt], (int)on);
	return self;
}

- setAutoMask: (BOOL)arg1
{
	qt_QWidget_setAutoMask((qt_QWidget *)[self qt], (int)arg1);
	return self;
}

- (BOOL) autoMask
{
	return (BOOL) qt_QWidget_autoMask((qt_QWidget *)[self qt]);
}

- setBackgroundOrigin: (int)arg1
{
	qt_QWidget_setBackgroundOrigin((qt_QWidget *)[self qt], (int)arg1);
	return self;
}

- (int) backgroundOrigin
{
	return (int) qt_QWidget_backgroundOrigin((qt_QWidget *)[self qt]);
}

- (BOOL) customWhatsThis
{
	return (BOOL) qt_QWidget_customWhatsThis((qt_QWidget *)[self qt]);
}

- (QWidget*) parentWidget: (BOOL)sameWindow
{
	return (QWidget*) [QtSupport objectForQtKey: qt_QWidget_parentWidget((qt_QWidget *)[self qt], (int)sameWindow) withClass: [QWidget class] allocatedInObjcWorld: YES];
}

- (QWidget*) parentWidget
{
	return (QWidget*) [QtSupport objectForQtKey: qt_QWidget_parentWidget((qt_QWidget *)[self qt], 0) withClass: [QWidget class] allocatedInObjcWorld: YES];
}

- (int) testWState: (int)s
{
	return (int) qt_QWidget_testWState((qt_QWidget *)[self qt], (int)s);
}

- (int) testWFlags: (int)f
{
	return (int) qt_QWidget_testWFlags((qt_QWidget *)[self qt], (int)f);
}

- (QWidget*) childAt: (int)x y: (int)y includeThis: (BOOL)includeThis
{
	return (QWidget*) [QtSupport objectForQtKey: qt_QWidget_childAt((qt_QWidget *)[self qt], (int)x, (int)y, (int)includeThis) withClass: [QWidget class] allocatedInObjcWorld: YES];
}

- (QWidget*) childAt: (int)x y: (int)y 
{
	return (QWidget*) [QtSupport objectForQtKey: qt_QWidget_childAt((qt_QWidget *)[self qt], (int)x, (int)y, 0) withClass: [QWidget class] allocatedInObjcWorld: YES];
}

- (QWidget*) childAt: (QPoint*)arg1 includeThis: (BOOL)includeThis
{
	return (QWidget*) [QtSupport objectForQtKey: qt_QWidget_childAt1((qt_QWidget *)[self qt], (qt_QPoint*) [arg1 qt], (int)includeThis) withClass: [QWidget class] allocatedInObjcWorld: YES];
}

- (QWidget*) childAt: (QPoint*)arg1 
{
	return (QWidget*) [QtSupport objectForQtKey: qt_QWidget_childAt1((qt_QWidget *)[self qt], (qt_QPoint*) [arg1 qt], 0) withClass: [QWidget class] allocatedInObjcWorld: YES];
}

//- (QGfx*) graphicsContext: (BOOL)clip_children
//{
//	return (QGfx*) [QtSupport objectForQtKey: qt_QWidget_graphicsContext((qt_QWidget *)[self qt], (int)clip_children) withClass: [QGfx class] allocatedInObjcWorld: YES];
//}

//- (QGfx*) graphicsContext
//{
//	return (QGfx*) [QtSupport objectForQtKey: qt_QWidget_graphicsContext((qt_QWidget *)[self qt], 1) withClass: [QGfx class] allocatedInObjcWorld: YES];
//}

//- (QRegion*) clippedRegion: (BOOL)do_children
//{
//	return (QRegion*) [QtSupport objectForQtKey: qt_QWidget_clippedRegion((qt_QWidget *)[self qt], (int)do_children) withClass: [QRegion class] allocatedInObjcWorld: YES];
//}

//- (QRegion*) clippedRegion
//{
//	return (QRegion*) [QtSupport objectForQtKey: qt_QWidget_clippedRegion((qt_QWidget *)[self qt], 1) withClass: [QRegion class] allocatedInObjcWorld: YES];
//}

//- macCGClippedContext: (BOOL)do_children
//{
//	qt_QWidget_macCGClippedContext((qt_QWidget *)[self qt], (int)do_children);
//	return self;
//}

//- macCGClippedContext
//{
//	qt_QWidget_macCGClippedContext((qt_QWidget *)[self qt], 1);
//	return self;
//}

- setPalette: (QPalette *)p bool: (BOOL)arg1
{
	qt_QWidget_setPalette1((qt_QWidget *)[self qt], (qt_QPalette *) [p qt], (int)arg1);
	return self;
}

- setFont: (QFont *)f bool: (BOOL)arg1
{
	qt_QWidget_setFont1((qt_QWidget *)[self qt], (qt_QFont *) [f qt], (int)arg1);
	return self;
}

- setEnabled: (BOOL)arg1
{
	qt_QWidget_setEnabled((qt_QWidget *)[self qt], (int)arg1);
	return self;
}

- setDisabled: (BOOL)arg1
{
	qt_QWidget_setDisabled((qt_QWidget *)[self qt], (int)arg1);
	return self;
}

- setCaption: (NSString *)arg1
{
static qt_QString * _qstring_arg1 = 0L;
	qt_QWidget_setCaption((qt_QWidget *)[self qt], (qt_QString *) [arg1 toQString: &_qstring_arg1]);
	return self;
}

- setIcon: (QPixmap *)arg1
{
	qt_QWidget_setIcon((qt_QWidget *)[self qt], (qt_QPixmap *) [arg1 qt]);
	return self;
}

- setIconText: (NSString *)arg1
{
static qt_QString * _qstring_arg1 = 0L;
	qt_QWidget_setIconText((qt_QWidget *)[self qt], (qt_QString *) [arg1 toQString: &_qstring_arg1]);
	return self;
}

- setMouseTracking: (BOOL)enable
{
	qt_QWidget_setMouseTracking((qt_QWidget *)[self qt], (int)enable);
	return self;
}

- setFocus
{
	qt_QWidget_setFocus((qt_QWidget *)[self qt]);
	return self;
}

- clearFocus
{
	qt_QWidget_clearFocus((qt_QWidget *)[self qt]);
	return self;
}

- setUpdatesEnabled: (BOOL)enable
{
	qt_QWidget_setUpdatesEnabled((qt_QWidget *)[self qt], (int)enable);
	return self;
}

- update
{
	qt_QWidget_update((qt_QWidget *)[self qt]);
	return self;
}

- update: (int)x y: (int)y w: (int)w h: (int)h
{
	qt_QWidget_update1((qt_QWidget *)[self qt], (int)x, (int)y, (int)w, (int)h);
	return self;
}

- update: (QRect*)arg1
{
	qt_QWidget_update2((qt_QWidget *)[self qt], (qt_QRect*) [arg1 qt]);
	return self;
}

- repaint
{
	qt_QWidget_repaint((qt_QWidget *)[self qt]);
	return self;
}

- repaint: (BOOL)erase
{
	qt_QWidget_repaint1((qt_QWidget *)[self qt], (int)erase);
	return self;
}

- repaint: (int)x y: (int)y w: (int)w h: (int)h erase: (BOOL)erase
{
	qt_QWidget_repaint2((qt_QWidget *)[self qt], (int)x, (int)y, (int)w, (int)h, (int)erase);
	return self;
}

- repaint: (int)x y: (int)y w: (int)w h: (int)h 
{
	qt_QWidget_repaint2((qt_QWidget *)[self qt], (int)x, (int)y, (int)w, (int)h, 1);
	return self;
}

- repaintRect: (QRect*)arg1 erase: (BOOL)erase
{
	qt_QWidget_repaint3((qt_QWidget *)[self qt], (qt_QRect*) [arg1 qt], (int)erase);
	return self;
}

- repaintRect: (QRect*)arg1
{
	qt_QWidget_repaint3((qt_QWidget *)[self qt], (qt_QRect*) [arg1 qt], 1);
	return self;
}

- repaintRegion: (QRegion *)arg1 erase: (BOOL)erase
{
	qt_QWidget_repaint4((qt_QWidget *)[self qt], (qt_QRegion *) [arg1 qt], (int)erase);
	return self;
}

- repaintRegion: (QRegion *)arg1
{
	qt_QWidget_repaint4((qt_QWidget *)[self qt], (qt_QRegion *) [arg1 qt], 1);
	return self;
}

- show
{
	qt_QWidget_show((qt_QWidget *)[self qt]);
	return self;
}

- hide
{
	qt_QWidget_hide((qt_QWidget *)[self qt]);
	return self;
}

- iconify
{
	qt_QWidget_iconify((qt_QWidget *)[self qt]);
	return self;
}

- showMinimized
{
	qt_QWidget_showMinimized((qt_QWidget *)[self qt]);
	return self;
}

- showMaximized
{
	qt_QWidget_showMaximized((qt_QWidget *)[self qt]);
	return self;
}

- showFullScreen
{
	qt_QWidget_showFullScreen((qt_QWidget *)[self qt]);
	return self;
}

- showNormal
{
	qt_QWidget_showNormal((qt_QWidget *)[self qt]);
	return self;
}

- polish
{
	qt_QWidget_polish((qt_QWidget *)[self qt]);
	return self;
}

- constPolish
{
	qt_QWidget_constPolish((qt_QWidget *)[self qt]);
	return self;
}

- (BOOL) close
{
	return (BOOL) qt_QWidget_close1((qt_QWidget *)[self qt]);
}

- raise
{
	qt_QWidget_raise((qt_QWidget *)[self qt]);
	return self;
}

- lower
{
	qt_QWidget_lower((qt_QWidget *)[self qt]);
	return self;
}

- stackUnder: (QWidget *)arg1
{
	qt_QWidget_stackUnder((qt_QWidget *)[self qt], (qt_QWidget *) [arg1 qt]);
	return self;
}

- move: (int)x y: (int)y
{
	qt_QWidget_move((qt_QWidget *)[self qt], (int)x, (int)y);
	return self;
}

- move: (QPoint*)arg1
{
	qt_QWidget_move1((qt_QWidget *)[self qt], (qt_QPoint*) [arg1 qt]);
	return self;
}

- resize: (int)w h: (int)h
{
	qt_QWidget_resize((qt_QWidget *)[self qt], (int)w, (int)h);
	return self;
}

- resize: (QSize *)arg1
{
	qt_QWidget_resize1((qt_QWidget *)[self qt], (qt_QSize *) [arg1 qt]);
	return self;
}

- setGeometry: (int)x y: (int)y w: (int)w h: (int)h
{
	qt_QWidget_setGeometry((qt_QWidget *)[self qt], (int)x, (int)y, (int)w, (int)h);
	return self;
}

- setGeometry: (QRect*)arg1
{
	qt_QWidget_setGeometry1((qt_QWidget *)[self qt], (qt_QRect*) [arg1 qt]);
	return self;
}

+ setTabOrder: (QWidget *)arg1 widget: (QWidget *)arg2
{
	qt_QWidget_setTabOrder((qt_QWidget *) [arg1 qt], (qt_QWidget *) [arg2 qt]);
	return self;
}

+ (QWidget*) mouseGrabber
{
	return (QWidget*) [QtSupport objectForQtKey: qt_QWidget_mouseGrabber() withClass: [QWidget class] allocatedInObjcWorld: YES];
}

+ (QWidget*) keyboardGrabber
{
	return (QWidget*) [QtSupport objectForQtKey: qt_QWidget_keyboardGrabber() withClass: [QWidget class] allocatedInObjcWorld: YES];
}

+ (QWidget*) find: (unsigned int)arg1
{
	return (QWidget*) [QtSupport objectForQtKey: qt_QWidget_find((unsigned int)arg1) withClass: [QWidget class] allocatedInObjcWorld: YES];
}

//+ (QWidgetMapper*) wmapper
//{
//	return (QWidgetMapper*) [QtSupport objectForQtKey: qt_QWidget_wmapper() withClass: [QWidgetMapper class] allocatedInObjcWorld: YES];
//}

- (BOOL) event: (QEvent *)arg1
{
	return (BOOL) qt_QWidget_event((qt_QWidget *)[self qt], (qt_QEvent *) [arg1 qt]);
}

//- (unsigned char*) scanLine: (int)arg1
//{
//	return (unsigned char*) qt_QWidget_scanLine((qt_QWidget *)[self qt], (int)arg1);
//}

//- (int) bytesPerLine
//{
//	return (int) qt_QWidget_bytesPerLine((qt_QWidget *)[self qt]);
//}

- updateMask
{
	qt_QWidget_updateMask((qt_QWidget *)[self qt]);
	return self;
}

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

- enabledChange: (BOOL)oldEnabled
{
	qt_QWidget_enabledChange((qt_QWidget *)[self qt], (int)oldEnabled);
	return self;
}

- paletteChange: (QPalette *)arg1
{
	qt_QWidget_paletteChange((qt_QWidget *)[self qt], (qt_QPalette *) [arg1 qt]);
	return self;
}

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

- windowActivationChange: (BOOL)oldActive
{
	qt_QWidget_windowActivationChange((qt_QWidget *)[self qt], (int)oldActive);
	return self;
}

- (int) metric: (int)arg1
{
	return (int) qt_QWidget_metric((qt_QWidget *)[self qt], (int)arg1);
}

- resetInputContext
{
	qt_QWidget_resetInputContext((qt_QWidget *)[self qt]);
	return self;
}

- create: (unsigned int)arg1 initializeWindow: (BOOL)initializeWindow destroyOldWindow: (BOOL)destroyOldWindow
{
	qt_QWidget_create((qt_QWidget *)[self qt], (unsigned int)arg1, (int)initializeWindow, (int)destroyOldWindow);
	return self;
}

- create
{
	qt_QWidget_create((qt_QWidget *)[self qt], 0, 1, 1);
	return self;
}

- destroy: (BOOL)destroyWindow destroySubWindows: (BOOL)destroySubWindows
{
	qt_QWidget_destroy((qt_QWidget *)[self qt], (int)destroyWindow, (int)destroySubWindows);
	return self;
}

- destroy
{
	qt_QWidget_destroy((qt_QWidget *)[self qt], 1, 1);
	return self;
}

- (unsigned int) getWState
{
	return (unsigned int) qt_QWidget_getWState((qt_QWidget *)[self qt]);
}

- setWState: (unsigned int)arg1
{
	qt_QWidget_setWState((qt_QWidget *)[self qt], (unsigned int)arg1);
	return self;
}

- clearWState: (unsigned int)n
{
	qt_QWidget_clearWState((qt_QWidget *)[self qt], (unsigned int)n);
	return self;
}

- (int) getWFlags
{
	return (int) qt_QWidget_getWFlags((qt_QWidget *)[self qt]);
}

- setWFlags: (int)arg1
{
	qt_QWidget_setWFlags((qt_QWidget *)[self qt], (int)arg1);
	return self;
}

- clearWFlags: (int)n
{
	qt_QWidget_clearWFlags((qt_QWidget *)[self qt], (int)n);
	return self;
}

- (BOOL) focusNextPrevChild: (BOOL)next
{
	return (BOOL) qt_QWidget_focusNextPrevChild((qt_QWidget *)[self qt], (int)next);
}

//- (QWExtra*) extraData
//{
//	return (QWExtra*) [QtSupport objectForQtKey: qt_QWidget_extraData((qt_QWidget *)[self qt]) withClass: [QWExtra class] allocatedInObjcWorld: YES];
//}

//- (QTLWExtra*) topData
//{
//	return (QTLWExtra*) [QtSupport objectForQtKey: qt_QWidget_topData((qt_QWidget *)[self qt]) withClass: [QTLWExtra class] allocatedInObjcWorld: YES];
//}

- (QFocusData*) focusData
{
	return (QFocusData*) [QtSupport objectForQtKey: qt_QWidget_focusData((qt_QWidget *)[self qt]) withClass: [QFocusData class] allocatedInObjcWorld: YES];
}

- setKeyCompression: (BOOL)arg1
{
	qt_QWidget_setKeyCompression((qt_QWidget *)[self qt], (int)arg1);
	return self;
}

- setMicroFocusHint: (int)x y: (int)y w: (int)w h: (int)h text: (BOOL)text f: (QFont *)f
{
	qt_QWidget_setMicroFocusHint((qt_QWidget *)[self qt], (int)x, (int)y, (int)w, (int)h, (int)text, (qt_QFont *) [f qt]);
	return self;
}

- setMicroFocusHint: (int)x y: (int)y w: (int)w h: (int)h 
{
	qt_QWidget_setMicroFocusHint((qt_QWidget *)[self qt], (int)x, (int)y, (int)w, (int)h, 1, 0);
	return self;
}

//- dirtyClippedRegion: (BOOL)arg1
//{
//	qt_QWidget_dirtyClippedRegion((qt_QWidget *)[self qt], (int)arg1);
//	return self;
//}

//- (BOOL) isClippedRegionDirty
//{
//	return (BOOL) qt_QWidget_isClippedRegionDirty((qt_QWidget *)[self qt]);
//}

+ (int) NoFocus
{
	return (int) QWIDGET_NoFocus;
}

+ (int) TabFocus
{
	return (int) QWIDGET_TabFocus;
}

+ (int) ClickFocus
{
	return (int) QWIDGET_ClickFocus;
}

+ (int) StrongFocus
{
	return (int) QWIDGET_StrongFocus;
}

+ (int) WheelFocus
{
	return (int) QWIDGET_WheelFocus;
}

+ (int) WidgetOrigin
{
	return (int) QWIDGET_WidgetOrigin;
}

+ (int) ParentOrigin
{
	return (int) QWIDGET_ParentOrigin;
}

+ (int) WindowOrigin
{
	return (int) QWIDGET_WindowOrigin;
}

@end

@implementation QWidget (QPaintDeviceImplementation)
- (int) devType
{
	return (int) qt_QPaintDevice_devType((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]));
}

- (BOOL) isExtDev
{
	return (BOOL) qt_QPaintDevice_isExtDev((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]));
}

- (BOOL) paintingActive
{
	return (BOOL) qt_QPaintDevice_paintingActive((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]));
}

//- (*) handle
//{
//	return (*) qt_QPaintDevice_handle((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]));
//}

//- (unsigned int) handle
//{
//	return (unsigned int) qt_QPaintDevice_handle1((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]));
//}

//- (unsigned int) handle
//{
//	return (unsigned int) qt_QPaintDevice_handle2((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]));
//}

//- (unsigned int) handle
//{
//	return (unsigned int) qt_QPaintDevice_handle3((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]));
//}

//- (Display*) x11Display
//{
//	return (Display*) qt_QPaintDevice_x11Display((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]));
//}

- (int) x11Screen
{
	return (int) qt_QPaintDevice_x11Screen((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]));
}

- (int) x11Depth
{
	return (int) qt_QPaintDevice_x11Depth((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]));
}

- (int) x11Cells
{
	return (int) qt_QPaintDevice_x11Cells((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]));
}

//- (int) x11Colormap
//{
//	return (unsigned int) qt_QPaintDevice_x11Colormap((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]));
//}

- (BOOL) x11DefaultColormap
{
	return (BOOL) qt_QPaintDevice_x11DefaultColormap((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]));
}

//- (*) x11Visual
//{
//	return (*) qt_QPaintDevice_x11Visual((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]));
//}

- (BOOL) x11DefaultVisual
{
	return (BOOL) qt_QPaintDevice_x11DefaultVisual((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]));
}

//- (unsigned char*) scanLine: (int)arg1
//{
//	return (unsigned char*) qt_QPaintDevice_scanLine((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]), (int)arg1);
//}

//- (int) bytesPerLine
//{
//	return (int) qt_QPaintDevice_bytesPerLine((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]));
//}

//- (QGfx*) graphicsContext
//{
//	return (QGfx*) [QtSupport objectForQtKey: qt_QPaintDevice_graphicsContext((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt])) withClass: [QGfx class]];
//}

//+ (Display*) x11AppDisplay
//{
//	return (Display*) qt_QPaintDevice_x11AppDisplay();
//}

//+ (int) x11AppScreen
//{
//	return (int) qt_QPaintDevice_x11AppScreen();
//}

//+ (int) x11AppDepth
//{
//	return (int) qt_QPaintDevice_x11AppDepth();
//}

//+ (int) x11AppCells
//{
//	return (int) qt_QPaintDevice_x11AppCells();
//}

//+ (int) x11AppDpiX
//{
//	return (int) qt_QPaintDevice_x11AppDpiX();
//}

//+ (int) x11AppDpiY
//{
//	return (int) qt_QPaintDevice_x11AppDpiY();
//}

//+ (unsigned int) x11AppColormap
//{
//	return (unsigned int) qt_QPaintDevice_x11AppColormap();
//}

//+ (BOOL) x11AppDefaultColormap
//{
//	return (BOOL) qt_QPaintDevice_x11AppDefaultColormap();
//}

//+ (*) x11AppVisual
//{
//	return (*) qt_QPaintDevice_x11AppVisual();
//}

+ (BOOL) x11AppDefaultVisual
{
	return (BOOL) qt_QPaintDevice_x11AppDefaultVisual();
}

+ x11SetAppDpiX: (int)arg1
{
	qt_QPaintDevice_x11SetAppDpiX((int)arg1);
	return self;
}

+ x11SetAppDpiY: (int)arg1
{
	qt_QPaintDevice_x11SetAppDpiY((int)arg1);
	return self;
}

//+ (QWSDisplay*) qwsDisplay
//{
//	return (QWSDisplay*) [QtSupport objectForQtKey: qt_QPaintDevice_qwsDisplay() withClass: [QWSDisplay class]];
//}

- initWithUnsigned: (unsigned int)devflags
{
	if (qt_QWidget_QPaintDevice([self qt]) == NULL) {
		[self setQt: qt_new_QPaintDevice((unsigned int)devflags)];
		[QtSupport setObject: self forQtKey: qt_QWidget_QPaintDevice([self qt])];
	}
	[super init];
	return self;
}

- copyX11Data: (QPaintDevice *)arg1
{
	qt_QPaintDevice_copyX11Data((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]), (qt_QPaintDevice *) [arg1 qt]);
	return self;
}

//- setX11Data: (QPaintDeviceX11Data*)arg1
//{
//	qt_QPaintDevice_setX11Data((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]), (qt_QPaintDeviceX11Data*) [arg1 qt]);
//	return self;
//}

//- (QPaintDeviceX11Data*) getX11Data: (BOOL)def
//{
//	return (QPaintDeviceX11Data*) [QtSupport objectForQtKey: qt_QPaintDevice_getX11Data((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]), (int)def) withClass: [QPaintDeviceX11Data class]];
//}

//- (QPaintDeviceX11Data*) getX11Data
//{
//	return (QPaintDeviceX11Data*) [QtSupport objectForQtKey: qt_QPaintDevice_getX11Data((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]), 0) withClass: [QPaintDeviceX11Data class]];
//}

//- fixport
//{
//	qt_QPaintDevice_fixport((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]));
//	return self;
//}

//- (BOOL) cmd: (int)arg1 painter: (QPainter *)arg2 pdevcmdparam: (QPDevCmdParam*)arg3
//{
//	return (BOOL) qt_QPaintDevice_cmd((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]), (int)arg1, (qt_QPainter *) [arg2 qt], (qt_QPDevCmdParam*) [arg3 qt]);
//}

- (int) metric: (int)arg1
{
	return (int) qt_QPaintDevice_metric((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]), (int)arg1);
}

- (int) fontMet: (QFont *)arg1 int: (int)arg2 string: (NSString *)arg3 int: (int)arg4
{
	return (int) qt_QPaintDevice_fontMet((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]), (qt_QFont *) [arg1 qt], (int)arg2, (char*) [arg3 cString], (int)arg4);
}

- (int) fontMet: (QFont *)arg1 int: (int)arg2
{
	return (int) qt_QPaintDevice_fontMet((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]), (qt_QFont *) [arg1 qt], (int)arg2, 0, 0);
}

- (int) fontInf: (QFont *)arg1 int: (int)arg2
{
	return (int) qt_QPaintDevice_fontInf((qt_QPaintDevice *)qt_QWidget_QPaintDevice([self qt]), (qt_QFont *) [arg1 qt], (int)arg2);
}

- (void *) paintDevice
{
	return qt_QWidget_QPaintDevice([self qt]);
}

@end
