Frapper  1.0a
TagCloudView.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of FRAPPER
4 research.animationsinstitut.de
5 sourceforge.net/projects/frapper
6 
7 Copyright (c) 2008-2009 Filmakademie Baden-Wuerttemberg, Institute of Animation
8 
9 This program is free software; you can redistribute it and/or modify it under
10 the terms of the GNU Lesser General Public License as published by the Free Software
11 Foundation; version 2.1 of the License.
12 
13 This program is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16 
17 You should have received a copy of the GNU Lesser General Public License along with
18 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20 http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
21 -----------------------------------------------------------------------------
22 */
23 
34 
35 #ifndef TAGCLOUDVIEW_H
36 #define TAGCLOUDVIEW_H
37 
38 #define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
39 #define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
40 
41 #include "FrapperPrerequisites.h"
42 #include "BaseGraphicsView.h"
43 #include "ParameterGroup.h"
44 #include "NumberParameter.h"
45 #include "TimelineGraphicsItem.h"
46 #include "ImageNode.h"
47 #include <QtGui>
48 #include <QPointF>
49 
50 namespace PoemReaderNode {
51 using namespace Frapper;
52 
71 
72 class KeyGraphicsItem;
73 
75 {
76 
77  Q_OBJECT
78 
79 public: // constructors and destructors
80 
87  TagCloudView ( QWidget *parent = 0 );
88 
96  virtual ~TagCloudView ();
97 
98 public: // functions
99 
104  void setImage(Node* selectedNode);
105 
110  QImage* getImage();
111 
112  void createImage();
113 
114  void RenderCloud(QTableWidget *wordsTable, int rowsInTable);
115 
116 public slots: //
117 
121  void homeView ();
122 
123 
124 signals:
128  void drag();
129 
130 protected: // event handlers
131 
138  virtual void resizeEvent ( QResizeEvent *event );
139 
143  //virtual void paintEvent(QPaintEvent *event);
144 
145 
146 
147 protected: // functions
148 
149 
150 private: // functions
151 
152 
153 private: // data
154 
155 
160 
164 
168  QImage *m_image;
169 
170  int m_fade;
172 
175  int dDeg;
176  bool useArea;
177  double dRadius;
178 };
179 
180 } // namespace PoemReaderNode
181 
182 #endif