More refactoring.
This commit is contained in:
parent
ad3fc52f43
commit
39235f1df3
12
hgx11.cpp
12
hgx11.cpp
@ -82,7 +82,7 @@ QString hgx11::_parseColorArr(QString value, bool isInt)
|
|||||||
if (values.size() != 3) {
|
if (values.size() != 3) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
QString retVal = "[";
|
value = "[";
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
if (isInt && (values.at(i).toInt() < 0 || values.at(i).toInt() > 255)) {
|
if (isInt && (values.at(i).toInt() < 0 || values.at(i).toInt() > 255)) {
|
||||||
return "";
|
return "";
|
||||||
@ -90,12 +90,12 @@ QString hgx11::_parseColorArr(QString value, bool isInt)
|
|||||||
if (!isInt && (values.at(i).toDouble() < 0.0 || values.at(i).toDouble() > 1.0)) {
|
if (!isInt && (values.at(i).toDouble() < 0.0 || values.at(i).toDouble() > 1.0)) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
retVal.append(values.at(i));
|
value.append(values.at(i));
|
||||||
retVal.append(",");
|
value.append(",");
|
||||||
}
|
}
|
||||||
retVal.chop(1);
|
value.chop(1);
|
||||||
retVal.append("]");
|
value.append("]");
|
||||||
return retVal;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// private slots
|
// private slots
|
||||||
|
|||||||
2
hgx11.h
2
hgx11.h
@ -23,8 +23,6 @@ private:
|
|||||||
QTimer *_timer_p;
|
QTimer *_timer_p;
|
||||||
|
|
||||||
int _inactiveTime_m = 0;
|
int _inactiveTime_m = 0;
|
||||||
QString _destWidth_m;
|
|
||||||
QString _destHeight_m;
|
|
||||||
|
|
||||||
QString _parseColorArr(QString, bool);
|
QString _parseColorArr(QString, bool);
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,6 @@
|
|||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <X11/extensions/Xdamage.h>
|
#include <X11/extensions/Xdamage.h>
|
||||||
#include <X11/Xlib.h>
|
|
||||||
|
|
||||||
class hgx11damage : public QThread
|
class hgx11damage : public QThread
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/extensions/Xrender.h>
|
#include <X11/extensions/Xrender.h>
|
||||||
#include <X11/extensions/XShm.h>
|
#include <X11/extensions/XShm.h>
|
||||||
#include <sys/shm.h>
|
#include <sys/shm.h>
|
||||||
|
|||||||
@ -2,10 +2,6 @@
|
|||||||
#define HGX11NET_H
|
#define HGX11NET_H
|
||||||
|
|
||||||
#include <QTcpSocket>
|
#include <QTcpSocket>
|
||||||
#include <QAbstractSocket>
|
|
||||||
#include <QString>
|
|
||||||
#include <QObject>
|
|
||||||
#include <QByteArray>
|
|
||||||
|
|
||||||
class hgx11net : public QObject
|
class hgx11net : public QObject
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user