[KLF Application][KLF Tools][KLF Backend][KLF Home]
KLatexFormula Project
klfpluginiface.h
Go to the documentation of this file.
1 /***************************************************************************
2  * file klfpluginiface.h
3  * This file is part of the KLatexFormula Project.
4  * Copyright (C) 2011 by Philippe Faist
5  * philippe.faist at bluewin.ch
6  * *
7  * This program is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this program; if not, write to the *
19  * Free Software Foundation, Inc., *
20  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21  ***************************************************************************/
22 /* $Id: klfpluginiface.h 603 2011-02-26 23:14:55Z phfaist $ */
23 
24 #ifndef KLFPLUGINIFACE_H
25 #define KLFPLUGINIFACE_H
26 
27 #include <QObject>
28 #include <QString>
29 #include <QVariant>
30 
31 #include <qapplication.h>
32 
33 
34 class KLFMainWin;
36 
37 
41 {
42 public:
44 
45  enum PluginInfo {
51  };
52 
53  virtual QVariant pluginInfo(PluginInfo which) const = 0;
54 
55  inline QString pluginName() const { return pluginInfo(PluginName).toString(); }
56  inline QString pluginTitle() const { return pluginInfo(PluginTitle).toString(); }
57  inline QString pluginAuthor() const { return pluginInfo(PluginAuthor).toString(); }
59  inline bool pluginDefaultLoadEnable() const { return pluginInfo(PluginDefaultEnable).toBool(); }
60 
61  virtual void initialize(QApplication *app, KLFMainWin *mainWin, KLFPluginConfigAccess *config) = 0;
62 
63  virtual QWidget * createConfigWidget(QWidget *parent) = 0;
64 
65  virtual void loadFromConfig(QWidget *configWidget, KLFPluginConfigAccess *config) = 0;
66  virtual void saveToConfig(QWidget *configWidget, KLFPluginConfigAccess *config) = 0;
67 
68 };
69 
71  "org.klatexformula.KLatexFormula.Plugin.GenericInterface/1.1");
72 
73 #endif
Q_DECLARE_INTERFACE(KLFPluginGenericInterface,"org.klatexformula.KLatexFormula.Plugin.GenericInterface/1.1")
virtual QVariant pluginInfo(PluginInfo which) const =0
Utility class for plugins to access their configuration space in KLFConfig.
Definition: klfconfig.h:61
virtual void loadFromConfig(QWidget *configWidget, KLFPluginConfigAccess *config)=0
QString pluginName() const
QString pluginAuthor() const
virtual ~KLFPluginGenericInterface()
virtual void saveToConfig(QWidget *configWidget, KLFPluginConfigAccess *config)=0
QString pluginDescription() const
virtual void initialize(QApplication *app, KLFMainWin *mainWin, KLFPluginConfigAccess *config)=0
QString pluginTitle() const
virtual QWidget * createConfigWidget(QWidget *parent)=0
bool pluginDefaultLoadEnable() const

Generated by doxygen 1.8.6