diff options
| author | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2014-10-22 12:24:55 +0200 |
|---|---|---|
| committer | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2014-10-24 13:38:33 +0200 |
| commit | b159d740fa32c505856e2acba22ed82c3333ed73 (patch) | |
| tree | ed5f553f26d7159657676e518db93d6a6361ebeb /src/plugins/pythoneditor/wizard/pythonclassnamepage.cpp | |
| parent | b9a7cfcaa1f058c6d6b123c6d9abaa9da92d9f5a (diff) | |
| download | qt-creator-b159d740fa32c505856e2acba22ed82c3333ed73.tar.gz | |
JsonWizard: Replace Python class wizard with a JsonWizard
* Remove Qt4 support.
* Remove some UI options that did not do anything in the original wizard
Change-Id: I9647cbc6cd0958a02df5b2fe480b9c8069249521
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src/plugins/pythoneditor/wizard/pythonclassnamepage.cpp')
| -rw-r--r-- | src/plugins/pythoneditor/wizard/pythonclassnamepage.cpp | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/src/plugins/pythoneditor/wizard/pythonclassnamepage.cpp b/src/plugins/pythoneditor/wizard/pythonclassnamepage.cpp deleted file mode 100644 index cd5fda454e..0000000000 --- a/src/plugins/pythoneditor/wizard/pythonclassnamepage.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of Qt Creator. -** -** 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 -** a written agreement between you and Digia. For licensing terms and -** conditions see http://www.qt.io/licensing. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** 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 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -#include "pythonclassnamepage.h" -#include "../pythoneditorconstants.h" - -#include <utils/wizard.h> - -#include <coreplugin/icore.h> -#include <coreplugin/mimedatabase.h> -#include <utils/newclasswidget.h> - -#include <QVBoxLayout> - -namespace PythonEditor { -namespace Internal { - -ClassNamePage::ClassNamePage(QWidget *parent) - : QWizardPage(parent) - , m_isValid(false) -{ - setTitle(tr("Enter Class Name")); - setSubTitle(tr("The source file name will be derived from the class name")); - - m_newClassWidget.reset(new Utils::NewClassWidget); - // Order, set extensions first before suggested name is derived - m_newClassWidget->setClassTypeComboVisible(true); - m_newClassWidget->setBaseClassChoices(QStringList() - << QString() - << QLatin1String("QObject") - << QLatin1String("QWidget") - << QLatin1String("QMainWindow") - << QLatin1String("QDeclarativeItem")); - - m_newClassWidget->setBaseClassEditable(true); - m_newClassWidget->setFormInputVisible(false); - m_newClassWidget->setHeaderInputVisible(false); - m_newClassWidget->setNamespacesEnabled(true); - m_newClassWidget->setBaseClassInputVisible(true); - m_newClassWidget->setNamesDelimiter(QLatin1String(".")); - m_newClassWidget->setAllowDirectories(true); - - connect(m_newClassWidget.data(), SIGNAL(validChanged()), this, SLOT(slotValidChanged())); - - QVBoxLayout *pageLayout = new QVBoxLayout(this); - pageLayout->addWidget(m_newClassWidget.data()); - QSpacerItem *vSpacer = new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::Expanding); - pageLayout->addItem(vSpacer); - - initParameters(); - - setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Details")); -} - -ClassNamePage::~ClassNamePage() -{ -} - -void ClassNamePage::initParameters() -{ - m_newClassWidget->setSourceExtension(QLatin1String(Constants::C_PY_EXTENSION)); -} - -void ClassNamePage::slotValidChanged() -{ - const bool validNow = m_newClassWidget->isValid(); - if (m_isValid != validNow) { - m_isValid = validNow; - emit completeChanged(); - } -} - -} // namespace Internal -} // namespace PythonEditor |
