forked from qt-creator/qt-creator
Maemo: Add Qemu settings page.
Put it in new top-level "Maemo" category, along with the Maemo device configurations. Reviewed-by: kh1
This commit is contained in:
@@ -66,6 +66,13 @@ static const QLatin1String UserEnvironmentChangesKey(PREFIX ".UserEnvironmentCha
|
||||
static const QLatin1String UseRemoteGdbKey(PREFIX ".UseRemoteGdb");
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
namespace Constants {
|
||||
const char * const MAEMO_SETTINGS_CATEGORY = "X.Maemo";
|
||||
const char * const MAEMO_SETTINGS_TR_CATEGORY = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Maemo");
|
||||
const char * const MAEMO_SETTINGS_CATEGORY_ICON = ":/projectexplorer/images/MaemoDevice.png";
|
||||
}
|
||||
|
||||
} // namespace Qt4ProjectManager
|
||||
|
||||
#endif // MAEMOCONSTANTS_H
|
||||
|
||||
@@ -211,7 +211,7 @@ const MaemoPackageCreationStep *MaemoDeployStep::packagingStep() const
|
||||
void MaemoDeployStep::raiseError(const QString &errorString)
|
||||
{
|
||||
emit addTask(Task(Task::Error, errorString, QString(), -1,
|
||||
Constants::TASK_CATEGORY_BUILDSYSTEM));
|
||||
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
|
||||
emit error();
|
||||
}
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "maemosettingswidget.h"
|
||||
#include "maemodeviceconfigurationssettingswidget.h"
|
||||
|
||||
#include "ui_maemosettingswidget.h"
|
||||
#include "ui_maemodeviceconfigurationssettingswidget.h"
|
||||
|
||||
#include "maemoconfigtestdialog.h"
|
||||
#include "maemodeviceconfigurations.h"
|
||||
@@ -102,9 +102,9 @@ private:
|
||||
};
|
||||
|
||||
|
||||
MaemoSettingsWidget::MaemoSettingsWidget(QWidget *parent)
|
||||
MaemoDeviceConfigurationsSettingsWidget::MaemoDeviceConfigurationsSettingsWidget(QWidget *parent)
|
||||
: QWidget(parent),
|
||||
m_ui(new Ui_MaemoSettingsWidget),
|
||||
m_ui(new Ui_MaemoDeviceConfigurationsSettingsWidget),
|
||||
m_devConfs(MaemoDeviceConfigurations::instance().devConfigs()),
|
||||
m_nameValidator(new NameValidator(m_devConfs)),
|
||||
m_saveSettingsRequested(false)
|
||||
@@ -112,7 +112,7 @@ MaemoSettingsWidget::MaemoSettingsWidget(QWidget *parent)
|
||||
initGui();
|
||||
}
|
||||
|
||||
MaemoSettingsWidget::~MaemoSettingsWidget()
|
||||
MaemoDeviceConfigurationsSettingsWidget::~MaemoDeviceConfigurationsSettingsWidget()
|
||||
{
|
||||
if (m_saveSettingsRequested) {
|
||||
Core::ICore::instance()->settings()->setValue(LastDeviceConfigIndexKey,
|
||||
@@ -122,7 +122,7 @@ MaemoSettingsWidget::~MaemoSettingsWidget()
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
QString MaemoSettingsWidget::searchKeywords() const
|
||||
QString MaemoDeviceConfigurationsSettingsWidget::searchKeywords() const
|
||||
{
|
||||
QString rc;
|
||||
QTextStream(&rc) << m_ui->configurationLabel->text()
|
||||
@@ -149,7 +149,7 @@ QString MaemoSettingsWidget::searchKeywords() const
|
||||
return rc;
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::initGui()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::initGui()
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_ui->nameLineEdit->setValidator(m_nameValidator);
|
||||
@@ -168,7 +168,7 @@ void MaemoSettingsWidget::initGui()
|
||||
currentConfigChanged(m_ui->configurationComboBox->currentIndex());
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::addConfig()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::addConfig()
|
||||
{
|
||||
const QString prefix = tr("New Device Configuration %1", "Standard "
|
||||
"Configuration name with number");
|
||||
@@ -187,7 +187,7 @@ void MaemoSettingsWidget::addConfig()
|
||||
m_ui->configurationComboBox->setFocus();
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::deleteConfig()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::deleteConfig()
|
||||
{
|
||||
const int selectedItem = m_ui->configurationComboBox->currentIndex();
|
||||
m_devConfs.removeAt(selectedItem);
|
||||
@@ -195,7 +195,7 @@ void MaemoSettingsWidget::deleteConfig()
|
||||
Q_ASSERT(m_ui->configurationComboBox->count() == m_devConfs.count());
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::display(const MaemoDeviceConfig &devConfig)
|
||||
void MaemoDeviceConfigurationsSettingsWidget::display(const MaemoDeviceConfig &devConfig)
|
||||
{
|
||||
MaemoDeviceConfig *otherConfig;
|
||||
if (devConfig.type == MaemoDeviceConfig::Physical) {
|
||||
@@ -227,7 +227,7 @@ void MaemoSettingsWidget::display(const MaemoDeviceConfig &devConfig)
|
||||
fillInValues();
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::fillInValues()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::fillInValues()
|
||||
{
|
||||
m_ui->nameLineEdit->setText(currentConfig().name);
|
||||
m_ui->hostLineEdit->setText(currentConfig().server.host);
|
||||
@@ -245,13 +245,13 @@ void MaemoSettingsWidget::fillInValues()
|
||||
m_ui->sshPortSpinBox->setReadOnly(isSimulator);
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::saveSettings()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::saveSettings()
|
||||
{
|
||||
// We must defer this step because of a stupid bug on MacOS. See QTCREATORBUG-1675.
|
||||
m_saveSettingsRequested = true;
|
||||
}
|
||||
|
||||
MaemoDeviceConfig &MaemoSettingsWidget::currentConfig()
|
||||
MaemoDeviceConfig &MaemoDeviceConfigurationsSettingsWidget::currentConfig()
|
||||
{
|
||||
Q_ASSERT(m_ui->configurationComboBox->count() == m_devConfs.count());
|
||||
const int currenIndex = m_ui->configurationComboBox->currentIndex();
|
||||
@@ -260,7 +260,7 @@ MaemoDeviceConfig &MaemoSettingsWidget::currentConfig()
|
||||
return m_devConfs[currenIndex];
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::configNameEditingFinished()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::configNameEditingFinished()
|
||||
{
|
||||
if (m_ui->configurationComboBox->count() == 0)
|
||||
return;
|
||||
@@ -272,7 +272,7 @@ void MaemoSettingsWidget::configNameEditingFinished()
|
||||
m_nameValidator->setDisplayName(newName);
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::deviceTypeChanged()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::deviceTypeChanged()
|
||||
{
|
||||
const QString name = currentConfig().name;
|
||||
const MaemoDeviceConfig::DeviceType devType =
|
||||
@@ -291,7 +291,7 @@ void MaemoSettingsWidget::deviceTypeChanged()
|
||||
fillInValues();
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::authenticationTypeChanged()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::authenticationTypeChanged()
|
||||
{
|
||||
const bool usePassword = m_ui->passwordButton->isChecked();
|
||||
currentConfig().server.authType
|
||||
@@ -302,73 +302,73 @@ void MaemoSettingsWidget::authenticationTypeChanged()
|
||||
m_ui->keyLabel->setEnabled(!usePassword);
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::hostNameEditingFinished()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::hostNameEditingFinished()
|
||||
{
|
||||
currentConfig().server.host = m_ui->hostLineEdit->text();
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::sshPortEditingFinished()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::sshPortEditingFinished()
|
||||
{
|
||||
currentConfig().server.port = m_ui->sshPortSpinBox->value();
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::handleFreePortsChanged()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::handleFreePortsChanged()
|
||||
{
|
||||
currentConfig().portsSpec = m_ui->portsLineEdit->text();
|
||||
updatePortsWarningLabel();
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::timeoutEditingFinished()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::timeoutEditingFinished()
|
||||
{
|
||||
currentConfig().server.timeout = m_ui->timeoutSpinBox->value();
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::userNameEditingFinished()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::userNameEditingFinished()
|
||||
{
|
||||
currentConfig().server.uname = m_ui->userLineEdit->text();
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::passwordEditingFinished()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::passwordEditingFinished()
|
||||
{
|
||||
currentConfig().server.pwd = m_ui->pwdLineEdit->text();
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::keyFileEditingFinished()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::keyFileEditingFinished()
|
||||
{
|
||||
currentConfig().server.privateKeyFile = m_ui->keyFileLineEdit->path();
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::showPassword(bool showClearText)
|
||||
void MaemoDeviceConfigurationsSettingsWidget::showPassword(bool showClearText)
|
||||
{
|
||||
m_ui->pwdLineEdit->setEchoMode(showClearText
|
||||
? QLineEdit::Normal : QLineEdit::Password);
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::testConfig()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::testConfig()
|
||||
{
|
||||
QDialog *dialog = new MaemoConfigTestDialog(currentConfig(), this);
|
||||
dialog->open();
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::showGenerateSshKeyDialog()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::showGenerateSshKeyDialog()
|
||||
{
|
||||
MaemoSshConfigDialog dialog(this);
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::showRemoteProcesses()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::showRemoteProcesses()
|
||||
{
|
||||
MaemoRemoteProcessesDialog dlg(currentConfig().server, this);
|
||||
dlg.exec();
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::setPrivateKey(const QString &path)
|
||||
void MaemoDeviceConfigurationsSettingsWidget::setPrivateKey(const QString &path)
|
||||
{
|
||||
m_ui->keyFileLineEdit->setPath(path);
|
||||
keyFileEditingFinished();
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::deployKey()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::deployKey()
|
||||
{
|
||||
if (m_keyDeployer)
|
||||
return;
|
||||
@@ -408,7 +408,7 @@ void MaemoSettingsWidget::deployKey()
|
||||
m_keyDeployer->run(command);
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::handleConnectionFailure()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::handleConnectionFailure()
|
||||
{
|
||||
if (!m_keyDeployer)
|
||||
return;
|
||||
@@ -419,7 +419,7 @@ void MaemoSettingsWidget::handleConnectionFailure()
|
||||
stopDeploying();
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::handleKeyUploadFinished(int exitStatus)
|
||||
void MaemoDeviceConfigurationsSettingsWidget::handleKeyUploadFinished(int exitStatus)
|
||||
{
|
||||
Q_ASSERT(exitStatus == SshRemoteProcess::FailedToStart
|
||||
|| exitStatus == SshRemoteProcess::KilledBySignal
|
||||
@@ -440,7 +440,7 @@ void MaemoSettingsWidget::handleKeyUploadFinished(int exitStatus)
|
||||
stopDeploying();
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::stopDeploying()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::stopDeploying()
|
||||
{
|
||||
if (m_keyDeployer) {
|
||||
disconnect(m_keyDeployer.data(), 0, this, 0);
|
||||
@@ -451,7 +451,7 @@ void MaemoSettingsWidget::stopDeploying()
|
||||
connect(m_ui->deployKeyButton, SIGNAL(clicked()), this, SLOT(deployKey()));
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::currentConfigChanged(int index)
|
||||
void MaemoDeviceConfigurationsSettingsWidget::currentConfigChanged(int index)
|
||||
{
|
||||
stopDeploying();
|
||||
if (index == -1) {
|
||||
@@ -471,7 +471,7 @@ void MaemoSettingsWidget::currentConfigChanged(int index)
|
||||
}
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::clearDetails()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::clearDetails()
|
||||
{
|
||||
m_ui->hostLineEdit->clear();
|
||||
m_ui->sshPortSpinBox->clear();
|
||||
@@ -482,7 +482,7 @@ void MaemoSettingsWidget::clearDetails()
|
||||
m_ui->portsWarningLabel->clear();
|
||||
}
|
||||
|
||||
void MaemoSettingsWidget::updatePortsWarningLabel()
|
||||
void MaemoDeviceConfigurationsSettingsWidget::updatePortsWarningLabel()
|
||||
{
|
||||
if (currentConfig().freePorts().hasMore()) {
|
||||
m_ui->portsWarningLabel->clear();
|
||||
@@ -32,8 +32,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef MAEMOSETTINGSWIDGET_H
|
||||
#define MAEMOSETTINGSWIDGET_H
|
||||
#ifndef MAEMODEVICECONFIGURATIONSSETTINGSWIDGET_H
|
||||
#define MAEMODEVICECONFIGURATIONSSETTINGSWIDGET_H
|
||||
|
||||
#include "maemodeviceconfigurations.h"
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QLineEdit;
|
||||
|
||||
class Ui_MaemoSettingsWidget;
|
||||
class Ui_MaemoDeviceConfigurationsSettingsWidget;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Core {
|
||||
@@ -57,12 +57,12 @@ namespace Internal {
|
||||
|
||||
class NameValidator;
|
||||
|
||||
class MaemoSettingsWidget : public QWidget
|
||||
class MaemoDeviceConfigurationsSettingsWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MaemoSettingsWidget(QWidget *parent);
|
||||
~MaemoSettingsWidget();
|
||||
MaemoDeviceConfigurationsSettingsWidget(QWidget *parent);
|
||||
~MaemoDeviceConfigurationsSettingsWidget();
|
||||
|
||||
void saveSettings();
|
||||
QString searchKeywords() const;
|
||||
@@ -105,7 +105,7 @@ private:
|
||||
void fillInValues();
|
||||
void updatePortsWarningLabel();
|
||||
|
||||
Ui_MaemoSettingsWidget *m_ui;
|
||||
Ui_MaemoDeviceConfigurationsSettingsWidget *m_ui;
|
||||
QList<MaemoDeviceConfig> m_devConfs;
|
||||
MaemoDeviceConfig m_lastConfigHW;
|
||||
MaemoDeviceConfig m_lastConfigSim;
|
||||
@@ -117,4 +117,4 @@ private:
|
||||
} // namespace Internal
|
||||
} // namespace Qt4ProjectManager
|
||||
|
||||
#endif // MAEMOSETTINGSWIDGET_H
|
||||
#endif // MAEMODEVICECONFIGURATIONSSETTINGSWIDGET_H
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MaemoSettingsWidget</class>
|
||||
<widget class="QWidget" name="MaemoSettingsWidget">
|
||||
<class>MaemoDeviceConfigurationsSettingsWidget</class>
|
||||
<widget class="QWidget" name="MaemoDeviceConfigurationsSettingsWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@@ -409,7 +409,7 @@
|
||||
<connection>
|
||||
<sender>deviceButton</sender>
|
||||
<signal>clicked(bool)</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>deviceTypeChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -425,7 +425,7 @@
|
||||
<connection>
|
||||
<sender>hostLineEdit</sender>
|
||||
<signal>editingFinished()</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>hostNameEditingFinished()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -441,7 +441,7 @@
|
||||
<connection>
|
||||
<sender>userLineEdit</sender>
|
||||
<signal>editingFinished()</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>userNameEditingFinished()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -457,7 +457,7 @@
|
||||
<connection>
|
||||
<sender>pwdLineEdit</sender>
|
||||
<signal>editingFinished()</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>passwordEditingFinished()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -473,7 +473,7 @@
|
||||
<connection>
|
||||
<sender>simulatorButton</sender>
|
||||
<signal>clicked(bool)</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>deviceTypeChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -489,7 +489,7 @@
|
||||
<connection>
|
||||
<sender>addConfigButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>addConfig()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -505,7 +505,7 @@
|
||||
<connection>
|
||||
<sender>removeConfigButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>deleteConfig()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -521,7 +521,7 @@
|
||||
<connection>
|
||||
<sender>passwordButton</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>authenticationTypeChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -537,7 +537,7 @@
|
||||
<connection>
|
||||
<sender>keyFileLineEdit</sender>
|
||||
<signal>editingFinished()</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>keyFileEditingFinished()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -553,7 +553,7 @@
|
||||
<connection>
|
||||
<sender>keyFileLineEdit</sender>
|
||||
<signal>browsingFinished()</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>keyFileEditingFinished()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -569,7 +569,7 @@
|
||||
<connection>
|
||||
<sender>testConfigButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>testConfig()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -585,7 +585,7 @@
|
||||
<connection>
|
||||
<sender>deployKeyButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>deployKey()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -601,7 +601,7 @@
|
||||
<connection>
|
||||
<sender>keyButton</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>authenticationTypeChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -617,7 +617,7 @@
|
||||
<connection>
|
||||
<sender>nameLineEdit</sender>
|
||||
<signal>editingFinished()</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>configNameEditingFinished()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -633,7 +633,7 @@
|
||||
<connection>
|
||||
<sender>generateKeyButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>showGenerateSshKeyDialog()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -649,7 +649,7 @@
|
||||
<connection>
|
||||
<sender>timeoutSpinBox</sender>
|
||||
<signal>editingFinished()</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>timeoutEditingFinished()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -665,7 +665,7 @@
|
||||
<connection>
|
||||
<sender>timeoutSpinBox</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>timeoutEditingFinished()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -681,7 +681,7 @@
|
||||
<connection>
|
||||
<sender>sshPortSpinBox</sender>
|
||||
<signal>editingFinished()</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>sshPortEditingFinished()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -697,7 +697,7 @@
|
||||
<connection>
|
||||
<sender>sshPortSpinBox</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>sshPortEditingFinished()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -713,7 +713,7 @@
|
||||
<connection>
|
||||
<sender>showPasswordCheckBox</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>showPassword(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -729,7 +729,7 @@
|
||||
<connection>
|
||||
<sender>portsLineEdit</sender>
|
||||
<signal>editingFinished()</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>handleFreePortsChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -745,7 +745,7 @@
|
||||
<connection>
|
||||
<sender>remoteProcessesButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>MaemoSettingsWidget</receiver>
|
||||
<receiver>MaemoDeviceConfigurationsSettingsWidget</receiver>
|
||||
<slot>showRemoteProcesses()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "maemopublishingwizardfactories.h"
|
||||
#include "maemoqemumanager.h"
|
||||
#include "maemorunfactories.h"
|
||||
#include "maemosettingspage.h"
|
||||
#include "maemosettingspages.h"
|
||||
#include "maemotemplatesmanager.h"
|
||||
#include "maemotoolchain.h"
|
||||
|
||||
@@ -62,7 +62,8 @@ MaemoManager::MaemoManager()
|
||||
, m_runConfigurationFactory(new MaemoRunConfigurationFactory(this))
|
||||
, m_packageCreationFactory(new MaemoPackageCreationFactory(this))
|
||||
, m_deployStepFactory(new MaemoDeployStepFactory(this))
|
||||
, m_settingsPage(new MaemoSettingsPage(this))
|
||||
, m_deviceConfigurationsSettingsPage(new MaemoDeviceConfigurationsSettingsPage(this))
|
||||
, m_qemuSettingsPage(new MaemoQemuSettingsPage(this))
|
||||
, m_publishingFactoryFremantleFree(new MaemoPublishingWizardFactoryFremantleFree(this))
|
||||
{
|
||||
Q_ASSERT(!m_instance);
|
||||
@@ -77,18 +78,21 @@ MaemoManager::MaemoManager()
|
||||
pluginManager->addObject(m_runConfigurationFactory);
|
||||
pluginManager->addObject(m_packageCreationFactory);
|
||||
pluginManager->addObject(m_deployStepFactory);
|
||||
pluginManager->addObject(m_settingsPage);
|
||||
pluginManager->addObject(m_deviceConfigurationsSettingsPage);
|
||||
pluginManager->addObject(m_qemuSettingsPage);
|
||||
pluginManager->addObject(m_publishingFactoryFremantleFree);
|
||||
}
|
||||
|
||||
MaemoManager::~MaemoManager()
|
||||
{
|
||||
// TODO: Remove in reverse order of adding.
|
||||
PluginManager *pluginManager = PluginManager::instance();
|
||||
pluginManager->removeObject(m_runControlFactory);
|
||||
pluginManager->removeObject(m_runConfigurationFactory);
|
||||
pluginManager->removeObject(m_deployStepFactory);
|
||||
pluginManager->removeObject(m_packageCreationFactory);
|
||||
pluginManager->removeObject(m_settingsPage);
|
||||
pluginManager->removeObject(m_deviceConfigurationsSettingsPage);
|
||||
pluginManager->removeObject(m_qemuSettingsPage);
|
||||
pluginManager->removeObject(m_publishingFactoryFremantleFree);
|
||||
|
||||
m_instance = 0;
|
||||
|
||||
@@ -46,8 +46,9 @@ class MaemoPackageCreationFactory;
|
||||
class MaemoPublishingWizardFactoryFremantleFree;
|
||||
class MaemoRunControlFactory;
|
||||
class MaemoRunConfigurationFactory;
|
||||
class MaemoSettingsPage;
|
||||
class MaemoDeviceConfigurationsSettingsPage;
|
||||
class MaemoQemuManager;
|
||||
class MaemoQemuSettingsPage;
|
||||
|
||||
class MaemoManager : public QObject
|
||||
{
|
||||
@@ -61,7 +62,8 @@ public:
|
||||
bool isValidMaemoQtVersion(const Qt4ProjectManager::QtVersion *version) const;
|
||||
ToolChain *maemoToolChain(const Qt4ProjectManager::QtVersion *version) const;
|
||||
|
||||
MaemoSettingsPage *settingsPage() const { return m_settingsPage; }
|
||||
MaemoDeviceConfigurationsSettingsPage *deviceConfigurationsSettingsPage() const { return m_deviceConfigurationsSettingsPage; }
|
||||
MaemoQemuSettingsPage *qemuSettingsPage() const { return m_qemuSettingsPage; }
|
||||
|
||||
private:
|
||||
static MaemoManager *m_instance;
|
||||
@@ -70,7 +72,8 @@ private:
|
||||
MaemoRunConfigurationFactory *m_runConfigurationFactory;
|
||||
MaemoPackageCreationFactory *m_packageCreationFactory;
|
||||
MaemoDeployStepFactory *m_deployStepFactory;
|
||||
MaemoSettingsPage *m_settingsPage;
|
||||
MaemoDeviceConfigurationsSettingsPage *m_deviceConfigurationsSettingsPage;
|
||||
MaemoQemuSettingsPage *m_qemuSettingsPage;
|
||||
MaemoQemuManager *m_qemuRuntimeManager;
|
||||
MaemoPublishingWizardFactoryFremantleFree *m_publishingFactoryFremantleFree;
|
||||
};
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "maemoglobal.h"
|
||||
#include "maemoqemuruntimeparser.h"
|
||||
#include "maemoqemusettings.h"
|
||||
#include "maemorunconfiguration.h"
|
||||
#include "maemotoolchain.h"
|
||||
#include "qtversionmanager.h"
|
||||
@@ -353,7 +354,7 @@ void MaemoQemuManager::startRuntime()
|
||||
|
||||
m_runningQtId = version->uniqueId();
|
||||
const MaemoQemuRuntime rt = m_runtimes.value(version->uniqueId());
|
||||
m_qemuProcess->setProcessEnvironment(rt.m_environment);
|
||||
m_qemuProcess->setProcessEnvironment(rt.environment());
|
||||
m_qemuProcess->setWorkingDirectory(rt.m_root);
|
||||
m_qemuProcess->start(rt.m_bin % QLatin1Char(' ') % rt.m_args);
|
||||
if (!m_qemuProcess->waitForStarted())
|
||||
@@ -415,9 +416,23 @@ void MaemoQemuManager::qemuStatusChanged(QemuStatus status, const QString &error
|
||||
case QemuFailedToStart:
|
||||
message = tr("Qemu failed to start: %1").arg(error);
|
||||
break;
|
||||
case QemuCrashed:
|
||||
message = tr("Qemu crashed");
|
||||
case QemuCrashed: {
|
||||
const MaemoQemuSettings::OpenGlMode openGlMode
|
||||
= MaemoQemuSettings::openGlMode();
|
||||
message = tr("Qemu crashed.");
|
||||
|
||||
// TODO: Provide a link to the settings page (how?).
|
||||
if (openGlMode == MaemoQemuSettings::HardwareAcceleration) {
|
||||
message += tr("\nYou have configured Qemu to use OpenGL "
|
||||
"hardware acceleration, which might not be supported by "
|
||||
"your system. You could try using software rendering instead.");
|
||||
} else if (openGlMode == MaemoQemuSettings::AutoDetect) {
|
||||
message += tr("\nQemu is currently configured to auto-detect the "
|
||||
"OpenGl mode, which is known to not work in some cases."
|
||||
"You might want to use software rendering instead");
|
||||
}
|
||||
break;
|
||||
}
|
||||
case QemuFinished:
|
||||
message = error;
|
||||
break;
|
||||
|
||||
@@ -30,7 +30,11 @@
|
||||
#define MAEMOQEMURUNTIME_H
|
||||
|
||||
#include "maemodeviceconfigurations.h"
|
||||
#include "maemoqemusettings.h"
|
||||
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QPair>
|
||||
#include <QtCore/QProcessEnvironment>
|
||||
#include <QtCore/QString>
|
||||
|
||||
@@ -47,11 +51,23 @@ enum QemuStatus {
|
||||
|
||||
struct MaemoQemuRuntime
|
||||
{
|
||||
typedef QPair<QString, QString> Variable;
|
||||
|
||||
MaemoQemuRuntime() {}
|
||||
MaemoQemuRuntime(const QString &root) : m_root(root) {}
|
||||
bool isValid() const {
|
||||
return !m_bin.isEmpty();
|
||||
}
|
||||
QProcessEnvironment environment() const {
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
foreach (const Variable &var, m_normalVars)
|
||||
env.insert(var.first, var.second);
|
||||
QHash<MaemoQemuSettings::OpenGlMode, QString>::ConstIterator it
|
||||
= m_openGlBackendVarValues.find(MaemoQemuSettings::openGlMode());
|
||||
if (it != m_openGlBackendVarValues.constEnd())
|
||||
env.insert(m_openGlBackendVarName, it.value());
|
||||
return env;
|
||||
}
|
||||
|
||||
QString m_name;
|
||||
QString m_bin;
|
||||
@@ -59,8 +75,10 @@ struct MaemoQemuRuntime
|
||||
QString m_args;
|
||||
QString m_sshPort;
|
||||
QString m_watchPath;
|
||||
QProcessEnvironment m_environment;
|
||||
MaemoPortList m_freePorts;
|
||||
QList<Variable> m_normalVars;
|
||||
QString m_openGlBackendVarName;
|
||||
QHash<MaemoQemuSettings::OpenGlMode, QString> m_openGlBackendVarValues;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -29,8 +29,10 @@
|
||||
#include "maemoqemuruntimeparser.h"
|
||||
|
||||
#include "maemoglobal.h"
|
||||
#include "maemoqemusettings.h"
|
||||
|
||||
#include <qt4projectmanager/qtversionmanager.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QProcess>
|
||||
@@ -68,10 +70,11 @@ private:
|
||||
|
||||
void handleTargetTag(QString &runtimeName);
|
||||
MaemoQemuRuntime handleRuntimeTag();
|
||||
QProcessEnvironment handleEnvironmentTag();
|
||||
QPair<QString, QString> handleVariableTag();
|
||||
void handleEnvironmentTag(MaemoQemuRuntime &runtime);
|
||||
void handleVariableTag(MaemoQemuRuntime &runtime);
|
||||
QList<Port> handleTcpPortListTag();
|
||||
Port handlePortTag();
|
||||
MaemoQemuSettings::OpenGlMode openGlTagToEnum(const QString &tag) const;
|
||||
};
|
||||
|
||||
MaemoQemuRuntimeParser::MaemoQemuRuntimeParser(const QString &madInfoOutput,
|
||||
@@ -220,13 +223,13 @@ void MaemoQemuRuntimeParserV1::setEnvironment(MaemoQemuRuntime *runTime,
|
||||
{
|
||||
QString remainingEnvSpec = envSpec;
|
||||
QString currentKey;
|
||||
runTime->m_environment = QProcessEnvironment::systemEnvironment();
|
||||
while (true) {
|
||||
const int nextEqualsSignPos
|
||||
= remainingEnvSpec.indexOf(QLatin1Char('='));
|
||||
if (nextEqualsSignPos == -1) {
|
||||
if (!currentKey.isEmpty())
|
||||
runTime->m_environment.insert(currentKey, remainingEnvSpec);
|
||||
runTime->m_normalVars << MaemoQemuRuntime::Variable(currentKey,
|
||||
remainingEnvSpec);
|
||||
break;
|
||||
}
|
||||
const int keyStartPos
|
||||
@@ -236,7 +239,7 @@ void MaemoQemuRuntimeParserV1::setEnvironment(MaemoQemuRuntime *runTime,
|
||||
const int valueEndPos
|
||||
= remainingEnvSpec.lastIndexOf(QRegExp(QLatin1String("\\S")),
|
||||
qMax(0, keyStartPos - 1)) + 1;
|
||||
runTime->m_environment.insert(currentKey,
|
||||
runTime->m_normalVars << MaemoQemuRuntime::Variable(currentKey,
|
||||
remainingEnvSpec.left(valueEndPos));
|
||||
}
|
||||
currentKey = remainingEnvSpec.mid(keyStartPos,
|
||||
@@ -316,7 +319,7 @@ MaemoQemuRuntime MaemoQemuRuntimeParserV2::handleRuntimeTag()
|
||||
} else if (m_madInfoReader.name() == QLatin1String("args")) {
|
||||
runtime.m_args = m_madInfoReader.readElementText();
|
||||
} else if (m_madInfoReader.name() == QLatin1String("environment")) {
|
||||
runtime.m_environment = handleEnvironmentTag();
|
||||
handleEnvironmentTag(runtime);
|
||||
} else if (m_madInfoReader.name() == QLatin1String("tcpportmap")) {
|
||||
const QList<Port> &ports = handleTcpPortListTag();
|
||||
foreach (const Port &port, ports) {
|
||||
@@ -332,49 +335,59 @@ MaemoQemuRuntime MaemoQemuRuntimeParserV2::handleRuntimeTag()
|
||||
return runtime;
|
||||
}
|
||||
|
||||
QProcessEnvironment MaemoQemuRuntimeParserV2::handleEnvironmentTag()
|
||||
void MaemoQemuRuntimeParserV2::handleEnvironmentTag(MaemoQemuRuntime &runtime)
|
||||
{
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
while (m_madInfoReader.readNextStartElement()) {
|
||||
const QPair<QString, QString> &var = handleVariableTag();
|
||||
if (!var.first.isEmpty())
|
||||
env.insert(var.first, var.second);
|
||||
}
|
||||
while (m_madInfoReader.readNextStartElement())
|
||||
handleVariableTag(runtime);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
const QString root = QDir::toNativeSeparators(m_maddeRoot)
|
||||
+ QLatin1Char('/');
|
||||
const QLatin1Char colon(';');
|
||||
const QLatin1String key("PATH");
|
||||
env.insert(key, root + QLatin1String("bin") + colon + env.value(key));
|
||||
env.insert(key, root + QLatin1String("madlib") + colon + env.value(key));
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
runtime.m_normalVars << MaemoQemuRuntime::Variable(key,
|
||||
root + QLatin1String("bin") + colon + env.value(key));
|
||||
runtime.m_normalVars << MaemoQemuRuntime::Variable(key,
|
||||
root + QLatin1String("madlib") + colon + env.value(key));
|
||||
#endif
|
||||
return env;
|
||||
}
|
||||
|
||||
QPair<QString, QString> MaemoQemuRuntimeParserV2::handleVariableTag()
|
||||
void MaemoQemuRuntimeParserV2::handleVariableTag(MaemoQemuRuntime &runtime)
|
||||
{
|
||||
QPair<QString, QString> var;
|
||||
if (m_madInfoReader.name() != QLatin1String("variable")) {
|
||||
m_madInfoReader.skipCurrentElement();
|
||||
return var;
|
||||
return;
|
||||
}
|
||||
|
||||
const bool isGlBackend = m_madInfoReader.attributes().value(QLatin1String("purpose"))
|
||||
== QLatin1String("glbackend");
|
||||
QString varName;
|
||||
QString varValue;
|
||||
while (m_madInfoReader.readNextStartElement()) {
|
||||
const QXmlStreamAttributes &attrs = m_madInfoReader.attributes();
|
||||
if (m_madInfoReader.name() == QLatin1String("name")) {
|
||||
var.first = m_madInfoReader.readElementText();
|
||||
varName = m_madInfoReader.readElementText();
|
||||
} else if (m_madInfoReader.name() == QLatin1String("value")
|
||||
&& attrs.value(QLatin1String("set")) != QLatin1String("false")
|
||||
&& (!isGlBackend || attrs.value(QLatin1String("option"))
|
||||
== QLatin1String("software-rendering"))) {
|
||||
var.second = m_madInfoReader.readElementText();
|
||||
&& attrs.value(QLatin1String("set")) != QLatin1String("false")) {
|
||||
varValue = m_madInfoReader.readElementText();
|
||||
if (isGlBackend) {
|
||||
MaemoQemuSettings::OpenGlMode openGlMode
|
||||
= openGlTagToEnum(attrs.value(QLatin1String("option")).toString());
|
||||
runtime.m_openGlBackendVarValues.insert(openGlMode, varValue);
|
||||
}
|
||||
} else {
|
||||
m_madInfoReader.skipCurrentElement();
|
||||
}
|
||||
}
|
||||
return var;
|
||||
|
||||
if (varName.isEmpty())
|
||||
return;
|
||||
if (isGlBackend) {
|
||||
runtime.m_openGlBackendVarName = varName;
|
||||
} else {
|
||||
runtime.m_normalVars << MaemoQemuRuntime::Variable(varName, varValue);
|
||||
}
|
||||
}
|
||||
|
||||
QList<MaemoQemuRuntimeParserV2::Port> MaemoQemuRuntimeParserV2::handleTcpPortListTag()
|
||||
@@ -404,5 +417,16 @@ MaemoQemuRuntimeParserV2::Port MaemoQemuRuntimeParserV2::handlePortTag()
|
||||
return port;
|
||||
}
|
||||
|
||||
MaemoQemuSettings::OpenGlMode MaemoQemuRuntimeParserV2::openGlTagToEnum(const QString &tag) const
|
||||
{
|
||||
if (tag == QLatin1String("hardware-acceleration"))
|
||||
return MaemoQemuSettings::HardwareAcceleration;
|
||||
if (tag == QLatin1String("software-rendering"))
|
||||
return MaemoQemuSettings::SoftwareRendering;
|
||||
if (tag == QLatin1String("autodetect"))
|
||||
return MaemoQemuSettings::AutoDetect;
|
||||
QTC_ASSERT(false, return MaemoQemuSettings::AutoDetect);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qt4ProjectManager
|
||||
|
||||
73
src/plugins/qt4projectmanager/qt-maemo/maemoqemusettings.cpp
Normal file
73
src/plugins/qt4projectmanager/qt-maemo/maemoqemusettings.cpp
Normal file
@@ -0,0 +1,73 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** No Commercial Usage
|
||||
** This file contains pre-release code and may not be distributed.
|
||||
** You may use this file in accordance with the terms and conditions
|
||||
** contained in the Technology Preview License Agreement accompanying
|
||||
** this package.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#include "maemoqemusettings.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <QtCore/QSettings>
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
namespace {
|
||||
const QString SettingsGroup = QLatin1String("Maemo Qemu Settings");
|
||||
const QString OpenGlModeKey = QLatin1String("OpenGl Mode");
|
||||
} // anonymous namespace
|
||||
|
||||
MaemoQemuSettings::OpenGlMode MaemoQemuSettings::openGlMode()
|
||||
{
|
||||
if (!m_initialized) {
|
||||
QSettings *settings = Core::ICore::instance()->settings();
|
||||
settings->beginGroup(SettingsGroup);
|
||||
m_openGlMode = static_cast<OpenGlMode>(settings->value(OpenGlModeKey, AutoDetect).toInt());
|
||||
settings->endGroup();
|
||||
m_initialized = true;
|
||||
}
|
||||
return m_openGlMode;
|
||||
}
|
||||
|
||||
void MaemoQemuSettings::setOpenGlMode(OpenGlMode openGlMode)
|
||||
{
|
||||
Q_ASSERT(m_initialized);
|
||||
m_openGlMode = openGlMode;
|
||||
QSettings *settings = Core::ICore::instance()->settings();
|
||||
settings->beginGroup(SettingsGroup);
|
||||
settings->setValue(OpenGlModeKey, m_openGlMode);
|
||||
settings->endGroup();
|
||||
}
|
||||
|
||||
bool MaemoQemuSettings::m_initialized = false;
|
||||
MaemoQemuSettings::OpenGlMode MaemoQemuSettings::m_openGlMode;
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qt4ProjectManager
|
||||
58
src/plugins/qt4projectmanager/qt-maemo/maemoqemusettings.h
Normal file
58
src/plugins/qt4projectmanager/qt-maemo/maemoqemusettings.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** No Commercial Usage
|
||||
** This file contains pre-release code and may not be distributed.
|
||||
** You may use this file in accordance with the terms and conditions
|
||||
** contained in the Technology Preview License Agreement accompanying
|
||||
** this package.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#ifndef MAEMOQEMUSETTINGS_H
|
||||
#define MAEMOQEMUSETTINGS_H
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
class MaemoQemuSettings
|
||||
{
|
||||
public:
|
||||
enum OpenGlMode { HardwareAcceleration, SoftwareRendering, AutoDetect };
|
||||
|
||||
static OpenGlMode openGlMode();
|
||||
static void setOpenGlMode(OpenGlMode openGlMode);
|
||||
|
||||
private:
|
||||
MaemoQemuSettings();
|
||||
|
||||
static bool m_initialized;
|
||||
static OpenGlMode m_openGlMode;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qt4ProjectManager
|
||||
|
||||
#endif // MAEMOQEMUSETTINGS_H
|
||||
@@ -38,75 +38,57 @@
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#include "maemoqemusettingswidget.h"
|
||||
#include "ui_maemoqemusettingswidget.h"
|
||||
|
||||
#include "maemosettingspage.h"
|
||||
|
||||
#include "maemosettingswidget.h"
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include "maemoqemusettings.h"
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
MaemoSettingsPage::MaemoSettingsPage(QObject *parent)
|
||||
: Core::IOptionsPage(parent)
|
||||
MaemoQemuSettingsWidget::MaemoQemuSettingsWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::MaemoQemuSettingsWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
switch (MaemoQemuSettings::openGlMode()) {
|
||||
case MaemoQemuSettings::HardwareAcceleration:
|
||||
ui->hardwareAccelerationButton->setChecked(true);
|
||||
break;
|
||||
case MaemoQemuSettings::SoftwareRendering:
|
||||
ui->softwareRenderingButton->setChecked(true);
|
||||
break;
|
||||
case MaemoQemuSettings::AutoDetect:
|
||||
ui->autoDetectButton->setChecked(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MaemoSettingsPage::~MaemoSettingsPage()
|
||||
MaemoQemuSettingsWidget::~MaemoQemuSettingsWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
QString MaemoSettingsPage::id() const
|
||||
QString MaemoQemuSettingsWidget::keywords() const
|
||||
{
|
||||
return QLatin1String("ZZ.Maemo Device Configurations");
|
||||
const QChar space = QLatin1Char(' ');
|
||||
QString keywords = ui->groupBox->title() + space
|
||||
+ ui->hardwareAccelerationButton->text() + space
|
||||
+ ui->softwareRenderingButton->text() + space
|
||||
+ ui->autoDetectButton->text();
|
||||
keywords.remove(QLatin1Char('&'));
|
||||
return keywords;
|
||||
}
|
||||
|
||||
QString MaemoSettingsPage::displayName() const
|
||||
{
|
||||
return tr("Maemo Device Configurations");
|
||||
}
|
||||
|
||||
QString MaemoSettingsPage::category() const
|
||||
{
|
||||
using namespace ProjectExplorer;
|
||||
return QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString MaemoSettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("ProjectExplorer",
|
||||
ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon MaemoSettingsPage::categoryIcon() const
|
||||
{
|
||||
using namespace ProjectExplorer;
|
||||
return QIcon(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
bool MaemoSettingsPage::matches(const QString &searchKeyWord) const
|
||||
{
|
||||
return m_keywords.contains(searchKeyWord, Qt::CaseInsensitive);
|
||||
}
|
||||
|
||||
QWidget *MaemoSettingsPage::createPage(QWidget *parent)
|
||||
{
|
||||
m_widget = new MaemoSettingsWidget(parent);
|
||||
if (m_keywords.isEmpty())
|
||||
m_keywords = m_widget->searchKeywords();
|
||||
return m_widget;
|
||||
}
|
||||
|
||||
void MaemoSettingsPage::apply()
|
||||
{
|
||||
m_widget->saveSettings();
|
||||
}
|
||||
|
||||
void MaemoSettingsPage::finish()
|
||||
void MaemoQemuSettingsWidget::saveSettings()
|
||||
{
|
||||
const MaemoQemuSettings::OpenGlMode openGlMode
|
||||
= ui->hardwareAccelerationButton->isChecked()
|
||||
? MaemoQemuSettings::HardwareAcceleration
|
||||
: ui->softwareRenderingButton->isChecked()
|
||||
? MaemoQemuSettings::SoftwareRendering
|
||||
: MaemoQemuSettings::AutoDetect;
|
||||
MaemoQemuSettings::setOpenGlMode(openGlMode);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
@@ -38,40 +38,35 @@
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#ifndef MAEMOQEMUSETTINGSWIDGET_H
|
||||
#define MAEMOQEMUSETTINGSWIDGET_H
|
||||
|
||||
#ifndef MAEMOSETTINGSPAGE_H
|
||||
#define MAEMOSETTINGSPAGE_H
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui {
|
||||
class MaemoQemuSettingsWidget;
|
||||
}
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
class MaemoSettingsWidget;
|
||||
|
||||
class MaemoSettingsPage : public Core::IOptionsPage
|
||||
class MaemoQemuSettingsWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MaemoSettingsPage(QObject *parent);
|
||||
~MaemoSettingsPage();
|
||||
|
||||
virtual QString id() const;
|
||||
virtual QString displayName() const;
|
||||
virtual QString category() const;
|
||||
virtual QString displayCategory() const;
|
||||
virtual QIcon categoryIcon() const;
|
||||
virtual bool matches(const QString &searchKeyWord) const;
|
||||
virtual QWidget *createPage(QWidget *parent);
|
||||
virtual void apply();
|
||||
virtual void finish();
|
||||
public:
|
||||
explicit MaemoQemuSettingsWidget(QWidget *parent = 0);
|
||||
~MaemoQemuSettingsWidget();
|
||||
void saveSettings();
|
||||
QString keywords() const;
|
||||
|
||||
private:
|
||||
QString m_keywords;
|
||||
MaemoSettingsWidget *m_widget;
|
||||
Ui::MaemoQemuSettingsWidget *ui;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qt4ProjectManager
|
||||
|
||||
#endif // MAEMOSETTINGSPAGE_H
|
||||
#endif // MAEMOQEMUSETTINGSWIDGET_H
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MaemoQemuSettingsWidget</class>
|
||||
<widget class="QWidget" name="MaemoQemuSettingsWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>OpenGL Mode</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="hardwareAccelerationButton">
|
||||
<property name="text">
|
||||
<string>Hardware Acceleration</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="softwareRenderingButton">
|
||||
<property name="text">
|
||||
<string>Software Rendering</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="autoDetectButton">
|
||||
<property name="text">
|
||||
<string>Auto-detect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "maemomanager.h"
|
||||
#include "maemoremotemountsmodel.h"
|
||||
#include "maemorunconfiguration.h"
|
||||
#include "maemosettingspage.h"
|
||||
#include "maemosettingspages.h"
|
||||
#include "maemotoolchain.h"
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
@@ -159,9 +159,9 @@ void MaemoRunConfigurationWidget::addGenericWidgets(QVBoxLayout *mainLayout)
|
||||
}
|
||||
|
||||
connect(addDevConfLabel, SIGNAL(linkActivated(QString)), this,
|
||||
SLOT(showSettingsDialog(QString)));
|
||||
SLOT(showDeviceConfigurationsDialog(QString)));
|
||||
connect(debuggerConfLabel, SIGNAL(linkActivated(QString)), this,
|
||||
SLOT(showSettingsDialog(QString)));
|
||||
SLOT(showDeviceConfigurationsDialog(QString)));
|
||||
connect(m_argsLineEdit, SIGNAL(textEdited(QString)), this,
|
||||
SLOT(argumentsEdited(QString)));
|
||||
connect(m_debugCppOnlyButton, SIGNAL(toggled(bool)), this,
|
||||
@@ -336,10 +336,11 @@ void MaemoRunConfigurationWidget::handleToolchainChanged()
|
||||
m_runConfiguration->updateFactoryState();
|
||||
}
|
||||
|
||||
void MaemoRunConfigurationWidget::showSettingsDialog(const QString &link)
|
||||
void MaemoRunConfigurationWidget::showDeviceConfigurationsDialog(const QString &link)
|
||||
{
|
||||
if (link == QLatin1String("deviceconfig")) {
|
||||
MaemoSettingsPage *page = MaemoManager::instance().settingsPage();
|
||||
MaemoDeviceConfigurationsSettingsPage *page
|
||||
= MaemoManager::instance().deviceConfigurationsSettingsPage();
|
||||
Core::ICore::instance()->showOptionsDialog(page->category(), page->id());
|
||||
} else if (link == QLatin1String("debugger")) {
|
||||
Core::ICore::instance()->showOptionsDialog(QLatin1String("O.Debugger"),
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
private slots:
|
||||
void runConfigurationEnabledChange(bool enabled);
|
||||
void argumentsEdited(const QString &args);
|
||||
void showSettingsDialog(const QString &link);
|
||||
void showDeviceConfigurationsDialog(const QString &link);
|
||||
void updateTargetInformation();
|
||||
void handleCurrentDeviceConfigChanged();
|
||||
void addMount();
|
||||
|
||||
167
src/plugins/qt4projectmanager/qt-maemo/maemosettingspages.cpp
Normal file
167
src/plugins/qt4projectmanager/qt-maemo/maemosettingspages.cpp
Normal file
@@ -0,0 +1,167 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the Qt Assistant of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** No Commercial Usage
|
||||
** This file contains pre-release code and may not be distributed.
|
||||
** You may use this file in accordance with the terms and conditions
|
||||
** contained in the Technology Preview License Agreement accompanying
|
||||
** this package.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "maemosettingspages.h"
|
||||
|
||||
#include "maemoconstants.h"
|
||||
#include "maemodeviceconfigurationssettingswidget.h"
|
||||
#include "maemoqemusettingswidget.h"
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
MaemoDeviceConfigurationsSettingsPage::MaemoDeviceConfigurationsSettingsPage(QObject *parent)
|
||||
: Core::IOptionsPage(parent)
|
||||
{
|
||||
}
|
||||
|
||||
MaemoDeviceConfigurationsSettingsPage::~MaemoDeviceConfigurationsSettingsPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString MaemoDeviceConfigurationsSettingsPage::id() const
|
||||
{
|
||||
return QLatin1String("ZZ.Maemo Device Configurations");
|
||||
}
|
||||
|
||||
QString MaemoDeviceConfigurationsSettingsPage::displayName() const
|
||||
{
|
||||
return tr("Maemo Device Configurations");
|
||||
}
|
||||
|
||||
QString MaemoDeviceConfigurationsSettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(Constants::MAEMO_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString MaemoDeviceConfigurationsSettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Qt4ProjectManager",
|
||||
Constants::MAEMO_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon MaemoDeviceConfigurationsSettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Constants::MAEMO_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
bool MaemoDeviceConfigurationsSettingsPage::matches(const QString &searchKeyWord) const
|
||||
{
|
||||
return m_keywords.contains(searchKeyWord, Qt::CaseInsensitive);
|
||||
}
|
||||
|
||||
QWidget *MaemoDeviceConfigurationsSettingsPage::createPage(QWidget *parent)
|
||||
{
|
||||
m_widget = new MaemoDeviceConfigurationsSettingsWidget(parent);
|
||||
if (m_keywords.isEmpty())
|
||||
m_keywords = m_widget->searchKeywords();
|
||||
return m_widget;
|
||||
}
|
||||
|
||||
void MaemoDeviceConfigurationsSettingsPage::apply()
|
||||
{
|
||||
m_widget->saveSettings();
|
||||
}
|
||||
|
||||
void MaemoDeviceConfigurationsSettingsPage::finish()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
MaemoQemuSettingsPage::MaemoQemuSettingsPage(QObject *parent)
|
||||
: Core::IOptionsPage(parent)
|
||||
{
|
||||
}
|
||||
|
||||
MaemoQemuSettingsPage::~MaemoQemuSettingsPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString MaemoQemuSettingsPage::id() const
|
||||
{
|
||||
return QLatin1String("ZZ.Qemu Settings");
|
||||
}
|
||||
|
||||
QString MaemoQemuSettingsPage::displayName() const
|
||||
{
|
||||
return tr("Qemu Settings");
|
||||
}
|
||||
|
||||
QString MaemoQemuSettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(Constants::MAEMO_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString MaemoQemuSettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Qt4ProjectManager",
|
||||
Constants::MAEMO_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon MaemoQemuSettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Constants::MAEMO_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
bool MaemoQemuSettingsPage::matches(const QString &searchKeyWord) const
|
||||
{
|
||||
return m_widget->keywords().contains(searchKeyWord, Qt::CaseInsensitive);
|
||||
}
|
||||
|
||||
QWidget *MaemoQemuSettingsPage::createPage(QWidget *parent)
|
||||
{
|
||||
m_widget = new MaemoQemuSettingsWidget(parent);
|
||||
return m_widget;
|
||||
}
|
||||
|
||||
void MaemoQemuSettingsPage::apply()
|
||||
{
|
||||
m_widget->saveSettings();
|
||||
}
|
||||
|
||||
void MaemoQemuSettingsPage::finish()
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qt4ProjectManager
|
||||
100
src/plugins/qt4projectmanager/qt-maemo/maemosettingspages.h
Normal file
100
src/plugins/qt4projectmanager/qt-maemo/maemosettingspages.h
Normal file
@@ -0,0 +1,100 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the Qt Assistant of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** No Commercial Usage
|
||||
** This file contains pre-release code and may not be distributed.
|
||||
** You may use this file in accordance with the terms and conditions
|
||||
** contained in the Technology Preview License Agreement accompanying
|
||||
** this package.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef MAEMOSETTINGSPAGES_H
|
||||
#define MAEMOSETTINGSPAGES_H
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
|
||||
namespace Qt4ProjectManager{
|
||||
namespace Internal {
|
||||
|
||||
class MaemoDeviceConfigurationsSettingsWidget;
|
||||
class MaemoQemuSettingsWidget;
|
||||
|
||||
class MaemoDeviceConfigurationsSettingsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MaemoDeviceConfigurationsSettingsPage(QObject *parent);
|
||||
~MaemoDeviceConfigurationsSettingsPage();
|
||||
|
||||
virtual QString id() const;
|
||||
virtual QString displayName() const;
|
||||
virtual QString category() const;
|
||||
virtual QString displayCategory() const;
|
||||
virtual QIcon categoryIcon() const;
|
||||
virtual bool matches(const QString &searchKeyWord) const;
|
||||
virtual QWidget *createPage(QWidget *parent);
|
||||
virtual void apply();
|
||||
virtual void finish();
|
||||
|
||||
private:
|
||||
QString m_keywords;
|
||||
MaemoDeviceConfigurationsSettingsWidget *m_widget;
|
||||
};
|
||||
|
||||
class MaemoQemuSettingsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MaemoQemuSettingsPage(QObject *parent);
|
||||
~MaemoQemuSettingsPage();
|
||||
|
||||
virtual QString id() const;
|
||||
virtual QString displayName() const;
|
||||
virtual QString category() const;
|
||||
virtual QString displayCategory() const;
|
||||
virtual QIcon categoryIcon() const;
|
||||
virtual bool matches(const QString &searchKeyWord) const;
|
||||
virtual QWidget *createPage(QWidget *parent);
|
||||
virtual void apply();
|
||||
virtual void finish();
|
||||
|
||||
private:
|
||||
QString m_keywords;
|
||||
MaemoQemuSettingsWidget *m_widget;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qt4ProjectManager
|
||||
|
||||
#endif // MAEMOSETTINGSPAGES_H
|
||||
@@ -7,8 +7,8 @@ HEADERS += \
|
||||
$$PWD/maemorunconfigurationwidget.h \
|
||||
$$PWD/maemoruncontrol.h \
|
||||
$$PWD/maemorunfactories.h \
|
||||
$$PWD/maemosettingspage.h \
|
||||
$$PWD/maemosettingswidget.h \
|
||||
$$PWD/maemosettingspages.h \
|
||||
$$PWD/maemodeviceconfigurationssettingswidget.h \
|
||||
$$PWD/maemosshconfigdialog.h \
|
||||
$$PWD/maemotoolchain.h \
|
||||
$$PWD/maemopackagecreationstep.h \
|
||||
@@ -43,7 +43,9 @@ HEADERS += \
|
||||
$$PWD/maemopublishingresultpagefremantlefree.h \
|
||||
$$PWD/maemopublisherfremantlefree.h \
|
||||
$$PWD/maemoqemuruntime.h \
|
||||
qt-maemo/maemoqemuruntimeparser.h
|
||||
$$PWD/maemoqemuruntimeparser.h \
|
||||
$$PWD/maemoqemusettingswidget.h \
|
||||
$$PWD/maemoqemusettings.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/maemoconfigtestdialog.cpp \
|
||||
@@ -53,8 +55,8 @@ SOURCES += \
|
||||
$$PWD/maemorunconfigurationwidget.cpp \
|
||||
$$PWD/maemoruncontrol.cpp \
|
||||
$$PWD/maemorunfactories.cpp \
|
||||
$$PWD/maemosettingspage.cpp \
|
||||
$$PWD/maemosettingswidget.cpp \
|
||||
$$PWD/maemosettingspages.cpp \
|
||||
$$PWD/maemodeviceconfigurationssettingswidget.cpp \
|
||||
$$PWD/maemosshconfigdialog.cpp \
|
||||
$$PWD/maemotoolchain.cpp \
|
||||
$$PWD/maemopackagecreationstep.cpp \
|
||||
@@ -87,11 +89,13 @@ SOURCES += \
|
||||
$$PWD/maemopublishingwizardfremantlefree.cpp \
|
||||
$$PWD/maemopublishingresultpagefremantlefree.cpp \
|
||||
$$PWD/maemopublisherfremantlefree.cpp \
|
||||
qt-maemo/maemoqemuruntimeparser.cpp
|
||||
$$PWD/maemoqemuruntimeparser.cpp \
|
||||
$$PWD/maemoqemusettingswidget.cpp \
|
||||
$$PWD/maemoqemusettings.cpp
|
||||
|
||||
FORMS += \
|
||||
$$PWD/maemoconfigtestdialog.ui \
|
||||
$$PWD/maemosettingswidget.ui \
|
||||
$$PWD/maemodeviceconfigurationssettingswidget.ui \
|
||||
$$PWD/maemosshconfigdialog.ui \
|
||||
$$PWD/maemopackagecreationwidget.ui \
|
||||
$$PWD/maemodeploystepwidget.ui \
|
||||
@@ -100,6 +104,7 @@ FORMS += \
|
||||
$$PWD/maemopublishingbuildsettingspagefremantlefree.ui \
|
||||
$$PWD/maemopublishingfileselectiondialog.ui \
|
||||
$$PWD/maemopublishinguploadsettingspagefremantlefree.ui \
|
||||
$$PWD/maemopublishingresultpagefremantlefree.ui
|
||||
$$PWD/maemopublishingresultpagefremantlefree.ui \
|
||||
$$PWD/maemoqemusettingswidget.ui
|
||||
|
||||
RESOURCES += $$PWD/qt-maemo.qrc
|
||||
|
||||
Reference in New Issue
Block a user