45 lines
993 B
C++
45 lines
993 B
C++
#pragma once
|
|
|
|
#include <QtWidgets/QMainWindow>
|
|
#include "ui_NameCreater.h"
|
|
|
|
#include <QNetworkAccessManager>
|
|
#include <QNetworkRequest>
|
|
#include <QNetworkReply>
|
|
|
|
|
|
|
|
|
|
class NameCreater : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
NameCreater(QWidget *parent = Q_NULLPTR);
|
|
|
|
private:
|
|
Ui::NameCreaterClass ui;
|
|
QFont font, font_towel, font_english;
|
|
|
|
QColor font_color;
|
|
|
|
QNetworkAccessManager network_mgr;
|
|
int query_type;
|
|
|
|
void query(const QUrl& url, int type = -1);
|
|
|
|
void loadFont(const QByteArray& fontdata);
|
|
void execCreater(QObject*sender, const QString&fileName, const QByteArray &fileContent);
|
|
void parseFontJson(const QByteArray& data);
|
|
|
|
private Q_SLOTS:
|
|
void OnClickedReadBtn();
|
|
void OnClickedCustomLogoBtn();
|
|
void OnClickedCustomLogo2Btn();
|
|
void onFontDownloadFinished(QNetworkReply *reply);
|
|
|
|
void OnFontComboBoxTextChanged(const QString& str);
|
|
void OnFontComboBoxIndexChanged(int idx);
|
|
|
|
};
|