summaryrefslogtreecommitdiffstats
path: root/kig
diff options
context:
space:
mode:
Diffstat (limited to 'kig')
-rw-r--r--kig/CMakeLists.txt52
-rw-r--r--kig/configure.in.in8
-rw-r--r--kig/data/CMakeLists.txt4
-rw-r--r--kig/examples/CMakeLists.txt15
-rw-r--r--kig/filters/CMakeLists.txt41
-rw-r--r--kig/filters/drgeo-filter-chooserbase.ui9
-rw-r--r--kig/filters/imageexporteroptionsbase.ui7
-rw-r--r--kig/icons/CMakeLists.txt1
-rw-r--r--kig/kig/CMakeLists.txt67
-rw-r--r--kig/macros/CMakeLists.txt6
-rw-r--r--kig/mimetypes/CMakeLists.txt35
-rw-r--r--kig/misc/CMakeLists.txt40
-rw-r--r--kig/modes/CMakeLists.txt38
-rw-r--r--kig/modes/edittypebase.ui13
-rw-r--r--kig/modes/macrowizardbase.ui7
-rw-r--r--kig/modes/typesdialogbase.ui14
-rw-r--r--kig/objects/CMakeLists.txt58
-rw-r--r--kig/pykig/CMakeLists.txt4
-rw-r--r--kig/scripting/CMakeLists.txt41
-rw-r--r--kig/scripting/python_scripter.cc3
-rw-r--r--kig/tdefile/CMakeLists.txt50
21 files changed, 481 insertions, 32 deletions
diff --git a/kig/CMakeLists.txt b/kig/CMakeLists.txt
new file mode 100644
index 00000000..1fd286ab
--- /dev/null
+++ b/kig/CMakeLists.txt
@@ -0,0 +1,52 @@
+add_subdirectory( objects )
+add_subdirectory( misc )
+add_subdirectory( modes )
+add_subdirectory( filters )
+add_subdirectory( kig )
+add_subdirectory( mimetypes )
+add_subdirectory( macros )
+add_subdirectory( tdefile )
+add_subdirectory( data )
+add_subdirectory( icons )
+add_subdirectory( pykig )
+add_subdirectory( scripting )
+add_subdirectory( examples )
+
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### libkigpart (kpart)
+
+file( WRITE dummy.cpp "" )
+
+tde_add_kpart( libkigpart AUTOMOC
+
+ SOURCES
+ dummy.cpp
+ LINK
+ tdecore-shared
+ tdeui-shared
+ tdeio-shared
+ tdeparts-shared
+ kigmisc-static
+ kigobjects-static
+ kigfilters-static
+ kigmodes-static
+ kigscripting-static
+
+ EMBED
+ kigpart-static
+
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
diff --git a/kig/configure.in.in b/kig/configure.in.in
index 99d11b95..05d5934d 100644
--- a/kig/configure.in.in
+++ b/kig/configure.in.in
@@ -161,6 +161,12 @@ AC_DEFUN([REGINA_LIB_BOOST_PYTHON], [
LIBS="-l$pylib $extralibs"
PYVERSHORT=${pyver#python}
PYVERSUFFIX=py${PYVERSHORT%.*}${PYVERSHORT#*.}
+ PYVERMAJOR=${PYVERSHORT%.*}
+ if test $PYVERMAJOR -lt 3; then
+ KIG_Python_init=initkig
+ else
+ KIG_Python_init=PyInit_kig
+ fi
AC_TRY_LINK([
#include <Python.h>
], [
@@ -221,6 +227,8 @@ AC_DEFUN([REGINA_LIB_BOOST_PYTHON], [
if test "$__regina_py_ok" = "1"; then
AC_DEFINE(HAVE_BOOST_PYTHON, 1,
[Define to 1 if you have a usable boost.python installation.])
+ AC_DEFINE_UNQUOTED(KIG_Python_init, $KIG_Python_init,
+ [KIG: Init function for python-boost])
else
BOOST_PYTHON_INCLUDES=
BOOST_PYTHON_LIBS=
diff --git a/kig/data/CMakeLists.txt b/kig/data/CMakeLists.txt
new file mode 100644
index 00000000..fd90fd2c
--- /dev/null
+++ b/kig/data/CMakeLists.txt
@@ -0,0 +1,4 @@
+install(
+ FILES tips
+ DESTINATION ${DATA_INSTALL_DIR}/kig
+)
diff --git a/kig/examples/CMakeLists.txt b/kig/examples/CMakeLists.txt
new file mode 100644
index 00000000..9432c37f
--- /dev/null
+++ b/kig/examples/CMakeLists.txt
@@ -0,0 +1,15 @@
+install(
+ FILES
+ cubic-locus.kig
+ ellipse.kig
+ figure_angle.fgeo
+ figure_manyobjects.fgeo
+ fregier.kigt
+ locustest.kig
+ parabolaBDF.kigt
+ session_alotofthings.fgeo
+ sine-curve.kig
+ sine-curve.png
+
+ DESTINATION ${DATA_INSTALL_DIR}/kig/examples
+)
diff --git a/kig/filters/CMakeLists.txt b/kig/filters/CMakeLists.txt
new file mode 100644
index 00000000..35ded394
--- /dev/null
+++ b/kig/filters/CMakeLists.txt
@@ -0,0 +1,41 @@
+#add_subdirectory( tests )
+
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### kigfilters (static)
+
+tde_add_library( kigfilters STATIC_PIC AUTOMOC
+
+ SOURCES
+ imageexporteroptionsbase.ui
+ latexexporteroptions.ui
+ svgexporteroptions.ui
+ drgeo-filter-chooserbase.ui
+ cabri-filter.cc
+ exporter.cc
+ filter.cc
+ filters-common.cc
+ imageexporteroptions.cc
+ kgeo-filter.cc
+ kseg-filter.cc
+ latexexporter.cc
+ native-filter.cc
+ svgexporter.cc
+ drgeo-filter.cc
+ drgeo-filter-chooser.cc
+
+ LINK
+ kigmisc-static
+)
diff --git a/kig/filters/drgeo-filter-chooserbase.ui b/kig/filters/drgeo-filter-chooserbase.ui
index 3cc334eb..303c2273 100644
--- a/kig/filters/drgeo-filter-chooserbase.ui
+++ b/kig/filters/drgeo-filter-chooserbase.ui
@@ -132,9 +132,8 @@ Please select which to import:</string>
</vbox>
</widget>
<layoutdefaults spacing="6" margin="11"/>
-<includehints>
- <includehint>tdelistbox.h</includehint>
- <includehint>kpushbutton.h</includehint>
- <includehint>kpushbutton.h</includehint>
-</includehints>
+<includes>
+ <include location="global" impldecl="in implementation">kpushbutton.h</include>
+ <include location="global" impldecl="in implementation">tdelistbox.h</include>
+</includes>
</UI>
diff --git a/kig/filters/imageexporteroptionsbase.ui b/kig/filters/imageexporteroptionsbase.ui
index 2a9156bf..330f1326 100644
--- a/kig/filters/imageexporteroptionsbase.ui
+++ b/kig/filters/imageexporteroptionsbase.ui
@@ -145,8 +145,7 @@
</vbox>
</widget>
<layoutdefaults spacing="6" margin="11"/>
-<includehints>
- <includehint>knuminput.h</includehint>
- <includehint>knuminput.h</includehint>
-</includehints>
+<includes>
+ <include location="global" impldecl="in implementation">knuminput.h</include>
+</includes>
</UI>
diff --git a/kig/icons/CMakeLists.txt b/kig/icons/CMakeLists.txt
new file mode 100644
index 00000000..aa21bccb
--- /dev/null
+++ b/kig/icons/CMakeLists.txt
@@ -0,0 +1 @@
+tde_install_icons( DESTINATION ${DATA_INSTALL_DIR}/kig/icons )
diff --git a/kig/kig/CMakeLists.txt b/kig/kig/CMakeLists.txt
new file mode 100644
index 00000000..02f6b654
--- /dev/null
+++ b/kig/kig/CMakeLists.txt
@@ -0,0 +1,67 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### kigpart (static)
+
+tde_add_library( kigpart STATIC_PIC AUTOMOC
+
+ SOURCES
+ kig_document.cc
+ kig_part.cpp
+ kig_view.cpp
+ kig_commands.cpp
+ LINK
+ tdeprint-shared
+ tdeio-shared
+)
+
+
+##### kig (executable)
+
+tde_add_executable( kig AUTOMOC
+
+ SOURCES
+ main.cpp
+ kig.cpp
+ LINK
+ tdecore-shared
+ tdeui-shared
+ tdeio-shared
+ tdeparts-shared
+
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+
+
+##### icons
+
+tde_install_icons( )
+
+
+##### other data
+
+install(
+ FILES kigui.rc kigpartui.rc
+ DESTINATION ${DATA_INSTALL_DIR}/kig
+)
+
+install(
+ FILES kig.desktop
+ DESTINATION ${XDG_APPS_INSTALL_DIR}
+)
+
+install(
+ FILES kig_part.desktop
+ DESTINATION ${SERVICES_INSTALL_DIR}
+)
diff --git a/kig/macros/CMakeLists.txt b/kig/macros/CMakeLists.txt
new file mode 100644
index 00000000..80c77be1
--- /dev/null
+++ b/kig/macros/CMakeLists.txt
@@ -0,0 +1,6 @@
+file( GLOB _kigts RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.kigt )
+
+install(
+ FILES ${_kigts}
+ DESTINATION ${DATA_INSTALL_DIR}/kig/builtin-macros
+)
diff --git a/kig/mimetypes/CMakeLists.txt b/kig/mimetypes/CMakeLists.txt
new file mode 100644
index 00000000..d4a39897
--- /dev/null
+++ b/kig/mimetypes/CMakeLists.txt
@@ -0,0 +1,35 @@
+tde_install_icons( )
+
+
+##### other data
+
+set( kig_magics cabri.magic drgeo.magic )
+
+foreach( _magic ${kig_magics} )
+ add_custom_command(
+ OUTPUT ${_magic}.mgc
+ COMMAND file -C -m ${CMAKE_CURRENT_SOURCE_DIR}/${_magic}
+ )
+ list( APPEND kig_magics_bin ${CMAKE_CURRENT_BINARY_DIR}/${_magic}.mgc )
+endforeach( )
+
+add_custom_target(
+ kig_magics ALL
+ DEPENDS ${kig_magics_bin}
+)
+
+install(
+ FILES ${kig_magics} ${kig_magics_bin}
+ DESTINATION ${CONFIG_INSTALL_DIR}/magic
+)
+
+install(
+ FILES
+ x-kig.desktop
+ x-kgeo.desktop
+ x-kseg.desktop
+ x-cabri.desktop
+ x-drgeo.desktop
+
+ DESTINATION ${MIME_INSTALL_DIR}/application
+)
diff --git a/kig/misc/CMakeLists.txt b/kig/misc/CMakeLists.txt
new file mode 100644
index 00000000..57449131
--- /dev/null
+++ b/kig/misc/CMakeLists.txt
@@ -0,0 +1,40 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### kigmisc (static)
+
+tde_add_library( kigmisc STATIC_PIC AUTOMOC
+
+ SOURCES
+ argsparser.cpp
+ builtin_stuff.cc
+ calcpaths.cc
+ common.cpp
+ conic-common.cpp
+ coordinate.cpp
+ coordinate_system.cpp
+ cubic-common.cc
+ goniometry.cc
+ guiaction.cc
+ kigfiledialog.cc
+ kiginputdialog.cc
+ kignumerics.cpp
+ kigpainter.cpp
+ kigtransform.cpp
+ lists.cc
+ object_constructor.cc
+ object_hierarchy.cc
+ rect.cc screeninfo.cc
+ special_constructors.cc
+)
diff --git a/kig/modes/CMakeLists.txt b/kig/modes/CMakeLists.txt
new file mode 100644
index 00000000..ab62086d
--- /dev/null
+++ b/kig/modes/CMakeLists.txt
@@ -0,0 +1,38 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### kigmodes (static)
+
+tde_add_library( kigmodes STATIC_PIC AUTOMOC
+
+ SOURCES
+ edittypebase.ui
+ macrowizardbase.ui
+ textlabelwizardbase.ui
+ typesdialogbase.ui
+ base_mode.cc
+ construct_mode.cc
+ dragrectmode.cc
+ edittype.cc
+ label.cc
+ linkslabel.cpp
+ macro.cc
+ macrowizard.cc
+ mode.cc
+ moving.cc
+ normal.cc
+ popup.cc
+ textlabelwizard.cc
+ typesdialog.cpp
+)
diff --git a/kig/modes/edittypebase.ui b/kig/modes/edittypebase.ui
index 8f9365c1..c0ed56cf 100644
--- a/kig/modes/edittypebase.ui
+++ b/kig/modes/edittypebase.ui
@@ -276,12 +276,9 @@
<slot>cancelSlot()</slot>
</Q_SLOTS>
<layoutdefaults spacing="6" margin="11"/>
-<includehints>
- <includehint>klineedit.h</includehint>
- <includehint>klineedit.h</includehint>
- <includehint>kicondialog.h</includehint>
- <includehint>kpushbutton.h</includehint>
- <includehint>kpushbutton.h</includehint>
- <includehint>kpushbutton.h</includehint>
-</includehints>
+<includes>
+ <include location="global" impldecl="in implementation">klineedit.h</include>
+ <include location="global" impldecl="in implementation">kicondialog.h</include>
+ <include location="global" impldecl="in implementation">kpushbutton.h</include>
+</includes>
</UI>
diff --git a/kig/modes/macrowizardbase.ui b/kig/modes/macrowizardbase.ui
index ea20ead7..47d9a52d 100644
--- a/kig/modes/macrowizardbase.ui
+++ b/kig/modes/macrowizardbase.ui
@@ -181,8 +181,7 @@
</widget>
</widget>
<layoutdefaults spacing="6" margin="11"/>
-<includehints>
- <includehint>klineedit.h</includehint>
- <includehint>klineedit.h</includehint>
-</includehints>
+<includes>
+ <include location="global" impldecl="in implementation">klineedit.h</include>
+</includes>
</UI>
diff --git a/kig/modes/typesdialogbase.ui b/kig/modes/typesdialogbase.ui
index cc5cec92..bea69868 100644
--- a/kig/modes/typesdialogbase.ui
+++ b/kig/modes/typesdialogbase.ui
@@ -327,14 +327,8 @@
<slot>cancelSlot()</slot>
</Q_SLOTS>
<layoutdefaults spacing="6" margin="11"/>
-<includehints>
- <includehint>tdelistview.h</includehint>
- <includehint>kpushbutton.h</includehint>
- <includehint>kpushbutton.h</includehint>
- <includehint>kpushbutton.h</includehint>
- <includehint>kpushbutton.h</includehint>
- <includehint>kpushbutton.h</includehint>
- <includehint>kpushbutton.h</includehint>
- <includehint>kpushbutton.h</includehint>
-</includehints>
+<includes>
+ <include location="global" impldecl="in implementation">kpushbutton.h</include>
+ <include location="global" impldecl="in implementation">tdelistview.h</include>
+</includes>
</UI>
diff --git a/kig/objects/CMakeLists.txt b/kig/objects/CMakeLists.txt
new file mode 100644
index 00000000..80157665
--- /dev/null
+++ b/kig/objects/CMakeLists.txt
@@ -0,0 +1,58 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### kigobjects (static)
+
+tde_add_library( kigobjects STATIC_PIC AUTOMOC
+
+ SOURCES
+ angle_type.cc
+ arc_type.cc
+ base_type.cc
+ bogus_imp.cc
+ circle_imp.cc
+ circle_type.cc
+ polygon_type.cc
+ common.cc
+ conic_imp.cc
+ conic_types.cc
+ cubic_imp.cc
+ cubic_type.cc
+ curve_imp.cc
+ intersection_types.cc
+ inversion_type.cc
+ line_imp.cc
+ line_type.cc
+ locus_imp.cc
+ object_calcer.cc
+ object_drawer.cc
+ object_factory.cc
+ object_holder.cc
+ object_imp.cc
+ object_imp_factory.cc
+ object_type.cc
+ object_type_factory.cc
+ other_imp.cc
+ other_type.cc
+ point_imp.cc
+ point_type.cc
+ polygon_imp.cc
+ tangent_type.cc
+ centerofcurvature_type.cc
+ tests_type.cc
+ text_imp.cc
+ text_type.cc
+ transform_types.cc
+ vector_type.cc
+)
diff --git a/kig/pykig/CMakeLists.txt b/kig/pykig/CMakeLists.txt
new file mode 100644
index 00000000..b4d6dece
--- /dev/null
+++ b/kig/pykig/CMakeLists.txt
@@ -0,0 +1,4 @@
+install(
+ PROGRAMS pykig.py
+ DESTINATION ${BIN_INSTALL_DIR}
+)
diff --git a/kig/scripting/CMakeLists.txt b/kig/scripting/CMakeLists.txt
new file mode 100644
index 00000000..01a2e5d6
--- /dev/null
+++ b/kig/scripting/CMakeLists.txt
@@ -0,0 +1,41 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${PYTHON_INCLUDE_DIRS}
+ ${Boost_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+ ${Boost_LIBRARY_DIRS}
+)
+
+
+##### kigscripting (static)
+
+tde_add_library( kigscripting STATIC_PIC AUTOMOC
+
+ SOURCES
+ newscriptwizardbase.ui
+ python_type.cc
+ python_scripter.cc
+ script-common.cc
+ script_mode.cc
+ newscriptwizard.cc
+ LINK
+ katepartinterfaces
+ ${PYTHON_LIBRARIES}
+ ${Boost_LIBRARIES}
+)
+
+
+##### other data
+
+install(
+ FILES python-kig.xml
+ DESTINATION ${DATA_INSTALL_DIR}/katepart/syntax
+)
diff --git a/kig/scripting/python_scripter.cc b/kig/scripting/python_scripter.cc
index 7e833d5c..00c7e162 100644
--- a/kig/scripting/python_scripter.cc
+++ b/kig/scripting/python_scripter.cc
@@ -15,6 +15,7 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
// 02110-1301, USA.
+#include "config.h"
#include "python_scripter.h"
#include <iostream>
@@ -357,7 +358,7 @@ PythonScripter::PythonScripter()
// the newstring stuff is to prevent warnings about conversion from
// const char* to char*..
char* s = newstring( "kig" );
- PyImport_AppendInittab( s, initkig );
+ PyImport_AppendInittab( s, KIG_Python_init );
// we can't delete this yet, since python keeps a pointer to it..
// This means we have a small but harmless memory leak here, but it
// doesn't hurt at all, since it could only be freed at the end of
diff --git a/kig/tdefile/CMakeLists.txt b/kig/tdefile/CMakeLists.txt
new file mode 100644
index 00000000..ec7241ca
--- /dev/null
+++ b/kig/tdefile/CMakeLists.txt
@@ -0,0 +1,50 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### tdefile_drgeo (kpart)
+
+tde_add_kpart( tdefile_drgeo AUTOMOC
+
+ SOURCES
+ tdefile_drgeo.cpp
+ LINK
+ tdecore-shared
+ tdeui-shared
+ tdeio-shared
+
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
+
+
+##### tdefile_kig (kpart)
+
+tde_add_kpart( tdefile_kig AUTOMOC
+
+ SOURCES
+ tdefile_kig.cpp
+ LINK
+ tdecore-shared
+ tdeui-shared
+ tdeio-shared
+
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
+
+
+##### other data
+
+install(
+ FILES tdefile_drgeo.desktop tdefile_kig.desktop
+ DESTINATION ${SERVICES_INSTALL_DIR}
+)