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

kate

  • kate
  • interfaces
plugin.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 
21 #include "plugin.h"
22 #include "plugin.moc"
23 
24 #include <tdeparts/componentfactory.h>
25 
26 namespace Kate
27 {
28 
29  class PrivatePlugin
30  {
31  public:
32  PrivatePlugin ()
33  {
34  }
35 
36  ~PrivatePlugin ()
37  {
38  }
39  };
40 
41  class PrivatePluginViewInterface
42  {
43  public:
44  PrivatePluginViewInterface ()
45  {
46  }
47 
48  ~PrivatePluginViewInterface ()
49  {
50  }
51 
52  };
53 
54 unsigned int Plugin::globalPluginNumber = 0;
55 unsigned int PluginViewInterface::globalPluginViewInterfaceNumber = 0;
56 
57 Plugin::Plugin( Application *application, const char *name ) : TQObject (application, name )
58 {
59  globalPluginNumber++;
60  myPluginNumber = globalPluginNumber;
61 }
62 
63 Plugin::~Plugin()
64 {
65 }
66 
67 unsigned int Plugin::pluginNumber () const
68 {
69  return myPluginNumber;
70 }
71 
72 Application *Plugin::application () const
73 {
74  return Kate::application();
75 }
76 
77 PluginViewInterface::PluginViewInterface()
78 {
79  globalPluginViewInterfaceNumber++;
80  myPluginViewInterfaceNumber = globalPluginViewInterfaceNumber;
81 }
82 
83 PluginViewInterface::~PluginViewInterface()
84 {
85 }
86 
87 unsigned int PluginViewInterface::pluginViewInterfaceNumber () const
88 {
89  return myPluginViewInterfaceNumber;
90 }
91 
92 Plugin *createPlugin ( const char* libname, Application *application, const char *name, const TQStringList &args )
93 {
94  return KParts::ComponentFactory::createInstanceFromLibrary<Plugin>( libname, application, name, args);
95 }
96 
97 PluginViewInterface *pluginViewInterface (Plugin *plugin)
98 {
99  if (!plugin)
100  return 0;
101 
102  return static_cast<PluginViewInterface*>(plugin->tqt_cast("Kate::PluginViewInterface"));
103 }
104 
105 }
106 
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.