NCL Composer  0.1.5
 All Classes Functions Variables Pages
NCLTextualViewPluginFactory.h
1 /*
2  * Copyright 2011 TeleMidia/PUC-Rio.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library. If not, see
16  * <http://www.gnu.org/licenses/>.
17  */
18 #ifndef NCLTEXTUALVIEWPLUGINFACTORY_H
19 #define NCLTEXTUALVIEWPLUGINFACTORY_H
20 
21 #include "NCLTextualViewPlugin_global.h"
22 
23 #include <core/extensions/IPluginFactory.h>
24 using namespace composer::extension;
25 
26 
27 #include "NCLTextualViewPlugin_global.h"
28 #include "NCLTextualViewPlugin.h"
29 
30 namespace Ui {
31 class TextPluginPreferencesWidget;
32 }
33 
37 class NCLTextualViewPluginFactory : public QObject,
38  public IPluginFactory
39 {
40  Q_OBJECT
41  Q_INTERFACES(IPluginFactory)
42 
43 public:
45 
46  IPlugin* createPluginInstance();
47 
48  void releasePluginInstance(IPlugin *);
49 
50  QString id() const;
51 
52  QString name() const;
53 
54  QIcon icon() const;
55 
56  QWidget* getPreferencePageWidget();
57 
58  void setDefaultValues();
59 
60  void applyValues();
61 
67  QString version() { return NCLCOMPOSER_PLUGINS_VERSION; }
74  QString compatVersion() {return "0.1";}
80  QString vendor() {return "Telemidia Lab";}
86  QString copyright() {return "Telemidia/PUC-Rio";}
93  QString license() {return "LGPL";}
94 
100  QString description() {return tr("NCL Textual plugin enable the user to "
101  "edit the application directly through its source code. Additionally, "
102  "this plugin brings features like code coloring and autocomplete.");}
103 
104  QString url() {return "http://composer.telemidia.puc-rio.br/textual";}
105 
111  QString category() {return "NCL";}
112 
113 private:
114  QFrame *prefPageWidget;
115  Ui::TextPluginPreferencesWidget *prefPageUi;
116 
117 };
118 
119 #endif // NCLTEXTUALVIEWPLUGINFACTORY_H