Don't keep compiling/run if something failed.
[kdevelopdvcssupport.git] / plugins / teamwork / kdevteamworkplugin.h
blob0a416f74f08dca3918558adff5ec2047abce58d9
1 /***************************************************************************
2 Copyright 2006 David Nolden <david.nolden.kdevelop@art-master.de>
3 ***************************************************************************/
5 /***************************************************************************
6 * *
7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. *
11 * *
12 ***************************************************************************/
14 #ifndef KDEVTEAMWORK_PART_H
15 #define KDEVTEAMWORK_PART_H
17 #include <QtCore/QPointer>
19 #include <interfaces/iplugin.h>
20 #include <QtCore/QVariant>
22 class KDevTeamworkViewFactory;
23 class KUrl;
24 class QModelIndex;
25 class KDevTeamwork;
26 class KDevTeamworkPluginFactory;
28 namespace KDevelop {
29 class ICore;
30 class IDocumentController;
31 class IProject;
34 class KDevTeamworkPlugin: public KDevelop::IPlugin
36 Q_OBJECT
37 public:
38 enum RefreshPolicy
40 Refresh,
41 NoRefresh,
42 ForceRefresh
45 public:
46 KDevTeamworkPlugin( QObject *parent, const QVariantList & = QVariantList() );
47 virtual ~KDevTeamworkPlugin();
49 //KDevPlugin methods
50 virtual QWidget* pluginView() const;
52 void import( RefreshPolicy policy = Refresh );
54 static KDevelop::ICore* staticCore();
56 static KDevelop::IDocumentController* staticDocumentController();
58 virtual void restorePartialProjectSession(const QDomElement* el);
60 virtual void savePartialProjectSession(QDomElement* el);
62 void setView( QWidget* view );
64 // KDevelop::Plugin methods
65 virtual void unload();
67 signals:
68 void refresh();
70 private slots:
71 void projectOpened( KDevelop::IProject* );
72 void projectClosed( KDevelop::IProject* );
74 private:
75 void destroyTeamwork();
76 void startTeamwork( KDevelop::IProject* );
78 KDevelop::IProject* m_currentProject;
79 static KDevTeamworkPlugin* m_self;
80 QPointer<KDevTeamwork> m_teamwork;
81 QPointer<QWidget> m_window;
82 KDevTeamworkViewFactory* m_factory;
85 #endif
87 // kate: space-indent on; indent-width 2; tab-width 2; replace-tabs on