summaryrefslogtreecommitdiffstats
path: root/knode/kncomposer.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-14 20:16:30 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-14 20:16:30 +0000
commit1c93fca14d9ce37499bcfdf994c660186a0b6f17 (patch)
treef2defe163a805a9e34a2142dfde4cdb5e49241e7 /knode/kncomposer.cpp
parent67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (diff)
downloadtdepim-1c93fca14d9ce37499bcfdf994c660186a0b6f17.tar.gz
tdepim-1c93fca14d9ce37499bcfdf994c660186a0b6f17.zip
Enable kdepim compilation under Qt4
This will likely break Qt3 compilation temporarily, which is an unintended side effect. A third and final kdepim commit will repair Qt3 compilation shortly. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227946 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knode/kncomposer.cpp')
-rw-r--r--knode/kncomposer.cpp118
1 files changed, 59 insertions, 59 deletions
diff --git a/knode/kncomposer.cpp b/knode/kncomposer.cpp
index 4e928a495..160ab38e5 100644
--- a/knode/kncomposer.cpp
+++ b/knode/kncomposer.cpp
@@ -205,70 +205,70 @@ KNComposer::KNComposer(KNLocalArticle *a, const TQString &text, const TQString &
//------------------------------- <Actions> --------------------------------------
//file menu
- new KAction(i18n("&Send Now"),"mail_send", CTRL + Key_Return , this,
+ new KAction(i18n("&Send Now"),"mail_send", CTRL + Key_Return , TQT_TQOBJECT(this),
TQT_SLOT(slotSendNow()), actionCollection(), "send_now");
- new KAction(i18n("Send &Later"), "queue", 0, this,
+ new KAction(i18n("Send &Later"), "queue", 0, TQT_TQOBJECT(this),
TQT_SLOT(slotSendLater()), actionCollection(), "send_later");
- new KAction(i18n("Save as &Draft"),"filesave", 0 , this,
+ new KAction(i18n("Save as &Draft"),"filesave", 0 , TQT_TQOBJECT(this),
TQT_SLOT(slotSaveAsDraft()), actionCollection(), "save_as_draft");
- new KAction(i18n("D&elete"),"editdelete", 0 , this,
+ new KAction(i18n("D&elete"),"editdelete", 0 , TQT_TQOBJECT(this),
TQT_SLOT(slotArtDelete()), actionCollection(), "art_delete");
- KStdAction::close(this, TQT_SLOT(close()),actionCollection());
+ KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(close()),actionCollection());
//edit menu
- KStdAction::undo(this, TQT_SLOT(slotUndo()), actionCollection());
- KStdAction::redo(this, TQT_SLOT(slotRedo()), actionCollection());
+ KStdAction::undo(TQT_TQOBJECT(this), TQT_SLOT(slotUndo()), actionCollection());
+ KStdAction::redo(TQT_TQOBJECT(this), TQT_SLOT(slotRedo()), actionCollection());
- KStdAction::cut(this, TQT_SLOT(slotCut()), actionCollection());
+ KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(slotCut()), actionCollection());
- KStdAction::copy(this, TQT_SLOT(slotCopy()), actionCollection());
+ KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), actionCollection());
- KStdAction::pasteText(this, TQT_SLOT(slotPaste()), actionCollection());
+ KStdAction::pasteText(TQT_TQOBJECT(this), TQT_SLOT(slotPaste()), actionCollection());
- new KAction(i18n("Paste as &Quotation"), 0, v_iew->e_dit,
+ new KAction(i18n("Paste as &Quotation"), 0, TQT_TQOBJECT(v_iew->e_dit),
TQT_SLOT(slotPasteAsQuotation()), actionCollection(), "paste_quoted");
- KStdAction::selectAll(this, TQT_SLOT(slotSelectAll()), actionCollection());
+ KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), actionCollection());
- KStdAction::tqfind(v_iew->e_dit, TQT_SLOT(slotFind()), actionCollection());
- KStdAction::findNext(v_iew->e_dit, TQT_SLOT(slotSearchAgain()), actionCollection());
+ KStdAction::find(TQT_TQOBJECT(v_iew->e_dit), TQT_SLOT(slotFind()), actionCollection());
+ KStdAction::findNext(TQT_TQOBJECT(v_iew->e_dit), TQT_SLOT(slotSearchAgain()), actionCollection());
- KStdAction::tqreplace(v_iew->e_dit, TQT_SLOT(slotReplace()), actionCollection());
+ KStdAction::replace(TQT_TQOBJECT(v_iew->e_dit), TQT_SLOT(slotReplace()), actionCollection());
//attach menu
- new KAction(i18n("Append &Signature"), 0 , this, TQT_SLOT(slotAppendSig()),
+ new KAction(i18n("Append &Signature"), 0 , TQT_TQOBJECT(this), TQT_SLOT(slotAppendSig()),
actionCollection(), "append_signature");
- new KAction(i18n("&Insert File..."), 0, this, TQT_SLOT(slotInsertFile()),
+ new KAction(i18n("&Insert File..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotInsertFile()),
actionCollection(), "insert_file");
- new KAction(i18n("Insert File (in a &box)..."), 0, this, TQT_SLOT(slotInsertFileBoxed()),
+ new KAction(i18n("Insert File (in a &box)..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotInsertFileBoxed()),
actionCollection(), "insert_file_boxed");
- new KAction(i18n("Attach &File..."), "attach", 0, this, TQT_SLOT(slotAttachFile()),
+ new KAction(i18n("Attach &File..."), "attach", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAttachFile()),
actionCollection(), "attach_file");
a_ctPGPsign = new KToggleAction(i18n("Sign Article with &PGP"),
"signature", 0,
actionCollection(), "sign_article");
- a_ctRemoveAttachment = new KAction(i18n("&Remove"), 0, this,
+ a_ctRemoveAttachment = new KAction(i18n("&Remove"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotRemoveAttachment()), actionCollection(), "remove_attachment");
- a_ctAttachmentProperties = new KAction(i18n("&Properties"), 0, this,
+ a_ctAttachmentProperties = new KAction(i18n("&Properties"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotAttachmentProperties()), actionCollection(), "attachment_properties");
//options menu
- a_ctDoPost = new KToggleAction(i18n("Send &News Article"), "filenew", 0 , this,
+ a_ctDoPost = new KToggleAction(i18n("Send &News Article"), "filenew", 0 , TQT_TQOBJECT(this),
TQT_SLOT(slotToggleDoPost()), actionCollection(), "send_news");
- a_ctDoMail = new KToggleAction(i18n("Send E&mail"), "mail_generic" , 0 , this,
+ a_ctDoMail = new KToggleAction(i18n("Send E&mail"), "mail_generic" , 0 , TQT_TQOBJECT(this),
TQT_SLOT(slotToggleDoMail()), actionCollection(), "send_mail");
a_ctSetCharset = new KSelectAction(i18n("Set &Charset"), 0, actionCollection(), "set_charset");
@@ -277,50 +277,50 @@ KNComposer::KNComposer(KNLocalArticle *a, const TQString &text, const TQString &
connect(a_ctSetCharset, TQT_SIGNAL(activated(const TQString&)),
this, TQT_SLOT(slotSetCharset(const TQString&)));
- a_ctSetCharsetKeyb = new KAction(i18n("Set Charset"), 0, this,
+ a_ctSetCharsetKeyb = new KAction(i18n("Set Charset"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotSetCharsetKeyboard()), actionCollection(), "set_charset_keyboard");
- a_ctWordWrap = new KToggleAction(i18n("&Word Wrap"), 0 , this,
+ a_ctWordWrap = new KToggleAction(i18n("&Word Wrap"), 0 , TQT_TQOBJECT(this),
TQT_SLOT(slotToggleWordWrap()), actionCollection(), "toggle_wordwrap");
//tools menu
- new KAction(i18n("Add &Quote Characters"), 0, v_iew->e_dit,
+ new KAction(i18n("Add &Quote Characters"), 0, TQT_TQOBJECT(v_iew->e_dit),
TQT_SLOT(slotAddQuotes()), actionCollection(), "tools_quote");
- new KAction(i18n("&Remove Quote Characters"), 0, v_iew->e_dit,
+ new KAction(i18n("&Remove Quote Characters"), 0, TQT_TQOBJECT(v_iew->e_dit),
TQT_SLOT(slotRemoveQuotes()), actionCollection(), "tools_unquote");
- new KAction(i18n("Add &Box"), 0, v_iew->e_dit,
+ new KAction(i18n("Add &Box"), 0, TQT_TQOBJECT(v_iew->e_dit),
TQT_SLOT(slotAddBox()), actionCollection(), "tools_box");
- new KAction(i18n("Re&move Box"), 0, v_iew->e_dit,
+ new KAction(i18n("Re&move Box"), 0, TQT_TQOBJECT(v_iew->e_dit),
TQT_SLOT(slotRemoveBox()), actionCollection(), "tools_unbox");
- KAction *undoRewrap = new KAction(i18n("Get &Original Text (not re-wrapped)"), 0, this,
+ KAction *undoRewrap = new KAction(i18n("Get &Original Text (not re-wrapped)"), 0, TQT_TQOBJECT(this),
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,
+ KAction *rot13 = new KAction(i18n("S&cramble (Rot 13)"), "encrypted", 0, TQT_TQOBJECT(v_iew->e_dit),
TQT_SLOT(slotRot13()), actionCollection(), "tools_rot13");
rot13->setEnabled(false);
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,
+ a_ctExternalEditor = new KAction(i18n("Start &External Editor"), "run", 0, TQT_TQOBJECT(this),
TQT_SLOT(slotExternalEditor()), actionCollection(), "external_editor");
- a_ctSpellCheck = KStdAction::spelling (this, TQT_SLOT(slotSpellcheck()), actionCollection());
+ a_ctSpellCheck = KStdAction::spelling (TQT_TQOBJECT(this), TQT_SLOT(slotSpellcheck()), actionCollection());
//settings menu
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- KStdAction::keyBindings(this, TQT_SLOT(slotConfKeys()), actionCollection());
+ KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(slotConfKeys()), actionCollection());
- KStdAction::configureToolbars(this, TQT_SLOT(slotConfToolbar()), actionCollection());
+ KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(slotConfToolbar()), actionCollection());
- KStdAction::preferences(knGlobals.top, TQT_SLOT(slotSettings()), actionCollection());
+ KStdAction::preferences(TQT_TQOBJECT(knGlobals.top), TQT_SLOT(slotSettings()), actionCollection());
a_ccel=new KAccel(this);
a_ctSetCharsetKeyb->plugAccel(a_ccel);
@@ -969,7 +969,7 @@ void KNComposer::insertFile(TQFile *file, bool clear, bool box, TQString boxTitl
ts.setCodec(codec);
if (box)
- temp = TQString::tqfromLatin1(",----[ %1 ]\n").arg(boxTitle);
+ temp = TQString::tqfromLatin1(",----[ %1 ]\n").tqarg(boxTitle);
if (box && (v_iew->e_dit->wordWrap()!=TQMultiLineEdit::NoWrap)) {
int wrapAt = v_iew->e_dit->wrapColumnOrWidth();
@@ -1327,7 +1327,7 @@ void KNComposer::slotSpellcheck()
a_ctExternalEditor->setEnabled(false);
a_ctSpellCheck->setEnabled(false);
- s_pellChecker = new KSpell(this, i18n("Spellcheck"), this, TQT_SLOT(slotSpellStarted(KSpell *)));
+ s_pellChecker = new KSpell(TQT_TQWIDGET(this), i18n("Spellcheck"), TQT_TQOBJECT(this), TQT_SLOT(slotSpellStarted(KSpell *)));
TQStringList l = KSpellingHighlighter::personalWords();
for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
s_pellChecker->addPersonal( *it );
@@ -1374,18 +1374,18 @@ void KNComposer::slotUpdateStatusBar()
else
overwriteDesc = i18n(" INS ");
- statusBar()->changeItem(i18n(" Type: %1 ").arg(typeDesc), 1);
- statusBar()->changeItem(i18n(" Charset: %1 ").arg(c_harset), 2);
+ statusBar()->changeItem(i18n(" Type: %1 ").tqarg(typeDesc), 1);
+ statusBar()->changeItem(i18n(" Charset: %1 ").tqarg(TQString(c_harset)), 2);
statusBar()->changeItem(overwriteDesc, 3);
- statusBar()->changeItem(i18n(" Column: %1 ").arg(v_iew->e_dit->currentColumn() + 1), 4);
- statusBar()->changeItem(i18n(" Line: %1 ").arg(v_iew->e_dit->currentLine() + 1), 5);
+ statusBar()->changeItem(i18n(" Column: %1 ").tqarg(v_iew->e_dit->currentColumn() + 1), 4);
+ statusBar()->changeItem(i18n(" Line: %1 ").tqarg(v_iew->e_dit->currentLine() + 1), 5);
}
void KNComposer::slotUpdateCursorPos()
{
- statusBar()->changeItem(i18n(" Column: %1 ").arg(v_iew->e_dit->currentColumn() + 1), 4);
- statusBar()->changeItem(i18n(" Line: %1 ").arg(v_iew->e_dit->currentLine() + 1), 5);
+ statusBar()->changeItem(i18n(" Column: %1 ").tqarg(v_iew->e_dit->currentColumn() + 1), 4);
+ statusBar()->changeItem(i18n(" Line: %1 ").tqarg(v_iew->e_dit->currentLine() + 1), 5);
}
@@ -1643,7 +1643,7 @@ void KNComposer::slotSpellFinished()
{
a_ctExternalEditor->setEnabled(true);
a_ctSpellCheck->setEnabled(true);
- KSpell::spelltqStatus status=s_pellChecker->status();
+ KSpell::spellStatus status=s_pellChecker->status();
delete s_pellChecker;
s_pellChecker=0;
@@ -1725,7 +1725,7 @@ TQPopupMenu * KNComposer::popupMenu( const TQString& name )
KNComposer::ComposerView::ComposerView(KNComposer *composer, const char *n)
- : TQSplitter(TQSplitter::Vertical, composer, n), a_ttWidget(0), a_ttView(0), v_iewOpen(false)
+ : TQSplitter(Qt::Vertical, composer, n), a_ttWidget(0), a_ttView(0), v_iewOpen(false)
{
TQWidget *main=new TQWidget(this);
@@ -1781,10 +1781,10 @@ KNComposer::ComposerView::ComposerView(KNComposer *composer, const char *n)
KConfig *config = knGlobals.config();
KConfigGroupSaver saver(config, "VISUAL_APPEARANCE");
- 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 defaultColor1( kapp->tqpalette().active().text()); // defaults from kmreaderwin.cpp
+ TQColor defaultColor2( kapp->tqpalette().active().text() );
+ TQColor defaultColor3( kapp->tqpalette().active().text() );
+ TQColor defaultForeground( kapp->tqpalette().active().text() );
TQColor col1 = config->readColorEntry( "ForegroundColor", &defaultForeground );
TQColor col2 = config->readColorEntry( "quote3Color", &defaultColor3 );
TQColor col3 = config->readColorEntry( "quote2Color", &defaultColor2 );
@@ -1798,7 +1798,7 @@ KNComposer::ComposerView::ComposerView(KNComposer *composer, const char *n)
TQVBoxLayout *notL=new TQVBoxLayout(e_dit);
notL->addStretch(1);
- n_otification=new TQGroupBox(2, TQt::Horizontal, e_dit);
+ 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);
@@ -2011,7 +2011,7 @@ KNComposer::Editor::~Editor()
//-----------------------------------------------------------------------------
bool KNComposer::Editor::eventFilter(TQObject*o, TQEvent* e)
{
- if (o == this)
+ if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this))
KCursor::autoHideEventFilter(o, e);
if (e->type() == TQEvent::KeyPress)
@@ -2046,7 +2046,7 @@ bool KNComposer::Editor::eventFilter(TQObject*o, TQEvent* e)
if( !paraText.at(charPos).isSpace() )
{
//Get word right clicked on
- firstSpace = paraText.findRev( m_bound, charPos ) + 1;
+ firstSpace = paraText.tqfindRev( m_bound, charPos ) + 1;
lastSpace = paraText.tqfind( m_bound, charPos );
if( lastSpace == -1 )
lastSpace = paraText.length();
@@ -2152,7 +2152,7 @@ TQStringList KNComposer::Editor::processedText()
void KNComposer::Editor::slotPasteAsQuotation()
{
- TQString s = TQApplication::clipboard()->text();
+ TQString s = TQApplication::tqclipboard()->text();
if (!s.isEmpty()) {
for (int i=0; (uint)i<s.length(); i++) {
if ( s[i] < ' ' && s[i] != '\n' && s[i] != '\t' )
@@ -2177,7 +2177,7 @@ void KNComposer::Editor::slotSearchAgain()
void KNComposer::Editor::slotReplace()
{
- tqreplace();
+ replace();
}
@@ -2233,7 +2233,7 @@ void KNComposer::Editor::slotAddBox()
} else {
int l = currentLine();
int c = currentColumn();
- TQString s = TQString::tqfromLatin1(",----[ ]\n| %1\n`----").arg(textLine(l));
+ TQString s = TQString::tqfromLatin1(",----[ ]\n| %1\n`----").tqarg(textLine(l));
insertLine(s,l);
removeLine(l+3);
setCursorPosition(l+1,c+2);
@@ -2398,7 +2398,7 @@ void KNComposer::Editor::contentsContextMenuEvent( TQContextMenuEvent */*e*/ )
}
else
{
- spell = new KSpell(this, i18n("Spellcheck"), this, TQT_SLOT(slotSpellStarted(KSpell *)));
+ spell = new KSpell(this, i18n("Spellcheck"), TQT_TQOBJECT(this), TQT_SLOT(slotSpellStarted(KSpell *)));
TQStringList l = KSpellingHighlighter::personalWords();
for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
spell->addPersonal( *it );
@@ -2423,7 +2423,7 @@ void KNComposer::Editor::slotSpellDone(const TQString &/*newtext*/)
void KNComposer::Editor::slotSpellFinished()
{
- KSpell::spelltqStatus status=spell->status();
+ KSpell::spellStatus status=spell->status();
delete spell;
spell=0;
@@ -2560,7 +2560,7 @@ KNComposer::AttachmentPropertiesDlg::AttachmentPropertiesDlg(KNAttachment *a, TQ
fileL->addRowSpacing(0, fontMetrics().lineSpacing()-9);
fileL->addWidget(new TQLabel(i18n("Name:"), fileGB) ,1,0);
- fileL->addWidget(new TQLabel(TQString("<b>%1</b>").arg(a->name()), fileGB), 1,1, TQt::AlignLeft);
+ fileL->addWidget(new TQLabel(TQString("<b>%1</b>").tqarg(a->name()), fileGB), 1,1, TQt::AlignLeft);
fileL->addWidget(new TQLabel(i18n("Size:"), fileGB), 2,0);
fileL->addWidget(new TQLabel(a->contentSize(), fileGB), 2,1, TQt::AlignLeft);