diff options
Diffstat (limited to 'kvoctrain/kvoctrain/docprop-dialogs/UsageOptPage.cpp')
-rw-r--r-- | kvoctrain/kvoctrain/docprop-dialogs/UsageOptPage.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/kvoctrain/kvoctrain/docprop-dialogs/UsageOptPage.cpp b/kvoctrain/kvoctrain/docprop-dialogs/UsageOptPage.cpp index 007622a8..96c4a093 100644 --- a/kvoctrain/kvoctrain/docprop-dialogs/UsageOptPage.cpp +++ b/kvoctrain/kvoctrain/docprop-dialogs/UsageOptPage.cpp @@ -30,8 +30,8 @@ #include <kmessagebox.h> #include <klocale.h> -#include <qgroupbox.h> -#include <qpushbutton.h> +#include <tqgroupbox.h> +#include <tqpushbutton.h> #include <QueryManager.h> @@ -39,22 +39,22 @@ UsageOptPage::UsageOptPage ( - const vector<QString> &usages, + const vector<TQString> &usages, kvoctrainDoc *_doc, - QWidget *parent, + TQWidget *parent, const char *name ) : UsageOptPageForm( parent, name ), doc(_doc) { - connect( b_cleanup, SIGNAL(clicked()), SLOT(slotCleanup()) ); - connect( b_delete, SIGNAL(clicked()), SLOT(slotDeleteUsage()) ); - connect( b_modify, SIGNAL(clicked()), SLOT(slotModifyUsage()) ); - connect( b_new, SIGNAL(clicked()), SLOT(slotNewUsage()) ); - connect( usageList, SIGNAL(highlighted(int)), SLOT(slotUsageChosen(int)) ); + connect( b_cleanup, TQT_SIGNAL(clicked()), TQT_SLOT(slotCleanup()) ); + connect( b_delete, TQT_SIGNAL(clicked()), TQT_SLOT(slotDeleteUsage()) ); + connect( b_modify, TQT_SIGNAL(clicked()), TQT_SLOT(slotModifyUsage()) ); + connect( b_new, TQT_SIGNAL(clicked()), TQT_SLOT(slotNewUsage()) ); + connect( usageList, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotUsageChosen(int)) ); - QString str; + TQString str; for (int i = 0; i < (int) usages.size(); i++) { str.setNum (i+1); if (i <= 9) @@ -83,11 +83,11 @@ void UsageOptPage::slotUsageChosen(int index) void UsageOptPage::slotNewUsage() { bool ok; - QString getUsage = KInputDialog::getText( - i18n( "usage (area) of an expression", "Usage Description" ), i18n( "Enter usage description:" ), QString::null, &ok ); + TQString getUsage = KInputDialog::getText( + i18n( "usage (area) of an expression", "Usage Description" ), i18n( "Enter usage description:" ), TQString::null, &ok ); if( !ok ) return; - QString str; + TQString str; int i = usageList->count()+1; str.setNum (i); if (i <= 9) @@ -105,16 +105,16 @@ void UsageOptPage::slotModifyUsage() { if (usageList->count() != 0 && (int) usageList->count() > act_usage) { - QString str = usageList->text (act_usage); + TQString str = usageList->text (act_usage); int pos = str.find (USAGE_TAG); str.remove (0, pos+strlen (USAGE_TAG)); bool ok; - QString getUsage = KInputDialog::getText( + TQString getUsage = KInputDialog::getText( i18n( "usage (area) of an expression", "Usage Description" ), i18n( "Enter usage description:" ), str, &ok ); if( !ok ) return; - QString str2; + TQString str2; str2.setNum (act_usage+1); if (act_usage <= 9) str2.insert (0, " "); @@ -125,7 +125,7 @@ void UsageOptPage::slotModifyUsage() void UsageOptPage::updateListBox(int start) { - QString str, str2; + TQString str, str2; for (int i = start; i < (int) usageList->count(); i++) { str = usageList->text (i); @@ -144,7 +144,7 @@ void UsageOptPage::slotDeleteUsage() int act = act_usage; if (usageList->count() != 0 && (int) usageList->count() > act) { - QString t; + TQString t; t.setNum(usageIndex[act_usage]+1); t.insert (0, UL_USER_USAGE); t += UL_USAGE_DIV; @@ -152,7 +152,7 @@ void UsageOptPage::slotDeleteUsage() // FIXME: ProgressDlg here? kvoctrainExpr *exp = doc->getEntry(ent); for (int lang = 0; lang < doc->numLangs(); lang++) { - QString ul = exp->getUsageLabel(lang) + UL_USAGE_DIV; + TQString ul = exp->getUsageLabel(lang) + UL_USAGE_DIV; if (ul.find(t) >= 0 ) { KMessageBox::information(this, i18n("usage (area) of an expression", @@ -181,10 +181,10 @@ void UsageOptPage::slotDeleteUsage() } -void UsageOptPage::getUsageLabels (vector<QString> &ret_usage, +void UsageOptPage::getUsageLabels (vector<TQString> &ret_usage, vector<int> &ret_Index) { - QString str; ret_usage.clear(); + TQString str; ret_usage.clear(); for (int i = 0; i < (int) usageList->count(); i++) { str = usageList->text(i); int pos = str.find (USAGE_TAG); @@ -203,8 +203,8 @@ void UsageOptPage::slotCleanup() for (int col = 0; col < doc->numLangs(); col++) for (int i = 0; i < (int) doc->numEntries(); i++) { - QString t = doc->getEntry(i)->getUsageLabel(col); - QString n; + TQString t = doc->getEntry(i)->getUsageLabel(col); + TQString n; while (t.left(strlen(UL_USER_USAGE)) == UL_USER_USAGE) { t.remove (0, 1); @@ -248,7 +248,7 @@ void UsageOptPage::cleanUnused(kvoctrainDoc *doc, int old_usages) { vector<int> translate_index; - vector<QString> new_usageStr; + vector<TQString> new_usageStr; ///////////////////////////////////////////////////// // translate_index contains new index number for each @@ -270,11 +270,11 @@ void UsageOptPage::cleanUnused(kvoctrainDoc *doc, for (int col = 0; col < doc->numLangs(); col++) { for (int i = 0; i < doc->numEntries(); i++) { - QString t = doc->getEntry(i)->getUsageLabel (col); + TQString t = doc->getEntry(i)->getUsageLabel (col); if (!t.isEmpty() && t.left(strlen(UL_USER_USAGE)) == UL_USER_USAGE) { - QString tg; + TQString tg; while (t.left(strlen(UL_USER_USAGE)) == UL_USER_USAGE) { - QString n; + TQString n; t.remove (0, 1); int next; if ((next = t.find(UL_USAGE_DIV)) >= 0) { @@ -286,7 +286,7 @@ void UsageOptPage::cleanUnused(kvoctrainDoc *doc, t = ""; } - QString newusage; + TQString newusage; int o = n.toInt(); if (translate_index[o] != 0) { newusage.setNum (translate_index[o]); |