
#include <qapplication.h>
#include <qwidget.h>
#include <qgridlayout.h>
#include <qlabel.h>
#include <QMacCocoaViewContainer>
#import <Appkit/Appkit.h>

int main( int argc, char **argv )
{
	QApplication app( argc, argv );
	
	QWidget *w = new QWidget;

	QGridLayout *layout = new QGridLayout( w );
	
	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
	for ( int i = 0; i < 4; ++i )
	{
		QLabel *l;
		QMacCocoaViewContainer *ccv;
		NSTextField *tf;
		int fontSize = 12 + i * 2;
		
		l = new QLabel( "Qt Helvetica Neue:" );
		layout->addWidget( l, i*2, 0 );
		l = new QLabel( "The quick brown fox jumps over the lazy dog." );
		l->setFont( QFont( "Helvetica Neue", fontSize ) );
		layout->addWidget( l, i*2, 1 );
		
		l = new QLabel( "Cocoa Helvetica Neue:" );
		layout->addWidget( l, i*2+1, 0 );
		
		ccv = new QMacCocoaViewContainer( 0, w );
		ccv->setMinimumSize(320, 30);
	    tf = [[NSTextField alloc] initWithFrame : NSMakeRect(0, 0, 300, 50)];
	    [tf setEditable:NO];
	    [tf setBezeled:NO];
	    [tf setDrawsBackground:NO];
	    [tf setFont:[NSFont fontWithName:@"Helvetica Neue" size:fontSize]];
	    [tf setStringValue:@"The quick brown fox jumps over the lazy dog."];
    
	    ccv->setCocoaView( tf );

	    [tf release];
		layout->addWidget( ccv, i*2+1, 1 );
	}
	[pool release];
	
	w->show();
	
	return app.exec();
}