#include "dialog1.h"
#include "mainwindow.h"
#include "ui_dialog1.h"
#include <QPixmap>
#include <QMessageBox>

Dialog1::Dialog1(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::Dialog1)
{
    ui->setupUi(this);
    QPixmap bgPixmap(":/re1 - Kopie.png"); // Pfad zum Hintergrundbild
    QLabel *background = new QLabel(this);
    background->setPixmap(bgPixmap);
    background->setGeometry(0, 0, bgPixmap.width(), bgPixmap.height());
    // Fahrstuhl Label setzen
    QPixmap balken(":/Screenshot 2024-06-12 142211.png");
    fahrstuhlLabel = new QLabel(this);
    //fahrstuhlLabel->setText("Fahrstuhl");
    fahrstuhlLabel->setPixmap(balken);
    fahrstuhlLabel->setGeometry(236, 355, 130, 120); // Startposition
    fahrstuhlLabel->raise();

    // Simulation initialisieren
    simulation = new Simulation(fahrstuhlLabel, this);
    //simulation->start();


}

void Dialog1::startSimulation()
{
    simulation->start();
}


Dialog1::~Dialog1()
{
    delete ui;
}