Engauge Digitizer  2
Signals | Public Member Functions | List of all members
DlgFilterThread Class Reference

Class for processing new filter settings. This is based on http://blog.debao.me/2013/08/how-to-use-qthread-in-the-right-way-part-1/. More...

#include <DlgFilterThread.h>

Inheritance diagram for DlgFilterThread:
Inheritance graph
Collaboration diagram for DlgFilterThread:
Collaboration graph

Signals

void signalTransferPiece (int xLeft, QImage image)
 Send a processed vertical piece of the original pixmap. The destination is between xLeft and xLeft+pixmap.width() More...
 

Public Member Functions

 DlgFilterThread (const QPixmap &pixmapOriginal, QRgb rgbBackground, DlgSettingsColorFilter &dlgSettingsColorFilter)
 Single constructor. More...
 
virtual void run ()
 Run this thread. More...
 

Detailed Description

Class for processing new filter settings. This is based on http://blog.debao.me/2013/08/how-to-use-qthread-in-the-right-way-part-1/.

Definition at line 18 of file DlgFilterThread.h.

Constructor & Destructor Documentation

◆ DlgFilterThread()

DlgFilterThread::DlgFilterThread ( const QPixmap &  pixmapOriginal,
QRgb  rgbBackground,
DlgSettingsColorFilter dlgSettingsColorFilter 
)

Single constructor.

Definition at line 10 of file DlgFilterThread.cpp.

12  :
13  m_pixmapOriginal (pixmapOriginal),
14  m_rgbBackground (rgbBackground),
15  m_dlgSettingsColorFilter (dlgSettingsColorFilter),
16  m_dlgFilterWorker (nullptr)
17 {
18 }

Member Function Documentation

◆ run()

void DlgFilterThread::run ( )
virtual

Run this thread.

Definition at line 20 of file DlgFilterThread.cpp.

21 {
22  // Create worker only once
23  if (m_dlgFilterWorker == nullptr) {
24 
25  m_dlgFilterWorker = new DlgFilterWorker (m_pixmapOriginal,
26  m_rgbBackground);
27 
28  // Connect signal to start process
29  connect (&m_dlgSettingsColorFilter, SIGNAL (signalApplyFilter (ColorFilterMode, double, double)),
30  m_dlgFilterWorker, SLOT (slotNewParameters (ColorFilterMode, double, double)));
31 
32  // Connect signal to return each piece of completed processing
33  connect (m_dlgFilterWorker, SIGNAL (signalTransferPiece (int, QImage)),
34  &m_dlgSettingsColorFilter, SLOT (slotTransferPiece (int, QImage)));
35  }
36 
37  exec ();
38 }
ColorFilterMode
Class for processing new filter settings. This is based on http://blog.debao.me/2013/08/how-to-use-qw...
void signalTransferPiece(int xLeft, QImage image)
Send a processed vertical piece of the original pixmap. The destination is between xLeft and xLeft+pi...

◆ signalTransferPiece

void DlgFilterThread::signalTransferPiece ( int  xLeft,
QImage  image 
)
signal

Send a processed vertical piece of the original pixmap. The destination is between xLeft and xLeft+pixmap.width()


The documentation for this class was generated from the following files: