| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
#ifndef KSNIP_SINGLEINSTANCEPARAMETERTRANSLATOR_H |
| 21 |
#define KSNIP_SINGLEINSTANCEPARAMETERTRANSLATOR_H |
| 22 |
|
| 23 |
#include <QString> |
| 24 |
#include <QList> |
| 25 |
|
| 26 |
#include "src/bootstrapper/singleInstance/SingleInstanceParameter.h" |
| 27 |
|
| 28 |
class SingleInstanceParameterTranslator |
| 29 |
{ |
| 30 |
public: |
| 31 |
SingleInstanceParameterTranslator() = default; |
| 32 |
~SingleInstanceParameterTranslator() = default; |
| 33 |
|
| 34 |
QByteArray translate(const SingleInstanceParameter ¶meter) const; |
| 35 |
SingleInstanceParameter translate(const QByteArray &byteArray) const; |
| 36 |
|
| 37 |
private: |
| 38 |
static QByteArray getStartParameter(); |
| 39 |
static QByteArray getEditPathParameters(const QString &path); |
| 40 |
static QByteArray getEditImageParameters(const QByteArray &image); |
| 41 |
static QByteArray getCaptureParameters(CaptureModes captureModes, bool save, const QString &savePath, bool captureCursor, int delay); |
| 42 |
static QByteArray getSeparator(); |
| 43 |
static QByteArray getPathParameter(const QString &path); |
| 44 |
static QByteArray getCaptureModeParameter(const CaptureModes &captureModes); |
| 45 |
static QByteArray getBooleanString(bool value); |
| 46 |
static QByteArray getCaptureCursorParameter(bool captureCursor); |
| 47 |
static QByteArray getDelayParameter(int delay); |
| 48 |
static QByteArray getEditPathParameter(); |
| 49 |
static QByteArray getEditImageParameter(); |
| 50 |
static QByteArray getCaptureParameter(); |
| 51 |
static CaptureModes getCaptureMode(const QByteArray &captureMode); |
| 52 |
static bool getBoolean(const QByteArray &value); |
| 53 |
}; |
| 54 |
|
| 55 |
#endif |