• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

akregator

  • sources
  • kde-4.14
  • kdepim
  • akregator
  • src
mainwidget.h
Go to the documentation of this file.
1 /*
2  This file is part of Akregator.
3 
4  Copyright (C) 2004 Stanislav Karchebny <Stanislav.Karchebny@kdemail.net>
5  2004 Sashmit Bhaduri <smt@vfemail.net>
6  2005 Frank Osterfeld <osterfeld@kde.org>
7 
8  This program is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 
22  As a special exception, permission is given to link this program
23  with any edition of Qt, and distribute the resulting executable,
24  without including the source code for Qt in the source distribution.
25 */
26 
27 #ifndef AKREGATOR_MAINWIDGET_H
28 #define AKREGATOR_MAINWIDGET_H
29 
30 #include "akregator_export.h"
31 #include "feed.h"
32 
33 #include <kurl.h>
34 
35 #include <solid/networking.h>
36 
37 #include <QWidget>
38 
39 #ifndef Q_MOC_RUN
40 #include <boost/shared_ptr.hpp>
41 #endif
42 
43 class KConfig;
44 class KFileItem;
45 class KConfigGroup;
46 
47 class QDomDocument;
48 class QSplitter;
49 
50 namespace Akregator {
51 
52 class AbstractSelectionController;
53 class ActionManagerImpl;
54 class ArticleListView;
55 class ArticleViewer;
56 class Folder;
57 class FeedList;
58 class FeedListManagementImpl;
59 class Frame;
60 class Part;
61 class SearchBar;
62 class SubscriptionListView;
63 class TabWidget;
64 
68 class AKREGATORPART_EXPORT MainWidget : public QWidget
69 {
70  Q_OBJECT
71  public:
72 
78  MainWidget(Akregator::Part *part, QWidget *parent, ActionManagerImpl* actionManager, const char* name);
79 
82  ~MainWidget();
83 
85  void saveSettings();
86 
89  void importFeedList( const QDomDocument& doc );
90 
94  QDomDocument feedListToOPML();
95 
96  void setFeedList( const boost::shared_ptr<FeedList>& feedList );
97 
105  void addFeedToGroup(const QString& url, const QString& group);
106 
107  boost::shared_ptr<FeedList> allFeedsList()
108  {
109  return m_feedList;
110  }
111 
113  void readProperties(const KConfigGroup & config);
114  void saveProperties(KConfigGroup & config);
115 
116  //Returns true if networking is available
117  bool isNetworkAvailable();
118 
119  enum ViewMode { NormalView=0,
120  WidescreenView,
121  CombinedView };
122 
123  ViewMode viewMode() const { return m_viewMode; }
124 
125 
126  signals:
128  void signalUnreadCountChanged(int);
129 
131  void signalArticlesSelected(const QList<Akregator::Article>&);
132 
133  public slots:
134 
137  void slotOpenSelectedArticlesInBrowser();
138 
140  void slotOpenSelectedArticles();
141  void slotOpenSelectedArticlesInBackground();
142 
143  void slotOnShutdown();
144 
146  void slotNodeSelected(Akregator::TreeNode* node);
147 
149  void slotArticleSelected(const Akregator::Article&);
150 
151  void ensureArticleTabVisible();
152 
154  void slotSetTotalUnread();
155 
158  void slotCopyLinkAddress();
159 
160  void slotRequestNewFrame(int& frameId);
161 
163  void slotFeedUrlDropped (KUrl::List &urls, Akregator::TreeNode* after, Akregator::Folder *parent);
164 
166  void slotMouseOverInfo(const KFileItem& kifi);
167 
169  void slotFeedAdd();
171  void slotFeedAddGroup();
173  void slotFeedRemove();
175  void slotFeedModify();
177  void slotFetchCurrentFeed();
179  void slotFetchAllFeeds();
181  void slotMarkAllRead();
183  void slotMarkAllFeedsRead();
185  void slotOpenHomepage();
186 
188  void slotReloadAllTabs();
189 
191  void slotArticleToggleKeepFlag(bool enabled);
193  void slotArticleDelete();
195  void slotSetSelectedArticleRead();
197  void slotSetSelectedArticleUnread();
199  void slotSetSelectedArticleNew();
201  void slotSetCurrentArticleReadDelayed();
202 
204  void slotTextToSpeechRequest();
205 
207  void slotNormalView();
209  void slotWidescreenView();
211  void slotCombinedView();
213  void slotToggleShowQuickFilter();
214 
216  void slotPrevUnreadArticle();
218  void slotNextUnreadArticle();
219 
220  void slotMoveCurrentNodeUp();
221  void slotMoveCurrentNodeDown();
222  void slotMoveCurrentNodeLeft();
223  void slotMoveCurrentNodeRight();
224 
225  void slotSendLink() { sendArticle(); }
226  void slotSendFile() { sendArticle(true); }
227 
228  void slotNetworkStatusChanged(Solid::Networking::Status status);
229 
230 
231  protected:
232 
233  void sendArticle(bool attach=false);
234 
235  void addFeed(const QString& url, TreeNode* after, Folder* parent, bool autoExec = true);
236 
237  protected slots:
238 
240  void slotMouseButtonPressed(int button, const KUrl&);
241 
243  void slotOpenArticleInBrowser(const Akregator::Article& article);
244 
245  void slotDoIntervalFetches();
246  void slotDeleteExpiredArticles();
247 
248  void slotFetchingStarted();
249  void slotFetchingStopped();
250 
251  void slotFramesChanged();
252 
253  private:
254  void deleteExpiredArticles( const boost::shared_ptr<FeedList>& feedList );
255 
257  void openSelectedArticles(bool openInBackground);
258 
259  AbstractSelectionController* m_selectionController;
260  boost::shared_ptr<FeedList> m_feedList;
261 
262  SubscriptionListView* m_feedListView;
263  ArticleListView* m_articleListView;
264 
265  ArticleViewer *m_articleViewer;
266  TabWidget* m_tabWidget;
267 
268  QWidget *m_mainTab;
269  Frame *m_mainFrame;
270 
271  SearchBar* m_searchBar;
272 
273  QSplitter *m_articleSplitter;
274  QSplitter *m_horizontalSplitter;
275 
276  Akregator::Part *m_part;
277  ViewMode m_viewMode;
278 
279  QTimer *m_fetchTimer;
280  QTimer* m_expiryTimer;
281  QTimer *m_markReadTimer;
282 
283  bool m_shuttingDown;
284  bool m_displayingAboutPage;
285  bool m_networkAvailable;
286 
287  ActionManagerImpl* m_actionManager;
288  FeedListManagementImpl* const m_feedListManagementInterface;
289 };
290 
291 } // namespace Akregator
292 
293 #endif // AKREGATOR_MAINWIDGET_H
Akregator::Frame
Definition: frame.h:53
Akregator::ArticleViewer
Definition: articleviewer.h:56
QWidget
Akregator::FeedListManagementImpl
Definition: feedlist.h:60
Akregator::MainWidget
This is the main widget of the view, containing tree view, article list, viewer etc.
Definition: mainwidget.h:68
Status
Status
Definition: akregatorstorageexporter.cpp:63
Akregator::Part
This is a RSS Aggregator "Part".
Definition: akregator_part.h:77
Akregator::MainWidget::allFeedsList
boost::shared_ptr< FeedList > allFeedsList()
Definition: mainwidget.h:107
Akregator::AbstractSelectionController
Definition: abstractselectioncontroller.h:94
feed.h
Akregator::SubscriptionListView
Definition: subscriptionlistview.h:37
Akregator::ArticleListView
Definition: articlelistview.h:88
QTimer
Akregator::ActionManagerImpl
Akregator-specific implementation of the ActionManager interface.
Definition: actionmanagerimpl.h:50
Akregator::TabWidget
Definition: tabwidget.h:38
QString
QList< Akregator::Article >
Akregator::MainWidget::ViewMode
ViewMode
Definition: mainwidget.h:119
QDomDocument
Akregator::MainWidget::slotSendLink
void slotSendLink()
Definition: mainwidget.h:225
Akregator::MainWidget::WidescreenView
Definition: mainwidget.h:120
QSplitter
akregator_export.h
Akregator::Folder
Represents a folder (containing feeds and/or other folders)
Definition: folder.h:44
Akregator::Article
A proxy class for Syndication::ItemPtr with some additional methods to assist sorting.
Definition: article.h:63
AKREGATORPART_EXPORT
#define AKREGATORPART_EXPORT
Definition: akregator_export.h:48
Akregator::SearchBar
Definition: searchbar.h:45
Akregator::MainWidget::slotSendFile
void slotSendFile()
Definition: mainwidget.h:226
Akregator::TreeNode
Abstract base class for all kind of elements in the feed tree, like feeds and feed groups (and search...
Definition: treenode.h:58
Akregator::MainWidget::viewMode
ViewMode viewMode() const
Definition: mainwidget.h:123
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

KDE's Doxygen guidelines are available online.

akregator

Skip menu "akregator"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal