#include "tab_welcome.h" #include TabWelcome::TabWelcome(RecentFiles::QMenuPtr recent_files_menu, QWidget* parent) : recent_files_menu(recent_files_menu), QWidget(parent), ui(new Ui::TabWelcome) { ui->setupUi(this); ui->horizontalLayout->setContentsMargins(0, 0, 0, 0); ui->welcomeLabel->setText(ui->welcomeLabel->text() .arg(tr("Welcome to ActorViewer!")) .arg(tr("Start by opening a Fediverse data export, using a button below."))); } TabWelcome::~TabWelcome() { delete ui; } void TabWelcome::on_openFileButton_clicked(bool checked) { emit show_file_open_dialog(); } void TabWelcome::on_openRecentButton_clicked(bool checked) { if (recent_files_menu) recent_files_menu->popup(ui->openRecentButton->mapToGlobal(QPoint(0,0))); }