diff --git a/doorlockd/client/mainwindow.cpp b/doorlockd/client/mainwindow.cpp index 0b67b9a..8409f6b 100644 --- a/doorlockd/client/mainwindow.cpp +++ b/doorlockd/client/mainwindow.cpp @@ -57,7 +57,7 @@ void MainWindow::setClientmessage(const Clientmessage &msg) void MainWindow::_LED(const bool on) { if (on) - ui->LED->setPixmap(QPixmap(IMAGE_LOCATION "led-green.png")); + ui->LED->setPixmap(QPixmap(IMAGE_LED_GREEN)); else - ui->LED->setPixmap(QPixmap(IMAGE_LOCATION "led-red.png")); + ui->LED->setPixmap(QPixmap(IMAGE_LED_RED)); } diff --git a/doorlockd/config.h.in b/doorlockd/config.h.in index 26118c7..e9d9a22 100644 --- a/doorlockd/config.h.in +++ b/doorlockd/config.h.in @@ -27,7 +27,11 @@ #define DEFAULT_SERIAL_BAUDRATE 9600UL #define SHARED_LOCATION "@CMAKE_INSTALL_PREFIX@/share/doorlockd/" + #define IMAGE_LOCATION SHARED_LOCATION "images/" +#define IMAGE_LED_GREEN IMAGE_LOCATION "led-green.png" +#define IMAGE_LED_RED IMAGE_LOCATION "led-red.png" + #define SOUNDS_LOCATION SHARED_LOCATION "sounds/" #define SOUND_LOCK SOUNDS_LOCATION "lock.wav"