cherish
Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
CanvasPhotoWidget Class Reference

Re-defined QTreeWidget that contains info on canvases and their photos. Contains method to obtain corresponding delegate, as well as related signals and slots for content modification. More...

#include <TreeWidget.h>

Inheritance diagram for CanvasPhotoWidget:

Public Slots

void onCanvasAdded (const std::string &name)
 
void onPhotoAdded (const std::string &name, int rowParent)
 
void onCanvasRemoved (int row)
 
void onPhotoRemoved (int rowP, int row)
 
void onCanvasSelectedColor (int row, int color)
 
void onCanvasVisibilitySet (int row, bool visibility)
 

Signals

void rightClicked (const QModelIndex &index)
 
void photoDraggedAndDropped (int parent, int start, int end, int destination, int row)
 

Public Member Functions

 CanvasPhotoWidget (QWidget *parent=0)
 
CanvasDelegategetCanvasDelegate () const
 

Protected Member Functions

virtual void mousePressEvent (QMouseEvent *event)
 

Detailed Description

Re-defined QTreeWidget that contains info on canvases and their photos. Contains method to obtain corresponding delegate, as well as related signals and slots for content modification.

Constructor & Destructor Documentation

§ CanvasPhotoWidget()

CanvasPhotoWidget::CanvasPhotoWidget ( QWidget *  parent = 0)

Constructor.

Member Function Documentation

§ getCanvasDelegate()

CanvasDelegate * CanvasPhotoWidget::getCanvasDelegate ( ) const
Returns
a non-const pointer to CanvasDelegate.

§ onCanvasAdded

void CanvasPhotoWidget::onCanvasAdded ( const std::string &  name)
slot

Slot called after a canvas was added to scene graph.

Parameters
nameis the string name of the canvas that will be added as a new item to the widget.

§ onCanvasRemoved

void CanvasPhotoWidget::onCanvasRemoved ( int  row)
slot

Slot called after a canvas is removed from scene graph.

Parameters
rowis the integer row of an item to be removed from the canvas widget.

§ onCanvasSelectedColor

void CanvasPhotoWidget::onCanvasSelectedColor ( int  row,
int  color 
)
slot

Slot called whenever the status of canvas is changed: to "current", or "previous" or "rest".

Parameters
rowis the integer row number of the corresponding item in the widget,
coloris a color indicator

§ onCanvasVisibilitySet

void CanvasPhotoWidget::onCanvasVisibilitySet ( int  row,
bool  visibility 
)
slot

Slot called whenever canvas visibility is set (not by user), e.g., on file read or by going to specific bookmark.

§ onPhotoAdded

void CanvasPhotoWidget::onPhotoAdded ( const std::string &  name,
int  rowParent 
)
slot

Slot called after a photo was added to scene graph.

Parameters
nameis the string name of newly added photo,
rowParentis the index of canvas-parent.

§ onPhotoRemoved

void CanvasPhotoWidget::onPhotoRemoved ( int  rowP,
int  row 
)
slot

Slot called after a photo was removed from scene graph.

Parameters
rowPis row index of canvas-parent,
rowis the index of photo-child.

§ photoDraggedAndDropped

void CanvasPhotoWidget::photoDraggedAndDropped ( int  parent,
int  start,
int  end,
int  destination,
int  row 
)
signal

Signal to inform whenver user performs drag-and-drop action.

§ rightClicked

void CanvasPhotoWidget::rightClicked ( const QModelIndex &  index)
signal

Signal to inform whenver user performs a right click action.


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