From bb703cb5b5e52a14d6c839d543571c427e6af2c0 Mon Sep 17 00:00:00 2001 From: Ralf Ramsauer Date: Wed, 7 Oct 2015 17:44:45 +0200 Subject: [PATCH] Defaulted location of LED pictures --- doorlockd/client/mainwindow.cpp | 4 ++-- doorlockd/config.h.in | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) 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"