From 11f31c37e5fa4889d9989f10272f44845449cb7b Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 6 Sep 2010 20:59:29 +0000 Subject: Initial TQt conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/gui/dialogs/IdentifyTextCodecDialog.cpp | 44 ++++++++++++++--------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/gui/dialogs/IdentifyTextCodecDialog.cpp') 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 #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include 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 codecDescriptions; + std::map 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 + "\""); } -- cgit v1.2.3