Clazy fix++
[kdepim.git] / kaddressbook / kontactplugin / kaddressbook_plugin.h
blob560dfbe9a9455530979c7d153a90b226f977b26e
1 /*
2 This file is part of KAddressBook Kontact Plugin.
4 Copyright (c) 2009-2015 Laurent Montel <montel@kde.org>
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.
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.
16 You should have received a copy of the GNU General Public License along
17 with this program; if not, write to the Free Software Foundation, Inc.,
18 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef KADDRESSBOOK_PLUGIN_H
22 #define KADDRESSBOOK_PLUGIN_H
24 #include <KontactInterface/UniqueAppHandler>
26 namespace KontactInterface
28 class Plugin;
31 class KAddressBookUniqueAppHandler : public KontactInterface::UniqueAppHandler
33 Q_OBJECT
34 public:
35 explicit KAddressBookUniqueAppHandler(KontactInterface::Plugin *plugin)
36 : KontactInterface::UniqueAppHandler(plugin) {}
37 void loadCommandLineOptions(QCommandLineParser *parser) Q_DECL_OVERRIDE;
38 int activate(const QStringList &args, const QString &workingDir) Q_DECL_OVERRIDE;
41 class KAddressBookPlugin : public KontactInterface::Plugin
43 Q_OBJECT
45 public:
46 KAddressBookPlugin(KontactInterface::Core *core, const QVariantList &);
47 ~KAddressBookPlugin();
49 bool isRunningStandalone() const Q_DECL_OVERRIDE;
50 int weight() const Q_DECL_OVERRIDE
52 return 300;
55 QStringList invisibleToolbarActions() const Q_DECL_OVERRIDE;
56 void shortcutChanged() Q_DECL_OVERRIDE;
58 protected:
59 KParts::ReadOnlyPart *createPart() Q_DECL_OVERRIDE;
61 private Q_SLOTS:
62 void slotNewContact();
63 void slotNewContactGroup();
64 void slotSyncContacts();
66 private:
67 KontactInterface::UniqueAppWatcher *mUniqueAppWatcher;
71 #endif