summaryrefslogtreecommitdiffstats
path: root/knode/kncomposer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'knode/kncomposer.cpp')
-rw-r--r--knode/kncomposer.cpp96
1 files changed, 48 insertions, 48 deletions
diff --git a/knode/kncomposer.cpp b/knode/kncomposer.cpp
index 53520e29d..533ad3568 100644
--- a/knode/kncomposer.cpp
+++ b/knode/kncomposer.cpp
@@ -236,9 +236,9 @@ KNComposer::KNComposer(KNLocalArticle *a, const TQString &text, const TQString &
KStdAction::selectAll(this, TQT_SLOT(slotSelectAll()), actionCollection());
KStdAction::find(v_iew->e_dit, TQT_SLOT(slotFind()), actionCollection());
- KStdAction::findNext(v_iew->e_dit, TQT_SLOT(slotSearchAgain()), actionCollection());
+ KStdAction::tqfindNext(v_iew->e_dit, TQT_SLOT(slotSearchAgain()), actionCollection());
- KStdAction::replace(v_iew->e_dit, TQT_SLOT(slotReplace()), actionCollection());
+ KStdAction::tqreplace(v_iew->e_dit, TQT_SLOT(slotReplace()), actionCollection());
//attach menu
new KAction(i18n("Append &Signature"), 0 , this, TQT_SLOT(slotAppendSig()),
@@ -343,7 +343,7 @@ KNComposer::KNComposer(KNLocalArticle *a, const TQString &text, const TQString &
if (firstEdit) { // now we place the cursor at the end of the quoted text / below the attribution line
if (knGlobals.configManager()->postNewsComposer()->cursorOnTop()) {
- int numLines = knGlobals.configManager()->postNewsComposer()->intro().contains("%L");
+ int numLines = knGlobals.configManager()->postNewsComposer()->intro().tqcontains("%L");
v_iew->e_dit->setCursorPosition(numLines+1,0);
}
else
@@ -411,7 +411,7 @@ int KNComposer::listOfResultOfCheckWord( const TQStringList & lst , const TQStri
createGUI("kncomposerui.rc", false);
unplugActionList("spell_result" );
m_listAction.clear();
- if ( !lst.contains( selectWord ) )
+ if ( !lst.tqcontains( selectWord ) )
{
TQStringList::ConstIterator it = lst.begin();
for ( ; it != lst.end() ; ++it )
@@ -432,7 +432,7 @@ int KNComposer::listOfResultOfCheckWord( const TQStringList & lst , const TQStri
void KNComposer::slotUndo()
{
- TQWidget* fw = focusWidget();
+ TQWidget* fw = tqfocusWidget();
if (!fw) return;
if (fw->inherits("KEdit"))
@@ -443,7 +443,7 @@ void KNComposer::slotUndo()
void KNComposer::slotRedo()
{
- TQWidget* fw = focusWidget();
+ TQWidget* fw = tqfocusWidget();
if (!fw) return;
if (fw->inherits("KEdit"))
@@ -454,7 +454,7 @@ void KNComposer::slotRedo()
void KNComposer::slotCut()
{
- TQWidget* fw = focusWidget();
+ TQWidget* fw = tqfocusWidget();
if (!fw) return;
if (fw->inherits("KEdit"))
@@ -466,7 +466,7 @@ void KNComposer::slotCut()
void KNComposer::slotCopy()
{
- TQWidget* fw = focusWidget();
+ TQWidget* fw = tqfocusWidget();
if (!fw) return;
if (fw->inherits("KEdit"))
@@ -480,7 +480,7 @@ void KNComposer::slotCopy()
void KNComposer::slotPaste()
{
- TQWidget* fw = focusWidget();
+ TQWidget* fw = tqfocusWidget();
if (!fw) return;
if (fw->inherits("KEdit"))
@@ -492,7 +492,7 @@ void KNComposer::slotPaste()
void KNComposer::slotSelectAll()
{
- TQWidget* fw = focusWidget();
+ TQWidget* fw = tqfocusWidget();
if (!fw) return;
if (fw->inherits("TQLineEdit"))
@@ -534,7 +534,7 @@ void KNComposer::setMessageMode(MessageMode mode)
if (m_ode == news_mail) {
TQString s = v_iew->e_dit->textLine(0);
- if (!s.contains(i18n("<posted & mailed>")))
+ if (!s.tqcontains(i18n("<posted & mailed>")))
v_iew->e_dit->insertAt(i18n("<posted & mailed>\n\n"),0,0);
} else {
if (v_iew->e_dit->textLine(0)==i18n("<posted & mailed>")) {
@@ -658,7 +658,7 @@ bool KNComposer::hasValidData()
}
if (n_eeds8Bit && (c_harset.lower()=="us-ascii")) {
- KMessageBox::sorry(this, i18n("Your message contains characters which are not included\nin the \"us-ascii\" character set; please choose\na suitable character set from the \"Options\" menu."));
+ KMessageBox::sorry(this, i18n("Your message tqcontains characters which are not included\nin the \"us-ascii\" character set; please choose\na suitable character set from the \"Options\" menu."));
return false;
}
@@ -682,7 +682,7 @@ bool KNComposer::hasValidData()
if (longLine)
if (!(KMessageBox::warningYesNo( this,
- i18n("Your article contains lines longer than 80 characters.\n"
+ i18n("Your article tqcontains lines longer than 80 characters.\n"
"Do you want to re-edit the article or send it anyway?"),
TQString::null, i18n("&Send"),
i18n("edit article","&Edit")) == KMessageBox::Yes))
@@ -957,7 +957,7 @@ void KNComposer::initData(const TQString &text)
}
-// inserts at cursor position if clear is false, replaces content otherwise
+// inserts at cursor position if clear is false, tqreplaces content otherwise
// puts the file content into a box if box==true
// "file" is already open for reading
void KNComposer::insertFile(TQFile *file, bool clear, bool box, TQString boxTitle)
@@ -969,7 +969,7 @@ void KNComposer::insertFile(TQFile *file, bool clear, bool box, TQString boxTitl
ts.setCodec(codec);
if (box)
- temp = TQString::fromLatin1(",----[ %1 ]\n").arg(boxTitle);
+ temp = TQString::tqfromLatin1(",----[ %1 ]\n").arg(boxTitle);
if (box && (v_iew->e_dit->wordWrap()!=TQMultiLineEdit::NoWrap)) {
int wrapAt = v_iew->e_dit->wrapColumnOrWidth();
@@ -993,7 +993,7 @@ void KNComposer::insertFile(TQFile *file, bool clear, bool box, TQString boxTitl
}
if (box)
- temp += TQString::fromLatin1("`----");
+ temp += TQString::tqfromLatin1("`----");
if(clear)
v_iew->e_dit->setText(temp);
@@ -1173,7 +1173,7 @@ void KNComposer::slotToggleDoMail()
if (knGlobals.configManager()->postNewsTechnical()->useExternalMailer()) {
TQString s = v_iew->e_dit->textLine(0);
- if (!s.contains(i18n("<posted & mailed>")))
+ if (!s.tqcontains(i18n("<posted & mailed>")))
v_iew->e_dit->insertAt(i18n("<posted & mailed>\n\n"),0,0);
TQString tmp;
TQStringList textLines = v_iew->e_dit->processedText();
@@ -1231,7 +1231,7 @@ void KNComposer::slotToggleWordWrap()
void KNComposer::slotUndoRewrap()
{
- if (KMessageBox::warningContinueCancel( this, i18n("This will replace all text you have written.")) == KMessageBox::Continue) {
+ if (KMessageBox::warningContinueCancel( this, i18n("This will tqreplace all text you have written.")) == KMessageBox::Continue) {
v_iew->e_dit->setText(u_nwraped);
slotAppendSig();
}
@@ -1293,8 +1293,8 @@ void KNComposer::slotExternalEditor()
TQStringList command = TQStringList::split(' ',editorCommand);
bool filenameAdded=false;
for ( TQStringList::Iterator it = command.begin(); it != command.end(); ++it ) {
- if ((*it).contains("%f")) {
- (*it).replace(TQRegExp("%f"),e_ditorTempfile->name());
+ if ((*it).tqcontains("%f")) {
+ (*it).tqreplace(TQRegExp("%f"),e_ditorTempfile->name());
filenameAdded=true;
}
(*e_xternalEditor) << (*it);
@@ -1422,10 +1422,10 @@ void KNComposer::slotNewToolbarConfig()
void KNComposer::slotSubjectChanged(const TQString &t)
{
- // replace newlines
+ // tqreplace newlines
TQString subject = t;
- subject.replace( '\n', ' ' );
- subject.replace( '\r', ' ' );
+ subject.tqreplace( '\n', ' ' );
+ subject.tqreplace( '\r', ' ' );
if ( subject != t ) // setText() sets the cursor to the end
v_iew->s_ubject->setText( subject );
// update caption
@@ -1447,7 +1447,7 @@ void KNComposer::slotGroupsChanged(const TQString &t)
split.init(t.latin1(), ",");
splitOk=split.first();
while(splitOk) {
- v_iew->f_up2->insertItem(TQString::fromLatin1(split.string()));
+ v_iew->f_up2->insertItem(TQString::tqfromLatin1(split.string()));
splitOk=split.next();
}
v_iew->f_up2->insertItem("");
@@ -1643,7 +1643,7 @@ void KNComposer::slotSpellFinished()
{
a_ctExternalEditor->setEnabled(true);
a_ctSpellCheck->setEnabled(true);
- KSpell::spellStatus status=s_pellChecker->status();
+ KSpell::spelltqStatus status=s_pellChecker->status();
delete s_pellChecker;
s_pellChecker=0;
@@ -1998,7 +1998,7 @@ KNComposer::Editor::Editor(KNComposer::ComposerView *_composerView, KNComposer *
spell = 0L;
installEventFilter(this);
KCursor::setAutoHideCursor( this, true, true );
- m_bound = TQRegExp( TQString::fromLatin1("[\\s\\W]") );
+ m_bound = TQRegExp( TQString::tqfromLatin1("[\\s\\W]") );
}
@@ -2052,13 +2052,13 @@ bool KNComposer::Editor::eventFilter(TQObject*o, TQEvent* e)
lastSpace = paraText.length();
TQString word = paraText.mid( firstSpace, lastSpace - firstSpace );
//Continue if this word was misspelled
- if( !word.isEmpty() && m_replacements.contains( word ) )
+ if( !word.isEmpty() && m_tqreplacements.tqcontains( word ) )
{
KPopupMenu p;
p.insertTitle( i18n("Suggestions") );
//Add the suggestions to the popup menu
- TQStringList reps = m_replacements[word];
+ TQStringList reps = m_tqreplacements[word];
if( reps.count() > 0 )
{
int listPos = 0;
@@ -2081,11 +2081,11 @@ bool KNComposer::Editor::eventFilter(TQObject*o, TQEvent* e)
int parIdx = 1, txtIdx = 1;
getCursorPosition(&parIdx, &txtIdx);
setSelection(para, firstSpace, para, lastSpace);
- insert(m_replacements[word][id]);
+ insert(m_tqreplacements[word][id]);
// Restore the cursor position; if the cursor was behind the
// misspelled word then adjust the cursor position
if ( para == parIdx && txtIdx >= lastSpace )
- txtIdx += m_replacements[word][id].length() - word.length();
+ txtIdx += m_tqreplacements[word][id].length() - word.length();
setCursorPosition(parIdx, txtIdx);
}
//Cancel original event
@@ -2099,7 +2099,7 @@ bool KNComposer::Editor::eventFilter(TQObject*o, TQEvent* e)
void KNComposer::Editor::slotAddSuggestion( const TQString &text, const TQStringList &lst, unsigned int )
{
- m_replacements[text] = lst;
+ m_tqreplacements[text] = lst;
}
// expand tabs to avoid the "tab-damage",
@@ -2137,12 +2137,12 @@ TQStringList KNComposer::Editor::processedText()
}
}
- TQString replacement;
+ TQString tqreplacement;
int tabPos;
for (TQStringList::Iterator it = ret.begin(); it != ret.end(); ++it ) {
while ((tabPos=(*it).find('\t'))!=-1) {
- replacement.fill(TQChar(' '), 8-(tabPos%8));
- (*it).replace(tabPos, 1, replacement);
+ tqreplacement.fill(TQChar(' '), 8-(tabPos%8));
+ (*it).tqreplace(tabPos, 1, tqreplacement);
}
}
@@ -2159,7 +2159,7 @@ void KNComposer::Editor::slotPasteAsQuotation()
s[i] = ' ';
}
s.prepend("> ");
- s.replace(TQRegExp("\n"),"\n> ");
+ s.tqreplace(TQRegExp("\n"),"\n> ");
insert(s);
}
}
@@ -2177,7 +2177,7 @@ void KNComposer::Editor::slotSearchAgain()
void KNComposer::Editor::slotReplace()
{
- replace();
+ tqreplace();
}
@@ -2186,7 +2186,7 @@ void KNComposer::Editor::slotAddQuotes()
if (hasMarkedText()) {
TQString s = markedText();
s.prepend("> ");
- s.replace(TQRegExp("\n"),"\n> ");
+ s.tqreplace(TQRegExp("\n"),"\n> ");
insert(s);
} else {
int l = currentLine();
@@ -2206,7 +2206,7 @@ void KNComposer::Editor::slotRemoveQuotes()
TQString s = markedText();
if (s.left(2) == "> ")
s.remove(0,2);
- s.replace(TQRegExp("\n> "),"\n");
+ s.tqreplace(TQRegExp("\n> "),"\n");
insert(s);
} else {
int l = currentLine();
@@ -2227,13 +2227,13 @@ void KNComposer::Editor::slotAddBox()
if (hasMarkedText()) {
TQString s = markedText();
s.prepend(",----[ ]\n");
- s.replace(TQRegExp("\n"),"\n| ");
+ s.tqreplace(TQRegExp("\n"),"\n| ");
s.append("\n`----");
insert(s);
} else {
int l = currentLine();
int c = currentColumn();
- TQString s = TQString::fromLatin1(",----[ ]\n| %1\n`----").arg(textLine(l));
+ TQString s = TQString::tqfromLatin1(",----[ ]\n| %1\n`----").arg(textLine(l));
insertLine(s,l);
removeLine(l+3);
setCursorPosition(l+1,c+2);
@@ -2244,10 +2244,10 @@ void KNComposer::Editor::slotAddBox()
void KNComposer::Editor::slotRemoveBox()
{
if (hasMarkedText()) {
- TQString s = TQString::fromLatin1("\n") + markedText() + TQString::fromLatin1("\n");
- s.replace(TQRegExp("\n,----[^\n]*\n"),"\n");
- s.replace(TQRegExp("\n| "),"\n");
- s.replace(TQRegExp("\n`----[^\n]*\n"),"\n");
+ TQString s = TQString::tqfromLatin1("\n") + markedText() + TQString::tqfromLatin1("\n");
+ s.tqreplace(TQRegExp("\n,----[^\n]*\n"),"\n");
+ s.tqreplace(TQRegExp("\n| "),"\n");
+ s.tqreplace(TQRegExp("\n`----[^\n]*\n"),"\n");
s.remove(0,1);
s.truncate(s.length()-1);
insert(s);
@@ -2297,7 +2297,7 @@ void KNComposer::Editor::slotRemoveBox()
setCursorPosition(l,c-2);
setAutoUpdate(true);
- repaint(false);
+ tqrepaint(false);
}
}
@@ -2368,7 +2368,7 @@ void KNComposer::Editor::keyPressEvent ( TQKeyEvent *e)
&& newLine[leadingWhiteSpaceCount].isSpace() ) {
++leadingWhiteSpaceCount;
}
- newLine = newLine.replace( 0, leadingWhiteSpaceCount,
+ newLine = newLine.tqreplace( 0, leadingWhiteSpaceCount,
lineText.left( bot ) );
removeParagraph( line + 1 );
insertParagraph( newLine, line + 1 );
@@ -2423,7 +2423,7 @@ void KNComposer::Editor::slotSpellDone(const TQString &/*newtext*/)
void KNComposer::Editor::slotSpellFinished()
{
- KSpell::spellStatus status=spell->status();
+ KSpell::spelltqStatus status=spell->status();
delete spell;
spell=0;
@@ -2604,7 +2604,7 @@ KNComposer::AttachmentPropertiesDlg::AttachmentPropertiesDlg(KNAttachment *a, TQ
this, TQT_SLOT(slotMimeTypeTextChanged(const TQString&)));
//finish GUI
- setFixedHeight(sizeHint().height());
+ setFixedHeight(tqsizeHint().height());
KNHelper::restoreWindowSize("attProperties", this, TQSize(300,250));
setHelp("anc-knode-editor-advanced");
}