1 /**************************************************************************** 2 ** 3 ** Copyright (C) 2016 The Qt Company Ltd. 4 ** Contact: https://www.qt.io/licensing/ 5 ** 6 ** This file is part of Qt Creator. 7 ** 8 ** Commercial License Usage 9 ** Licensees holding valid commercial Qt licenses may use this file in 10 ** accordance with the commercial license agreement provided with the 11 ** Software or, alternatively, in accordance with the terms contained in 12 ** a written agreement between you and The Qt Company. For licensing terms 13 ** and conditions see https://www.qt.io/terms-conditions. For further 14 ** information use the contact form at https://www.qt.io/contact-us. 15 ** 16 ** GNU General Public License Usage 17 ** Alternatively, this file may be used under the terms of the GNU 18 ** General Public License version 3 as published by the Free Software 19 ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT 20 ** included in the packaging of this file. Please review the following 21 ** information to ensure the GNU General Public License requirements will 22 ** be met: https://www.gnu.org/licenses/gpl-3.0.html. 23 ** 24 ****************************************************************************/ 25 26 #pragma once 27 28 #include <QToolBar> 29 #include <QUndoGroup> 30 31 #include <QCoreApplication> 32 #include <coreplugin/editortoolbar.h> 33 #include <coreplugin/icontext.h> 34 35 using namespace Core; 36 37 namespace ScxmlEditor { 38 namespace Internal { 39 40 class ScxmlTextEditorFactory; 41 class ScxmlEditorWidget; 42 class ScxmlEditorStack; 43 44 class ScxmlEditorData : public QObject 45 { 46 Q_OBJECT 47 public: 48 ScxmlEditorData(); 49 ~ScxmlEditorData() override; 50 51 void fullInit(); 52 IEditor *createEditor(); 53 54 private: 55 void updateToolBar(); 56 QWidget *createModeWidget(); 57 EditorToolBar *createMainToolBar(); 58 59 Context m_contexts; 60 QWidget *m_modeWidget = nullptr; 61 ScxmlEditorStack *m_widgetStack = nullptr; 62 QToolBar *m_widgetToolBar = nullptr; 63 EditorToolBar *m_mainToolBar = nullptr; 64 QUndoGroup *m_undoGroup = nullptr; 65 QAction *m_undoAction = nullptr; 66 QAction *m_redoAction = nullptr; 67 68 ScxmlTextEditorFactory *m_xmlEditorFactory = nullptr; 69 }; 70 71 } // namespace Internal 72 } // namespace ScxmlEditor 73