iVS3D v2.0.0
Loading...
Searching...
No Matches
terminalinteraction.h
1#ifndef TERMINALINTERACTION_H
2#define TERMINALINTERACTION_H
3
4#include <QObject>
5#include <iostream>
6#include <string>
7#include <QMutex>
8#include <QMutexLocker>
9
10#include "progressdisplay.h"
11
12#define ENABLE_TERMINAL std::cout.clear()
13#define DISABLE_TERMINAL std::cout.setstate(std::ios_base::failbit)
14
15#define SPLITTER " - "
16
28class TerminalInteraction : public QObject, public ProgressDisplay
29{
30 Q_OBJECT
31public:
32 static TerminalInteraction &instance();
33
34public slots:
40 void slot_displayProgress(int progress, QString currentProgress) override;
45 void slot_displayMessage(QString message) override;
46
47private:
48 bool m_eraseIsActive = false;
49 uint m_lengthToErase = 0;
50 uint m_suffixLength = 0;
51 QMutex mutex;
56};
57
58#endif // TERMINALINTERACTION_H
The ProgressDisplay class is an interface for classes that can display progression in any form....
Definition progressdisplay.h:19
The TerminalInteraction class, which is used as a minimalistic ui for the mode without the full sized...
Definition terminalinteraction.h:29
TerminalInteraction()
TerminalInteraction Constructor.
Definition terminalinteraction.cpp:5
void slot_displayMessage(QString message) override
[slot] slot_displayMessage shows a message that was generated by a diffrent component
Definition terminalinteraction.cpp:16
void slot_displayProgress(int progress, QString currentProgress) override
[slot] slot_displayProgress gets activated if there is new progress from a thread
Definition terminalinteraction.cpp:33