Frapper  1.0a
Public Slots | Public Member Functions | Private Slots | Private Attributes | List of all members
Frapper::PoemReaderPanel Class Reference

Class representing a view for displaying and editing parameters of nodes. More...

#include <PoemReaderPanel.h>

Inheritance diagram for Frapper::PoemReaderPanel:
Inheritance graph
[legend]
Collaboration diagram for Frapper::PoemReaderPanel:
Collaboration graph
[legend]

Public Slots

void sendPoem (int buttonId)
 Reduces the wordcloud given a word associated to a poem.
 
void visualizeCloud ()
 To visualize the cloud in OGRE.
 
void clicked (int buttonId)
 

Public Member Functions

 PoemReaderPanel (QWidget *parent=0, Qt::WindowFlags flags=0)
 Constructor of the PoemReaderPanel class.
 
virtual ~PoemReaderPanel ()
 Destructor of the PoemReaderPanel class.
 
virtual void registerControl (NodeModel *nodeModel, SceneModel *sceneModel)
 Connects the panel with the scene.
 
QListWidgetItem * addItem (Parameter *parameter, bool groupElement)
 Adds a item to the list.
 
void createWordsTable (Node *selectedNode)
 Fills the table with with the words parameters of the PoemReaderNode.
 
bool findWord (QString word, int &listIndex)
 
bool obtainWord (QString word)
 
void loadXmlFile ()
 
void renderWords (QGraphicsScene *scene, QString word, qreal size, int &posx, int &posy, int &gWordHeight)
 Render the words in the scene view.
 
void clearLayout (QLayout *layout, bool deleteWidgets)
 
- Public Member Functions inherited from Frapper::ViewPanel
 ViewPanel (Type viewPanelType, QWidget *parent=0, Qt::WindowFlags flags=0)
 Constructor of the ViewPanel class.
 
Type getViewPanelType ()
 Returns the type of the view panel.
 
- Public Member Functions inherited from Frapper::Panel
 Panel (QWidget *parent=0, Qt::WindowFlags flags=0)
 Constructor of the Panel class.
 
virtual ~Panel ()
 Destructor of the Panel class.
 
virtual void fillToolBars (QToolBar *mainToolBar, QToolBar *panelToolBar)
 Fills the given tool bars in a panel frame with actions for the panel.
 
QMap< QString, QString > getPanelParameters ()
 Gets the panel parameters. For load and save functionality.
 
virtual void setPanelParameters (const QMap< QString, QString > &parameterMap)
 Sets the panel parameters. For load and save functionality.
 

Private Slots

void updateSelectedNode (Node *selectedNode)
 Is called a node is selected.
 
void update ()
 Updates the panel if the node model changes.
 
void nodeSelected (QListWidgetItem *listItem)
 Updates the scene and the panel if a node is selected in the panel.
 

Private Attributes

NodeModelm_nodeModel
 Node model.
 
Nodem_node
 selected node
 
SceneModelm_sceneModel
 Scene model.
 
QListWidget * m_ListNodes
 List Widget to show all nodes in the scene.
 
QLineEdit * m_lineEdit
 Line Edit to introduce the word to render.
 
QTableWidget * m_wordsTable
 
QStringList m_poemsindex
 
int rowsInTable
 
QStringList poems
 
bool done
 
QGraphicsScene * scene
 
QGraphicsView * view
 
QHBoxLayout * m_hboxLayout
 
QVBoxLayout * m_leftvboxLayout
 
QVBoxLayout * m_rightvboxLayout
 
QPushButton * m_buttonSelector
 
QPushButton * buttonCloudGenerator
 
QTabWidget * m_tabWidget
 
QSignalMapper * m_signalMapper
 

Additional Inherited Members

- Public Types inherited from Frapper::ViewPanel
enum  Type {
  T_Documentation, T_Viewport, T_NetworkEditor, T_HierarchyEditor,
  T_ParameterEditor, T_CurveEditor, T_Timeline, T_PluginPanel,
  T_PainterPanel, T_NumTypes
}
 Nested enumeration for the different types of view panels. More...
 
- Static Public Member Functions inherited from Frapper::Panel
static QString getTypeName (Type panelType)
 Returns the name of the given panel type.
 
static QString getTypeIconName (Type panelType)
 Returns the icon name for the given panel type.
 
- Protected Attributes inherited from Frapper::Panel
QMap< QString, QString > m_parameterMap
 Map with default values. For load and save functionality.
 

Detailed Description

Class representing a view for displaying and editing parameters of nodes.

Constructor & Destructor Documentation

PoemReaderPanel::PoemReaderPanel ( QWidget *  parent = 0,
Qt::WindowFlags  flags = 0 
)

Constructor of the PoemReaderPanel class.

Constructors and Destructors.

Parameters
parentThe parent widget the created instance will be a child of.
flagsExtra widget options.

Constructor of the PoemReaderPanel class.

Parameters
parentThe parent widget the created instance will be a child of.
flagsExtra widget options.
PoemReaderPanel::~PoemReaderPanel ( )
virtual

Destructor of the PoemReaderPanel class.

Destructor of the NetworkPanel class.

Defined virtual to guarantee that the destructor of a derived class will be called if the instance of the derived class is saved in a variable of its parent class type.

Member Function Documentation

void PoemReaderPanel::sendPoem ( int  buttonId)
slot

Reduces the wordcloud given a word associated to a poem.

Reduces the amount of words in the wordCloud (Diana)

void PoemReaderPanel::visualizeCloud ( )
slot

To visualize the cloud in OGRE.

Reduces the amount of words in the wordCloud (Diana)

void PoemReaderPanel::clicked ( int  buttonId)
slot
void PoemReaderPanel::registerControl ( NodeModel nodeModel,
SceneModel sceneModel 
)
virtual

Connects the panel with the scene.

Public Funcitons.

Parameters
*nodeModelNodeModel of the scene
*sceneModelSceneModel of the scene

Connects the panel with the scene.

Parameters
*nodeModelNodeModel of the scene
*sceneModelSceneModel of the scene

Reimplemented from Frapper::Panel.

QListWidgetItem* Frapper::PoemReaderPanel::addItem ( Parameter parameter,
bool  groupElement 
)

Adds a item to the list.

Parameters
parameterParameter to be added to a list
groupElementtrue if element of a parameter group
Returns
the created QListWidgetItem
void PoemReaderPanel::createWordsTable ( Node selectedNode)

Fills the table with with the words parameters of the PoemReaderNode.

Parameters
nodeIs the selected node of the scene
bool Frapper::PoemReaderPanel::findWord ( QString  word,
int &  listIndex 
)
bool Frapper::PoemReaderPanel::obtainWord ( QString  word)
void Frapper::PoemReaderPanel::loadXmlFile ( )
void PoemReaderPanel::renderWords ( QGraphicsScene *  scene,
QString  word,
qreal  size,
int &  posx,
int &  posy,
int &  gWordHeight 
)

Render the words in the scene view.

Render the words in the given view.

\param scene The scene where to render
Parameters
wordThe string to render.
sizeIs the point size of the word according to its frequency of appearance
posxIs the position in X that the word will occupy
posyIs the position in Y that the word will occupy
gWordHeightContains the height of the word with the greates height in one line
void PoemReaderPanel::clearLayout ( QLayout *  layout,
bool  deleteWidgets = true 
)
void PoemReaderPanel::updateSelectedNode ( Node selectedNode)
privateslot

Is called a node is selected.

Private Slots.

Parameters
selecedNodethe selected wich was selected

Is called when a node is selected

Parameters
selectedNodethe node which was selected
void PoemReaderPanel::update ( )
privateslot

Updates the panel if the node model changes.

void PoemReaderPanel::nodeSelected ( QListWidgetItem *  listItem)
privateslot

Updates the scene and the panel if a node is selected in the panel.

Member Data Documentation

NodeModel* Frapper::PoemReaderPanel::m_nodeModel
private

Node model.

Node* Frapper::PoemReaderPanel::m_node
private

selected node

SceneModel* Frapper::PoemReaderPanel::m_sceneModel
private

Scene model.

QListWidget* Frapper::PoemReaderPanel::m_ListNodes
private

List Widget to show all nodes in the scene.

QLineEdit* Frapper::PoemReaderPanel::m_lineEdit
private

Line Edit to introduce the word to render.

QTableWidget* Frapper::PoemReaderPanel::m_wordsTable
private
QStringList Frapper::PoemReaderPanel::m_poemsindex
private
int Frapper::PoemReaderPanel::rowsInTable
private
QStringList Frapper::PoemReaderPanel::poems
private
bool Frapper::PoemReaderPanel::done
private
QGraphicsScene* Frapper::PoemReaderPanel::scene
private
QGraphicsView* Frapper::PoemReaderPanel::view
private
QHBoxLayout* Frapper::PoemReaderPanel::m_hboxLayout
private
QVBoxLayout* Frapper::PoemReaderPanel::m_leftvboxLayout
private
QVBoxLayout* Frapper::PoemReaderPanel::m_rightvboxLayout
private
QPushButton* Frapper::PoemReaderPanel::m_buttonSelector
private
QPushButton* Frapper::PoemReaderPanel::buttonCloudGenerator
private
QTabWidget* Frapper::PoemReaderPanel::m_tabWidget
private
QSignalMapper* Frapper::PoemReaderPanel::m_signalMapper
private

The documentation for this class was generated from the following files: