diff options
-rw-r--r-- | src/plugins/projectexplorer/deploymentdatamodel.cpp (renamed from src/plugins/remotelinux/remotelinuxdeploymentdatamodel.cpp) | 20 | ||||
-rw-r--r-- | src/plugins/projectexplorer/deploymentdatamodel.h (renamed from src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h) | 21 | ||||
-rw-r--r-- | src/plugins/projectexplorer/deploymentdataview.cpp (renamed from src/plugins/remotelinux/remotelinuxdeployconfigurationwidget.cpp) | 39 | ||||
-rw-r--r-- | src/plugins/projectexplorer/deploymentdataview.h (renamed from src/plugins/remotelinux/remotelinuxdeployconfigurationwidget.h) | 29 | ||||
-rw-r--r-- | src/plugins/projectexplorer/deploymentdataview.ui (renamed from src/plugins/remotelinux/remotelinuxdeployconfigurationwidget.ui) | 4 | ||||
-rw-r--r-- | src/plugins/projectexplorer/projectexplorer.pro | 5 | ||||
-rw-r--r-- | src/plugins/projectexplorer/projectexplorer.qbs | 5 | ||||
-rw-r--r-- | src/plugins/remotelinux/remotelinux.pro | 5 | ||||
-rw-r--r-- | src/plugins/remotelinux/remotelinux.qbs | 5 | ||||
-rw-r--r-- | src/plugins/remotelinux/remotelinuxdeployconfiguration.cpp | 4 |
10 files changed, 64 insertions, 73 deletions
diff --git a/src/plugins/remotelinux/remotelinuxdeploymentdatamodel.cpp b/src/plugins/projectexplorer/deploymentdatamodel.cpp index 3f538e7060..1b59950dc4 100644 --- a/src/plugins/remotelinux/remotelinuxdeploymentdatamodel.cpp +++ b/src/plugins/projectexplorer/deploymentdatamodel.cpp @@ -27,35 +27,33 @@ ** ****************************************************************************/ -#include "remotelinuxdeploymentdatamodel.h" +#include "deploymentdatamodel.h" -using namespace ProjectExplorer; +namespace ProjectExplorer { -namespace RemoteLinux { - -RemoteLinuxDeploymentDataModel::RemoteLinuxDeploymentDataModel(QObject *parent) +DeploymentDataModel::DeploymentDataModel(QObject *parent) : QAbstractTableModel(parent) { } -void RemoteLinuxDeploymentDataModel::setDeploymentData(const DeploymentData &deploymentData) +void DeploymentDataModel::setDeploymentData(const DeploymentData &deploymentData) { beginResetModel(); m_deploymentData = deploymentData; endResetModel(); } -int RemoteLinuxDeploymentDataModel::rowCount(const QModelIndex &parent) const +int DeploymentDataModel::rowCount(const QModelIndex &parent) const { return parent.isValid() ? 0 : m_deploymentData.fileCount(); } -int RemoteLinuxDeploymentDataModel::columnCount(const QModelIndex &parent) const +int DeploymentDataModel::columnCount(const QModelIndex &parent) const { return parent.isValid() ? 0 : 2; } -QVariant RemoteLinuxDeploymentDataModel::headerData(int section, Qt::Orientation orientation, +QVariant DeploymentDataModel::headerData(int section, Qt::Orientation orientation, int role) const { if (orientation == Qt::Vertical || role != Qt::DisplayRole) @@ -63,7 +61,7 @@ QVariant RemoteLinuxDeploymentDataModel::headerData(int section, Qt::Orientation return section == 0 ? tr("Local File Path") : tr("Remote Directory"); } -QVariant RemoteLinuxDeploymentDataModel::data(const QModelIndex &index, int role) const +QVariant DeploymentDataModel::data(const QModelIndex &index, int role) const { if (!index.isValid() || index.row() >= rowCount() || index.column() >= columnCount()) return QVariant(); @@ -76,4 +74,4 @@ QVariant RemoteLinuxDeploymentDataModel::data(const QModelIndex &index, int role return QVariant(); } -} // namespace RemoteLinux +} // namespace ProjectExplorer diff --git a/src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h b/src/plugins/projectexplorer/deploymentdatamodel.h index d563cae913..ada4efea8e 100644 --- a/src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h +++ b/src/plugins/projectexplorer/deploymentdatamodel.h @@ -26,22 +26,23 @@ ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ****************************************************************************/ -#ifndef REMOTELINUXDEPLOYMENTDATAMODEL_H -#define REMOTELINUXDEPLOYMENTDATAMODEL_H +#ifndef DEPLOYMENTDATAMODEL_H +#define DEPLOYMENTDATAMODEL_H -#include <projectexplorer/deploymentdata.h> +#include "deploymentdata.h" +#include "projectexplorer_export.h" #include <QAbstractTableModel> -namespace RemoteLinux { +namespace ProjectExplorer { -class RemoteLinuxDeploymentDataModel : public QAbstractTableModel +class PROJECTEXPLORER_EXPORT DeploymentDataModel : public QAbstractTableModel { Q_OBJECT public: - explicit RemoteLinuxDeploymentDataModel(QObject *parent = 0); + explicit DeploymentDataModel(QObject *parent = 0); - void setDeploymentData(const ProjectExplorer::DeploymentData &deploymentData); + void setDeploymentData(const DeploymentData &deploymentData); private: int rowCount(const QModelIndex &parent = QModelIndex()) const; @@ -49,9 +50,9 @@ private: QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; - ProjectExplorer::DeploymentData m_deploymentData; + DeploymentData m_deploymentData; }; -} // namespace RemoteLinux +} // namespace ProjectExplorer -#endif // REMOTELINUXDEPLOYMENTDATAMODEL_H +#endif // Include guard diff --git a/src/plugins/remotelinux/remotelinuxdeployconfigurationwidget.cpp b/src/plugins/projectexplorer/deploymentdataview.cpp index 909978ebb9..cc249fbd90 100644 --- a/src/plugins/remotelinux/remotelinuxdeployconfigurationwidget.cpp +++ b/src/plugins/projectexplorer/deploymentdataview.cpp @@ -26,34 +26,29 @@ ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ****************************************************************************/ -#include "remotelinuxdeployconfigurationwidget.h" -#include "ui_remotelinuxdeployconfigurationwidget.h" +#include "deploymentdataview.h" +#include "ui_deploymentdataview.h" -#include "remotelinuxdeployconfiguration.h" -#include "remotelinuxdeploymentdatamodel.h" +#include "deploymentdatamodel.h" +#include "target.h" -#include <projectexplorer/target.h> - -using namespace ProjectExplorer; - -namespace RemoteLinux { +namespace ProjectExplorer { namespace Internal { -class RemoteLinuxDeployConfigurationWidgetPrivate +class DeploymentDataViewPrivate { public: - Ui::RemoteLinuxDeployConfigurationWidget ui; - RemoteLinuxDeployConfiguration *deployConfiguration; - RemoteLinuxDeploymentDataModel deploymentDataModel; + Ui::DeploymentDataView ui; + Target *target; + DeploymentDataModel deploymentDataModel; }; } // namespace Internal using namespace Internal; -RemoteLinuxDeployConfigurationWidget::RemoteLinuxDeployConfigurationWidget(RemoteLinuxDeployConfiguration *dc, - QWidget *parent) : - NamedWidget(parent), d(new RemoteLinuxDeployConfigurationWidgetPrivate) +DeploymentDataView::DeploymentDataView(Target *target, QWidget *parent) : + NamedWidget(parent), d(new DeploymentDataViewPrivate) { d->ui.setupUi(this); d->ui.deploymentDataView->setTextElideMode(Qt::ElideMiddle); @@ -61,21 +56,21 @@ RemoteLinuxDeployConfigurationWidget::RemoteLinuxDeployConfigurationWidget(Remot d->ui.deploymentDataView->setUniformRowHeights(true); d->ui.deploymentDataView->setModel(&d->deploymentDataModel); - d->deployConfiguration = dc; + d->target = target; - connect(dc->target(), SIGNAL(deploymentDataChanged()), SLOT(updateDeploymentDataModel())); + connect(target, SIGNAL(deploymentDataChanged()), SLOT(updateDeploymentDataModel())); updateDeploymentDataModel(); } -RemoteLinuxDeployConfigurationWidget::~RemoteLinuxDeployConfigurationWidget() +DeploymentDataView::~DeploymentDataView() { delete d; } -void RemoteLinuxDeployConfigurationWidget::updateDeploymentDataModel() +void DeploymentDataView::updateDeploymentDataModel() { - d->deploymentDataModel.setDeploymentData(d->deployConfiguration->target()->deploymentData()); + d->deploymentDataModel.setDeploymentData(d->target->deploymentData()); d->ui.deploymentDataView->resizeColumnToContents(0); } -} // namespace RemoteLinux +} // namespace ProjectExplorer diff --git a/src/plugins/remotelinux/remotelinuxdeployconfigurationwidget.h b/src/plugins/projectexplorer/deploymentdataview.h index d6853c8396..3cff8d709b 100644 --- a/src/plugins/remotelinux/remotelinuxdeployconfigurationwidget.h +++ b/src/plugins/projectexplorer/deploymentdataview.h @@ -26,35 +26,32 @@ ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ****************************************************************************/ -#ifndef REMOTELINUXDEPLOYCONFIGURATIONWIDGET_H -#define REMOTELINUXDEPLOYCONFIGURATIONWIDGET_H +#ifndef DEPLOYMENTDATAVIEW_H +#define DEPLOYMENTDATAVIEW_H -#include "remotelinux_export.h" +#include "namedwidget.h" +#include "projectexplorer_export.h" -#include <projectexplorer/namedwidget.h> +namespace ProjectExplorer { +class Target; -namespace RemoteLinux { -class RemoteLinuxDeployConfiguration; +namespace Internal { class DeploymentDataViewPrivate; } -namespace Internal { class RemoteLinuxDeployConfigurationWidgetPrivate; } - -class REMOTELINUX_EXPORT RemoteLinuxDeployConfigurationWidget - : public ProjectExplorer::NamedWidget +class PROJECTEXPLORER_EXPORT DeploymentDataView : public NamedWidget { Q_OBJECT public: - explicit RemoteLinuxDeployConfigurationWidget(RemoteLinux::RemoteLinuxDeployConfiguration *dc, - QWidget *parent = 0); - ~RemoteLinuxDeployConfigurationWidget(); + explicit DeploymentDataView(Target *target, QWidget *parent = 0); + ~DeploymentDataView(); private slots: void updateDeploymentDataModel(); private: - Internal::RemoteLinuxDeployConfigurationWidgetPrivate * const d; + Internal::DeploymentDataViewPrivate * const d; }; -} // namespace RemoteLinux +} // namespace ProjectExplorer -#endif // REMOTELINUXDEPLOYCONFIGURATIONWIDGET_H +#endif // Include guard diff --git a/src/plugins/remotelinux/remotelinuxdeployconfigurationwidget.ui b/src/plugins/projectexplorer/deploymentdataview.ui index fb765741e9..ea1bca0994 100644 --- a/src/plugins/remotelinux/remotelinuxdeployconfigurationwidget.ui +++ b/src/plugins/projectexplorer/deploymentdataview.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>RemoteLinux::Internal::RemoteLinuxDeployConfigurationWidget</class> - <widget class="QWidget" name="RemoteLinux::Internal::RemoteLinuxDeployConfigurationWidget"> + <class>ProjectExplorer::DeploymentDataView</class> + <widget class="QWidget" name="ProjectExplorer::DeploymentDataView"> <property name="geometry"> <rect> <x>0</x> diff --git a/src/plugins/projectexplorer/projectexplorer.pro b/src/plugins/projectexplorer/projectexplorer.pro index 94e6d80b50..02a2d121f7 100644 --- a/src/plugins/projectexplorer/projectexplorer.pro +++ b/src/plugins/projectexplorer/projectexplorer.pro @@ -137,6 +137,8 @@ HEADERS += projectexplorer.h \ devicesupport/desktopdeviceconfigurationwidget.h \ devicesupport/desktopprocesssignaloperation.h \ deploymentdata.h \ + deploymentdatamodel.h \ + deploymentdataview.h \ buildtargetinfo.h \ customtoolchain.h \ projectmacroexpander.h \ @@ -268,6 +270,8 @@ SOURCES += projectexplorer.cpp \ devicesupport/desktopdeviceconfigurationwidget.cpp \ devicesupport/desktopprocesssignaloperation.cpp \ deployablefile.cpp \ + deploymentdatamodel.cpp \ + deploymentdataview.cpp \ customtoolchain.cpp \ projectmacroexpander.cpp \ customparser.cpp \ @@ -282,6 +286,7 @@ FORMS += processstep.ui \ projectexplorersettingspage.ui \ targetsettingswidget.ui \ doubletabwidget.ui \ + deploymentdataview.ui \ codestylesettingspropertiespage.ui \ devicesupport/devicefactoryselectiondialog.ui \ devicesupport/devicesettingswidget.ui \ diff --git a/src/plugins/projectexplorer/projectexplorer.qbs b/src/plugins/projectexplorer/projectexplorer.qbs index 9ecac8b701..3aa50bea78 100644 --- a/src/plugins/projectexplorer/projectexplorer.qbs +++ b/src/plugins/projectexplorer/projectexplorer.qbs @@ -60,6 +60,11 @@ QtcPlugin { "deployconfiguration.cpp", "deployconfiguration.h", "deployconfigurationmodel.cpp", "deployconfigurationmodel.h", "deploymentdata.h", + "deploymentdataview.cpp", + "deploymentdataview.h", + "deploymentdataview.ui", + "deploymentdatamodel.cpp", + "deploymentdatamodel.h", "doubletabwidget.cpp", "doubletabwidget.h", "doubletabwidget.ui", "editorconfiguration.cpp", "editorconfiguration.h", "editorsettingspropertiespage.cpp", "editorsettingspropertiespage.h", "editorsettingspropertiespage.ui", diff --git a/src/plugins/remotelinux/remotelinux.pro b/src/plugins/remotelinux/remotelinux.pro index b6d76fc30f..2840dbfa87 100644 --- a/src/plugins/remotelinux/remotelinux.pro +++ b/src/plugins/remotelinux/remotelinux.pro @@ -39,13 +39,11 @@ HEADERS += \ sshkeydeployer.h \ typespecificdeviceconfigurationlistmodel.h \ remotelinuxutils.h \ - remotelinuxdeployconfigurationwidget.h \ remotelinuxcustomcommanddeployservice.h \ remotelinuxcustomcommanddeploymentstep.h \ genericlinuxdeviceconfigurationwidget.h \ remotelinuxcheckforfreediskspaceservice.h \ remotelinuxcheckforfreediskspacestep.h \ - remotelinuxdeploymentdatamodel.h \ remotelinuxanalyzesupport.h \ abstractremotelinuxrunsupport.h \ linuxdeviceprocess.h \ @@ -86,13 +84,11 @@ SOURCES += \ sshkeydeployer.cpp \ typespecificdeviceconfigurationlistmodel.cpp \ remotelinuxutils.cpp \ - remotelinuxdeployconfigurationwidget.cpp \ remotelinuxcustomcommanddeployservice.cpp \ remotelinuxcustomcommanddeploymentstep.cpp \ genericlinuxdeviceconfigurationwidget.cpp \ remotelinuxcheckforfreediskspaceservice.cpp \ remotelinuxcheckforfreediskspacestep.cpp \ - remotelinuxdeploymentdatamodel.cpp \ remotelinuxanalyzesupport.cpp \ abstractremotelinuxrunsupport.cpp \ linuxdeviceprocess.cpp \ @@ -100,7 +96,6 @@ SOURCES += \ FORMS += \ genericlinuxdeviceconfigurationwizardsetuppage.ui \ - remotelinuxdeployconfigurationwidget.ui \ genericlinuxdeviceconfigurationwidget.ui \ remotelinuxcheckforfreediskspacestepwidget.ui diff --git a/src/plugins/remotelinux/remotelinux.qbs b/src/plugins/remotelinux/remotelinux.qbs index 650303046d..48d2281544 100644 --- a/src/plugins/remotelinux/remotelinux.qbs +++ b/src/plugins/remotelinux/remotelinux.qbs @@ -77,11 +77,6 @@ QtcPlugin { "remotelinuxdeployconfiguration.h", "remotelinuxdeployconfigurationfactory.cpp", "remotelinuxdeployconfigurationfactory.h", - "remotelinuxdeployconfigurationwidget.cpp", - "remotelinuxdeployconfigurationwidget.h", - "remotelinuxdeployconfigurationwidget.ui", - "remotelinuxdeploymentdatamodel.cpp", - "remotelinuxdeploymentdatamodel.h", "remotelinuxenvironmentaspect.cpp", "remotelinuxenvironmentaspect.h", "remotelinuxenvironmentaspectwidget.cpp", diff --git a/src/plugins/remotelinux/remotelinuxdeployconfiguration.cpp b/src/plugins/remotelinux/remotelinuxdeployconfiguration.cpp index 2a8ba1a3c6..437fb8252f 100644 --- a/src/plugins/remotelinux/remotelinuxdeployconfiguration.cpp +++ b/src/plugins/remotelinux/remotelinuxdeployconfiguration.cpp @@ -28,7 +28,7 @@ ****************************************************************************/ #include "remotelinuxdeployconfiguration.h" -#include "remotelinuxdeployconfigurationwidget.h" +#include <projectexplorer/deploymentdataview.h> using namespace ProjectExplorer; @@ -50,7 +50,7 @@ RemoteLinuxDeployConfiguration::RemoteLinuxDeployConfiguration(ProjectExplorer:: NamedWidget *RemoteLinuxDeployConfiguration::createConfigWidget() { - return new RemoteLinuxDeployConfigurationWidget(this); + return new DeploymentDataView(target()); } } // namespace RemoteLinux |