File indexing completed on 2024-05-19 04:36:35

0001 /* This file is part of the TikZKit project.
0002  *
0003  * Copyright (C) 2014 Dominik Haumann <dhaumann@kde.org>
0004  * Copyright (C) 2014 Christoph Cullmann <cullmann@kde.org>
0005  *
0006  * This library is free software; you can redistribute it and/or modify
0007  * it under the terms of the GNU Library General Public License as published
0008  * by the Free Software Foundation, either version 2 of the License, or
0009  * (at your option) any later version.
0010  *
0011  * This library is distributed in the hope that it will be useful,
0012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014  * GNU Library General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU Library General Public License
0017  * along with this library; see the file COPYING.LIB.  If not, see
0018  * <http://www.gnu.org/licenses/>.
0019  */
0020 
0021 #include "EditorPrivate.h"
0022 
0023 namespace tikz {
0024 namespace ui {
0025 
0026 Editor::Editor(EditorPrivate *impl)
0027     : QObject()
0028     , d(impl)
0029 {
0030 }
0031 
0032 Editor::~Editor()
0033 {
0034     // do not delete d here, since the singleton instance is killed
0035     // through the qt hook at application exit.
0036 }
0037 
0038 Editor * Editor::instance()
0039 {
0040     // return internal private singleton
0041     return tikz::ui::EditorPrivate::self();
0042 }
0043 
0044 }
0045 }
0046 
0047 // kate: indent-width 4; replace-tabs on;