Class Avogadro::QtGui::PeriodicTableView#

class PeriodicTableView : public QGraphicsView#

This class implements the view of the periodic table showing all elements.


This is the class that actually draws the widget onto screen. This is the class that should normally be instantiated in order to display a Periodic Table.


Marcus D. Hanwell

Public Functions

explicit PeriodicTableView(QWidget *parent_ = nullptr)#

Constructor - constructs a new PeriodicTableView with an internal instance of PeriodicTableScene.

~PeriodicTableView() override#
inline int element() const#

The currently selected element.

Public Slots

void setElement(int element_)#

element_ – The currently selected element.

void clearKeyPressBuffer()#

This slot is called to clear the key buffer (e.g. after a delay in typing).


void elementChanged(int element)#

Signal emitted when the active element in the PeriodicTableView changes.

Protected Functions

void mouseDoubleClickEvent(QMouseEvent *event) override#

Double click event - select an element and hide the PeriodicTableView.

void keyPressEvent(QKeyEvent *event_) override#

Handles the keyboard events to change the active element.

void resizeEvent(QResizeEvent *event) override#

Handle resize events.