1 /**************************************************************************
3 ** This file is part of Qt Creator
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
7 ** Contact: Nokia Corporation (info@qt.nokia.com)
10 ** GNU Lesser General Public License Usage
12 ** This file may be used under the terms of the GNU Lesser General Public
13 ** License version 2.1 as published by the Free Software Foundation and
14 ** appearing in the file LICENSE.LGPL included in the packaging of this file.
15 ** Please review the following information to ensure the GNU Lesser General
16 ** Public License version 2.1 requirements will be met:
17 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
19 ** In addition, as a special exception, Nokia gives you certain additional
20 ** rights. These rights are described in the Nokia Qt LGPL Exception
21 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
25 ** Alternatively, this file may be used in accordance with the terms and
26 ** conditions contained in a signed written agreement between you and Nokia.
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
31 **************************************************************************/
33 #ifndef BUILDSETTINGSPROPERTIESPAGE_H
34 #define BUILDSETTINGSPROPERTIESPAGE_H
36 #include "iprojectproperties.h"
38 #include <QtGui/QWidget>
39 #include <QtGui/QIcon>
48 namespace ProjectExplorer {
50 class BuildConfiguration;
51 class BuildConfigWidget;
52 class IBuildStepFactory;
56 const char * const BUILDSETTINGS_PANEL_ID("ProjectExplorer.BuildSettingsPanel");
58 class BuildSettingsPanelFactory : public ITargetPanelFactory
62 QString displayName() const;
64 bool supports(Target *target);
65 IPropertiesPanel *createPanel(Target *target);
68 class BuildSettingsWidget;
70 class BuildSettingsPanel : public IPropertiesPanel
73 BuildSettingsPanel(Target *target);
74 ~BuildSettingsPanel();
75 QString displayName() const;
76 QWidget *widget() const;
80 BuildSettingsWidget *m_widget;
84 class BuildConfigurationsWidget;
86 class BuildSettingsWidget : public QWidget
90 BuildSettingsWidget(Target *target);
91 ~BuildSettingsWidget();
94 void addSubWidget(BuildConfigWidget *widget);
95 QList<BuildConfigWidget *> subWidgets() const;
100 void updateBuildSettings();
101 void currentIndexChanged(int index);
103 void createConfiguration();
104 void cloneConfiguration();
105 void deleteConfiguration();
106 void renameConfiguration();
107 void updateAddButtonMenu();
109 void updateActiveConfiguration();
112 void cloneConfiguration(BuildConfiguration *toClone);
113 void deleteConfiguration(BuildConfiguration *toDelete);
114 QString uniqueName(const QString & name);
117 BuildConfiguration *m_buildConfiguration;
119 QPushButton *m_addButton;
120 QPushButton *m_removeButton;
121 QPushButton *m_renameButton;
122 QPushButton *m_makeActiveButton;
123 QComboBox *m_buildConfigurationComboBox;
124 QMenu *m_addButtonMenu;
126 QList<BuildConfigWidget *> m_subWidgets;
127 QList<QLabel *> m_labels;
130 } // namespace Internal
131 } // namespace ProjectExplorer
133 #endif // BUILDSETTINGSPROPERTIESPAGE_H