Engauge Digitizer
2
Dlg
DlgFilterWorker.h
Go to the documentation of this file.
1
/******************************************************************************************************
2
* (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3
* under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4
* LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5
******************************************************************************************************/
6
7
#ifndef DLG_FILTER_WORKER_H
8
#define DLG_FILTER_WORKER_H
9
10
#include "
ColorFilterMode.h
"
11
#include "
DlgFilterCommand.h
"
12
#include <QImage>
13
#include <QList>
14
#include <QObject>
15
#include <QPixmap>
16
#include <QRgb>
17
#include <QTimer>
18
19
typedef
QList<DlgFilterCommand>
FilterCommandQueue
;
20
22
class
DlgFilterWorker
:
public
QObject
23
{
24
Q_OBJECT;
25
26
public
:
28
DlgFilterWorker
(
const
QPixmap &pixmapOriginal,
29
QRgb m_rgbBackground);
30
31
public
slots:
33
void
slotNewParameters
(
ColorFilterMode
colorFilterMode,
34
double
low,
35
double
high);
36
37
private
slots:
38
void
slotRestartTimeout ();
39
40
signals:
42
void
signalTransferPiece
(
int
xLeft,
43
QImage image);
44
45
private
:
46
DlgFilterWorker
();
47
48
QImage m_imageOriginal;
// Use QImage rather than QPixmap so we can access pixel by pixel
49
QRgb m_rgbBackground;
50
51
FilterCommandQueue
m_inputCommandQueue;
52
ColorFilterMode
m_colorFilterMode;
// Set when processing restarts
53
double
m_low;
54
double
m_high;
55
56
int
m_xLeft;
57
QTimer m_restartTimer;
// Decouple slotRestartProcessing from the processing that this class performs
58
};
59
60
#endif // DLG_FILTER_WORKER_H
FilterCommandQueue
QList< DlgFilterCommand > FilterCommandQueue
Definition:
DlgFilterWorker.h:18
ColorFilterMode.h
DlgFilterWorker
Class for processing new filter settings. This is based on http://blog.debao.me/2013/08/how-to-use-qw...
Definition:
DlgFilterWorker.h:21
DlgFilterWorker::signalTransferPiece
void signalTransferPiece(int xLeft, QImage image)
Send a processed vertical piece of the original pixmap. The destination is between xLeft and xLeft+pi...
DlgFilterCommand.h
DlgFilterWorker::slotNewParameters
void slotNewParameters(ColorFilterMode colorFilterMode, double low, double high)
Start processing with a new set of parameters. Any ongoing processing is interrupted when m_filterMod...
Definition:
DlgFilterWorker.cpp:26
ColorFilterMode
ColorFilterMode
Definition:
ColorFilterMode.h:11
Generated on Sat Jan 4 2020 12:00:00 for Engauge Digitizer by
1.8.16