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 RUNSETTINGSPROPERTIESPAGE_H
34 #define RUNSETTINGSPROPERTIESPAGE_H
36 #include "iprojectproperties.h"
38 #include <QtGui/QWidget>
39 #include <QtGui/QIcon>
47 namespace ProjectExplorer {
49 class DeployConfiguration;
50 class DeployConfigurationWidget;
51 class DeployConfigurationModel;
52 class RunConfiguration;
53 class RunConfigurationModel;
54 class RunConfigWidget;
58 const char * const RUNSETTINGS_PANEL_ID = "ProjectExplorer.RunSettingsPanel";
61 class RunSettingsPropertiesPage;
64 class RunSettingsWidget;
65 class BuildStepListWidget;
67 class RunSettingsPanelFactory : public ITargetPanelFactory
71 QString displayName() const;
72 bool supports(Target *target);
73 IPropertiesPanel *createPanel(Target *target);
76 class RunSettingsPanel : public IPropertiesPanel
79 RunSettingsPanel(Target *target);
82 QString displayName() const;
83 QWidget *widget() const;
87 RunSettingsWidget *m_widget;
91 class RunSettingsWidget : public QWidget
95 explicit RunSettingsWidget(Target *target);
99 void currentRunConfigurationChanged(int index);
100 void aboutToShowAddMenu();
101 void addRunConfiguration();
102 void removeRunConfiguration();
103 void activeRunConfigurationChanged();
104 void renameRunConfiguration();
105 void currentDeployConfigurationChanged(int index);
106 void aboutToShowDeployMenu();
107 void addDeployConfiguration();
108 void removeDeployConfiguration();
109 void activeDeployConfigurationChanged();
110 void renameDeployConfiguration();
113 QString uniqueDCName(const QString &name);
114 QString uniqueRCName(const QString &name);
115 void updateDeployConfiguration(DeployConfiguration *);
116 void setConfigurationWidget(RunConfiguration *rc);
118 void addRunControlWidgets();
119 void addSubWidget(RunConfigWidget *subWidget);
120 void removeSubWidgets();
123 RunConfigurationModel *m_runConfigurationsModel;
124 DeployConfigurationModel *m_deployConfigurationModel;
125 Ui::RunSettingsPropertiesPage *m_ui;
126 QWidget *m_runConfigurationWidget;
127 QVBoxLayout *m_runLayout;
128 DeployConfigurationWidget *m_deployConfigurationWidget;
129 QVBoxLayout *m_deployLayout;
130 BuildStepListWidget *m_deploySteps;
132 QMenu *m_addDeployMenu;
134 typedef QPair<RunConfigWidget *, QLabel *> RunConfigItem;
135 QList<RunConfigItem> m_subWidgets;
138 } // namespace Internal
139 } // namespace ProjectExplorer
141 #endif // RUNSETTINGSPROPERTIESPAGE_H