Loading...
Searching...
No Matches
PeriodicTableView Class Reference

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

`#include <periodictableview.h>`

Inheritance diagram for PeriodicTableView:

## Public Slots

void | setElement (int element_)
void | clearKeyPressBuffer ()

## Signals

void | elementChanged (int element)

## Public Member Functions

| PeriodicTableView (QWidget *parent_=nullptr)
int | element () const

## Protected Member Functions

void | mouseDoubleClickEvent (QMouseEvent *event) override
void | keyPressEvent (QKeyEvent *event_) override
void | resizeEvent (QResizeEvent *event) override

## Detailed Description

<avogadro/qtgui/periodictableview.h>

Author
  Marcus D. Hanwell

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.

## Constructor & Destructor Documentation

## PeriodicTableView()

PeriodicTableView | ( | QWidget * | parent_ = nullptr | ) |

explicit

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

## Member Function Documentation

## element()

int element | ( |  | ) | const

Returns
  The currently selected element.

## setElement

void setElement | ( | int | element_ | ) |

slot

Parameters

  element_ | The currently selected element.

## clearKeyPressBuffer

void clearKeyPressBuffer | ( |  | ) |

slot

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

## elementChanged

void elementChanged | ( | int | element | ) |

signal

Signal emitted when the active element in the PeriodicTableView changes.

## mouseDoubleClickEvent()

void mouseDoubleClickEvent | ( | QMouseEvent * | event | ) |

override protected

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

## keyPressEvent()

void keyPressEvent | ( | QKeyEvent * | event_ | ) |

override protected

Handles the keyboard events to change the active element.

## resizeEvent()

void resizeEvent | ( | QResizeEvent * | event | ) |

override protected

Handle resize events.

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

- periodictableview.h