2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2011-06-16 17:03:43 +02:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2011-06-16 17:03:43 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2011-06-16 17:03:43 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2011-06-16 17:03:43 +02:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2011-06-16 17:03:43 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2012-07-27 13:31:13 +02:00
|
|
|
|
2011-06-16 17:03:43 +02:00
|
|
|
#include "genericlinuxdeviceconfigurationwizard.h"
|
|
|
|
|
|
2011-06-21 12:44:52 +02:00
|
|
|
#include "genericlinuxdeviceconfigurationwizardpages.h"
|
2012-07-27 13:31:13 +02:00
|
|
|
#include "linuxdevice.h"
|
2011-07-25 11:55:00 +02:00
|
|
|
#include "remotelinux_constants.h"
|
2012-07-27 13:31:13 +02:00
|
|
|
|
2012-02-28 10:34:50 +01:00
|
|
|
#include <utils/portlist.h>
|
2011-06-16 17:03:43 +02:00
|
|
|
|
2012-03-06 12:31:42 +01:00
|
|
|
using namespace ProjectExplorer;
|
2012-05-18 10:49:35 +02:00
|
|
|
using namespace QSsh;
|
2011-06-16 17:03:43 +02:00
|
|
|
|
|
|
|
|
namespace RemoteLinux {
|
|
|
|
|
namespace Internal {
|
2018-12-21 14:01:17 +01:00
|
|
|
enum PageId { SetupPageId, KeyDeploymentPageId, FinalPageId };
|
2011-06-16 17:03:43 +02:00
|
|
|
|
|
|
|
|
class GenericLinuxDeviceConfigurationWizardPrivate
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
GenericLinuxDeviceConfigurationWizardPrivate(QWidget *parent)
|
2018-12-21 14:01:17 +01:00
|
|
|
: setupPage(parent), keyDeploymentPage(parent), finalPage(parent)
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GenericLinuxDeviceConfigurationWizardSetupPage setupPage;
|
2018-12-21 14:01:17 +01:00
|
|
|
GenericLinuxDeviceConfigurationWizardKeyDeploymentPage keyDeploymentPage;
|
2011-06-16 17:03:43 +02:00
|
|
|
GenericLinuxDeviceConfigurationWizardFinalPage finalPage;
|
2018-12-21 14:01:17 +01:00
|
|
|
LinuxDevice::Ptr device;
|
2011-06-16 17:03:43 +02:00
|
|
|
};
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
|
|
|
|
|
GenericLinuxDeviceConfigurationWizard::GenericLinuxDeviceConfigurationWizard(QWidget *parent)
|
2013-10-09 11:20:26 +02:00
|
|
|
: Utils::Wizard(parent),
|
2011-09-15 09:10:10 +02:00
|
|
|
d(new Internal::GenericLinuxDeviceConfigurationWizardPrivate(this))
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
|
|
|
|
setWindowTitle(tr("New Generic Linux Device Configuration Setup"));
|
2011-09-15 09:10:10 +02:00
|
|
|
setPage(Internal::SetupPageId, &d->setupPage);
|
2018-12-21 14:01:17 +01:00
|
|
|
setPage(Internal::KeyDeploymentPageId, &d->keyDeploymentPage);
|
2011-09-15 09:10:10 +02:00
|
|
|
setPage(Internal::FinalPageId, &d->finalPage);
|
|
|
|
|
d->finalPage.setCommitPage(true);
|
2018-12-21 14:01:17 +01:00
|
|
|
d->device = LinuxDevice::create(tr("Generic Linux Device"),
|
2019-01-14 15:27:52 +01:00
|
|
|
Core::Id(Constants::GenericLinuxOsType));
|
|
|
|
|
d->device->setMachineType(IDevice::Hardware);
|
2018-12-21 14:01:17 +01:00
|
|
|
d->device->setFreePorts(Utils::PortList::fromString(QLatin1String("10000-10100")));
|
|
|
|
|
SshConnectionParameters sshParams;
|
|
|
|
|
sshParams.timeout = 10;
|
|
|
|
|
d->device->setSshParameters(sshParams);
|
|
|
|
|
d->setupPage.setDevice(d->device);
|
|
|
|
|
d->keyDeploymentPage.setDevice(d->device);
|
2011-06-16 17:03:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GenericLinuxDeviceConfigurationWizard::~GenericLinuxDeviceConfigurationWizard()
|
|
|
|
|
{
|
2011-09-15 09:10:10 +02:00
|
|
|
delete d;
|
2011-06-16 17:03:43 +02:00
|
|
|
}
|
|
|
|
|
|
2012-03-06 12:31:42 +01:00
|
|
|
IDevice::Ptr GenericLinuxDeviceConfigurationWizard::device()
|
2011-06-16 17:03:43 +02:00
|
|
|
{
|
2018-12-21 14:01:17 +01:00
|
|
|
return d->device;
|
2011-06-16 17:03:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace RemoteLinux
|