diff options
Diffstat (limited to 'src/preferences.cpp')
-rw-r--r-- | src/preferences.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/preferences.cpp b/src/preferences.cpp index 0803552..7d768ec 100644 --- a/src/preferences.cpp +++ b/src/preferences.cpp @@ -31,11 +31,11 @@ #include <dirent.h> #include <stdio.h> #include <klocale.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <ktextbrowser.h> -#include <qwidgetstack.h> -#include <qpushbutton.h> -#include <qvaluevector.h> +#include <tqwidgetstack.h> +#include <tqpushbutton.h> +#include <tqvaluevector.h> PrintOptions printops; EvaluationOptions evalops; @@ -44,8 +44,8 @@ bool rpn_keypad_only; bool load_global_defs, fetch_exchange_rates_at_startup, first_time, first_qalculate_run, save_mode_on_exit, save_defs_on_exit; bool use_custom_result_font, use_custom_expression_font, use_custom_status_font; int use_icon_buttons; -QString custom_result_font, custom_expression_font, custom_status_font; -QColor status_warning_color, status_error_color; +TQString custom_result_font, custom_expression_font, custom_status_font; +TQColor status_warning_color, status_error_color; bool display_expression_status; bool close_to_systray; @@ -54,41 +54,41 @@ bool enable_expression_completion; PlotLegendPlacement default_plot_legend_placement; bool default_plot_display_grid; bool default_plot_full_border; -QString default_plot_min; -QString default_plot_max; -QString default_plot_step; +TQString default_plot_min; +TQString default_plot_max; +TQString default_plot_step; int default_plot_sampling_rate; bool default_plot_use_sampling_rate; bool default_plot_rows; int default_plot_type; PlotStyle default_plot_style; PlotSmoothing default_plot_smoothing; -QString default_plot_variable; +TQString default_plot_variable; bool default_plot_color; bool enable_plot_expression_completion; bool canplot; -QString initial_history; +TQString initial_history; extern vector<MathFunction*> recent_functions; extern vector<Variable*> recent_variables; extern vector<Unit*> recent_units; -QValueVector<QString> recent_functions_pre; -QValueVector<QString> recent_variables_pre; -QValueVector<QString> recent_units_pre; +TQValueVector<TQString> recent_functions_pre; +TQValueVector<TQString> recent_variables_pre; +TQValueVector<TQString> recent_units_pre; -extern QWidget *expressionWidget; +extern TQWidget *expressionWidget; extern KQalculate *mainWin; -QStringList expression_history; +TQStringList expression_history; bool show_keypad, show_history, show_stack; vector<mode_struct> modes; -QValueVector<QString> inhistory; -QValueVector<int> inhistory_type; -QValueVector<int> inhistory_id; +TQValueVector<TQString> inhistory; +TQValueVector<int> inhistory_type; +TQValueVector<int> inhistory_id; int inhistory_current_id; /* @@ -111,7 +111,7 @@ void set_saved_mode() { modes[1].rpn_mode = rpn_mode; } -size_t save_mode_as(QString name, bool *new_mode) { +size_t save_mode_as(TQString name, bool *new_mode) { name = name.stripWhiteSpace(); size_t index = 0; for(; index < modes.size(); index++) { @@ -250,7 +250,7 @@ void load_preferences() { file = fopen(filename.c_str(), "r"); if(file) { char line[10000]; - QString stmp, svalue, svar; + TQString stmp, svalue, svar; int i; int v; while(true) { @@ -633,7 +633,7 @@ void load_preferences() { if(stmp == "Mode") { mode_index = 1; } else if(stmp.length() > 5) { - QString svar = stmp; + TQString svar = stmp; svar.truncate(4); if(svar == "Mode") { stmp.remove(0, 5); @@ -645,7 +645,7 @@ void load_preferences() { inhistory_current_id = (int) inhistory.size(); int id = inhistory_current_id; id--; - for(QValueVector<QString>::size_type i = 0; i < inhistory.size(); i++) { + for(TQValueVector<TQString>::size_type i = 0; i < inhistory.size(); i++) { inhistory_id.push_back(id); id--; } @@ -695,17 +695,17 @@ void save_preferences(bool mode) { fprintf(file, "custom_result_font=%s\n", custom_result_font.ascii()); fprintf(file, "custom_expression_font=%s\n", custom_expression_font.ascii()); fprintf(file, "custom_status_font=%s\n", custom_status_font.ascii()); - if(status_error_color != QColor("red")) fprintf(file, "status_error_color=%s\n", status_error_color.name().ascii()); - if(status_warning_color != QColor("blue")) fprintf(file, "status_warning_color=%s\n", status_warning_color.name().ascii()); + if(status_error_color != TQColor("red")) fprintf(file, "status_error_color=%s\n", status_error_color.name().ascii()); + if(status_warning_color != TQColor("blue")) fprintf(file, "status_warning_color=%s\n", status_warning_color.name().ascii()); fprintf(file, "multiplication_sign=%i\n", printops.multiplication_sign); fprintf(file, "division_sign=%i\n", printops.division_sign); - for (QStringList::Iterator it = ((QalculateExpressionEdit*) expressionWidget)->expression_history.begin(); it != ((QalculateExpressionEdit*) expressionWidget)->expression_history.end(); ++it) { + for (TQStringList::Iterator it = ((QalculateExpressionEdit*) expressionWidget)->expression_history.begin(); it != ((QalculateExpressionEdit*) expressionWidget)->expression_history.end(); ++it) { fprintf(file, "expression_history=%s\n", (*it).ascii()); } int lines = 50; bool end_after_result = false; bool doend = false; - for(QValueVector<QString>::size_type i = 0; i < inhistory.size() && !doend; i++) { + for(TQValueVector<TQString>::size_type i = 0; i < inhistory.size() && !doend; i++) { switch(inhistory_type[i]) { case QALCULATE_HISTORY_EXPRESSION: { fprintf(file, "history_expression="); @@ -763,8 +763,8 @@ void save_preferences(bool mode) { if(inhistory[i].find("<br>") < 0) { fprintf(file, "%s\n", inhistory[i].ascii()); } else { - QStringList slist = QStringList::split("<br>", inhistory[i], true); - for(QStringList::size_type i2 = 0; i2 < slist.size(); i2++) { + TQStringList slist = TQStringList::split("<br>", inhistory[i], true); + for(TQStringList::size_type i2 = 0; i2 < slist.size(); i2++) { if(i2 == 0) fprintf(file, "%s\n", slist[i2].ascii()); else fprintf(file, "history_continued=%s\n", slist[i2].ascii()); } |