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 <gregory-tde@laposte.net>

CMake: Use tde_add_project_translations common macro.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/2/head
gregory guy 3 years ago
parent f5cb537688
commit 2fe98299ba
No known key found for this signature in database
GPG Key ID: 2CC84A1CC6823AF8

@ -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 )

@ -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 )

@ -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"

@ -1,4 +1,2 @@
# the SUBDIRS is filled automatically by am_edit. If files are KDE_DOCS = qalculate_tde
# in this directory they are installed into the english dir KDE_LANG = en
SUBDIRS = qalculate_tde

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

@ -1,2 +0,0 @@
KDE_DOCS = AUTO
KDE_LANG = en

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

@ -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 <nq@altern.org>.
.PP
This manual page was originally written by Vincent Legout <vincent@legout.info>,
for the Debian system (but may be used by others).

@ -0,0 +1 @@
tde_add_project_translations()

@ -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 )

@ -413,7 +413,7 @@ void QalculateExpressionEdit::keyPressEvent(TQKeyEvent *e) {
switch(e->key()) { switch(e->key()) {
case Key_Period: { case Key_Period: {
if(e->state() == Keypad) { if(e->state() == Keypad) {
insert(CALCULATOR->getDecimalPoint()); insert(CALCULATOR->getDecimalPoint().c_str());
e->accept(); e->accept();
return; return;
} }
@ -421,7 +421,7 @@ void QalculateExpressionEdit::keyPressEvent(TQKeyEvent *e) {
} }
case Key_Comma: { case Key_Comma: {
if(e->state() == Keypad) { if(e->state() == Keypad) {
insert(CALCULATOR->getDecimalPoint()); insert(CALCULATOR->getDecimalPoint().c_str());
e->accept(); e->accept();
return; return;
} }

@ -170,7 +170,7 @@ void QalculateInsertMatrixVectorDialog::slotOk() {
TQString str2 = elementsTable->text(index_r, index_c).stripWhiteSpace(); TQString str2 = elementsTable->text(index_r, index_c).stripWhiteSpace();
if(!str2.isEmpty()) { if(!str2.isEmpty()) {
if(b) { if(b) {
matrixstr += CALCULATOR->getComma(); matrixstr += CALCULATOR->getComma().c_str();
matrixstr += " "; matrixstr += " ";
} else { } else {
b = true; b = true;
@ -186,7 +186,7 @@ void QalculateInsertMatrixVectorDialog::slotOk() {
bool b1 = false; bool b1 = false;
for(int index_r = 0; index_r < r; index_r++) { for(int index_r = 0; index_r < r; index_r++) {
if(b1) { if(b1) {
matrixstr += CALCULATOR->getComma(); matrixstr += CALCULATOR->getComma().c_str();
matrixstr += " "; matrixstr += " ";
} else { } else {
b1 = true; b1 = true;
@ -195,7 +195,7 @@ void QalculateInsertMatrixVectorDialog::slotOk() {
bool b2 = false; bool b2 = false;
for(int index_c = 0; index_c < c; index_c++) { for(int index_c = 0; index_c < c; index_c++) {
if(b2) { if(b2) {
matrixstr += CALCULATOR->getComma(); matrixstr += CALCULATOR->getComma().c_str();
matrixstr += " "; matrixstr += " ";
} else { } else {
b2 = true; b2 = true;
@ -219,7 +219,7 @@ void QalculateInsertMatrixVectorDialog::insertSelection() {
TQString str2 = elementsTable->text(index_r, index_c).stripWhiteSpace(); TQString str2 = elementsTable->text(index_r, index_c).stripWhiteSpace();
if(!str2.isEmpty()) { if(!str2.isEmpty()) {
if(b) { if(b) {
matrixstr += CALCULATOR->getComma(); matrixstr += CALCULATOR->getComma().c_str();
matrixstr += " "; matrixstr += " ";
} else { } else {
b = true; b = true;
@ -235,7 +235,7 @@ void QalculateInsertMatrixVectorDialog::insertSelection() {
bool b1 = false; bool b1 = false;
for(int index_r = sel.topRow(); index_r <= sel.bottomRow(); index_r++) { for(int index_r = sel.topRow(); index_r <= sel.bottomRow(); index_r++) {
if(b1) { if(b1) {
matrixstr += CALCULATOR->getComma(); matrixstr += CALCULATOR->getComma().c_str();
matrixstr += " "; matrixstr += " ";
} else { } else {
b1 = true; b1 = true;
@ -244,7 +244,7 @@ void QalculateInsertMatrixVectorDialog::insertSelection() {
bool b2 = false; bool b2 = false;
for(int index_c = sel.leftCol(); index_c <= sel.rightCol(); index_c++) { for(int index_c = sel.leftCol(); index_c <= sel.rightCol(); index_c++) {
if(b2) { if(b2) {
matrixstr += CALCULATOR->getComma(); matrixstr += CALCULATOR->getComma().c_str();
matrixstr += " "; matrixstr += " ";
} else { } else {
b2 = true; b2 = true;

Loading…
Cancel
Save