Mantid
Loading...
Searching...
No Matches
qt
widgets
plugins
algorithm_dialogs
inc
MantidQtWidgets
Plugins
AlgorithmDialogs
PeriodicTableWidget.h
Go to the documentation of this file.
1
// Mantid Repository : https://github.com/mantidproject/mantid
2
//
3
// Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI,
4
// NScD Oak Ridge National Laboratory, European Spallation Source,
5
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6
// SPDX - License - Identifier: GPL - 3.0 +
7
#pragma once
8
9
#include "
MantidQtWidgets/Common/DllOption.h
"
10
#include "ui_PeriodicTableWidget.h"
11
#include <QVector>
12
#include <QWidget>
13
19
class
PeriodicTableWidget
:
public
QWidget {
20
Q_OBJECT
21
22
public
:
24
PeriodicTableWidget
(QWidget *parent =
nullptr
);
26
~PeriodicTableWidget
()
override
{};
28
QVector<QPushButton *>
OtherNonMetals
;
29
QVector<QPushButton *>
AlkaliMetals
;
30
QVector<QPushButton *>
AlkalineEarthMetals
;
31
QVector<QPushButton *>
TransitionMetals
;
32
QVector<QPushButton *>
Actinides
;
33
QVector<QPushButton *>
Lanthanides
;
34
QVector<QPushButton *>
UnknownProperties
;
35
QVector<QPushButton *>
PostTransitionMetals
;
36
QVector<QPushButton *>
Metalloids
;
37
QVector<QPushButton *>
Halogens
;
38
QVector<QPushButton *>
NobleGases
;
39
41
QVector<QVector<QPushButton *>>
AllElementButtons
;
42
45
QString
elementsSelectedToString
(
const
QVector<QPushButton *> &elementsSelected);
46
49
QString
getAllCheckedElementsStr
();
50
52
void
disableButtons
(QVector<QPushButton *> buttons);
53
55
void
disableAllElementButtons
();
56
58
void
enableButtonByName
(
const
QString &elementStr);
59
62
bool
compareButtonNameToStr
(QPushButton *buttonToCompare,
const
QString &stringToCompare);
63
65
void
showGroupLegend
(
bool
checked);
66
67
QString
getValue
();
68
69
private
:
71
Ui::PeriodicTable
ui
;
73
void
ColourNonMetals
(
const
QVector<QPushButton *> &nonMetals);
74
void
ColourAlkaliMetals
(
const
QVector<QPushButton *> &alkaliMetals);
75
void
ColourAlkalineEarthMetals
(
const
QVector<QPushButton *> &alkalineEarthMetals);
76
void
ColourTransitionMetals
(
const
QVector<QPushButton *> &transMetals);
77
void
ColourActinides
(
const
QVector<QPushButton *> &actinides);
78
void
ColourLanthanides
(
const
QVector<QPushButton *> &lanthanides);
79
void
ColourPostTransitionMetals
(
const
QVector<QPushButton *> &postTransMetals);
80
void
ColourUnknownProperties
(
const
QVector<QPushButton *> &unknownProperties);
81
void
ColourMetalloids
(
const
QVector<QPushButton *> &metalloids);
82
void
ColourHalogens
(
const
QVector<QPushButton *> &halogens);
83
void
ColourNobleGases
(
const
QVector<QPushButton *> &nobleGases);
84
86
void
ColourButton
(QPushButton *elementButton,
const
QString &colour);
87
89
void
populateGroupVectors
();
90
92
void
populateAllButtonsVector
();
93
95
void
ColourElements
();
96
};
DllOption.h
PeriodicTableWidget
PeriodicTableWidget: A Widget representing a colour coded Periodic Table of Elements,...
Definition:
PeriodicTableWidget.h:19
PeriodicTableWidget::ColourElements
void ColourElements()
Colour all of the elements by calls to individual group colouring methods.
Definition:
PeriodicTableWidget.cpp:32
PeriodicTableWidget::ColourPostTransitionMetals
void ColourPostTransitionMetals(const QVector< QPushButton * > &postTransMetals)
Definition:
PeriodicTableWidget.cpp:101
PeriodicTableWidget::compareButtonNameToStr
bool compareButtonNameToStr(QPushButton *buttonToCompare, const QString &stringToCompare)
Definition:
PeriodicTableWidget.cpp:133
PeriodicTableWidget::populateAllButtonsVector
void populateAllButtonsVector()
Method to populate Vector with all Group vectors.
Definition:
PeriodicTableWidget.cpp:335
PeriodicTableWidget::~PeriodicTableWidget
~PeriodicTableWidget() override
Destructor.
Definition:
PeriodicTableWidget.h:26
PeriodicTableWidget::NobleGases
QVector< QPushButton * > NobleGases
Definition:
PeriodicTableWidget.h:38
PeriodicTableWidget::Lanthanides
QVector< QPushButton * > Lanthanides
Definition:
PeriodicTableWidget.h:33
PeriodicTableWidget::ColourHalogens
void ColourHalogens(const QVector< QPushButton * > &halogens)
Definition:
PeriodicTableWidget.cpp:66
PeriodicTableWidget::PostTransitionMetals
QVector< QPushButton * > PostTransitionMetals
Definition:
PeriodicTableWidget.h:35
PeriodicTableWidget::getAllCheckedElementsStr
QString getAllCheckedElementsStr()
Definition:
PeriodicTableWidget.cpp:170
PeriodicTableWidget::showGroupLegend
void showGroupLegend(bool checked)
Displays or hides the Legend for the colour coding of periodic groups.
Definition:
PeriodicTableWidget.cpp:24
PeriodicTableWidget::enableButtonByName
void enableButtonByName(const QString &elementStr)
Enables a button for an element by the element name i.e 'Au' for Gold.
Definition:
PeriodicTableWidget.cpp:123
PeriodicTableWidget::ColourNonMetals
void ColourNonMetals(const QVector< QPushButton * > &nonMetals)
Methods to colour element buttons by periodic group.
Definition:
PeriodicTableWidget.cpp:94
PeriodicTableWidget::ColourAlkaliMetals
void ColourAlkaliMetals(const QVector< QPushButton * > &alkaliMetals)
Definition:
PeriodicTableWidget.cpp:52
PeriodicTableWidget::ColourLanthanides
void ColourLanthanides(const QVector< QPushButton * > &lanthanides)
Definition:
PeriodicTableWidget.cpp:73
PeriodicTableWidget::getValue
QString getValue()
Definition:
PeriodicTableWidget.cpp:193
PeriodicTableWidget::Actinides
QVector< QPushButton * > Actinides
Definition:
PeriodicTableWidget.h:32
PeriodicTableWidget::UnknownProperties
QVector< QPushButton * > UnknownProperties
Definition:
PeriodicTableWidget.h:34
PeriodicTableWidget::ColourNobleGases
void ColourNobleGases(const QVector< QPushButton * > &nobleGases)
Definition:
PeriodicTableWidget.cpp:87
PeriodicTableWidget::ColourAlkalineEarthMetals
void ColourAlkalineEarthMetals(const QVector< QPushButton * > &alkalineEarthMetals)
Definition:
PeriodicTableWidget.cpp:59
PeriodicTableWidget::ui
Ui::PeriodicTable ui
The Form containing the PeriodicTableWidget.
Definition:
PeriodicTableWidget.h:71
PeriodicTableWidget::elementsSelectedToString
QString elementsSelectedToString(const QVector< QPushButton * > &elementsSelected)
Definition:
PeriodicTableWidget.cpp:156
PeriodicTableWidget::ColourButton
void ColourButton(QPushButton *elementButton, const QString &colour)
Methods to colour single element button by setting styleSheet.
Definition:
PeriodicTableWidget.cpp:150
PeriodicTableWidget::TransitionMetals
QVector< QPushButton * > TransitionMetals
Definition:
PeriodicTableWidget.h:31
PeriodicTableWidget::disableButtons
void disableButtons(QVector< QPushButton * > buttons)
Disables all buttons associated with a group.
Definition:
PeriodicTableWidget.cpp:195
PeriodicTableWidget::populateGroupVectors
void populateGroupVectors()
Method to populate Group Vectors with element QPushButtons.
Definition:
PeriodicTableWidget.cpp:201
PeriodicTableWidget::ColourMetalloids
void ColourMetalloids(const QVector< QPushButton * > &metalloids)
Definition:
PeriodicTableWidget.cpp:80
PeriodicTableWidget::disableAllElementButtons
void disableAllElementButtons()
Disables All buttons in periodicTableWidget.
Definition:
PeriodicTableWidget.cpp:137
PeriodicTableWidget::ColourTransitionMetals
void ColourTransitionMetals(const QVector< QPushButton * > &transMetals)
Definition:
PeriodicTableWidget.cpp:108
PeriodicTableWidget::ColourActinides
void ColourActinides(const QVector< QPushButton * > &actinides)
Definition:
PeriodicTableWidget.cpp:45
PeriodicTableWidget::Halogens
QVector< QPushButton * > Halogens
Definition:
PeriodicTableWidget.h:37
PeriodicTableWidget::AllElementButtons
QVector< QVector< QPushButton * > > AllElementButtons
Vector to hold all group vectors for access to All Buttons at once.
Definition:
PeriodicTableWidget.h:41
PeriodicTableWidget::Metalloids
QVector< QPushButton * > Metalloids
Definition:
PeriodicTableWidget.h:36
PeriodicTableWidget::ColourUnknownProperties
void ColourUnknownProperties(const QVector< QPushButton * > &unknownProperties)
Definition:
PeriodicTableWidget.cpp:115
PeriodicTableWidget::OtherNonMetals
QVector< QPushButton * > OtherNonMetals
Vectors to Hold the QPushButtons of Elements in corresponding Groups.
Definition:
PeriodicTableWidget.h:28
PeriodicTableWidget::AlkalineEarthMetals
QVector< QPushButton * > AlkalineEarthMetals
Definition:
PeriodicTableWidget.h:30
PeriodicTableWidget::AlkaliMetals
QVector< QPushButton * > AlkaliMetals
Definition:
PeriodicTableWidget.h:29
Generated on Tue Jan 3 2023 11:58:02 for Mantid by
1.9.5