aboutsummaryrefslogtreecommitdiff
path: root/aoscene.cpp
blob: d910a3ecb60e6408f36c1baeea7e7ddbfd9757a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "aoscene.h"

#include "courtroom.h"

#include "file_functions.h"

AOScene::AOScene(Courtroom *parent) : QLabel(parent)
{
  m_courtroom = parent;
}

void AOScene::set_image(QString p_image)
{
  QString background_path = m_courtroom->get_background_path() + p_image;
  QString default_path = m_courtroom->get_default_background_path() + p_image;

  if (file_exists(background_path))
    this->setPixmap(background_path);
  else
    this->setPixmap(default_path);
}