//******************************************************************************
//  Copyright (c) 2005-2011 by Jan Van hijfte
//
//  See the included file COPYING.TXT for details about the copyright.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//******************************************************************************


#include "qpagesetupdialog_c.h"

QPageSetupDialogH QPageSetupDialog_create(QPrinterH printer, QWidgetH parent)
{
	return (QPageSetupDialogH) new QPageSetupDialog((QPrinter*)printer, (QWidget*)parent);
}

void QPageSetupDialog_destroy(QPageSetupDialogH handle)
{
	delete (QPageSetupDialog *)handle;
}

QPageSetupDialogH QPageSetupDialog_create2(QWidgetH parent)
{
	return (QPageSetupDialogH) new QPageSetupDialog((QWidget*)parent);
}

void QPageSetupDialog_addEnabledOption(QPageSetupDialogH handle, QPageSetupDialog::PageSetupDialogOption option)
{
	((QPageSetupDialog *)handle)->addEnabledOption(option);
}

void QPageSetupDialog_setEnabledOptions(QPageSetupDialogH handle, unsigned int options)
{
	((QPageSetupDialog *)handle)->setEnabledOptions((QPageSetupDialog::PageSetupDialogOptions)options);
}

unsigned int QPageSetupDialog_enabledOptions(QPageSetupDialogH handle)
{
	return (unsigned int) ((QPageSetupDialog *)handle)->enabledOptions();
}

bool QPageSetupDialog_isOptionEnabled(QPageSetupDialogH handle, QPageSetupDialog::PageSetupDialogOption option)
{
	return (bool) ((QPageSetupDialog *)handle)->isOptionEnabled(option);
}

void QPageSetupDialog_setOption(QPageSetupDialogH handle, QPageSetupDialog::PageSetupDialogOption option, bool on)
{
	((QPageSetupDialog *)handle)->setOption(option, on);
}

bool QPageSetupDialog_testOption(QPageSetupDialogH handle, QPageSetupDialog::PageSetupDialogOption option)
{
	return (bool) ((QPageSetupDialog *)handle)->testOption(option);
}

void QPageSetupDialog_setOptions(QPageSetupDialogH handle, unsigned int options)
{
	((QPageSetupDialog *)handle)->setOptions((QPageSetupDialog::PageSetupDialogOptions)options);
}

unsigned int QPageSetupDialog_options(QPageSetupDialogH handle)
{
	return (unsigned int) ((QPageSetupDialog *)handle)->options();
}

int QPageSetupDialog_exec(QPageSetupDialogH handle)
{
	return (int) ((QPageSetupDialog *)handle)->exec();
}

void QPageSetupDialog_open(QPageSetupDialogH handle, QObjectH receiver, const char* member)
{
	((QPageSetupDialog *)handle)->open((QObject*)receiver, member);
}

#if defined DARWIN
void QPageSetupDialog_setVisible(QPageSetupDialogH handle, bool visible)
{
	((QPageSetupDialog *)handle)->setVisible(visible);
}

#endif
