diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:31:18 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:31:18 -0600 |
commit | 58ed6eb0cbce97f0c662eaafc536fd0399466ede (patch) | |
tree | 8c59dbc70711b7354dcfcffe1c0613424ff186e6 /src/notes.cpp | |
parent | 9ef287f39039c26a478bbc1a304dca91f03f55d6 (diff) | |
download | knowit-58ed6eb0cbce97f0c662eaafc536fd0399466ede.tar.gz knowit-58ed6eb0cbce97f0c662eaafc536fd0399466ede.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'src/notes.cpp')
-rw-r--r-- | src/notes.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/notes.cpp b/src/notes.cpp index 870c7af..faf0786 100644 --- a/src/notes.cpp +++ b/src/notes.cpp @@ -19,8 +19,8 @@ #include <tqstringlist.h> #include <tqfile.h> #include <tqdatetime.h> -#include <tqtextstream.h> -#include <tqtextcodec.h> +#include <textstream.h> +#include <textcodec.h> #include <klocale.h> #include <klistview.h> #include <kglobal.h> @@ -51,8 +51,8 @@ TQString TNoteLink::text(int fmt) const if (fmt == LinkOnly || description.isEmpty()) return link; else if (fmt == DescriptionOnly) return description; else if (fmt == LinkDescription) - return TQString("%1 (%2)").tqarg(link).tqarg(description); - else return TQString("%1 (%2)").tqarg(description).tqarg(link); + return TQString("%1 (%2)").arg(link).arg(description); + else return TQString("%1 (%2)").arg(description).arg(link); } TQPixmap TNoteLink::icon() const @@ -238,7 +238,7 @@ bool TNote::saveHTML(const KURL& fname, const TQString& origname, const TQString ts << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n" "<html>\n<head>\n <title>" << i18n("KnowIt document") << TQString("</title>\n <meta http-equiv=\"Content-Type\" " - "content=\"text/html; charset=%1\">\n").tqarg(ts.codec()->mimeName()); + "content=\"text/html; charset=%1\">\n").arg(ts.codec()->mimeName()); if (!style.isEmpty()) ts << " <style type=\"text/css\">\n " << style << "\n </style>\n"; ts << "</head>\n\n<body>\n"; @@ -246,7 +246,7 @@ bool TNote::saveHTML(const KURL& fname, const TQString& origname, const TQString TQValueVector<int> Depths; Depths.append(0); if (flags & TOC) { - ts << TQString("<h1>%1</h1>\n").tqarg(i18n("Table of contents")); + ts << TQString("<h1>%1</h1>\n").arg(i18n("Table of contents")); saveHTMLTocEntry(ts, Depths, flags); ts << "\n\n"; } @@ -256,9 +256,9 @@ bool TNote::saveHTML(const KURL& fname, const TQString& origname, const TQString saveHTMLBuf(ts, Depths, flags); TQString epilog = i18n("Exported from %1 by KnowIt %2, %3."); - ts << "<br><br><br><small>" << epilog.tqarg(origname) - .tqarg(VERSION) - .tqarg(TQDateTime::tqcurrentDateTime().toString()) << "</small>\n\n"; + ts << "<br><br><br><small>" << epilog.arg(origname) + .arg(VERSION) + .arg(TQDateTime::currentDateTime().toString()) << "</small>\n\n"; ts << "</body>\n</html>\n\n"; return true; } @@ -272,12 +272,12 @@ bool TNote::saveHTMLBuf(TQTextStream& ts, TQValueVector<int>& depths, else if (hlevel > 3) hlevel = 3; TQString id, number; for (uint i=0; i<depths.count(); i++) - id += TQString("%1.").tqarg(depths[i]); + id += TQString("%1.").arg(depths[i]); if (flags & Enumerate) number = id + " "; - ts << TQString("<h%1 id=\"S%2\">%3%4</h%5>").tqarg(hlevel).tqarg(id).tqarg(number) - .tqarg(item->text(0)).tqarg(hlevel); + ts << TQString("<h%1 id=\"S%2\">%3%4</h%5>").arg(hlevel).arg(id).arg(number) + .arg(item->text(0)).arg(hlevel); TQString htmltext = text; int begin = htmltext.find("<body"); if (begin >= 0) begin = htmltext.find(">", begin); @@ -289,14 +289,14 @@ bool TNote::saveHTMLBuf(TQTextStream& ts, TQValueVector<int>& depths, /* save links */ for (TQValueList<TNoteLink>::Iterator LinkList = links.begin(); LinkList != links.end(); ++LinkList) - ts << TQString("<a href=\"%1\">%2</a><br>\n").tqarg((*LinkList).link) - .tqarg((*LinkList).text(TNoteLink::DescriptionOnly)); + ts << TQString("<a href=\"%1\">%2</a><br>\n").arg((*LinkList).link) + .arg((*LinkList).text(TNoteLink::DescriptionOnly)); /* save rule */ if (flags & AddRule) ts << "<hr size=\"1\" noshade>\n\n"; else ts << "\n\n"; - /* save tqchildren */ + /* save children */ if ((SaveSubnotes | SaveAll) & flags && item->childCount()) { depths.append(0); collection->find(item->firstChild())->saveHTMLBuf(ts, depths, flags); @@ -321,11 +321,11 @@ bool TNote::saveHTMLTocEntry(TQTextStream& ts, TQValueVector<int>& depths, int f TQString id, number; for (uint i=0; i<depths.count(); i++) - id += TQString("%1.").tqarg(depths[i]); + id += TQString("%1.").arg(depths[i]); if (flags & Enumerate) number = id + " "; ts << space; - ts << TQString("<dt><a href=\"#S%1\">%2%3</a></dt>\n").tqarg(id).tqarg(number). + ts << TQString("<dt><a href=\"#S%1\">%2%3</a></dt>\n").arg(id).arg(number). arg(item->text(0)); if ((SaveSubnotes | SaveAll) & flags && item->childCount()) { depths.append(0); @@ -397,9 +397,9 @@ void TNote::save(TQTextStream& ts, bool current) const TQString activeheader = "\\CurrentEntry %1 %2\n"; if (current) - ts << activeheader.tqarg(item->depth()).tqarg(item->text(0)); + ts << activeheader.arg(item->depth()).arg(item->text(0)); else - ts << header.tqarg(item->depth()).tqarg(item->text(0)); + ts << header.arg(item->depth()).arg(item->text(0)); for (TQValueList<TNoteLink>::Iterator LinkList = links.begin(); LinkList != links.end(); ++LinkList) (*LinkList).save(ts); |