1
/* This file is part of the KDE project
2
Copyright (C) 2010 Dominik Haumann <dhaumann kde org>
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Library General Public
6
License version 2 as published by the Free Software Foundation.
8
This library is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
Library General Public License for more details.
13
You should have received a copy of the GNU Library General Public License
14
along with this library; see the file COPYING.LIB. If not, write to
15
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16
Boston, MA 02110-1301, USA.
19
#ifndef __KWRITE_APP_H__
20
#define __KWRITE_APP_H__
22
#include "kwritemain.h"
24
#include <KApplication>
25
#include <ktexteditor/editor.h>
26
#include <ktexteditor/containerinterface.h>
39
* This class represents the core kwrite application object
43
, public KTextEditor::MdiContainer
46
Q_INTERFACES(KTextEditor::MdiContainer)
49
// constructors & accessor to app object
53
* application constructor
54
* @param args parsed command line args
56
KWriteApp(KCmdLineArgs *args);
59
* application destructor
64
* static accessor to avoid casting ;)
65
* @return app instance
67
static KWriteApp *self ();
70
* further initialization
77
KTextEditor::Editor *editor () { return m_editor; }
80
// KTextEditor::MdiContainer
83
virtual void setActiveView( KTextEditor::View * view );
84
virtual KTextEditor::View * activeView();
85
virtual KTextEditor::Document * createDocument();
86
virtual bool closeDocument( KTextEditor::Document * doc );
87
virtual KTextEditor::View * createView( KTextEditor::Document * doc );
88
virtual bool closeView( KTextEditor::View * view );
92
* kate's command line args
99
QList<KWrite*> m_mainWindows;
104
KTextEditor::Editor *m_editor;
108
// kate: space-indent on; indent-width 2; replace-tabs on;