diff options
Diffstat (limited to 'knode/kncomposer.cpp')
-rw-r--r-- | knode/kncomposer.cpp | 690 |
1 files changed, 345 insertions, 345 deletions
diff --git a/knode/kncomposer.cpp b/knode/kncomposer.cpp index b6fdd4249..111bdf19e 100644 --- a/knode/kncomposer.cpp +++ b/knode/kncomposer.cpp @@ -12,10 +12,10 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US */ -#include <qheader.h> -#include <qtextcodec.h> -#include <qclipboard.h> -#include <qapplication.h> +#include <tqheader.h> +#include <tqtextcodec.h> +#include <tqclipboard.h> +#include <tqapplication.h> #include <kspelldlg.h> #include <kdeversion.h> #include "addressesdialog.h" @@ -42,7 +42,7 @@ using KRecentAddress::RecentAddresses; #include <kprocess.h> #include <kqcstringsplitter.h> #include <ksyntaxhighlighter.h> -#include <qcursor.h> +#include <tqcursor.h> #include <kurldrag.h> #include <kcompletionbox.h> @@ -58,27 +58,27 @@ using KRecentAddress::RecentAddresses; #include "knarticlefactory.h" #include <kstatusbar.h> #include <klocale.h> -#include <qpopupmenu.h> +#include <tqpopupmenu.h> #include <spellingfilter.h> #include <kstdguiitem.h> KNLineEdit::KNLineEdit(KNComposer::ComposerView *_composerView, bool useCompletion, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : KNLineEditInherited(parent,useCompletion,name) , composerView(_composerView) { } -QPopupMenu *KNLineEdit::createPopupMenu() +TQPopupMenu *KNLineEdit::createPopupMenu() { - QPopupMenu *menu = KLineEdit::createPopupMenu(); + TQPopupMenu *menu = KLineEdit::createPopupMenu(); if ( !menu ) return 0; menu->insertSeparator(); menu->insertItem( i18n( "Edit Recent Addresses..." ), - this, SLOT( editRecentAddresses() ) ); + this, TQT_SLOT( editRecentAddresses() ) ); return menu; } @@ -89,8 +89,8 @@ void KNLineEdit::editRecentAddresses() dlg.setAddresses( RecentAddresses::self( knGlobals.config() )->addresses() ); if ( dlg.exec() ) { RecentAddresses::self( knGlobals.config() )->clear(); - QStringList addrList = dlg.addresses(); - QStringList::Iterator it; + TQStringList addrList = dlg.addresses(); + TQStringList::Iterator it; for ( it = addrList.begin(); it != addrList.end(); ++it ) RecentAddresses::self( knGlobals.config() )->add( *it ); @@ -102,13 +102,13 @@ void KNLineEdit::loadAddresses() { KNLineEditInherited::loadAddresses(); - QStringList recent = RecentAddresses::self(knGlobals.config())->addresses(); - QStringList::Iterator it = recent.begin(); + TQStringList recent = RecentAddresses::self(knGlobals.config())->addresses(); + TQStringList::Iterator it = recent.begin(); for ( ; it != recent.end(); ++it ) addAddress( *it ); } -void KNLineEdit::keyPressEvent(QKeyEvent *e) +void KNLineEdit::keyPressEvent(TQKeyEvent *e) { // ---sven's Return is same Tab and arrow key navigation start --- if ((e->key() == Key_Enter || e->key() == Key_Return) && @@ -131,7 +131,7 @@ void KNLineEdit::keyPressEvent(QKeyEvent *e) KNLineEditInherited::keyPressEvent(e); } -KNLineEditSpell::KNLineEditSpell( KNComposer::ComposerView *_composerView, bool useCompletion,QWidget * parent, const char * name) +KNLineEditSpell::KNLineEditSpell( KNComposer::ComposerView *_composerView, bool useCompletion,TQWidget * parent, const char * name) :KNLineEdit( _composerView, useCompletion, parent,name ) { } @@ -141,18 +141,18 @@ void KNLineEditSpell::highLightWord( unsigned int length, unsigned int pos ) setSelection ( pos, length ); } -void KNLineEditSpell::spellCheckDone( const QString &s ) +void KNLineEditSpell::spellCheckDone( const TQString &s ) { if( s != text() ) setText( s ); } -void KNLineEditSpell::spellCheckerMisspelling( const QString &_text, const QStringList &, unsigned int pos) +void KNLineEditSpell::spellCheckerMisspelling( const TQString &_text, const TQStringList &, unsigned int pos) { highLightWord( _text.length(),pos ); } -void KNLineEditSpell::spellCheckerCorrected( const QString &old, const QString &corr, unsigned int pos) +void KNLineEditSpell::spellCheckerCorrected( const TQString &old, const TQString &corr, unsigned int pos) { if( old!= corr ) { @@ -163,7 +163,7 @@ void KNLineEditSpell::spellCheckerCorrected( const QString &old, const QString & } -KNComposer::KNComposer(KNLocalArticle *a, const QString &text, const QString &sig, const QString &unwraped, bool firstEdit, bool dislikesCopies, bool createCopy) +KNComposer::KNComposer(KNLocalArticle *a, const TQString &text, const TQString &sig, const TQString &unwraped, bool firstEdit, bool dislikesCopies, bool createCopy) : KMainWindow(0,"composerWindow"), r_esult(CRsave), a_rticle(a), s_ignature(sig), u_nwraped(unwraped), n_eeds8Bit(true), v_alidated(false), a_uthorDislikesMailCopies(dislikesCopies), e_xternalEdited(false), e_xternalEditor(0), e_ditorTempfile(0), s_pellChecker(0), a_ttChanged(false), @@ -183,74 +183,74 @@ KNComposer::KNComposer(KNLocalArticle *a, const QString &text, const QString &si v_iew=new ComposerView(this); setCentralWidget(v_iew); - connect(v_iew->c_ancelEditorBtn, SIGNAL(clicked()), SLOT(slotCancelEditor())); - connect(v_iew->e_dit, SIGNAL(sigDragEnterEvent(QDragEnterEvent *)), SLOT(slotDragEnterEvent(QDragEnterEvent *))); - connect(v_iew->e_dit, SIGNAL(sigDropEvent(QDropEvent *)), SLOT(slotDropEvent(QDropEvent *))); + connect(v_iew->c_ancelEditorBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotCancelEditor())); + connect(v_iew->e_dit, TQT_SIGNAL(sigDragEnterEvent(TQDragEnterEvent *)), TQT_SLOT(slotDragEnterEvent(TQDragEnterEvent *))); + connect(v_iew->e_dit, TQT_SIGNAL(sigDropEvent(TQDropEvent *)), TQT_SLOT(slotDropEvent(TQDropEvent *))); //statusbar KStatusBar *sb=statusBar(); - sb->insertItem(QString::null, 1,1); // type + sb->insertItem(TQString::null, 1,1); // type sb->setItemAlignment (1,AlignLeft | AlignVCenter); - sb->insertItem(QString::null, 2,1); // charset + sb->insertItem(TQString::null, 2,1); // charset sb->setItemAlignment (2,AlignLeft | AlignVCenter); - sb->insertItem(QString::null, 3,0); // column + sb->insertItem(TQString::null, 3,0); // column sb->setItemAlignment (3,AlignCenter | AlignVCenter); - sb->insertItem(QString::null, 4,0); // column + sb->insertItem(TQString::null, 4,0); // column sb->setItemAlignment (4,AlignCenter | AlignVCenter); - sb->insertItem(QString::null, 5,0); // line + sb->insertItem(TQString::null, 5,0); // line sb->setItemAlignment (5,AlignCenter | AlignVCenter); - connect(v_iew->e_dit, SIGNAL(CursorPositionChanged()), SLOT(slotUpdateCursorPos())); - connect(v_iew->e_dit, SIGNAL(toggle_overwrite_signal()), SLOT(slotUpdateStatusBar())); + connect(v_iew->e_dit, TQT_SIGNAL(CursorPositionChanged()), TQT_SLOT(slotUpdateCursorPos())); + connect(v_iew->e_dit, TQT_SIGNAL(toggle_overwrite_signal()), TQT_SLOT(slotUpdateStatusBar())); //------------------------------- <Actions> -------------------------------------- //file menu new KAction(i18n("&Send Now"),"mail_send", CTRL + Key_Return , this, - SLOT(slotSendNow()), actionCollection(), "send_now"); + TQT_SLOT(slotSendNow()), actionCollection(), "send_now"); new KAction(i18n("Send &Later"), "queue", 0, this, - SLOT(slotSendLater()), actionCollection(), "send_later"); + TQT_SLOT(slotSendLater()), actionCollection(), "send_later"); new KAction(i18n("Save as &Draft"),"filesave", 0 , this, - SLOT(slotSaveAsDraft()), actionCollection(), "save_as_draft"); + TQT_SLOT(slotSaveAsDraft()), actionCollection(), "save_as_draft"); new KAction(i18n("D&elete"),"editdelete", 0 , this, - SLOT(slotArtDelete()), actionCollection(), "art_delete"); + TQT_SLOT(slotArtDelete()), actionCollection(), "art_delete"); - KStdAction::close(this, SLOT(close()),actionCollection()); + KStdAction::close(this, TQT_SLOT(close()),actionCollection()); //edit menu - KStdAction::undo(this, SLOT(slotUndo()), actionCollection()); - KStdAction::redo(this, SLOT(slotRedo()), actionCollection()); + KStdAction::undo(this, TQT_SLOT(slotUndo()), actionCollection()); + KStdAction::redo(this, TQT_SLOT(slotRedo()), actionCollection()); - KStdAction::cut(this, SLOT(slotCut()), actionCollection()); + KStdAction::cut(this, TQT_SLOT(slotCut()), actionCollection()); - KStdAction::copy(this, SLOT(slotCopy()), actionCollection()); + KStdAction::copy(this, TQT_SLOT(slotCopy()), actionCollection()); - KStdAction::pasteText(this, SLOT(slotPaste()), actionCollection()); + KStdAction::pasteText(this, TQT_SLOT(slotPaste()), actionCollection()); new KAction(i18n("Paste as &Quotation"), 0, v_iew->e_dit, - SLOT(slotPasteAsQuotation()), actionCollection(), "paste_quoted"); + TQT_SLOT(slotPasteAsQuotation()), actionCollection(), "paste_quoted"); - KStdAction::selectAll(this, SLOT(slotSelectAll()), actionCollection()); + KStdAction::selectAll(this, TQT_SLOT(slotSelectAll()), actionCollection()); - KStdAction::find(v_iew->e_dit, SLOT(slotFind()), actionCollection()); - KStdAction::findNext(v_iew->e_dit, SLOT(slotSearchAgain()), actionCollection()); + KStdAction::find(v_iew->e_dit, TQT_SLOT(slotFind()), actionCollection()); + KStdAction::findNext(v_iew->e_dit, TQT_SLOT(slotSearchAgain()), actionCollection()); - KStdAction::replace(v_iew->e_dit, SLOT(slotReplace()), actionCollection()); + KStdAction::replace(v_iew->e_dit, TQT_SLOT(slotReplace()), actionCollection()); //attach menu - new KAction(i18n("Append &Signature"), 0 , this, SLOT(slotAppendSig()), + new KAction(i18n("Append &Signature"), 0 , this, TQT_SLOT(slotAppendSig()), actionCollection(), "append_signature"); - new KAction(i18n("&Insert File..."), 0, this, SLOT(slotInsertFile()), + new KAction(i18n("&Insert File..."), 0, this, TQT_SLOT(slotInsertFile()), actionCollection(), "insert_file"); - new KAction(i18n("Insert File (in a &box)..."), 0, this, SLOT(slotInsertFileBoxed()), + new KAction(i18n("Insert File (in a &box)..."), 0, this, TQT_SLOT(slotInsertFileBoxed()), actionCollection(), "insert_file_boxed"); - new KAction(i18n("Attach &File..."), "attach", 0, this, SLOT(slotAttachFile()), + new KAction(i18n("Attach &File..."), "attach", 0, this, TQT_SLOT(slotAttachFile()), actionCollection(), "attach_file"); a_ctPGPsign = new KToggleAction(i18n("Sign Article with &PGP"), @@ -258,69 +258,69 @@ KNComposer::KNComposer(KNLocalArticle *a, const QString &text, const QString &si actionCollection(), "sign_article"); a_ctRemoveAttachment = new KAction(i18n("&Remove"), 0, this, - SLOT(slotRemoveAttachment()), actionCollection(), "remove_attachment"); + TQT_SLOT(slotRemoveAttachment()), actionCollection(), "remove_attachment"); a_ctAttachmentProperties = new KAction(i18n("&Properties"), 0, this, - SLOT(slotAttachmentProperties()), actionCollection(), "attachment_properties"); + TQT_SLOT(slotAttachmentProperties()), actionCollection(), "attachment_properties"); //options menu a_ctDoPost = new KToggleAction(i18n("Send &News Article"), "filenew", 0 , this, - SLOT(slotToggleDoPost()), actionCollection(), "send_news"); + TQT_SLOT(slotToggleDoPost()), actionCollection(), "send_news"); a_ctDoMail = new KToggleAction(i18n("Send E&mail"), "mail_generic" , 0 , this, - SLOT(slotToggleDoMail()), actionCollection(), "send_mail"); + TQT_SLOT(slotToggleDoMail()), actionCollection(), "send_mail"); a_ctSetCharset = new KSelectAction(i18n("Set &Charset"), 0, actionCollection(), "set_charset"); a_ctSetCharset->setItems(knGlobals.configManager()->postNewsTechnical()->composerCharsets()); a_ctSetCharset->setShortcutConfigurable(false); - connect(a_ctSetCharset, SIGNAL(activated(const QString&)), - this, SLOT(slotSetCharset(const QString&))); + connect(a_ctSetCharset, TQT_SIGNAL(activated(const TQString&)), + this, TQT_SLOT(slotSetCharset(const TQString&))); a_ctSetCharsetKeyb = new KAction(i18n("Set Charset"), 0, this, - SLOT(slotSetCharsetKeyboard()), actionCollection(), "set_charset_keyboard"); + TQT_SLOT(slotSetCharsetKeyboard()), actionCollection(), "set_charset_keyboard"); a_ctWordWrap = new KToggleAction(i18n("&Word Wrap"), 0 , this, - SLOT(slotToggleWordWrap()), actionCollection(), "toggle_wordwrap"); + TQT_SLOT(slotToggleWordWrap()), actionCollection(), "toggle_wordwrap"); //tools menu new KAction(i18n("Add &Quote Characters"), 0, v_iew->e_dit, - SLOT(slotAddQuotes()), actionCollection(), "tools_quote"); + TQT_SLOT(slotAddQuotes()), actionCollection(), "tools_quote"); new KAction(i18n("&Remove Quote Characters"), 0, v_iew->e_dit, - SLOT(slotRemoveQuotes()), actionCollection(), "tools_unquote"); + TQT_SLOT(slotRemoveQuotes()), actionCollection(), "tools_unquote"); new KAction(i18n("Add &Box"), 0, v_iew->e_dit, - SLOT(slotAddBox()), actionCollection(), "tools_box"); + TQT_SLOT(slotAddBox()), actionCollection(), "tools_box"); new KAction(i18n("Re&move Box"), 0, v_iew->e_dit, - SLOT(slotRemoveBox()), actionCollection(), "tools_unbox"); + TQT_SLOT(slotRemoveBox()), actionCollection(), "tools_unbox"); KAction *undoRewrap = new KAction(i18n("Get &Original Text (not re-wrapped)"), 0, this, - SLOT(slotUndoRewrap()), actionCollection(), "tools_undoRewrap"); + TQT_SLOT(slotUndoRewrap()), actionCollection(), "tools_undoRewrap"); undoRewrap->setEnabled(!u_nwraped.isNull()); KAction *rot13 = new KAction(i18n("S&cramble (Rot 13)"), "encrypted", 0, v_iew->e_dit, - SLOT(slotRot13()), actionCollection(), "tools_rot13"); + TQT_SLOT(slotRot13()), actionCollection(), "tools_rot13"); rot13->setEnabled(false); - connect(v_iew->e_dit, SIGNAL(copyAvailable(bool)), rot13, SLOT(setEnabled(bool))); + connect(v_iew->e_dit, TQT_SIGNAL(copyAvailable(bool)), rot13, TQT_SLOT(setEnabled(bool))); a_ctExternalEditor = new KAction(i18n("Start &External Editor"), "run", 0, this, - SLOT(slotExternalEditor()), actionCollection(), "external_editor"); + TQT_SLOT(slotExternalEditor()), actionCollection(), "external_editor"); - a_ctSpellCheck = KStdAction::spelling (this, SLOT(slotSpellcheck()), actionCollection()); + a_ctSpellCheck = KStdAction::spelling (this, TQT_SLOT(slotSpellcheck()), actionCollection()); //settings menu createStandardStatusBarAction(); setStandardToolBarMenuEnabled(true); - KStdAction::keyBindings(this, SLOT(slotConfKeys()), actionCollection()); + KStdAction::keyBindings(this, TQT_SLOT(slotConfKeys()), actionCollection()); - KStdAction::configureToolbars(this, SLOT(slotConfToolbar()), actionCollection()); + KStdAction::configureToolbars(this, TQT_SLOT(slotConfToolbar()), actionCollection()); - KStdAction::preferences(knGlobals.top, SLOT(slotSettings()), actionCollection()); + KStdAction::preferences(knGlobals.top, TQT_SLOT(slotSettings()), actionCollection()); a_ccel=new KAccel(this); a_ctSetCharsetKeyb->plugAccel(a_ccel); @@ -331,8 +331,8 @@ KNComposer::KNComposer(KNLocalArticle *a, const QString &text, const QString &si //attachment popup - a_ttPopup=static_cast<QPopupMenu*> (factory()->container("attachment_popup", this)); - if(!a_ttPopup) a_ttPopup = new QPopupMenu(); + a_ttPopup=static_cast<TQPopupMenu*> (factory()->container("attachment_popup", this)); + if(!a_ttPopup) a_ttPopup = new TQPopupMenu(); slotAttachmentSelected(0); //init @@ -398,7 +398,7 @@ KNComposer::~KNComposer() delete e_ditorTempfile; } - for ( QValueList<KNAttachment*>::Iterator it = mDeletedAttachments.begin(); it != mDeletedAttachments.end(); ++it ) + for ( TQValueList<KNAttachment*>::Iterator it = mDeletedAttachments.begin(); it != mDeletedAttachments.end(); ++it ) delete (*it); KConfig *conf = knGlobals.config(); @@ -406,21 +406,21 @@ KNComposer::~KNComposer() saveMainWindowSettings(conf); } -int KNComposer::listOfResultOfCheckWord( const QStringList & lst , const QString & selectWord) +int KNComposer::listOfResultOfCheckWord( const TQStringList & lst , const TQString & selectWord) { createGUI("kncomposerui.rc", false); unplugActionList("spell_result" ); m_listAction.clear(); if ( !lst.contains( selectWord ) ) { - QStringList::ConstIterator it = lst.begin(); + TQStringList::ConstIterator it = lst.begin(); for ( ; it != lst.end() ; ++it ) { if ( !(*it).isEmpty() ) // in case of removed subtypes or placeholders { KAction * act = new KAction( *it ); - connect( act, SIGNAL(activated()), v_iew->e_dit, SLOT(slotCorrectWord()) ); + connect( act, TQT_SIGNAL(activated()), v_iew->e_dit, TQT_SLOT(slotCorrectWord()) ); m_listAction.append( act ); } } @@ -432,47 +432,47 @@ int KNComposer::listOfResultOfCheckWord( const QStringList & lst , const QString void KNComposer::slotUndo() { - QWidget* fw = focusWidget(); + TQWidget* fw = focusWidget(); if (!fw) return; if (fw->inherits("KEdit")) - ((QMultiLineEdit*)fw)->undo(); - else if (fw->inherits("QLineEdit")) - ((QLineEdit*)fw)->undo(); + ((TQMultiLineEdit*)fw)->undo(); + else if (fw->inherits("TQLineEdit")) + ((TQLineEdit*)fw)->undo(); } void KNComposer::slotRedo() { - QWidget* fw = focusWidget(); + TQWidget* fw = focusWidget(); if (!fw) return; if (fw->inherits("KEdit")) - ((QMultiLineEdit*)fw)->redo(); - else if (fw->inherits("QLineEdit")) - ((QLineEdit*)fw)->redo(); + ((TQMultiLineEdit*)fw)->redo(); + else if (fw->inherits("TQLineEdit")) + ((TQLineEdit*)fw)->redo(); } void KNComposer::slotCut() { - QWidget* fw = focusWidget(); + TQWidget* fw = focusWidget(); if (!fw) return; if (fw->inherits("KEdit")) - ((QMultiLineEdit*)fw)->cut(); - else if (fw->inherits("QLineEdit")) - ((QLineEdit*)fw)->cut(); + ((TQMultiLineEdit*)fw)->cut(); + else if (fw->inherits("TQLineEdit")) + ((TQLineEdit*)fw)->cut(); else kdDebug(5003) << "wrong focus widget" << endl; } void KNComposer::slotCopy() { - QWidget* fw = focusWidget(); + TQWidget* fw = focusWidget(); if (!fw) return; if (fw->inherits("KEdit")) - ((QMultiLineEdit*)fw)->copy(); - else if (fw->inherits("QLineEdit")) - ((QLineEdit*)fw)->copy(); + ((TQMultiLineEdit*)fw)->copy(); + else if (fw->inherits("TQLineEdit")) + ((TQLineEdit*)fw)->copy(); else kdDebug(5003) << "wrong focus widget" << endl; } @@ -480,25 +480,25 @@ void KNComposer::slotCopy() void KNComposer::slotPaste() { - QWidget* fw = focusWidget(); + TQWidget* fw = focusWidget(); if (!fw) return; if (fw->inherits("KEdit")) - ((QMultiLineEdit*)fw)->paste(); - else if (fw->inherits("QLineEdit")) - ((QLineEdit*)fw)->paste(); + ((TQMultiLineEdit*)fw)->paste(); + else if (fw->inherits("TQLineEdit")) + ((TQLineEdit*)fw)->paste(); else kdDebug(5003) << "wrong focus widget" << endl; } void KNComposer::slotSelectAll() { - QWidget* fw = focusWidget(); + TQWidget* fw = focusWidget(); if (!fw) return; - if (fw->inherits("QLineEdit")) - ((QLineEdit*)fw)->selectAll(); - else if (fw->inherits("QMultiLineEdit")) - ((QMultiLineEdit*)fw)->selectAll(); + if (fw->inherits("TQLineEdit")) + ((TQLineEdit*)fw)->selectAll(); + else if (fw->inherits("TQMultiLineEdit")) + ((TQMultiLineEdit*)fw)->selectAll(); } @@ -506,7 +506,7 @@ void KNComposer::setConfig(bool onlyFonts) { if (!onlyFonts) { v_iew->e_dit->setWordWrap(knGlobals.configManager()->postNewsComposer()->wordWrap()? - QMultiLineEdit::FixedColumnWidth : QMultiLineEdit::NoWrap); + TQMultiLineEdit::FixedColumnWidth : TQMultiLineEdit::NoWrap); v_iew->e_dit->setWrapColumnOrWidth(knGlobals.configManager()->postNewsComposer()->maxLineLength()); a_ctWordWrap->setChecked(knGlobals.configManager()->postNewsComposer()->wordWrap()); @@ -514,7 +514,7 @@ void KNComposer::setConfig(bool onlyFonts) a_ctPGPsign->setEnabled(pgp->usePGP()); } - QFont fnt=knGlobals.configManager()->appearance()->composerFont(); + TQFont fnt=knGlobals.configManager()->appearance()->composerFont(); v_iew->s_ubject->setFont(fnt); v_iew->t_o->setFont(fnt); v_iew->g_roups->setFont(fnt); @@ -533,7 +533,7 @@ void KNComposer::setMessageMode(MessageMode mode) v_iew->setMessageMode(m_ode); if (m_ode == news_mail) { - QString s = v_iew->e_dit->textLine(0); + TQString s = v_iew->e_dit->textLine(0); if (!s.contains(i18n("<posted & mailed>"))) v_iew->e_dit->insertAt(i18n("<posted & mailed>\n\n"),0,0); } else { @@ -568,8 +568,8 @@ bool KNComposer::hasValidData() return false; } - int groupCount = QStringList::split(',',v_iew->g_roups->text()).count(); - int fupCount = QStringList::split(',',v_iew->f_up2->currentText()).count(); + int groupCount = TQStringList::split(',',v_iew->g_roups->text()).count(); + int fupCount = TQStringList::split(',',v_iew->f_up2->currentText()).count(); bool followUp = !v_iew->f_up2->currentText().isEmpty(); if (groupCount>12) { @@ -579,7 +579,7 @@ bool KNComposer::hasValidData() if (groupCount>5) if (!(KMessageBox::warningYesNo( this, i18n("You are crossposting to more than five newsgroups.\nPlease reconsider whether this is really useful\nand remove groups in which your article is off-topic.\nDo you want to re-edit the article or send it anyway?"), - QString::null, i18n("&Send"),i18n("edit article","&Edit")) == KMessageBox::Yes)) + TQString::null, i18n("&Send"),i18n("edit article","&Edit")) == KMessageBox::Yes)) return false; if ( !followUp && groupCount > 2 ) { @@ -588,7 +588,7 @@ bool KNComposer::hasValidData() "Please use the \"Followup-To\" header to direct the replies " "to your article into one group.\n" "Do you want to re-edit the article or send it anyway?"), - QString::null, i18n("&Send"), i18n("edit article","&Edit"), "missingFollowUpTo" ) + TQString::null, i18n("&Send"), i18n("edit article","&Edit"), "missingFollowUpTo" ) != KMessageBox::Yes ) return false; } @@ -600,7 +600,7 @@ bool KNComposer::hasValidData() if (fupCount>5) if (!(KMessageBox::warningYesNo( this, i18n("You are directing replies to more than five newsgroups.\nPlease reconsider whether this is really useful.\nDo you want to re-edit the article or send it anyway?"), - QString::null, i18n("&Send"),i18n("edit article","&Edit")) == KMessageBox::Yes)) + TQString::null, i18n("&Send"),i18n("edit article","&Edit")) == KMessageBox::Yes)) return false; } @@ -621,9 +621,9 @@ bool KNComposer::hasValidData() int sigLength = 0; int notQuoted = 0; int textLines = 0; - QStringList text = v_iew->e_dit->processedText(); + TQStringList text = v_iew->e_dit->processedText(); - for (QStringList::Iterator it = text.begin(); it != text.end(); ++it) { + for (TQStringList::Iterator it = text.begin(); it != text.end(); ++it) { if (!n_eeds8Bit && !KMime::isUsAscii(*it)) n_eeds8Bit=true; @@ -670,7 +670,7 @@ bool KNComposer::hasValidData() if ((textLines>1)&&(notQuoted==1)) { if (hasAttributionLine) if (!(KMessageBox::warningYesNo( this, i18n("Your article seems to consist entirely of quoted text;\ndo you want to re-edit the article or send it anyway?"), - QString::null, i18n("&Send"),i18n("edit article","&Edit")) == KMessageBox::Yes)) + TQString::null, i18n("&Send"),i18n("edit article","&Edit")) == KMessageBox::Yes)) return false; } else { if (notQuoted==0) { @@ -684,23 +684,23 @@ bool KNComposer::hasValidData() if (!(KMessageBox::warningYesNo( this, i18n("Your article contains lines longer than 80 characters.\n" "Do you want to re-edit the article or send it anyway?"), - QString::null, i18n("&Send"), + TQString::null, i18n("&Send"), i18n("edit article","&Edit")) == KMessageBox::Yes)) return false; if (sigLength>8) { if (!(KMessageBox::warningYesNo( this, i18n("Your signature is more than 8 lines long.\nYou should shorten it to match the widely accepted limit of 4 lines.\nDo you want to re-edit the article or send it anyway?"), - QString::null, i18n("&Send"),i18n("edit article","&Edit")) == KMessageBox::Yes)) + TQString::null, i18n("&Send"),i18n("edit article","&Edit")) == KMessageBox::Yes)) return false; } else if (sigLength>4) KMessageBox::information(this, i18n("Your signature exceeds the widely-accepted limit of 4 lines:\nplease consider shortening your signature;\notherwise, you will probably annoy your readers."), - QString::null,"longSignatureWarning"); + TQString::null,"longSignatureWarning"); // check if article can be signed if ( a_ctPGPsign->isChecked() ) { // try to get the signing key - QCString signingKey = knGlobals.configManager()->identity()->signingKey(); + TQCString signingKey = knGlobals.configManager()->identity()->signingKey(); KNNntpAccount *acc = knGlobals.accountManager()->account( a_rticle->serverId() ); if ( acc ) { KMime::Headers::Newsgroups *grps = a_rticle->newsgroups(); @@ -721,7 +721,7 @@ bool KNComposer::hasValidData() "in the account properties or in the " "group properties.\n" "The article will be sent unsigned." ), - QString::null, i18n( "Send Unsigned" ), + TQString::null, i18n( "Send Unsigned" ), "sendUnsignedDialog" ) == KMessageBox::Cancel ) return false; @@ -746,7 +746,7 @@ bool KNComposer::applyChanges() //Newsgroups if (m_ode != mail) { - a_rticle->newsgroups()->fromUnicodeString(v_iew->g_roups->text().remove(QRegExp("\\s")), KMime::Headers::Latin1); + a_rticle->newsgroups()->fromUnicodeString(v_iew->g_roups->text().remove(TQRegExp("\\s")), KMime::Headers::Latin1); a_rticle->setDoPost(true); } else a_rticle->setDoPost(false); @@ -766,7 +766,7 @@ bool KNComposer::applyChanges() if(a_ttChanged && (v_iew->a_ttView)) { - QListViewItemIterator it(v_iew->a_ttView); + TQListViewItemIterator it(v_iew->a_ttView); while(it.current()) { a=(static_cast<AttachmentViewItem*> (it.current()))->attachment; if(a->hasChanged()) { @@ -779,7 +779,7 @@ bool KNComposer::applyChanges() } } - for ( QValueList<KNAttachment*>::Iterator it = mDeletedAttachments.begin(); it != mDeletedAttachments.end(); ++it ) + for ( TQValueList<KNAttachment*>::Iterator it = mDeletedAttachments.begin(); it != mDeletedAttachments.end(); ++it ) if ( (*it)->isAttached() ) (*it)->detach( a_rticle ); @@ -817,15 +817,15 @@ bool KNComposer::applyChanges() } //assemble the text line by line - QString tmp; - QStringList textLines = v_iew->e_dit->processedText(); - for (QStringList::Iterator it = textLines.begin(); it != textLines.end(); ++it) + TQString tmp; + TQStringList textLines = v_iew->e_dit->processedText(); + for (TQStringList::Iterator it = textLines.begin(); it != textLines.end(); ++it) tmp += *it + "\n"; // Sign article if needed if ( a_ctPGPsign->isChecked() ) { // first get the signing key - QCString signingKey = knGlobals.configManager()->identity()->signingKey(); + TQCString signingKey = knGlobals.configManager()->identity()->signingKey(); KNNntpAccount *acc = knGlobals.accountManager()->account( a_rticle->serverId() ); if ( acc ) { KMime::Headers::Newsgroups *grps = a_rticle->newsgroups(); @@ -837,17 +837,17 @@ bool KNComposer::applyChanges() } // now try to sign the article if (!signingKey.isEmpty()) { - QString tmpText = tmp; + TQString tmpText = tmp; Kpgp::Block block; bool ok=true; - QTextCodec *codec=KGlobal::charsets()->codecForName(c_harset, ok); + TQTextCodec *codec=KGlobal::charsets()->codecForName(c_harset, ok); if(!ok) // no suitable codec found => try local settings and hope the best ;-) codec=KGlobal::locale()->codecForEncoding(); block.setText( codec->fromUnicode(tmpText) ); kdDebug(5003) << "signing article from " << article()->from()->email() << endl; if( block.clearsign( signingKey, codec->name() ) == Kpgp::Ok ) { - QCString result = block.text(); + TQCString result = block.text(); tmp = codec->toUnicode(result.data(), result.length() ); } else { return false; @@ -866,7 +866,7 @@ bool KNComposer::applyChanges() } -void KNComposer::closeEvent(QCloseEvent *e) +void KNComposer::closeEvent(TQCloseEvent *e) { if(!v_iew->e_dit->isModified() && !a_ttChanged) { // nothing to save, don't show nag screen if(a_rticle->id()==-1) @@ -876,7 +876,7 @@ void KNComposer::closeEvent(QCloseEvent *e) } else { switch ( KMessageBox::warningYesNoCancel( this, i18n("Do you want to save this article in the draft folder?"), - QString::null, KStdGuiItem::save(), KStdGuiItem::discard())) { + TQString::null, KStdGuiItem::save(), KStdGuiItem::discard())) { case KMessageBox::Yes : r_esult=CRsave; break; @@ -896,11 +896,11 @@ void KNComposer::closeEvent(QCloseEvent *e) } -void KNComposer::initData(const QString &text) +void KNComposer::initData(const TQString &text) { //Subject if(a_rticle->subject()->isEmpty()) - slotSubjectChanged(QString::null); + slotSubjectChanged(TQString::null); else v_iew->s_ubject->setText(a_rticle->subject()->asUnicodeString()); @@ -916,7 +916,7 @@ void KNComposer::initData(const QString &text) v_iew->f_up2->lineEdit()->setText(fup2->asUnicodeString()); KMime::Content *textContent=a_rticle->textContent(); - QString s; + TQString s; if(text.isEmpty()) { if(textContent) @@ -960,21 +960,21 @@ void KNComposer::initData(const QString &text) // inserts at cursor position if clear is false, replaces content otherwise // puts the file content into a box if box==true // "file" is already open for reading -void KNComposer::insertFile(QFile *file, bool clear, bool box, QString boxTitle) +void KNComposer::insertFile(TQFile *file, bool clear, bool box, TQString boxTitle) { - QString temp; + TQString temp; bool ok=true; - QTextCodec *codec=KGlobal::charsets()->codecForName(c_harset, ok); - QTextStream ts(file); + TQTextCodec *codec=KGlobal::charsets()->codecForName(c_harset, ok); + TQTextStream ts(file); ts.setCodec(codec); if (box) - temp = QString::fromLatin1(",----[ %1 ]\n").arg(boxTitle); + temp = TQString::fromLatin1(",----[ %1 ]\n").arg(boxTitle); - if (box && (v_iew->e_dit->wordWrap()!=QMultiLineEdit::NoWrap)) { + if (box && (v_iew->e_dit->wordWrap()!=TQMultiLineEdit::NoWrap)) { int wrapAt = v_iew->e_dit->wrapColumnOrWidth(); - QStringList lst; - QString line; + TQStringList lst; + TQString line; while(!file->atEnd()) { line=ts.readLine(); if (!file->atEnd()) @@ -993,7 +993,7 @@ void KNComposer::insertFile(QFile *file, bool clear, bool box, QString boxTitle) } if (box) - temp += QString::fromLatin1("`----"); + temp += TQString::fromLatin1("`----"); if(clear) v_iew->e_dit->setText(temp); @@ -1006,9 +1006,9 @@ void KNComposer::insertFile(QFile *file, bool clear, bool box, QString boxTitle) void KNComposer::insertFile(bool clear, bool box) { KNLoadHelper helper(this); - QFile *file = helper.getFile(i18n("Insert File")); + TQFile *file = helper.getFile(i18n("Insert File")); KURL url; - QString boxName; + TQString boxName; if (file) { url = helper.getURL(); @@ -1165,19 +1165,19 @@ void KNComposer::slotToggleDoMail() if (a_ctDoMail->isChecked()) { if (a_uthorDislikesMailCopies) { if (!(KMessageBox::warningContinueCancel(this, i18n("The poster does not want a mail copy of your reply (Mail-Copies-To: nobody);\nplease respect their request."), - QString::null, i18n("&Send Copy")) == KMessageBox::Continue)) { + TQString::null, i18n("&Send Copy")) == KMessageBox::Continue)) { a_ctDoMail->setChecked(false); //revert return; } } if (knGlobals.configManager()->postNewsTechnical()->useExternalMailer()) { - QString s = v_iew->e_dit->textLine(0); + TQString s = v_iew->e_dit->textLine(0); if (!s.contains(i18n("<posted & mailed>"))) v_iew->e_dit->insertAt(i18n("<posted & mailed>\n\n"),0,0); - QString tmp; - QStringList textLines = v_iew->e_dit->processedText(); - for (QStringList::Iterator it = textLines.begin(); it != textLines.end(); ++it) { + TQString tmp; + TQStringList textLines = v_iew->e_dit->processedText(); + for (TQStringList::Iterator it = textLines.begin(); it != textLines.end(); ++it) { if (*it == "-- ") // try to be smart, don't include the signature, break; // kmail will append one, too. tmp+=*it+"\n"; @@ -1203,7 +1203,7 @@ void KNComposer::slotToggleDoMail() } -void KNComposer::slotSetCharset(const QString &s) +void KNComposer::slotSetCharset(const TQString &s) { if(s.isEmpty()) return; @@ -1225,7 +1225,7 @@ void KNComposer::slotSetCharsetKeyboard() void KNComposer::slotToggleWordWrap() { - v_iew->e_dit->setWordWrap(a_ctWordWrap->isChecked()? QMultiLineEdit::FixedColumnWidth : QMultiLineEdit::NoWrap); + v_iew->e_dit->setWordWrap(a_ctWordWrap->isChecked()? TQMultiLineEdit::FixedColumnWidth : TQMultiLineEdit::NoWrap); } @@ -1242,7 +1242,7 @@ void KNComposer::slotExternalEditor() if(e_xternalEditor) // in progress... return; - QString editorCommand=knGlobals.configManager()->postNewsComposer()->externalEditor(); + TQString editorCommand=knGlobals.configManager()->postNewsComposer()->externalEditor(); if(editorCommand.isEmpty()) KMessageBox::sorry(this, i18n("No editor configured.\nPlease do this in the settings dialog.")); @@ -1264,18 +1264,18 @@ void KNComposer::slotExternalEditor() } bool ok=true; - QTextCodec *codec=KGlobal::charsets()->codecForName(c_harset, ok); + TQTextCodec *codec=KGlobal::charsets()->codecForName(c_harset, ok); - QString tmp; - QStringList textLines = v_iew->e_dit->processedText(); - for (QStringList::Iterator it = textLines.begin(); it != textLines.end();) { + TQString tmp; + TQStringList textLines = v_iew->e_dit->processedText(); + for (TQStringList::Iterator it = textLines.begin(); it != textLines.end();) { tmp += *it; ++it; if (it != textLines.end()) tmp+="\n"; } - QCString local = codec->fromUnicode(tmp); + TQCString local = codec->fromUnicode(tmp); e_ditorTempfile->file()->writeBlock(local.data(),local.length()); e_ditorTempfile->file()->flush(); @@ -1290,11 +1290,11 @@ void KNComposer::slotExternalEditor() e_xternalEditor=new KProcess(); // construct command line... - QStringList command = QStringList::split(' ',editorCommand); + TQStringList command = TQStringList::split(' ',editorCommand); bool filenameAdded=false; - for ( QStringList::Iterator it = command.begin(); it != command.end(); ++it ) { + for ( TQStringList::Iterator it = command.begin(); it != command.end(); ++it ) { if ((*it).contains("%f")) { - (*it).replace(QRegExp("%f"),e_ditorTempfile->name()); + (*it).replace(TQRegExp("%f"),e_ditorTempfile->name()); filenameAdded=true; } (*e_xternalEditor) << (*it); @@ -1302,7 +1302,7 @@ void KNComposer::slotExternalEditor() if(!filenameAdded) // no %f in the editor command (*e_xternalEditor) << e_ditorTempfile->name(); - connect(e_xternalEditor, SIGNAL(processExited(KProcess *)),this, SLOT(slotEditorFinished(KProcess *))); + connect(e_xternalEditor, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotEditorFinished(KProcess *))); if(!e_xternalEditor->start()) { KMessageBox::error(this, i18n("Unable to start external editor.\nPlease check your configuration in the settings dialog.")); delete e_xternalEditor; @@ -1327,21 +1327,21 @@ void KNComposer::slotSpellcheck() a_ctExternalEditor->setEnabled(false); a_ctSpellCheck->setEnabled(false); - s_pellChecker = new KSpell(this, i18n("Spellcheck"), this, SLOT(slotSpellStarted(KSpell *))); - QStringList l = KSpellingHighlighter::personalWords(); - for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) { + s_pellChecker = new KSpell(this, i18n("Spellcheck"), this, TQT_SLOT(slotSpellStarted(KSpell *))); + TQStringList l = KSpellingHighlighter::personalWords(); + for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) { s_pellChecker->addPersonal( *it ); } - connect(s_pellChecker, SIGNAL(death()), this, SLOT(slotSpellFinished())); - connect(s_pellChecker, SIGNAL(done(const QString&)), this, SLOT(slotSpellDone(const QString&))); - connect(s_pellChecker, SIGNAL(misspelling (const QString &, const QStringList &, unsigned int)), - this, SLOT(slotMisspelling (const QString &, const QStringList &, unsigned int))); - connect(s_pellChecker, SIGNAL(corrected (const QString &, const QString &, unsigned int)), - this, SLOT(slotCorrected (const QString &, const QString &, unsigned int))); + connect(s_pellChecker, TQT_SIGNAL(death()), this, TQT_SLOT(slotSpellFinished())); + connect(s_pellChecker, TQT_SIGNAL(done(const TQString&)), this, TQT_SLOT(slotSpellDone(const TQString&))); + connect(s_pellChecker, TQT_SIGNAL(misspelling (const TQString &, const TQStringList &, unsigned int)), + this, TQT_SLOT(slotMisspelling (const TQString &, const TQStringList &, unsigned int))); + connect(s_pellChecker, TQT_SIGNAL(corrected (const TQString &, const TQString &, unsigned int)), + this, TQT_SLOT(slotCorrected (const TQString &, const TQString &, unsigned int))); } -void KNComposer::slotMisspelling(const QString &text, const QStringList &lst, unsigned int pos) +void KNComposer::slotMisspelling(const TQString &text, const TQStringList &lst, unsigned int pos) { if( spellLineEdit ) v_iew->s_ubject->spellCheckerMisspelling( text, lst, pos); @@ -1350,7 +1350,7 @@ void KNComposer::slotMisspelling(const QString &text, const QStringList &lst, un } -void KNComposer::slotCorrected (const QString &oldWord, const QString &newWord, unsigned int pos) +void KNComposer::slotCorrected (const TQString &oldWord, const TQString &newWord, unsigned int pos) { if( spellLineEdit ) v_iew->s_ubject->spellCheckerCorrected( oldWord, newWord, pos); @@ -1360,7 +1360,7 @@ void KNComposer::slotCorrected (const QString &oldWord, const QString &newWord, void KNComposer::slotUpdateStatusBar() { - QString typeDesc; + TQString typeDesc; switch (m_ode) { case news: typeDesc = i18n("News Article"); break; @@ -1368,7 +1368,7 @@ void KNComposer::slotUpdateStatusBar() break; default : typeDesc = i18n("News Article & Email"); } - QString overwriteDesc; + TQString overwriteDesc; if (v_iew->e_dit->isOverwriteMode()) overwriteDesc = i18n(" OVR "); else @@ -1401,7 +1401,7 @@ void KNComposer::slotConfToolbar() conf->setGroup("composerWindow_options"); saveMainWindowSettings(conf); KEditToolbar dlg(guiFactory(),this); - connect(&dlg,SIGNAL( newToolbarConfig() ), this, SLOT( slotNewToolbarConfig() )); + connect(&dlg,TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() )); dlg.exec(); } @@ -1409,8 +1409,8 @@ void KNComposer::slotNewToolbarConfig() { createGUI("kncomposerui.rc"); - a_ttPopup=static_cast<QPopupMenu*> (factory()->container("attachment_popup", this)); - if(!a_ttPopup) a_ttPopup = new QPopupMenu(); + a_ttPopup=static_cast<TQPopupMenu*> (factory()->container("attachment_popup", this)); + if(!a_ttPopup) a_ttPopup = new TQPopupMenu(); KConfig *conf = knGlobals.config(); conf->setGroup("composerWindow_options"); @@ -1420,10 +1420,10 @@ void KNComposer::slotNewToolbarConfig() //-------------------------------- </Actions> ----------------------------------- -void KNComposer::slotSubjectChanged(const QString &t) +void KNComposer::slotSubjectChanged(const TQString &t) { // replace newlines - QString subject = t; + TQString subject = t; subject.replace( '\n', ' ' ); subject.replace( '\r', ' ' ); if ( subject != t ) // setText() sets the cursor to the end @@ -1436,18 +1436,18 @@ void KNComposer::slotSubjectChanged(const QString &t) } -void KNComposer::slotGroupsChanged(const QString &t) +void KNComposer::slotGroupsChanged(const TQString &t) { KQCStringSplitter split; bool splitOk; - QString currText=v_iew->f_up2->currentText(); + TQString currText=v_iew->f_up2->currentText(); v_iew->f_up2->clear(); split.init(t.latin1(), ","); splitOk=split.first(); while(splitOk) { - v_iew->f_up2->insertItem(QString::fromLatin1(split.string())); + v_iew->f_up2->insertItem(TQString::fromLatin1(split.string())); splitOk=split.next(); } v_iew->f_up2->insertItem(""); @@ -1460,12 +1460,12 @@ void KNComposer::slotGroupsChanged(const QString &t) void KNComposer::slotToBtnClicked() { AddressesDialog dlg( this ); - QString txt; - QString to = v_iew->t_o->text(); + TQString txt; + TQString to = v_iew->t_o->text(); dlg.setShowBCC(false); dlg.setShowCC(false); #if 0 - QStringList lst; + TQStringList lst; txt = mEdtTo->text().stripWhiteSpace(); @@ -1475,7 +1475,7 @@ void KNComposer::slotToBtnClicked() } #endif dlg.setRecentAddresses( RecentAddresses::self(knGlobals.config())->kabcAddresses() ); - if (dlg.exec()==QDialog::Rejected) return; + if (dlg.exec()==TQDialog::Rejected) return; if(!to.isEmpty()) to+=", "; @@ -1506,12 +1506,12 @@ void KNComposer::slotGroupsBtnClicked() if(id==-1) a_rticle->setServerId(nntp->id()); - KNGroupSelectDialog *dlg=new KNGroupSelectDialog(this, nntp, v_iew->g_roups->text().remove(QRegExp("\\s"))); + KNGroupSelectDialog *dlg=new KNGroupSelectDialog(this, nntp, v_iew->g_roups->text().remove(TQRegExp("\\s"))); - connect(dlg, SIGNAL(loadList(KNNntpAccount*)), - knGlobals.groupManager(), SLOT(slotLoadGroupList(KNNntpAccount*))); - connect(knGlobals.groupManager(), SIGNAL(newListReady(KNGroupListData*)), - dlg, SLOT(slotReceiveList(KNGroupListData*))); + connect(dlg, TQT_SIGNAL(loadList(KNNntpAccount*)), + knGlobals.groupManager(), TQT_SLOT(slotLoadGroupList(KNNntpAccount*))); + connect(knGlobals.groupManager(), TQT_SIGNAL(newListReady(KNGroupListData*)), + dlg, TQT_SLOT(slotReceiveList(KNGroupListData*))); if(dlg->exec()) v_iew->g_roups->setText(dlg->selectedGroups()); @@ -1547,14 +1547,14 @@ void KNComposer::slotCancelEditor() } -void KNComposer::slotAttachmentPopup(KListView*, QListViewItem *it, const QPoint &p) +void KNComposer::slotAttachmentPopup(KListView*, TQListViewItem *it, const TQPoint &p) { if(it) a_ttPopup->popup(p); } -void KNComposer::slotAttachmentSelected(QListViewItem *it) +void KNComposer::slotAttachmentSelected(TQListViewItem *it) { if(v_iew->a_ttWidget) { v_iew->a_ttRemoveBtn->setEnabled((it!=0)); @@ -1563,13 +1563,13 @@ void KNComposer::slotAttachmentSelected(QListViewItem *it) } -void KNComposer::slotAttachmentEdit(QListViewItem *) +void KNComposer::slotAttachmentEdit(TQListViewItem *) { slotAttachmentProperties(); } -void KNComposer::slotAttachmentRemove(QListViewItem *) +void KNComposer::slotAttachmentRemove(TQListViewItem *) { slotRemoveAttachment(); } @@ -1590,7 +1590,7 @@ void KNComposer::slotSpellStarted( KSpell *) // read the quote indicator from the preferences KConfig *config=knGlobals.config(); KConfigGroupSaver saver(config, "READNEWS"); - QString quotePrefix; + TQString quotePrefix; quotePrefix = config->readEntry("quoteCharacters",">"); //todo fixme //quotePrefix = mComposer->msg()->formatString(quotePrefix); @@ -1605,7 +1605,7 @@ void KNComposer::slotSpellStarted( KSpell *) s_pellChecker->check( v_iew->s_ubject->text()); } -void KNComposer::slotSpellDone(const QString &newtext) +void KNComposer::slotSpellDone(const TQString &newtext) { a_ctExternalEditor->setEnabled(true); a_ctSpellCheck->setEnabled(true); @@ -1619,7 +1619,7 @@ void KNComposer::slotSpellDone(const QString &newtext) { //stop spell check spellLineEdit = false; - QString tmpText( newtext); + TQString tmpText( newtext); tmpText = tmpText.remove('\n'); if( tmpText != v_iew->s_ubject->text() ) @@ -1669,14 +1669,14 @@ void KNComposer::slotSpellFinished() } -void KNComposer::slotDragEnterEvent(QDragEnterEvent *ev) +void KNComposer::slotDragEnterEvent(TQDragEnterEvent *ev) { - QStringList files; + TQStringList files; ev->accept(KURLDrag::canDecode(ev)); } -void KNComposer::slotDropEvent(QDropEvent *ev) +void KNComposer::slotDropEvent(TQDropEvent *ev) { KURL::List urls; @@ -1701,22 +1701,22 @@ void KNComposer::slotDropEvent(QDropEvent *ev) } -void KNComposer::dragEnterEvent(QDragEnterEvent *ev) +void KNComposer::dragEnterEvent(TQDragEnterEvent *ev) { slotDragEnterEvent(ev); } -void KNComposer::dropEvent(QDropEvent *ev) +void KNComposer::dropEvent(TQDropEvent *ev) { slotDropEvent(ev); } -QPopupMenu * KNComposer::popupMenu( const QString& name ) +TQPopupMenu * KNComposer::popupMenu( const TQString& name ) { Q_ASSERT(factory()); if ( factory() ) - return ((QPopupMenu*)factory()->container( name, this )); + return ((TQPopupMenu*)factory()->container( name, this )); return 0L; } @@ -1725,43 +1725,43 @@ QPopupMenu * KNComposer::popupMenu( const QString& name ) KNComposer::ComposerView::ComposerView(KNComposer *composer, const char *n) - : QSplitter(QSplitter::Vertical, composer, n), a_ttWidget(0), a_ttView(0), v_iewOpen(false) + : TQSplitter(TQSplitter::Vertical, composer, n), a_ttWidget(0), a_ttView(0), v_iewOpen(false) { - QWidget *main=new QWidget(this); + TQWidget *main=new TQWidget(this); //headers - QFrame *hdrFrame=new QFrame(main); - hdrFrame->setFrameStyle(QFrame::Box | QFrame::Sunken); - QGridLayout *hdrL=new QGridLayout(hdrFrame, 4,3, 7,5); + TQFrame *hdrFrame=new TQFrame(main); + hdrFrame->setFrameStyle(TQFrame::Box | TQFrame::Sunken); + TQGridLayout *hdrL=new TQGridLayout(hdrFrame, 4,3, 7,5); hdrL->setColStretch(1,1); //To t_o=new KNLineEdit(this, true, hdrFrame); mEdtList.append(t_o); - l_to=new QLabel(t_o, i18n("T&o:"), hdrFrame); - t_oBtn=new QPushButton(i18n("&Browse..."), hdrFrame); + l_to=new TQLabel(t_o, i18n("T&o:"), hdrFrame); + t_oBtn=new TQPushButton(i18n("&Browse..."), hdrFrame); hdrL->addWidget(l_to, 0,0); hdrL->addWidget(t_o, 0,1); hdrL->addWidget(t_oBtn, 0,2); - connect(t_oBtn, SIGNAL(clicked()), parent(), SLOT(slotToBtnClicked())); + connect(t_oBtn, TQT_SIGNAL(clicked()), parent(), TQT_SLOT(slotToBtnClicked())); //Newsgroups g_roups=new KNLineEdit(this, false, hdrFrame); mEdtList.append(g_roups); - l_groups=new QLabel(g_roups, i18n("&Groups:"), hdrFrame); - g_roupsBtn=new QPushButton(i18n("B&rowse..."), hdrFrame); + l_groups=new TQLabel(g_roups, i18n("&Groups:"), hdrFrame); + g_roupsBtn=new TQPushButton(i18n("B&rowse..."), hdrFrame); hdrL->addWidget(l_groups, 1,0); hdrL->addWidget(g_roups, 1,1); hdrL->addWidget(g_roupsBtn, 1,2); - connect(g_roups, SIGNAL(textChanged(const QString&)), - parent(), SLOT(slotGroupsChanged(const QString&))); - connect(g_roupsBtn, SIGNAL(clicked()), parent(), SLOT(slotGroupsBtnClicked())); + connect(g_roups, TQT_SIGNAL(textChanged(const TQString&)), + parent(), TQT_SLOT(slotGroupsChanged(const TQString&))); + connect(g_roupsBtn, TQT_SIGNAL(clicked()), parent(), TQT_SLOT(slotGroupsBtnClicked())); //Followup-To f_up2=new KComboBox(true, hdrFrame); - l_fup2=new QLabel(f_up2, i18n("Follo&wup-To:"), hdrFrame); + l_fup2=new TQLabel(f_up2, i18n("Follo&wup-To:"), hdrFrame); hdrL->addWidget(l_fup2, 2,0); hdrL->addMultiCellWidget(f_up2, 2,2, 1,2); @@ -1769,11 +1769,11 @@ KNComposer::ComposerView::ComposerView(KNComposer *composer, const char *n) s_ubject=new KNLineEditSpell(this, false, hdrFrame); mEdtList.append(s_ubject); - QLabel *l=new QLabel(s_ubject, i18n("S&ubject:"), hdrFrame); + TQLabel *l=new TQLabel(s_ubject, i18n("S&ubject:"), hdrFrame); hdrL->addWidget(l, 3,0); hdrL->addMultiCellWidget(s_ubject, 3,3, 1,2); - connect(s_ubject, SIGNAL(textChanged(const QString&)), - parent(), SLOT(slotSubjectChanged(const QString&))); + connect(s_ubject, TQT_SIGNAL(textChanged(const TQString&)), + parent(), TQT_SLOT(slotSubjectChanged(const TQString&))); //Editor e_dit=new Editor(this, composer, main); @@ -1781,34 +1781,34 @@ KNComposer::ComposerView::ComposerView(KNComposer *composer, const char *n) KConfig *config = knGlobals.config(); KConfigGroupSaver saver(config, "VISUAL_APPEARANCE"); - QColor defaultColor1( kapp->palette().active().text()); // defaults from kmreaderwin.cpp - QColor defaultColor2( kapp->palette().active().text() ); - QColor defaultColor3( kapp->palette().active().text() ); - QColor defaultForeground( kapp->palette().active().text() ); - QColor col1 = config->readColorEntry( "ForegroundColor", &defaultForeground ); - QColor col2 = config->readColorEntry( "quote3Color", &defaultColor3 ); - QColor col3 = config->readColorEntry( "quote2Color", &defaultColor2 ); - QColor col4 = config->readColorEntry( "quote1Color", &defaultColor1 ); - QColor c = QColor("red"); + TQColor defaultColor1( kapp->palette().active().text()); // defaults from kmreaderwin.cpp + TQColor defaultColor2( kapp->palette().active().text() ); + TQColor defaultColor3( kapp->palette().active().text() ); + TQColor defaultForeground( kapp->palette().active().text() ); + TQColor col1 = config->readColorEntry( "ForegroundColor", &defaultForeground ); + TQColor col2 = config->readColorEntry( "quote3Color", &defaultColor3 ); + TQColor col3 = config->readColorEntry( "quote2Color", &defaultColor2 ); + TQColor col4 = config->readColorEntry( "quote1Color", &defaultColor1 ); + TQColor c = TQColor("red"); mSpellChecker = new KDictSpellingHighlighter(e_dit, /*active*/ true, /*autoEnabled*/ true, /*spellColor*/ config->readColorEntry("NewMessage", &c), /*colorQuoting*/ true, col1, col2, col3, col4); - connect( mSpellChecker, SIGNAL(newSuggestions(const QString&, const QStringList&, unsigned int)), e_dit, - SLOT(slotAddSuggestion(const QString&, const QStringList&, unsigned int)) ); + connect( mSpellChecker, TQT_SIGNAL(newSuggestions(const TQString&, const TQStringList&, unsigned int)), e_dit, + TQT_SLOT(slotAddSuggestion(const TQString&, const TQStringList&, unsigned int)) ); - QVBoxLayout *notL=new QVBoxLayout(e_dit); + TQVBoxLayout *notL=new TQVBoxLayout(e_dit); notL->addStretch(1); - n_otification=new QGroupBox(2, Qt::Horizontal, e_dit); - l=new QLabel(i18n("You are currently editing the article body\nin an external editor. To continue, you have\nto close the external editor."), n_otification); - c_ancelEditorBtn=new QPushButton(i18n("&Kill External Editor"), n_otification); - n_otification->setFrameStyle(QFrame::Panel | QFrame::Raised); + n_otification=new TQGroupBox(2, Qt::Horizontal, e_dit); + l=new TQLabel(i18n("You are currently editing the article body\nin an external editor. To continue, you have\nto close the external editor."), n_otification); + c_ancelEditorBtn=new TQPushButton(i18n("&Kill External Editor"), n_otification); + n_otification->setFrameStyle(TQFrame::Panel | TQFrame::Raised); n_otification->setLineWidth(2); n_otification->hide(); notL->addWidget(n_otification, 0, Qt::AlignHCenter); notL->addStretch(1); //finish GUI - QVBoxLayout *topL=new QVBoxLayout(main, 4,4); + TQVBoxLayout *topL=new TQVBoxLayout(main, 4,4); topL->addWidget(hdrFrame); topL->addWidget(e_dit, 1); } @@ -1822,8 +1822,8 @@ KNComposer::ComposerView::~ComposerView() conf->writeEntry("Att_Splitter",sizes()); // save splitter pos - QValueList<int> lst; // save header sizes - QHeader *h=a_ttView->header(); + TQValueList<int> lst; // save header sizes + TQHeader *h=a_ttView->header(); for (int i=0; i<5; i++) lst << h->sectionSize(i); conf->writeEntry("Att_Headers",lst); @@ -1832,14 +1832,14 @@ KNComposer::ComposerView::~ComposerView() } -void KNComposer::ComposerView::focusNextPrevEdit(const QWidget* aCur, bool aNext) +void KNComposer::ComposerView::focusNextPrevEdit(const TQWidget* aCur, bool aNext) { - QValueList<QWidget*>::Iterator it; + TQValueList<TQWidget*>::Iterator it; if ( !aCur ) { it = --( mEdtList.end() ); } else { - for ( QValueList<QWidget*>::Iterator it2 = mEdtList.begin(); it2 != mEdtList.end(); ++it2 ) { + for ( TQValueList<TQWidget*>::Iterator it2 = mEdtList.begin(); it2 != mEdtList.end(); ++it2 ) { if ( (*it2) == aCur ) { it = it2; break; @@ -1899,40 +1899,40 @@ void KNComposer::ComposerView::restartBackgroundSpellCheck() void KNComposer::ComposerView::showAttachmentView() { if(!a_ttWidget) { - a_ttWidget=new QWidget(this); - QGridLayout *topL=new QGridLayout(a_ttWidget, 3, 2, 4, 4); + a_ttWidget=new TQWidget(this); + TQGridLayout *topL=new TQGridLayout(a_ttWidget, 3, 2, 4, 4); a_ttView=new AttachmentView(a_ttWidget); topL->addMultiCellWidget(a_ttView, 0,2, 0,0); //connections - connect(a_ttView, SIGNAL(currentChanged(QListViewItem*)), - parent(), SLOT(slotAttachmentSelected(QListViewItem*))); - connect(a_ttView, SIGNAL(clicked ( QListViewItem * )), - parent(), SLOT(slotAttachmentSelected(QListViewItem*))); - - connect(a_ttView, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), - parent(), SLOT(slotAttachmentPopup(KListView*, QListViewItem*, const QPoint&))); - connect(a_ttView, SIGNAL(delPressed(QListViewItem*)), - parent(), SLOT(slotAttachmentRemove(QListViewItem*))); - connect(a_ttView, SIGNAL(doubleClicked(QListViewItem*)), - parent(), SLOT(slotAttachmentEdit(QListViewItem*))); - connect(a_ttView, SIGNAL(returnPressed(QListViewItem*)), - parent(), SLOT(slotAttachmentEdit(QListViewItem*))); + connect(a_ttView, TQT_SIGNAL(currentChanged(TQListViewItem*)), + parent(), TQT_SLOT(slotAttachmentSelected(TQListViewItem*))); + connect(a_ttView, TQT_SIGNAL(clicked ( TQListViewItem * )), + parent(), TQT_SLOT(slotAttachmentSelected(TQListViewItem*))); + + connect(a_ttView, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), + parent(), TQT_SLOT(slotAttachmentPopup(KListView*, TQListViewItem*, const TQPoint&))); + connect(a_ttView, TQT_SIGNAL(delPressed(TQListViewItem*)), + parent(), TQT_SLOT(slotAttachmentRemove(TQListViewItem*))); + connect(a_ttView, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + parent(), TQT_SLOT(slotAttachmentEdit(TQListViewItem*))); + connect(a_ttView, TQT_SIGNAL(returnPressed(TQListViewItem*)), + parent(), TQT_SLOT(slotAttachmentEdit(TQListViewItem*))); //buttons - a_ttAddBtn=new QPushButton(i18n("A&dd..."),a_ttWidget); - connect(a_ttAddBtn, SIGNAL(clicked()), parent(), SLOT(slotAttachFile())); + a_ttAddBtn=new TQPushButton(i18n("A&dd..."),a_ttWidget); + connect(a_ttAddBtn, TQT_SIGNAL(clicked()), parent(), TQT_SLOT(slotAttachFile())); topL->addWidget(a_ttAddBtn, 0,1); - a_ttRemoveBtn=new QPushButton(i18n("&Remove"), a_ttWidget); + a_ttRemoveBtn=new TQPushButton(i18n("&Remove"), a_ttWidget); a_ttRemoveBtn->setEnabled(false); - connect(a_ttRemoveBtn, SIGNAL(clicked()), parent(), SLOT(slotRemoveAttachment())); + connect(a_ttRemoveBtn, TQT_SIGNAL(clicked()), parent(), TQT_SLOT(slotRemoveAttachment())); topL->addWidget(a_ttRemoveBtn, 1,1); - a_ttEditBtn=new QPushButton(i18n("&Properties"), a_ttWidget); + a_ttEditBtn=new TQPushButton(i18n("&Properties"), a_ttWidget); a_ttEditBtn->setEnabled(false); - connect(a_ttEditBtn, SIGNAL(clicked()), parent(), SLOT(slotAttachmentProperties())); + connect(a_ttEditBtn, TQT_SIGNAL(clicked()), parent(), TQT_SLOT(slotAttachmentProperties())); topL->addWidget(a_ttEditBtn, 2,1, Qt::AlignTop); topL->setRowStretch(2,1); @@ -1946,16 +1946,16 @@ void KNComposer::ComposerView::showAttachmentView() KConfig *conf=knGlobals.config(); conf->setGroup("POSTNEWS"); - QValueList<int> lst=conf->readIntListEntry("Att_Splitter"); + TQValueList<int> lst=conf->readIntListEntry("Att_Splitter"); if(lst.count()!=2) lst << 267 << 112; setSizes(lst); lst=conf->readIntListEntry("Att_Headers"); if(lst.count()==5) { - QValueList<int>::Iterator it=lst.begin(); + TQValueList<int>::Iterator it=lst.begin(); - QHeader *h=a_ttView->header(); + TQHeader *h=a_ttView->header(); for(int i=0; i<5; i++) { h->resizeSection(i,(*it)); ++it; @@ -1991,14 +1991,14 @@ void KNComposer::ComposerView::hideExternalNotification() //===================================================================================== #include <kcursor.h> -KNComposer::Editor::Editor(KNComposer::ComposerView *_composerView, KNComposer *_composer, QWidget *parent, char *name) +KNComposer::Editor::Editor(KNComposer::ComposerView *_composerView, KNComposer *_composer, TQWidget *parent, char *name) : KEdit(parent, name), m_composer( _composer ), m_composerView(_composerView) { setOverwriteEnabled(true); spell = 0L; installEventFilter(this); KCursor::setAutoHideCursor( this, true, true ); - m_bound = QRegExp( QString::fromLatin1("[\\s\\W]") ); + m_bound = TQRegExp( TQString::fromLatin1("[\\s\\W]") ); } @@ -2009,14 +2009,14 @@ KNComposer::Editor::~Editor() } //----------------------------------------------------------------------------- -bool KNComposer::Editor::eventFilter(QObject*o, QEvent* e) +bool KNComposer::Editor::eventFilter(TQObject*o, TQEvent* e) { if (o == this) KCursor::autoHideEventFilter(o, e); - if (e->type() == QEvent::KeyPress) + if (e->type() == TQEvent::KeyPress) { - QKeyEvent *k = (QKeyEvent*)e; + TQKeyEvent *k = (TQKeyEvent*)e; // ---sven's Arrow key navigation start --- // Key Up in first line takes you to Subject line. if (k->key() == Key_Up && k->state() != ShiftButton && currentLine() == 0 @@ -2034,14 +2034,14 @@ bool KNComposer::Editor::eventFilter(QObject*o, QEvent* e) m_composerView->focusNextPrevEdit(0, false); return true; } - } else if ( e->type() == QEvent::ContextMenu ) { - QContextMenuEvent *event = (QContextMenuEvent*) e; + } else if ( e->type() == TQEvent::ContextMenu ) { + TQContextMenuEvent *event = (TQContextMenuEvent*) e; int para = 1, charPos, firstSpace, lastSpace; //Get the character at the position of the click charPos = charAt( viewportToContents(event->pos() ), ¶ ); - QString paraText = text( para ); + TQString paraText = text( para ); if( !paraText.at(charPos).isSpace() ) { @@ -2050,7 +2050,7 @@ bool KNComposer::Editor::eventFilter(QObject*o, QEvent* e) lastSpace = paraText.find( m_bound, charPos ); if( lastSpace == -1 ) lastSpace = paraText.length(); - QString word = paraText.mid( firstSpace, lastSpace - firstSpace ); + TQString word = paraText.mid( firstSpace, lastSpace - firstSpace ); //Continue if this word was misspelled if( !word.isEmpty() && m_replacements.contains( word ) ) { @@ -2058,18 +2058,18 @@ bool KNComposer::Editor::eventFilter(QObject*o, QEvent* e) p.insertTitle( i18n("Suggestions") ); //Add the suggestions to the popup menu - QStringList reps = m_replacements[word]; + TQStringList reps = m_replacements[word]; if( reps.count() > 0 ) { int listPos = 0; - for ( QStringList::Iterator it = reps.begin(); it != reps.end(); ++it ) { + for ( TQStringList::Iterator it = reps.begin(); it != reps.end(); ++it ) { p.insertItem( *it, listPos ); listPos++; } } else { - p.insertItem( QString::fromLatin1("No Suggestions"), -2 ); + p.insertItem( TQString::fromLatin1("No Suggestions"), -2 ); } //Execute the popup inline @@ -2097,16 +2097,16 @@ bool KNComposer::Editor::eventFilter(QObject*o, QEvent* e) return KEdit::eventFilter(o, e); } -void KNComposer::Editor::slotAddSuggestion( const QString &text, const QStringList &lst, unsigned int ) +void KNComposer::Editor::slotAddSuggestion( const TQString &text, const TQStringList &lst, unsigned int ) { m_replacements[text] = lst; } // expand tabs to avoid the "tab-damage", // auto-wraped paragraphs have to split (code taken from KEdit::saveText) -QStringList KNComposer::Editor::processedText() +TQStringList KNComposer::Editor::processedText() { - QStringList ret; + TQStringList ret; int lines = numLines()-1; if (lines < 0) return ret; @@ -2121,7 +2121,7 @@ QStringList KNComposer::Editor::processedText() if (lines_in_parag == 1) { ret.append(textLine(i)); } else { - QString parag_text = textLine(i); + TQString parag_text = textLine(i); int pos = 0; int last_pos = 0; int current_line = 0; @@ -2137,11 +2137,11 @@ QStringList KNComposer::Editor::processedText() } } - QString replacement; + TQString replacement; int tabPos; - for (QStringList::Iterator it = ret.begin(); it != ret.end(); ++it ) { + for (TQStringList::Iterator it = ret.begin(); it != ret.end(); ++it ) { while ((tabPos=(*it).find('\t'))!=-1) { - replacement.fill(QChar(' '), 8-(tabPos%8)); + replacement.fill(TQChar(' '), 8-(tabPos%8)); (*it).replace(tabPos, 1, replacement); } } @@ -2152,14 +2152,14 @@ QStringList KNComposer::Editor::processedText() void KNComposer::Editor::slotPasteAsQuotation() { - QString s = QApplication::clipboard()->text(); + TQString s = TQApplication::clipboard()->text(); if (!s.isEmpty()) { for (int i=0; (uint)i<s.length(); i++) { if ( s[i] < ' ' && s[i] != '\n' && s[i] != '\t' ) s[i] = ' '; } s.prepend("> "); - s.replace(QRegExp("\n"),"\n> "); + s.replace(TQRegExp("\n"),"\n> "); insert(s); } } @@ -2184,14 +2184,14 @@ void KNComposer::Editor::slotReplace() void KNComposer::Editor::slotAddQuotes() { if (hasMarkedText()) { - QString s = markedText(); + TQString s = markedText(); s.prepend("> "); - s.replace(QRegExp("\n"),"\n> "); + s.replace(TQRegExp("\n"),"\n> "); insert(s); } else { int l = currentLine(); int c = currentColumn(); - QString s = textLine(l); + TQString s = textLine(l); s.prepend("> "); insertLine(s,l); removeLine(l+1); @@ -2203,15 +2203,15 @@ void KNComposer::Editor::slotAddQuotes() void KNComposer::Editor::slotRemoveQuotes() { if (hasMarkedText()) { - QString s = markedText(); + TQString s = markedText(); if (s.left(2) == "> ") s.remove(0,2); - s.replace(QRegExp("\n> "),"\n"); + s.replace(TQRegExp("\n> "),"\n"); insert(s); } else { int l = currentLine(); int c = currentColumn(); - QString s = textLine(l); + TQString s = textLine(l); if (s.left(2) == "> ") { s.remove(0,2); insertLine(s,l); @@ -2225,15 +2225,15 @@ void KNComposer::Editor::slotRemoveQuotes() void KNComposer::Editor::slotAddBox() { if (hasMarkedText()) { - QString s = markedText(); + TQString s = markedText(); s.prepend(",----[ ]\n"); - s.replace(QRegExp("\n"),"\n| "); + s.replace(TQRegExp("\n"),"\n| "); s.append("\n`----"); insert(s); } else { int l = currentLine(); int c = currentColumn(); - QString s = QString::fromLatin1(",----[ ]\n| %1\n`----").arg(textLine(l)); + TQString s = TQString::fromLatin1(",----[ ]\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()) { - QString s = QString::fromLatin1("\n") + markedText() + QString::fromLatin1("\n"); - s.replace(QRegExp("\n,----[^\n]*\n"),"\n"); - s.replace(QRegExp("\n| "),"\n"); - s.replace(QRegExp("\n`----[^\n]*\n"),"\n"); + 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"); s.remove(0,1); s.truncate(s.length()-1); insert(s); @@ -2255,7 +2255,7 @@ void KNComposer::Editor::slotRemoveBox() int l = currentLine(); int c = currentColumn(); - QString s = textLine(l); // test if we are in a box + TQString s = textLine(l); // test if we are in a box if (!((s.left(2) == "| ")||(s.left(5)==",----")||(s.left(5)=="`----"))) return; @@ -2309,7 +2309,7 @@ void KNComposer::Editor::slotRot13() } -void KNComposer::Editor::contentsDragEnterEvent(QDragEnterEvent *ev) +void KNComposer::Editor::contentsDragEnterEvent(TQDragEnterEvent *ev) { if (KURLDrag::canDecode(ev)) emit(sigDragEnterEvent(ev)); @@ -2318,7 +2318,7 @@ void KNComposer::Editor::contentsDragEnterEvent(QDragEnterEvent *ev) } -void KNComposer::Editor::contentsDropEvent(QDropEvent *ev) +void KNComposer::Editor::contentsDropEvent(TQDropEvent *ev) { if (KURLDrag::canDecode(ev)) emit(sigDropEvent(ev)); @@ -2326,12 +2326,12 @@ void KNComposer::Editor::contentsDropEvent(QDropEvent *ev) KEdit::dropEvent(ev); } -void KNComposer::Editor::keyPressEvent ( QKeyEvent *e) +void KNComposer::Editor::keyPressEvent ( TQKeyEvent *e) { if( e->key() == Key_Return ) { int line, col; getCursorPosition( &line, &col ); - QString lineText = text( line ); + TQString lineText = text( line ); // returns line with additional trailing space (bug in Qt?), cut it off lineText.truncate( lineText.length() - 1 ); // special treatment of quoted lines only if the cursor is neither at @@ -2360,7 +2360,7 @@ void KNComposer::Editor::keyPressEvent ( QKeyEvent *e) if( isQuotedLine && ( bot != lineText.length() ) && ( col >= int( bot ) ) ) { - QString newLine = text( line + 1 ); + TQString newLine = text( line + 1 ); // remove leading white space from the new line and instead // add the quote indicators of the previous line unsigned int leadingWhiteSpaceCount = 0; @@ -2386,27 +2386,27 @@ void KNComposer::Editor::keyPressEvent ( QKeyEvent *e) } -void KNComposer::Editor::contentsContextMenuEvent( QContextMenuEvent */*e*/ ) +void KNComposer::Editor::contentsContextMenuEvent( TQContextMenuEvent */*e*/ ) { - QString selectWord = selectWordUnderCursor(); - QPopupMenu* popup = 0L; + TQString selectWord = selectWordUnderCursor(); + TQPopupMenu* popup = 0L; if ( selectWord.isEmpty()) { popup = m_composer ? m_composer->popupMenu( "edit" ): 0; if ( popup ) - popup->popup(QCursor::pos()); + popup->popup(TQCursor::pos()); } else { - spell = new KSpell(this, i18n("Spellcheck"), this, SLOT(slotSpellStarted(KSpell *))); - QStringList l = KSpellingHighlighter::personalWords(); - for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) { + spell = new KSpell(this, i18n("Spellcheck"), this, TQT_SLOT(slotSpellStarted(KSpell *))); + TQStringList l = KSpellingHighlighter::personalWords(); + for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) { spell->addPersonal( *it ); } - connect(spell, SIGNAL(death()), this, SLOT(slotSpellFinished())); - connect(spell, SIGNAL(done(const QString&)), this, SLOT(slotSpellDone(const QString&))); - connect(spell, SIGNAL(misspelling (const QString &, const QStringList &, unsigned int)), - this, SLOT(slotMisspelling (const QString &, const QStringList &, unsigned int))); + connect(spell, TQT_SIGNAL(death()), this, TQT_SLOT(slotSpellFinished())); + connect(spell, TQT_SIGNAL(done(const TQString&)), this, TQT_SLOT(slotSpellDone(const TQString&))); + connect(spell, TQT_SIGNAL(misspelling (const TQString &, const TQStringList &, unsigned int)), + this, TQT_SLOT(slotMisspelling (const TQString &, const TQStringList &, unsigned int))); } } @@ -2416,7 +2416,7 @@ void KNComposer::Editor::slotSpellStarted( KSpell *) } -void KNComposer::Editor::slotSpellDone(const QString &/*newtext*/) +void KNComposer::Editor::slotSpellDone(const TQString &/*newtext*/) { spell->cleanUp(); } @@ -2456,20 +2456,20 @@ void KNComposer::Editor::del() } -void KNComposer::Editor::slotMisspelling (const QString &, const QStringList &lst, unsigned int) +void KNComposer::Editor::slotMisspelling (const TQString &, const TQStringList &lst, unsigned int) { int countAction = m_composer->listOfResultOfCheckWord( lst , selectWordUnderCursor()); if ( countAction>0 ) { - QPopupMenu* popup = m_composer ? m_composer->popupMenu( "edit_with_spell" ): 0; + TQPopupMenu* popup = m_composer ? m_composer->popupMenu( "edit_with_spell" ): 0; if ( popup ) - popup->popup(QCursor::pos()); + popup->popup(TQCursor::pos()); } else { - QPopupMenu* popup = m_composer ? m_composer->popupMenu( "edit" ): 0; + TQPopupMenu* popup = m_composer ? m_composer->popupMenu( "edit" ): 0; if ( popup ) - popup->popup(QCursor::pos()); + popup->popup(TQCursor::pos()); } } @@ -2490,10 +2490,10 @@ void KNComposer::Editor::slotCorrectWord() //===================================================================================== -KNComposer::AttachmentView::AttachmentView(QWidget *parent, char *name) +KNComposer::AttachmentView::AttachmentView(TQWidget *parent, char *name) : KListView(parent, name) { - setFrameStyle(QFrame::WinPanel | QFrame::Sunken); // match the QMultiLineEdit style + setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); // match the TQMultiLineEdit style addColumn(i18n("File"), 115); addColumn(i18n("Type"), 91); addColumn(i18n("Size"), 55); @@ -2509,7 +2509,7 @@ KNComposer::AttachmentView::~AttachmentView() } -void KNComposer::AttachmentView::keyPressEvent(QKeyEvent *e) +void KNComposer::AttachmentView::keyPressEvent(TQKeyEvent *e) { if(!e) return; // subclass bug @@ -2545,44 +2545,44 @@ KNComposer::AttachmentViewItem::~AttachmentViewItem() //===================================================================================== -KNComposer::AttachmentPropertiesDlg::AttachmentPropertiesDlg(KNAttachment *a, QWidget *p, const char *n) : +KNComposer::AttachmentPropertiesDlg::AttachmentPropertiesDlg(KNAttachment *a, TQWidget *p, const char *n) : KDialogBase(p, n, true, i18n("Attachment Properties"), Help|Ok|Cancel, Ok), a_ttachment(a), n_onTextAsText(false) { //init GUI - QWidget *page=new QWidget(this); + TQWidget *page=new TQWidget(this); setMainWidget(page); - QVBoxLayout *topL=new QVBoxLayout(page); + TQVBoxLayout *topL=new TQVBoxLayout(page); //file info - QGroupBox *fileGB=new QGroupBox(i18n("File"), page); - QGridLayout *fileL=new QGridLayout(fileGB, 3,2, 15,5); + TQGroupBox *fileGB=new TQGroupBox(i18n("File"), page); + TQGridLayout *fileL=new TQGridLayout(fileGB, 3,2, 15,5); fileL->addRowSpacing(0, fontMetrics().lineSpacing()-9); - fileL->addWidget(new QLabel(i18n("Name:"), fileGB) ,1,0); - fileL->addWidget(new QLabel(QString("<b>%1</b>").arg(a->name()), fileGB), 1,1, Qt::AlignLeft); - fileL->addWidget(new QLabel(i18n("Size:"), fileGB), 2,0); - fileL->addWidget(new QLabel(a->contentSize(), fileGB), 2,1, Qt::AlignLeft); + fileL->addWidget(new TQLabel(i18n("Name:"), fileGB) ,1,0); + fileL->addWidget(new TQLabel(TQString("<b>%1</b>").arg(a->name()), fileGB), 1,1, Qt::AlignLeft); + fileL->addWidget(new TQLabel(i18n("Size:"), fileGB), 2,0); + fileL->addWidget(new TQLabel(a->contentSize(), fileGB), 2,1, Qt::AlignLeft); fileL->setColStretch(1,1); topL->addWidget(fileGB); //mime info - QGroupBox *mimeGB=new QGroupBox(i18n("Mime"), page); - QGridLayout *mimeL=new QGridLayout(mimeGB, 4,2, 15,5); + TQGroupBox *mimeGB=new TQGroupBox(i18n("Mime"), page); + TQGridLayout *mimeL=new TQGridLayout(mimeGB, 4,2, 15,5); mimeL->addRowSpacing(0, fontMetrics().lineSpacing()-9); m_imeType=new KLineEdit(mimeGB); m_imeType->setText(a->mimeType()); mimeL->addWidget(m_imeType, 1,1); - mimeL->addWidget(new QLabel(m_imeType, i18n("&Mime-Type:"), mimeGB), 1,0); + mimeL->addWidget(new TQLabel(m_imeType, i18n("&Mime-Type:"), mimeGB), 1,0); d_escription=new KLineEdit(mimeGB); d_escription->setText(a->description()); mimeL->addWidget(d_escription, 2,1); - mimeL->addWidget(new QLabel(d_escription, i18n("&Description:"), mimeGB), 2,0); + mimeL->addWidget(new TQLabel(d_escription, i18n("&Description:"), mimeGB), 2,0); - e_ncoding=new QComboBox(false, mimeGB); + e_ncoding=new TQComboBox(false, mimeGB); e_ncoding->insertItem("7Bit"); e_ncoding->insertItem("8Bit"); e_ncoding->insertItem("quoted-printable"); @@ -2594,18 +2594,18 @@ KNComposer::AttachmentPropertiesDlg::AttachmentPropertiesDlg(KNAttachment *a, QW else e_ncoding->setCurrentItem(a->cte()); mimeL->addWidget(e_ncoding, 3,1); - mimeL->addWidget(new QLabel(e_ncoding, i18n("&Encoding:"), mimeGB), 3,0); + mimeL->addWidget(new TQLabel(e_ncoding, i18n("&Encoding:"), mimeGB), 3,0); mimeL->setColStretch(1,1); topL->addWidget(mimeGB); //connections - connect(m_imeType, SIGNAL(textChanged(const QString&)), - this, SLOT(slotMimeTypeTextChanged(const QString&))); + connect(m_imeType, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotMimeTypeTextChanged(const TQString&))); //finish GUI setFixedHeight(sizeHint().height()); - KNHelper::restoreWindowSize("attProperties", this, QSize(300,250)); + KNHelper::restoreWindowSize("attProperties", this, TQSize(300,250)); setHelp("anc-knode-editor-advanced"); } @@ -2639,7 +2639,7 @@ void KNComposer::AttachmentPropertiesDlg::accept() } -void KNComposer::AttachmentPropertiesDlg::slotMimeTypeTextChanged(const QString &text) +void KNComposer::AttachmentPropertiesDlg::slotMimeTypeTextChanged(const TQString &text) { enableButtonOK( !text.isEmpty() ); if(text.left(5)!="text/") { |