-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSpmemory.h
38 lines (37 loc) · 1.22 KB
/
Spmemory.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* route memory [- SPMEMORY.H -]
*******************************************************************************
* If current route can not be set e.g. is occupied/reserved, a route memory *
* will be automatically set. It tries to set this memorized route as long as *
* the route permission is granted. *
*******************************************************************************
*/
#ifndef SPMEMORY_H
#define SPMEMORY_H
#include <QObject>
#include "HSignal.h"
#include <QList>
#include <QPair>
#include <QTimer>
class Spmemory : public QObject{
Q_OBJECT
public:
Spmemory(){ t->callOnTimeout(this, &Spmemory::processSpeicher); }
~Spmemory(){}
void showSP();
public slots:
void timing(); // intermediate step to solve blocked thread: step towards processSpeicher
void processSpeicher();
void quit();
public slots:
void addFS( HSignal *SPstart, HSignal *SPziel);
signals:
void finished();
private:
QList<QPair<HSignal*,HSignal*>> speicherlist;
QList<QPair<HSignal*,HSignal*>> buffer;
QList<int> deleter;
bool trySP = true; //control endless loop: is it necessary to set the memory route or not?
QTimer *t = new QTimer(this);
};
#endif