1 /**************************************************************************
3 ** This file is part of Qt Creator
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
7 ** Contact: Nokia Corporation (qt-info@nokia.com)
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
16 ** GNU Lesser General Public License Usage
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.
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.
29 ** If you have questions regarding the use of this file, please contact
30 ** Nokia at qt-info@nokia.com.
32 **************************************************************************/
34 #ifndef RUNSETTINGSPROPERTIESPAGE_H
35 #define RUNSETTINGSPROPERTIESPAGE_H
37 #include "iprojectproperties.h"
39 #include <QtGui/QWidget>
40 #include <QtGui/QIcon>
48 namespace ProjectExplorer {
50 class DeployConfiguration;
51 class DeployConfigurationWidget;
52 class DeployConfigurationModel;
53 class RunConfiguration;
54 class RunConfigurationModel;
55 class RunConfigWidget;
59 const char * const RUNSETTINGS_PANEL_ID = "ProjectExplorer.RunSettingsPanel";
62 class RunSettingsPropertiesPage;
65 class RunSettingsWidget;
66 class BuildStepListWidget;
68 class RunSettingsPanelFactory : public ITargetPanelFactory
72 QString displayName() const;
73 bool supports(Target *target);
74 IPropertiesPanel *createPanel(Target *target);
77 class RunSettingsPanel : public IPropertiesPanel
80 RunSettingsPanel(Target *target);
83 QString displayName() const;
84 QWidget *widget() const;
88 RunSettingsWidget *m_widget;
92 class RunSettingsWidget : public QWidget
96 explicit RunSettingsWidget(Target *target);
100 void currentRunConfigurationChanged(int index);
101 void aboutToShowAddMenu();
102 void addRunConfiguration();
103 void removeRunConfiguration();
104 void activeRunConfigurationChanged();
105 void renameRunConfiguration();
106 void currentDeployConfigurationChanged(int index);
107 void aboutToShowDeployMenu();
108 void addDeployConfiguration();
109 void removeDeployConfiguration();
110 void activeDeployConfigurationChanged();
111 void renameDeployConfiguration();
114 QString uniqueDCName(const QString &name);
115 QString uniqueRCName(const QString &name);
116 void updateDeployConfiguration(DeployConfiguration *);
117 void setConfigurationWidget(RunConfiguration *rc);
119 void addRunControlWidgets();
120 void addSubWidget(RunConfigWidget *subWidget);
121 void removeSubWidgets();
124 RunConfigurationModel *m_runConfigurationsModel;
125 DeployConfigurationModel *m_deployConfigurationModel;
126 Ui::RunSettingsPropertiesPage *m_ui;
127 QWidget *m_runConfigurationWidget;
128 QVBoxLayout *m_runLayout;
129 DeployConfigurationWidget *m_deployConfigurationWidget;
130 QVBoxLayout *m_deployLayout;
131 BuildStepListWidget *m_deploySteps;
133 QMenu *m_addDeployMenu;
135 typedef QPair<RunConfigWidget *, QLabel *> RunConfigItem;
136 QList<RunConfigItem> m_subWidgets;
139 } // namespace Internal
140 } // namespace ProjectExplorer
142 #endif // RUNSETTINGSPROPERTIESPAGE_H