Files
qt-creator/src/plugins/qnx/bardescriptoreditorfactory.h
David Kaspar 3d2ef178f6 Qnx: Fixing Bar Descriptor XML file editor to provide editor actions
BarDescriptorEditorWidget is using TextEditorActionHandler class
to provide editor actions e.g. Undo, Redo, Cut, Copy, Paste accessible
from main menu and using shortcuts.

TextEditorActionHandler.resolveTextEditorWidget() virtual function is
added to all resolving TextEditorWidget for an Editor. This allows
to have IEditor->widget() to have non-BaseTextEditorWidget instances too.

Task-number: QTCREATORBUG-10040
Change-Id: I6f433fc307c13ef2b2a20c48e6473826f2619544
Reviewed-by: David Kaspar <dkaspar@blackberry.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: Tobias Nätterlund <tobias.naetterlund@kdab.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
2013-10-21 10:26:29 +02:00

62 lines
2.1 KiB
C++

/**************************************************************************
**
** Copyright (C) 2013 BlackBerry Limited. All rights reserved.
**
** Contact: BlackBerry (qt@blackberry.com)
** Contact: KDAB (info@kdab.com)
**
** 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://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/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 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
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef QNX_INTERNAL_BARDESCRIPTOREDITORFACTORY_H
#define QNX_INTERNAL_BARDESCRIPTOREDITORFACTORY_H
#include <coreplugin/editormanager/ieditorfactory.h>
namespace TextEditor {
class TextEditorActionHandler;
}
namespace Qnx {
namespace Internal {
class BarDescriptorEditorFactory : public Core::IEditorFactory
{
Q_OBJECT
public:
explicit BarDescriptorEditorFactory(QObject *parent = 0);
~BarDescriptorEditorFactory();
Core::IEditor *createEditor(QWidget *parent);
private:
TextEditor::TextEditorActionHandler *m_actionHandler;
};
} // namespace Internal
} // namespace Qnx
#endif // QNX_INTERNAL_BARDESCRIPTOREDITORFACTORY_H