Replace Q_WS_* defines with TQ_WS_* equivalents

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/61/head
Michele Calgaro 3 months ago
parent 359ccbfc2d
commit 39ecff8fe9
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -168,7 +168,7 @@ KisAnnotationSP KisProfile::annotation() const
KisProfile * KisProfile::getScreenProfile (int screen)
{
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
Atom type;
int format;

@ -73,7 +73,7 @@
#include "kis_input_device.h"
#include "fixx11h.h"
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
#include <tqdesktopwidget.h>
#include <tqapplication.h>
@ -98,14 +98,14 @@ std::map<XID, KisCanvasWidget::X11TabletDevice> KisCanvasWidget::X11TabletDevice
#endif // EXTENDED_X11_TABLET_SUPPORT
#endif // Q_WS_X11
#endif // TQ_WS_X11
KisCanvasWidget::KisCanvasWidget()
{
m_enableMoveEventCompressionHint = false;
m_lastPressure = 0;
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
if (!X11SupportInitialised) {
initX11Support();
}
@ -180,7 +180,7 @@ void KisCanvasWidget::widgetGotTabletEvent(TQTabletEvent *e)
else {
KisMoveEvent ke(device, KisPoint(e->pos()), KisPoint(e->globalPos()), pressure, e->xTilt(), e->yTilt(), TQt::NoButton);
translateTabletEvent(&ke);
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
// Fix the problem that when you change from using a tablet device to the mouse,
// the first mouse button event is not recognised. This is because we handle
// X11 core mouse move events directly so TQt does not get to see them. This breaks
@ -292,7 +292,7 @@ void KisCanvasWidget::translateTabletEvent(KisEvent *e)
m_lastPressure = e->pressure();
}
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
void KisCanvasWidget::initX11Support()
{
@ -1058,7 +1058,7 @@ KisInputDevice KisCanvasWidget::findActiveInputDevice()
#endif // EXTENDED_X11_TABLET_SUPPORT
#endif // Q_WS_X11
#endif // TQ_WS_X11
/*************************************************************************/

@ -36,10 +36,10 @@
#include "kis_input_device.h"
#ifdef Q_MOC_RUN
#define Q_WS_X11
#define TQ_WS_X11
#endif // Q_MOC_RUN
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
// Irix has a different (and better) XInput tablet driver to
// the XFree/xorg driver. TQt needs a separate code path for that
@ -55,7 +55,7 @@
#include <X11/extensions/XInput.h>
#endif
#endif // Q_WS_X11
#endif // TQ_WS_X11
class KisEvent;
class KisMoveEvent;
@ -86,7 +86,7 @@ public:
static void selectTabletDeviceEvents(TQWidget *widget);
#endif
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
static void initX11Support();
#endif
@ -129,7 +129,7 @@ protected:
bool m_enableMoveEventCompressionHint;
double m_lastPressure;
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
// On X11 systems, TQt throws away mouse move events if the application
// is unable to keep up with them. We override this behaviour so that
// we receive all move events, so that painting follows the mouse's motion
@ -278,7 +278,7 @@ protected:
#endif // EXTENDED_X11_TABLET_SUPPORT
#endif // Q_WS_X11
#endif // TQ_WS_X11
};
class KisCanvas : public TQObject {

@ -102,14 +102,14 @@ void KisOpenGLCanvasWidget::dropEvent(TQDropEvent *e)
widgetGotDropEvent(e);
}
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
bool KisOpenGLCanvasWidget::x11Event(XEvent *event)
{
return KisCanvasWidget::x11Event(event, x11Display(), winId(), mapToGlobal(TQPoint(0, 0)));
}
#endif // Q_WS_X11
#endif // TQ_WS_X11
KisCanvasWidgetPainter *KisOpenGLCanvasWidget::createPainter()
{

@ -32,12 +32,12 @@
#include "kis_canvas.h"
#ifdef Q_MOC_RUN
#define Q_WS_X11
#define TQ_WS_X11
#endif // Q_MOC_RUN
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
#include <X11/Xlib.h>
#endif // Q_WS_X11
#endif // TQ_WS_X11
#define KisOpenGLCanvasFormat (TQGL::DoubleBuffer|TQGL::Rgba|TQGL::DirectRendering|TQGL::NoDepthBuffer)
@ -66,9 +66,9 @@ protected:
virtual void keyReleaseEvent(TQKeyEvent *event);
virtual void dragEnterEvent(TQDragEnterEvent *event);
virtual void dropEvent(TQDropEvent *event);
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
bool x11Event(XEvent *event);
#endif // Q_WS_X11
#endif // TQ_WS_X11
};
#endif // HAVE_GL

@ -97,14 +97,14 @@ void KisTQPaintDeviceCanvasWidget::dropEvent(TQDropEvent *e)
widgetGotDropEvent(e);
}
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
bool KisTQPaintDeviceCanvasWidget::x11Event(XEvent *event)
{
return KisCanvasWidget::x11Event(event, x11Display(), winId(), mapToGlobal(TQPoint(0, 0)));
}
#endif // Q_WS_X11
#endif // TQ_WS_X11
KisCanvasWidgetPainter *KisTQPaintDeviceCanvasWidget::createPainter()
{

@ -30,12 +30,12 @@
#include "kis_canvas.h"
#ifdef Q_MOC_RUN
#define Q_WS_X11
#define TQ_WS_X11
#endif // Q_MOC_RUN
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
#include <X11/Xlib.h>
#endif // Q_WS_X11
#endif // TQ_WS_X11
class KisTQPaintDeviceCanvasWidget : public virtual TQWidget, public virtual KisCanvasWidget {
public:
@ -62,9 +62,9 @@ protected:
virtual void keyReleaseEvent(TQKeyEvent *event);
virtual void dragEnterEvent(TQDragEnterEvent *event);
virtual void dropEvent(TQDropEvent *event);
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
bool x11Event(XEvent *event);
#endif // Q_WS_X11
#endif // TQ_WS_X11
};
#endif // KIS_TQPAINTDEVICE_CANVAS_H_

@ -247,7 +247,7 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, TQWidget *parent, const c
setFocusPolicy( TQWidget::StrongFocus );
// Must come before input devices are referenced as this detects them.
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
KisCanvasWidget::initX11Support();
#endif
// Install event filter before we create any child widgets so they can see

@ -139,7 +139,7 @@ INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED = TQT_VERSION=320 \
__cplusplus \
Q_WS_X11
TQ_WS_X11
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
TAGFILES =

@ -61,7 +61,7 @@ KoGlobal::KoGlobal()
// Another way to get the DPI of the display would be TQPaintDeviceMetrics,
// but we have no widget here (and moving this to KoView wouldn't allow
// using this from the document easily).
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
m_dpiX = TQPaintDevice::x11AppDpiX();
m_dpiY = TQPaintDevice::x11AppDpiY();
#else

@ -446,7 +446,7 @@
#include <assert.h>
#include <limits.h>
//TODO OK?
#ifdef Q_WS_WIN
#ifdef TQ_WS_WIN
//workaround for bug on msvc
# undef LLONG_MIN
#endif

@ -308,14 +308,14 @@ void StencilBarDockManager::setAllStackBarsShown(bool shown)
KoToolDockMoveManager::KoToolDockMoveManager()
: TQObject()
{
#if defined Q_WS_X11 && !defined K_WS_TQTONLY
#if defined TQ_WS_X11 && !defined K_WS_TQTONLY
XGCValues gv;
#endif
working=false;
noLast=true;
#if defined Q_WS_X11 && !defined K_WS_TQTONLY
#if defined TQ_WS_X11 && !defined K_WS_TQTONLY
scr = tqt_xscreen();
root = tqt_xrootwin();
@ -386,7 +386,7 @@ void KoToolDockMoveManager::doMoveInternal()
if (check(xp, yp, w, h)) {
paintProcess(false,xp, yp, w, h);
#if defined Q_WS_X11 && !defined K_WS_TQTONLY
#if defined TQ_WS_X11 && !defined K_WS_TQTONLY
XFlush(tqt_xdisplay());
XSync(tqt_xdisplay(),false);
#endif
@ -402,7 +402,7 @@ void KoToolDockMoveManager::stop()
TQApplication::restoreOverrideCursor();
paintProcess();
#if defined Q_WS_X11 && !defined K_WS_TQTONLY
#if defined TQ_WS_X11 && !defined K_WS_TQTONLY
XFlush(tqt_xdisplay());
#endif
@ -424,7 +424,7 @@ void KoToolDockMoveManager::setGeometry(int _x, int _y, int _w, int _h)
check(_x, _y, _w, _h, true);
paintProcess(false,_x, _y, _w, _h);
#if defined Q_WS_X11 && !defined K_WS_TQTONLY
#if defined TQ_WS_X11 && !defined K_WS_TQTONLY
XFlush(tqt_xdisplay());
XSync(tqt_xdisplay(),false);
#endif
@ -440,7 +440,7 @@ void KoToolDockMoveManager::drawRectangle( int _x, int _y, int _w, int _h)
ow = _w;
oh = _h;
#if defined Q_WS_X11 && !defined K_WS_TQTONLY
#if defined TQ_WS_X11 && !defined K_WS_TQTONLY
XDrawRectangle(tqt_xdisplay(), root, rootgc, _x, _y, _w, _h);
#endif
noLast = false;
@ -454,7 +454,7 @@ void KoToolDockMoveManager::paintProcess( bool onlyDelete, int _x, int _y, int _
if ( ox == _x && oy == _y && ow ==_w && oh == _h )
return;
#if defined Q_WS_X11 && !defined K_WS_TQTONLY
#if defined TQ_WS_X11 && !defined K_WS_TQTONLY
XDrawRectangle(tqt_xdisplay(), root, rootgc, ox, oy, ow, oh);
#endif
noLast = true;
@ -546,7 +546,7 @@ void KoToolDockMoveManager::doResizeInternal()
if (check(xp, yp, w, h)) {
paintProcess(false,xp, yp, w, h);
#if defined Q_WS_X11 && !defined K_WS_TQTONLY
#if defined TQ_WS_X11 && !defined K_WS_TQTONLY
XFlush(tqt_xdisplay());
XSync(tqt_xdisplay(),false);
#endif

@ -20,12 +20,12 @@
#define STENCILBARDOCKMANAGER_H
#ifdef Q_MOC_RUN
#define Q_WS_X11
#define TQ_WS_X11
#endif // Q_MOC_RUN
#include <tqwidget.h>
#include <tqptrlist.h>
#if defined Q_WS_X11 && !defined K_WS_TQTONLY
#if defined TQ_WS_X11 && !defined K_WS_TQTONLY
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@ -171,7 +171,7 @@ class KoToolDockMoveManager: public TQObject
int offX, offY;
/* X-stuff */
#if defined Q_WS_X11 && !defined K_WS_TQTONLY
#if defined TQ_WS_X11 && !defined K_WS_TQTONLY
Window root;
GC rootgc;
int scr;

@ -929,7 +929,7 @@ INCLUDE_FILE_PATTERNS =
PREDEFINED = TQT_VERSION=320 \
__cplusplus \
Q_WS_X11
TQ_WS_X11
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.

@ -64,7 +64,7 @@ KoGlobal::KoGlobal()
// Another way to get the DPI of the display would be TQPaintDeviceMetrics,
// but we have no widget here (and moving this to KoView wouldn't allow
// using this from the document easily).
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
m_dpiX = TQPaintDevice::x11AppDpiX();
m_dpiY = TQPaintDevice::x11AppDpiY();
#else

@ -40,7 +40,7 @@ double KoTextZoomHandler::layoutUnitToFontSize( int luSize, bool /*forPrint*/ )
{
// TQt will use TQPaintDevice::x11AppDpiY() to go from pt to pixel for fonts
return layoutUnitPtToPt( luSize ) * m_zoomedResolutionY
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
/ POINT_TO_INCH(TQPaintDevice::x11AppDpiY())
#endif
;

Loading…
Cancel
Save