Reformat again sigh
This commit is contained in:
parent
15d7897b9c
commit
7802f0e9fb
@ -15,7 +15,8 @@ void TextItem::mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) {
|
|||||||
textItem->setPen(scene->pen());
|
textItem->setPen(scene->pen());
|
||||||
textItem->setBrush(scene->brush());
|
textItem->setBrush(scene->brush());
|
||||||
} else {
|
} else {
|
||||||
auto ee = 180 + qRadiansToDegrees(qAtan2((textItem->pos().y() - e->scenePos().y()), (textItem->pos().x() - e->scenePos().x())));
|
auto ee
|
||||||
|
= 180 + qRadiansToDegrees(qAtan2((textItem->pos().y() - e->scenePos().y()), (textItem->pos().x() - e->scenePos().x())));
|
||||||
textItem->setRotation(ee);
|
textItem->setRotation(ee);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,9 @@ namespace ioutils {
|
|||||||
QNetworkAccessManager networkManager;
|
QNetworkAccessManager networkManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ioutils::getJson(QUrl target, QList<QPair<QString, QString>> headers, std::function<void(QJsonDocument, QByteArray, QNetworkReply *)> callback) {
|
void ioutils::getJson(QUrl target,
|
||||||
|
QList<QPair<QString, QString>> headers,
|
||||||
|
std::function<void(QJsonDocument, QByteArray, QNetworkReply *)> callback) {
|
||||||
QNetworkRequest req(target);
|
QNetworkRequest req(target);
|
||||||
for (auto header : headers) {
|
for (auto header : headers) {
|
||||||
req.setRawHeader(header.first.toUtf8(), header.second.toUtf8());
|
req.setRawHeader(header.first.toUtf8(), header.second.toUtf8());
|
||||||
@ -21,7 +23,10 @@ void ioutils::getJson(QUrl target, QList<QPair<QString, QString>> headers, std::
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void ioutils::postJson(QUrl target, QList<QPair<QString, QString>> headers, QByteArray body, std::function<void(QJsonDocument, QByteArray, QNetworkReply *)> callback) {
|
void ioutils::postJson(QUrl target,
|
||||||
|
QList<QPair<QString, QString>> headers,
|
||||||
|
QByteArray body,
|
||||||
|
std::function<void(QJsonDocument, QByteArray, QNetworkReply *)> callback) {
|
||||||
QNetworkRequest req(target);
|
QNetworkRequest req(target);
|
||||||
for (auto header : headers) {
|
for (auto header : headers) {
|
||||||
req.setRawHeader(header.first.toUtf8(), header.second.toUtf8());
|
req.setRawHeader(header.first.toUtf8(), header.second.toUtf8());
|
||||||
@ -46,7 +51,10 @@ void ioutils::getData(QUrl target, QList<QPair<QString, QString>> headers, std::
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void ioutils::postData(QUrl target, QList<QPair<QString, QString>> headers, QByteArray body, std::function<void(QByteArray, QNetworkReply *)> callback) {
|
void ioutils::postData(QUrl target,
|
||||||
|
QList<QPair<QString, QString>> headers,
|
||||||
|
QByteArray body,
|
||||||
|
std::function<void(QByteArray, QNetworkReply *)> callback) {
|
||||||
QNetworkRequest req(target);
|
QNetworkRequest req(target);
|
||||||
for (auto header : headers) {
|
for (auto header : headers) {
|
||||||
req.setRawHeader(header.first.toUtf8(), header.second.toUtf8());
|
req.setRawHeader(header.first.toUtf8(), header.second.toUtf8());
|
||||||
|
@ -10,7 +10,10 @@
|
|||||||
namespace ioutils {
|
namespace ioutils {
|
||||||
extern QNetworkAccessManager networkManager;
|
extern QNetworkAccessManager networkManager;
|
||||||
void getJson(QUrl target, QList<QPair<QString, QString>> headers, std::function<void(QJsonDocument, QByteArray, QNetworkReply *)> callback);
|
void getJson(QUrl target, QList<QPair<QString, QString>> headers, std::function<void(QJsonDocument, QByteArray, QNetworkReply *)> callback);
|
||||||
void postJson(QUrl target, QList<QPair<QString, QString>> headers, QByteArray body, std::function<void(QJsonDocument, QByteArray, QNetworkReply *)> callback);
|
void postJson(QUrl target,
|
||||||
|
QList<QPair<QString, QString>> headers,
|
||||||
|
QByteArray body,
|
||||||
|
std::function<void(QJsonDocument, QByteArray, QNetworkReply *)> callback);
|
||||||
void getData(QUrl target, QList<QPair<QString, QString>> headers, std::function<void(QByteArray, QNetworkReply *)> callback);
|
void getData(QUrl target, QList<QPair<QString, QString>> headers, std::function<void(QByteArray, QNetworkReply *)> callback);
|
||||||
void postData(QUrl target, QList<QPair<QString, QString>> headers, QByteArray body, std::function<void(QByteArray, QNetworkReply *)> callback);
|
void postData(QUrl target, QList<QPair<QString, QString>> headers, QByteArray body, std::function<void(QByteArray, QNetworkReply *)> callback);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user