diff options
author | gregory guy <[email protected]> | 2021-08-07 11:45:47 +0200 |
---|---|---|
committer | gregory guy <[email protected]> | 2021-08-17 11:12:56 +0200 |
commit | 2fe98299baff89c26b594704ea6baf6bd8336346 (patch) | |
tree | 66a3169b6f1af61b0e49bb1a258e619171295e2a | |
parent | f5cb5376886b7394cfbc7d84acac65f5181affcd (diff) | |
download | qalculate-tde-2fe98299baff89c26b594704ea6baf6bd8336346.tar.gz qalculate-tde-2fe98299baff89c26b594704ea6baf6bd8336346.zip |
Conversion to the cmake building system.
Added a man page taken from the Debian packaging system.
Changed the doc folder's layout.
Signed-off-by: gregory guy <[email protected]>
CMake: Use tde_add_project_translations common macro.
Signed-off-by: Slávek Banko <[email protected]>
-rw-r--r-- | CMakeLists.txt | 78 | ||||
-rw-r--r-- | ConfigureChecks.cmake | 39 | ||||
-rw-r--r-- | config.h.cmake | 11 | ||||
-rw-r--r-- | doc/en/Makefile.am | 6 | ||||
-rw-r--r-- | doc/en/calculation-history.png (renamed from doc/en/qalculate_tde/calculation-history.png) | bin | 38304 -> 38304 bytes | |||
-rw-r--r-- | doc/en/calculator-buttons.png (renamed from doc/en/qalculate_tde/calculator-buttons.png) | bin | 68093 -> 68093 bytes | |||
-rw-r--r-- | doc/en/completion.png (renamed from doc/en/qalculate_tde/completion.png) | bin | 19114 -> 19114 bytes | |||
-rw-r--r-- | doc/en/convert-number-bases.png (renamed from doc/en/qalculate_tde/convert-number-bases.png) | bin | 11963 -> 11963 bytes | |||
-rw-r--r-- | doc/en/convert-unit.png (renamed from doc/en/qalculate_tde/convert-unit.png) | bin | 10193 -> 10193 bytes | |||
-rw-r--r-- | doc/en/edit-function.png (renamed from doc/en/qalculate_tde/edit-function.png) | bin | 23237 -> 23237 bytes | |||
-rw-r--r-- | doc/en/edit-matrix.png (renamed from doc/en/qalculate_tde/edit-matrix.png) | bin | 23716 -> 23716 bytes | |||
-rw-r--r-- | doc/en/edit-unit.png (renamed from doc/en/qalculate_tde/edit-unit.png) | bin | 27183 -> 27183 bytes | |||
-rw-r--r-- | doc/en/edit-variable.png (renamed from doc/en/qalculate_tde/edit-variable.png) | bin | 19408 -> 19408 bytes | |||
-rw-r--r-- | doc/en/function-manager.png (renamed from doc/en/qalculate_tde/function-manager.png) | bin | 43458 -> 43458 bytes | |||
-rw-r--r-- | doc/en/functions.docbook (renamed from doc/en/qalculate_tde/functions.docbook) | 0 | ||||
-rw-r--r-- | doc/en/gnuplot.png (renamed from doc/en/qalculate_tde/gnuplot.png) | bin | 13415 -> 13415 bytes | |||
-rw-r--r-- | doc/en/import-csv.png (renamed from doc/en/qalculate_tde/import-csv.png) | bin | 22564 -> 22564 bytes | |||
-rw-r--r-- | doc/en/index.docbook (renamed from doc/en/qalculate_tde/index.docbook) | 0 | ||||
-rw-r--r-- | doc/en/insert-function.png (renamed from doc/en/qalculate_tde/insert-function.png) | bin | 49542 -> 49542 bytes | |||
-rw-r--r-- | doc/en/mainwindow.png (renamed from doc/en/qalculate_tde/mainwindow.png) | bin | 28260 -> 28260 bytes | |||
-rw-r--r-- | doc/en/plot-data.png (renamed from doc/en/qalculate_tde/plot-data.png) | bin | 28043 -> 28043 bytes | |||
-rw-r--r-- | doc/en/plot-settings.png (renamed from doc/en/qalculate_tde/plot-settings.png) | bin | 24958 -> 24958 bytes | |||
-rw-r--r-- | doc/en/qalculate_tde/Makefile.am | 2 | ||||
-rw-r--r-- | doc/en/rpn-mode.png (renamed from doc/en/qalculate_tde/rpn-mode.png) | bin | 25514 -> 25514 bytes | |||
-rw-r--r-- | doc/en/store-variable.png (renamed from doc/en/qalculate_tde/store-variable.png) | bin | 12866 -> 12866 bytes | |||
-rw-r--r-- | doc/en/unit-manager.png (renamed from doc/en/qalculate_tde/unit-manager.png) | bin | 48346 -> 48346 bytes | |||
-rw-r--r-- | doc/en/units.docbook (renamed from doc/en/qalculate_tde/units.docbook) | 0 | ||||
-rw-r--r-- | doc/en/variable-manager.png (renamed from doc/en/qalculate_tde/variable-manager.png) | bin | 41010 -> 41010 bytes | |||
-rw-r--r-- | doc/en/variables.docbook (renamed from doc/en/qalculate_tde/variables.docbook) | 0 | ||||
-rw-r--r-- | doc/man/qalculate-tde.1 | 16 | ||||
-rw-r--r-- | po/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/CMakeLists.txt | 62 | ||||
-rw-r--r-- | src/qalculateexpressionedit.cpp | 4 | ||||
-rw-r--r-- | src/qalculateinsertmatrixvectordialog.cpp | 12 |
34 files changed, 217 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..80777ec --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,78 @@ +############################################ +# # +# Improvements and feedbacks are welcome # +# # +# This file is released under GPL >= 3 # +# # +############################################ + + +cmake_minimum_required( VERSION 2.8.12 ) + + +#### general package setup + +project( qalculate_tde ) +set( VERSION R14.1.0 ) + + +#### include essential cmake modules + +include( FindPkgConfig ) +include( CheckFunctionExists ) +include( CheckSymbolExists ) +include( CheckIncludeFile ) +include( CheckLibraryExists ) +include( CheckCSourceCompiles ) +include( CheckCXXSourceCompiles ) + + +#### include our cmake modules + +set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) +include( TDEMacros ) + + +##### setup install paths + +include( TDESetupPaths ) +tde_setup_paths( ) + + +##### optional stuff + +option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) +option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) + + +##### user requested modules + +option( BUILD_ALL "Build all" ON ) +option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) +option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) + + +##### configure checks + +include( ConfigureChecks.cmake ) + + +###### global compiler settings + +add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST ) + +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) +set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) +set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" ) + + +##### directories + +add_subdirectory( src ) +tde_conditional_add_project_docs( BUILD_DOC ) +tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po ) + + +##### write configure files + +configure_file( config.h.cmake config.h @ONLY ) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..2f6cb2a --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,39 @@ +########################################### +# # +# Improvements and feedback are welcome # +# # +# This file is released under GPL >= 3 # +# # +########################################### + +# required stuff +find_package( TQt ) +find_package( TDE ) + +tde_setup_architecture_flags( ) + +include(TestBigEndian) +test_big_endian(WORDS_BIGENDIAN) + +tde_setup_largefiles( ) + + +##### check for gcc visibility support + +if( WITH_GCC_VISIBILITY ) + tde_setup_gcc_visibility( ) +endif( WITH_GCC_VISIBILITY ) + + +##### Threading support + +find_package( Threads ) + + +##### look for libqalculate + +pkg_search_module( QALCULATE libqalculate ) + +if( NOT QALCULATE_FOUND ) + tde_message_fatal( "libqalculate is required but was not found on your system." ) +endif( NOT QALCULATE_FOUND ) diff --git a/config.h.cmake b/config.h.cmake new file mode 100644 index 0000000..a326e62 --- /dev/null +++ b/config.h.cmake @@ -0,0 +1,11 @@ +#define VERSION "@VERSION@" + +// Defined if you have fvisibility and fvisibility-inlines-hidden support. +#cmakedefine __TDE_HAVE_GCC_VISIBILITY 1 + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@ + +/* Defined for .rc file and icons */ +#define PACKAGE "qalculate_tde" diff --git a/doc/en/Makefile.am b/doc/en/Makefile.am index 2f9ab2c..dacaeed 100644 --- a/doc/en/Makefile.am +++ b/doc/en/Makefile.am @@ -1,4 +1,2 @@ -# the SUBDIRS is filled automatically by am_edit. If files are -# in this directory they are installed into the english dir - -SUBDIRS = qalculate_tde +KDE_DOCS = qalculate_tde +KDE_LANG = en diff --git a/doc/en/qalculate_tde/calculation-history.png b/doc/en/calculation-history.png Binary files differindex 0027d24..0027d24 100644 --- a/doc/en/qalculate_tde/calculation-history.png +++ b/doc/en/calculation-history.png diff --git a/doc/en/qalculate_tde/calculator-buttons.png b/doc/en/calculator-buttons.png Binary files differindex 38a4f4f..38a4f4f 100644 --- a/doc/en/qalculate_tde/calculator-buttons.png +++ b/doc/en/calculator-buttons.png diff --git a/doc/en/qalculate_tde/completion.png b/doc/en/completion.png Binary files differindex efaf7f1..efaf7f1 100644 --- a/doc/en/qalculate_tde/completion.png +++ b/doc/en/completion.png diff --git a/doc/en/qalculate_tde/convert-number-bases.png b/doc/en/convert-number-bases.png Binary files differindex c33b3f9..c33b3f9 100644 --- a/doc/en/qalculate_tde/convert-number-bases.png +++ b/doc/en/convert-number-bases.png diff --git a/doc/en/qalculate_tde/convert-unit.png b/doc/en/convert-unit.png Binary files differindex 1b4f266..1b4f266 100644 --- a/doc/en/qalculate_tde/convert-unit.png +++ b/doc/en/convert-unit.png diff --git a/doc/en/qalculate_tde/edit-function.png b/doc/en/edit-function.png Binary files differindex 768921b..768921b 100644 --- a/doc/en/qalculate_tde/edit-function.png +++ b/doc/en/edit-function.png diff --git a/doc/en/qalculate_tde/edit-matrix.png b/doc/en/edit-matrix.png Binary files differindex ec7f1e5..ec7f1e5 100644 --- a/doc/en/qalculate_tde/edit-matrix.png +++ b/doc/en/edit-matrix.png diff --git a/doc/en/qalculate_tde/edit-unit.png b/doc/en/edit-unit.png Binary files differindex ff7472f..ff7472f 100644 --- a/doc/en/qalculate_tde/edit-unit.png +++ b/doc/en/edit-unit.png diff --git a/doc/en/qalculate_tde/edit-variable.png b/doc/en/edit-variable.png Binary files differindex 1f00bdc..1f00bdc 100644 --- a/doc/en/qalculate_tde/edit-variable.png +++ b/doc/en/edit-variable.png diff --git a/doc/en/qalculate_tde/function-manager.png b/doc/en/function-manager.png Binary files differindex 3a92011..3a92011 100644 --- a/doc/en/qalculate_tde/function-manager.png +++ b/doc/en/function-manager.png diff --git a/doc/en/qalculate_tde/functions.docbook b/doc/en/functions.docbook index 777fa4e..777fa4e 100644 --- a/doc/en/qalculate_tde/functions.docbook +++ b/doc/en/functions.docbook diff --git a/doc/en/qalculate_tde/gnuplot.png b/doc/en/gnuplot.png Binary files differindex 62cdd01..62cdd01 100644 --- a/doc/en/qalculate_tde/gnuplot.png +++ b/doc/en/gnuplot.png diff --git a/doc/en/qalculate_tde/import-csv.png b/doc/en/import-csv.png Binary files differindex 12561d3..12561d3 100644 --- a/doc/en/qalculate_tde/import-csv.png +++ b/doc/en/import-csv.png diff --git a/doc/en/qalculate_tde/index.docbook b/doc/en/index.docbook index 3ae43a3..3ae43a3 100644 --- a/doc/en/qalculate_tde/index.docbook +++ b/doc/en/index.docbook diff --git a/doc/en/qalculate_tde/insert-function.png b/doc/en/insert-function.png Binary files differindex 99e5940..99e5940 100644 --- a/doc/en/qalculate_tde/insert-function.png +++ b/doc/en/insert-function.png diff --git a/doc/en/qalculate_tde/mainwindow.png b/doc/en/mainwindow.png Binary files differindex b38ddde..b38ddde 100644 --- a/doc/en/qalculate_tde/mainwindow.png +++ b/doc/en/mainwindow.png diff --git a/doc/en/qalculate_tde/plot-data.png b/doc/en/plot-data.png Binary files differindex 3e78d3f..3e78d3f 100644 --- a/doc/en/qalculate_tde/plot-data.png +++ b/doc/en/plot-data.png diff --git a/doc/en/qalculate_tde/plot-settings.png b/doc/en/plot-settings.png Binary files differindex fa4f3a0..fa4f3a0 100644 --- a/doc/en/qalculate_tde/plot-settings.png +++ b/doc/en/plot-settings.png diff --git a/doc/en/qalculate_tde/Makefile.am b/doc/en/qalculate_tde/Makefile.am deleted file mode 100644 index e97402c..0000000 --- a/doc/en/qalculate_tde/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -KDE_DOCS = AUTO -KDE_LANG = en diff --git a/doc/en/qalculate_tde/rpn-mode.png b/doc/en/rpn-mode.png Binary files differindex e9aff38..e9aff38 100644 --- a/doc/en/qalculate_tde/rpn-mode.png +++ b/doc/en/rpn-mode.png diff --git a/doc/en/qalculate_tde/store-variable.png b/doc/en/store-variable.png Binary files differindex ddcb4e7..ddcb4e7 100644 --- a/doc/en/qalculate_tde/store-variable.png +++ b/doc/en/store-variable.png diff --git a/doc/en/qalculate_tde/unit-manager.png b/doc/en/unit-manager.png Binary files differindex 3e222f1..3e222f1 100644 --- a/doc/en/qalculate_tde/unit-manager.png +++ b/doc/en/unit-manager.png diff --git a/doc/en/qalculate_tde/units.docbook b/doc/en/units.docbook index 0020f2d..0020f2d 100644 --- a/doc/en/qalculate_tde/units.docbook +++ b/doc/en/units.docbook diff --git a/doc/en/qalculate_tde/variable-manager.png b/doc/en/variable-manager.png Binary files differindex 7ea3c32..7ea3c32 100644 --- a/doc/en/qalculate_tde/variable-manager.png +++ b/doc/en/variable-manager.png diff --git a/doc/en/qalculate_tde/variables.docbook b/doc/en/variables.docbook index ab96abe..ab96abe 100644 --- a/doc/en/qalculate_tde/variables.docbook +++ b/doc/en/variables.docbook diff --git a/doc/man/qalculate-tde.1 b/doc/man/qalculate-tde.1 new file mode 100644 index 0000000..90682e5 --- /dev/null +++ b/doc/man/qalculate-tde.1 @@ -0,0 +1,16 @@ +.TH QALC 1 "28 December 2008" +.SH NAME +qalculate-tde \- Powerful and easy to use desktop calculator +.SH SYNOPSIS +.B qalculate-tde +.SH DESCRIPTION +Qalculate! is a small and simple to use calculator but with much power and +versatility underneath. Features include customizable functions, units, +arbitrary precision using a one-line fault-tolerant expression entry. +.PP +\fBqalculate-tde\fP is the TDE version of Qalculate!. +.SH AUTHORS +Original qalculate-kde was written by Niklas Knutsson <[email protected]>. +.PP +This manual page was originally written by Vincent Legout <[email protected]>, +for the Debian system (but may be used by others). diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt new file mode 100644 index 0000000..24e3bd8 --- /dev/null +++ b/po/CMakeLists.txt @@ -0,0 +1 @@ +tde_add_project_translations() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..4996d27 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,62 @@ + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} + ${QALCULATE_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} +) + + +##### qalculate-tde (executable) + +tde_add_executable( qalculate-tde AUTOMOC + + SOURCES + buttonwithindexsignal.cpp kqalculate.cpp + main.cpp preferences.cpp qalculatebuttonwithdata.cpp + qalculateconvertnumberbasesdialog.cpp + qalculateconvertunitsdialog.cpp qalculatedatasetsdialog.cpp + qalculatedecimalsdialog.cpp qalculateeditdataobjectdialog.cpp + qalculateeditdatasetdialog.cpp qalculateeditfunctiondialog.cpp + qalculateeditmatrixvectordialog.cpp qalculateeditnamesdialog.cpp + qalculateeditunitdialog.cpp qalculateeditunknownvariabledialog.cpp + qalculateeditvariabledialog.cpp qalculateexportcsvdialog.cpp + qalculateexpressionedit.cpp qalculatefunctionsdialog.cpp + qalculateimportcsvdialog.cpp qalculateinsertfunctiondialog.cpp + qalculateinsertmatrixvectordialog.cpp qalculate_tde_utils.cpp + qalculateperiodictabledialog.cpp qalculateplotdialog.cpp + qalculateprecisiondialog.cpp qalculatepreferencesdialog.cpp + qalculatesetbasedialog.cpp qalculateunitsdialog.cpp + qalculatevariablesdialog.cpp qalculateresultdisplay.cpp + LINK + tdecore-shared + tdeui-shared + tdeio-shared + ${CMAKE_THREAD_LIBS_INIT} + ${QALCULATE_LIBRARIES} + + DESTINATION ${BIN_INSTALL_DIR} +) + + +##### icons + +tde_install_icons( ) + + +##### other data + +install( + FILES qalculate_tdeui.rc + DESTINATION ${DATA_INSTALL_DIR}/qalculate_tde +) + + +tde_create_translated_desktop( qalculate_tde.desktop ) diff --git a/src/qalculateexpressionedit.cpp b/src/qalculateexpressionedit.cpp index 3eff804..0dfc5b9 100644 --- a/src/qalculateexpressionedit.cpp +++ b/src/qalculateexpressionedit.cpp @@ -413,7 +413,7 @@ void QalculateExpressionEdit::keyPressEvent(TQKeyEvent *e) { switch(e->key()) { case Key_Period: { if(e->state() == Keypad) { - insert(CALCULATOR->getDecimalPoint()); + insert(CALCULATOR->getDecimalPoint().c_str()); e->accept(); return; } @@ -421,7 +421,7 @@ void QalculateExpressionEdit::keyPressEvent(TQKeyEvent *e) { } case Key_Comma: { if(e->state() == Keypad) { - insert(CALCULATOR->getDecimalPoint()); + insert(CALCULATOR->getDecimalPoint().c_str()); e->accept(); return; } diff --git a/src/qalculateinsertmatrixvectordialog.cpp b/src/qalculateinsertmatrixvectordialog.cpp index 07835aa..d8791e9 100644 --- a/src/qalculateinsertmatrixvectordialog.cpp +++ b/src/qalculateinsertmatrixvectordialog.cpp @@ -170,7 +170,7 @@ void QalculateInsertMatrixVectorDialog::slotOk() { TQString str2 = elementsTable->text(index_r, index_c).stripWhiteSpace(); if(!str2.isEmpty()) { if(b) { - matrixstr += CALCULATOR->getComma(); + matrixstr += CALCULATOR->getComma().c_str(); matrixstr += " "; } else { b = true; @@ -186,7 +186,7 @@ void QalculateInsertMatrixVectorDialog::slotOk() { bool b1 = false; for(int index_r = 0; index_r < r; index_r++) { if(b1) { - matrixstr += CALCULATOR->getComma(); + matrixstr += CALCULATOR->getComma().c_str(); matrixstr += " "; } else { b1 = true; @@ -195,7 +195,7 @@ void QalculateInsertMatrixVectorDialog::slotOk() { bool b2 = false; for(int index_c = 0; index_c < c; index_c++) { if(b2) { - matrixstr += CALCULATOR->getComma(); + matrixstr += CALCULATOR->getComma().c_str(); matrixstr += " "; } else { b2 = true; @@ -219,7 +219,7 @@ void QalculateInsertMatrixVectorDialog::insertSelection() { TQString str2 = elementsTable->text(index_r, index_c).stripWhiteSpace(); if(!str2.isEmpty()) { if(b) { - matrixstr += CALCULATOR->getComma(); + matrixstr += CALCULATOR->getComma().c_str(); matrixstr += " "; } else { b = true; @@ -235,7 +235,7 @@ void QalculateInsertMatrixVectorDialog::insertSelection() { bool b1 = false; for(int index_r = sel.topRow(); index_r <= sel.bottomRow(); index_r++) { if(b1) { - matrixstr += CALCULATOR->getComma(); + matrixstr += CALCULATOR->getComma().c_str(); matrixstr += " "; } else { b1 = true; @@ -244,7 +244,7 @@ void QalculateInsertMatrixVectorDialog::insertSelection() { bool b2 = false; for(int index_c = sel.leftCol(); index_c <= sel.rightCol(); index_c++) { if(b2) { - matrixstr += CALCULATOR->getComma(); + matrixstr += CALCULATOR->getComma().c_str(); matrixstr += " "; } else { b2 = true; |