NCL Composer  0.1.5
 All Classes Functions Variables Pages
PropertiesViewPlugin.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 PROPERTIESVIEWPLUGIN_H
19 #define PROPERTIESVIEWPLUGIN_H
20 
21 #include <QObject>
22 #include <QGridLayout>
23 #include <QPushButton>
24 #include <QListWidget>
25 #include <QListWidgetItem>
26 
27 #include <core/extensions/IPlugin.h>
28 using namespace composer::extension;
29 
30 #include "PropertyEditor.h"
31 
37 {
38  Q_OBJECT
39 private:
40  QListWidget *list;
41  PropertyEditor *window;
42  Entity *currentEntity;
43  QString currentEntityId;
44 
45 public:
49  explicit PropertiesViewPlugin();
59  void init();
69  QWidget* getWidget();
77  bool saveSubsession();
78 
79 public slots:
89  void onEntityAdded(QString pluginID, Entity *);
99  void onEntityChanged(QString pluginID, Entity *);
107  void onEntityRemoved(QString pluginID, QString entityID);
114  void errorMessage(QString error);
120  void changeSelectedEntity (QString pluginID, void*);
121 
125  void validationError(QString pluginID, void * param);
126 
127 private slots:
131  void updateCurrentEntity(QString errorMessage="");
138  void updateCurrentEntityAttr(QString attr, QString value);
139 };
140 
141 #endif // PROPERTIESVIEWPLUGIN_H