akregator
articleviewer.cpp
Go to the documentation of this file.
118 connect(ext, SIGNAL(popupMenu(QPoint,KUrl,mode_t,KParts::OpenUrlArguments,KParts::BrowserArguments,KParts::BrowserExtension::PopupFlags,KParts::BrowserExtension::ActionGroupMap)),
119 this, SLOT(slotPopupMenu(QPoint,KUrl,mode_t,KParts::OpenUrlArguments,KParts::BrowserArguments,KParts::BrowserExtension::PopupFlags))); // ActionGroupMap argument removed, unused by slot
121 connect( ext, SIGNAL(openUrlRequestDelayed(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments)),
122 this, SLOT(slotOpenUrlRequestDelayed(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments)) );
149 connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), this, SLOT(slotPaletteOrFontChanged()) );
150 connect(KGlobalSettings::self(), SIGNAL(kdisplayFontChanged()), this, SLOT(slotPaletteOrFontChanged()) );
169 void ArticleViewer::slotOpenUrlRequestDelayed(const KUrl& url, const KParts::OpenUrlArguments& args, const KParts::BrowserArguments& browserArgs)
226 void ArticleViewer::slotPopupMenu(const QPoint& p, const KUrl& kurl, mode_t, const KParts::OpenUrlArguments&, const KParts::BrowserArguments&, KParts::BrowserExtension::PopupFlags kpf)
228 const bool isLink = (kpf & KParts::BrowserExtension::ShowNavigationItems) == 0; // ## why not use kpf & IsLink ?
238 popup.addAction( createOpenLinkInNewTabAction( kurl, this, SLOT(slotOpenLinkInForegroundTab()), &popup ) );
239 popup.addAction( createOpenLinkInExternalBrowserAction( kurl, this, SLOT(slotOpenLinkInBrowser()), &popup ) );
278 // which spec? Nobody seems to care (tested Firefox (3.5.10) Konqueror,and KMail (4.2.3)), so I re-enable the following line unless someone gives
285 ActionManager::getInstance()->action("viewer_copy")->setEnabled(!m_part->selectedText().isEmpty());
391 connect( node, SIGNAL(signalChanged(Akregator::TreeNode*)), this, SLOT(slotUpdateCombinedView()) );
392 connect( node, SIGNAL(signalArticlesAdded(Akregator::TreeNode*,QList<Akregator::Article>)), this, SLOT(slotArticlesAdded(Akregator::TreeNode*,QList<Akregator::Article>)));
393 connect( node, SIGNAL(signalArticlesRemoved(Akregator::TreeNode*,QList<Akregator::Article>)), this, SLOT(slotArticlesRemoved(Akregator::TreeNode*,QList<Akregator::Article>)));
394 connect( node, SIGNAL(signalArticlesUpdated(Akregator::TreeNode*,QList<Akregator::Article>)), this, SLOT(slotArticlesUpdated(Akregator::TreeNode*,QList<Akregator::Article>)));
397 connect( node, SIGNAL(signalChanged(Akregator::TreeNode*)), this, SLOT(slotShowSummary(Akregator::TreeNode*)) );
421 QString head = QString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n <html><head><title>.</title>");
512 void ArticleViewer::setFilters(const std::vector< shared_ptr<const AbstractMatcher> >& filters )
537 const std::vector< shared_ptr<const AbstractMatcher> >::const_iterator filterEnd = m_filters.end();
544 if ( std::find_if( m_filters.begin(), m_filters.end(), !bind( &AbstractMatcher::matches, _1, i ) ) != filterEnd )
547 text += "<p><div class=\"article\">"+m_combinedViewFormatter->formatArticle( i, ArticleFormatter::NoIcon)+"</div><p>";
551 kDebug() <<"Combined view rendering: (" << num <<" articles):" <<"generating HTML:" << spent.elapsed() <<"ms";
695 QString catchPhrase = ""; //not enough space for a catch phrase at default window size i18n("Part of the Kontact Suite");
701 QString rtl = kapp->isRightToLeft() ? QString("@import \"%1\";" ).arg( KStandardDirs::locate( "data", "kdeui/about/kde_infopage_rtl.css" )) : QString();
703 m_part->write( content.arg( infocss, rtl, fontSize, appTitle, catchPhrase, quickDescription, info ) );
725 bool ArticleViewerPart::urlSelected(const QString &url, int button, int state, const QString &_target,
736 if(KMessageBox::questionYesNo( widget(), i18n("Are you sure you want to disable this introduction page?"), i18n("Disable Introduction Page"), yesButton, noButton) == KMessageBox::Yes)
QLayout * layout() const
void slotCreateNewWindow(const KUrl &url, const KParts::OpenUrlArguments &args, const KParts::BrowserArguments &browserArgs, const KParts::WindowArgs &windowArgs, KParts::ReadOnlyPart **part)
Definition: articleviewer.cpp:209
void setHeight(int height)
void slotShowSummary(Akregator::TreeNode *node)
Definition: articleviewer.cpp:450
Definition: openurlrequest.h:42
void addWidget(QWidget *widget, int row, int column, QFlags< Qt::AlignmentFlag > alignment)
void setOpenInBackground(bool background)
Definition: openurlrequest.cpp:60
void showArticle(const Article &article)
Definition: articleviewer.cpp:474
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
virtual QAction * action(const char *name)=0
void completed()
void signalOpenUrlRequest(Akregator::OpenUrlRequest &)
This gets emitted when url gets clicked.
bool isRightToLeft() const
int elapsed() const
QString number(int n, int base)
void selectionChanged()
void ignore()
void setCombinedViewFormatter(const boost::shared_ptr< ArticleFormatter > &formatter)
Definition: articleviewer.cpp:763
void slotArticlesUpdated(Akregator::TreeNode *node, const QList< Akregator::Article > &list)
Definition: articleviewer.cpp:556
QClipboard * clipboard()
void setFocusProxy(QWidget *w)
bool urlSelected(const QString &url, int button, int state, const QString &_target, const KParts::OpenUrlArguments &args=KParts::OpenUrlArguments(), const KParts::BrowserArguments &browserArgs=KParts::BrowserArguments())
reimplemented to get the mouse button
Definition: articleviewer.cpp:725
void slotArticlesListed(KJob *job)
Definition: articleviewer.cpp:618
KParts::ReadOnlyPart * part() const
The part that was created for a "NewTab" request.
Definition: openurlrequest.cpp:109
void setArgs(const KParts::OpenUrlArguments &args)
Definition: openurlrequest.cpp:70
void setMargin(int margin)
void setBrowserArgs(const KParts::BrowserArguments &args)
Definition: openurlrequest.cpp:81
void slotSelectionChanged()
Definition: articleviewer.cpp:283
void setOptions(Options options)
Definition: openurlrequest.cpp:99
void setNormalViewFormatter(const boost::shared_ptr< ArticleFormatter > &formatter)
Definition: articleviewer.cpp:756
virtual QSize sizeHint() const
Definition: articleviewer.h:215
void slotSetZoomFactor(int percent)
Definition: articleviewer.cpp:372
AKREGATOR_EXPORT QAction * createOpenLinkInExternalBrowserAction(const KUrl &url, QObject *receiver=0, const char *slot=0, QObject *parent=0)
Definition: actions.cpp:42
QString & replace(int position, int n, QChar after)
void showNode(Akregator::TreeNode *node)
Shows the articles of the tree node node (combined view).
Definition: articleviewer.cpp:594
AKREGATOR_EXPORT QAction * createOpenLinkInNewTabAction(const KUrl &url, QObject *receiver=0, const char *slot=0, QObject *parent=0)
Definition: actions.cpp:33
QFontMetrics fontMetrics() const
static ActionManager * getInstance()
Definition: actionmanager.cpp:35
int height() const
int height() const
int pointsToPixel(int points) const
Definition: articleviewer.cpp:164
void slotUpdateCombinedView()
Update view if combined view mode is set.
Definition: articleviewer.cpp:522
void slotClear()
Clears the canvas and disconnects from the currently observed node (if in combined view mode)...
Definition: articleviewer.cpp:584
void slotPaletteOrFontChanged()
Definition: articleviewer.cpp:649
A proxy class for Syndication::ItemPtr with some additional methods to assist sorting.
Definition: article.h:63
void start()
void setText(const QString &text, Mode mode)
void started(KIO::Job *)
void setFilters(const std::vector< boost::shared_ptr< const Akregator::Filters::AbstractMatcher > > &filters)
Set filters which will be used if the viewer is in combined view mode.
Definition: articleviewer.cpp:512
void slotPopupMenu(const QPoint &, const KUrl &, mode_t, const KParts::OpenUrlArguments &, const KParts::BrowserArguments &, KParts::BrowserExtension::PopupFlags)
Definition: articleviewer.cpp:226
ArticleViewerPart(QWidget *parent)
Definition: articleviewer.cpp:707
virtual void setArticleActionsEnabled(bool enabled)=0
void slotArticlesRemoved(Akregator::TreeNode *node, const QList< Akregator::Article > &list)
Definition: articleviewer.cpp:574
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void slotArticlesAdded(Akregator::TreeNode *node, const QList< Akregator::Article > &list)
Definition: articleviewer.cpp:564
void slotOpenUrlRequestDelayed(const KUrl &, const KParts::OpenUrlArguments &, const KParts::BrowserArguments &)
Definition: articleviewer.cpp:169
Abstract base class for all kind of elements in the feed tree, like feeds and feed groups (and search...
Definition: treenode.h:58
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
void setEnabled(bool)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.