diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-04-09 20:52:09 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-04-09 20:52:09 +0200 |
commit | 91d2d7482c36e67cb36df9d1dcdbd989911e4ceb (patch) | |
tree | c842adfbb1a172d9b61241d7dde70354e821bb75 /src/qalculate_tde_utils.cpp | |
parent | 4870c0c8c53d3df6ba954b2b4d8ebd87a8c43060 (diff) | |
download | qalculate-tde-91d2d7482c36e67cb36df9d1dcdbd989911e4ceb.tar.gz qalculate-tde-91d2d7482c36e67cb36df9d1dcdbd989911e4ceb.zip |
Initial TQt conversion
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'src/qalculate_tde_utils.cpp')
-rw-r--r-- | src/qalculate_tde_utils.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/qalculate_tde_utils.cpp b/src/qalculate_tde_utils.cpp index 7a52429..fb34e9a 100644 --- a/src/qalculate_tde_utils.cpp +++ b/src/qalculate_tde_utils.cpp @@ -19,12 +19,12 @@ ***************************************************************************/ #include "qalculate_tde_utils.h" -#include <qwidget.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qstring.h> -#include <qfont.h> -#include <qfontmetrics.h> +#include <tqwidget.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqstring.h> +#include <tqfont.h> +#include <tqfontmetrics.h> #include "kqalculate.h" tree_struct function_cats, unit_cats, variable_cats; @@ -34,10 +34,10 @@ vector<Variable*> recent_variables; vector<Unit*> recent_units; extern PrintOptions printops; extern KnownVariable *vans[5]; -extern QWidget *topWidget; +extern TQWidget *topWidget; extern KQalculate *mainWin; -void insert_text_in_expression(const QString &str) { +void insert_text_in_expression(const TQString &str) { mainWin->insert_text(str); } @@ -45,20 +45,20 @@ bool is_answer_variable(Variable *v) { return v == vans[0] || v == vans[1] || v == vans[2] || v == vans[3] || v == vans[4]; } -QString get_value_string(const MathStructure &mstruct_, bool rlabel, Prefix *prefix) { +TQString get_value_string(const MathStructure &mstruct_, bool rlabel, Prefix *prefix) { printops.allow_non_usable = rlabel; printops.prefix = prefix; - QString str = CALCULATOR->printMathStructureTimeOut(mstruct_, 100, printops).c_str(); + TQString str = CALCULATOR->printMathStructureTimeOut(mstruct_, 100, printops).c_str(); printops.allow_non_usable = false; printops.prefix = NULL; return str; } -void set_name_label_and_entry(ExpressionItem *item, QLineEdit *entry, QLabel *label) { +void set_name_label_and_entry(ExpressionItem *item, TQLineEdit *entry, TQLabel *label) { const ExpressionName *ename = &item->getName(1); entry->setText(ename->name.c_str()); if(item->countNames() > 1) { - QString str = "+ "; + TQString str = "+ "; for(size_t i = 2; i <= item->countNames(); i++) { if(i > 2) str += ", "; str += item->getName(i).name.c_str(); @@ -69,9 +69,9 @@ void set_name_label_and_entry(ExpressionItem *item, QLineEdit *entry, QLabel *la bool can_display_unicode_string_function(const char *str, void *arg) { if(!arg) arg = (void*) topWidget; - QFontMetrics fm(((QWidget*) arg)->fontMetrics()); - QString qstr(str); - const QChar *qchars = qstr.unicode(); + TQFontMetrics fm(((TQWidget*) arg)->fontMetrics()); + TQString qstr(str); + const TQChar *qchars = qstr.unicode(); for(uint i = 0; i < qstr.length(); i++) { if(!fm.inFont(qchars[i])) return false; } |