2010-07-12 11:07:36 +02:00
|
|
|
#include "maemodeploystepwidget.h"
|
|
|
|
|
#include "ui_maemodeploystepwidget.h"
|
|
|
|
|
|
2010-07-13 15:24:21 +02:00
|
|
|
#include "maemodeploystep.h"
|
2010-07-14 12:21:35 +02:00
|
|
|
#include "maemodeployablelistmodel.h"
|
|
|
|
|
#include "maemodeployablelistwidget.h"
|
|
|
|
|
#include "maemodeployables.h"
|
2010-07-13 15:24:21 +02:00
|
|
|
#include "maemorunconfiguration.h"
|
|
|
|
|
|
|
|
|
|
#include <projectexplorer/buildconfiguration.h>
|
|
|
|
|
#include <projectexplorer/target.h>
|
|
|
|
|
|
2010-07-12 11:07:36 +02:00
|
|
|
namespace Qt4ProjectManager {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2010-07-13 15:24:21 +02:00
|
|
|
MaemoDeployStepWidget::MaemoDeployStepWidget(MaemoDeployStep *step) :
|
2010-07-12 11:07:36 +02:00
|
|
|
ProjectExplorer::BuildStepConfigWidget(),
|
2010-07-13 15:24:21 +02:00
|
|
|
ui(new Ui::MaemoDeployStepWidget),
|
|
|
|
|
m_step(step)
|
2010-07-12 11:07:36 +02:00
|
|
|
{
|
|
|
|
|
ui->setupUi(this);
|
2010-07-14 12:21:35 +02:00
|
|
|
|
|
|
|
|
connect(m_step->deployables(), SIGNAL(modelsCreated()), this,
|
|
|
|
|
SLOT(handleModelsCreated()));
|
|
|
|
|
handleModelsCreated();
|
2010-07-12 11:07:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MaemoDeployStepWidget::~MaemoDeployStepWidget()
|
|
|
|
|
{
|
|
|
|
|
delete ui;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MaemoDeployStepWidget::init()
|
|
|
|
|
{
|
2010-07-13 15:24:21 +02:00
|
|
|
const ProjectExplorer::RunConfiguration * const rc =
|
|
|
|
|
m_step->buildConfiguration()->target()->activeRunConfiguration();
|
|
|
|
|
if (rc) {
|
|
|
|
|
connect(qobject_cast<const MaemoRunConfiguration *>(rc),
|
|
|
|
|
SIGNAL(deviceConfigurationChanged(ProjectExplorer::Target *)),
|
|
|
|
|
this, SLOT(handleDeviceUpdate()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MaemoDeployStepWidget::handleDeviceUpdate()
|
|
|
|
|
{
|
|
|
|
|
emit updateSummary();
|
2010-07-12 11:07:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString MaemoDeployStepWidget::summaryText() const
|
|
|
|
|
{
|
2010-07-13 15:24:21 +02:00
|
|
|
return tr("<b>Deploy to device</b>: ") + m_step->deviceConfig().name;
|
2010-07-12 11:07:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString MaemoDeployStepWidget::displayName() const
|
|
|
|
|
{
|
|
|
|
|
return QString();
|
|
|
|
|
}
|
|
|
|
|
|
2010-07-14 12:21:35 +02:00
|
|
|
|
|
|
|
|
void MaemoDeployStepWidget::handleModelsCreated()
|
|
|
|
|
{
|
|
|
|
|
ui->tabWidget->clear();
|
|
|
|
|
for (int i = 0; i < m_step->deployables()->modelCount(); ++i) {
|
|
|
|
|
MaemoDeployableListModel * const model
|
|
|
|
|
= m_step->deployables()->modelAt(i);
|
|
|
|
|
ui->tabWidget->addTab(new MaemoDeployableListWidget(this, model),
|
|
|
|
|
model->projectName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-07-12 11:07:36 +02:00
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Qt4ProjectManager
|