Replace QObject, QWidget, QImage, QPair, QRgb, QColor, QChar, QString, QIODevice with TQ* version

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/69/head
Michele Calgaro 1 year ago
parent fb2267e3bd
commit f38a284617
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -318,16 +318,16 @@ the right arguments, as shown in this example:
<prompt>$</prompt> <command>dcop `dcopstart ksnapshot` interface</command><computeroutput> <prompt>$</prompt> <command>dcop `dcopstart ksnapshot` interface</command><computeroutput>
QCStringList interfaces() QCStringList interfaces()
QCStringList functions() QCStringList functions()
QString url() TQString url()
void slotGrab() void slotGrab()
void slotPrint() void slotPrint()
void slotSave() void slotSave()
bool save(QString filename) bool save(TQString filename)
void slotSaveAs() void slotSaveAs()
void slotCopy() void slotCopy()
void setTime(int newTime) void setTime(int newTime)
int timeout() int timeout()
void setURL(QString newURL) void setURL(TQString newURL)
void setGrabMode(int grab) void setGrabMode(int grab)
int grabMode() int grabMode()
void slotMovePointer(int x,int y) void slotMovePointer(int x,int y)

@ -34,14 +34,14 @@ QPainter::fillRect(). QPainter::drawPixmap() seems much faster. For
+ { + {
+ for (int x = 0; x < rep; x++) + for (int x = 0; x < rep; x++)
+ { + {
+ QColor col; + TQColor col;
+ +
+ if ((parityAsInt + x + y) % 2) + if ((parityAsInt + x + y) % 2)
+ { + {
+ if (!isPreview) + if (!isPreview)
+ col = QColor (213, 213, 213); + col = TQColor (213, 213, 213);
+ else + else
+ col = QColor (224, 224, 224); + col = TQColor (224, 224, 224);
+ } + }
+ else + else
+ col = Qt::white; + col = Qt::white;

@ -64,7 +64,7 @@ diff -u -p -r1.9 kptoolpen.cpp
+ painter.begin (&pixmap); + painter.begin (&pixmap);
painter.setPen (color (m_mouseButton)); painter.setPen (color (m_mouseButton));
- QImage image; - TQImage image;
- if (m_mode & WashesPixmaps) - if (m_mode & WashesPixmaps)
- { - {
#if DEBUG_KP_TOOL_PEN #if DEBUG_KP_TOOL_PEN
@ -83,8 +83,8 @@ diff -u -p -r1.9 kptoolpen.cpp
@@ -453,10 +451,21 @@ void kpToolPen::draw (const QPoint &this @@ -453,10 +451,21 @@ void kpToolPen::draw (const QPoint &this
else if (m_mode & (DrawsPixmaps | WashesPixmaps)) else if (m_mode & (DrawsPixmaps | WashesPixmaps))
{ {
QRgb colorToReplace; TQRgb colorToReplace;
+ QImage image; + TQImage image;
+ QRegion region; + QRegion region;
if (m_mode & WashesPixmaps) if (m_mode & WashesPixmaps)

@ -118,9 +118,9 @@ diff -u -p -r1.7 kpviewscrollablecontainer.cpp
// protected // protected
-void kpViewScrollableContainer::repaintWidgetAtResizeLineViewRect ( -void kpViewScrollableContainer::repaintWidgetAtResizeLineViewRect (
- QWidget *widget, const QRect &resizeLineViewRect) - TQWidget *widget, const QRect &resizeLineViewRect)
+void kpViewScrollableContainer::repaintWidgetRegion ( +void kpViewScrollableContainer::repaintWidgetRegion (
+ QWidget *widget, + TQWidget *widget,
+ const QRegion &viewRegion) + const QRegion &viewRegion)
{ {
- const QRect resizeLineGlobalRect = mapViewToGlobal (resizeLineViewRect); - const QRect resizeLineGlobalRect = mapViewToGlobal (resizeLineViewRect);
@ -153,7 +153,7 @@ diff -u -p -r1.7 kpviewscrollablecontainer.cpp
} }
// protected // protected
-void kpViewScrollableContainer::repaintWidgetAtResizeLines (QWidget *widget) -void kpViewScrollableContainer::repaintWidgetAtResizeLines (TQWidget *widget)
+void kpViewScrollableContainer::eraseResizeLines (const QRegion &viewRegion) +void kpViewScrollableContainer::eraseResizeLines (const QRegion &viewRegion)
{ {
- repaintWidgetAtResizeLineViewRect (widget, rightResizeLineRect ()); - repaintWidgetAtResizeLineViewRect (widget, rightResizeLineRect ());
@ -455,7 +455,7 @@ diff -u -p -r1.7 kpviewscrollablecontainer.cpp
+ } + }
+} +}
+ +
+// protected virtual [base QWidget] +// protected virtual [base TQWidget]
+void kpViewScrollableContainer::windowActivationChange (bool wasActive) +void kpViewScrollableContainer::windowActivationChange (bool wasActive)
+{ +{
+#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER && 1 +#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER && 1
@ -502,11 +502,11 @@ diff -u -p -r1.3 kpviewscrollablecontainer.h
QRect mapViewToGlobal (const QRect &viewRect); QRect mapViewToGlobal (const QRect &viewRect);
+ QRegion mapViewToGlobal (const QRegion &viewRegion); + QRegion mapViewToGlobal (const QRegion &viewRegion);
- void repaintWidgetAtResizeLineViewRect (QWidget *widget, - void repaintWidgetAtResizeLineViewRect (TQWidget *widget,
- const QRect &resizeLineViewRect); - const QRect &resizeLineViewRect);
- void repaintWidgetAtResizeLines (QWidget *widget); - void repaintWidgetAtResizeLines (TQWidget *widget);
- void eraseResizeLines (); - void eraseResizeLines ();
+ void repaintWidgetRegion (QWidget *widget, + void repaintWidgetRegion (TQWidget *widget,
+ const QRegion &viewRegion); + const QRegion &viewRegion);
+ void eraseResizeLines (const QRegion &viewRegion); + void eraseResizeLines (const QRegion &viewRegion);
@ -534,7 +534,7 @@ diff -u -p -r1.3 kpviewscrollablecontainer.h
int m_resizeRoundedLastViewDX, m_resizeRoundedLastViewDY; int m_resizeRoundedLastViewDX, m_resizeRoundedLastViewDY;
+ int m_resizeLinesDontPaintClever; + int m_resizeLinesDontPaintClever;
bool m_haveMovedFromOriginalDocSize; bool m_haveMovedFromOriginalDocSize;
QString m_gripStatusMessage; TQString m_gripStatusMessage;
}; };
Index: kpwidgetmapper.cpp Index: kpwidgetmapper.cpp
=================================================================== ===================================================================
@ -551,11 +551,11 @@ diff -u -p -r1.1 kpwidgetmapper.cpp
#include <qwidget.h> #include <qwidget.h>
@@ -54,6 +55,17 @@ QRect fromGlobal (const QWidget *widget, @@ -54,6 +55,17 @@ QRect fromGlobal (const TQWidget *widget,
return QRect (topLeft.x (), topLeft.y (), rect.width (), rect.height ()); return QRect (topLeft.x (), topLeft.y (), rect.width (), rect.height ());
} }
+QRegion fromGlobal (const QWidget *widget, const QRegion &region) +QRegion fromGlobal (const TQWidget *widget, const QRegion &region)
+{ +{
+ if (!widget || region.isEmpty ()) + if (!widget || region.isEmpty ())
+ return region; + return region;
@ -567,13 +567,13 @@ diff -u -p -r1.1 kpwidgetmapper.cpp
+} +}
+ +
QPoint toGlobal (const QWidget *widget, const QPoint &point) QPoint toGlobal (const TQWidget *widget, const QPoint &point)
{ {
@@ -72,5 +84,16 @@ QRect toGlobal (const QWidget *widget, c @@ -72,5 +84,16 @@ QRect toGlobal (const TQWidget *widget, c
return QRect (topLeft.x (), topLeft.y (), rect.width (), rect.height ()); return QRect (topLeft.x (), topLeft.y (), rect.width (), rect.height ());
} }
+QRegion toGlobal (const QWidget *widget, const QRegion &region) +QRegion toGlobal (const TQWidget *widget, const QRegion &region)
+{ +{
+ if (!widget || region.isEmpty ()) + if (!widget || region.isEmpty ())
+ return region; + return region;
@ -594,7 +594,7 @@ diff -u -p -r1.1 kpwidgetmapper.h
--- kpwidgetmapper.h 10 Jul 2004 11:38:09 -0000 1.1 --- kpwidgetmapper.h 10 Jul 2004 11:38:09 -0000 1.1
+++ kpwidgetmapper.h 30 Jul 2004 11:37:21 -0000 +++ kpwidgetmapper.h 30 Jul 2004 11:37:21 -0000
@@ -32,15 +32,18 @@ @@ -32,15 +32,18 @@
class QWidget; class TQWidget;
class QPoint; class QPoint;
class QRect; class QRect;
+class QRegion; +class QRegion;
@ -602,13 +602,13 @@ diff -u -p -r1.1 kpwidgetmapper.h
namespace kpWidgetMapper namespace kpWidgetMapper
{ {
QPoint fromGlobal (const QWidget *widget, const QPoint &point); QPoint fromGlobal (const TQWidget *widget, const QPoint &point);
QRect fromGlobal (const QWidget *widget, const QRect &rect); QRect fromGlobal (const TQWidget *widget, const QRect &rect);
+ QRegion fromGlobal (const QWidget *widget, const QRegion &region); + QRegion fromGlobal (const TQWidget *widget, const QRegion &region);
QPoint toGlobal (const QWidget *widget, const QPoint &point); QPoint toGlobal (const TQWidget *widget, const QPoint &point);
QRect toGlobal (const QWidget *widget, const QRect &rect); QRect toGlobal (const TQWidget *widget, const QRect &rect);
+ QRegion toGlobal (const QWidget *widget, const QRegion &region); + QRegion toGlobal (const TQWidget *widget, const QRegion &region);
} }

@ -55,7 +55,7 @@ support all, even not very common options, some scanners offer. Lets
see what is necessary and makes sense for the purpose of Kooka. see what is necessary and makes sense for the purpose of Kooka.
* Kooka does not yet have a strategy for very large images :(. It uses * Kooka does not yet have a strategy for very large images :(. It uses
the Qt QImage/QPixmap as is. On some displays, that causes problems. the Qt TQImage/QPixmap as is. On some displays, that causes problems.
* Automatic document feeder (ADF) support is not yet working correctly. * Automatic document feeder (ADF) support is not yet working correctly.

@ -69,7 +69,7 @@ Put type modifiers behind the type, not before the variable name.
Example: Example:
const QString& type; const TQString& type;
PMObject* obj; PMObject* obj;

@ -22,7 +22,7 @@
around with internals like the presenter plugin does. around with internals like the presenter plugin does.
- This would make preloading (and caching) the images possible. - This would make preloading (and caching) the images possible.
- Caching: currently the canvas doesn't do anything with files while the - Caching: currently the canvas doesn't do anything with files while the
viewer only calls QImage( QByteArray ) or QImage( filename ). Therefor the viewer only calls TQImage( QByteArray ) or TQImage( filename ). Therefor the
Viewer has to cache the loading of images while the canvas would have to Viewer has to cache the loading of images while the canvas would have to
cache the zoomed images and pixmaps. cache the zoomed images and pixmaps.
It would be no problem to make the canvas work on files and bytearrays It would be no problem to make the canvas work on files and bytearrays
@ -36,12 +36,12 @@
Something like: Something like:
class Effect class Effect
{ {
QString dialogTitle() const = 0; TQString dialogTitle() const = 0;
QWidget * dialogWidget() = 0; TQWidget * dialogWidget() = 0;
/* @returns whether @ref applyEffect() would create the same image as /* @returns whether @ref applyEffect() would create the same image as
* last time or a changed one */ * last time or a changed one */
bool changed() const = 0; bool changed() const = 0;
void applyEffect( QImage & ) = 0; void applyEffect( TQImage & ) = 0;
}; };
- Brightness Adjustment - Brightness Adjustment
- Greyscale conversion - Greyscale conversion

@ -27,15 +27,15 @@ Presenter Plugin:
- keep local copy of downloaded files - keep local copy of downloaded files
- delete local copy on destruction - delete local copy on destruction
- API: - API:
QImage * image(); TQImage * image();
KURL url(); KURL url();
QString file(); //returns local filename or QString::null TQString file(); //returns local filename or TQString::null
- when loading an item from the playlist first ask for a - when loading an item from the playlist first ask for a
QImage, if that's not available ask for a local file, if TQImage, if that's not available ask for a local file, if
that's also not available take the url. that's also not available take the url.
- API: - API:
QImage * image(); TQImage * image();
QString file(); TQString file();
KURL url(); KURL url();
void setRandom(bool); void setRandom(bool);
void randomizeList(); void randomizeList();

@ -12,7 +12,7 @@ Our TODO List:
- the gui functionality KDE 2.x - features. - the gui functionality KDE 2.x - features.
- KDE-features at all ! The whole stuff does not use any KDE-funcitonality, only Qt. - KDE-features at all ! The whole stuff does not use any KDE-funcitonality, only Qt.
What about having a Version which compiles without KDE ? .o0( Good idea to think about ? ) What about having a Version which compiles without KDE ? .o0( Good idea to think about ? )
- attention to drop QString where possible, and I think, its possible where SANE-stuff is - attention to drop TQString where possible, and I think, its possible where SANE-stuff is
used. used.
- I18N-functions. In resource.h, I defined a macro I18N which does not much by now. I tried - I18N-functions. In resource.h, I defined a macro I18N which does not much by now. I tried
to place it around strings to prepare for real I18N treatment. How is that done ? to place it around strings to prepare for real I18N treatment. How is that done ?

@ -115,7 +115,7 @@ String JPG quality 1 - "basic"
default: unknown default: unknown
String User comment String User comment
String Comment String Comment
QImage Thumbnail TQImage Thumbnail
gif plugin: gif plugin:

Loading…
Cancel
Save