kate
pluginconfiginterface.cpp
Go to the documentation of this file.00001 /* This file is part of the KDE project 00002 Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00016 Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #include "pluginconfiginterface.h" 00020 00021 #include "plugin.h" 00022 00023 namespace Kate 00024 { 00025 00026 class PrivatePluginConfigInterface 00027 { 00028 public: 00029 PrivatePluginConfigInterface() {} 00030 ~PrivatePluginConfigInterface() {} 00031 }; 00032 00033 } 00034 00035 using namespace Kate; 00036 00037 unsigned int PluginConfigInterface::globalPluginConfigInterfaceNumber = 0; 00038 00039 PluginConfigInterface::PluginConfigInterface() 00040 { 00041 globalPluginConfigInterfaceNumber++; 00042 myPluginConfigInterfaceNumber = globalPluginConfigInterfaceNumber++; 00043 00044 d = new PrivatePluginConfigInterface(); 00045 } 00046 00047 PluginConfigInterface::~PluginConfigInterface() 00048 { 00049 delete d; 00050 } 00051 00052 unsigned int PluginConfigInterface::pluginConfigInterfaceNumber () const 00053 { 00054 return myPluginConfigInterfaceNumber; 00055 } 00056 00057 PluginConfigInterface *Kate::pluginConfigInterface (Plugin *plugin) 00058 { 00059 if (!plugin) 00060 return 0; 00061 00062 return static_cast<PluginConfigInterface*>(plugin->qt_cast("Kate::PluginConfigInterface")); 00063 }