diff options
Diffstat (limited to 'knode/articlewidget.cpp')
| -rw-r--r-- | knode/articlewidget.cpp | 88 | 
1 files changed, 44 insertions, 44 deletions
| diff --git a/knode/articlewidget.cpp b/knode/articlewidget.cpp index 1b5b3b9a..60ac8e9a 100644 --- a/knode/articlewidget.cpp +++ b/knode/articlewidget.cpp @@ -40,12 +40,12 @@  #include <tdemessagebox.h>  #include <kmimetype.h>  #include <krun.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h>  #include <tdetempfile.h>  #include <kurl.h> +#include <tdeglobal.h>  #include <libemailfunctions/email.h> -#include <libemailfunctions/kasciistringtools.h>  #include <libkpgp/kpgp.h>  #include <libkpgp/kpgpblock.h> @@ -98,20 +98,20 @@ ArticleWidget::ArticleWidget( TQWidget *parent,    TQHBoxLayout *box = new TQHBoxLayout( this );    mViewer = new TDEHTMLPart( this, "mViewer" );    box->addWidget( mViewer->widget() ); -  mViewer->widget()->setFocusPolicy( TQ_WheelFocus ); +  mViewer->widget()->setFocusPolicy( TQWidget::WheelFocus );    mViewer->setPluginsEnabled( false );    mViewer->setJScriptEnabled( false );    mViewer->setJavaEnabled( false );    mViewer->setMetaRefreshEnabled( false );    mViewer->setOnlyLocalReferences( true ); -  mViewer->view()->setFocusPolicy( TQ_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&)), -           TQT_SLOT(slotURLPopup(const TQString&, const TQPoint&)) ); +  mViewer->view()->setFocusPolicy( TQWidget::WheelFocus ); +  connect( mViewer->browserExtension(), TQ_SIGNAL(openURLRequestDelayed(const KURL&, const KParts::URLArgs&)), +           TQ_SLOT(slotURLClicked(const KURL&)) ); +  connect( mViewer, TQ_SIGNAL(popupMenu(const TQString&, const TQPoint&)), +           TQ_SLOT(slotURLPopup(const TQString&, const TQPoint&)) );    mTimer = new TQTimer( this ); -  connect( mTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()) ); +  connect( mTimer, TQ_SIGNAL(timeout()), TQ_SLOT(slotTimeout()) );    initActions();    readConfig(); @@ -134,58 +134,58 @@ ArticleWidget::~ArticleWidget()  void ArticleWidget::initActions()  { -  mSaveAction = KStdAction::save( TQT_TQOBJECT(this), TQT_SLOT(slotSave()), mActionCollection ); +  mSaveAction = KStdAction::save( this, TQ_SLOT(slotSave()), mActionCollection );    mSaveAction->setText( KStdGuiItem::saveAs().text() ); -  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" ); +  mPrintAction = KStdAction::print( this, TQ_SLOT(slotPrint()), mActionCollection ); +  mCopySelectionAction = KStdAction::copy( this, TQ_SLOT(slotCopySelection()), mActionCollection ); +  mSelectAllAction = KStdAction::selectAll( this, TQ_SLOT(slotSelectAll()), mActionCollection ); +  mFindAction = KStdAction::find( this, TQ_SLOT(slotFind()), mActionCollection, "find_in_article" );    mFindAction->setText( i18n("F&ind in Article...") ); -  mViewSourceAction = new TDEAction( i18n("&View Source"),  Key_V , TQT_TQOBJECT(this), -    TQT_SLOT(slotViewSource()), mActionCollection, "article_viewSource" ); +  mViewSourceAction = new TDEAction( i18n("&View Source"),  Key_V , this, +    TQ_SLOT(slotViewSource()), mActionCollection, "article_viewSource" );    mReplyAction = new TDEAction( i18n("&Followup to Newsgroup..."), "message_reply", -    Key_R, TQT_TQOBJECT(this), TQT_SLOT(slotReply()), mActionCollection, "article_postReply" ); +    Key_R, this, TQ_SLOT(slotReply()), mActionCollection, "article_postReply" );    mRemailAction = new TDEAction( i18n("Reply by E&mail..."), "mail-reply-sender", -    Key_A, TQT_TQOBJECT(this), TQT_SLOT(slotRemail()), mActionCollection, "article_mailReply" ); +    Key_A, this, TQ_SLOT(slotRemail()), mActionCollection, "article_mailReply" );    mForwardAction = new TDEAction( i18n("Forw&ard by Email..."), "mail-forward", -    Key_F, TQT_TQOBJECT(this), TQT_SLOT(slotForward()), mActionCollection, "article_forward" ); +    Key_F, this, TQ_SLOT(slotForward()), mActionCollection, "article_forward" );    mCancelAction = new TDEAction( i18n("article","&Cancel Article"), -    0, TQT_TQOBJECT(this), TQT_SLOT(slotCancel()), mActionCollection, "article_cancel" ); +    0, this, TQ_SLOT(slotCancel()), mActionCollection, "article_cancel" );    mSupersedeAction = new TDEAction(i18n("S&upersede Article"), -    0, TQT_TQOBJECT(this), TQT_SLOT(slotSupersede()), mActionCollection, "article_supersede" ); +    0, this, TQ_SLOT(slotSupersede()), mActionCollection, "article_supersede" );    mFixedFontToggle = new TDEToggleAction( i18n("U&se Fixed Font"), -    Key_X ,TQT_TQOBJECT(this), TQT_SLOT(slotToggleFixedFont()), mActionCollection, "view_useFixedFont" ); +    Key_X ,this, TQ_SLOT(slotToggleFixedFont()), mActionCollection, "view_useFixedFont" );    mFancyToggle = new TDEToggleAction( i18n("Fancy Formating"), -    Key_Y, TQT_TQOBJECT(this), TQT_SLOT(slotToggleFancyFormating()), mActionCollection, "view_fancyFormating" ); -  mRot13Toggle = new TDEToggleAction( i18n("&Unscramble (Rot 13)"), "decrypted", 0 , TQT_TQOBJECT(this), -    TQT_SLOT(slotToggleRot13()), mActionCollection, "view_rot13" ); +    Key_Y, this, TQ_SLOT(slotToggleFancyFormating()), mActionCollection, "view_fancyFormating" ); +  mRot13Toggle = new TDEToggleAction( i18n("&Unscramble (Rot 13)"), "decrypted", 0 , this, +    TQ_SLOT(slotToggleRot13()), mActionCollection, "view_rot13" );    mRot13Toggle->setChecked( false );    TDERadioAction *ra;    mHeaderStyleMenu = new TDEActionMenu( i18n("&Headers"), mActionCollection, "view_headers" ); -  ra = new TDERadioAction( i18n("&Fancy Headers"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotFancyHeaders()), +  ra = new TDERadioAction( i18n("&Fancy Headers"), 0, this, TQ_SLOT(slotFancyHeaders()),                           mActionCollection, "view_headers_fancy" );    ra->setExclusiveGroup( "view_headers" );    mHeaderStyleMenu->insert( ra ); -  ra = new TDERadioAction( i18n("&Standard Headers"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotStandardHeaders()), +  ra = new TDERadioAction( i18n("&Standard Headers"), 0, this, TQ_SLOT(slotStandardHeaders()),                           mActionCollection, "view_headers_standard" );    ra->setExclusiveGroup( "view_headers" );    mHeaderStyleMenu->insert( ra ); -  ra = new TDERadioAction( i18n("&All Headers"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotAllHeaders()), +  ra = new TDERadioAction( i18n("&All Headers"), 0, this, TQ_SLOT(slotAllHeaders()),                           mActionCollection, "view_headers_all" );    ra->setExclusiveGroup( "view_headers" );    mHeaderStyleMenu->insert( ra );    mAttachmentStyleMenu = new TDEActionMenu( i18n("&Attachments"), mActionCollection, "view_attachments" ); -  ra = new TDERadioAction( i18n("&As Icon"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotIconAttachments()), +  ra = new TDERadioAction( i18n("&As Icon"), 0, this, TQ_SLOT(slotIconAttachments()),                           mActionCollection, "view_attachments_icon" );    ra->setExclusiveGroup( "view_attachments" );    mAttachmentStyleMenu->insert( ra ); -  ra = new TDERadioAction( i18n("&Inline"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotInlineAttachments()), +  ra = new TDERadioAction( i18n("&Inline"), 0, this, TQ_SLOT(slotInlineAttachments()),                           mActionCollection, "view_attachments_inline" );    ra->setExclusiveGroup( "view_attachments" );    mAttachmentStyleMenu->insert( ra ); -  ra = new TDERadioAction( i18n("&Hide"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotHideAttachments()), +  ra = new TDERadioAction( i18n("&Hide"), 0, this, TQ_SLOT(slotHideAttachments()),                           mActionCollection, "view_attachments_hide" );    ra->setExclusiveGroup( "view_attachments" );    mAttachmentStyleMenu->insert( ra ); @@ -196,23 +196,23 @@ void ArticleWidget::initActions()    cs.prepend( i18n("Automatic") );    mCharsetSelect->setItems( cs );    mCharsetSelect->setCurrentItem( 0 ); -  connect( mCharsetSelect, TQT_SIGNAL(activated(const TQString&)),TQT_SLOT(slotSetCharset(const TQString&)) ); -  mCharsetSelectKeyb = new TDEAction( i18n("Charset"), Key_C, TQT_TQOBJECT(this), -    TQT_SLOT(slotSetCharsetKeyboard()), mActionCollection, "set_charset_keyboard" ); +  connect( mCharsetSelect, TQ_SIGNAL(activated(const TQString&)),TQ_SLOT(slotSetCharset(const TQString&)) ); +  mCharsetSelectKeyb = new TDEAction( i18n("Charset"), Key_C, this, +    TQ_SLOT(slotSetCharsetKeyboard()), mActionCollection, "set_charset_keyboard" ); -  new TDEAction( i18n("&Open URL"), "document-open", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenURL()), +  new TDEAction( i18n("&Open URL"), "document-open", 0, this, TQ_SLOT(slotOpenURL()),                 mActionCollection, "open_url" ); -  new TDEAction( i18n("&Copy Link Address"), "edit-copy", 0, TQT_TQOBJECT(this), TQT_SLOT( slotCopyURL()), +  new TDEAction( i18n("&Copy Link Address"), "edit-copy", 0, this, TQ_SLOT( slotCopyURL()),                 mActionCollection, "copy_url" ); -  new TDEAction( i18n("&Bookmark This Link"), "bookmark_add", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddBookmark()), +  new TDEAction( i18n("&Bookmark This Link"), "bookmark_add", 0, this, TQ_SLOT(slotAddBookmark()),                 mActionCollection, "add_bookmark" ); -  new TDEAction( i18n("&Add to Address Book"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddToAddressBook()), +  new TDEAction( i18n("&Add to Address Book"), 0, this, TQ_SLOT(slotAddToAddressBook()),                 mActionCollection, "add_addr_book" ); -  new TDEAction( i18n("&Open in Address Book"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenInAddressBook()), +  new TDEAction( i18n("&Open in Address Book"), 0, this, TQ_SLOT(slotOpenInAddressBook()),                 mActionCollection, "openin_addr_book" ); -  new TDEAction( i18n("&Open Attachment"), "document-open", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenAttachment()), +  new TDEAction( i18n("&Open Attachment"), "document-open", 0, this, TQ_SLOT(slotOpenAttachment()),                 mActionCollection, "open_attachment" ); -  new TDEAction( i18n("&Save Attachment As..."), "document-save-as", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSaveAttachment()), +  new TDEAction( i18n("&Save Attachment As..."), "document-save-as", 0, this, TQ_SLOT(slotSaveAttachment()),                 mActionCollection, "save_attachment" );  } @@ -881,7 +881,7 @@ void ArticleWidget::displayAttachment( KMime::Content *att, int partNum )      }    } else { // icon      TQCString mimetype = ct->mimeType(); -    KPIM::kAsciiToLower( mimetype.data() ); +    kasciitolower( mimetype.data() );      TQString iconName = KMimeType::mimeType( mimetype )->icon( TQString(), false );      TQString iconFile = TDEGlobal::instance()->iconLoader()->iconPath( iconName, TDEIcon::Desktop );      html += "<div><a href=\"" + href + "\"><img src=\"" + @@ -1228,7 +1228,7 @@ void ArticleWidget::slotPrint( )  void ArticleWidget::slotCopySelection( )  { -  kapp->clipboard()->setText( mViewer->selectedText() ); +  tdeApp->clipboard()->setText( mViewer->selectedText() );  } @@ -1472,7 +1472,7 @@ void ArticleWidget::focusOutEvent( TQFocusEvent *e )  bool ArticleWidget::eventFilter( TQObject *o, TQEvent *e )  { -  if ( e->type() == TQEvent::KeyPress && (TQT_TQKEYEVENT(e)->key() == Key_Tab) ) { +  if ( e->type() == TQEvent::KeyPress && (static_cast<TQKeyEvent*>(e)->key() == Key_Tab) ) {      emit focusChangeRequest( this );      if ( !hasFocus() )  // focusChangeRequest was successful        return true; | 
