About BornAgain dialog.
Definition at line 24 of file AboutDialog.h.
◆ AboutDialog()
AboutDialog::AboutDialog |
( |
QWidget * |
parent = nullptr | ) |
|
Definition at line 46 of file AboutDialog.cpp.
49 QColor bgColor(240, 240, 240, 255);
51 palette.setColor(QPalette::Window, bgColor);
52 setAutoFillBackground(
true);
55 setWindowTitle(
"About BornAgain");
56 setWindowFlags(Qt::Dialog);
58 auto* detailsLayout =
new QHBoxLayout;
62 auto* mainLayout =
new QVBoxLayout;
63 mainLayout->addLayout(detailsLayout);
66 setLayout(mainLayout);
QBoxLayout * createButtonLayout()
QBoxLayout * createTextLayout()
QBoxLayout * createLogoLayout()
References createButtonLayout(), createLogoLayout(), and createTextLayout().
◆ createButtonLayout()
QBoxLayout * AboutDialog::createButtonLayout |
( |
| ) |
|
|
private |
Definition at line 141 of file AboutDialog.cpp.
143 auto* result =
new QHBoxLayout;
145 auto* closeButton =
new QPushButton(
"Close");
146 connect(closeButton, &QPushButton::clicked,
this, &QDialog::reject);
148 result->addStretch(1);
149 result->addWidget(closeButton);
151 static const char mydata[] = {0x64, 0x65, 0x76, 0x73};
152 QByteArray b = QByteArray::fromRawData(mydata,
sizeof(mydata));
155 installEventFilter(f);
Event filter for global tracking of shortcodes.
References ShortcodeFilter::found().
Referenced by AboutDialog().
◆ createLogoLayout()
QBoxLayout * AboutDialog::createLogoLayout |
( |
| ) |
|
|
private |
Definition at line 69 of file AboutDialog.cpp.
71 auto* result =
new QVBoxLayout;
73 QPixmap logo(
":/images/about_icon.png");
74 auto* label =
new QLabel;
75 label->setPixmap(logo.scaled(120, 120, Qt::KeepAspectRatio));
77 result->addWidget(label);
78 result->addStretch(1);
79 result->setContentsMargins(5, 5, 5, 5);
Referenced by AboutDialog().
◆ createTextLayout()
QBoxLayout * AboutDialog::createTextLayout |
( |
| ) |
|
|
private |
Definition at line 84 of file AboutDialog.cpp.
86 auto* result =
new QVBoxLayout;
90 titleFont.setBold(
true);
94 normalFont.setBold(
false);
97 auto* aboutTitleLabel =
99 aboutTitleLabel->setFont(titleFont);
102 QString description =
"Open-source research software to simulate and fit neutron and x-ray"
103 " reflectometry and grazing-incidence small-angle scattering.";
104 auto* descriptionLabel =
new QLabel(description);
105 descriptionLabel->setFont(normalFont);
106 descriptionLabel->setWordWrap(
true);
109 auto* copyrightLabel =
new QLabel(
"Copyright: Forschungszentrum Jülich GmbH 2012-"
110 + QDate::currentDate().
toString(
"yyyy") +
".");
111 copyrightLabel->setFont(normalFont);
114 auto* homepageLabel = createLinkLabel(
116 " <a href=\"https://www.bornagainproject.org\">www.bornagainproject.org</a>.");
117 homepageLabel->setFont(normalFont);
120 auto* mailingLabel = createLinkLabel(
121 "For updates, subscribe to <a "
122 "href = \"https://lists.fz-juelich.de/mailman/listinfo/BornAgain-announcements\">"
123 "bornagain-announcements</a>.");
124 mailingLabel->setFont(normalFont);
125 mailingLabel->setWordWrap(
true);
127 result->addWidget(aboutTitleLabel);
128 result->addStretch(1);
129 result->addWidget(descriptionLabel);
130 result->addStretch(1);
131 result->addWidget(copyrightLabel);
132 result->addStretch(1);
133 result->addWidget(homepageLabel);
134 result->addStretch(1);
135 result->addWidget(mailingLabel);
136 result->addStretch(1);
static int getLabelFontSize()
QString getBornAgainVersionString()
QString toString(const QModelIndex &index)
Provides string representation of index data.
References GUI::Util::Path::getBornAgainVersionString(), DesignerHelper::getLabelFontSize(), and GUI::View::PropertyEditorFactory::toString().
Referenced by AboutDialog().
The documentation for this class was generated from the following files:
- /home/build/builds/o5h8MZZm/0/mlz/bornagain/GUI/View/Main/AboutDialog.h
- /home/build/builds/o5h8MZZm/0/mlz/bornagain/GUI/View/Main/AboutDialog.cpp