summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/deployconfigurationmodel.h
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@nokia.com>2010-07-16 14:00:41 +0200
committerTobias Hunger <tobias.hunger@nokia.com>2010-08-02 14:21:05 +0200
commitee4a04a20b2af6d6ffb5f8b1d938d18ca21ef157 (patch)
tree5f5e905180d2f80865c7adbc46e6767fb18de408 /src/plugins/projectexplorer/deployconfigurationmodel.h
parentcc93a08b1b3605f05a61e47c0e5a4aeb5dbdf913 (diff)
downloadqt-creator-ee4a04a20b2af6d6ffb5f8b1d938d18ca21ef157.tar.gz
Refactor deployment
* Add a DeployConfiguration class to hold settings related to deployment. * Add BuildStepsList to hold a list of buildsteps * Update BuildConfiguration to use BuildStepLists instead of manageing lists of buildsteps itself. * Update BuildManager to use BuildStepLists in its interfaces * Fix fallout introduced by API changes * Update .user file to new way of storing settings Task-number: QTCREATORBUG-1427 Task-number: QTCREATORBUG-1428 Task-number: QTCREATORBUG-1811 Task-number: QTCREATORBUG-1930
Diffstat (limited to 'src/plugins/projectexplorer/deployconfigurationmodel.h')
-rw-r--r--src/plugins/projectexplorer/deployconfigurationmodel.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/deployconfigurationmodel.h b/src/plugins/projectexplorer/deployconfigurationmodel.h
new file mode 100644
index 0000000000..26f5534709
--- /dev/null
+++ b/src/plugins/projectexplorer/deployconfigurationmodel.h
@@ -0,0 +1,68 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#ifndef PROJECTEXPLORER_DEPLOYCONFIGURATIONMODEL_H
+#define PROJECTEXPLORER_DEPLOYCONFIGURATIONMODEL_H
+
+#include <QtCore/QAbstractItemModel>
+
+namespace ProjectExplorer {
+
+class Target;
+class DeployConfiguration;
+
+/*! A model to represent the run configurations of a target.
+ To be used in for the drop down of comboboxes
+ Does automatically adjust itself to added and removed RunConfigurations
+*/
+class DeployConfigurationModel : public QAbstractListModel
+{
+ Q_OBJECT
+public:
+ DeployConfigurationModel(Target *target, QObject *parent = 0);
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+
+ DeployConfiguration *deployConfigurationAt(int i);
+ DeployConfiguration *deployConfigurationFor(const QModelIndex &idx);
+ QModelIndex indexFor(DeployConfiguration *rc);
+private slots:
+ void addedDeployConfiguration(ProjectExplorer::DeployConfiguration*);
+ void removedDeployConfiguration(ProjectExplorer::DeployConfiguration*);
+ void displayNameChanged();
+private:
+ Target *m_target;
+ QList<DeployConfiguration *> m_deployConfigurations;
+};
+
+} // namespace ProjectExplorer
+
+#endif // PROJECTEXPLORER_DEPLOYCONFIGURATIONMODEL_H