MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / __init__

Method __init__

pyxrf/gui_module/main_window.py:565–653  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

563
564class DialogAbout(QDialog):
565 def __init__(self):
566 super().__init__()
567
568 self.setWindowTitle("About PyXRF")
569 self.setFixedSize(500, 500)
570
571 text_name = "PyXRF"
572 text_description = "X-Ray Fluorescence Analysis Tool"
573
574 text_ver = f"Version: {pyxrf.__version__}"
575 text_latest_ver = "Latest stable version:"
576
577 text_credit = "Credits:"
578 text_credit_org = (
579 "Data Acquisition, Management and Analysis Group\n"
580 "National Synchrontron Light Source II\n"
581 "Brookhaven National Laboratory"
582 )
583
584 text_copyright = f"\u00a92015\u2014{datetime.now().year} Brookhaven National Laboratory"
585
586 label_name = QLabel(text_name)
587 label_name.setStyleSheet("QLabel {font-weight: bold; font-size: 32px}")
588
589 label_description = QLabel(text_description)
590 label_description.setStyleSheet("QLabel {font-style: italic; font-size: 18px}")
591
592 label_ver = QLabel(text_ver)
593 label_latest_ver = QLabel(text_latest_ver)
594 label_credit = QLabel(text_credit)
595 label_org = QLabel(text_credit_org)
596 label_copyright = QLabel(text_copyright)
597
598 button_box = QDialogButtonBox(QDialogButtonBox.Close)
599 button_box.accepted.connect(self.accept)
600 button_box.rejected.connect(self.reject)
601
602 vbox = QVBoxLayout()
603
604 vbox.addStretch(1)
605
606 hbox = QHBoxLayout()
607 hbox.addStretch(1)
608 hbox.addWidget(label_name)
609 hbox.addStretch(1)
610 vbox.addLayout(hbox)
611
612 hbox = QHBoxLayout()
613 hbox.addStretch(1)
614 hbox.addWidget(label_description)
615 hbox.addStretch(1)
616 vbox.addLayout(hbox)
617
618 vbox.addStretch(1)
619
620 hbox = QHBoxLayout()
621 hbox.addSpacing(30)
622 hbox.addWidget(label_ver)

Callers

nothing calls this directly

Calls 2

setStyleSheetMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected