diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-04-09 16:23:37 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-04-09 16:39:14 +0200 |
commit | 65e4a2c516bec4af7b7e5c4980c1c2a3666c08a8 (patch) | |
tree | c8a0d84af4fae42741e09b91a2dbf542a931c19a /src/qalculate_tde_utils.h | |
parent | d1f45355013d5347e6dc72289cebc8dc197f6e8f (diff) | |
download | qalculate-tde-65e4a2c516bec4af7b7e5c4980c1c2a3666c08a8.tar.gz qalculate-tde-65e4a2c516bec4af7b7e5c4980c1c2a3666c08a8.zip |
Rename qalculate-kde to qalculate-tde
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'src/qalculate_tde_utils.h')
-rw-r--r-- | src/qalculate_tde_utils.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/src/qalculate_tde_utils.h b/src/qalculate_tde_utils.h new file mode 100644 index 0000000..0e36469 --- /dev/null +++ b/src/qalculate_tde_utils.h @@ -0,0 +1,74 @@ +/*************************************************************************** + * Copyright (C) 2005 by Niklas Knutsson * + * nq@altern.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef QALCULATE_TDE_UTILS_H +#define QALCULATE_TDE_UTILS_H + +#include <libqalculate/qalculate.h> +#undef insertItem +#undef addItem +#undef setItem +#undef getItem + +#include <qstring.h> +#include <kshortcut.h> + +class QLabel; +class QLineEdit; + +struct tree_struct { + string item; + list<tree_struct> items; + list<tree_struct>::iterator it; + list<tree_struct>::reverse_iterator rit; + vector<void*> objects; + tree_struct *parent; + void sort() { + items.sort(); + for(list<tree_struct>::iterator it = items.begin(); it != items.end(); ++it) { + it->sort(); + } + } + bool operator < (tree_struct &s1) const { + return item < s1.item; + } +}; +struct mode_struct { + PrintOptions po; + EvaluationOptions eo; + AssumptionType at; + AssumptionSign as; + int precision; + QString name; + bool rpn_mode; + KShortcut shortcut; +}; + +void insert_text_in_expression(const QString &str); +bool is_answer_variable(Variable *v); +QString get_value_string(const MathStructure &mstruct_, bool rlabel = false, Prefix *prefix = NULL); +void set_name_label_and_entry(ExpressionItem *item, QLineEdit *entry, QLabel *label); +bool can_display_unicode_string_function(const char *str, void *arg); +void generate_units_tree_struct(); +void generate_functions_tree_struct(); +void generate_variables_tree_struct(); +size_t save_mode_as(QString name, bool *new_mode = NULL); + +#endif |