summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/IdentifyTextCodecDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/dialogs/IdentifyTextCodecDialog.cpp')
-rw-r--r--src/gui/dialogs/IdentifyTextCodecDialog.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/gui/dialogs/IdentifyTextCodecDialog.cpp b/src/gui/dialogs/IdentifyTextCodecDialog.cpp
index 07b5ec1..c07d887 100644
--- a/src/gui/dialogs/IdentifyTextCodecDialog.cpp
+++ b/src/gui/dialogs/IdentifyTextCodecDialog.cpp
@@ -30,34 +30,34 @@
#include "base/NotationTypes.h"
#include <kcombobox.h>
#include <kdialogbase.h>
-#include <qfont.h>
-#include <qlabel.h>
-#include <qstring.h>
-#include <qtextcodec.h>
-#include <qvbox.h>
-#include <qwidget.h>
+#include <tqfont.h>
+#include <tqlabel.h>
+#include <tqstring.h>
+#include <tqtextcodec.h>
+#include <tqvbox.h>
+#include <tqwidget.h>
namespace Rosegarden
{
-IdentifyTextCodecDialog::IdentifyTextCodecDialog(QWidget *parent,
+IdentifyTextCodecDialog::IdentifyTextCodecDialog(TQWidget *parent,
std::string text) :
KDialogBase(parent, 0, true, i18n("Choose Text Encoding"), Ok),
m_text(text)
{
- QVBox *vbox = makeVBoxMainWidget();
- new QLabel(i18n("\nThis file contains text in an unknown language encoding.\n\nPlease select one of the following estimated text encodings\nfor use with the text in this file:\n"), vbox);
+ TQVBox *vbox = makeVBoxMainWidget();
+ new TQLabel(i18n("\nThis file contains text in an unknown language encoding.\n\nPlease select one of the following estimated text encodings\nfor use with the text in this file:\n"), vbox);
KComboBox *codecs = new KComboBox(vbox);
std::string defaultCodec;
- QTextCodec *cc = QTextCodec::codecForContent(text.c_str(), text.length());
- QTextCodec *codec = 0;
+ TQTextCodec *cc = TQTextCodec::codecForContent(text.c_str(), text.length());
+ TQTextCodec *codec = 0;
std::cerr << "cc is " << (cc ? cc->name() : "null") << std::endl;
- std::map<std::string, QString> codecDescriptions;
+ std::map<std::string, TQString> codecDescriptions;
codecDescriptions["SJIS"] = i18n("Japanese Shift-JIS");
codecDescriptions["UTF-8"] = i18n("Unicode variable-width");
codecDescriptions["ISO 8859-1"] = i18n("Western Europe");
@@ -90,7 +90,7 @@ IdentifyTextCodecDialog::IdentifyTextCodecDialog(QWidget *parent,
(m_text.c_str(), m_text.length());
}
- while ((codec = QTextCodec::codecForIndex(i)) != 0) {
+ while ((codec = TQTextCodec::codecForIndex(i)) != 0) {
int probability = codec->heuristicContentMatch
(m_text.c_str(), m_text.length());
@@ -111,7 +111,7 @@ IdentifyTextCodecDialog::IdentifyTextCodecDialog(QWidget *parent,
cc = codec;
}
- QString description = codecDescriptions[name];
+ TQString description = codecDescriptions[name];
if (description == "") {
if (strtoqstr(name).left(3) == "CP ") {
description = i18n("Microsoft Code Page %1").
@@ -136,13 +136,13 @@ IdentifyTextCodecDialog::IdentifyTextCodecDialog(QWidget *parent,
++i;
}
- connect(codecs, SIGNAL(activated(int)),
- this, SLOT(slotCodecSelected(int)));
+ connect(codecs, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotCodecSelected(int)));
- new QLabel(i18n("\nExample text from file:"), vbox);
- m_example = new QLabel("", vbox);
- QFont font;
- font.setStyleHint(QFont::TypeWriter);
+ new TQLabel(i18n("\nExample text from file:"), vbox);
+ m_example = new TQLabel("", vbox);
+ TQFont font;
+ font.setStyleHint(TQFont::TypeWriter);
m_example->setFont(font);
m_example->setPaletteForegroundColor(Qt::blue);
std::cerr << "calling slotCodecSelected(" << current << ")" << std::endl;
@@ -160,11 +160,11 @@ IdentifyTextCodecDialog::slotCodecSelected(int i)
// std::cerr << "codecs: ";
// for (int j = 0; j < m_codecs.size(); ++j) std::cerr << m_codecs[j] << " ";
// std::cerr << std::endl;
- QTextCodec *codec = QTextCodec::codecForName(strtoqstr(name));
+ TQTextCodec *codec = TQTextCodec::codecForName(strtoqstr(name));
if (!codec) return;
m_codec = qstrtostr(codec->name());
std::cerr << "Applying codec " << m_codec << std::endl;
- QString outText = codec->toUnicode(m_text.c_str(), m_text.length());
+ TQString outText = codec->toUnicode(m_text.c_str(), m_text.length());
if (outText.length() > 80) outText = outText.left(80);
m_example->setText("\"" + outText + "\"");
}