akregator/src

actionmanagerimpl.h
1 /*
2  This file is part of Akregator.
3 
4  Copyright (C) 2005 Frank Osterfeld <frank.osterfeld at kdemail.net>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  As a special exception, permission is given to link this program
21  with any edition of TQt, and distribute the resulting executable,
22  without including the source code for TQt in the source distribution.
23 */
24 
25 #ifndef AKREGATOR_ACTIONMANAGERIMPL_H
26 #define AKREGATOR_ACTIONMANAGERIMPL_H
27 
28 #include "actionmanager.h"
29 
30 class TQStringList;
31 class TQWidget;
32 class TDEAction;
33 class TDEActionMenu;
34 class TDEActionCollection;
35 
36 namespace Akregator {
37 
38 class ArticleListView;
39 class ArticleViewer;
40 class ListTabWidget;
41 class Part;
42 class TrayIcon;
43 class Tag;
44 class TagSet;
45 class TreeNode;
46 class View;
47 class TabWidget;
48 
51 {
52  TQ_OBJECT
53 
54 
55  public:
56  ActionManagerImpl(Part* part, TQObject* parent=0, const char* name=0);
57  virtual ~ActionManagerImpl();
58 
59  virtual TDEAction* action(const char* name, const char* classname=0);
60  virtual TQWidget* container(const char* name);
61 
62  void initView(View* view);
63  void initTrayIcon(TrayIcon* trayIcon);
64  void initArticleViewer(ArticleViewer* articleViewer);
65  void initArticleListView(ArticleListView* articleList);
66  void initListTabWidget(ListTabWidget* listTabWidget);
67  void initTabWidget(TabWidget* tabWidget);
68  void setTagSet(TagSet* tagSet);
69 
70  public slots:
71 
74  void slotUpdateTagActions(bool enabled, const TQStringList& tagIds);
75 
76  void slotNodeSelected(TreeNode* node);
77 
78  void slotTagAdded(const Tag& tag);
79  void slotTagRemoved(const Tag& tag);
80 
81  protected:
82 
83  TDEActionCollection* actionCollection();
84 
85  private:
86 
87  void initPart();
88 
89  friend class NodeSelectVisitor;
90  class NodeSelectVisitor;
91 
92  class ActionManagerImplPrivate;
93  ActionManagerImplPrivate* d;
94 };
95 
96 } // namespace Akregator
97 
98 #endif // AKREGATOR_ACTIONMANAGERIMPL_H
Akregator-specific implementation of the ActionManager interface.
void slotUpdateTagActions(bool enabled, const TQStringList &tagIds)
fills the remove tag menu with the given tags enables/disables tag menu action according to enabled
interface for accessing actions, popup menus etc.
Definition: actionmanager.h:40
This HTML viewer is used to display articles.
Definition: articleviewer.h:49
A widget containing multiple list views, e.g.
Definition: listtabwidget.h:46
This is a RSS Aggregator "Part".
represents a set of tags (see Tag) In an application, there is usually one central tag set that is us...
Definition: tagset.h:48
Abstract base class for all kind of elements in the feed tree, like feeds and feed groups (and search...
Definition: treenode.h:52
This is the main widget of the view, containing tree view, article list, viewer etc.