OSDN Git Service

e45cc356a885e20b9c099212b5934d4e7f41a205
[qt-creator-jp/qt-creator-jp.git] / src / plugins / qt4projectmanager / qt4projectmanagerplugin.h
1 /**************************************************************************
2 **
3 ** This file is part of Qt Creator
4 **
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
6 **
7 ** Contact: Nokia Corporation (qt-info@nokia.com)
8 **
9 ** No Commercial Usage
10 **
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
14 ** this package.
15 **
16 ** GNU Lesser General Public License Usage
17 **
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file.  Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Nokia gives you certain additional
26 ** rights.  These rights are described in the Nokia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** If you have questions regarding the use of this file, please contact
30 ** Nokia at qt-info@nokia.com.
31 **
32 **************************************************************************/
33
34 #ifndef QT4PROJECTMANAGERPLUGIN_H
35 #define QT4PROJECTMANAGERPLUGIN_H
36
37 #include <extensionsystem/iplugin.h>
38 #include <coreplugin/icontext.h>
39
40 QT_BEGIN_NAMESPACE
41 class QAction;
42 QT_END_NAMESPACE
43
44 namespace ProjectExplorer {
45     class Project;
46     class Node;
47     class ProjectExplorerPlugin;
48 }
49 namespace Qt4ProjectManager {
50
51 class Qt4Manager;
52 class QtVersionManager;
53
54 namespace Internal {
55
56 class ProFileEditorFactory;
57 class GettingStartedWelcomePage;
58
59 class Qt4ProjectManagerPlugin : public ExtensionSystem::IPlugin
60 {
61     Q_OBJECT
62
63 public:
64     ~Qt4ProjectManagerPlugin();
65     bool initialize(const QStringList &arguments, QString *error_message);
66     void extensionsInitialized();
67
68     Core::Context projectContext() const { return m_projectContext; }
69
70 private slots:
71     void updateContextMenu(ProjectExplorer::Project *project,
72                            ProjectExplorer::Node *node);
73     void currentProjectChanged();
74     void buildStateChanged(ProjectExplorer::Project *pro);
75     void addLibrary();
76     void jumpToFile();
77
78 #ifdef WITH_TESTS
79     void testBasicProjectLoading(); // Test fails!
80
81     void testAbldOutputParsers_data();
82     void testAbldOutputParsers();
83     void testQtOutputParser_data();
84     void testQtOutputParser();
85     void testSbsV2OutputParsers_data();
86     void testSbsV2OutputParsers();
87     void testRvctOutputParser_data();
88     void testRvctOutputParser();
89     void testQmakeOutputParsers_data();
90     void testQmakeOutputParsers();
91 #endif
92
93 private:
94     ProjectExplorer::ProjectExplorerPlugin *m_projectExplorer;
95     ProFileEditorFactory *m_proFileEditorFactory;
96     Qt4Manager *m_qt4ProjectManager;
97
98     QAction *m_runQMakeAction;
99     QAction *m_runQMakeActionContextMenu;
100     QAction *m_buildSubProjectContextMenu;
101     QAction *m_rebuildSubProjectContextMenu;
102     QAction *m_cleanSubProjectContextMenu;
103     GettingStartedWelcomePage *m_welcomePage;
104     Core::Context m_projectContext;
105 };
106
107 } // namespace Internal
108 } // namespace Qt4ProjectManager
109
110 #endif // QT4PROJECTMANAGERPLUGIN_H