#import "QtWidget.h"
#import "helpers.h"
#include <QIcon>
#include <QLocale>
@implementation QtWidget
+ (void)initialize
{
if (self == [QtWidget class])
[self inheritMethodsFromClass: [QtPaintDevice class]];
}
- initWithQWidget: (QWidget*)qWidget
{
return [super initWithQObject: qWidget];
}
- (QWidget*)qWidget
{
return qobject_cast<QWidget*>(_qObject);
}
- (bool)acceptDrops
{
return [self qWidget]->acceptDrops();
}
- (void)setAcceptDrops: (bool)acceptDrops
{
[self qWidget]->setAcceptDrops(acceptDrops);
}
- (OFString*)accessibleDescription
{
return QToOFString([self qWidget]->accessibleDescription());
}
- (void)setAccessibleDescription: (OFString*)accessibleDescription
{
[self qWidget]->setAccessibleDescription(
OFToQString(accessibleDescription));
}
- (OFString*)accessibleName
{
return QToOFString([self qWidget]->accessibleName());
}
- (void)setAccessibleName: (OFString*)accessibleName
{
[self qWidget]->setAccessibleName(OFToQString(accessibleName));
}
- (bool)autoFillBackground
{
return [self qWidget]->autoFillBackground();
}
- (void)setAutoFillBackground: (bool)autoFillBackground
{
[self qWidget]->setAutoFillBackground(autoFillBackground);
}
- (of_dimension_t)baseSize
{
return QToOFDimension([self qWidget]->baseSize());
}
- (void)setBaseSize: (of_dimension_t)baseSize
{
[self qWidget]->setBaseSize(OFToQSize(baseSize));
}
- (of_rectangle_t)childrenRect
{
return QToOFRectangle([self qWidget]->childrenRect());
}
- (QRegion)childrenRegion
{
return [self qWidget]->childrenRegion();
}
- (Qt::ContextMenuPolicy)contextMenuPolicy
{
return [self qWidget]->contextMenuPolicy();
}
- (void)setContextMenuPolicy: (Qt::ContextMenuPolicy)contextMenuPolicy
{
[self qWidget]->setContextMenuPolicy(contextMenuPolicy);
}
- (QCursor)cursor
{
return [self qWidget]->cursor();
}
- (void)setCursor: (QCursor)cursor
{
[self qWidget]->setCursor(cursor);
}
- (void)unsetCursor
{
[self qWidget]->unsetCursor();
}
- (bool)isEnabled
{
return [self qWidget]->isEnabled();
}
- (void)setEnabled: (bool)enabled
{
[self qWidget]->setEnabled(enabled);
}
- (bool)hasFocus
{
return [self qWidget]->hasFocus();
}
- (Qt::FocusPolicy)focusPolicy
{
return [self qWidget]->focusPolicy();
}
- (void)setFocusPolicy: (Qt::FocusPolicy)focusPolicy
{
[self qWidget]->setFocusPolicy(focusPolicy);
}
- (const QFont&)font
{
return [self qWidget]->font();
}
- (void)setFont: (const QFont&)font
{
[self qWidget]->setFont(font);
}
- (of_rectangle_t)frameGeometry
{
return QToOFRectangle([self qWidget]->frameGeometry());
}
- (of_dimension_t)frameSize
{
return QToOFDimension([self qWidget]->frameSize());
}
- (bool)isFullScreen
{
return [self qWidget]->isFullScreen();
}
- (of_rectangle_t)geometry
{
return QToOFRectangle([self qWidget]->geometry());
}
- (void)setGeometry: (of_rectangle_t)geometry
{
[self qWidget]->setGeometry(OFToQRect(geometry));
}
- (int)height
{
return [self qWidget]->height();
}
- (Qt::InputMethodHints)inputMethodHints
{
return [self qWidget]->inputMethodHints();
}
- (void)setInputMethodHints: (Qt::InputMethodHints)inputMethodHints
{
[self qWidget]->setInputMethodHints(inputMethodHints);
}
- (bool)isActiveWindow
{
return [self qWidget]->isActiveWindow();
}
- (Qt::LayoutDirection)layoutDirection
{
return [self qWidget]->layoutDirection();
}
- (void)setLayoutDirection: (Qt::LayoutDirection)layoutDirection
{
[self qWidget]->setLayoutDirection(layoutDirection);
}
- (void)unsetLayoutDirection
{
[self qWidget]->unsetLayoutDirection();
}
- (QLocale)locale
{
return [self qWidget]->locale();
}
- (void)setLocale: (QLocale)locale
{
[self qWidget]->setLocale(locale);
}
- (void)unsetLocale
{
[self qWidget]->unsetLocale();
}
- (bool)isMaximized
{
return [self qWidget]->isMaximized();
}
- (int)maximumHeight
{
return [self qWidget]->maximumHeight();
}
- (void)setMaximumHeight: (int)maximumHeight
{
[self qWidget]->setMaximumHeight(maximumHeight);
}
- (of_dimension_t)maximumSize
{
return QToOFDimension([self qWidget]->maximumSize());
}
- (void)setMaximumSize: (of_dimension_t)maximumSize
{
[self qWidget]->setMaximumSize(OFToQSize(maximumSize));
}
- (int)maximumWidth
{
return [self qWidget]->maximumWidth();
}
- (void)setMaximumWidth: (int)maximumWidth
{
[self qWidget]->setMaximumWidth(maximumWidth);
}
- (bool)isMinimized
{
return [self qWidget]->isMinimized();
}
- (int)minimumHeight
{
return [self qWidget]->minimumHeight();
}
- (void)setMinimumHeight: (int)minimumHeight
{
[self qWidget]->setMinimumHeight(minimumHeight);
}
- (of_dimension_t)minimumSize
{
return QToOFDimension([self qWidget]->minimumSize());
}
- (void)setMinimumSize: (of_dimension_t)minimumSize
{
[self qWidget]->setMinimumSize(OFToQSize(minimumSize));
}
- (of_dimension_t)minimumSizeHint
{
return QToOFDimension([self qWidget]->minimumSizeHint());
}
- (int)minimumWidth
{
return [self qWidget]->minimumWidth();
}
- (void)setMinimumWidth: (int)minimumWidth
{
[self qWidget]->setMinimumWidth(minimumWidth);
}
- (bool)isModal
{
return [self qWidget]->isModal();
}
- (bool)hasMouseTracking
{
return [self qWidget]->hasMouseTracking();
}
- (void)setMouseTracking: (bool)mouseTracking
{
[self qWidget]->setMouseTracking(mouseTracking);
}
- (of_rectangle_t)normalGeometry
{
return QToOFRectangle([self qWidget]->normalGeometry());
}
- (const QPalette&)palette
{
return [self qWidget]->palette();
}
- (void)setPalette: (const QPalette&)palette
{
[self qWidget]->setPalette(palette);
}
- (of_point_t)pos
{
return QToOFPoint([self qWidget]->pos());
}
- (void)moveToPosition: (of_point_t)pos
{
[self qWidget]->move(OFToQPoint(pos));
}
- (of_rectangle_t)rect
{
return QToOFRectangle([self qWidget]->rect());
}
- (of_dimension_t)size
{
return QToOFDimension([self qWidget]->size());
}
- (void)resizeTo: (of_dimension_t)size
{
[self qWidget]->resize(OFToQSize(size));
}
- (of_dimension_t)sizeHint
{
return QToOFDimension([self qWidget]->sizeHint());
}
- (of_dimension_t)sizeIncrement
{
return QToOFDimension([self qWidget]->sizeIncrement());
}
- (void)setSizeIncrement: (of_dimension_t)sizeIncrement
{
[self qWidget]->setSizeIncrement(OFToQSize(sizeIncrement));
}
- (QSizePolicy)sizePolicy
{
return [self qWidget]->sizePolicy();
}
- (void)setSizePolicy: (QSizePolicy)sizePolicy
{
[self qWidget]->setSizePolicy(sizePolicy);
}
- (OFString*)statusTip
{
return QToOFString([self qWidget]->statusTip());
}
- (void)setStatusTip: (OFString*)statusTip
{
[self qWidget]->setStatusTip(OFToQString(statusTip));
}
- (OFString*)styleSheet
{
return QToOFString([self qWidget]->styleSheet());
}
- (void)setStyleSheet: (OFString*)styleSheet
{
[self qWidget]->setStyleSheet(OFToQString(styleSheet));
}
- (OFString*)toolTip
{
return QToOFString([self qWidget]->toolTip());
}
- (void)setToolTip: (OFString*)toolTip
{
[self qWidget]->setToolTip(OFToQString(toolTip));
}
- (int)toolTipDuration
{
return [self qWidget]->toolTipDuration();
}
- (void)setToolTipDuration: (int)toolTipDuration
{
[self qWidget]->setToolTipDuration(toolTipDuration);
}
- (bool)updatesEnabled
{
return [self qWidget]->updatesEnabled();
}
- (void)setUpdatesEnabled: (bool)updatesEnabled
{
[self qWidget]->setUpdatesEnabled(updatesEnabled);
}
- (bool)isVisible
{
return [self qWidget]->isVisible();
}
- (void)setVisible: (bool)visible
{
[self qWidget]->setVisible(visible);
}
- (OFString*)whatsThis
{
return QToOFString([self qWidget]->whatsThis());
}
- (void)setWhatsThis: (OFString*)whatsThis
{
[self qWidget]->setWhatsThis(OFToQString(whatsThis));
}
- (int)width
{
return [self qWidget]->width();
}
- (OFString*)windowFilePath
{
return QToOFString([self qWidget]->windowFilePath());
}
- (void)setWindowFilePath: (OFString*)windowFilePath
{
[self qWidget]->setWindowFilePath(OFToQString(windowFilePath));
}
- (Qt::WindowFlags)windowFlags
{
return [self qWidget]->windowFlags();
}
- (void)setWindowFlags: (Qt::WindowFlags)windowFlags
{
[self qWidget]->setWindowFlags(windowFlags);
}
- (QIcon)windowIcon
{
return [self qWidget]->windowIcon();
}
- (void)setWindowIcon: (QIcon)windowIcon
{
[self qWidget]->setWindowIcon(windowIcon);
}
- (Qt::WindowModality)windowModality
{
return [self qWidget]->windowModality();
}
- (void)setWindowModality: (Qt::WindowModality)windowModality
{
[self qWidget]->setWindowModality(windowModality);
}
- (bool)isWindowModified
{
return [self qWidget]->isWindowModified();
}
- (void)setWindowModified: (bool)windowModified
{
[self qWidget]->setWindowModified(windowModified);
}
- (double)windowOpacity
{
return [self qWidget]->windowOpacity();
}
- (void)setWindowOpacity: (double)windowOpacity
{
[self qWidget]->setWindowOpacity(windowOpacity);
}
- (OFString*)windowTitle
{
return QToOFString([self qWidget]->windowTitle());
}
- (void)setWindowTitle: (OFString*)windowTitle
{
[self qWidget]->setWindowTitle(OFToQString(windowTitle));
}
- (int)x
{
return [self qWidget]->x();
}
- (int)y
{
return [self qWidget]->y();
}
@end