forked from qt-creator/qt-creator
Maemo: Add link from projects page to options page.
This makes finding the device configuration dialog much easier for newbies (and saves clicks for everybody). Reviewed-by: kh1
This commit is contained in:
@@ -74,6 +74,8 @@ public:
|
|||||||
|
|
||||||
void setQemuSimulatorStarterEnabled(bool state);
|
void setQemuSimulatorStarterEnabled(bool state);
|
||||||
|
|
||||||
|
MaemoSettingsPage *settingsPage() const { return m_settingsPage; }
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void triggered();
|
void triggered();
|
||||||
void updateQemuSimulatorStarter(bool running);
|
void updateQemuSimulatorStarter(bool running);
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
#include "maemodeviceconfigurations.h"
|
#include "maemodeviceconfigurations.h"
|
||||||
#include "maemomanager.h"
|
#include "maemomanager.h"
|
||||||
|
#include "maemosettingspage.h"
|
||||||
#include "maemotoolchain.h"
|
#include "maemotoolchain.h"
|
||||||
#include "profilereader.h"
|
#include "profilereader.h"
|
||||||
#include "qt4project.h"
|
#include "qt4project.h"
|
||||||
@@ -81,6 +82,7 @@ private slots:
|
|||||||
void argumentsEdited(const QString &args);
|
void argumentsEdited(const QString &args);
|
||||||
void deviceConfigurationChanged(const QString &name);
|
void deviceConfigurationChanged(const QString &name);
|
||||||
void resetDeviceConfigurations();
|
void resetDeviceConfigurations();
|
||||||
|
void showSettingsDialog();
|
||||||
|
|
||||||
void updateSimulatorPath();
|
void updateSimulatorPath();
|
||||||
void updateTargetInformation();
|
void updateTargetInformation();
|
||||||
@@ -752,9 +754,15 @@ MaemoRunConfigurationWidget::MaemoRunConfigurationWidget(
|
|||||||
mainLayout->setFormAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
mainLayout->setFormAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
||||||
m_configNameLineEdit = new QLineEdit(m_runConfiguration->name());
|
m_configNameLineEdit = new QLineEdit(m_runConfiguration->name());
|
||||||
mainLayout->addRow(tr("Run configuration name:"), m_configNameLineEdit);
|
mainLayout->addRow(tr("Run configuration name:"), m_configNameLineEdit);
|
||||||
|
QWidget *devConfWidget = new QWidget;
|
||||||
|
QHBoxLayout *devConfLayout = new QHBoxLayout(devConfWidget);
|
||||||
m_devConfBox = new QComboBox;
|
m_devConfBox = new QComboBox;
|
||||||
m_devConfBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);
|
m_devConfBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);
|
||||||
mainLayout->addRow(new QLabel(tr("Device Configuration:")), m_devConfBox);
|
devConfLayout->addWidget(m_devConfBox);
|
||||||
|
QLabel *addDevConfLabel
|
||||||
|
= new QLabel(tr("<a href=\"#\">Manage device configurations</a>"));
|
||||||
|
devConfLayout->addWidget(addDevConfLabel);
|
||||||
|
mainLayout->addRow(new QLabel(tr("Device Configuration:")), devConfWidget);
|
||||||
m_executableLabel = new QLabel(m_runConfiguration->executable());
|
m_executableLabel = new QLabel(m_runConfiguration->executable());
|
||||||
mainLayout->addRow(tr("Executable:"), m_executableLabel);
|
mainLayout->addRow(tr("Executable:"), m_executableLabel);
|
||||||
m_argsLineEdit = new QLineEdit(m_runConfiguration->arguments().join(" "));
|
m_argsLineEdit = new QLineEdit(m_runConfiguration->arguments().join(" "));
|
||||||
@@ -780,6 +788,8 @@ MaemoRunConfigurationWidget::MaemoRunConfigurationWidget(
|
|||||||
SLOT(deviceConfigurationChanged(QString)));
|
SLOT(deviceConfigurationChanged(QString)));
|
||||||
connect(m_runConfiguration, SIGNAL(targetInformationChanged()), this,
|
connect(m_runConfiguration, SIGNAL(targetInformationChanged()), this,
|
||||||
SLOT(updateTargetInformation()));
|
SLOT(updateTargetInformation()));
|
||||||
|
connect(addDevConfLabel, SIGNAL(linkActivated(QString)), this,
|
||||||
|
SLOT(showSettingsDialog()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaemoRunConfigurationWidget::configNameEdited(const QString &text)
|
void MaemoRunConfigurationWidget::configNameEdited(const QString &text)
|
||||||
@@ -833,6 +843,13 @@ void MaemoRunConfigurationWidget::resetDeviceConfigurations()
|
|||||||
setSimInfoVisible(devConf);
|
setSimInfoVisible(devConf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MaemoRunConfigurationWidget::showSettingsDialog()
|
||||||
|
{
|
||||||
|
MaemoSettingsPage *settingsPage = MaemoManager::instance()->settingsPage();
|
||||||
|
Core::ICore::instance()->showOptionsDialog(settingsPage->category(),
|
||||||
|
settingsPage->id());
|
||||||
|
}
|
||||||
|
|
||||||
// #pragma mark -- MaemoRunConfigurationFactory
|
// #pragma mark -- MaemoRunConfigurationFactory
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user