summaryrefslogtreecommitdiffstats
path: root/kmouth
diff options
context:
space:
mode:
authorgregory guy <gregory-tde@laposte.net>2020-03-29 19:41:28 +0200
committerSlávek Banko <slavek.banko@axis.cz>2021-01-26 15:37:01 +0100
commitf11f6d6ded39175d915422da2bac6fb6ffc924f9 (patch)
tree8a281ef5def0c82ebf101a1229ed52d85f623852 /kmouth
parent7eca1e554ec80ab1d36bb93834fc8b0a161be3b1 (diff)
downloadtdeaccessibility-f11f6d6ded39175d915422da2bac6fb6ffc924f9.tar.gz
tdeaccessibility-f11f6d6ded39175d915422da2bac6fb6ffc924f9.zip
Conversion to the cmake building system.
Added several man pages taken from the Debian packaging. Cleanup headers in ui files. Add png icons for mono theme. Signed-off-by: gregory guy <gregory-tde@laposte.net> cmake: - Use tde_add_check_executable instead of a combination of separate calls to tde_add_executable and add_test. - Simplify the detection of time.h and sys/time.h headers. - Refactor phrasebook files install, kmouth. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 6b3181cf92f1fc74da1e8a82f690a1526cb4e900)
Diffstat (limited to 'kmouth')
-rw-r--r--kmouth/CMakeLists.txt63
-rw-r--r--kmouth/books/CMakeLists.txt18
-rw-r--r--kmouth/icons/CMakeLists.txt9
-rw-r--r--kmouth/icons/app/CMakeLists.txt3
-rw-r--r--kmouth/icons/history/CMakeLists.txt3
-rw-r--r--kmouth/icons/phrase/CMakeLists.txt3
-rw-r--r--kmouth/icons/phrasebook/CMakeLists.txt3
-rw-r--r--kmouth/kmouth.h3
-rw-r--r--kmouth/phrasebook/CMakeLists.txt31
-rw-r--r--kmouth/phrasebook/buttonboxui.ui3
-rw-r--r--kmouth/preferencesui.ui3
-rw-r--r--kmouth/texttospeechconfigurationui.ui12
-rw-r--r--kmouth/wordcompletion/CMakeLists.txt30
-rw-r--r--kmouth/wordcompletion/creationsourcedetailsui.ui11
-rw-r--r--kmouth/wordcompletion/kdedocsourceui.ui8
-rw-r--r--kmouth/wordcompletion/wordcompletionui.ui14
16 files changed, 186 insertions, 31 deletions
diff --git a/kmouth/CMakeLists.txt b/kmouth/CMakeLists.txt
new file mode 100644
index 0000000..9fec611
--- /dev/null
+++ b/kmouth/CMakeLists.txt
@@ -0,0 +1,63 @@
+add_subdirectory( icons )
+add_subdirectory( phrasebook )
+add_subdirectory( wordcompletion )
+add_subdirectory( books )
+
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${CMAKE_BINARY_DIR}/kmouth/phrasebook
+ ${CMAKE_BINARY_DIR}/kmouth/wordcompletion
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### kmouth (executable)
+
+tde_add_executable( kmouth AUTOMOC
+
+ SOURCES
+ preferencesui.ui
+ texttospeechconfigurationui.ui
+ texttospeechconfigurationwidget.cpp
+ optionsdialog.cpp
+ configwizard.cpp
+ phraseedit.cpp
+ phraselist.cpp
+ speech.cpp
+ texttospeechsystem.cpp
+ phraselistitem.cpp
+ kmouth.cpp
+ main.cpp
+ LINK
+ tdecore-shared
+ tdeui-shared
+ tdeio-shared
+ tdeprint-shared
+ phrasebook-static
+ wordcompletion-static
+
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+
+
+##### other data
+
+install(
+ FILES kmouthui.rc
+ DESTINATION ${DATA_INSTALL_DIR}/kmouth
+)
+
+install(
+ FILES kmouthrc
+ DESTINATION ${CONFIG_INSTALL_DIR}
+)
+
+tde_create_translated_desktop( kmouth.desktop )
diff --git a/kmouth/books/CMakeLists.txt b/kmouth/books/CMakeLists.txt
new file mode 100644
index 0000000..282dcb3
--- /dev/null
+++ b/kmouth/books/CMakeLists.txt
@@ -0,0 +1,18 @@
+##### phrasebooks
+
+foreach( _lang de en nl sv )
+ install(
+ FILES
+ ${_lang}-courteousness.phrasebook
+ ${_lang}-greetings.phrasebook
+ ${_lang}-howareyou.phrasebook
+ ${_lang}-personal.phrasebook
+
+ DESTINATION ${DATA_INSTALL_DIR}/kmouth/books/${_lang}
+ )
+
+ tde_create_translated_desktop(
+ SOURCE ${_lang}.desktop
+ DESTINATION ${DATA_INSTALL_DIR}/kmouth/books/${_lang}
+ )
+endforeach()
diff --git a/kmouth/icons/CMakeLists.txt b/kmouth/icons/CMakeLists.txt
new file mode 100644
index 0000000..52c60aa
--- /dev/null
+++ b/kmouth/icons/CMakeLists.txt
@@ -0,0 +1,9 @@
+add_subdirectory( history )
+add_subdirectory( phrase )
+add_subdirectory( phrasebook )
+add_subdirectory( app )
+
+
+tde_install_icons(
+ DESTINATION ${DATA_INSTALL_DIR}/kmouth/icons
+)
diff --git a/kmouth/icons/app/CMakeLists.txt b/kmouth/icons/app/CMakeLists.txt
new file mode 100644
index 0000000..643654c
--- /dev/null
+++ b/kmouth/icons/app/CMakeLists.txt
@@ -0,0 +1,3 @@
+##### icons
+
+tde_install_icons()
diff --git a/kmouth/icons/history/CMakeLists.txt b/kmouth/icons/history/CMakeLists.txt
new file mode 100644
index 0000000..9133d6b
--- /dev/null
+++ b/kmouth/icons/history/CMakeLists.txt
@@ -0,0 +1,3 @@
+tde_install_icons(
+ DESTINATION ${DATA_INSTALL_DIR}/kmouth/icons
+)
diff --git a/kmouth/icons/phrase/CMakeLists.txt b/kmouth/icons/phrase/CMakeLists.txt
new file mode 100644
index 0000000..9133d6b
--- /dev/null
+++ b/kmouth/icons/phrase/CMakeLists.txt
@@ -0,0 +1,3 @@
+tde_install_icons(
+ DESTINATION ${DATA_INSTALL_DIR}/kmouth/icons
+)
diff --git a/kmouth/icons/phrasebook/CMakeLists.txt b/kmouth/icons/phrasebook/CMakeLists.txt
new file mode 100644
index 0000000..9133d6b
--- /dev/null
+++ b/kmouth/icons/phrasebook/CMakeLists.txt
@@ -0,0 +1,3 @@
+tde_install_icons(
+ DESTINATION ${DATA_INSTALL_DIR}/kmouth/icons
+)
diff --git a/kmouth/kmouth.h b/kmouth/kmouth.h
index 79f1aa0..628128c 100644
--- a/kmouth/kmouth.h
+++ b/kmouth/kmouth.h
@@ -19,9 +19,8 @@
#ifndef KMOUTH_H
#define KMOUTH_H
-
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
#endif
// include files for TQt
diff --git a/kmouth/phrasebook/CMakeLists.txt b/kmouth/phrasebook/CMakeLists.txt
new file mode 100644
index 0000000..ed96605
--- /dev/null
+++ b/kmouth/phrasebook/CMakeLists.txt
@@ -0,0 +1,31 @@
+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}
+)
+
+
+##### phrasebook (static)
+
+tde_add_library( phrasebook STATIC_PIC AUTOMOC
+
+ SOURCES
+ buttonboxui.ui
+ phrasetree.cpp
+ phrasebookparser.cpp
+ phrasebookdialog.cpp
+ phrasebook.cpp
+)
+
+
+install(
+ FILES phrasebookdialogui.rc
+ DESTINATION ${DATA_INSTALL_DIR}/kmouth
+)
diff --git a/kmouth/phrasebook/buttonboxui.ui b/kmouth/phrasebook/buttonboxui.ui
index 59f1d40..73eccf5 100644
--- a/kmouth/phrasebook/buttonboxui.ui
+++ b/kmouth/phrasebook/buttonboxui.ui
@@ -104,4 +104,7 @@
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
+<includes>
+ <include location="global" impldecl="in implementation">klineedit.h</include>
+</includes>
</UI>
diff --git a/kmouth/preferencesui.ui b/kmouth/preferencesui.ui
index 6d998cd..16cb7ce 100644
--- a/kmouth/preferencesui.ui
+++ b/kmouth/preferencesui.ui
@@ -159,4 +159,7 @@
</vbox>
</widget>
<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <include location="global" impldecl="in implementation">kcombobox.h</include>
+</includehints>
</UI>
diff --git a/kmouth/texttospeechconfigurationui.ui b/kmouth/texttospeechconfigurationui.ui
index 59bcf7a..afbcfd6 100644
--- a/kmouth/texttospeechconfigurationui.ui
+++ b/kmouth/texttospeechconfigurationui.ui
@@ -161,10 +161,10 @@
<signal>configurationChanged()</signal>
</Q_SIGNALS>
<layoutdefaults spacing="6" margin="11"/>
-<includehints>
- <includehint>kurlrequester.h</includehint>
- <includehint>klineedit.h</includehint>
- <includehint>kpushbutton.h</includehint>
- <includehint>kcombobox.h</includehint>
-</includehints>
+<includes>
+ <include location="global" impldecl="in implementation">kurlrequester.h</include>
+ <include location="global" impldecl="in implementation">klineedit.h</include>
+ <include location="global" impldecl="in implementation">kpushbutton.h</include>
+ <include location="global" impldecl="in implementation">kcombobox.h</include>
+</includes>
</UI>
diff --git a/kmouth/wordcompletion/CMakeLists.txt b/kmouth/wordcompletion/CMakeLists.txt
new file mode 100644
index 0000000..295a8d0
--- /dev/null
+++ b/kmouth/wordcompletion/CMakeLists.txt
@@ -0,0 +1,30 @@
+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}
+)
+
+
+##### wordcompletion (static)
+
+tde_add_library( wordcompletion STATIC_PIC AUTOMOC
+
+ SOURCES
+ wordcompletionui.ui
+ creationsourceui.ui
+ creationsourcedetailsui.ui
+ kdedocsourceui.ui
+ wordlist.cpp
+ wordcompletion.cpp
+ wordcompletionwidget.cpp
+ dictionarycreationwizard.cpp
+ klanguagebutton.cpp
+ klanguagebuttonhelper.cpp
+)
diff --git a/kmouth/wordcompletion/creationsourcedetailsui.ui b/kmouth/wordcompletion/creationsourcedetailsui.ui
index 52aa8a7..1efd8bd 100644
--- a/kmouth/wordcompletion/creationsourcedetailsui.ui
+++ b/kmouth/wordcompletion/creationsourcedetailsui.ui
@@ -159,6 +159,9 @@
<include location="local" impldecl="in implementation">klanguagebutton.h</include>
<include location="local" impldecl="in implementation">klanguagebuttonhelper.h</include>
<include location="local" impldecl="in implementation">creationsourcedetailsui.ui.h</include>
+ <include location="global" impldecl="in implementation">kurlrequester.h</include>
+ <include location="global" impldecl="in implementation">kpushbutton.h</include>
+ <include location="global" impldecl="in implementation">kcombobox.h</include>
</includes>
<forwards>
<forward>class KLanguageButton</forward>
@@ -173,12 +176,4 @@
<function access="private" specifier="non virtual">init()</function>
</functions>
<layoutdefaults spacing="6" margin="11"/>
-<includehints>
- <includehint>kinputdialog.h</includehint>
- <includehint>kpushbutton.h</includehint>
- <includehint>kcombobox.h</includehint>
- <includehint>kurlrequester.h</includehint>
- <includehint>kinputdialog.h</includehint>
- <includehint>kpushbutton.h</includehint>
-</includehints>
</UI>
diff --git a/kmouth/wordcompletion/kdedocsourceui.ui b/kmouth/wordcompletion/kdedocsourceui.ui
index c310fa1..91a410a 100644
--- a/kmouth/wordcompletion/kdedocsourceui.ui
+++ b/kmouth/wordcompletion/kdedocsourceui.ui
@@ -82,6 +82,9 @@
<include location="local" impldecl="in implementation">klanguagebutton.h</include>
<include location="local" impldecl="in implementation">klanguagebuttonhelper.h</include>
<include location="local" impldecl="in implementation">kdedocsourceui.ui.h</include>
+ <include location="global" impldecl="in implementation">kurlrequester.h</include>
+ <include location="global" impldecl="in implementation">klineedit.h</include>
+ <include location="global" impldecl="in implementation">kpushbutton.h</include>
</includes>
<forwards>
<forward>class KLanguageButton</forward>
@@ -93,9 +96,4 @@
<function access="private" specifier="non virtual">init()</function>
</functions>
<layoutdefaults spacing="6" margin="11"/>
-<includehints>
- <includehint>kurlrequester.h</includehint>
- <includehint>klineedit.h</includehint>
- <includehint>kpushbutton.h</includehint>
-</includehints>
</UI>
diff --git a/kmouth/wordcompletion/wordcompletionui.ui b/kmouth/wordcompletion/wordcompletionui.ui
index bc9cde5..c195cf0 100644
--- a/kmouth/wordcompletion/wordcompletionui.ui
+++ b/kmouth/wordcompletion/wordcompletionui.ui
@@ -266,6 +266,10 @@
<include location="local" impldecl="in implementation">klanguagebutton.h</include>
<include location="local" impldecl="in implementation">klanguagebuttonhelper.h</include>
<include location="local" impldecl="in implementation">wordcompletionui.ui.h</include>
+ <include location="local" impldecl="in implementation">klineedit.h</include>
+ <include location="global" impldecl="in implementation">kurlrequester.h</include>
+ <include location="global" impldecl="in implementation">kpushbutton.h</include>
+ <include location="global" impldecl="in implementation">tdelistview.h</include>
</includes>
<forwards>
<forward>class KLanguageButton</forward>
@@ -280,14 +284,4 @@
<function access="private" specifier="non virtual">init()</function>
</functions>
<layoutdefaults spacing="6" margin="11"/>
-<includehints>
- <includehint>kurlrequester.h</includehint>
- <includehint>kpushbutton.h</includehint>
- <includehint>kpushbutton.h</includehint>
- <includehint>kpushbutton.h</includehint>
- <includehint>kpushbutton.h</includehint>
- <includehint>kpushbutton.h</includehint>
- <includehint>tdelistview.h</includehint>
- <includehint>kinputdialog.h</includehint>
-</includehints>
</UI>