Avogadro  1.1.0
Public Slots | Signals | Public Member Functions | Protected Member Functions
Avogadro::PeriodicTableScene Class Reference

This class encapsulates the scene, all items are contained in it. More...

#include <periodictablescene_p.h>

Inheritance diagram for Avogadro::PeriodicTableScene:
Inheritance graph
[legend]

List of all members.

Public Slots

void changeElement (int element)

Signals

void elementChanged (int element)

Public Member Functions

 PeriodicTableScene (QObject *parent=0)

Protected Member Functions

bool event (QEvent *e)
void mousePressEvent (QGraphicsSceneMouseEvent *event)
void mouseMoveEvent (QGraphicsSceneMouseEvent *event)
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)

Detailed Description

This class encapsulates the scene, all items are contained in it.

Author:
Marcus D. Hanwell This class implements a QGraphicsScene that holds all of the element items. Any items owned by this class are automatically deleted by it.

Constructor & Destructor Documentation


Member Function Documentation

void Avogadro::PeriodicTableScene::changeElement ( int  element) [slot]

This slot is called when an element is changed. (e.g., by keyboard or code)

Since:
version 1.1

References QGraphicsItem::data(), elementChanged(), QGraphicsScene::items(), QGraphicsItem::setSelected(), and QVariant::toInt().

Referenced by Avogadro::PeriodicTableView::keyPressEvent().

void Avogadro::PeriodicTableScene::elementChanged ( int  element) [signal]

This signal is emitted when an element item is clicked.

Referenced by changeElement(), mousePressEvent(), and PeriodicTableScene().

bool Avogadro::PeriodicTableScene::event ( QEvent e) [protected, virtual]

Generic event handler, currently defaults to calling parent class (included for future compatibility)

Reimplemented from QGraphicsScene.

Not used at present.

Reimplemented from QGraphicsScene.

Handles the mouse press events to change the active element.

Reimplemented from QGraphicsScene.

References QGraphicsSceneMouseEvent::button(), QGraphicsItem::data(), elementChanged(), QGraphicsScene::itemAt(), QGraphicsSceneMouseEvent::scenePos(), and QVariant::toInt().

Not used at present.

Reimplemented from QGraphicsScene.


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