2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2009-03-20 14:57:12 +01:00
|
|
|
**
|
2013-01-28 17:12:19 +01:00
|
|
|
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
2012-10-02 09:12:39 +02:00
|
|
|
** Contact: http://www.qt-project.org/legal
|
2009-03-20 14:57:12 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2009-03-20 14:57:12 +01: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
|
|
|
|
|
** a written agreement between you and Digia. For licensing terms and
|
|
|
|
|
** conditions see http://qt.digia.com/licensing. For further information
|
|
|
|
|
** use the contact form at http://qt.digia.com/contact-us.
|
2009-03-20 14:57:12 +01:00
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
2012-10-02 09:12:39 +02:00
|
|
|
** 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, Digia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
2010-12-17 16:01:08 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2009-03-20 14:57:12 +01:00
|
|
|
|
2009-03-16 11:08:07 +01:00
|
|
|
#ifndef GENERICPROJECTFILESEDITOR_H
|
|
|
|
|
#define GENERICPROJECTFILESEDITOR_H
|
|
|
|
|
|
|
|
|
|
#include <texteditor/basetexteditor.h>
|
|
|
|
|
#include <texteditor/basetextdocument.h>
|
|
|
|
|
|
|
|
|
|
#include <coreplugin/editormanager/ieditorfactory.h>
|
|
|
|
|
|
2010-04-26 14:02:09 +02:00
|
|
|
namespace TextEditor {
|
|
|
|
|
class TextEditorActionHandler;
|
|
|
|
|
}
|
|
|
|
|
|
2009-03-16 11:08:07 +01:00
|
|
|
namespace GenericProjectManager {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
class Manager;
|
|
|
|
|
class ProjectFilesEditor;
|
2011-02-21 16:02:26 +01:00
|
|
|
class ProjectFilesEditorWidget;
|
2009-03-16 11:08:07 +01:00
|
|
|
class ProjectFilesFactory;
|
|
|
|
|
|
|
|
|
|
class ProjectFilesFactory: public Core::IEditorFactory
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
ProjectFilesFactory(Manager *manager, TextEditor::TextEditorActionHandler *handler);
|
2010-01-29 21:33:57 +01:00
|
|
|
|
2012-08-14 15:37:38 +02:00
|
|
|
Core::IEditor *createEditor(QWidget *parent);
|
2009-03-16 11:08:07 +01:00
|
|
|
|
|
|
|
|
private:
|
2009-03-18 12:18:59 +01:00
|
|
|
TextEditor::TextEditorActionHandler *m_actionHandler;
|
2009-03-16 11:08:07 +01:00
|
|
|
};
|
|
|
|
|
|
2011-02-21 16:02:26 +01:00
|
|
|
class ProjectFilesEditor : public TextEditor::BaseTextEditor
|
2009-03-16 11:08:07 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2011-02-21 16:02:26 +01:00
|
|
|
ProjectFilesEditor(ProjectFilesEditorWidget *editorWidget);
|
2009-03-16 11:08:07 +01:00
|
|
|
|
2012-08-14 15:37:38 +02:00
|
|
|
Core::Id id() const;
|
|
|
|
|
bool duplicateSupported() const;
|
|
|
|
|
Core::IEditor *duplicate(QWidget *parent);
|
2009-03-16 11:08:07 +01:00
|
|
|
};
|
|
|
|
|
|
2011-02-21 16:02:26 +01:00
|
|
|
class ProjectFilesEditorWidget : public TextEditor::BaseTextEditorWidget
|
2009-03-16 11:08:07 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2011-02-21 16:02:26 +01:00
|
|
|
ProjectFilesEditorWidget(QWidget *parent, ProjectFilesFactory *factory,
|
2009-03-16 11:08:07 +01:00
|
|
|
TextEditor::TextEditorActionHandler *handler);
|
|
|
|
|
|
|
|
|
|
ProjectFilesFactory *factory() const;
|
|
|
|
|
TextEditor::TextEditorActionHandler *actionHandler() const;
|
2012-08-14 15:37:38 +02:00
|
|
|
TextEditor::BaseTextEditor *createEditor();
|
2009-03-16 11:08:07 +01:00
|
|
|
|
|
|
|
|
private:
|
2009-03-18 12:18:59 +01:00
|
|
|
ProjectFilesFactory *m_factory;
|
|
|
|
|
TextEditor::TextEditorActionHandler *m_actionHandler;
|
2009-03-16 11:08:07 +01:00
|
|
|
};
|
|
|
|
|
|
2011-02-04 09:52:39 +01:00
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace GenericProjectManager
|
2009-03-16 11:08:07 +01:00
|
|
|
|
|
|
|
|
#endif // GENERICPROJECTFILESEDITOR_H
|