kontact

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
36class TDEAboutData;
37
38namespace Akregator {
39
40typedef KParts::ReadOnlyPart MyBasePart;
41
42class 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
51class 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
virtual TQStringList invisibleToolbarActions() const
Returns a list of action name which shall be hidden in the main toolbar.
Definition plugin.h:233
virtual bool isRunningStandalone()
Reimplement this method and return whether a standalone application is still running This is only req...
Definition plugin.h:131
virtual int weight() const
Return the weight of the plugin.
Definition plugin.h:208
virtual KParts::ReadOnlyPart * createPart()=0
Reimplement and return the part here.
virtual void loadCommandLineOptions()=0
This must be reimplemented so that app-specific command line options can be parsed.
virtual int newInstance()
We can't use k_dcop and dcopidl here, because the data passed to newInstance can't be expressed in te...