Compare commits

...

40 Commits

Author SHA1 Message Date
Slávek Banko 8dba1b4176
Remove the original translation directory layout.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 20616c2d72)
4 years ago
Slávek Banko 761e0ef0fe
Copy translations to a new directory layout.
Added translation of .desktop files.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit c494295ce5)
4 years ago
Slávek Banko 1928b5fa09
Drop automake build support.
Rework the README and INSTALL files.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit cc9c5c67c9)
4 years ago
TDE Gitea 8ea04868e8 Reset submodule main/applications/utilities/qalculate-tde/admin to latest HEAD 4 years ago
Slávek Banko a43120053e
Raise the minimum required version of CMake to 3.1 in CMakeL10n rules.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit ff6923c45a)
4 years ago
Slávek Banko c53a6a5764
Raise the minimum required version of CMake to 3.1.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 179128f9a1)
4 years ago
Slávek Banko bb7d97d7a6
Update version number to R14.0.12.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
4 years ago
Slávek Banko c806a7ef14
The operator< should be const, so it can be applied to const tree_struct.
This resolves FTBFS on FreeBSD.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 2e4f150a47)
4 years ago
TDE Gitea 7f8e26359d Merge translation files from master branch. 4 years ago
Slávek Banko 337cc14529
CMake: Add a check whether QALCULATE_LIBRARIES works
without need to explicitly add CLN_LIBRARIES.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit e926ed5b1b)
4 years ago
Slávek Banko 8cf5fe99d8
Added controlled conversions to char* instead of automatic ascii conversions.
The definition of -UTQT_NO_ASCII_CAST is no longer needed.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit c9792a21ad)
4 years ago
gregory guy 776ef1e137
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>
(cherry picked from commit 2fe98299ba)
4 years ago
TDE Gitea 2b195ec5b2 Update translation template. 4 years ago
Slávek Banko 1a844ae774
Remove cmake submodule since it has now been replaced by cmake-trinity dependency.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
4 years ago
TDE Gitea be396820f3 Reset submodule main/applications/qalculate-tde/cmake to latest HEAD 4 years ago
TDE Gitea 0b556428df Reset submodule main/applications/qalculate-tde/cmake to latest HEAD 5 years ago
TDE Gitea addcda60b7 Reset submodule main/applications/qalculate-tde/admin to latest HEAD 5 years ago
TDE Gitea c37626be45 Reset submodule main/applications/qalculate-tde/cmake to latest HEAD 5 years ago
TDE Gitea 543b810613 Reset submodule main/applications/qalculate-tde/cmake to latest HEAD 5 years ago
TDE Gitea 305fe8fd1c Reset submodule main/applications/qalculate-tde/admin to latest HEAD 5 years ago
TDE Gitea eab5aa28dd Reset submodule main/applications/qalculate-tde/cmake to latest HEAD 5 years ago
TDE Gitea d49a6c47b9 Reset submodule main/applications/qalculate-tde/cmake to latest HEAD 5 years ago
TDE Gitea 9689d1aad6 Reset submodule main/applications/qalculate-tde/admin to latest HEAD 5 years ago
Slávek Banko c51b38cad6 Update translation template. 5 years ago
aneejit1 acc3790c3c
Fix undeclared declarations of string/vector/list; prefix declarations with 'std::'
Signed-off-by: aneejit1 <aneejit1@gmail.com>
(cherry picked from commit 208f77024e)
5 years ago
TDE Gitea ec5a7752bc Reset submodule main/applications/qalculate-tde/cmake to latest HEAD 5 years ago
TDE Gitea a63ce47262 Reset submodule main/applications/qalculate-tde/admin to latest HEAD 5 years ago
Michele Calgaro 6ea3538eb8
Removed code formatting modelines.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 9fbf40254d)
5 years ago
TDE Gitea 16c87b15a4 Reset submodule main/applications/qalculate-tde/cmake to latest HEAD 5 years ago
TDE Gitea 60882d8ac9 Reset submodule main/applications/qalculate-tde/admin to latest HEAD 5 years ago
TDE Gitea 3776492382 Reset submodule main/applications/qalculate-tde/cmake to latest HEAD 5 years ago
TDE Gitea af0fd06aa6 Reset submodule main/applications/qalculate-tde/admin to latest HEAD 5 years ago
Michele Calgaro 1190a12688
Reset submodule admin and cmake to latest HEAD.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
5 years ago
TDE Weblate 4d385bdaf7
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: applications/qalculate-tde
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/applications/qalculate-tde/
(cherry picked from commit be71451e9d)
5 years ago
Slávek Banko aee9550df7
Update translation template.
(cherry picked from commit b8898997af)
5 years ago
Slávek Banko 7051c5391a
Switch all submodules to https.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 33d2f1174c)
5 years ago
TDE Weblate 7859bf4766
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: applications/qalculate-tde
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/applications/qalculate-tde/
(cherry picked from commit ab86491019)
5 years ago
Slávek Banko 1d45bfd30d
Update translation template.
(cherry picked from commit c3d9422123)
5 years ago
TDE Weblate 5e9219743d
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: applications/qalculate-tde
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/applications/qalculate-tde/
(cherry picked from commit 2a53a8172e)
5 years ago
Slávek Banko 702cda7662
Add CMakeL10n rules.
Update translation template.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit df736f207b)
5 years ago

6
.gitmodules vendored

@ -1,6 +0,0 @@
[submodule "admin"]
path = admin
url = http://system@scm.trinitydesktop.org/scm/git/tde-common-admin
[submodule "cmake"]
path = cmake
url = http://system@scm.trinitydesktop.org/scm/git/tde-common-cmake

@ -0,0 +1,23 @@
#################################################
#
# (C) 2019 Slávek Banko
# slavek.banko (AT) axis.cz
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
cmake_minimum_required( VERSION 3.1 )
##### include our cmake modules #################
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEL10n )
##### create translation templates ##############
tde_l10n_auto_add_subdirectories( )

@ -0,0 +1,78 @@
############################################
# #
# Improvements and feedbacks are welcome #
# #
# This file is released under GPL >= 3 #
# #
############################################
cmake_minimum_required( VERSION 3.1 )
#### general package setup
project( qalculate_tde )
set( VERSION R14.0.12 )
#### 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 )
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_project_translations( BUILD_TRANSLATIONS )
##### write configure files
configure_file( config.h.cmake config.h @ONLY )

@ -0,0 +1,62 @@
###########################################
# #
# 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 )
##### check if libqalculate requires explicitly link libcln
tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
set( CMAKE_REQUIRED_INCLUDES ${QALCULATE_INCLUDE_DIRS} )
set( CMAKE_REQUIRED_LIBRARIES ${QALCULATE_LIBRARIES} )
check_cxx_source_compiles("
#include <libqalculate/qalculate.h>
int main(int argc, char **argv) { Number n; return 0; } "
QALCULATE_LIBRARIES_WORKS
)
if( NOT QALCULATE_LIBRARIES_WORKS )
pkg_search_module( CLN cln )
if( NOT CLN_FOUND )
tde_message_fatal( "libqalculate require CLN library but it was not found on your system." )
endif( NOT CLN_FOUND )
list( APPEND QALCULATE_LIBRARIES ${CLN_LIBRARIES} )
message( STATUS "Added CLN_LIBRARIES to QALCULATE_LIBRARIES" )
endif( )
tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )

@ -1,167 +1,22 @@
Basic Installation
==================
These are generic installation instructions.
qalculate-tde relies on cmake to build.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
Here are suggested default options:
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
-DCMAKE_INSTALL_PREFIX="/opt/trinity" \
-DCONFIG_INSTALL_DIR="/etc/trinity" \
-DSYSCONF_INSTALL_DIR="/etc/trinity" \
-DXDG_MENU_INSTALL_DIR="/etc/xdg/menus" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_VERBOSE_MAKEFILE="ON" \
-DCMAKE_SKIP_RPATH="OFF" \
-DBUILD_ALL="ON" \
-DWITH_ALL_OPTIONS="ON"
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes a while. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Type `make install' to install the programs and any data files and
documentation.
4. You can remove the program binaries and object files from the
source code directory by typing `make clean'.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
Requirements:
=============
- libqalculate

@ -1,22 +0,0 @@
SUBDIRS = $(TOPSUBDIRS)
$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;
$(top_srcdir)/subdirs:
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in
@cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4
MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files
package-messages:
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common package-messages
$(MAKE) -C po merge
EXTRA_DIST = admin COPYING configure.in.in
dist-hook:
cd $(top_distdir) && perl admin/am_edit -padmin
cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs

@ -1,10 +0,0 @@
all:
@echo "This Makefile is only for the CVS repository"
@echo "This will be deleted before making the distribution"
@echo ""
$(MAKE) -f admin/Makefile.common cvs
dist:
$(MAKE) -f admin/Makefile.common dist
.SILENT:

@ -0,0 +1,36 @@
Qalculate! TDE - powerful and easy to use desktop calculator.
Qalculate! is small and simple to use but with much power and versatility
underneath. Features include customizable functions, units, arbitrary
precision, plotting, and a graphical interface that uses a one-line
fault-tolerant expression entry (although it supports optional
traditional buttons).
This application contains the TDE user interface of qalculate.
.
Contributing
--------------
If you wish to contribute to qalculate-tde, you might do so:
- TDE Gitea Workspace (TGW) collaboration tool.
https://mirror.git.trinitydesktop.org/gitea
- TDE Weblate Translation Workspace (TWTW) collaboration tool.
https://mirror.git.trinitydesktop.org/weblate
Translations status
---------------------
### messages
[![Translations status](https://mirror.git.trinitydesktop.org/weblate/widgets/applications/-/qalculate-tde/multi-auto.svg
"Engage in translating")](https://mirror.git.trinitydesktop.org/weblate/projects/applications/qalculate-tde/)
### desktop files
[![Translations status](https://mirror.git.trinitydesktop.org/weblate/widgets/applications/-/qalculate-tde-desktop-files/multi-auto.svg
"Engage in translating")](https://mirror.git.trinitydesktop.org/weblate/projects/applications/qalculate-tde-desktop-files/)

@ -1 +0,0 @@
Subproject commit 04c35f89e0b556b38fa0ba19a8af6db426e59686

@ -1 +0,0 @@
Subproject commit edad8a20b944d45f366acc15b2cd4d291ce3a5dd

@ -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,20 +0,0 @@
#MIN_CONFIG(3.1.0)
AM_INIT_AUTOMAKE(qalculate_tde, 0.9.7)
AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN
AC_CHECK_LIB(pthread, pthread_create, [LIBS="$LIBS -lpthread"])
AC_LANG([C++])
PKG_CHECK_MODULES(QALCULATE, [
libqalculate >= 0.9.6
])
AC_SUBST(QALCULATE_CFLAGS)
AC_SUBST(QALCULATE_LIBS)
LIBS="$LIBS $QALCULATE_LIBS"
CFLAGS="$CFLAGS $QALCULATE_CFLAGS"
CPPFLAGS="$CPPFLAGS $QALCULATE_CFLAGS"
CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS"

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

@ -1,4 +0,0 @@
# the SUBDIRS is filled automatically by am_edit. If files are
# in this directory they are installed into the english dir
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

@ -1513,16 +1513,3 @@ Documentation copyright 2005 Niklas Knutsson <email>nq@altern.org</email>
&documentation.index;
</book>
<!--
Local Variables:
mode: sgml
sgml-minimize-attributes:nil
sgml-general-insert-case:lower
sgml-indent-step:0
sgml-indent-data:nil
End:
vim:tabstop=2:shiftwidth=2:expandtab
-->

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

@ -1,2 +0,0 @@
POFILES = AUTO

@ -0,0 +1,8 @@
##### create translation templates ##############
tde_l10n_create_template( "messages/qalculate_tde" )
tde_l10n_create_template(
CATALOG "desktop_files/qalculate_tde-desktops"
SOURCES *.desktop
)

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

@ -1,60 +0,0 @@
# set the include path for X, qt and KDE
INCLUDES = $(all_includes)
# these are the headers for your project
# let automoc handle all of the meta source files (moc)
METASOURCES = AUTO
messages: rc.cpp
$(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp
$(XGETTEXT) *.cpp -o $(podir)/qalculate_tde.pot
KDE_ICON = AUTO
#########################################################################
# APPLICATION SECTION
#########################################################################
# this is the program that gets installed. it's name is used for all
# of the other Makefile.am variables
bin_PROGRAMS = qalculate-tde
# the application source, library search path, and link libraries
qalculate_tde_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
qalculate_tde_LDFLAGS = $(KDE_RPATH) $(all_libraries)
qalculate_tde_LDADD = $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEIO) -lcln
# this is where the desktop file will go
shelldesktopdir = $(xdg_appsdir)
shelldesktop_DATA = qalculate_tde.desktop
# this is where the shell's XML-GUI resource file goes
shellrcdir = $(kde_datadir)/qalculate_tde
shellrc_DATA = qalculate_tdeui.rc
noinst_HEADERS = preferences.h qalculateinsertfunctiondialog.h qalculateinsertmatrixvectordialog.h \
buttonwithindexsignal.h qalculateexpressionedit.h qalculateconvertnumberbasesdialog.h \
qalculatebuttonwithdata.h qalculatesetbasedialog.h \
qalculatevariablesdialog.h qalculatefunctionsdialog.h qalculateunitsdialog.h \
qalculateeditunknownvariabledialog.h qalculatedecimalsdialog.h qalculateconvertunitsdialog.h \
qalculateprecisiondialog.h qalculateeditunitdialog.h qalculateeditnamesdialog.h \
qalculateeditfunctiondialog.h qalculateplotdialog.h qalculateimportcsvdialog.h \
qalculateexportcsvdialog.h qalculatepreferencesdialog.h qalculateeditmatrixvectordialog.h \
qalculatedatasetsdialog.h qalculateeditdatasetdialog.h qalculateeditdataobjectdialog.h \
qalculateresultdisplay.h
install-exec-local:
install -d $(DESTDIR)$(bindir)
rm -f $(DESTDIR)$(bindir)/qalculate
$(LN_S) qalculate-tde $(DESTDIR)$(bindir)/qalculate

@ -79,6 +79,9 @@
#include <math.h>
#include <dirent.h>
#include <pthread.h>
#include <vector>
#include <string>
#include <stack>
#include <tqsimplerichtext.h>
#include <tqstatusbar.h>
#include <tqwidgetstack.h>
@ -139,11 +142,11 @@ extern bool enable_expression_completion;
extern TQString initial_history;
extern tree_struct function_cats, unit_cats, variable_cats;
extern vector<void*> ia_units, ia_variables, ia_functions;
extern vector<MathFunction*> recent_functions;
extern vector<Variable*> recent_variables;
extern vector<Unit*> recent_units;
vector<MathStructure> result_parts;
extern std::vector<void*> ia_units, ia_variables, ia_functions;
extern std::vector<MathFunction*> recent_functions;
extern std::vector<Variable*> recent_variables;
extern std::vector<Unit*> recent_units;
std::vector<MathStructure> result_parts;
KnownVariable *vans[5];
int vans_id_start[5];
@ -174,7 +177,7 @@ uint initial_result_index = 0;
extern bool show_keypad, show_history, show_stack;
extern vector<mode_struct> modes;
extern std::vector<mode_struct> modes;
extern TQValueVector<TQString> inhistory;
extern TQValueVector<int> inhistory_type;
@ -1416,7 +1419,7 @@ TQString draw_structure(MathStructure &m, const TQFont &font, const TQColorGroup
if(m.precision() > 0 && (ips_n.parent_precision < 1 || m.precision() < ips_n.parent_precision)) ips_n.parent_precision = m.precision();
switch(m.type()) {
case STRUCT_NUMBER: {
string exp = "";
std::string exp = "";
bool exp_minus;
ips_n.exp = &exp;
ips_n.exp_minus = &exp_minus;
@ -1465,8 +1468,8 @@ TQString draw_structure(MathStructure &m, const TQFont &font, const TQColorGroup
ips_n.depth++;
vector<TQString> terms;
vector<bool> do_space;
std::vector<TQString> terms;
std::vector<bool> do_space;
for(size_t i = 0; i < m.size(); i++) {
if(m[i].type() == STRUCT_NEGATE && i > 0) {
ips_n.wrap = m[i][0].needsParenthesis(po, ips_n, m, i + 1, ips.division_depth > 0 || ips.power_depth > 0, ips.power_depth > 0);
@ -1526,9 +1529,9 @@ TQString draw_structure(MathStructure &m, const TQFont &font, const TQColorGroup
}
bool par_prev = false;
vector<int> nm;
vector<TQString> terms;
vector<bool> do_space;
std::vector<int> nm;
std::vector<TQString> terms;
std::vector<bool> do_space;
for(size_t i = 0; i < m.size(); i++) {
ips_n.wrap = m[i].needsParenthesis(po, ips_n, m, i + 1, ips.division_depth > 0 || ips.power_depth > 0, ips.power_depth > 0);
terms.push_back(draw_structure(m[i], font, cg, po, ips_n));
@ -1647,7 +1650,7 @@ TQString draw_structure(MathStructure &m, const TQFont &font, const TQColorGroup
h = (int) (textsmall.height() / 1.5);
h += h % 2;
string filename = getLocalDir();
std::string filename = getLocalDir();
if(saved_divisionline_height != h) {
TQPixmap *pixmap = new TQPixmap(10, h);
@ -1974,11 +1977,11 @@ TQString draw_structure(MathStructure &m, const TQFont &font, const TQColorGroup
TQString str;
const ExpressionName *ename = &m.unit()->preferredDisplayName(po.abbreviate_names, po.use_unicode_signs, m.isPlural(), po.use_reference_names, po.can_display_unicode_string_function, po.can_display_unicode_string_arg);
if(m.prefix()) {
str += m.prefix()->name(po.abbreviate_names && ename->abbreviation && (ename->suffix || ename->name.find("_") == string::npos), po.use_unicode_signs, po.can_display_unicode_string_function, po.can_display_unicode_string_arg).c_str();
str += m.prefix()->name(po.abbreviate_names && ename->abbreviation && (ename->suffix || ename->name.find("_") == std::string::npos), po.use_unicode_signs, po.can_display_unicode_string_function, po.can_display_unicode_string_arg).c_str();
}
if(ename->suffix && ename->name.length() > 1) {
size_t i = ename->name.rfind('_');
bool b = i == string::npos || i == ename->name.length() - 1 || i == 0;
bool b = i == std::string::npos || i == ename->name.length() - 1 || i == 0;
size_t i2 = 1;
if(b) {
if(is_in(NUMBERS, ename->name[ename->name.length() - 1])) {
@ -2026,7 +2029,7 @@ TQString draw_structure(MathStructure &m, const TQFont &font, const TQColorGroup
const ExpressionName *ename = &m.variable()->preferredDisplayName(po.abbreviate_names, po.use_unicode_signs, false, po.use_reference_names, po.can_display_unicode_string_function, po.can_display_unicode_string_arg);
if(ename->suffix && ename->name.length() > 1) {
size_t i = ename->name.rfind('_');
bool b = i == string::npos || i == ename->name.length() - 1 || i == 0;
bool b = i == std::string::npos || i == ename->name.length() - 1 || i == 0;
size_t i2 = 1;
if(b) {
if(is_in(NUMBERS, ename->name[ename->name.length() - 1])) {
@ -2077,7 +2080,7 @@ TQString draw_structure(MathStructure &m, const TQFont &font, const TQColorGroup
const ExpressionName *ename = &m.function()->preferredDisplayName(po.abbreviate_names, po.use_unicode_signs, false, po.use_reference_names, po.can_display_unicode_string_function, po.can_display_unicode_string_arg);
if(ename->suffix && ename->name.length() > 1) {
size_t i = ename->name.rfind('_');
bool b = i == string::npos || i == ename->name.length() - 1 || i == 0;
bool b = i == std::string::npos || i == ename->name.length() - 1 || i == 0;
size_t i2 = 1;
if(b) {
if(is_in(NUMBERS, ename->name[ename->name.length() - 1])) {
@ -2326,7 +2329,7 @@ void *view_proc(void *pipe) {
if(mm && m.isMatrix()) {
mm->set(m);
MathStructure mm2(m);
string mstr;
std::string mstr;
int c = mm->columns(), r = mm->rows();
for(int index_r = 0; index_r < r; index_r++) {
for(int index_c = 0; index_c < c; index_c++) {
@ -2422,7 +2425,7 @@ void reduceDivLineSize(QalculateResultDisplay *resultLabel) {
h = (int) (textsmall.height() / 1.5);
h += h % 2;
string filename = getLocalDir();
std::string filename = getLocalDir();
if(saved_divisionline_height != h) {
TQPixmap *pixmap = new TQPixmap(10, h);
@ -3030,7 +3033,7 @@ void KQalculate::execute_expression2() {
if(f) CALCULATOR->calculateRPN(f, 0, evalops, parsed_mstruct);
else CALCULATOR->calculateRPN(op, 0, evalops, parsed_mstruct);
} else {
string str2 = CALCULATOR->unlocalizeExpression(str.ascii(), evalops.parse_options);
std::string str2 = CALCULATOR->unlocalizeExpression(str.ascii(), evalops.parse_options);
CALCULATOR->parseSigns(str2);
if(str2.length() == 1) {
do_mathoperation = true;
@ -3291,13 +3294,13 @@ void KQalculate::create_vmenu() {
menu_variables_ids.clear();
stack<TQPopupMenu*> menus;
std::stack<TQPopupMenu*> menus;
menus.push(sub);
sub3 = sub;
while(titem) {
sub = new TQPopupMenu();
TQObject::connect(sub, SIGNAL(activated(int)), this, SLOT(onVariableMenuItemActivated(int)));
if(titem->item.find('&') != string::npos) {
if(titem->item.find('&') != std::string::npos) {
TQString str2 = titem->item.c_str();
str2.replace("&", "&&");
sub3->insertItem(str2, sub, -1, 0);
@ -3309,7 +3312,7 @@ void KQalculate::create_vmenu() {
for(size_t i = 0; i < titem->objects.size(); i++) {
v = (Variable*) titem->objects[i];
if(v->isActive() && !v->isHidden()) {
if(v->title(true).find('&') != string::npos) {
if(v->title(true).find('&') != std::string::npos) {
TQString str2 = v->title(true).c_str();
str2.replace("&", "&&");
menu_variables_ids[sub->insertItem(str2)] = v;
@ -3386,13 +3389,13 @@ void KQalculate::create_fmenu() {
menu_functions_ids.clear();
stack<TQPopupMenu*> menus;
std::stack<TQPopupMenu*> menus;
menus.push(sub);
sub3 = sub;
while(titem) {
sub = new TQPopupMenu();
TQObject::connect(sub, SIGNAL(activated(int)), this, SLOT(onFunctionMenuItemActivated(int)));
if(titem->item.find('&') != string::npos) {
if(titem->item.find('&') != std::string::npos) {
TQString str2 = titem->item.c_str();
str2.replace("&", "&&");
sub3->insertItem(str2, sub, -1, 0);
@ -3404,7 +3407,7 @@ void KQalculate::create_fmenu() {
for(size_t i = 0; i < titem->objects.size(); i++) {
f = (MathFunction*) titem->objects[i];
if(f->isActive() && !f->isHidden()) {
if(f->title(true).find('&') != string::npos) {
if(f->title(true).find('&') != std::string::npos) {
TQString str2 = f->title(true).c_str();
str2.replace("&", "&&");
menu_functions_ids[sub->insertItem(str2)] = f;
@ -3484,13 +3487,13 @@ void KQalculate::create_umenu() {
menu_units_ids.clear();
stack<TQPopupMenu*> menus;
std::stack<TQPopupMenu*> menus;
menus.push(sub);
sub3 = sub;
while(titem) {
sub = new TQPopupMenu();
TQObject::connect(sub, SIGNAL(activated(int)), this, SLOT(onUnitMenuItemActivated(int)));
if(titem->item.find('&') != string::npos) {
if(titem->item.find('&') != std::string::npos) {
TQString str2 = titem->item.c_str();
str2.replace("&", "&&");
sub3->insertItem(str2, sub, -1, 0);
@ -3502,7 +3505,7 @@ void KQalculate::create_umenu() {
for(size_t i = 0; i < titem->objects.size(); i++) {
u = (Unit*) titem->objects[i];
if(u->isActive() && !u->isHidden()) {
if(u->title(true).find('&') != string::npos) {
if(u->title(true).find('&') != std::string::npos) {
TQString str2 = u->title(true).c_str();
str2.replace("&", "&&");
menu_units_ids[sub->insertItem(str2)] = u;
@ -3608,13 +3611,13 @@ void KQalculate::create_toumenu() {
menu_to_unit_ids.clear();
stack<TQPopupMenu*> menus;
std::stack<TQPopupMenu*> menus;
menus.push(sub);
sub3 = sub;
while(titem) {
sub = new TQPopupMenu();
TQObject::connect(sub, SIGNAL(activated(int)), this, SLOT(onConvertToUnitMenuItemActivated(int)));
if(titem->item.find('&') != string::npos) {
if(titem->item.find('&') != std::string::npos) {
TQString str2 = titem->item.c_str();
str2.replace("&", "&&");
sub3->insertItem(str2, sub, -1, 0);
@ -3626,7 +3629,7 @@ void KQalculate::create_toumenu() {
for(size_t i = 0; i < titem->objects.size(); i++) {
u = (Unit*) titem->objects[i];
if(u->isActive() && !u->isHidden()) {
if(u->title(true).find('&') != string::npos) {
if(u->title(true).find('&') != std::string::npos) {
TQString str2 = u->title(true).c_str();
str2.replace("&", "&&");
menu_to_unit_ids[sub->insertItem(str2)] = u;
@ -6286,7 +6289,7 @@ void KQalculate::displayParseStatus() {
return;
}
MathStructure mparse, mfunc;
string str_e, str_u;
std::string str_e, str_u;
int pos = expressionEdit->cursorPosition();
bool full_parsed = false;
bool had_errors = false, had_warnings = false;

@ -24,6 +24,7 @@
#include "kqalculate.h"
#include "preferences.h"
#include <string>
#include <twin.h>
#include <kuniqueapplication.h>
#include <tdeaboutdata.h>
@ -152,7 +153,7 @@ void start_qalculate() {
CALCULATOR->loadExchangeRates();
string ans_str = i18n("ans").ascii();
std::string ans_str = i18n("ans").ascii();
vans[0] = (KnownVariable*) CALCULATOR->addVariable(new KnownVariable(i18n("Temporary").ascii(), ans_str, m_undefined, i18n("Last Answer").ascii(), false));
vans[0]->addName(i18n("answer").ascii());
vans[0]->addName(ans_str + "1");

@ -30,6 +30,8 @@
#include <unistd.h>
#include <dirent.h>
#include <stdio.h>
#include <vector>
#include <string>
#include <tdelocale.h>
#include <tqstringlist.h>
#include <ktextbrowser.h>
@ -71,9 +73,9 @@ bool canplot;
TQString initial_history;
extern vector<MathFunction*> recent_functions;
extern vector<Variable*> recent_variables;
extern vector<Unit*> recent_units;
extern std::vector<MathFunction*> recent_functions;
extern std::vector<Variable*> recent_variables;
extern std::vector<Unit*> recent_units;
TQValueVector<TQString> recent_functions_pre;
TQValueVector<TQString> recent_variables_pre;
TQValueVector<TQString> recent_units_pre;
@ -84,7 +86,7 @@ TQStringList expression_history;
bool show_keypad, show_history, show_stack;
vector<mode_struct> modes;
std::vector<mode_struct> modes;
TQValueVector<TQString> inhistory;
TQValueVector<int> inhistory_type;
@ -232,7 +234,7 @@ void load_preferences() {
load_global_defs = true;
fetch_exchange_rates_at_startup = false;
first_time = false;
string filename = getLocalDir();
std::string filename = getLocalDir();
DIR *dir = opendir(filename.c_str());
if(!dir) {
first_qalculate_run = true;
@ -661,12 +663,12 @@ void load_preferences() {
void save_preferences(bool mode) {
FILE *file = NULL;
string filename = getLocalDir();
std::string filename = getLocalDir();
mkdir(filename.c_str(), S_IRWXU);
filename += "qalculate-tde.cfg";
file = fopen(filename.c_str(), "w+");
if(file == NULL) {
fprintf(stderr, i18n("Couldn't write preferences to\n%s"), filename.c_str());
fprintf(stderr, i18n("Couldn't write preferences to\n%s").local8Bit(), filename.c_str());
return;
}
fprintf(file, "\n[General]\n");

@ -1,13 +1,16 @@
[Desktop Entry]
Name=Qalculate!
GenericName=Scientific Calculator
Comment=Powerful and easy to use desktop calculator
Type=Application
Exec=qalculate-tde
Icon=qalculate_tde
Type=Application
X-DocPath=qalculate_tde/index.html
Categories=Qt;TDE;Utility;Science;
Terminal=false
Categories=Qt;TDE;Utility;Science;
X-DocPath=qalculate_tde/index.html
X-DCOP-ServiceType=Unique
X-DCOP-ServiceName=qalculate_tde
X-TDE-StartupNotify=true
Comment=Powerful and easy to use desktop calculator

@ -19,6 +19,9 @@
***************************************************************************/
#include "qalculate_tde_utils.h"
#include <vector>
#include <string>
#include <list>
#include <tqwidget.h>
#include <tqlabel.h>
#include <tqlineedit.h>
@ -28,10 +31,10 @@
#include "kqalculate.h"
tree_struct function_cats, unit_cats, variable_cats;
vector<void*> ia_units, ia_variables, ia_functions;
vector<MathFunction*> recent_functions;
vector<Variable*> recent_variables;
vector<Unit*> recent_units;
std::vector<void*> ia_units, ia_variables, ia_functions;
std::vector<MathFunction*> recent_functions;
std::vector<Variable*> recent_variables;
std::vector<Unit*> recent_units;
extern PrintOptions printops;
extern KnownVariable *vans[5];
extern TQWidget *topWidget;
@ -81,13 +84,13 @@ bool can_display_unicode_string_function(const char *str, void *arg) {
void generate_units_tree_struct() {
size_t cat_i, cat_i_prev;
bool b;
string str, cat, cat_sub;
std::string str, cat, cat_sub;
Unit *u = NULL;
unit_cats.items.clear();
unit_cats.objects.clear();
unit_cats.parent = NULL;
ia_units.clear();
list<tree_struct>::iterator it;
std::list<tree_struct>::iterator it;
for(size_t i = 0; i < CALCULATOR->units.size(); i++) {
if(!CALCULATOR->units[i]->isActive()) {
b = false;
@ -107,7 +110,7 @@ void generate_units_tree_struct() {
cat_i = cat.find("/"); cat_i_prev = 0;
b = false;
while(true) {
if(cat_i == string::npos) {
if(cat_i == std::string::npos) {
cat_sub = cat.substr(cat_i_prev, cat.length() - cat_i_prev);
} else {
cat_sub = cat.substr(cat_i_prev, cat_i - cat_i_prev);
@ -129,7 +132,7 @@ void generate_units_tree_struct() {
item = &*it;
item->item = cat_sub;
}
if(cat_i == string::npos) {
if(cat_i == std::string::npos) {
break;
}
cat_i_prev = cat_i + 1;
@ -156,13 +159,13 @@ void generate_variables_tree_struct() {
size_t cat_i, cat_i_prev;
bool b;
string str, cat, cat_sub;
std::string str, cat, cat_sub;
Variable *v = NULL;
variable_cats.items.clear();
variable_cats.objects.clear();
variable_cats.parent = NULL;
ia_variables.clear();
list<tree_struct>::iterator it;
std::list<tree_struct>::iterator it;
for(size_t i = 0; i < CALCULATOR->variables.size(); i++) {
if(!CALCULATOR->variables[i]->isActive()) {
//deactivated variable
@ -183,7 +186,7 @@ void generate_variables_tree_struct() {
cat_i = cat.find("/"); cat_i_prev = 0;
b = false;
while(true) {
if(cat_i == string::npos) {
if(cat_i == std::string::npos) {
cat_sub = cat.substr(cat_i_prev, cat.length() - cat_i_prev);
} else {
cat_sub = cat.substr(cat_i_prev, cat_i - cat_i_prev);
@ -205,7 +208,7 @@ void generate_variables_tree_struct() {
item = &*it;
item->item = cat_sub;
}
if(cat_i == string::npos) {
if(cat_i == std::string::npos) {
break;
}
cat_i_prev = cat_i + 1;
@ -232,13 +235,13 @@ void generate_functions_tree_struct() {
size_t cat_i, cat_i_prev;
bool b;
string str, cat, cat_sub;
std::string str, cat, cat_sub;
MathFunction *f = NULL;
function_cats.items.clear();
function_cats.objects.clear();
function_cats.parent = NULL;
ia_functions.clear();
list<tree_struct>::iterator it;
std::list<tree_struct>::iterator it;
for(size_t i = 0; i < CALCULATOR->functions.size(); i++) {
if(!CALCULATOR->functions[i]->isActive()) {
@ -260,7 +263,7 @@ void generate_functions_tree_struct() {
cat_i = cat.find("/"); cat_i_prev = 0;
b = false;
while(true) {
if(cat_i == string::npos) {
if(cat_i == std::string::npos) {
cat_sub = cat.substr(cat_i_prev, cat.length() - cat_i_prev);
} else {
cat_sub = cat.substr(cat_i_prev, cat_i - cat_i_prev);
@ -282,7 +285,7 @@ void generate_functions_tree_struct() {
item = &*it;
item->item = cat_sub;
}
if(cat_i == string::npos) {
if(cat_i == std::string::npos) {
break;
}
cat_i_prev = cat_i + 1;

@ -21,6 +21,9 @@
#ifndef QALCULATE_TDE_UTILS_H
#define QALCULATE_TDE_UTILS_H
#include <vector>
#include <string>
#include <list>
#include <libqalculate/qalculate.h>
#undef insertItem
#undef addItem
@ -34,21 +37,22 @@ class TQLabel;
class TQLineEdit;
struct tree_struct {
string item;
list<tree_struct> items;
list<tree_struct>::iterator it;
list<tree_struct>::reverse_iterator rit;
vector<void*> objects;
std::string item;
std::list<tree_struct> items;
std::list<tree_struct>::iterator it;
std::list<tree_struct>::reverse_iterator rit;
std::vector<void*> objects;
tree_struct *parent;
void sort() {
items.sort();
for(list<tree_struct>::iterator it = items.begin(); it != items.end(); ++it) {
for(std::list<tree_struct>::iterator it = items.begin(); it != items.end(); ++it) {
it->sort();
}
}
bool operator < (tree_struct &s1) const {
return item < s1.item;
}
bool operator < (const tree_struct &s1) const
{
return item < s1.item;
}
};
struct mode_struct {
PrintOptions po;

@ -19,6 +19,7 @@
***************************************************************************/
#include "qalculateconvertnumberbasesdialog.h"
#include "qalculate_tde_utils.h"
#include <string>
#include <tdelocale.h>
#include <tqgrid.h>
#include <tqlabel.h>
@ -59,7 +60,7 @@ QalculateConvertNumberBasesDialog::QalculateConvertNumberBasesDialog(TQWidget *p
QalculateConvertNumberBasesDialog::~QalculateConvertNumberBasesDialog() {}
void QalculateConvertNumberBasesDialog::setDecimalValue(const TQString &qstr) {
string str = qstr.ascii();
std::string str = qstr.ascii();
remove_blank_ends(str);
if(str.empty()) return;
if(is_in(OPERATORS EXP, str[str.length() - 1])) return;
@ -69,7 +70,7 @@ void QalculateConvertNumberBasesDialog::setDecimalValue(const TQString &qstr) {
updateEntries(&value, 10);
}
void QalculateConvertNumberBasesDialog::setBinaryValue(const TQString &qstr) {
string str = qstr.ascii();
std::string str = qstr.ascii();
remove_blank_ends(str);
if(str.empty()) return;
if(is_in(OPERATORS EXP, str[str.length() - 1])) return;
@ -80,7 +81,7 @@ void QalculateConvertNumberBasesDialog::setBinaryValue(const TQString &qstr) {
updateEntries(&value, 2);
}
void QalculateConvertNumberBasesDialog::setOctalValue(const TQString &qstr) {
string str = qstr.ascii();
std::string str = qstr.ascii();
remove_blank_ends(str);
if(str.empty()) return;
if(is_in(OPERATORS EXP, str[str.length() - 1])) return;
@ -91,7 +92,7 @@ void QalculateConvertNumberBasesDialog::setOctalValue(const TQString &qstr) {
updateEntries(&value, 8);
}
void QalculateConvertNumberBasesDialog::setHexadecimalValue(const TQString &qstr) {
string str = qstr.ascii();
std::string str = qstr.ascii();
remove_blank_ends(str);
if(str.empty()) return;
if(is_in(OPERATORS EXP, str[str.length() - 1])) return;

@ -20,6 +20,8 @@
#include "qalculateconvertunitsdialog.h"
#include "qalculate_tde_utils.h"
#include <vector>
#include <string>
#include <tqlabel.h>
#include <klineedit.h>
#include <tdelocale.h>
@ -34,7 +36,7 @@
#include <tqsplitter.h>
extern tree_struct unit_cats;
extern vector<void*> ia_units;
extern std::vector<void*> ia_units;
extern PrintOptions printops;
extern EvaluationOptions evalops;
@ -183,7 +185,7 @@ void QalculateConvertUnitsDialog::categorySelected() {
no_cat = true;
}
if(!b_all && !no_cat && selected_category[0] == '/') {
string str = selected_category.ascii();
std::string str = selected_category.ascii();
str.erase(str.begin());
for(size_t i = 0; i < CALCULATOR->units.size(); i++) {
if(CALCULATOR->units[i]->isActive() && !CALCULATOR->units[i]->isHidden() && CALCULATOR->units[i]->category().substr(0, selected_category.length() - 1) == str) {
@ -191,7 +193,7 @@ void QalculateConvertUnitsDialog::categorySelected() {
}
}
} else {
string str = selected_category.ascii();
std::string str = selected_category.ascii();
for(size_t i = 0; i < CALCULATOR->units.size(); i++) {
if(CALCULATOR->units[i]->isActive() && !CALCULATOR->units[i]->isHidden() && (b_all || (no_cat && CALCULATOR->units[i]->category().empty()) || CALCULATOR->units[i]->category() == str)) {
addUnitTreeItem(CALCULATOR->units[i]);

@ -19,6 +19,7 @@
***************************************************************************/
#include "qalculateeditdataobjectdialog.h"
#include "qalculate_tde_utils.h"
#include <string>
#include <tqlabel.h>
#include <tqgrid.h>
#include <klineedit.h>
@ -51,10 +52,10 @@ DataObject *QalculateEditDataObjectDialog::editDataObject(DataSet *ds, DataObjec
new TQLabel(i18n("Approximation"), grid);
DataPropertyIter it;
DataProperty *dp = ds->getFirstProperty(&it);
string sval;
std::string sval;
TQValueVector<KLineEdit*> value_entries;
TQValueVector<KComboBox*> approx_menus;
string str;
std::string str;
while(dp) {
new TQLabel(dp->title().c_str(), grid);
KLineEdit *entry = new KLineEdit(grid);

@ -21,6 +21,7 @@
#include "qalculate_tde_utils.h"
#include "qalculateeditnamesdialog.h"
#include <string>
#include <tqgrid.h>
#include <klineedit.h>
#include <kpushbutton.h>
@ -204,7 +205,7 @@ void QalculateEditDataSetDialog::updateDatasetPropertyList() {
void QalculateEditDataSetDialog::slotOk() {
string str = nameEdit->text().ascii();
std::string str = nameEdit->text().ascii();
remove_blank_ends(str);
if(str.empty() && (!names_edit_dialog || names_edit_dialog->isEmpty())) {
//no name -- open dialog again
@ -491,7 +492,7 @@ QalculateEditDataPropertyDialog::~QalculateEditDataPropertyDialog() {}
void QalculateEditDataPropertyDialog::slotOk() {
string str = nameEdit->text().ascii();
std::string str = nameEdit->text().ascii();
remove_blank_ends(str);
if(str.empty() && (!names_edit_dialog || names_edit_dialog->isEmpty())) {
//no name -- open dialog again

@ -21,6 +21,7 @@
#include "qalculate_tde_utils.h"
#include "qalculateeditnamesdialog.h"
#include <string>
#include <tqgrid.h>
#include <klineedit.h>
#include <kpushbutton.h>
@ -178,9 +179,9 @@ void QalculateEditFunctionDialog::argumentRenamed(TQListViewItem *i, const TQStr
void QalculateEditFunctionDialog::slotOk() {
string str = nameEdit->text().ascii();
std::string str = nameEdit->text().ascii();
remove_blank_ends(str);
string str2 = CALCULATOR->unlocalizeExpression(expressionEdit->text().ascii(), evalops.parse_options);
std::string str2 = CALCULATOR->unlocalizeExpression(expressionEdit->text().ascii(), evalops.parse_options);
remove_blank_ends(str2);
gsub("\n", " ", str2);
if(str.empty() && (!names_edit_dialog || names_edit_dialog->isEmpty())) {

@ -21,6 +21,7 @@
#include "qalculate_tde_utils.h"
#include "qalculateeditnamesdialog.h"
#include <string>
#include <tqgrid.h>
#include <klineedit.h>
#include <tqpushbutton.h>
@ -177,7 +178,7 @@ KnownVariable *QalculateEditMatrixVectorDialog::newMatrix(TQString category) {
}
void QalculateEditMatrixVectorDialog::slotOk() {
string str = nameEdit->text().ascii();
std::string str = nameEdit->text().ascii();
remove_blank_ends(str);
if(str.empty() && (!names_edit_dialog || names_edit_dialog->isEmpty())) {
//no name -- open dialog again
@ -202,7 +203,7 @@ void QalculateEditMatrixVectorDialog::slotOk() {
int c = columnsBox->value();
if(vectorButton->isChecked()) {
mstruct_new.clearVector();
string str2;
std::string str2;
for(int index_r = 0; index_r < r; index_r++) {
for(int index_c = 0; index_c < c; index_c++) {
if(!elementsTable->text(index_r, index_c).isEmpty()) {

@ -21,6 +21,7 @@
#include "qalculate_tde_utils.h"
#include "qalculateeditnamesdialog.h"
#include <string>
#include <tqgrid.h>
#include <klineedit.h>
#include <tqpushbutton.h>
@ -138,7 +139,7 @@ void QalculateEditUnitDialog::slotHelp() {
}
void QalculateEditUnitDialog::slotOk() {
string str = nameEdit->text().ascii();
std::string str = nameEdit->text().ascii();
remove_blank_ends(str);
if(str.empty() && (!names_edit_dialog || names_edit_dialog->isEmpty())) {
//no name -- open dialog again

@ -21,6 +21,7 @@
#include "qalculate_tde_utils.h"
#include "qalculateeditnamesdialog.h"
#include <string>
#include <tqgrid.h>
#include <klineedit.h>
#include <tqpushbutton.h>
@ -124,7 +125,7 @@ void QalculateEditUnknownVariableDialog::slotHelp() {
}
void QalculateEditUnknownVariableDialog::slotOk() {
string str = nameEdit->text().ascii();
std::string str = nameEdit->text().ascii();
remove_blank_ends(str);
if(str.empty() && (!names_edit_dialog || names_edit_dialog->isEmpty())) {
//no name -- open dialog again

@ -21,6 +21,7 @@
#include "qalculate_tde_utils.h"
#include "qalculateeditnamesdialog.h"
#include <string>
#include <tqgrid.h>
#include <klineedit.h>
#include <tqpushbutton.h>
@ -94,7 +95,7 @@ void QalculateEditVariableDialog::slotHelp() {
}
void QalculateEditVariableDialog::slotOk() {
string str = nameEdit->text().ascii();
std::string str = nameEdit->text().ascii();
remove_blank_ends(str);
if(str.empty() && (!names_edit_dialog || names_edit_dialog->isEmpty())) {
//no name -- open dialog again
@ -102,7 +103,7 @@ void QalculateEditVariableDialog::slotOk() {
KMessageBox::error(this, i18n("Empty name field"));
return;
}
string str2 = valueEdit->text().ascii();
std::string str2 = valueEdit->text().ascii();
remove_blank_ends(str2);
if(!(init_value && force_init_value) && str2.empty()) {
//no value -- open dialog again

@ -20,6 +20,7 @@
#include "qalculateexportcsvdialog.h"
#include "qalculate_tde_utils.h"
#include <string>
#include <tqlayout.h>
#include <kurlrequester.h>
#include <klineedit.h>
@ -93,7 +94,7 @@ void QalculateExportCSVDialog::slotOk() {
KMessageBox::error(this, i18n("No file name entered."));
return;
}
string delimiter = "";
std::string delimiter = "";
switch(delimiterCombo->currentItem()) {
case 0: {
delimiter = ",";
@ -128,7 +129,7 @@ void QalculateExportCSVDialog::slotOk() {
} else if(currentResultButton->isChecked()) {
matrix_struct = mstruct;
} else {
string str2 = matrixVectorEdit->text().ascii();
std::string str2 = matrixVectorEdit->text().ascii();
remove_blank_ends(str2);
if(str2.empty()) {
matrixVectorEdit->setFocus();
@ -151,7 +152,7 @@ void QalculateExportCSVDialog::slotOk() {
}
if(!CALCULATOR->exportCSV(*matrix_struct, str.ascii(), delimiter)) {
TQString error_str;
error_str.sprintf(i18n("Could not export to file \n%s"), str.ascii());
error_str.sprintf(i18n("Could not export to file \n%s").utf8(), str.ascii());
KMessageBox::error(this, error_str);
reject();
}

@ -21,6 +21,8 @@
#include "qalculate_tde_utils.h"
#include "kqalculate.h"
#include <vector>
#include <string>
#include <tdeversion.h>
#include <kcursor.h>
#include <tqstyle.h>
@ -35,14 +37,14 @@
#include <tdelocale.h>
#include <tqsimplerichtext.h>
extern vector<mode_struct> modes;
extern std::vector<mode_struct> modes;
extern KQalculate *mainWin;
extern PrintOptions printops;
extern EvaluationOptions evalops;
extern bool rpn_mode, rpn_keypad_only;
extern tree_struct function_cats, unit_cats, variable_cats;
extern vector<void*> ia_units, ia_variables, ia_functions;
extern std::vector<void*> ia_units, ia_variables, ia_functions;
class QalculateExpressionEditListBoxItem : public TQListBoxItem {
@ -411,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;
}
@ -419,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;
}
@ -726,11 +728,11 @@ void set_title(ExpressionItem *item, TQString &title) {
}
}
string sub_suffix(const ExpressionName *ename) {
std::string sub_suffix(const ExpressionName *ename) {
size_t i = ename->name.rfind('_');
bool b = i == string::npos || i == ename->name.length() - 1 || i == 0;
bool b = i == std::string::npos || i == ename->name.length() - 1 || i == 0;
size_t i2 = 1;
string str;
std::string str;
if(b) {
if(is_in(NUMBERS, ename->name[ename->name.length() - 1])) {
while(ename->name.length() > i2 + 1 && is_in(NUMBERS, ename->name[ename->name.length() - 1 - i2])) {
@ -749,7 +751,7 @@ string sub_suffix(const ExpressionName *ename) {
}
TQString makeListName(ExpressionItem *item, TQWidget *w, int *italic_index, bool *rich_text) {
string str;
std::string str;
const ExpressionName *ename, *ename_r;
*rich_text = false;
bool b = false;

@ -20,6 +20,8 @@
#include "qalculatefunctionsdialog.h"
#include "qalculate_tde_utils.h"
#include "qalculateeditfunctiondialog.h"
#include <vector>
#include <string>
#include <kpushbutton.h>
#include <tqsplitter.h>
#include <tqvbox.h>
@ -33,7 +35,7 @@
#include <kstdguiitem.h>
extern tree_struct function_cats;
extern vector<void*> ia_functions;
extern std::vector<void*> ia_functions;
extern PrintOptions printops;
QalculateFunctionsDialog::QalculateFunctionsDialog(TQWidget *parent, const char *name) : KDialog(parent, name, false) {
@ -364,7 +366,7 @@ void QalculateFunctionsDialog::functionSelected() {
str += "<br>";
if(f->subtype() == SUBTYPE_DATA_SET) {
str += "<br>";
str2.sprintf(i18n("Retrieves data from the %s data set for a given object and property. If \"info\" is typed as property, a dialog window will pop up with all properties of the object."), f->title().c_str());
str2.sprintf(i18n("Retrieves data from the %s data set for a given object and property. If \"info\" is typed as property, a dialog window will pop up with all properties of the object.").utf8(), f->title().c_str());
str2.replace("<", "&lt;");
str2.replace(">", "&gt;");
str += str2;
@ -510,7 +512,7 @@ void QalculateFunctionsDialog::categorySelected() {
b_inactive = true;
}
if(!b_all && !no_cat && !b_inactive && selected_category[0] == '/') {
string str = selected_category.ascii();
std::string str = selected_category.ascii();
str.erase(str.begin());
for(size_t i = 0; i < CALCULATOR->functions.size(); i++) {
if(CALCULATOR->functions[i]->isActive() && CALCULATOR->functions[i]->category().substr(0, selected_category.length() - 1) == str) {
@ -518,7 +520,7 @@ void QalculateFunctionsDialog::categorySelected() {
}
}
} else {
string str = selected_category.ascii();
std::string str = selected_category.ascii();
for(size_t i = 0; i < CALCULATOR->functions.size(); i++) {
if((b_inactive && !CALCULATOR->functions[i]->isActive()) || (CALCULATOR->functions[i]->isActive() && (b_all || (no_cat && CALCULATOR->functions[i]->category().empty()) || (!b_inactive && CALCULATOR->functions[i]->category() == str)))) {
addFunctionTreeItem(CALCULATOR->functions[i]);

@ -20,6 +20,7 @@
#include "qalculateimportcsvdialog.h"
#include "qalculate_tde_utils.h"
#include <string>
#include <tqlayout.h>
#include <kurlrequester.h>
#include <klineedit.h>
@ -116,7 +117,7 @@ void QalculateImportCSVDialog::slotOk() {
KMessageBox::error(this, i18n("No file name entered."));
return;
}
string delimiter = "";
std::string delimiter = "";
switch(delimiterCombo->currentItem()) {
case 0: {
delimiter = ",";

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

@ -20,6 +20,8 @@
#include "qalculateplotdialog.h"
#include "qalculateexpressionedit.h"
#include <vector>
#include <string>
#include <klineedit.h>
#include <kpushbutton.h>
#include <kcombobox.h>
@ -587,7 +589,7 @@ void QalculatePlotDialog::applyAppearance() {
updatePlot();
}
bool QalculatePlotDialog::generatePlot(PlotParameters &pp, vector<MathStructure> &y_vectors, vector<MathStructure> &x_vectors, vector<PlotDataParameters*> &pdps) {
bool QalculatePlotDialog::generatePlot(PlotParameters &pp, std::vector<MathStructure> &y_vectors, std::vector<MathStructure> &x_vectors, std::vector<PlotDataParameters*> &pdps) {
TQListViewItemIterator it(seriesView);
if(!it.current()) {
return false;
@ -736,9 +738,9 @@ void QalculatePlotDialog::savePlot() {
}
}
}
vector<MathStructure> y_vectors;
vector<MathStructure> x_vectors;
vector<PlotDataParameters*> pdps;
std::vector<MathStructure> y_vectors;
std::vector<MathStructure> x_vectors;
std::vector<PlotDataParameters*> pdps;
PlotParameters pp;
if(generatePlot(pp, y_vectors, x_vectors, pdps)) {
pp.filename = filename.ascii();
@ -750,9 +752,9 @@ void QalculatePlotDialog::savePlot() {
}
}
void QalculatePlotDialog::updatePlot() {
vector<MathStructure> y_vectors;
vector<MathStructure> x_vectors;
vector<PlotDataParameters*> pdps;
std::vector<MathStructure> y_vectors;
std::vector<MathStructure> x_vectors;
std::vector<PlotDataParameters*> pdps;
PlotParameters pp;
if(!generatePlot(pp, y_vectors, x_vectors, pdps)) {
CALCULATOR->closeGnuplot();
@ -765,7 +767,7 @@ void QalculatePlotDialog::updatePlot() {
if(pdps[i]) delete pdps[i];
}
}
void QalculatePlotDialog::generatePlotSeries(MathStructure **x_vector, MathStructure **y_vector, int type, string str, string str_x) {
void QalculatePlotDialog::generatePlotSeries(MathStructure **x_vector, MathStructure **y_vector, int type, std::string str, std::string str_x) {
EvaluationOptions eo;
eo.approximation = APPROXIMATION_APPROXIMATE;
eo.parse_options = evalops.parse_options;

@ -20,6 +20,8 @@
#ifndef QALCULATEPLOTDIALOG_H
#define QALCULATEPLOTDIALOG_H
#include <vector>
#include <string>
#include <kdialogbase.h>
#include <tqmap.h>
#include <tqstring.h>
@ -63,8 +65,8 @@ public:
TQTabWidget *tabs;
TDEListView *seriesView;
bool generatePlot(PlotParameters &pp, vector<MathStructure> &y_vectors, vector<MathStructure> &x_vectors, vector<PlotDataParameters*> &pdps);
void generatePlotSeries(MathStructure **x_vector, MathStructure **y_vector, int type, string str, string str_x);
bool generatePlot(PlotParameters &pp, std::vector<MathStructure> &y_vectors, std::vector<MathStructure> &x_vectors, std::vector<PlotDataParameters*> &pdps);
void generatePlotSeries(MathStructure **x_vector, MathStructure **y_vector, int type, std::string str, std::string str_x);
TQMap<TQListViewItem*, int> itemStyle;
TQMap<TQListViewItem*, int> itemSmoothing;

@ -21,6 +21,7 @@
#include "qalculate_tde_utils.h"
#include "kqalculate.h"
#include <vector>
#include <tdepopupmenu.h>
#include <kxmlguifactory.h>
#include <kxmlguiclient.h>
@ -32,7 +33,7 @@
#include <tdeapplication.h>
#include <tqsimplerichtext.h>
extern vector<mode_struct> modes;
extern std::vector<mode_struct> modes;
extern TQString parsed_text;
extern KQalculate *mainWin;
@ -145,7 +146,7 @@ TQString linkInfo(const MathStructure *m, TQWidget *w, bool full_length = false)
str += "<br>";
str += "<br>";
TQString str2;
str2.sprintf(i18n("Retrieves data from the %s data set for a given object and property. If \"info\" is typed as property, a dialog window will pop up with all properties of the object."), f->title().c_str());
str2.sprintf(i18n("Retrieves data from the %s data set for a given object and property. If \"info\" is typed as property, a dialog window will pop up with all properties of the object.").utf8(), f->title().c_str());
str2.replace("<", "&lt;");
str2.replace(">", "&gt;");
str += str2;

@ -20,6 +20,8 @@
#include "qalculateunitsdialog.h"
#include "qalculate_tde_utils.h"
#include "qalculateeditunitdialog.h"
#include <vector>
#include <string>
#include <kpushbutton.h>
#include <tqsplitter.h>
#include <tqvbox.h>
@ -37,7 +39,7 @@
#include <kstdguiitem.h>
extern tree_struct unit_cats;
extern vector<void*> ia_units;
extern std::vector<void*> ia_units;
extern PrintOptions printops;
extern EvaluationOptions evalops;
@ -421,7 +423,7 @@ void QalculateUnitsDialog::categorySelected() {
b_inactive = true;
}
if(!b_all && !no_cat && !b_inactive && selected_category[0] == '/') {
string str = selected_category.ascii();
std::string str = selected_category.ascii();
str.erase(str.begin());
for(size_t i = 0; i < CALCULATOR->units.size(); i++) {
if(CALCULATOR->units[i]->isActive() && CALCULATOR->units[i]->category().substr(0, selected_category.length() - 1) == str) {
@ -429,7 +431,7 @@ void QalculateUnitsDialog::categorySelected() {
}
}
} else {
string str = selected_category.ascii();
std::string str = selected_category.ascii();
for(size_t i = 0; i < CALCULATOR->units.size(); i++) {
if((b_inactive && !CALCULATOR->units[i]->isActive()) || (CALCULATOR->units[i]->isActive() && (b_all || (no_cat && CALCULATOR->units[i]->category().empty()) || (!b_inactive && CALCULATOR->units[i]->category() == str)))) {
addUnitTreeItem(CALCULATOR->units[i]);

@ -23,6 +23,8 @@
#include "qalculateeditmatrixvectordialog.h"
#include "qalculateeditunknownvariabledialog.h"
#include "qalculateexportcsvdialog.h"
#include <vector>
#include <string>
#include <kpushbutton.h>
#include <tqsplitter.h>
#include <tqvbox.h>
@ -35,7 +37,7 @@
#include <kstdguiitem.h>
extern tree_struct variable_cats;
extern vector<void*> ia_variables;
extern std::vector<void*> ia_variables;
QalculateVariablesDialog::QalculateVariablesDialog(TQWidget *parent, const char *name) : KDialog(parent, name, false) {
@ -467,7 +469,7 @@ void QalculateVariablesDialog::categorySelected() {
b_inactive = true;
}
if(!b_all && !no_cat && !b_inactive && selected_category[0] == '/') {
string str = selected_category.ascii();
std::string str = selected_category.ascii();
str.erase(str.begin());
for(size_t i = 0; i < CALCULATOR->variables.size(); i++) {
if(CALCULATOR->variables[i]->isActive() && CALCULATOR->variables[i]->category().substr(0, selected_category.length() - 1) == str) {
@ -475,7 +477,7 @@ void QalculateVariablesDialog::categorySelected() {
}
}
} else {
string str = selected_category.ascii();
std::string str = selected_category.ascii();
for(size_t i = 0; i < CALCULATOR->variables.size(); i++) {
if((b_inactive && !CALCULATOR->variables[i]->isActive()) || (CALCULATOR->variables[i]->isActive() && (b_all || (no_cat && CALCULATOR->variables[i]->category().empty()) || (!b_inactive && CALCULATOR->variables[i]->category() == str)))) {
addVariableTreeItem(CALCULATOR->variables[i]);

@ -0,0 +1,32 @@
# SOME DESCRIPTIVE TITLE.
# This file is put in the public domain.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-02-01 15:09+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#. Name
#: qalculate_tde.desktop:2
msgid "Qalculate!"
msgstr ""
#. GenericName
#: qalculate_tde.desktop:4
msgid "Scientific Calculator"
msgstr ""
#. Comment
#: qalculate_tde.desktop:6
msgid "Powerful and easy to use desktop calculator"
msgstr ""

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save