2009-02-25 09:15:00 +01:00
|
|
|
/**************************************************************************
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
|
**
|
2011-01-11 16:28:15 +01:00
|
|
|
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** Contact: Nokia Corporation (info@qt.nokia.com)
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** GNU Lesser General Public License Usage
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** This file may be used under the terms of the GNU Lesser General Public
|
|
|
|
|
** License version 2.1 as published by the Free Software Foundation and
|
|
|
|
|
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
|
|
|
|
** Please review the following information to ensure the GNU Lesser General
|
|
|
|
|
** Public License version 2.1 requirements will be met:
|
|
|
|
|
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** In addition, as a special exception, Nokia gives you certain additional
|
2011-04-13 08:42:33 +02:00
|
|
|
** rights. These rights are described in the Nokia Qt LGPL Exception
|
2010-12-17 16:01:08 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** Other Usage
|
|
|
|
|
**
|
|
|
|
|
** Alternatively, this file may be used in accordance with the terms and
|
|
|
|
|
** conditions contained in a signed written agreement between you and Nokia.
|
|
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** If you have questions regarding the use of this file, please contact
|
|
|
|
|
** Nokia at qt-info@nokia.com.
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
**************************************************************************/
|
2008-12-02 16:19:05 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
#ifndef PROJECTWINDOW_H
|
|
|
|
|
#define PROJECTWINDOW_H
|
|
|
|
|
|
2010-12-10 19:02:19 +01:00
|
|
|
#include <QtCore/QMap>
|
2009-11-30 16:23:28 +01:00
|
|
|
#include <QtGui/QScrollArea>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
2009-07-16 15:33:19 +02:00
|
|
|
class QLabel;
|
2009-11-25 16:01:46 +01:00
|
|
|
class QGridLayout;
|
2009-09-29 18:06:13 +02:00
|
|
|
class QMenu;
|
2010-07-13 16:36:37 +02:00
|
|
|
class QStackedWidget;
|
2008-12-02 12:01:29 +01:00
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
|
|
namespace ProjectExplorer {
|
|
|
|
|
|
2011-04-14 13:32:30 +02:00
|
|
|
class PropertiesPanel;
|
2008-12-02 12:01:29 +01:00
|
|
|
class Project;
|
2010-02-08 15:50:06 +01:00
|
|
|
class Target;
|
2009-11-24 15:36:31 +01:00
|
|
|
class BuildConfiguration;
|
2010-01-20 16:17:26 +01:00
|
|
|
class RunConfiguration;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2010-01-21 13:46:19 +01:00
|
|
|
class DoubleTabWidget;
|
|
|
|
|
|
2009-07-16 15:33:19 +02:00
|
|
|
class PanelsWidget : public QScrollArea
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
PanelsWidget(QWidget *parent);
|
|
|
|
|
~PanelsWidget();
|
|
|
|
|
// Adds a widget
|
2011-04-14 13:32:30 +02:00
|
|
|
void addPropertiesPanel(PropertiesPanel *panel);
|
2009-07-16 15:33:19 +02:00
|
|
|
|
2009-11-25 15:18:51 +01:00
|
|
|
private:
|
2011-04-14 13:32:30 +02:00
|
|
|
void addPanelWidget(PropertiesPanel *panel, int row);
|
2009-11-30 16:23:28 +01:00
|
|
|
|
2011-04-14 13:32:30 +02:00
|
|
|
QList<PropertiesPanel *> m_panels;
|
2009-11-25 16:01:46 +01:00
|
|
|
QGridLayout *m_layout;
|
|
|
|
|
QWidget *m_root;
|
2009-07-16 15:33:19 +02:00
|
|
|
};
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
class ProjectWindow : public QWidget
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2009-01-20 15:31:33 +01:00
|
|
|
explicit ProjectWindow(QWidget *parent = 0);
|
2008-12-02 12:01:29 +01:00
|
|
|
~ProjectWindow();
|
|
|
|
|
|
2010-04-28 16:59:03 +02:00
|
|
|
void aboutToShutdown();
|
2010-12-10 19:02:19 +01:00
|
|
|
void extensionsInitialized();
|
2008-12-02 12:01:29 +01:00
|
|
|
private slots:
|
2010-12-10 19:02:19 +01:00
|
|
|
void targetFactoriesChanged();
|
2010-01-21 13:46:19 +01:00
|
|
|
void showProperties(int index, int subIndex);
|
2008-12-02 12:01:29 +01:00
|
|
|
void restoreStatus();
|
|
|
|
|
void saveStatus();
|
2010-03-11 13:42:41 +01:00
|
|
|
void registerProject(ProjectExplorer::Project*);
|
|
|
|
|
void deregisterProject(ProjectExplorer::Project*);
|
2010-03-24 18:36:06 +01:00
|
|
|
void startupProjectChanged(ProjectExplorer::Project *);
|
2010-03-11 13:42:41 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
private:
|
2010-12-10 19:02:19 +01:00
|
|
|
bool useTargetPage(ProjectExplorer::Project *project);
|
2010-02-08 15:50:06 +01:00
|
|
|
void removeCurrentWidget();
|
|
|
|
|
|
2010-01-21 13:46:19 +01:00
|
|
|
DoubleTabWidget *m_tabWidget;
|
|
|
|
|
QStackedWidget *m_centralWidget;
|
2010-02-08 15:50:06 +01:00
|
|
|
QWidget *m_currentWidget;
|
2010-01-21 13:46:19 +01:00
|
|
|
QList<ProjectExplorer::Project *> m_tabIndexToProject;
|
2010-12-10 19:02:19 +01:00
|
|
|
QMap<ProjectExplorer::Project *, bool> m_usesTargetPage;
|
2010-10-06 11:15:01 +02:00
|
|
|
int m_previousTargetSubIndex;
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace ProjectExplorer
|
|
|
|
|
|
|
|
|
|
#endif // PROJECTWINDOW_H
|