20 #include "ui_WelcomeView.h"
22 #include <QCommandLinkButton>
23 #include <QDesktopServices>
33 setAttribute(Qt::WA_StyledBackground,
true);
34 setProperty(
"stylable",
true);
38 QPalette palette = this->palette();
39 palette.setColor(QPalette::Window, Qt::white);
43 connect(
m_ui->openButton, &QPushButton::clicked, [=]() { projectManager()->openProject(); });
44 connect(
m_ui->websiteButton, &QPushButton::clicked,
45 []() { QDesktopServices::openUrl(QUrl(
"https://www.bornagainproject.org")); });
62 auto* button =
new QCommandLinkButton;
63 button->setText(QFileInfo(file).
baseName());
65 button->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
68 m_ui->recentProjectsLayout->addWidget(button);
70 m_ui->recentProjectsLayout->addStretch(1);
Defines class GroupBoxCollapser.
Defines namespace GUI::Util::Layout.
Defines class Helpers functions.
Defines class ProjectManager.
Defines class WelcomeView.
static GroupBoxCollapser * installIntoGroupBox(QGroupBox *groupBox, bool expanded=true)
Handles activity related to opening/save projects.
void recentListModified()
static ProjectManager * instance()
void openProject(QString fileName="")
Opens existing project. If fileName is empty, will popup file selection dialog.
void newProject()
Processes new project request (close old project, rise dialog for project name, create project).
void updateRecentProjectPanel()
ProjectManager * projectManager()
WelcomeView(QWidget *parent)
void clearLayout(QLayout *layout, bool deleteWidgets=true)
Removes content from box layout.
QString baseName(const QString &fileName)
Returns base name of file.
QString withTildeHomePath(const QString &path)