[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [ktechlab] /: q3polygonscanner: use the internal version, not the one from Qt3Support
From: Zoltan Padrah <null () kde ! org>
Date: 2018-08-22 8:15:37
Message-ID: E1fsOIj-0006Vr-AY () code ! kde ! org
[Download RAW message or body]
Git commit a2953d0c08f532b8199615d3d82dde313eb42648 by Zoltan Padrah.
Committed on 14/08/2018 at 15:18.
Pushed by padrah into branch 'master'.
q3polygonscanner: use the internal version, not the one from Qt3Support
M +3 -0 src/CMakeLists.txt
M +1 -1 src/canvas.cpp
M +2 -2 src/canvas.h
M +2 -2 src/canvas_private.h
A +5 -0 src/ktlqt3support/CMakeLists.txt
M +8 -8 src/ktlqt3support/ktlq3polygonscanner.cpp
M +2 -2 src/ktlqt3support/ktlq3polygonscanner.h
M +1 -0 tests/tests_app/CMakeLists.txt
M +1 -0 tests/tests_compile/CMakeLists.txt
https://commits.kde.org/ktechlab/a2953d0c08f532b8199615d3d82dde313eb42648
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 19ad34fc..3862cb8f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -13,6 +13,7 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/languages
${CMAKE_CURRENT_SOURCE_DIR}/mechanics
${CMAKE_CURRENT_SOURCE_DIR}/micro
+ ${CMAKE_CURRENT_SOURCE_DIR}/ktlqt3support
${KDE4_INCLUDES}
${QT_INCLUDES})
if(GPSim_FOUND)
@@ -30,6 +31,7 @@ add_subdirectory(languages)
add_subdirectory(drawparts)
add_subdirectory(contexthelp)
add_subdirectory(math)
+add_subdirectory(ktlqt3support)
########### next target ###############
@@ -100,6 +102,7 @@ kde4_add_executable(ktechlab ${ktechlab_SRCS})
target_link_libraries( ktechlab
core gui micro flowparts
+ ktlqt3support
mechanics electronics elements components languages drawparts
itemeditor math
${KDE4_KHTML_LIBRARY} # khtml
diff --git a/src/canvas.cpp b/src/canvas.cpp
index a121d715..968da475 100644
--- a/src/canvas.cpp
+++ b/src/canvas.cpp
@@ -17,7 +17,7 @@
#include "qbitmap.h"
//#include "q3ptrdict.h"
#include "qpainter.h"
-#include "q3polygonscanner.h"
+#include "ktlq3polygonscanner.h"
#include "qtimer.h"
#include "q3tl.h"
#include <q3pointarray.h> // needed for q3polygonscanner
diff --git a/src/canvas.h b/src/canvas.h
index d27ab932..4e3892f0 100644
--- a/src/canvas.h
+++ b/src/canvas.h
@@ -235,7 +235,7 @@ class KtlQCanvas : public QObject
class KtlQCanvasViewData;
-class KtlQCanvasView : public Q3ScrollView // TODO QT3
+class KtlQCanvasView : public Q3ScrollView // TODO QT3 QScrollArea
{
Q_OBJECT
public:
@@ -253,7 +253,7 @@ class KtlQCanvasView : public Q3ScrollView // TODO QT3
bool setWorldMatrix( const QMatrix & );
protected:
- /** overrides Q3ScrollView::drawContents() */
+ /** overrides Q3ScrollView::drawContents() */ // override paintEvent?
virtual void drawContents( QPainter*, int cx, int cy, int cw, int ch );
QSize sizeHint() const;
diff --git a/src/canvas_private.h b/src/canvas_private.h
index 2af0d5e2..f9e60d89 100644
--- a/src/canvas_private.h
+++ b/src/canvas_private.h
@@ -15,7 +15,7 @@
#include "qbitmap.h"
#include "qimage.h"
-#include <q3polygonscanner.h>
+#include "ktlq3polygonscanner.h"
class KtlQPolygonalProcessor
{
@@ -217,7 +217,7 @@ private:
-class KtlQCanvasPolygonScanner : public Q3PolygonScanner // TODO QT3
+class KtlQCanvasPolygonScanner : public KtlQ3PolygonScanner // TODO QT3
{
KtlQPolygonalProcessor& processor;
diff --git a/src/ktlqt3support/CMakeLists.txt b/src/ktlqt3support/CMakeLists.txt
new file mode 100644
index 00000000..8b6cc887
--- /dev/null
+++ b/src/ktlqt3support/CMakeLists.txt
@@ -0,0 +1,5 @@
+SET(ktlqt3support_STAT_SRCS
+ ktlq3polygonscanner.cpp
+)
+
+kde4_add_library(ktlqt3support STATIC ${ktlqt3support_STAT_SRCS})
diff --git a/src/ktlqt3support/ktlq3polygonscanner.cpp \
b/src/ktlqt3support/ktlq3polygonscanner.cpp index dc3010bf..8dd68f30 100644
--- a/src/ktlqt3support/ktlq3polygonscanner.cpp
+++ b/src/ktlqt3support/ktlq3polygonscanner.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "q3polygonscanner.h"
+#include "ktlq3polygonscanner.h"
#include "q3pointarray.h"
#include <stdlib.h>
@@ -729,7 +729,7 @@ miInsertionSort(EdgeTableEntry *AET)
/*!
\overload
*/
-void Q3PolygonScanner::scan(const Q3PointArray& pa, bool winding, int index, int \
npoints) +void KtlQ3PolygonScanner::scan(const Q3PointArray& pa, bool winding, int \
index, int npoints) {
scan(pa, winding, index, npoints, true);
}
@@ -740,7 +740,7 @@ void Q3PolygonScanner::scan(const Q3PointArray& pa, bool winding, \
int index, int If \a stitchable is false, the right and bottom edges of the
polygon are included. This causes adjacent polygons to overlap.
*/
-void Q3PolygonScanner::scan(const Q3PointArray& pa, bool winding, int index, int \
npoints, bool stitchable) +void KtlQ3PolygonScanner::scan(const Q3PointArray& pa, \
bool winding, int index, int npoints, bool stitchable) {
scan(pa, winding, index, npoints,
stitchable ? Edge(Left+Top) : Edge(Left+Right+Top+Bottom));
@@ -755,17 +755,17 @@ void Q3PolygonScanner::scan(const Q3PointArray& pa, bool \
winding, int index, int
The \a edges is any bitwise combination of:
\list
- \i Q3PolygonScanner::Left
- \i Q3PolygonScanner::Right
- \i Q3PolygonScanner::Top
- \i Q3PolygonScanner::Bottom
+ \i KtlQ3PolygonScanner::Left
+ \i KtlQ3PolygonScanner::Right
+ \i KtlQ3PolygonScanner::Top
+ \i KtlQ3PolygonScanner::Bottom
\endlist
\a edges determines which edges are included.
\warning The edges feature does not work properly.
*/
-void Q3PolygonScanner::scan(const Q3PointArray& pa, bool winding, int index, int \
npoints, Edge edges) +void KtlQ3PolygonScanner::scan(const Q3PointArray& pa, bool \
winding, int index, int npoints, Edge edges) {
diff --git a/src/ktlqt3support/ktlq3polygonscanner.h \
b/src/ktlqt3support/ktlq3polygonscanner.h index 6223029b..924d13ed 100644
--- a/src/ktlqt3support/ktlq3polygonscanner.h
+++ b/src/ktlqt3support/ktlq3polygonscanner.h
@@ -53,9 +53,9 @@ QT_MODULE(Qt3SupportLight)
class Q3PointArray;
class QPoint;
-class Q_COMPAT_EXPORT Q3PolygonScanner {
+class Q_COMPAT_EXPORT KtlQ3PolygonScanner {
public:
- virtual ~Q3PolygonScanner() {}
+ virtual ~KtlQ3PolygonScanner() {}
void scan(const Q3PointArray& pa, bool winding, int index=0, int npoints=-1);
void scan(const Q3PointArray& pa, bool winding, int index, int npoints, bool \
stitchable); enum Edge { Left=1, Right=2, Top=4, Bottom=8 };
diff --git a/tests/tests_app/CMakeLists.txt b/tests/tests_app/CMakeLists.txt
index 78a9b846..6c1ef3e9 100644
--- a/tests/tests_app/CMakeLists.txt
+++ b/tests/tests_app/CMakeLists.txt
@@ -27,6 +27,7 @@ kde4_add_executable(tests_app tests_app.cpp)
target_link_libraries( tests_app
test_ktechlab
+ ktlqt3support
core gui micro flowparts
mechanics electronics elements components languages drawparts
itemeditor
diff --git a/tests/tests_compile/CMakeLists.txt b/tests/tests_compile/CMakeLists.txt
index 43bf33dc..233efabf 100644
--- a/tests/tests_compile/CMakeLists.txt
+++ b/tests/tests_compile/CMakeLists.txt
@@ -28,6 +28,7 @@ kde4_add_executable(test_compile test_compile.cpp)
target_link_libraries( test_compile
test_ktechlab
core gui micro flowparts
+ ktlqt3support
mechanics electronics elements components languages drawparts
itemeditor
test_ktechlab
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic