diff --git a/plugins/cvs/importmetadatawidget.ui b/plugins/cvs/importmetadatawidget.ui
index 1aafbb903..bae11c88b 100644
--- a/plugins/cvs/importmetadatawidget.ui
+++ b/plugins/cvs/importmetadatawidget.ui
@@ -1,172 +1,145 @@
ImportMetadataWidget
0
0
581
261
Import
-
+
+
+ 0
+
-
Source Directory:
-
-
-
-
- 0
- 0
-
-
&Repository:
false
repository
-
-
-
-
- 0
- 0
-
-
Mo&dule:
false
module
-
-
-
-
- 0
- 0
-
-
&Vendor tag:
false
vendorTag
-
vendor
-
-
-
- 0
- 0
-
-
Re&lease tag:
false
releaseTag
-
start
-
-
-
- 0
- 0
-
-
Co&mment:
false
comment
-
QLineEdit
QLineEdit
KTextEdit
QTextEdit
KUrlRequester
QWidget
1
repository
module
vendorTag
releaseTag
diff --git a/plugins/filetemplates/templateoptionspage.cpp b/plugins/filetemplates/templateoptionspage.cpp
index db0c0fc13..1b7c19cab 100644
--- a/plugins/filetemplates/templateoptionspage.cpp
+++ b/plugins/filetemplates/templateoptionspage.cpp
@@ -1,165 +1,168 @@
/* This file is part of KDevelop
Copyright 2012 Miha Čančula
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "templateoptionspage.h"
#include "templateclassassistant.h"
#include "debug.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace KDevelop;
class KDevelop::TemplateOptionsPagePrivate
{
public:
QList entries;
QHash controls;
QHash typeProperties;
QWidget *firstEditWidget;
};
TemplateOptionsPage::TemplateOptionsPage(QWidget* parent, Qt::WindowFlags f)
: QWidget(parent, f)
, d(new TemplateOptionsPagePrivate)
{
d->firstEditWidget = nullptr;
d->typeProperties.insert(QStringLiteral("String"), "text");
d->typeProperties.insert(QStringLiteral("Enum"), "currentText");
d->typeProperties.insert(QStringLiteral("Int"), "value");
d->typeProperties.insert(QStringLiteral("Bool"), "checked");
}
TemplateOptionsPage::~TemplateOptionsPage()
{
delete d;
}
void TemplateOptionsPage::load(const SourceFileTemplate& fileTemplate, TemplateRenderer* renderer)
{
d->entries.clear();
d->controls.clear();
d->firstEditWidget = nullptr;
- QLayout* layout = new QVBoxLayout();
+ QVBoxLayout* layout = new QVBoxLayout();
QHash > options = fileTemplate.customOptions(renderer);
QHash >::const_iterator it;
for (it = options.constBegin(); it != options.constEnd(); ++it)
{
QGroupBox* box = new QGroupBox(this);
box->setTitle(it.key());
QFormLayout* formLayout = new QFormLayout;
d->entries << it.value();
foreach (const SourceFileTemplate::ConfigOption& entry, it.value())
{
QWidget* control = nullptr;
const QString type = entry.type;
if (type == QLatin1String("String"))
{
control = new QLineEdit(entry.value.toString(), box);
}
else if (type == QLatin1String("Enum"))
{
auto input = new QComboBox(box);
input->addItems(entry.values);
input->setCurrentText(entry.value.toString());
control = input;
}
else if (type == QLatin1String("Int"))
{
auto input = new QSpinBox(box);
input->setValue(entry.value.toInt());
if (!entry.minValue.isEmpty())
{
input->setMinimum(entry.minValue.toInt());
}
if (!entry.maxValue.isEmpty())
{
input->setMaximum(entry.maxValue.toInt());
}
control = input;
}
else if (type == QLatin1String("Bool"))
{
bool checked = (QString::compare(entry.value.toString(), QStringLiteral("true"), Qt::CaseInsensitive) == 0);
QCheckBox* checkBox = new QCheckBox(box);
checkBox->setCheckState(checked ? Qt::Checked : Qt::Unchecked);
control = checkBox;
}
else
{
qCDebug(PLUGIN_FILETEMPLATES) << "Unrecognized option type" << entry.type;
}
if (control)
{
const QString entryLabelText = i18n("%1:", entry.label);
QLabel* label = new QLabel(entryLabelText, box);
formLayout->addRow(label, control);
d->controls.insert(entry.name, control);
if (d->firstEditWidget == nullptr) {
d->firstEditWidget = control;
}
}
}
box->setLayout(formLayout);
layout->addWidget(box);
}
+
+ layout->addStretch();
+
setLayout(layout);
}
QVariantHash TemplateOptionsPage::templateOptions() const
{
QVariantHash values;
foreach (const SourceFileTemplate::ConfigOption& entry, d->entries)
{
Q_ASSERT(d->controls.contains(entry.name));
Q_ASSERT(d->typeProperties.contains(entry.type));
values.insert(entry.name, d->controls[entry.name]->property(d->typeProperties[entry.type]));
}
qCDebug(PLUGIN_FILETEMPLATES) << values.size() << d->entries.size();
return values;
}
void TemplateOptionsPage::setFocusToFirstEditWidget()
{
if (d->firstEditWidget) {
d->firstEditWidget->setFocus();
}
}
diff --git a/plugins/subversion/ui/importmetadatawidget.ui b/plugins/subversion/ui/importmetadatawidget.ui
index bfb3772a7..d409be1d8 100644
--- a/plugins/subversion/ui/importmetadatawidget.ui
+++ b/plugins/subversion/ui/importmetadatawidget.ui
@@ -1,73 +1,80 @@
SvnImportMetadataWidget
0
0
549
280
-
+
+
+ 0
+
-
Source directory:
-
Repository:
-
Repository Location
Repository Location to import into
Choose the repository into which the source directory is imported
-
-
-
+
+
+
+ 0
+ 1
+
+
+
-
Commit Message:
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
-
KUrlRequester
QWidget
KTextEdit
QTextEdit
diff --git a/shell/documentcontroller.h b/shell/documentcontroller.h
index b808a66e0..04d79039e 100644
--- a/shell/documentcontroller.h
+++ b/shell/documentcontroller.h
@@ -1,182 +1,180 @@
/* This document is part of the KDE project
Copyright 2002 Matthias Hoelzer-Kluepfel
Copyright 2002 Bernd Gehrmann
Copyright 2003 Roberto Raggi
Copyright 2003 Hamish Rodda
Copyright 2003 Harald Fernengel
Copyright 2003 Jens Dagerbo
Copyright 2005 Adam Treat
Copyright 2004-2007 Alexander Dymo
Copyright 2007 Andreas Pakulat
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the document COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KDEVPLATFORM_DOCUMENTCONTROLLER_H
#define KDEVPLATFORM_DOCUMENTCONTROLLER_H
#include
#include
#include "shellexport.h"
namespace KTextEditor {
class View;
}
namespace Sublime {
class Document;
class Area;
class AreaIndex;
}
namespace KDevelop {
-class ProjectFileItem;
-class IProject;
class MainWindow;
/**
* \short Interface to control open documents.
* The document controller manages open documents in the IDE.
* Open documents are usually editors, GUI designers, html documentation etc.
*
* Please note that this interface gives access to documents and not to their views.
* It is possible that more than 1 view is shown in KDevelop for a document.
*/
class KDEVPLATFORMSHELL_EXPORT DocumentController: public IDocumentController {
Q_OBJECT
Q_CLASSINFO( "D-Bus Interface", "org.kdevelop.DocumentController" )
public:
/**Constructor.
@param parent The parent object.*/
explicit DocumentController( QObject *parent = nullptr );
~DocumentController() override;
/**Finds the first document object corresponding to a given url.
@param url The Url of the document.
@return The corresponding document, or null if not found.*/
IDocument* documentForUrl( const QUrl & url ) const override;
/**@return The list of open documents*/
QList openDocuments() const override;
/**Refers to the document currently active or focused.
@return The active document.*/
IDocument* activeDocument() const override;
KTextEditor::View* activeTextDocumentView() const override;
/// Activate the given \a document. This convenience function does not add the document
/// to the File/Recent Open menu. Use DocumentController::openDocument if that is desired.
void activateDocument( IDocument * document, const KTextEditor::Range& range = KTextEditor::Range::invalid() ) override;
void registerDocumentForMimetype( const QString&, KDevelop::IDocumentFactory* ) override;
/// Request the document controller to save all documents.
/// If the \a mode is not IDocument::Silent, ask the user which documents to save.
/// Returns false if the user cancels the save dialog.
bool saveAllDocuments(IDocument::DocumentSaveMode mode) override;
bool saveAllDocumentsForWindow(KParts::MainWindow* mw, IDocument::DocumentSaveMode mode, bool currentAreaOnly = false) override;
void initialize();
void cleanup();
virtual QStringList documentTypes() const;
QString documentType(Sublime::Document* document) const;
using IDocumentController::openDocument;
/**checks that url is an url of empty document*/
static bool isEmptyDocumentUrl(const QUrl &url);
static QUrl nextEmptyDocumentUrl();
IDocumentFactory* factory(const QString& mime) const override;
bool openDocument(IDocument* doc,
const KTextEditor::Range& range = KTextEditor::Range::invalid(),
DocumentActivationParams activationParams = nullptr,
IDocument* buddy = nullptr) override;
KTextEditor::Document* globalTextEditorInstance() override;
public Q_SLOTS:
/**Opens a new or existing document.
@param url The full Url of the document to open. If it is empty, a dialog to choose the document will be opened.
@param range The location information, if applicable.
@param activationParams Indicates whether to fully activate the document.
@param buddy The buddy document
@return The opened document
*/
Q_SCRIPTABLE IDocument* openDocument( const QUrl &url,
const KTextEditor::Range& range = KTextEditor::Range::invalid(),
DocumentActivationParams activationParams = nullptr,
const QString& encoding = {},
IDocument* buddy = nullptr ) override;
Q_SCRIPTABLE IDocument* openDocumentFromText( const QString& data ) override;
KDevelop::IDocument* openDocument( const QUrl &url, const QString& prefName ) override;
virtual bool closeDocument( const QUrl &url );
void fileClose();
void slotSaveAllDocuments();
bool closeAllDocuments() override;
void closeAllOtherDocuments();
void reloadAllDocuments();
// DBUS-compatible versions of openDocument
virtual Q_SCRIPTABLE bool openDocumentSimple( QString url, int line = -1, int column = 0 );
// Opens a list of documents, with optional split-view separators, like: "file1 / [ file2 - fil3 ]" (see kdevplatform_shell_environment.sh)
virtual Q_SCRIPTABLE bool openDocumentsSimple( QStringList urls );
virtual Q_SCRIPTABLE bool openDocumentFromTextSimple( QString text );
// If 'target' is empty, returns the currently active document, or
// the currently selected project-item if no document is active.
// If 'target' is "[selection]", returns the path of the currently active selection.
// If 'target' is the name of a project, returns the root-path of that project.
// Whenever the returned path corresponds to a directory, a '/.' suffix is appended.
Q_SCRIPTABLE QString activeDocumentPath(QString target = {}) const;
// Returns all open documents in the current area
Q_SCRIPTABLE QStringList activeDocumentPaths() const;
void vcsAnnotateCurrentDocument();
private Q_SLOTS:
virtual void slotOpenDocument(const QUrl &url);
void notifyDocumentClosed(Sublime::Document* doc);
private:
bool openDocumentsWithSplitSeparators( Sublime::AreaIndex* index, QStringList urlsWithSeparators, bool& isFirstView );
QList visibleDocumentsInWindow(MainWindow* mw) const;
QList documentsExclusivelyInWindow(MainWindow* mw, bool currentAreaOnly = false) const;
QList modifiedDocuments(const QList& list) const;
bool saveSomeDocuments(const QList& list, IDocument::DocumentSaveMode mode) override;
void setupActions();
friend struct DocumentControllerPrivate;
struct DocumentControllerPrivate *d;
};
}
#endif
diff --git a/shell/projectinfopage.ui b/shell/projectinfopage.ui
index 0868ac941..d1860b79d 100644
--- a/shell/projectinfopage.ui
+++ b/shell/projectinfopage.ui
@@ -1,65 +1,52 @@
ProjectInfoPage
0
0
651
416
-
+
-
Select the Management Plugin to use for this project
Project manager:
-
Provide a name for the project
Name:
- -
+
-
Provide a name for the project
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
- -
+
-
Select the Management Plugin to use for this project