Add toOF() / toQt() for easy conversion
This commit is contained in:
parent
1d907ed62d
commit
53410c810f
6 changed files with 78 additions and 82 deletions
|
@ -21,18 +21,17 @@
|
||||||
|
|
||||||
- (OFString*)applicationName
|
- (OFString*)applicationName
|
||||||
{
|
{
|
||||||
return QToOFString([self qCoreApplication]->applicationName());
|
return toOF([self qCoreApplication]->applicationName());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setApplicationName: (OFString*)applicationName
|
- (void)setApplicationName: (OFString*)applicationName
|
||||||
{
|
{
|
||||||
[self qCoreApplication]->setApplicationName(
|
[self qCoreApplication]->setApplicationName(toQt(applicationName));
|
||||||
OFToQString(applicationName));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (OFString*)applicationVersion
|
- (OFString*)applicationVersion
|
||||||
{
|
{
|
||||||
return QToOFString([self qCoreApplication]->applicationVersion());
|
return toOF([self qCoreApplication]->applicationVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)installNativeEventFilter: (QAbstractNativeEventFilter*)filterObject
|
- (void)installNativeEventFilter: (QAbstractNativeEventFilter*)filterObject
|
||||||
|
@ -43,29 +42,28 @@
|
||||||
- (void)setApplicationVersion: (OFString*)applicationVersion
|
- (void)setApplicationVersion: (OFString*)applicationVersion
|
||||||
{
|
{
|
||||||
[self qCoreApplication]->setApplicationVersion(
|
[self qCoreApplication]->setApplicationVersion(
|
||||||
OFToQString(applicationVersion));
|
toQt(applicationVersion));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (OFString*)organizationDomain
|
- (OFString*)organizationDomain
|
||||||
{
|
{
|
||||||
return QToOFString([self qCoreApplication]->organizationDomain());
|
return toOF([self qCoreApplication]->organizationDomain());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setOrganizationDomain: (OFString*)organizationDomain
|
- (void)setOrganizationDomain: (OFString*)organizationDomain
|
||||||
{
|
{
|
||||||
[self qCoreApplication]->setOrganizationDomain(
|
[self qCoreApplication]->setOrganizationDomain(
|
||||||
OFToQString(organizationDomain));
|
toQt(organizationDomain));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (OFString*)organizationName
|
- (OFString*)organizationName
|
||||||
{
|
{
|
||||||
return QToOFString([self qCoreApplication]->organizationName());
|
return toOF([self qCoreApplication]->organizationName());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setOrganizationName: (OFString*)organizationName
|
- (void)setOrganizationName: (OFString*)organizationName
|
||||||
{
|
{
|
||||||
[self qCoreApplication]->setOrganizationName(
|
[self qCoreApplication]->setOrganizationName(toQt(organizationName));
|
||||||
OFToQString(organizationName));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)quit
|
- (void)quit
|
||||||
|
|
|
@ -45,12 +45,12 @@
|
||||||
|
|
||||||
- (OFString*)objectName
|
- (OFString*)objectName
|
||||||
{
|
{
|
||||||
return QToOFString(_qObject->objectName());
|
return toOF(_qObject->objectName());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setObjectName: (OFString*)objectName
|
- (void)setObjectName: (OFString*)objectName
|
||||||
{
|
{
|
||||||
_qObject->setObjectName(OFToQString(objectName));
|
_qObject->setObjectName(toQt(objectName));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (bool)setBlockSignals: (bool)block
|
- (bool)setBlockSignals: (bool)block
|
||||||
|
|
|
@ -22,24 +22,23 @@
|
||||||
|
|
||||||
- (OFString*)applicationDisplayName
|
- (OFString*)applicationDisplayName
|
||||||
{
|
{
|
||||||
return QToOFString([self qGuiApplication]->applicationDisplayName());
|
return toOF([self qGuiApplication]->applicationDisplayName());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setApplicationDisplayName: (OFString*)applicationDisplayName
|
- (void)setApplicationDisplayName: (OFString*)applicationDisplayName
|
||||||
{
|
{
|
||||||
[self qGuiApplication]->setApplicationDisplayName(
|
[self qGuiApplication]->setApplicationDisplayName(
|
||||||
OFToQString(applicationDisplayName));
|
toQt(applicationDisplayName));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (OFString*)desktopFileName
|
- (OFString*)desktopFileName
|
||||||
{
|
{
|
||||||
return QToOFString([self qGuiApplication]->desktopFileName());
|
return toOF([self qGuiApplication]->desktopFileName());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setDesktopFileName: (OFString*)desktopFileName
|
- (void)setDesktopFileName: (OFString*)desktopFileName
|
||||||
{
|
{
|
||||||
[self qGuiApplication]->setDesktopFileName(
|
[self qGuiApplication]->setDesktopFileName(toQt(desktopFileName));
|
||||||
OFToQString(desktopFileName));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (double)devicePixelRatio
|
- (double)devicePixelRatio
|
||||||
|
@ -69,7 +68,7 @@
|
||||||
|
|
||||||
- (OFString*)platformName
|
- (OFString*)platformName
|
||||||
{
|
{
|
||||||
return QToOFString([self qGuiApplication]->platformName());
|
return toOF([self qGuiApplication]->platformName());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (QScreen*)primaryScreen
|
- (QScreen*)primaryScreen
|
||||||
|
@ -90,12 +89,12 @@
|
||||||
|
|
||||||
- (OFString*)sessionID
|
- (OFString*)sessionID
|
||||||
{
|
{
|
||||||
return QToOFString([self qGuiApplication]->sessionId());
|
return toOF([self qGuiApplication]->sessionId());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (OFString*)sessionKey
|
- (OFString*)sessionKey
|
||||||
{
|
{
|
||||||
return QToOFString([self qGuiApplication]->sessionKey());
|
return toOF([self qGuiApplication]->sessionKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (QIcon)windowIcon
|
- (QIcon)windowIcon
|
||||||
|
|
|
@ -50,12 +50,12 @@
|
||||||
|
|
||||||
- (of_dimension_t)globalStrut
|
- (of_dimension_t)globalStrut
|
||||||
{
|
{
|
||||||
return QToOFDimension([self qApplication]->globalStrut());
|
return toOF([self qApplication]->globalStrut());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setGlobalStrut: (of_dimension_t)globalStrut
|
- (void)setGlobalStrut: (of_dimension_t)globalStrut
|
||||||
{
|
{
|
||||||
[self qApplication]->setGlobalStrut(OFToQSize(globalStrut));
|
[self qApplication]->setGlobalStrut(toQt(globalStrut));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int)keyboardInputInterval
|
- (int)keyboardInputInterval
|
||||||
|
@ -90,12 +90,12 @@
|
||||||
|
|
||||||
- (OFString*)styleSheet
|
- (OFString*)styleSheet
|
||||||
{
|
{
|
||||||
return QToOFString([self qApplication]->styleSheet());
|
return toOF([self qApplication]->styleSheet());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setStyleSheet: (OFString*)styleSheet
|
- (void)setStyleSheet: (OFString*)styleSheet
|
||||||
{
|
{
|
||||||
[self qApplication]->setStyleSheet(OFToQString(styleSheet));
|
[self qApplication]->setStyleSheet(toQt(styleSheet));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int)wheelScrollLines
|
- (int)wheelScrollLines
|
||||||
|
|
|
@ -34,23 +34,22 @@
|
||||||
|
|
||||||
- (OFString*)accessibleDescription
|
- (OFString*)accessibleDescription
|
||||||
{
|
{
|
||||||
return QToOFString([self qWidget]->accessibleDescription());
|
return toOF([self qWidget]->accessibleDescription());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setAccessibleDescription: (OFString*)accessibleDescription
|
- (void)setAccessibleDescription: (OFString*)accessibleDescription
|
||||||
{
|
{
|
||||||
[self qWidget]->setAccessibleDescription(
|
[self qWidget]->setAccessibleDescription(toQt(accessibleDescription));
|
||||||
OFToQString(accessibleDescription));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (OFString*)accessibleName
|
- (OFString*)accessibleName
|
||||||
{
|
{
|
||||||
return QToOFString([self qWidget]->accessibleName());
|
return toOF([self qWidget]->accessibleName());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setAccessibleName: (OFString*)accessibleName
|
- (void)setAccessibleName: (OFString*)accessibleName
|
||||||
{
|
{
|
||||||
[self qWidget]->setAccessibleName(OFToQString(accessibleName));
|
[self qWidget]->setAccessibleName(toQt(accessibleName));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (bool)autoFillBackground
|
- (bool)autoFillBackground
|
||||||
|
@ -65,17 +64,17 @@
|
||||||
|
|
||||||
- (of_dimension_t)baseSize
|
- (of_dimension_t)baseSize
|
||||||
{
|
{
|
||||||
return QToOFDimension([self qWidget]->baseSize());
|
return toOF([self qWidget]->baseSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setBaseSize: (of_dimension_t)baseSize
|
- (void)setBaseSize: (of_dimension_t)baseSize
|
||||||
{
|
{
|
||||||
[self qWidget]->setBaseSize(OFToQSize(baseSize));
|
[self qWidget]->setBaseSize(toQt(baseSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (of_rectangle_t)childrenRect
|
- (of_rectangle_t)childrenRect
|
||||||
{
|
{
|
||||||
return QToOFRectangle([self qWidget]->childrenRect());
|
return toOF([self qWidget]->childrenRect());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (QRegion)childrenRegion
|
- (QRegion)childrenRegion
|
||||||
|
@ -145,12 +144,12 @@
|
||||||
|
|
||||||
- (of_rectangle_t)frameGeometry
|
- (of_rectangle_t)frameGeometry
|
||||||
{
|
{
|
||||||
return QToOFRectangle([self qWidget]->frameGeometry());
|
return toOF([self qWidget]->frameGeometry());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (of_dimension_t)frameSize
|
- (of_dimension_t)frameSize
|
||||||
{
|
{
|
||||||
return QToOFDimension([self qWidget]->frameSize());
|
return toOF([self qWidget]->frameSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (bool)isFullScreen
|
- (bool)isFullScreen
|
||||||
|
@ -160,12 +159,12 @@
|
||||||
|
|
||||||
- (of_rectangle_t)geometry
|
- (of_rectangle_t)geometry
|
||||||
{
|
{
|
||||||
return QToOFRectangle([self qWidget]->geometry());
|
return toOF([self qWidget]->geometry());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setGeometry: (of_rectangle_t)geometry
|
- (void)setGeometry: (of_rectangle_t)geometry
|
||||||
{
|
{
|
||||||
[self qWidget]->setGeometry(OFToQRect(geometry));
|
[self qWidget]->setGeometry(toQt(geometry));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int)height
|
- (int)height
|
||||||
|
@ -235,12 +234,12 @@
|
||||||
|
|
||||||
- (of_dimension_t)maximumSize
|
- (of_dimension_t)maximumSize
|
||||||
{
|
{
|
||||||
return QToOFDimension([self qWidget]->maximumSize());
|
return toOF([self qWidget]->maximumSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setMaximumSize: (of_dimension_t)maximumSize
|
- (void)setMaximumSize: (of_dimension_t)maximumSize
|
||||||
{
|
{
|
||||||
[self qWidget]->setMaximumSize(OFToQSize(maximumSize));
|
[self qWidget]->setMaximumSize(toQt(maximumSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int)maximumWidth
|
- (int)maximumWidth
|
||||||
|
@ -270,17 +269,17 @@
|
||||||
|
|
||||||
- (of_dimension_t)minimumSize
|
- (of_dimension_t)minimumSize
|
||||||
{
|
{
|
||||||
return QToOFDimension([self qWidget]->minimumSize());
|
return toOF([self qWidget]->minimumSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setMinimumSize: (of_dimension_t)minimumSize
|
- (void)setMinimumSize: (of_dimension_t)minimumSize
|
||||||
{
|
{
|
||||||
[self qWidget]->setMinimumSize(OFToQSize(minimumSize));
|
[self qWidget]->setMinimumSize(toQt(minimumSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (of_dimension_t)minimumSizeHint
|
- (of_dimension_t)minimumSizeHint
|
||||||
{
|
{
|
||||||
return QToOFDimension([self qWidget]->minimumSizeHint());
|
return toOF([self qWidget]->minimumSizeHint());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int)minimumWidth
|
- (int)minimumWidth
|
||||||
|
@ -310,7 +309,7 @@
|
||||||
|
|
||||||
- (of_rectangle_t)normalGeometry
|
- (of_rectangle_t)normalGeometry
|
||||||
{
|
{
|
||||||
return QToOFRectangle([self qWidget]->normalGeometry());
|
return toOF([self qWidget]->normalGeometry());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (const QPalette&)palette
|
- (const QPalette&)palette
|
||||||
|
@ -325,42 +324,42 @@
|
||||||
|
|
||||||
- (of_point_t)pos
|
- (of_point_t)pos
|
||||||
{
|
{
|
||||||
return QToOFPoint([self qWidget]->pos());
|
return toOF([self qWidget]->pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)moveToPosition: (of_point_t)pos
|
- (void)moveToPosition: (of_point_t)pos
|
||||||
{
|
{
|
||||||
[self qWidget]->move(OFToQPoint(pos));
|
[self qWidget]->move(toQt(pos));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (of_rectangle_t)rect
|
- (of_rectangle_t)rect
|
||||||
{
|
{
|
||||||
return QToOFRectangle([self qWidget]->rect());
|
return toOF([self qWidget]->rect());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (of_dimension_t)size
|
- (of_dimension_t)size
|
||||||
{
|
{
|
||||||
return QToOFDimension([self qWidget]->size());
|
return toOF([self qWidget]->size());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)resizeTo: (of_dimension_t)size
|
- (void)resizeTo: (of_dimension_t)size
|
||||||
{
|
{
|
||||||
[self qWidget]->resize(OFToQSize(size));
|
[self qWidget]->resize(toQt(size));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (of_dimension_t)sizeHint
|
- (of_dimension_t)sizeHint
|
||||||
{
|
{
|
||||||
return QToOFDimension([self qWidget]->sizeHint());
|
return toOF([self qWidget]->sizeHint());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (of_dimension_t)sizeIncrement
|
- (of_dimension_t)sizeIncrement
|
||||||
{
|
{
|
||||||
return QToOFDimension([self qWidget]->sizeIncrement());
|
return toOF([self qWidget]->sizeIncrement());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setSizeIncrement: (of_dimension_t)sizeIncrement
|
- (void)setSizeIncrement: (of_dimension_t)sizeIncrement
|
||||||
{
|
{
|
||||||
[self qWidget]->setSizeIncrement(OFToQSize(sizeIncrement));
|
[self qWidget]->setSizeIncrement(toQt(sizeIncrement));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (QSizePolicy)sizePolicy
|
- (QSizePolicy)sizePolicy
|
||||||
|
@ -375,32 +374,32 @@
|
||||||
|
|
||||||
- (OFString*)statusTip
|
- (OFString*)statusTip
|
||||||
{
|
{
|
||||||
return QToOFString([self qWidget]->statusTip());
|
return toOF([self qWidget]->statusTip());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setStatusTip: (OFString*)statusTip
|
- (void)setStatusTip: (OFString*)statusTip
|
||||||
{
|
{
|
||||||
[self qWidget]->setStatusTip(OFToQString(statusTip));
|
[self qWidget]->setStatusTip(toQt(statusTip));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (OFString*)styleSheet
|
- (OFString*)styleSheet
|
||||||
{
|
{
|
||||||
return QToOFString([self qWidget]->styleSheet());
|
return toOF([self qWidget]->styleSheet());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setStyleSheet: (OFString*)styleSheet
|
- (void)setStyleSheet: (OFString*)styleSheet
|
||||||
{
|
{
|
||||||
[self qWidget]->setStyleSheet(OFToQString(styleSheet));
|
[self qWidget]->setStyleSheet(toQt(styleSheet));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (OFString*)toolTip
|
- (OFString*)toolTip
|
||||||
{
|
{
|
||||||
return QToOFString([self qWidget]->toolTip());
|
return toOF([self qWidget]->toolTip());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setToolTip: (OFString*)toolTip
|
- (void)setToolTip: (OFString*)toolTip
|
||||||
{
|
{
|
||||||
[self qWidget]->setToolTip(OFToQString(toolTip));
|
[self qWidget]->setToolTip(toQt(toolTip));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int)toolTipDuration
|
- (int)toolTipDuration
|
||||||
|
@ -435,12 +434,12 @@
|
||||||
|
|
||||||
- (OFString*)whatsThis
|
- (OFString*)whatsThis
|
||||||
{
|
{
|
||||||
return QToOFString([self qWidget]->whatsThis());
|
return toOF([self qWidget]->whatsThis());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setWhatsThis: (OFString*)whatsThis
|
- (void)setWhatsThis: (OFString*)whatsThis
|
||||||
{
|
{
|
||||||
[self qWidget]->setWhatsThis(OFToQString(whatsThis));
|
[self qWidget]->setWhatsThis(toQt(whatsThis));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int)width
|
- (int)width
|
||||||
|
@ -450,12 +449,12 @@
|
||||||
|
|
||||||
- (OFString*)windowFilePath
|
- (OFString*)windowFilePath
|
||||||
{
|
{
|
||||||
return QToOFString([self qWidget]->windowFilePath());
|
return toOF([self qWidget]->windowFilePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setWindowFilePath: (OFString*)windowFilePath
|
- (void)setWindowFilePath: (OFString*)windowFilePath
|
||||||
{
|
{
|
||||||
[self qWidget]->setWindowFilePath(OFToQString(windowFilePath));
|
[self qWidget]->setWindowFilePath(toQt(windowFilePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (Qt::WindowFlags)windowFlags
|
- (Qt::WindowFlags)windowFlags
|
||||||
|
@ -510,12 +509,12 @@
|
||||||
|
|
||||||
- (OFString*)windowTitle
|
- (OFString*)windowTitle
|
||||||
{
|
{
|
||||||
return QToOFString([self qWidget]->windowTitle());
|
return toOF([self qWidget]->windowTitle());
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setWindowTitle: (OFString*)windowTitle
|
- (void)setWindowTitle: (OFString*)windowTitle
|
||||||
{
|
{
|
||||||
[self qWidget]->setWindowTitle(OFToQString(windowTitle));
|
[self qWidget]->setWindowTitle(toQt(windowTitle));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int)x
|
- (int)x
|
||||||
|
|
|
@ -4,51 +4,51 @@
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
#include <QRect>
|
#include <QRect>
|
||||||
|
|
||||||
inline OFString*
|
static OF_INLINE OFString*
|
||||||
QToOFString(const QString &qString)
|
toOF(const QString &qString)
|
||||||
{
|
{
|
||||||
return [OFString stringWithUTF8String: qString.toUtf8()];
|
return [OFString stringWithUTF8String: qString.toUtf8()];
|
||||||
}
|
}
|
||||||
|
|
||||||
inline QString
|
static OF_INLINE QString
|
||||||
OFToQString(OFString *string)
|
toQt(OFString *string)
|
||||||
{
|
{
|
||||||
return QString::fromUtf8([string UTF8String]);
|
return QString::fromUtf8([string UTF8String]);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline of_dimension_t
|
static OF_INLINE of_point_t
|
||||||
QToOFDimension(const QSize &qSize)
|
toOF(const QPoint &qPoint)
|
||||||
{
|
|
||||||
return of_dimension(qSize.width(), qSize.height());
|
|
||||||
}
|
|
||||||
|
|
||||||
inline of_point_t
|
|
||||||
QToOFPoint(const QPoint &qPoint)
|
|
||||||
{
|
{
|
||||||
return of_point(qPoint.x(), qPoint.y());
|
return of_point(qPoint.x(), qPoint.y());
|
||||||
}
|
}
|
||||||
|
|
||||||
inline QPoint
|
static OF_INLINE QPoint
|
||||||
OFToQPoint(of_point_t point)
|
toQt(of_point_t point)
|
||||||
{
|
{
|
||||||
return QPoint(point.x, point.y);
|
return QPoint(point.x, point.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline QSize
|
static OF_INLINE of_dimension_t
|
||||||
OFToQSize(of_dimension_t dimension)
|
toOF(const QSize &qSize)
|
||||||
|
{
|
||||||
|
return of_dimension(qSize.width(), qSize.height());
|
||||||
|
}
|
||||||
|
|
||||||
|
static OF_INLINE QSize
|
||||||
|
toQt(of_dimension_t dimension)
|
||||||
{
|
{
|
||||||
return QSize(dimension.width, dimension.height);
|
return QSize(dimension.width, dimension.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline of_rectangle_t
|
static OF_INLINE of_rectangle_t
|
||||||
QToOFRectangle(const QRect &qRect)
|
toOF(const QRect &qRect)
|
||||||
{
|
{
|
||||||
return of_rectangle(qRect.x(), qRect.y(),
|
return of_rectangle(qRect.x(), qRect.y(),
|
||||||
qRect.width(), qRect.height());
|
qRect.width(), qRect.height());
|
||||||
}
|
}
|
||||||
|
|
||||||
inline QRect
|
static OF_INLINE QRect
|
||||||
OFToQRect(of_rectangle_t rectangle)
|
toQt(of_rectangle_t rectangle)
|
||||||
{
|
{
|
||||||
return QRect(rectangle.origin.x, rectangle.origin.y,
|
return QRect(rectangle.origin.x, rectangle.origin.y,
|
||||||
rectangle.size.width, rectangle.size.height);
|
rectangle.size.width, rectangle.size.height);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue