About BornAgain dialog.
More...
About BornAgain dialog.
Definition at line 24 of file aboutapplicationdialog.h.
◆ AboutApplicationDialog()
AboutApplicationDialog::AboutApplicationDialog |
( |
QWidget * |
parent = 0 | ) |
|
Definition at line 56 of file aboutapplicationdialog.cpp.
58 QColor bgColor(240, 240, 240, 255);
60 palette.setColor(QPalette::Window, bgColor);
61 setAutoFillBackground(
true);
64 setWindowTitle(
"About BornAgain");
65 setWindowFlags(Qt::Dialog);
67 QHBoxLayout* detailsLayout =
new QHBoxLayout;
71 QVBoxLayout* mainLayout =
new QVBoxLayout;
72 mainLayout->addLayout(detailsLayout);
75 setLayout(mainLayout);
QBoxLayout * createButtonLayout()
QBoxLayout * createLogoLayout()
QBoxLayout * createTextLayout()
References createButtonLayout(), createLogoLayout(), and createTextLayout().
◆ createButtonLayout()
QBoxLayout * AboutApplicationDialog::createButtonLayout |
( |
| ) |
|
|
private |
Definition at line 133 of file aboutapplicationdialog.cpp.
135 auto result =
new QHBoxLayout;
137 auto closeButton =
new QPushButton(
"Close");
138 connect(closeButton, &QPushButton::clicked,
this, &QDialog::reject);
140 result->addStretch(1);
141 result->addWidget(closeButton);
143 static const char mydata[] = {0x64, 0x65, 0x76, 0x73};
144 QByteArray b = QByteArray::fromRawData(mydata,
sizeof(mydata));
147 installEventFilter(f);
Event filter for global tracking of shortcodes.
References ShortcodeFilter::found().
Referenced by AboutApplicationDialog().
◆ createLogoLayout()
QBoxLayout * AboutApplicationDialog::createLogoLayout |
( |
| ) |
|
|
private |
Definition at line 78 of file aboutapplicationdialog.cpp.
80 auto result =
new QVBoxLayout;
82 QPixmap logo(
":/images/about_icon.png");
83 auto label =
new QLabel;
84 label->setPixmap(logo.scaled(120, 120, Qt::KeepAspectRatio));
86 result->addWidget(label);
87 result->addStretch(1);
88 result->setContentsMargins(5, 5, 5, 5);
Referenced by AboutApplicationDialog().
◆ createTextLayout()
QBoxLayout * AboutApplicationDialog::createTextLayout |
( |
| ) |
|
|
private |
Definition at line 93 of file aboutapplicationdialog.cpp.
95 auto result =
new QVBoxLayout;
99 titleFont.setBold(
true);
103 normalFont.setBold(
false);
106 auto aboutTitleLabel =
108 aboutTitleLabel->setFont(titleFont);
109 aboutTitleLabel->setContentsMargins(0, 0, 0, 15);
112 auto copyrightLabel = createCopyrightLabel();
113 copyrightLabel->setFont(normalFont);
116 QString description =
"A software to simulate and fit grazing-incidence small-angle "
117 "scattering (GISAS) using distorted wave Born approximation (DWBA).";
118 auto descriptionLabel =
new QLabel(description);
119 descriptionLabel->setFont(normalFont);
120 descriptionLabel->setWordWrap(
true);
122 result->addWidget(aboutTitleLabel);
123 result->addWidget(descriptionLabel);
124 result->addStretch(1);
125 result->addWidget(copyrightLabel);
126 result->addWidget(createLinkLabel());
127 result->addStretch(1);
128 result->setContentsMargins(0, 5, 5, 5);
static int getLabelFontSize()
QString getBornAgainVersionString()
References GUIHelpers::getBornAgainVersionString(), and DesignerHelper::getLabelFontSize().
Referenced by AboutApplicationDialog().
The documentation for this class was generated from the following files: