y = double( yPos );
aViewerCS->transform( *aEMFCS, x, y );
- const char* str = aText.toAscii();
+ const char* str = aText.toLatin1().data();
int nHeight = 35*14; // height of font
int nWidth = 35*12; // average character width
listBase += 256;
HDC glHdc = ::wglGetCurrentDC();
+ #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
::SelectObject( glHdc, theFont->handle() );
+ #endif
if ( !::wglUseFontBitmaps( glHdc, 0, 256, listBase ) )
listBase = 0;
aList = listBase;
HDC screen_dc = GetDC( 0 ); //The screen device context
HDC bitDC = CreateCompatibleDC ( screen_dc ); //The context compatible with screen
- hMetaFileDC = CreateEnhMetaFile( bitDC, FileName.toAscii(), &r, "" );
+ hMetaFileDC = CreateEnhMetaFile( bitDC, FileName.toLatin1().data(), &r, "" );
SetMapMode( hMetaFileDC, MM_HIMETRIC );
SetWindowOrgEx( hMetaFileDC, 0, r.bottom, NULL );
HRGN ClipRgn = CreateRectRgn( 0, 0, AW, AH );
}
#endif
-#else
+
+#else // QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+
bool QVTK_RenderWindowInteractor
::nativeEvent(const QByteArray& eventType, void* message, long* result)
{
+#ifdef WIN32
+ // TODO: WIN32-related implementation
+#else
if ( eventType == "xcb_generic_event_t" )
{
xcb_generic_event_t* ev = static_cast<xcb_generic_event_t *>(message);
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+ // TODO: this code is never called
if ( SVTK_SpaceMouseX* aSpaceMouse = SVTK_SpaceMouseX::getInstance() )
#else
if ( SVTK_SpaceMouseXCB* aSpaceMouse = SVTK_SpaceMouseXCB::getInstance() )
{
SVTK_SpaceMouse::MoveEvent anEvent;
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+ // TODO: this code is never called
int type = aSpaceMouse->translateEvent( QX11Info::display(), xEvent, &anEvent, 1.0, 1.0 );
#else
int type = aSpaceMouse->translateEvent( QX11Info::connection(), (xcb_client_message_event_t*)ev, &anEvent, 1.0, 1.0 );
}
}
}
-
+#endif
return QWidget::nativeEvent( eventType, message, result );
}
#endif