NCL Composer  0.1.5
 All Classes Functions Variables Pages
NCLTextualViewPluginFactory.cpp
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 #include "NCLTextualViewPluginFactory.h"
19 #include "ui_TextualPluginPreferencesWidget.h"
20 
21 NCLTextualViewPluginFactory::NCLTextualViewPluginFactory()
22 {
23  prefPageWidget = NULL;
24 }
25 
27 {
28  return new NCLTextualViewPlugin();
29 }
30 
32 {
33  NCLTextualViewPlugin *textualView =
34  qobject_cast<NCLTextualViewPlugin*>(plugin);
35 
36  if (textualView)
37  {
38  delete textualView;
39  textualView = NULL;
40  }
41 }
42 
43 QString NCLTextualViewPluginFactory::id() const
44 {
45  return "br.puc-rio.telemidia.NCLTextualView";
46 }
47 
48 QString NCLTextualViewPluginFactory::name() const
49 {
50  return tr("NCL Textual View");
51 }
52 
53 QIcon NCLTextualViewPluginFactory::icon() const
54 {
55  return QIcon(":/images/ncl.png");
56 }
57 
58 QWidget* NCLTextualViewPluginFactory::getPreferencePageWidget()
59 {
60  /* if (prefPageWidget == NULL)
61  {
62  prefPageWidget = new QFrame();
63  prefPageUi = new Ui::TextPluginPreferencesWidget();
64  prefPageUi->setupUi(prefPageWidget);
65  }
66  return prefPageWidget; */
67  return NULL;
68 }
69 
70 void NCLTextualViewPluginFactory::setDefaultValues()
71 {
72  //TODO
73 }
74 
75 void NCLTextualViewPluginFactory::applyValues()
76 {
77  //TODO
78 }
79 
80 Q_EXPORT_PLUGIN2(ncl_textual_plugin, NCLTextualViewPluginFactory)