1
/* Copyright (C) 2005-2010, Thorvald Natvig <thorvald@natvig.com>
2
Copyright (C) 2008-2009, Mikkel Krautz <mikkel@krautz.dk>
6
Redistribution and use in source and binary forms, with or without
7
modification, are permitted provided that the following conditions
10
- Redistributions of source code must retain the above copyright notice,
11
this list of conditions and the following disclaimer.
12
- Redistributions in binary form must reproduce the above copyright notice,
13
this list of conditions and the following disclaimer in the documentation
14
and/or other materials provided with the distribution.
15
- Neither the name of the Mumble Developers nor the names of its
16
contributors may be used to endorse or promote products derived from this
17
software without specific prior written permission.
19
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
23
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
#ifndef __G15LCDENGINE_HELPER__
33
#define __G15LCDENGINE_HELPER__
35
#include "mumble_pch.hpp"
37
#include "../../g15helper/g15helper.h"
39
class G15LCDDeviceHelper;
41
class G15LCDEngineHelper : public LCDEngine {
42
friend class G15LCDDeviceHelper;
45
Q_DISABLE_COPY(G15LCDEngineHelper)
50
QString qsHelperExecutable;
51
bool framebufferReady() const;
52
void submitFrame(bool alert, uchar *buf, size_t len);
53
void setProcessStatus(bool run);
56
~G15LCDEngineHelper();
57
QList<LCDDevice *> devices() const;
59
void on_Helper_finished(int exitCode, QProcess::ExitStatus status);
62
class G15LCDDeviceHelper : public LCDDevice {
64
G15LCDEngineHelper *engine;
67
G15LCDDeviceHelper(G15LCDEngineHelper *e);
68
~G15LCDDeviceHelper();
70
void setEnabled(bool e);
71
void blitImage(QImage *img, bool alert);
77
class G15LCDEngineHelper;
78
class G15LCDDeviceHelper;