summaryrefslogtreecommitdiffstats
path: root/knode/articlewidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'knode/articlewidget.cpp')
-rw-r--r--knode/articlewidget.cpp100
1 files changed, 50 insertions, 50 deletions
diff --git a/knode/articlewidget.cpp b/knode/articlewidget.cpp
index 301c9bb5..30af3f60 100644
--- a/knode/articlewidget.cpp
+++ b/knode/articlewidget.cpp
@@ -98,13 +98,13 @@ ArticleWidget::ArticleWidget( TQWidget *tqparent,
TQHBoxLayout *box = new TQHBoxLayout( this );
mViewer = new KHTMLPart( this, "mViewer" );
box->addWidget( mViewer->widget() );
- mViewer->widget()->setFocusPolicy( WheelFocus );
+ mViewer->widget()->setFocusPolicy( Qt::WheelFocus );
mViewer->setPluginsEnabled( false );
mViewer->setJScriptEnabled( false );
mViewer->setJavaEnabled( false );
mViewer->setMetaRefreshEnabled( false );
mViewer->setOnlyLocalReferences( true );
- mViewer->view()->setFocusPolicy( TQWidget::WheelFocus );
+ mViewer->view()->setFocusPolicy( Qt::WheelFocus );
connect( mViewer->browserExtension(), TQT_SIGNAL(openURLRequestDelayed(const KURL&, const KParts::URLArgs&)),
TQT_SLOT(slotURLClicked(const KURL&)) );
connect( mViewer, TQT_SIGNAL(popupMenu(const TQString&, const TQPoint&)),
@@ -134,58 +134,58 @@ ArticleWidget::~ArticleWidget()
void ArticleWidget::initActions()
{
- mSaveAction = KStdAction::save( this, TQT_SLOT(slotSave()), mActionCollection );
+ mSaveAction = KStdAction::save( TQT_TQOBJECT(this), TQT_SLOT(slotSave()), mActionCollection );
mSaveAction->setText( KStdGuiItem::saveAs().text() );
- mPrintAction = KStdAction::print( this, TQT_SLOT(slotPrint()), mActionCollection );
- mCopySelectionAction = KStdAction::copy( this, TQT_SLOT(slotCopySelection()), mActionCollection );
- mSelectAllAction = KStdAction::selectAll( this, TQT_SLOT(slotSelectAll()), mActionCollection );
- mFindAction = KStdAction::tqfind( this, TQT_SLOT(slotFind()), mActionCollection, "find_in_article" );
+ mPrintAction = KStdAction::print( TQT_TQOBJECT(this), TQT_SLOT(slotPrint()), mActionCollection );
+ mCopySelectionAction = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT(slotCopySelection()), mActionCollection );
+ mSelectAllAction = KStdAction::selectAll( TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), mActionCollection );
+ mFindAction = KStdAction::find( TQT_TQOBJECT(this), TQT_SLOT(slotFind()), mActionCollection, "find_in_article" );
mFindAction->setText( i18n("F&ind in Article...") );
- mViewSourceAction = new KAction( i18n("&View Source"), Key_V , this,
+ mViewSourceAction = new KAction( i18n("&View Source"), Key_V , TQT_TQOBJECT(this),
TQT_SLOT(slotViewSource()), mActionCollection, "article_viewSource" );
mReplyAction = new KAction( i18n("&Followup to Newsgroup..."), "message_reply",
- Key_R, this, TQT_SLOT(slotReply()), mActionCollection, "article_postReply" );
+ Key_R, TQT_TQOBJECT(this), TQT_SLOT(slotReply()), mActionCollection, "article_postReply" );
mRemailAction = new KAction( i18n("Reply by E&mail..."), "mail_reply",
- Key_A, this, TQT_SLOT(slotRemail()), mActionCollection, "article_mailReply" );
+ Key_A, TQT_TQOBJECT(this), TQT_SLOT(slotRemail()), mActionCollection, "article_mailReply" );
mForwardAction = new KAction( i18n("Forw&ard by Email..."), "mail_forward",
- Key_F, this, TQT_SLOT(slotForward()), mActionCollection, "article_forward" );
+ Key_F, TQT_TQOBJECT(this), TQT_SLOT(slotForward()), mActionCollection, "article_forward" );
mCancelAction = new KAction( i18n("article","&Cancel Article"),
- 0, this, TQT_SLOT(slotCancel()), mActionCollection, "article_cancel" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT(slotCancel()), mActionCollection, "article_cancel" );
mSupersedeAction = new KAction(i18n("S&upersede Article"),
- 0, this, TQT_SLOT(slotSupersede()), mActionCollection, "article_supersede" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT(slotSupersede()), mActionCollection, "article_supersede" );
mFixedFontToggle = new KToggleAction( i18n("U&se Fixed Font"),
- Key_X ,this, TQT_SLOT(slotToggleFixedFont()), mActionCollection, "view_useFixedFont" );
+ Key_X ,TQT_TQOBJECT(this), TQT_SLOT(slotToggleFixedFont()), mActionCollection, "view_useFixedFont" );
mFancyToggle = new KToggleAction( i18n("Fancy Formating"),
- Key_Y, this, TQT_SLOT(slotToggleFancyFormating()), mActionCollection, "view_fancyFormating" );
- mRot13Toggle = new KToggleAction( i18n("&Unscramble (Rot 13)"), "decrypted", 0 , this,
+ Key_Y, TQT_TQOBJECT(this), TQT_SLOT(slotToggleFancyFormating()), mActionCollection, "view_fancyFormating" );
+ mRot13Toggle = new KToggleAction( i18n("&Unscramble (Rot 13)"), "decrypted", 0 , TQT_TQOBJECT(this),
TQT_SLOT(slotToggleRot13()), mActionCollection, "view_rot13" );
mRot13Toggle->setChecked( false );
KRadioAction *ra;
mHeaderStyleMenu = new KActionMenu( i18n("&Headers"), mActionCollection, "view_headers" );
- ra = new KRadioAction( i18n("&Fancy Headers"), 0, this, TQT_SLOT(slotFancyHeaders()),
+ ra = new KRadioAction( i18n("&Fancy Headers"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotFancyHeaders()),
mActionCollection, "view_headers_fancy" );
ra->setExclusiveGroup( "view_headers" );
mHeaderStyleMenu->insert( ra );
- ra = new KRadioAction( i18n("&Standard Headers"), 0, this, TQT_SLOT(slotStandardHeaders()),
+ ra = new KRadioAction( i18n("&Standard Headers"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotStandardHeaders()),
mActionCollection, "view_headers_standard" );
ra->setExclusiveGroup( "view_headers" );
mHeaderStyleMenu->insert( ra );
- ra = new KRadioAction( i18n("&All Headers"), 0, this, TQT_SLOT(slotAllHeaders()),
+ ra = new KRadioAction( i18n("&All Headers"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotAllHeaders()),
mActionCollection, "view_headers_all" );
ra->setExclusiveGroup( "view_headers" );
mHeaderStyleMenu->insert( ra );
mAttachmentStyleMenu = new KActionMenu( i18n("&Attachments"), mActionCollection, "view_attachments" );
- ra = new KRadioAction( i18n("&As Icon"), 0, this, TQT_SLOT(slotIconAttachments()),
+ ra = new KRadioAction( i18n("&As Icon"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotIconAttachments()),
mActionCollection, "view_attachments_icon" );
ra->setExclusiveGroup( "view_attachments" );
mAttachmentStyleMenu->insert( ra );
- ra = new KRadioAction( i18n("&Inline"), 0, this, TQT_SLOT(slotInlineAttachments()),
+ ra = new KRadioAction( i18n("&Inline"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotInlineAttachments()),
mActionCollection, "view_attachments_inline" );
ra->setExclusiveGroup( "view_attachments" );
mAttachmentStyleMenu->insert( ra );
- ra = new KRadioAction( i18n("&Hide"), 0, this, TQT_SLOT(slotHideAttachments()),
+ ra = new KRadioAction( i18n("&Hide"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotHideAttachments()),
mActionCollection, "view_attachments_hide" );
ra->setExclusiveGroup( "view_attachments" );
mAttachmentStyleMenu->insert( ra );
@@ -197,22 +197,22 @@ void ArticleWidget::initActions()
mCharsetSelect->setItems( cs );
mCharsetSelect->setCurrentItem( 0 );
connect( mCharsetSelect, TQT_SIGNAL(activated(const TQString&)),TQT_SLOT(slotSetCharset(const TQString&)) );
- mCharsetSelectKeyb = new KAction( i18n("Charset"), Key_C, this,
+ mCharsetSelectKeyb = new KAction( i18n("Charset"), Key_C, TQT_TQOBJECT(this),
TQT_SLOT(slotSetCharsetKeyboard()), mActionCollection, "set_charset_keyboard" );
- new KAction( i18n("&Open URL"), "fileopen", 0, this, TQT_SLOT(slotOpenURL()),
+ new KAction( i18n("&Open URL"), "fileopen", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenURL()),
mActionCollection, "open_url" );
- new KAction( i18n("&Copy Link Address"), "editcopy", 0, this, TQT_SLOT( slotCopyURL()),
+ new KAction( i18n("&Copy Link Address"), "editcopy", 0, TQT_TQOBJECT(this), TQT_SLOT( slotCopyURL()),
mActionCollection, "copy_url" );
- new KAction( i18n("&Bookmark This Link"), "bookmark_add", 0, this, TQT_SLOT(slotAddBookmark()),
+ new KAction( i18n("&Bookmark This Link"), "bookmark_add", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddBookmark()),
mActionCollection, "add_bookmark" );
- new KAction( i18n("&Add to Address Book"), 0, this, TQT_SLOT(slotAddToAddressBook()),
+ new KAction( i18n("&Add to Address Book"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddToAddressBook()),
mActionCollection, "add_addr_book" );
- new KAction( i18n("&Open in Address Book"), 0, this, TQT_SLOT(slotOpenInAddressBook()),
+ new KAction( i18n("&Open in Address Book"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenInAddressBook()),
mActionCollection, "openin_addr_book" );
- new KAction( i18n("&Open Attachment"), "fileopen", 0, this, TQT_SLOT(slotOpenAttachment()),
+ new KAction( i18n("&Open Attachment"), "fileopen", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenAttachment()),
mActionCollection, "open_attachment" );
- new KAction( i18n("&Save Attachment As..."), "filesaveas", 0, this, TQT_SLOT(slotSaveAttachment()),
+ new KAction( i18n("&Save Attachment As..."), "filesaveas", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSaveAttachment()),
mActionCollection, "save_attachment" );
}
@@ -290,9 +290,9 @@ void ArticleWidget::readConfig()
mAttachmentStyle = conf->readEntry( "attachmentStyle", "inline" );
mHeaderStyle = conf->readEntry( "headerStyle", "fancy" );
KRadioAction *ra = 0;
- ra = static_cast<KRadioAction*>( mActionCollection->action( TQString("view_attachments_%1").arg(mAttachmentStyle).latin1() ) );
+ ra = static_cast<KRadioAction*>( mActionCollection->action( TQString("view_attachments_%1").tqarg(mAttachmentStyle).latin1() ) );
ra->setChecked( true );
- ra = static_cast<KRadioAction*>( mActionCollection->action( TQString("view_headers_%1").arg(mHeaderStyle).latin1() ) );
+ ra = static_cast<KRadioAction*>( mActionCollection->action( TQString("view_headers_%1").tqarg(mHeaderStyle).latin1() ) );
ra->setChecked( true );
delete mCSSHelper;
@@ -402,7 +402,7 @@ void ArticleWidget::displayArticle()
// check if codec is available
if ( text && !canDecodeText( text->contentType()->charset() ) ) {
html += TQString("<table width=\"100%\" border=\"0\"><tr><td bgcolor=\"#FF0000\">%1</td></tr></table>")
- .arg( i18n("Unknown charset. Default charset is used instead.") );
+ .tqarg( i18n("Unknown charset. Default charset is used instead.") );
kdDebug(5003) << k_funcinfo << "unknown charset = " << text->contentType()->charset() << endl;
}
@@ -473,7 +473,7 @@ void ArticleWidget::displayArticle()
text->decodedText( htmlTxt, true, cfgMgr->readNewsViewer()->removeTrailingNewlines() );
if ( mShowHtml ) {
// strip </html> & </body>
- int i = kMin( htmlTxt.findRev( "</html>", -1, false ), htmlTxt.findRev( "</body>", -1, false ) );
+ int i = kMin( htmlTxt.tqfindRev( "</html>", -1, false ), htmlTxt.tqfindRev( "</body>", -1, false ) );
if ( i >= 0 )
htmlTxt.truncate( i );
html += htmlTxt;
@@ -560,8 +560,8 @@ void ArticleWidget::displayHeader()
if ( header ) {
headerHtml += "<tr>";
headerHtml+=TQString( "<td align=\"right\" valign=\"top\"><b>%1</b></td><td width=\"100%\">%2</td></tr>" )
- .arg( toHtmlString( header->type(), None ) + ": " )
- .arg( toHtmlString( header->asUnicodeString() , ParseURL ) );
+ .tqarg( toHtmlString( header->type(), None ) + ": " )
+ .tqarg( toHtmlString( header->asUnicodeString() , ParseURL ) );
delete header;
}
}
@@ -597,8 +597,8 @@ void ArticleWidget::displayHeader()
if ( hb->is("From") ) {
headerHtml += TQString( "<a href=\"mailto:%1\">%2</a>")
- .arg( KPIM::getEmailAddress( hb->asUnicodeString() ) )
- .arg( toHtmlString( hb->asUnicodeString(), None ) );
+ .tqarg( KPIM::getEmailAddress( hb->asUnicodeString() ) )
+ .tqarg( toHtmlString( hb->asUnicodeString(), None ) );
KMime::Headers::Base *orgHdr = mArticle->getHeaderByType( "Organization" );
if ( orgHdr && !orgHdr->isEmpty() ) {
headerHtml += "&nbsp;&nbsp;(";
@@ -636,7 +636,7 @@ void ArticleWidget::displayHeader()
if ( !xfhead.isEmpty() ) {
KPIM::KXFace xf;
xface = TQString::tqfromLatin1( "<div class=\"senderpic\"><img src=\"%1\" width=\"48\" height=\"48\"/></div>" )
- .arg( imgToDataUrl( xf.toImage( xfhead ), "PNG" ) );
+ .tqarg( imgToDataUrl( xf.toImage( xfhead ), "PNG" ) );
}
// fancy header style
@@ -660,7 +660,7 @@ void ArticleWidget::displayHeader()
int refCnt = refs->count(), i = 1;
TQCString id = refs->first();
id = id.mid( 1, id.length() - 2 ); // remove <>
- html += TQString( "<b>%1</b>" ).arg( i18n("References:") );
+ html += TQString( "<b>%1</b>" ).tqarg( i18n("References:") );
while ( i <= refCnt ) {
html += " <a href=\"news:" + TQString::tqfromLatin1( id ) + "\">" + TQString::number( i ) + "</a>";
@@ -748,7 +748,7 @@ TQString ArticleWidget::displaySigHeader( Kpgp::Block* block )
TQString message;
if ( signer.isEmpty() ) {
message = i18n( "Message was signed with unknown key 0x%1." )
- .arg( signerKey );
+ .tqarg( TQString(signerKey) );
message += "<br/>";
message += i18n( "The validity of the signature cannot be verified." );
signClass = "signWarn";
@@ -769,10 +769,10 @@ TQString ArticleWidget::displaySigHeader( Kpgp::Block* block )
if( !signerKey.isEmpty() )
message += i18n( "Message was signed by %1 (Key ID: 0x%2)." )
- .arg( signer )
- .arg( signerKey );
+ .tqarg( signer )
+ .tqarg( TQString(signerKey) );
else
- message += i18n( "Message was signed by %1." ).arg( signer );
+ message += i18n( "Message was signed by %1." ).tqarg( signer );
message += "<br/>";
if( block->goodSignature() ) {
@@ -916,7 +916,7 @@ TQString ArticleWidget::imgToDataUrl( const TQImage &image, const char* fmt )
buffer.open( IO_WriteOnly );
image.save( &buffer, fmt );
return TQString::tqfromLatin1("data:image/%1;base64,%2")
- .arg( fmt, KCodecs::base64Encode( ba ) );
+ .tqarg( fmt, TQString(KCodecs::base64Encode( ba )) );
}
@@ -989,7 +989,7 @@ TQString ArticleWidget::writeAttachmentToTempFile( KMime::Content *att, int part
// strip off a leading path
KMime::Headers::ContentType* ct = att->contentType();
TQString attName = ct->name();
- int slashPos = attName.findRev( '/' );
+ int slashPos = attName.tqfindRev( '/' );
if( -1 != slashPos )
attName = attName.mid( slashPos + 1 );
if( attName.isEmpty() )
@@ -1030,7 +1030,7 @@ void ArticleWidget::processJob( KNJobData * job )
if ( !job->canceled() ) {
if ( !job->success() )
KMessageBox::error( this, i18n("An error occurred while downloading the article source:\n")
- .arg( job->errorString() ) );
+ .tqarg( job->errorString() ) );
else
new KNSourceViewWindow( a->head() + "\n" + a->body() );
}
@@ -1408,8 +1408,8 @@ void ArticleWidget::slotCopyURL()
address = mCurrentURL.path();
else
address = mCurrentURL.url();
- TQApplication::clipboard()->setText( address, TQClipboard::Clipboard );
- TQApplication::clipboard()->setText( address, TQClipboard::Selection );
+ TQApplication::tqclipboard()->setText( address, TQClipboard::Clipboard );
+ TQApplication::tqclipboard()->setText( address, TQClipboard::Selection );
}
void ArticleWidget::slotAddBookmark()
@@ -1472,7 +1472,7 @@ void ArticleWidget::focusOutEvent( TQFocusEvent *e )
bool ArticleWidget::eventFilter( TQObject *o, TQEvent *e )
{
- if ( e->type() == TQEvent::KeyPress && (static_cast<TQKeyEvent*>(e)->key() == Key_Tab) ) {
+ if ( e->type() == TQEvent::KeyPress && (TQT_TQKEYEVENT(e)->key() == Key_Tab) ) {
emit focusChangeRequest( this );
if ( !hasFocus() ) // focusChangeRequest was successful
return true;