akregator_plugin.h
1 /*
2  This file is part of Akregator.
3 
4  Copyright (C) 2004 Sashmit Bhaduri <smt@vfemail.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_PLUGIN_H
26 #define AKREGATOR_PLUGIN_H
27 
28 #include <tdelocale.h>
29 #include <tdeparts/part.h>
30 
31 #include <tdeparts/part.h>
32 #include <plugin.h>
33 #include "akregator_partiface_stub.h"
34 #include <uniqueapphandler.h>
35 
36 class TDEAboutData;
37 
38 namespace Akregator {
39 
40 typedef KParts::ReadOnlyPart MyBasePart;
41 
42 class UniqueAppHandler : public Kontact::UniqueAppHandler
43 {
44  public:
45  UniqueAppHandler( Kontact::Plugin* plugin ) : Kontact::UniqueAppHandler( plugin ) {}
46  virtual void loadCommandLineOptions();
47  virtual int newInstance();
48 };
49 
50 
51 class AkregatorPlugin : public Kontact::Plugin
52 {
53  TQ_OBJECT
54 
55  public:
56  AkregatorPlugin( Kontact::Core *core, const char *name,
57  const TQStringList & );
58  virtual ~AkregatorPlugin();
59 
60  int weight() const { return 475; }
61 
62  AkregatorPartIface_stub *interface();
63 
64  virtual TQStringList configModules() const;
65  virtual TQStringList invisibleToolbarActions() const;
66  virtual bool isRunningStandalone();
67  virtual void readProperties( TDEConfig *config );
68  virtual void saveProperties( TDEConfig *config );
69 
70  private slots:
71  void showPart();
72  void addFeed();
73 
74  protected:
75  MyBasePart *createPart();
76  AkregatorPartIface_stub *m_stub;
77  Kontact::UniqueAppWatcher *m_uniqueAppWatcher;
78 };
79 
80 } // namespace Akregator
81 #endif
This class provides the interface to the Kontact core for the plugins.
Definition: core.h:42
Base class for all Plugins in Kontact.
Definition: plugin.h:59
DCOP Object that has the name of the standalone application (e.g.
If the standalone application is running by itself, we need to watch for when the user closes it,...