summaryrefslogtreecommitdiffstats
path: root/kmail/kmcomposewin.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:50 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:50 -0600
commit9cc13dcbb01a96c9e60a07ca63c61d24b374f50d (patch)
treeab537a329b9613e11dce8195761f93ffe82aed24 /kmail/kmcomposewin.cpp
parent3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (diff)
downloadtdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.tar.gz
tdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.
Diffstat (limited to 'kmail/kmcomposewin.cpp')
-rw-r--r--kmail/kmcomposewin.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/kmail/kmcomposewin.cpp b/kmail/kmcomposewin.cpp
index d239f7e60..a161070df 100644
--- a/kmail/kmcomposewin.cpp
+++ b/kmail/kmcomposewin.cpp
@@ -121,7 +121,7 @@ using KRecentAddress::RecentAddresses;
#include <tqregexp.h>
#include <tqbuffer.h>
#include <tqtooltip.h>
-#include <textcodec.h>
+#include <tqtextcodec.h>
#include <tqheader.h>
#include <tqwhatsthis.h>
#include <tqfontdatabase.h>
@@ -199,7 +199,7 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id )
mHeadersToEditorSplitter = new TQSplitter( Qt::Vertical, mMainWidget, "mHeadersToEditorSplitter" );
mHeadersToEditorSplitter->setChildrenCollapsible( false );
mHeadersArea = new TQWidget( mHeadersToEditorSplitter );
- mHeadersArea->setSizePolicy( mHeadersToEditorSplitter->sizePolicy().horData(), TQSizePolicy::Maximum );
+ mHeadersArea->tqsetSizePolicy( mHeadersToEditorSplitter->tqsizePolicy().horData(), TQSizePolicy::Maximum );
TQVBoxLayout *v = new TQVBoxLayout( mMainWidget );
v->addWidget( mHeadersToEditorSplitter );
mIdentity = new KPIM::IdentityCombo(kmkernel->identityManager(), mHeadersArea);
@@ -341,7 +341,7 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id )
TQHBoxLayout *hbox = new TQHBoxLayout( vbox );
{
mSignatureStateIndicator = new TQLabel( editorAndCryptoStateIndicators );
- mSignatureStateIndicator->setAlignment( TQt::AlignHCenter );
+ mSignatureStateIndicator->tqsetAlignment( TQt::AlignHCenter );
hbox->addWidget( mSignatureStateIndicator );
KConfigGroup reader( KMKernel::config(), "Reader" );
@@ -353,7 +353,7 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id )
mSignatureStateIndicator->setPalette( p );
mEncryptionStateIndicator = new TQLabel( editorAndCryptoStateIndicators );
- mEncryptionStateIndicator->setAlignment( TQt::AlignHCenter );
+ mEncryptionStateIndicator->tqsetAlignment( TQt::AlignHCenter );
hbox->addWidget( mEncryptionStateIndicator );
p.setColor( TQColorGroup::Background, reader.readColorEntry( "PGPMessageEncr" , &defaultEncryptedColor ) );
mEncryptionStateIndicator->setPalette( p );
@@ -648,8 +648,8 @@ bool KMComposeWin::event(TQEvent *e)
void KMComposeWin::readColorConfig(void)
{
if ( GlobalSettings::self()->useDefaultColors() ) {
- mForeColor = TQColor(kapp->palette().active().text());
- mBackColor = TQColor(kapp->palette().active().base());
+ mForeColor = TQColor(kapp->tqpalette().active().text());
+ mBackColor = TQColor(kapp->tqpalette().active().base());
} else {
mForeColor = GlobalSettings::self()->foregroundColor();
mBackColor = GlobalSettings::self()->backgroundColor();
@@ -868,7 +868,7 @@ void KMComposeWin::slotContinueAutoSave()
i18n("Autosaving the message as %1 "
"failed.\n"
"Reason: %2" )
- .arg( filename, strerror( status ) ),
+ .tqarg( filename, strerror( status ) ),
i18n("Autosaving Failed") );
mLastAutoSaveErrno = status;
}
@@ -965,7 +965,7 @@ int KMComposeWin::calcColumnWidth(int which, long allShowing, int width)
w->setBuddy( mEditor ); // set dummy so we don't calculate width of '&' for this label.
w->adjustSize();
w->show();
- return TQMAX( width, w->sizeHint().width() );
+ return TQMAX( width, w->tqsizeHint().width() );
}
void KMComposeWin::rethinkFields(bool fromSlot)
@@ -1109,9 +1109,9 @@ void KMComposeWin::rethinkFields(bool fromSlot)
else
mAtmListView->hide();
resize(this->size());
- repaint();
+ tqrepaint();
- mHeadersArea->setMaximumHeight( mHeadersArea->sizeHint().height() );
+ mHeadersArea->setMaximumHeight( mHeadersArea->tqsizeHint().height() );
mGrid->activate();
mHeadersArea->show();
@@ -1182,7 +1182,7 @@ void KMComposeWin::rethinkHeaderLine(int aValue, int aMask, int& aRow,
if (aValue & aMask)
{
aLbl->adjustSize();
- aLbl->resize((int)aLbl->sizeHint().width(),aLbl->sizeHint().height() + 6);
+ aLbl->resize((int)aLbl->tqsizeHint().width(),aLbl->tqsizeHint().height() + 6);
aLbl->setMinimumSize(aLbl->size());
aLbl->show();
aLbl->setBuddy(aCbx);
@@ -1193,7 +1193,7 @@ void KMComposeWin::rethinkHeaderLine(int aValue, int aMask, int& aRow,
mGrid->addWidget(aCbx, aRow, 1);
if ( aChk ) {
mGrid->addWidget(aChk, aRow, 2);
- aChk->setFixedSize(aChk->sizeHint().width(), aLbl->height());
+ aChk->setFixedSize(aChk->tqsizeHint().width(), aLbl->height());
aChk->show();
}
aRow++;
@@ -1625,9 +1625,9 @@ void KMComposeWin::setupStatusBar(void)
statusBar()->insertItem("", 0, 1);
statusBar()->setItemAlignment(0, AlignLeft | AlignVCenter);
- statusBar()->insertItem(i18n( " Spellcheck: %1 ").arg( " " ), 3, 0, true );
- statusBar()->insertItem(i18n( " Column: %1 ").arg(" "), 2, 0, true);
- statusBar()->insertItem(i18n( " Line: %1 ").arg(" "), 1, 0, true);
+ statusBar()->insertItem(i18n( " Spellcheck: %1 ").tqarg( " " ), 3, 0, true );
+ statusBar()->insertItem(i18n( " Column: %1 ").tqarg(" "), 2, 0, true);
+ statusBar()->insertItem(i18n( " Line: %1 ").tqarg(" "), 1, 0, true);
}
@@ -1638,9 +1638,9 @@ void KMComposeWin::updateCursorPosition()
TQString temp;
line = mEditor->currentLine();
col = mEditor->currentColumn();
- temp = i18n(" Line: %1 ").arg(line+1);
+ temp = i18n(" Line: %1 ").tqarg(line+1);
statusBar()->changeItem(temp,1);
- temp = i18n(" Column: %1 ").arg(col+1);
+ temp = i18n(" Column: %1 ").tqarg(col+1);
statusBar()->changeItem(temp,2);
}
@@ -2277,17 +2277,17 @@ bool KMComposeWin::userForgotAttachment()
if ( attachWordsList.isEmpty() ) {
// default value (FIXME: this is duplicated in configuredialog.cpp)
- attachWordsList << TQString::fromLatin1("attachment")
- << TQString::fromLatin1("attached");
- if ( TQString::fromLatin1("attachment") != i18n("attachment") )
+ attachWordsList << TQString::tqfromLatin1("attachment")
+ << TQString::tqfromLatin1("attached");
+ if ( TQString::tqfromLatin1("attachment") != i18n("attachment") )
attachWordsList << i18n("attachment");
- if ( TQString::fromLatin1("attached") != i18n("attached") )
+ if ( TQString::tqfromLatin1("attached") != i18n("attached") )
attachWordsList << i18n("attached");
}
- TQRegExp rx ( TQString::fromLatin1("\\b") +
+ TQRegExp rx ( TQString::tqfromLatin1("\\b") +
attachWordsList.join("\\b|\\b") +
- TQString::fromLatin1("\\b") );
+ TQString::tqfromLatin1("\\b") );
rx.setCaseSensitive( false );
bool gotMatch = false;
@@ -2399,14 +2399,14 @@ bool KMComposeWin::addAttach(const KURL aUrl)
if ( !aUrl.isValid() ) {
KMessageBox::sorry( this, i18n( "<qt><p>KMail could not recognize the location of the attachment (%1);</p>"
"<p>you have to specify the full path if you wish to attach a file.</p></qt>" )
- .arg( aUrl.prettyURL() ) );
+ .tqarg( aUrl.prettyURL() ) );
return false;
}
const int maxAttachmentSize = GlobalSettings::maximumAttachmentSize();
const uint maximumAttachmentSizeInByte = maxAttachmentSize*1024*1024;
if ( aUrl.isLocalFile() && TQFileInfo( aUrl.pathOrURL() ).size() > maximumAttachmentSizeInByte ) {
- KMessageBox::sorry( this, i18n( "<qt><p>Your administrator has disallowed attaching files bigger than %1 MB.</p>" ).arg( maxAttachmentSize ) );
+ KMessageBox::sorry( this, i18n( "<qt><p>Your administrator has disallowed attaching files bigger than %1 MB.</p>" ).tqarg( maxAttachmentSize ) );
return false;
}
@@ -3114,7 +3114,7 @@ static void showExportError( TQWidget * w, const GpgME::Error & err ) {
const TQString msg = i18n("<qt><p>An error occurred while trying to export "
"the key from the backend:</p>"
"<p><b>%1</b></p></qt>")
- .arg( TQString::fromLocal8Bit( err.asString() ) );
+ .tqarg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( w, msg, i18n("Key Export Failed") );
}
@@ -3153,7 +3153,7 @@ void KMComposeWin::slotPublicKeyExportResult( const GpgME::Error & err, const TQ
// create message part
KMMessagePart * msgPart = new KMMessagePart();
- msgPart->setName( i18n("OpenPGP key 0x%1").arg( mFingerprint ) );
+ msgPart->setName( i18n("OpenPGP key 0x%1").tqarg( mFingerprint ) );
msgPart->setTypeStr("application");
msgPart->setSubtypeStr("pgp-keys");
TQValueList<int> dummy;
@@ -3665,7 +3665,7 @@ void KMComposeWin::slotPasteClipboardAsQuotation()
{
if( mEditor->hasFocus() && msg() )
{
- TQString s = TQApplication::clipboard()->text();
+ TQString s = TQApplication::tqclipboard()->text();
if (!s.isEmpty())
mEditor->insert(addQuotesToText(s));
}
@@ -3673,15 +3673,15 @@ void KMComposeWin::slotPasteClipboardAsQuotation()
void KMComposeWin::slotPasteClipboardAsAttachment()
{
- KURL url( TQApplication::clipboard()->text( TQClipboard::Clipboard ) );
+ KURL url( TQApplication::tqclipboard()->text( TQClipboard::Clipboard ) );
if ( url.isValid() ) {
- addAttach(TQApplication::clipboard()->text( TQClipboard::Clipboard ) );
+ addAttach(TQApplication::tqclipboard()->text( TQClipboard::Clipboard ) );
return;
}
- TQMimeSource *mimeSource = TQApplication::clipboard()->data();
+ TQMimeSource *mimeSource = TQApplication::tqclipboard()->data();
if ( TQImageDrag::canDecode(mimeSource) ) {
- slotAttachPNGImageData(mimeSource->encodedData("image/png"));
+ slotAttachPNGImageData(mimeSource->tqencodedData("image/png"));
}
else {
bool ok;
@@ -3691,7 +3691,7 @@ void KMComposeWin::slotPasteClipboardAsAttachment()
KMMessagePart *msgPart = new KMMessagePart;
msgPart->setName(attName);
TQValueList<int> dummy;
- msgPart->setBodyAndGuessCte(TQCString(TQApplication::clipboard()->text().latin1()), dummy,
+ msgPart->setBodyAndGuessCte(TQCString(TQApplication::tqclipboard()->text().latin1()), dummy,
kmkernel->msgSender()->sendQuotedPrintable());
addAttach(msgPart);
}
@@ -3773,7 +3773,7 @@ void KMComposeWin::slotRemoveQuotes()
//-----------------------------------------------------------------------------
void KMComposeWin::slotUndo()
{
- TQWidget* fw = focusWidget();
+ TQWidget* fw = tqfocusWidget();
if (!fw) return;
if ( ::tqqt_cast<KEdit*>(fw) )
@@ -3784,7 +3784,7 @@ void KMComposeWin::slotUndo()
void KMComposeWin::slotRedo()
{
- TQWidget* fw = focusWidget();
+ TQWidget* fw = tqfocusWidget();
if (!fw) return;
if (::tqqt_cast<KEdit*>(fw))
@@ -3796,7 +3796,7 @@ void KMComposeWin::slotRedo()
//-----------------------------------------------------------------------------
void KMComposeWin::slotCut()
{
- TQWidget* fw = focusWidget();
+ TQWidget* fw = tqfocusWidget();
if (!fw) return;
if (::tqqt_cast<KEdit*>(fw))
@@ -3809,7 +3809,7 @@ void KMComposeWin::slotCut()
//-----------------------------------------------------------------------------
void KMComposeWin::slotCopy()
{
- TQWidget* fw = focusWidget();
+ TQWidget* fw = tqfocusWidget();
if (!fw) return;
#ifdef KeyPress
@@ -3829,12 +3829,12 @@ void KMComposeWin::slotPasteClipboard()
void KMComposeWin::paste( TQClipboard::Mode mode )
{
- TQWidget* fw = focusWidget();
+ TQWidget* fw = tqfocusWidget();
if (!fw) return;
- TQMimeSource *mimeSource = TQApplication::clipboard()->data( mode );
+ TQMimeSource *mimeSource = TQApplication::tqclipboard()->data( mode );
if ( mimeSource->provides("image/png") ) {
- slotAttachPNGImageData(mimeSource->encodedData("image/png"));
+ slotAttachPNGImageData(mimeSource->tqencodedData("image/png"));
} else if ( KURLDrag::canDecode( mimeSource ) ) {
KURL::List urlList;
if( KURLDrag::decode( mimeSource, urlList ) ) {
@@ -3872,7 +3872,7 @@ void KMComposeWin::paste( TQClipboard::Mode mode )
//-----------------------------------------------------------------------------
void KMComposeWin::slotMarkAll()
{
- TQWidget* fw = focusWidget();
+ TQWidget* fw = tqfocusWidget();
if (!fw) return;
if (::tqqt_cast<TQLineEdit*>(fw))
@@ -4279,7 +4279,7 @@ bool KMComposeWin::saveDraftOrTemplate( const TQString &folderName,
"identify \"%1\" does not exist (anymore); "
"therefore, the default drafts or templates "
"folder will be used.")
- .arg( id.identityName() ) );
+ .tqarg( id.identityName() ) );
}
}
if ( imapTheFolder && imapTheFolder->noContent() )
@@ -4463,7 +4463,7 @@ bool KMComposeWin::checkRecipientNumber() const
GlobalSettings::self()->tooManyRecipients() &&
mRecipientsEditor->recipients().count() > thresHold ) {
if ( KMessageBox::questionYesNo( mMainWidget,
- i18n("You are trying to send the mail to more than %1 recipients. Send message anyway?").arg(thresHold),
+ i18n("You are trying to send the mail to more than %1 recipients. Send message anyway?").tqarg(thresHold),
i18n("Too many receipients"),
i18n("&Send as Is"),
i18n("&Edit Recipients")) == KMessageBox::No ) {
@@ -4780,10 +4780,10 @@ void KMComposeWin::slotSpellcheckDone(int result)
statusBar()->changeItem(i18n(" Spell check complete."),0);
break;
}
- TQTimer::singleShot( 2000, this, TQT_SLOT(slotSpellcheckDoneClearStatus()) );
+ TQTimer::singleShot( 2000, this, TQT_SLOT(slotSpellcheckDoneCleartqStatus()) );
}
-void KMComposeWin::slotSpellcheckDoneClearStatus()
+void KMComposeWin::slotSpellcheckDoneCleartqStatus()
{
statusBar()->changeItem("", 0);
}
@@ -4829,7 +4829,7 @@ void KMComposeWin::slotIdentityChanged( uint uoid )
// of the identity, we assume that since the user typed it
// they want to keep it
if ( mEdtBcc->text() != ident.bcc() && !mEdtBcc->text().isEmpty() ) {
- TQString temp_string( mEdtBcc->text() + TQString::fromLatin1(",") + ident.bcc() );
+ TQString temp_string( mEdtBcc->text() + TQString::tqfromLatin1(",") + ident.bcc() );
mEdtBcc->setText( temp_string );
} else {
// if the user typed the same address as the preset BCC
@@ -4843,7 +4843,7 @@ void KMComposeWin::slotIdentityChanged( uint uoid )
// allowing the user to keep all addresses
if( mEdtBcc && mEdtBcc->edited() && !ident.bcc().isEmpty() ) {
if( !mEdtBcc->text().isEmpty() ) {
- TQString temp_string ( mEdtBcc->text() + TQString::fromLatin1(",") + ident.bcc() );
+ TQString temp_string ( mEdtBcc->text() + TQString::tqfromLatin1(",") + ident.bcc() );
mEdtBcc->setText( temp_string );
} else {
mEdtBcc->setText( ident.bcc() );
@@ -4982,7 +4982,7 @@ void KMComposeWin::slotSpellcheckConfig()
KWin twin;
TQTabDialog qtd (this, "tabdialog", true);
KSpellConfig mKSpellConfig (&qtd);
- mKSpellConfig.layout()->setMargin( KDialog::marginHint() );
+ mKSpellConfig.tqlayout()->setMargin( KDialog::marginHint() );
qtd.addTab (&mKSpellConfig, i18n("Spellchecker"));
qtd.setCancelButton ();
@@ -5177,19 +5177,19 @@ void KMComposeWin::slotSizeAction( int size )
void KMComposeWin::slotAlignLeft()
{
toggleMarkup(true);
- mEditor->TQTextEdit::setAlignment( AlignLeft );
+ mEditor->TQTextEdit::tqsetAlignment( AlignLeft );
}
void KMComposeWin::slotAlignCenter()
{
toggleMarkup(true);
- mEditor->TQTextEdit::setAlignment( AlignHCenter );
+ mEditor->TQTextEdit::tqsetAlignment( AlignHCenter );
}
void KMComposeWin::slotAlignRight()
{
toggleMarkup(true);
- mEditor->TQTextEdit::setAlignment( AlignRight );
+ mEditor->TQTextEdit::tqsetAlignment( AlignRight );
}
void KMComposeWin::slotTextBold()
@@ -5404,6 +5404,6 @@ void KMComposeWin::recipientEditorSizeHintChanged()
void KMComposeWin::setMaximumHeaderSize()
{
- mHeadersArea->setMaximumHeight( mHeadersArea->sizeHint().height() );
+ mHeadersArea->setMaximumHeight( mHeadersArea->tqsizeHint().height() );
}