• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kate
 

kate

  • kate
  • interfaces
application.cpp
1 /* This file is part of the KDE project
2  Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
3 
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.
7 
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.
12 
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.
17 */
18 
19 #include "application.h"
20 #include "application.moc"
21 
22 #include "documentmanager.h"
23 #include "mainwindow.h"
24 #include "pluginmanager.h"
25 
26 #include "../app/kateapp.h"
27 #include "../app/katedocmanager.h"
28 #include "../app/katepluginmanager.h"
29 #include "../app/katemainwindow.h"
30 
31 namespace Kate
32 {
33 
34 class PrivateApplication
35  {
36  public:
37  PrivateApplication ()
38  {
39  }
40 
41  ~PrivateApplication ()
42  {
43 
44  }
45 
46  KateApp *app;
47  };
48 
49 Application::Application (void *application) : TQObject ((KateApp *) application)
50 {
51  d = new PrivateApplication;
52  d->app = (KateApp *) application;
53 }
54 
55 Application::~Application ()
56 {
57  delete d;
58 }
59 
60 DocumentManager *Application::documentManager ()
61 {
62  return d->app->documentManager ()->documentManager ();
63 }
64 
65 PluginManager *Application::pluginManager ()
66 {
67  return d->app->pluginManager ()->pluginManager ();
68 }
69 
70 MainWindow *Application::activeMainWindow ()
71 {
72  if (!d->app->activeMainWindow())
73  return 0;
74 
75  return d->app->activeMainWindow()->mainWindow();
76 }
77 
78 uint Application::mainWindows ()
79 {
80  return d->app->mainWindows ();
81 }
82 
83 MainWindow *Application::mainWindow (uint n)
84 {
85  if (n < mainWindows ())
86  return d->app->mainWindow (n)->mainWindow();
87 
88  return 0;
89 }
90 
91 Application *application ()
92 {
93  return KateApp::self()->application ();
94 }
95 
96 }
97 
KateApp
Kate Application This class represents the core kate application object.
Definition: kateapp.h:43
KateApp::application
Kate::Application * application()
accessor to the Kate::Application plugin interface
Definition: kateapp.cpp:119
KateApp::self
static KateApp * self()
static accessor to avoid casting ;)
Definition: kateapp.cpp:114
Kate::Application
Interface to the application, beside some global methodes to access other objects like document/proje...
Definition: application.h:39
Kate::Application::Application
Application(void *application)
Construtor, should not interest, internal usage.
Definition: application.cpp:49
Kate::Application::~Application
virtual ~Application()
Desctructor.
Definition: application.cpp:55
Kate::Application::documentManager
Kate::DocumentManager * documentManager()
Returns a pointer to the document manager.
Definition: application.cpp:60
Kate::DocumentManager
This interface provides access to the Kate Document Manager.
Definition: documentmanager.h:30
Kate::PluginManager
This interface provides access to the Kate Plugin Manager.
Definition: pluginmanager.h:31
Kate
Namespace collecting as much of the internal Kate classes as we can manage.
Definition: kateapp.h:32
Kate::application
Application * application()
Returns the application object.
Definition: application.cpp:91

kate

Skip menu "kate"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kate

Skip menu "kate"
  • kate
  • libkonq
  • twin
  •   lib
Generated for kate by doxygen 1.9.1
This website is maintained by Timothy Pearson.