forked from qt-creator/qt-creator
This re-organizes the buttons on the main device page a bit: The topmost one still starts the wizard selection, below that are direct individual buttons to add specific devices. Change-Id: I52b2803febf658259dde9589544656fd4c8fc889 Reviewed-by: David Schulz <david.schulz@qt.io>
62 lines
1.9 KiB
C++
62 lines
1.9 KiB
C++
// Copyright (C) 2016 The Qt Company Ltd.
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
|
|
|
#include "genericlinuxdeviceconfigurationwizard.h"
|
|
|
|
#include "genericlinuxdeviceconfigurationwizardpages.h"
|
|
#include "linuxdevice.h"
|
|
#include "remotelinux_constants.h"
|
|
#include "remotelinuxtr.h"
|
|
|
|
#include <projectexplorer/devicesupport/idevice.h>
|
|
#include <projectexplorer/devicesupport/sshparameters.h>
|
|
|
|
#include <utils/fileutils.h>
|
|
|
|
using namespace ProjectExplorer;
|
|
|
|
namespace RemoteLinux {
|
|
namespace Internal {
|
|
enum PageId { SetupPageId, KeyDeploymentPageId, FinalPageId };
|
|
|
|
class GenericLinuxDeviceConfigurationWizardPrivate
|
|
{
|
|
public:
|
|
GenericLinuxDeviceConfigurationWizardPrivate(QWidget *parent)
|
|
: setupPage(parent), keyDeploymentPage(parent), finalPage(parent)
|
|
{
|
|
}
|
|
|
|
GenericLinuxDeviceConfigurationWizardSetupPage setupPage;
|
|
GenericLinuxDeviceConfigurationWizardKeyDeploymentPage keyDeploymentPage;
|
|
GenericLinuxDeviceConfigurationWizardFinalPage finalPage;
|
|
LinuxDevice::Ptr device;
|
|
};
|
|
} // namespace Internal
|
|
|
|
GenericLinuxDeviceConfigurationWizard::GenericLinuxDeviceConfigurationWizard(QWidget *parent)
|
|
: Utils::Wizard(parent),
|
|
d(new Internal::GenericLinuxDeviceConfigurationWizardPrivate(this))
|
|
{
|
|
setWindowTitle(Tr::tr("New Remote Linux Device Configuration Setup"));
|
|
setPage(Internal::SetupPageId, &d->setupPage);
|
|
setPage(Internal::KeyDeploymentPageId, &d->keyDeploymentPage);
|
|
setPage(Internal::FinalPageId, &d->finalPage);
|
|
d->finalPage.setCommitPage(true);
|
|
d->device = LinuxDevice::create();
|
|
d->setupPage.setDevice(d->device);
|
|
d->keyDeploymentPage.setDevice(d->device);
|
|
}
|
|
|
|
GenericLinuxDeviceConfigurationWizard::~GenericLinuxDeviceConfigurationWizard()
|
|
{
|
|
delete d;
|
|
}
|
|
|
|
IDevice::Ptr GenericLinuxDeviceConfigurationWizard::device()
|
|
{
|
|
return d->device;
|
|
}
|
|
|
|
} // namespace RemoteLinux
|