diff options
Diffstat (limited to 'src/modules/objects/libkviobjects.cpp')
-rw-r--r-- | src/modules/objects/libkviobjects.cpp | 92 |
1 files changed, 2 insertions, 90 deletions
diff --git a/src/modules/objects/libkviobjects.cpp b/src/modules/objects/libkviobjects.cpp index 7276dd5c..6d29f5d9 100644 --- a/src/modules/objects/libkviobjects.cpp +++ b/src/modules/objects/libkviobjects.cpp @@ -39,10 +39,8 @@ #include "kvi_out.h" #include "kvi_app.h" #include "kvi_fileutils.h" -#ifndef COMPILE_USE_QT4 - #include <tqwidgetlist.h> - #include <tqobjectlist.h> -#endif +#include <tqwidgetlist.h> +#include <tqobjectlist.h> #include <tqdir.h> @@ -638,16 +636,7 @@ static bool objects_kvs_cmd_bitBlt(KviKvsModuleCommandCall * c) if(obDst->inherits("KviKvsObject_pixmap")){ ((KviKvsObject_pixmap *)obDst)->pixmapChanged(); } -#ifdef COMPILE_USE_QT4 - /*TQPainter p(pdDest); - TQRect rectdest(iXdst,iYdst,uW,uH); - TQRect rectsrc(iXsrc,iYsrc,uW,uH); - - p.drawPixmap(rectdest,pdSource,rectsrc); -*/ - #else bitBlt(pdDest,iXdst,iYdst,pdSource,iXsrc,iYsrc,uW,uH); -#endif return true; } /* @@ -779,13 +768,7 @@ static bool objects_kvs_cmd_blend(KviKvsModuleCommandCall * c) } -#ifdef COMPILE_USE_QT4 - TQPainter p(pdDest); - TQRect rect(iDesX,iDesY,buffer.width(),buffer.height()); - p.drawImage(rect,buffer); -#else bitBlt(pdDest,iDesX,iDesY,&buffer,0,0,buffer.width(),buffer.height()); -#endif return true; } @@ -826,45 +809,6 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd) KVSO_PARAMETER("flag on video",KVS_PT_BOOL,0,bFlag) KVSO_PARAMETERS_END(cmd) if (bFlag) cmd->window()->output(80, "Objects dump:"); - #ifdef COMPILE_USE_QT4 - TQWidgetList list = g_pApp->topLevelWidgets(); - - KviStr spacing = ">"; - TQString szTemp; - KviKvsArray * n = new KviKvsArray(); - int idx=0; - for(int i=0;i<list.count();i++) - { - if( list.at(i)->isWidgetType()) - { - if (bFlag) - { - cmd->window()->output(80, "Ptr %u: top level object: %c%s%c, class %s, %s, rect = %d, %d, %d, %d", - list.at(i), - KVI_TEXT_BOLD, list.at(i)->name(), KVI_TEXT_BOLD, - list.at(i)->className(), - list.at(i)->isVisible() ? "visible" : "hidden", - list.at(i)->x(), list.at(i)->y(), list.at(i)->width(), list.at(i)->height()); - } - TQString szClass=list.at(i)->className(); - TQString szObj=list.at(i)->name(); - TQString szTemp; - szTemp = szClass + "::" + szObj; - KviKvsVariant v; - v.setString(szTemp); - n->set(idx,new KviKvsVariant(v)); - tqDebug ("string %s",szTemp.latin1()); - tqDebug ("class %s",szClass.latin1()); - tqDebug ("Obj %s",szObj.latin1()); - - idx++; - - dumpChildObjects(cmd->window(), list.at(i), spacing.ptr(), bFlag,n,idx); - } - //++it; - } - -#else TQWidgetList *l = g_pApp->topLevelWidgets(); l->setAutoDelete(false); TQWidgetListIt it(*l); @@ -905,43 +849,12 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd) ++it; } -#endif cmd->returnValue()->setArray(n); return true; } static void dumpChildObjects(KviWindow *pWnd, TQObject *parent, const char *spacing, bool bFlag, KviKvsArray *n, int &idx) { -#ifdef COMPILE_USE_QT4 - const TQObjectList list = parent->children(); - if( !list.count() ) return; - TQString sp(spacing); - sp.append(">"); - for(int i=0;i<list.count();i++) - { - if( list.at(i)->isWidgetType() ) - { - if (bFlag) - { - pWnd->output(80, "%sPtr %u: object: %c%s%c, class %s", - spacing, list.at(i), KVI_TEXT_BOLD, - list.at(i)->name(), KVI_TEXT_BOLD, list.at(i)->className() - ); - } - TQString szClass=list.at(i)->className(); - TQString szObj=list.at(i)->name(); - TQString szTemp; - szTemp=spacing+szClass+"::"+szObj; - KviKvsVariant v; - v.setString(szTemp); - n->set(idx,new KviKvsVariant(v)); - tqDebug ("string %s",szTemp.latin1()); - idx++; - dumpChildObjects(pWnd, list.at(i), sp, bFlag, n, idx ); - } - } - -#else const TQObjectList l = parent->childrenListObject(); if( l.isEmpty() ) return; TQObjectListIt it(l); @@ -971,7 +884,6 @@ static void dumpChildObjects(KviWindow *pWnd, TQObject *parent, const char *spac } ++it; } -#endif } static bool objects_module_can_unload(KviModule *m) |