Class Avogadro::QtGui::PeriodicTableView

class Avogadro::QtGui::PeriodicTableView : public QGraphicsView

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

<avogadro/qtgui/periodictableview.h>

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.

Author

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
Returns

The currently selected element.

Public Slots

void setElement(int element_)
Parameters

element_ – The currently selected element.

void clearKeyPressBuffer()

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

Signals

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.