20 ui.Groups->setVisible(
false);
26 ui.Groups->setVisible(
true);
28 ui.Groups->setVisible(
false);
46 QString buttonColourStr =
"background-color: rgb(255, 85, 127, 255)";
47 for (
auto actinide : actinides) {
53 QString buttonColourStr =
"background-color: rgb(255, 255, 0, 255)";
54 for (
auto alkaliMetal : alkaliMetals) {
60 QString buttonColourStr =
"background-color: rgb(170, 170, 127, 255)";
61 for (
auto alkalineEarthMetal : alkalineEarthMetals) {
67 QString buttonColourStr =
"background-color: rgb(0, 255, 255, 255)";
68 for (
auto halogen : halogens) {
74 QString buttonColourStr =
"background-color: rgb(170, 85, 255, 255)";
75 for (
auto lanthanide : lanthanides) {
81 QString buttonColourStr =
"background-color: rgb(255, 170, 255, 255)";
82 for (
auto metalloid : metalloids) {
88 QString buttonColourStr =
"background-color: rgb(255, 170, 0, 255)";
89 for (
auto nobleGas : nobleGases) {
95 QString buttonColourStr =
"background-color: rgb(0, 170, 255, 255)";
96 for (
auto nonMetal : nonMetals) {
102 QString buttonColourStr =
"background-color: rgb(116, 116, 116, 255)";
103 for (
auto postTransMetal : postTransMetals) {
109 QString buttonColourStr =
"background-color: rgb(0, 255, 127, 255)";
110 for (
auto transMetal : transMetals) {
116 QString buttonColourStr =
"background-color: rgb(255, 0, 0, 255)";
125 for (
auto btn_i = AllElementButton.begin(); btn_i != AllElementButton.end(); btn_i++) {
127 (*btn_i)->setDisabled(
false);
134 return (strcmp(buttonToCompare->text().toStdString().c_str(), stringToCompare.toStdString().c_str()) == 0);
151 element->setStyleSheet(
"QPushButton{border:1px solid rgb(0, 0, 0); " + colourStr +
";}" +
152 "QPushButton:checked{ background-color:rgb(175,255,255)}" +
153 "QPushButton:!enabled{background-color: rgb(204,204,204);" +
"}");
157 QString selectedElements =
"";
162 for (
auto &element : elements) {
163 if (element->isChecked()) {
164 selectedElements += element->text() +
",";
167 return selectedElements;
176 QString allCheckedElementsStr =
"";
190 return allCheckedElementsStr;
196 for (
auto &button : buttonsToDisable) {
197 button->setDisabled(
true);