From 13cc59072532f7c2d35e6297d7e5985be9918365 Mon Sep 17 00:00:00 2001 From: Noldor Date: Sun, 18 May 2008 12:08:40 +0000 Subject: QT4 resource port (wip) git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@1812 17fca916-40b9-46aa-a4ea-0a15b648b75c --- src/modules/theme/themefunctions.cpp | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'src/modules/theme/themefunctions.cpp') diff --git a/src/modules/theme/themefunctions.cpp b/src/modules/theme/themefunctions.cpp index 3e3c8b102..144876fd3 100644 --- a/src/modules/theme/themefunctions.cpp +++ b/src/modules/theme/themefunctions.cpp @@ -35,9 +35,11 @@ #include "kvi_theme.h" #include "kvi_frame.h" + //#include -#include -#define KviTalMimeSourceFactory Q3MimeSourceFactory +//#include + +//#define KviTalMimeSourceFactory Q3MimeSourceFactory namespace KviThemeFunctions { @@ -183,7 +185,7 @@ namespace KviThemeFunctions szThemeDate, szThemeEngineVersion, pixScreenshot, - iIdx + iIdx,&hd ); if(iIdx > 0) @@ -256,12 +258,11 @@ namespace KviThemeFunctions &szWarnings, &szShowDetails ); - + hd.addImageResource("theme_dialog_pack_image",pix); + hd.addHtmlResource("theme_dialog_details",szDetails); + hd.addHtmlResource("theme_dialog_main",hd.szHtmlText); - KviTalMimeSourceFactory::defaultFactory()->setPixmap("theme_dialog_pack_image",pix); - KviTalMimeSourceFactory::defaultFactory()->setText("theme_dialog_details",szDetails); - KviTalMimeSourceFactory::defaultFactory()->setText("theme_dialog_main",hd.szHtmlText); QString beginCenter = "
"; QString endCenter = "
"; @@ -307,7 +308,8 @@ namespace KviThemeFunctions const QString &szThemeDate, const QString &szThemeThemeEngineVersion, const QPixmap &pixScreenshot, - int iUniqueIndexInDocument + int iUniqueIndexInDocument, + KviHtmlDialogData *hd ) { QString szAuthor = __tr2qs_ctx("Author","theme"); @@ -322,7 +324,10 @@ namespace KviThemeFunctions KviQString::sprintf(szScreenshot,"

",iUniqueIndexInDocument); QString szTmp; KviQString::sprintf(szTmp,"theme_shot%d",iUniqueIndexInDocument); - KviTalMimeSourceFactory::defaultFactory()->setPixmap(szTmp,pixScreenshot); + //FIXME in tooltip + if (hd) + hd->addImageResource(szTmp,pixScreenshot); + else szScreenshot = ""; } else { szScreenshot = ""; } -- cgit v1.3.1-10-gc9f91