Debian Codegraph @

src/bootstrapper/singleInstance/SingleInstanceParameterTranslator.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2020 Damir Porobic <[email protected]>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
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 &parameter) 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 //KSNIP_SINGLEINSTANCEPARAMETERTRANSLATOR_H