/***************************************************************************
                            qt_QSGIStyle.cpp -  description
                             -------------------
    begin                : Tue Nov 20 20:51:20 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Tue Nov 20 20:51:20 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.                       *
 *                                                                         *
 ***************************************************************************/

extern "C" {
#include "qt_QSGIStyle.h"
}

#include <qsgistyle.h>

class QSGIStyleBridge : public QSGIStyle
{
public:
	QSGIStyleBridge(bool useHighlightCols) : QSGIStyle(useHighlightCols) {}
	~QSGIStyleBridge() {}
	bool  protected_eventFilter(QObject* arg1, QEvent* arg2) {
		return (bool ) QSGIStyle::eventFilter(arg1, arg2);
	}
	void childEvent(QChildEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "childEvent", arg1, "QChildEvent")) {
			QObject::childEvent(arg1);
		}
		return;
	}
	void customEvent(QCustomEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "customEvent", arg1, "QCustomEvent")) {
			QObject::customEvent(arg1);
		}
		return;
	}
	void timerEvent(QTimerEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "timerEvent", arg1, "QTimerEvent")) {
			QObject::timerEvent(arg1);
		}
		return;
	}
};

qt_QSGIStyle * qt_new_QSGIStyle(int useHighlightCols){
	return (qt_QSGIStyle *) new QSGIStyleBridge((bool)useHighlightCols);
}
void qt_del_QSGIStyle( qt_QSGIStyle* p ){
	delete (QSGIStyleBridge*) p;
}
void qt_QSGIStyle_polish( qt_QSGIStyle* instPointer,qt_QWidget * arg1){
	((QSGIStyleBridge*)instPointer)->polish((QWidget*)arg1);
	return;
}
void qt_QSGIStyle_unPolish( qt_QSGIStyle* instPointer,qt_QWidget * arg1){
	((QSGIStyleBridge*)instPointer)->unPolish((QWidget*)arg1);
	return;
}
void qt_QSGIStyle_polish1( qt_QSGIStyle* instPointer,qt_QApplication* arg1){
	((QSGIStyleBridge*)instPointer)->polish((QApplication*)arg1);
	return;
}
void qt_QSGIStyle_unPolish1( qt_QSGIStyle* instPointer,qt_QApplication* arg1){
	((QSGIStyleBridge*)instPointer)->unPolish((QApplication*)arg1);
	return;
}
void qt_QSGIStyle_drawPrimitive( qt_QSGIStyle* instPointer,int pe, qt_QPainter * p, qt_QRect* r, qt_QColorGroup * cg, int flags, int arg1){
	((QSGIStyleBridge*)instPointer)->drawPrimitive((QStyle::PrimitiveElement)pe, (QPainter*)p, (QRect&)* (QRect*)r, (QColorGroup&)* (QColorGroup*)cg, (QStyle::SFlags)flags, (QStyleOption&)arg1);
	return;
}
void qt_QSGIStyle_drawControl( qt_QSGIStyle* instPointer,int element, qt_QPainter * p, qt_QWidget * widget, qt_QRect* r, qt_QColorGroup * cg, int how, int arg1){
	((QSGIStyleBridge*)instPointer)->drawControl((QStyle::ControlElement)element, (QPainter*)p, (QWidget*)widget, (QRect&)* (QRect*)r, (QColorGroup&)* (QColorGroup*)cg, (QStyle::SFlags)how, (QStyleOption&)arg1);
	return;
}
void qt_QSGIStyle_drawComplexControl( qt_QSGIStyle* instPointer,int control, qt_QPainter * p, qt_QWidget * widget, qt_QRect* r, qt_QColorGroup * cg, int how, int sub, int subActive, int arg1){
	((QSGIStyleBridge*)instPointer)->drawComplexControl((QStyle::ComplexControl)control, (QPainter*)p, (QWidget*)widget, (QRect&)* (QRect*)r, (QColorGroup&)* (QColorGroup*)cg, (QStyle::SFlags)how, (QStyle::SCFlags)sub, (QStyle::SCFlags)subActive, (QStyleOption&)arg1);
	return;
}
int qt_QSGIStyle_pixelMetric( qt_QSGIStyle* instPointer,int metric, qt_QWidget * widget){
	return (int) ((QSGIStyleBridge*)instPointer)->pixelMetric((QStyle::PixelMetric)metric, (QWidget*)widget);
}
qt_QSize * qt_QSGIStyle_sizeFromContents( qt_QSGIStyle* instPointer,int contents, qt_QWidget * widget, qt_QSize * contentsSize, int arg1){
	QSize _s= ((QSGIStyleBridge*)instPointer)->sizeFromContents((QStyle::ContentsType)contents, (QWidget*)widget, (QSize&)* (QSize*)contentsSize, (QStyleOption&)arg1);
	return (qt_QSize *)new QSize(_s.width(),_s.height());
}
qt_QRect* qt_QSGIStyle_subRect( qt_QSGIStyle* instPointer,int r, qt_QWidget * widget){
	QRect _r= ((QSGIStyleBridge*)instPointer)->subRect((QStyle::SubRect)r, (QWidget*)widget);
	return (qt_QRect*)new QRect(_r.left(),_r.top(),_r.width(),_r.height());
}
qt_QRect* qt_QSGIStyle_querySubControlMetrics( qt_QSGIStyle* instPointer,int control, qt_QWidget * widget, int sc, int arg1){
	QRect _r= ((QSGIStyleBridge*)instPointer)->querySubControlMetrics((QStyle::ComplexControl)control, (QWidget*)widget, (QStyle::SubControl)sc, (QStyleOption&)arg1);
	return (qt_QRect*)new QRect(_r.left(),_r.top(),_r.width(),_r.height());
}
int qt_QSGIStyle_eventFilter( qt_QSGIStyle* instPointer,qt_QObject * arg1, qt_QEvent * arg2){
	return (int) ((QSGIStyleBridge*)instPointer)->protected_eventFilter((QObject*)arg1, (QEvent*)arg2);
}
