migrate std::string to qstring + add sysinfo via json (#412)

* std::string -> qstring part 1

* more string migration

* more string migration ...

* ...

* more qstring mogrations
add sysinfo via json

* remove unneccessary includes

* integrate sysinfo into webui
This commit is contained in:
redPanther
2017-03-04 22:17:42 +01:00
committed by GitHub
parent 19f8928869
commit bfb9a08c80
90 changed files with 539 additions and 529 deletions

View File

@@ -20,7 +20,7 @@ public:
/// @param[in] width The width of the captured screenshot
/// @param[in] height The heigth of the captured screenshot
///
FramebufferFrameGrabber(const std::string & device, const unsigned width, const unsigned height);
FramebufferFrameGrabber(const QString & device, const unsigned width, const unsigned height);
~FramebufferFrameGrabber();
///
@@ -47,7 +47,7 @@ private:
unsigned char * _fbp;
/// Framebuffer device e.g. /dev/fb0
const std::string _fbDevice;
const QString _fbDevice;
/// With of the captured snapshot [pixels]
const unsigned _width;

View File

@@ -28,7 +28,7 @@ public:
/// @param[in] grabHeight The height of the grabbed images [pixels]
/// @param[in] updateRate_Hz The image grab rate [Hz]
///
FramebufferWrapper(const std::string & device, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz, const int priority);
FramebufferWrapper(const QString & device, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz, const int priority);
///
/// Destructor of this framebuffer frame grabber. Releases any claimed resources.

View File

@@ -1,7 +1,6 @@
#pragma once
// stl includes
#include <string>
#include <vector>
#include <map>
@@ -29,7 +28,7 @@ class V4L2Grabber : public QObject
Q_OBJECT
public:
V4L2Grabber(const std::string & device,
V4L2Grabber(const QString & device,
int input,
VideoStandard videoStandard, PixelFormat pixelFormat,
int width,
@@ -103,9 +102,9 @@ private:
int xioctl(int request, void *arg);
void throw_exception(const std::string &error);
void throw_exception(const QString &error);
void throw_errno_exception(const std::string &error);
void throw_errno_exception(const QString &error);
private:
enum io_method {
@@ -120,8 +119,8 @@ private:
};
private:
std::string _deviceName;
std::map<std::string,std::string> _v4lDevices;
QString _deviceName;
std::map<QString,QString> _v4lDevices;
int _input;
VideoStandard _videoStandard;
io_method _ioMethod;

View File

@@ -13,7 +13,7 @@ class V4L2Wrapper : public GrabberWrapper
Q_OBJECT
public:
V4L2Wrapper(const std::string & device,
V4L2Wrapper(const QString & device,
int input,
VideoStandard videoStandard,
PixelFormat pixelFormat,

View File

@@ -1,8 +1,5 @@
#pragma once
#include <string>
#include <algorithm>
/**
* Enumeration of the possible video standards the grabber can be set to
*/
@@ -12,10 +9,10 @@ enum VideoStandard {
VIDEOSTANDARD_NO_CHANGE
};
inline VideoStandard parseVideoStandard(std::string videoStandard)
inline VideoStandard parseVideoStandard(QString videoStandard)
{
// convert to lower case
std::transform(videoStandard.begin(), videoStandard.end(), videoStandard.begin(), ::tolower);
videoStandard = videoStandard.toLower();
if (videoStandard == "pal")
{