Compare commits
47 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5655d824d7 | |||
| 47b543aaa7 | |||
| 0d14515dc3 | |||
| d9ebf66831 | |||
| e64e06bf56 | |||
|
|
5bbafd6668 | ||
|
|
bbc348d859 | ||
|
|
7a8106b539 | ||
|
|
052d36b520 | ||
|
|
c5e8bba4ff | ||
| 62e75e4ca0 | |||
|
|
46c669d78e | ||
|
|
e14743ca15 | ||
|
|
6ea71180c8 | ||
|
|
10a119e7ea | ||
|
|
39402a800f | ||
|
|
3eb58b7830 | ||
|
|
c6fb017745 | ||
|
|
f9cddcb565 | ||
|
|
aaf3751879 | ||
| 0c5abc203c | |||
| 8166fc30ae | |||
| b2602b5ef7 | |||
| 231f63295f | |||
| 3b6987bb8b | |||
|
|
3da5037ca7 | ||
|
|
2f330ac463 | ||
| d425173179 | |||
| 3b7756393e | |||
| 425e9fead2 | |||
|
|
1a254c4898 | ||
|
|
f40a56c656 | ||
| 3942d7f147 | |||
|
|
fc8bb70f56 | ||
|
|
24639c50b0 | ||
| d9d110ce04 | |||
| 83fde65fae | |||
| 56ea07365d | |||
| 6009f56287 | |||
|
|
dd69403ee6 | ||
|
|
3ce254f16d | ||
|
|
1216358657 | ||
| 793446dcd2 | |||
| 4fa3d9dc1c | |||
|
|
27a4eb5c8b | ||
| 6025cc2913 | |||
| 615fa0e283 |
1
.gitignore
vendored
@ -8,4 +8,3 @@
|
|||||||
/buildwed
|
/buildwed
|
||||||
/NameCreater/*.aps
|
/NameCreater/*.aps
|
||||||
/buildweb/
|
/buildweb/
|
||||||
/NameCreater/build/*
|
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
#define MAX_LABEL_IN_PAPER 10
|
#define MAX_LABEL_IN_PAPER 10
|
||||||
#define FONT_PIXEL_SIZE 120
|
#define FONT_PIXEL_SIZE 120
|
||||||
|
|
||||||
static QPoint LABEL_POS_START = QPoint(163, 70);
|
static QPoint LABEL_POS_START = QPoint(163, 115);
|
||||||
static QPoint NAME_OFFSET_START = QPoint(82, 712);
|
static QPoint NAME_OFFSET_START = QPoint(82, 712);
|
||||||
static QPoint NAME_OFFSET_REVERSE_START = QPoint(214, 1745);
|
static QPoint NAME_OFFSET_REVERSE_START = QPoint(214, 1745);
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ void BirthdayCreater::generaImageFromCSV(Name_Type_e type, const QString& filena
|
|||||||
|
|
||||||
int chrismas_y_offset = 0;
|
int chrismas_y_offset = 0;
|
||||||
if (name_info.name2.compare("co") == 0 || name_info.name2.compare("ol") == 0 ||
|
if (name_info.name2.compare("co") == 0 || name_info.name2.compare("ol") == 0 ||
|
||||||
/*name_info.name2.compare("st") == 0 ||*/ name_info.name2.compare("sn") == 0) {
|
name_info.name2.compare("st") == 0 || name_info.name2.compare("sn") == 0) {
|
||||||
chrismas_y_offset = 30;
|
chrismas_y_offset = 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ void BirthdayCreater::generaImageFromCSV(Name_Type_e type, const QString& filena
|
|||||||
|
|
||||||
int chrismas_y_offset = 0;
|
int chrismas_y_offset = 0;
|
||||||
if (name_info.name2.compare("co") == 0 || name_info.name2.compare("ol") == 0 ||
|
if (name_info.name2.compare("co") == 0 || name_info.name2.compare("ol") == 0 ||
|
||||||
/*name_info.name2.compare("st") == 0 ||*/ name_info.name2.compare("sn") == 0) {
|
name_info.name2.compare("st") == 0 || name_info.name2.compare("sn") == 0) {
|
||||||
chrismas_y_offset = 30;
|
chrismas_y_offset = 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,20 +203,18 @@ void BirthdayCreater::generaImageFromCSV(Name_Type_e type, const QString& filena
|
|||||||
|
|
||||||
for(int i = 0; i < 2; i++){
|
for(int i = 0; i < 2; i++){
|
||||||
qreal dir = (i == 0) ? -1.0:1.0;
|
qreal dir = (i == 0) ? -1.0:1.0;
|
||||||
qreal x_offset = (i == 0) ? 280.0 : 170.0;
|
qreal x_offset = (i == 0) ? 290.0 : 170.0;
|
||||||
qreal y_offset = (i == 0) ? 890.0 : 1550.0;
|
qreal y_offset = (i == 0) ? 780.0 : 1580.0;
|
||||||
int sp_y_offset = (i == 0)? 1.0*chrismas_y_offset:-1.0*chrismas_y_offset;
|
chrismas_y_offset = (i == 0)? 1.0*chrismas_y_offset:-1.0*chrismas_y_offset;
|
||||||
//add English world
|
//add English world
|
||||||
QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng,label_item);
|
QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng);
|
||||||
eng_word_item->setFont(_new_font);
|
eng_word_item->setFont(_new_font);
|
||||||
QRectF rect = eng_word_item->boundingRect();
|
QRectF rect = eng_word_item->boundingRect();
|
||||||
eng_word_item->setDefaultTextColor(font_color);
|
eng_word_item->setDefaultTextColor(font_color);
|
||||||
|
|
||||||
eng_word_item->setRotation(i == 0 ? 90 : -90);
|
eng_word_item->setRotation(i == 0 ? 90 : -90);
|
||||||
eng_word_item->setPos(x_offset - rect.height()/2.0, y_offset + sp_y_offset + (rect.width()/2*dir));
|
eng_word_item->setPos(label_item->x() + x_offset - rect.height()/2.0, label_item->y() + y_offset + chrismas_y_offset + (rect.width()/2*dir));
|
||||||
|
scene.addItem(eng_word_item);
|
||||||
|
|
||||||
//scene.addItem(eng_word_item);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -253,7 +251,7 @@ void BirthdayCreater::generaImageFromCSV(Name_Type_e type, const QString& filena
|
|||||||
|
|
||||||
int chrismas_y_offset = 0;
|
int chrismas_y_offset = 0;
|
||||||
if (name_info.name2.compare("co") == 0 || name_info.name2.compare("ol") == 0 ||
|
if (name_info.name2.compare("co") == 0 || name_info.name2.compare("ol") == 0 ||
|
||||||
/*name_info.name2.compare("st") == 0 ||*/ name_info.name2.compare("sn") == 0) {
|
name_info.name2.compare("st") == 0 || name_info.name2.compare("sn") == 0) {
|
||||||
chrismas_y_offset = 30;
|
chrismas_y_offset = 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -47,8 +47,6 @@ static QPointF NAME_POS_NUMBER[] = {
|
|||||||
QPointF(1228, 2334), QPointF(2280, 2202),
|
QPointF(1228, 2334), QPointF(2280, 2202),
|
||||||
};
|
};
|
||||||
|
|
||||||
static QPointF NEW_POS = QPoint(81, 320);
|
|
||||||
|
|
||||||
//static int NAME_POS_COUNT = sizeof(NAME_POS) / sizeof(NAME_POS[0]);
|
//static int NAME_POS_COUNT = sizeof(NAME_POS) / sizeof(NAME_POS[0]);
|
||||||
|
|
||||||
FiveToSingle::FiveToSingle() :INameCreater()
|
FiveToSingle::FiveToSingle() :INameCreater()
|
||||||
@ -173,7 +171,7 @@ void FiveToSingle::generaImageFromCSV(Name_Type_e type, const QString& filename,
|
|||||||
qreal xscale, yscale;
|
qreal xscale, yscale;
|
||||||
|
|
||||||
xscale = yscale = (j == 1) ? -1 : 1;
|
xscale = yscale = (j == 1) ? -1 : 1;
|
||||||
QPointF pos = name_info.is_number_bg ? NAME_POS_NUMBER[pos_idx] : NAME_POS_NUMBER[pos_idx];
|
QPointF pos = name_info.is_number_bg ? NAME_POS_NUMBER[pos_idx] : NAME_POS[pos_idx];
|
||||||
qreal y_offset[2] = { 0 };
|
qreal y_offset[2] = { 0 };
|
||||||
if (name_len == 2) {
|
if (name_len == 2) {
|
||||||
if (!rot) {
|
if (!rot) {
|
||||||
@ -283,62 +281,106 @@ void FiveToSingle::generaImageFromCSV(Name_Type_e type, const QString& filename,
|
|||||||
int name_len = name.length();
|
int name_len = name.length();
|
||||||
for (int j = 0; j < 2; j++) {
|
for (int j = 0; j < 2; j++) {
|
||||||
int pos_idx = idx * 2 + j;
|
int pos_idx = idx * 2 + j;
|
||||||
QPointF pos = NEW_POS;
|
QPointF pos = name_info.is_number_bg ? NAME_POS_NUMBER[pos_idx] : NAME_POS[pos_idx];
|
||||||
if (j == 0) {
|
if (j == 0) {
|
||||||
qreal xscale, yscale;
|
qreal xscale, yscale;
|
||||||
xscale = yscale = 1;
|
xscale = yscale = 1;
|
||||||
|
|
||||||
qreal y_offset[2] = { 0 };
|
qreal y_offset[2] = { 0 };
|
||||||
if (name_len == 2) {
|
if (name_len == 2) {
|
||||||
|
if (!rot) {
|
||||||
pos.setY(pos.y() + 82.0 * xscale);
|
pos.setY(pos.y() + 82.0 * xscale);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pos.setX(pos.x() + 82.0 * xscale);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
y_offset[0] = 25;
|
y_offset[0] = 25;
|
||||||
}
|
}
|
||||||
|
|
||||||
QGraphicsTextItem* textItem1 = new QGraphicsTextItem(name.mid(0, 1), name_bgItem);
|
QGraphicsTextItem* textItem1 = new QGraphicsTextItem(name.mid(0, 1));
|
||||||
textItem1->setFont(font);
|
textItem1->setFont(font);
|
||||||
textItem1->setDefaultTextColor(font_color);
|
textItem1->setDefaultTextColor(font_color);
|
||||||
|
if (!rot) {
|
||||||
textItem1->setPos(pos);
|
textItem1->setPos(pos);
|
||||||
textItem1->setTransform(QTransform::fromScale(xscale, yscale));
|
textItem1->setTransform(QTransform::fromScale(xscale, yscale));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
textItem1->setPos(pos);
|
||||||
|
textItem1->setRotation(-90);
|
||||||
|
textItem1->setTransform(QTransform::fromScale(xscale, yscale));
|
||||||
|
}
|
||||||
|
|
||||||
//scene.addItem(textItem1);
|
|
||||||
QGraphicsTextItem* textItem2 = new QGraphicsTextItem(name.mid(1, 1), name_bgItem);
|
scene.addItem(textItem1);
|
||||||
|
|
||||||
|
QGraphicsTextItem* textItem2 = new QGraphicsTextItem(name.mid(1, 1));
|
||||||
textItem2->setFont(font);
|
textItem2->setFont(font);
|
||||||
textItem2->setDefaultTextColor(font_color);
|
textItem2->setDefaultTextColor(font_color);
|
||||||
|
if (!rot) {
|
||||||
|
|
||||||
textItem2->setPos(pos.x(), pos.y() + (145 + y_offset[0]) * xscale);
|
textItem2->setPos(pos.x(), pos.y() + (145 + y_offset[0]) * xscale);
|
||||||
textItem2->setTransform(QTransform::fromScale(xscale, yscale));
|
textItem2->setTransform(QTransform::fromScale(xscale, yscale));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
textItem2->setPos(pos.x() + (145 + y_offset[0]) * xscale, pos.y());
|
||||||
|
textItem2->setRotation(-90);
|
||||||
|
textItem2->setTransform(QTransform::fromScale(xscale, yscale));
|
||||||
|
}
|
||||||
|
|
||||||
|
scene.addItem(textItem2);
|
||||||
|
|
||||||
if (name_len > 2) {
|
if (name_len > 2) {
|
||||||
QGraphicsTextItem* textItem3 = new QGraphicsTextItem(name.mid(2, 1), name_bgItem);
|
QGraphicsTextItem* textItem3 = new QGraphicsTextItem(name.mid(2, 1));
|
||||||
textItem3->setFont(font);
|
textItem3->setFont(font);
|
||||||
textItem3->setDefaultTextColor(font_color);
|
textItem3->setDefaultTextColor(font_color);
|
||||||
|
if (!rot) {
|
||||||
textItem3->setPos(pos.x(), pos.y() + 290 * xscale);
|
textItem3->setPos(pos.x(), pos.y() + 290 * xscale);
|
||||||
textItem3->setTransform(QTransform::fromScale(xscale, yscale));
|
textItem3->setTransform(QTransform::fromScale(xscale, yscale));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
textItem3->setPos(pos.x() + 290 * xscale, pos.y());
|
||||||
|
textItem3->setRotation(-90);
|
||||||
|
textItem3->setTransform(QTransform::fromScale(xscale, yscale));
|
||||||
|
}
|
||||||
|
|
||||||
|
scene.addItem(textItem3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (j == 1) {
|
else if (j == 1) {
|
||||||
//TODO: add English world
|
//TODO: add English world
|
||||||
QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng, name_bgItem);
|
QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng);
|
||||||
|
|
||||||
|
|
||||||
int _new_size = getFontSizebyStr(_new_font, 120, 480, name_info.name_eng);
|
int _new_size = getFontSizebyStr(_new_font, 120, 480, name_info.name_eng);
|
||||||
_new_font.setPixelSize(_new_size);
|
_new_font.setPixelSize(_new_size);
|
||||||
|
|
||||||
eng_word_item->setFont(_new_font);
|
eng_word_item->setFont(_new_font);
|
||||||
eng_word_item->adjustSize();
|
|
||||||
|
|
||||||
QRectF rect = eng_word_item->boundingRect();
|
QRectF rect = eng_word_item->boundingRect();
|
||||||
eng_word_item->setDefaultTextColor(font_color);
|
eng_word_item->setDefaultTextColor(font_color);
|
||||||
|
|
||||||
|
if (!rot) {
|
||||||
eng_word_item->setRotation(-90);
|
eng_word_item->setRotation(-90);
|
||||||
// the position export from web is different.
|
eng_word_item->setPos(pos.x() + 20 - rect.height(), (pos.y() - 200) + rect.width() / 2);
|
||||||
eng_word_item->setPos((name_bgItem->boundingRect().width()/2 - rect.height()/2)+20, 1230 + rect.width() / 2);
|
scene.addItem(eng_word_item);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
eng_word_item->setRotation(0);
|
||||||
|
// using window and webassembly complier that different y pos
|
||||||
|
|
||||||
|
//widows complier
|
||||||
|
//eng_word_item->setPos(pos.x() - 160 - rect.height(), pos.y()- 15);
|
||||||
|
|
||||||
|
//webassembly complier
|
||||||
|
eng_word_item->setPos(pos.x() - 160 - rect.height(), pos.y()+10);
|
||||||
|
scene.addItem(eng_word_item);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
bool is_export_page = ((idx + 1) % BG_POS_COUNT == 0);
|
bool is_export_page = ((idx + 1) % BG_POS_COUNT == 0);
|
||||||
if (is_export_page || n == nameList.count() - 1) {
|
if (is_export_page || n == nameList.count() - 1) {
|
||||||
|
|||||||
@ -35,30 +35,21 @@ void INameCreater::saveToImage(const QString& filename, QGraphicsScene* scene)
|
|||||||
QPainter painter(&image);
|
QPainter painter(&image);
|
||||||
scene->render(&painter);
|
scene->render(&painter);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
QString folder_name = QCoreApplication::applicationDirPath() + "/../../../export_" + QDateTime::currentDateTime().toString("yyyyMMdd");
|
QString folder_name = QCoreApplication::applicationDirPath() + "/../../../export_" + QDateTime::currentDateTime().toString("yyyyMMdd");
|
||||||
qDebug() << "app director path" <<QCoreApplication::applicationDirPath();
|
|
||||||
#else
|
#else
|
||||||
QString folder_name = "./";//QCoreApplication::applicationDirPath() + "/export_" + QDateTime::currentDateTime().toString("yyyyMMdd");
|
QString folder_name = QCoreApplication::applicationDirPath() + "/export_" + QDateTime::currentDateTime().toString("yyyyMMdd");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QString savePath = folder_name.append(filename);
|
image.save(filename, "JPEG");
|
||||||
|
|
||||||
#ifdef Q_OS_WASM
|
|
||||||
QByteArray imageData;
|
QByteArray imageData;
|
||||||
QBuffer buffer(&imageData);
|
QBuffer buffer(&imageData);
|
||||||
buffer.open(QIODevice::WriteOnly);
|
buffer.open(QIODevice::WriteOnly);
|
||||||
QPixmap pixmap = QPixmap::fromImage(image);
|
QPixmap pixmap = QPixmap::fromImage(image);
|
||||||
pixmap.save(&buffer, "JPEG", 100); // You can also use other formats like "JPEG" or "BMP"
|
pixmap.save(&buffer, "JPEG", 100); // You can also use other formats like "JPEG" or "BMP"
|
||||||
|
|
||||||
QFileDialog::saveFileContent(imageData, savePath);
|
QFileDialog::saveFileContent(imageData, filename);
|
||||||
#else
|
|
||||||
|
|
||||||
qDebug()<<"image save path:" << savePath;
|
|
||||||
image.save(savePath, "JPEG");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,11 +162,9 @@ int INameCreater::getFontSizebyStr(const QFont& font, int max_font_size,int max_
|
|||||||
while (font_size > 10) {
|
while (font_size > 10) {
|
||||||
_font.setPixelSize(font_size);
|
_font.setPixelSize(font_size);
|
||||||
QFontMetrics fm(_font);
|
QFontMetrics fm(_font);
|
||||||
if (fm.horizontalAdvance(str) <= max_label_width) return font_size;
|
if (fm.horizontalAdvance(str) <= max_label_width) break;
|
||||||
font_size--;
|
font_size--;
|
||||||
}
|
}
|
||||||
|
|
||||||
return font_size;
|
return font_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,13 +3,10 @@
|
|||||||
#include <QGraphicsScene>
|
#include <QGraphicsScene>
|
||||||
#include <QGraphicsView>
|
#include <QGraphicsView>
|
||||||
#include <QGraphicsRectItem>
|
#include <QGraphicsRectItem>
|
||||||
#include <QCoreApplication>
|
|
||||||
|
|
||||||
#define BG_WIDTH 3508
|
#define BG_WIDTH 3508
|
||||||
#define BG_HEIGHT 2481
|
#define BG_HEIGHT 2481
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct NameInfo_t {
|
struct NameInfo_t {
|
||||||
QString name1;
|
QString name1;
|
||||||
QString name2;
|
QString name2;
|
||||||
@ -37,9 +34,9 @@ public:
|
|||||||
QFont EnglisthFont() const {
|
QFont EnglisthFont() const {
|
||||||
return eng_Font;
|
return eng_Font;
|
||||||
}
|
}
|
||||||
void saveToImage(const QString& filename, QGraphicsScene* scene);
|
|
||||||
protected:
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void saveToImage(const QString& filename, QGraphicsScene* scene);
|
||||||
QList<NameInfo_t> getNameByFile(Name_Type_e type, const QString& filename);
|
QList<NameInfo_t> getNameByFile(Name_Type_e type, const QString& filename);
|
||||||
QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent);
|
QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent);
|
||||||
|
|
||||||
|
|||||||
@ -11,42 +11,26 @@
|
|||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QBuffer>
|
#include <QBuffer>
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
#include <QJsonDocument>
|
|
||||||
#include <QJsonObject>
|
|
||||||
#include <QJsonArray>
|
|
||||||
#include <QComboBox>
|
|
||||||
|
|
||||||
|
|
||||||
#include "FiveToSingle.h"
|
#include "FiveToSingle.h"
|
||||||
#include "BirthdayCreater.h"
|
#include "BirthdayCreater.h"
|
||||||
#include "TowelCreater.h"
|
#include "TowelCreater.h"
|
||||||
#include "NewFiveCreater.h"
|
#include "NewFiveCreater.h"
|
||||||
#include "HKHolderCreater.h"
|
#include "HKHolderCreater.h"
|
||||||
#include "customlogo.h"
|
|
||||||
#include "customlogo2.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
#define FONT_PATH ":/NameCreater/_exp/DFYuanStd-W8.otf"
|
||||||
#define TOWEL_FONT_PATH ":/NameCreater/_exp/W1.ttc"
|
#define TOWEL_FONT_PATH ":/NameCreater/_exp/W1.ttc"
|
||||||
#define ENGLISH_FONT_PATH ":/NameCreater/_exp/FontsFree-Net-Acumin-Pro-Semibold.ttf"
|
#define ENGLISH_FONT_PATH ":/NameCreater/_exp/FontsFree-Net-Acumin-Pro-Semibold.ttf"
|
||||||
|
|
||||||
#define FONT_SIZE 120
|
#define FONT_SIZE 120
|
||||||
|
|
||||||
//#define FONT_CHT_URL "https://bazaar1688.ddns.net/font/TaiwanPearl-SemiBold.ttf"
|
|
||||||
|
|
||||||
#define FONT_JSON_URL "https://namecreater.bazaar1688.duckdns.org/font/fonts.json"
|
|
||||||
|
|
||||||
//#define FONT_CHT_URL "http://45.32.51.135/font/TaiwanPearl-SemiBold.ttf"
|
|
||||||
|
|
||||||
static CustomLogo* s_custom_logo_widget = nullptr;
|
|
||||||
|
|
||||||
NameCreater::NameCreater(QWidget *parent)
|
NameCreater::NameCreater(QWidget *parent)
|
||||||
: QMainWindow(parent)
|
: QMainWindow(parent)
|
||||||
{
|
{
|
||||||
ui.setupUi(this);
|
ui.setupUi(this);
|
||||||
|
|
||||||
|
|
||||||
ui.scrollAreaWidgetContents->setMinimumSize(ui.frame->size());
|
|
||||||
|
|
||||||
connect(ui.fivesingle_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
|
connect(ui.fivesingle_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
|
||||||
//connect(ui.fiveold_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
|
//connect(ui.fiveold_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
|
||||||
connect(ui.birthday_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
|
connect(ui.birthday_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
|
||||||
@ -56,84 +40,24 @@ NameCreater::NameCreater(QWidget* parent)
|
|||||||
connect(ui.birthday_eng_eng_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
|
connect(ui.birthday_eng_eng_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
|
||||||
connect(ui.handkerchief_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
|
connect(ui.handkerchief_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
|
||||||
connect(ui.fivesingle_zh_eng_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
|
connect(ui.fivesingle_zh_eng_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
|
||||||
connect(ui.customlogo_btn, &QPushButton::released, this, &NameCreater::OnClickedCustomLogoBtn);
|
|
||||||
connect(ui.customlogo2_btn, &QPushButton::released, this, &NameCreater::OnClickedCustomLogo2Btn);
|
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
connect(ui.font_comboBox, &QComboBox::currentTextChanged, this, &NameCreater::OnFontComboBoxTextChanged);
|
|
||||||
#else
|
|
||||||
connect(ui.font_comboBox, &QComboBox::currentIndexChanged, this, &NameCreater::OnFontComboBoxIndexChanged);
|
|
||||||
#endif
|
|
||||||
//qDebug()<<"QSslSocket="<<QSslSocket::sslLibraryBuildVersionString();
|
|
||||||
|
|
||||||
connect(&network_mgr, &QNetworkAccessManager::finished, this, &NameCreater::onFontDownloadFinished);
|
|
||||||
|
|
||||||
query_type = 10;
|
|
||||||
query(QUrl(FONT_JSON_URL), 10);
|
|
||||||
|
|
||||||
|
QString font_path = FONT_PATH;
|
||||||
|
QFile font_res(font_path);
|
||||||
|
if (!font_res.open(QIODevice::ReadOnly)) {
|
||||||
|
QMessageBox msgBox;
|
||||||
|
msgBox.setText("Can not load font file!" + font_path);
|
||||||
|
msgBox.exec();
|
||||||
|
font_res.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
NameCreater::~NameCreater()
|
int id = QFontDatabase::addApplicationFontFromData(font_res.readAll());
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void NameCreater::parseFontJson(const QByteArray& data)
|
|
||||||
{
|
|
||||||
QJsonDocument jsonDoc = QJsonDocument::fromJson(data);
|
|
||||||
|
|
||||||
if (jsonDoc.isNull()) {
|
|
||||||
qDebug() << "Failed to create JSON doc.";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (jsonDoc.isObject()) {
|
|
||||||
QJsonObject jsonObj = jsonDoc.object();
|
|
||||||
// Process the JSON object
|
|
||||||
qDebug() << "JSON Object:" << jsonObj;
|
|
||||||
}
|
|
||||||
else if (jsonDoc.isArray()) {
|
|
||||||
ui.font_comboBox->clear();
|
|
||||||
QJsonArray jsonArray = jsonDoc.array();
|
|
||||||
|
|
||||||
foreach(auto val, jsonArray) {
|
|
||||||
auto obj = val.toObject();
|
|
||||||
QString n = obj["font_name"].toString();
|
|
||||||
QString u = obj["font_url"].toString();
|
|
||||||
ui.font_comboBox->addItem(n, u);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Process the JSON array
|
|
||||||
qDebug() << "JSON Array:" << jsonArray;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void NameCreater::query(const QUrl& url, int type)
|
|
||||||
{
|
|
||||||
QNetworkRequest req(url);
|
|
||||||
req.setAttribute(QNetworkRequest::User, QVariant(type));
|
|
||||||
network_mgr.get(req);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void NameCreater::loadFont(const QByteArray& fontdata) {
|
|
||||||
|
|
||||||
int id = QFontDatabase::addApplicationFontFromData(fontdata);
|
|
||||||
QStringList family_list = QFontDatabase::applicationFontFamilies(id);
|
QStringList family_list = QFontDatabase::applicationFontFamilies(id);
|
||||||
qDebug() << "font family list:" << family_list;
|
|
||||||
QString cht_fontname = family_list.at(0);
|
|
||||||
|
|
||||||
font = QFont(cht_fontname);
|
font = QFont(family_list.at(0));
|
||||||
font.setPixelSize(FONT_SIZE);
|
font.setPixelSize(FONT_SIZE);
|
||||||
|
font_res.close();
|
||||||
|
|
||||||
QString font_path = QString(TOWEL_FONT_PATH);
|
font_path = QString(TOWEL_FONT_PATH);
|
||||||
QFile font_res_towel(font_path);
|
QFile font_res_towel(font_path);
|
||||||
if (!font_res_towel.open(QIODevice::ReadOnly)) {
|
if (!font_res_towel.open(QIODevice::ReadOnly)) {
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
@ -170,53 +94,28 @@ void NameCreater::loadFont(const QByteArray& fontdata) {
|
|||||||
version_font.setPixelSize(12);
|
version_font.setPixelSize(12);
|
||||||
|
|
||||||
//ui.tital_label->setFont(tital_font);
|
//ui.tital_label->setFont(tital_font);
|
||||||
|
|
||||||
char c_font_name[64] = { 0 };
|
|
||||||
sprintf(c_font_name, "%s", cht_fontname.toStdString().c_str());
|
|
||||||
ui.font_name_label->setFont(version_font);
|
|
||||||
ui.font_name_label->setText(QString::fromLocal8Bit(c_font_name));
|
|
||||||
|
|
||||||
ui.version_label->setFont(version_font);
|
ui.version_label->setFont(version_font);
|
||||||
ui.version_label->setText(VERSION);
|
ui.version_label->setText(VERSION);
|
||||||
ui.font_comboBox->setFont(version_font);
|
|
||||||
|
|
||||||
QList<QLabel*> titals = findChildren<QLabel*>(QRegularExpression("tital_label"));
|
QList<QLabel*> titals = findChildren<QLabel*>(QRegularExpression("tital_label"));
|
||||||
foreach(auto tital, titals) {
|
foreach(auto tital, titals) {
|
||||||
tital->setFont(tital_font);
|
tital->setFont(tital_font);
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "Load Font Succeed!";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void NameCreater::OnClickedReadBtn() {
|
void NameCreater::OnClickedReadBtn() {
|
||||||
auto sender =(QPushButton*) QObject::sender();
|
auto sender =(QPushButton*) QObject::sender();
|
||||||
|
|
||||||
#ifdef Q_OS_WASM
|
|
||||||
|
|
||||||
auto fileContentReady = [this, sender](const QString &fileName, const QByteArray &fileContent) {
|
auto fileContentReady = [this, sender](const QString &fileName, const QByteArray &fileContent) {
|
||||||
if (!fileName.isEmpty()) {
|
if (fileName.isEmpty()) {
|
||||||
this->execCreater(sender, fileName, fileContent);
|
// No file was selected
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
};
|
|
||||||
QFileDialog::getOpenFileContent("CSV (*.csv)", fileContentReady);
|
|
||||||
|
|
||||||
#else
|
|
||||||
QString filename = QFileDialog::getOpenFileName(nullptr, "Open Name File", QDir::currentPath(), "CSV file(*.csv)");
|
|
||||||
if (!filename.isEmpty()) {
|
|
||||||
QFile _f(filename);
|
|
||||||
if (_f.open(QIODevice::ReadOnly)) {
|
|
||||||
execCreater(sender, filename, _f.readAll());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void NameCreater::execCreater(QObject* sender, const QString& fileName, const QByteArray& fileContent) {
|
|
||||||
|
|
||||||
|
|
||||||
// Use fileName and fileContent
|
// Use fileName and fileContent
|
||||||
if(sender == ui.fivesingle_btn) FiveToSingle().generaImageFromCSV(Name_Type_e::Name_zh,fileName, fileContent, this->font, this->font_color);
|
if(sender == ui.fivesingle_btn) FiveToSingle().generaImageFromCSV(Name_Type_e::Name_zh,fileName, fileContent, this->font, this->font_color);
|
||||||
|
|
||||||
@ -247,76 +146,6 @@ void NameCreater::execCreater(QObject* sender, const QString& fileName, const QB
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
QFileDialog::getOpenFileContent("CSV (*.csv)", fileContentReady);
|
||||||
|
|
||||||
void NameCreater::OnClickedCustomLogoBtn() {
|
|
||||||
//QEventLoop loop;
|
|
||||||
if (s_custom_logo_widget == nullptr) {
|
|
||||||
s_custom_logo_widget = new CustomLogo(&this->font);
|
|
||||||
}
|
}
|
||||||
s_custom_logo_widget->show();
|
|
||||||
|
|
||||||
//connect(&widget, &CustomLogo::finished, &loop, &QEventLoop::quit);
|
|
||||||
//loop.exec();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void NameCreater::OnClickedCustomLogo2Btn() {
|
|
||||||
QEventLoop loop;
|
|
||||||
customlogo2 widget(&this->font);
|
|
||||||
connect(&widget, &CustomLogo::finished, &loop, &QEventLoop::quit);
|
|
||||||
widget.show();
|
|
||||||
loop.exec();
|
|
||||||
}
|
|
||||||
|
|
||||||
void NameCreater::onFontDownloadFinished(QNetworkReply* reply) {
|
|
||||||
|
|
||||||
if (reply->error() == QNetworkReply::NoError) {
|
|
||||||
QString url = reply->request().url().toString();
|
|
||||||
int attri = reply->request().attribute(QNetworkRequest::User).toInt();
|
|
||||||
|
|
||||||
qDebug() << "req url:" << url << "attribi:" << QString::number(attri);
|
|
||||||
|
|
||||||
if (url.contains("fonts.json") || attri == 10 || query_type == 10) {
|
|
||||||
qDebug() << "query fonts json succeed";
|
|
||||||
parseFontJson(reply->readAll());
|
|
||||||
|
|
||||||
}else if (url.contains(".ttf") || url.contains(".otf") || attri == 20 || query_type == 20) {
|
|
||||||
qDebug() << "query font family succeed";
|
|
||||||
loadFont(reply->readAll());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
QMessageBox msgBox;
|
|
||||||
msgBox.setText("Can not load font file!" + reply->errorString());
|
|
||||||
msgBox.exec();
|
|
||||||
reply->deleteLater();
|
|
||||||
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void NameCreater::OnFontComboBoxTextChanged(const QString& str)
|
|
||||||
{
|
|
||||||
QComboBox* sender = (QComboBox*)QObject::sender();
|
|
||||||
QString u = sender->currentData().toString();
|
|
||||||
query_type = 20;
|
|
||||||
query(QUrl(u),20);
|
|
||||||
}
|
|
||||||
|
|
||||||
void NameCreater::OnFontComboBoxIndexChanged(int idx)
|
|
||||||
{
|
|
||||||
QComboBox* sender = (QComboBox*)QObject::sender();
|
|
||||||
QString u = sender->currentData().toString();
|
|
||||||
query_type = 20;
|
|
||||||
query(QUrl(u),20);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,47 +3,21 @@
|
|||||||
#include <QtWidgets/QMainWindow>
|
#include <QtWidgets/QMainWindow>
|
||||||
#include "ui_NameCreater.h"
|
#include "ui_NameCreater.h"
|
||||||
|
|
||||||
#include <QNetworkAccessManager>
|
|
||||||
#include <QNetworkRequest>
|
|
||||||
#include <QNetworkReply>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class NameCreater : public QMainWindow
|
class NameCreater : public QMainWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NameCreater(QWidget *parent = Q_NULLPTR);
|
NameCreater(QWidget *parent = Q_NULLPTR);
|
||||||
~NameCreater();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::NameCreaterClass ui;
|
Ui::NameCreaterClass ui;
|
||||||
|
|
||||||
|
|
||||||
QFont font, font_towel, font_english;
|
QFont font, font_towel, font_english;
|
||||||
|
|
||||||
|
|
||||||
QColor font_color;
|
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:
|
private Q_SLOTS:
|
||||||
void OnClickedReadBtn();
|
void OnClickedReadBtn();
|
||||||
void OnClickedCustomLogoBtn();
|
|
||||||
void OnClickedCustomLogo2Btn();
|
|
||||||
void onFontDownloadFinished(QNetworkReply *reply);
|
|
||||||
|
|
||||||
void OnFontComboBoxTextChanged(const QString& str);
|
|
||||||
void OnFontComboBoxIndexChanged(int idx);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -16,10 +16,7 @@ HEADERS += ./resource.h \
|
|||||||
./OldFiveCreater.h \
|
./OldFiveCreater.h \
|
||||||
./TowelCreater.h \
|
./TowelCreater.h \
|
||||||
./NewFiveCreater.h \
|
./NewFiveCreater.h \
|
||||||
./HKHolderCreater.h \
|
./HKHolderCreater.h
|
||||||
./customlogo.h \
|
|
||||||
./customlogo2.h
|
|
||||||
|
|
||||||
SOURCES += ./NameCreater.cpp \
|
SOURCES += ./NameCreater.cpp \
|
||||||
./main.cpp \
|
./main.cpp \
|
||||||
./BirthdayCreater.cpp \
|
./BirthdayCreater.cpp \
|
||||||
@ -28,10 +25,6 @@ SOURCES += ./NameCreater.cpp \
|
|||||||
./INameCreater.cpp \
|
./INameCreater.cpp \
|
||||||
./TowelCreater.cpp \
|
./TowelCreater.cpp \
|
||||||
./NewFiveCreater.cpp \
|
./NewFiveCreater.cpp \
|
||||||
./HKHolderCreater.cpp \
|
./HKHolderCreater.cpp
|
||||||
./customlogo.cpp \
|
FORMS += ./NameCreater.ui
|
||||||
./customlogo2.cpp
|
|
||||||
FORMS += ./NameCreater.ui \
|
|
||||||
./customlogo.ui \
|
|
||||||
./customlogo2.ui
|
|
||||||
RESOURCES += NameCreater.qrc
|
RESOURCES += NameCreater.qrc
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
QT += core gui
|
QT += core gui
|
||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets network
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat
|
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat
|
||||||
|
|
||||||
CONFIG += c++11 resources_big
|
CONFIG += c++11 resources_big
|
||||||
@ -19,9 +19,5 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
|
|||||||
!isEmpty(target.path): INSTALLS += target
|
!isEmpty(target.path): INSTALLS += target
|
||||||
|
|
||||||
|
|
||||||
wasm-emscripten{
|
|
||||||
QMAKE_LFLAGS+= -s TOTAL_MEMORY=67108864
|
QMAKE_LFLAGS+= -s TOTAL_MEMORY=67108864
|
||||||
QMAKE_LFLAGS += -s ALLOW_MEMORY_GROWTH=1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
417
NameCreater/NameCreater.pro.user.b811b07
Normal file
@ -0,0 +1,417 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE QtCreatorProject>
|
||||||
|
<!-- Written by QtCreator 10.0.1, 2023-05-24T20:05:08. -->
|
||||||
|
<qtcreator>
|
||||||
|
<data>
|
||||||
|
<variable>EnvironmentId</variable>
|
||||||
|
<value type="QByteArray">{b811b073-5bd9-459e-9aa0-418d2f1f6d39}</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
|
<value type="qlonglong">1</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||||
|
<value type="QString" key="language">Cpp</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||||
|
<value type="QString" key="language">QmlJS</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||||
|
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||||
|
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
|
||||||
|
<value type="bool" key="AutoTest.Framework.Boost">true</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.CTest">false</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.Catch">true</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.GTest">true</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
||||||
|
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
||||||
|
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
||||||
|
<valuemap type="QVariantMap" key="ClangTools">
|
||||||
|
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||||
|
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||||
|
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||||
|
<value type="int" key="ClangTools.ParallelJobs">4</value>
|
||||||
|
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||||
|
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||||
|
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||||
|
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="CppEditor.QuickFix">
|
||||||
|
<value type="bool" key="UseGlobalSettings">true</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="QString" key="DeviceType">WebAssemblyDeviceType</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 5.15.2 WebAssembly</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 5.15.2 WebAssembly</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5152.wasm_32_kit</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">-1</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/shouchih/qt_ws/namecreater/build-NameCreater-Qt_5_15_2_WebAssembly-Debug</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/shouchih/qt_ws/namecreater/build-NameCreater-Qt_5_15_2_WebAssembly-Debug</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/shouchih/qt_ws/namecreater/build-NameCreater-Qt_5_15_2_WebAssembly-Release</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/shouchih/qt_ws/namecreater/build-NameCreater-Qt_5_15_2_WebAssembly-Release</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
|
<value type="int" key="QtQuickCompiler">0</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||||
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/shouchih/qt_ws/namecreater/build-NameCreater-Qt_5_15_2_WebAssembly-Profile</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/shouchih/qt_ws/namecreater/build-NameCreater-Qt_5_15_2_WebAssembly-Profile</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
|
<value type="int" key="QtQuickCompiler">0</value>
|
||||||
|
<value type="int" key="SeparateDebugInfo">0</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">0</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||||
|
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||||
|
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||||
|
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">NameCreater</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">WebAssembly.RunConfiguration.Emrun/home/shouchih/qt_ws/namecreater/NameCreater/NameCreater.pro</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/home/shouchih/qt_ws/namecreater/NameCreater/NameCreater.pro</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
|
<value type="QString" key="WASM.WebBrowserSelectionAspect.Browser">firefox</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Target.1</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="QString" key="DeviceType">Desktop</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.15.2 GCC 64bit</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.2 GCC 64bit</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5152.gcc_64_kit</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/shouchih/qt_ws/namecreater/build-NameCreater-Desktop_Qt_5_15_2_GCC_64bit-Debug</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/shouchih/qt_ws/namecreater/build-NameCreater-Desktop_Qt_5_15_2_GCC_64bit-Debug</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/shouchih/qt_ws/namecreater/build-NameCreater-Desktop_Qt_5_15_2_GCC_64bit-Release</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/shouchih/qt_ws/namecreater/build-NameCreater-Desktop_Qt_5_15_2_GCC_64bit-Release</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
|
<value type="int" key="QtQuickCompiler">0</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||||
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/shouchih/qt_ws/namecreater/build-NameCreater-Desktop_Qt_5_15_2_GCC_64bit-Profile</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/shouchih/qt_ws/namecreater/build-NameCreater-Desktop_Qt_5_15_2_GCC_64bit-Profile</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
|
<value type="int" key="QtQuickCompiler">0</value>
|
||||||
|
<value type="int" key="SeparateDebugInfo">0</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||||
|
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||||
|
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||||
|
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||||
|
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||||
|
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/shouchih/qt_ws/namecreater/NameCreater/NameCreater.pro</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/home/shouchih/qt_ws/namecreater/NameCreater/NameCreater.pro</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
|
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/shouchih/qt_ws/namecreater/build-NameCreater-Desktop_Qt_5_15_2_GCC_64bit-Debug</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||||
|
<value type="qlonglong">2</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||||
|
<value type="int">22</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>Version</variable>
|
||||||
|
<value type="int">22</value>
|
||||||
|
</data>
|
||||||
|
</qtcreator>
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/NameCreater">
|
<qresource prefix="/NameCreater">
|
||||||
<file>resource/custom_logo/bg_1.jpg</file>
|
<file>_exp/DFYuanStd-W8.otf</file>
|
||||||
<file>resource/background_sample.jpg</file>
|
<file>resource/background_sample.jpg</file>
|
||||||
<file>resource/background_b.jpg</file>
|
<file>resource/background_b.jpg</file>
|
||||||
<file>resource/background_g.jpg</file>
|
<file>resource/background_g.jpg</file>
|
||||||
@ -100,8 +100,5 @@
|
|||||||
<file>resource/five/kg_3.jpg</file>
|
<file>resource/five/kg_3.jpg</file>
|
||||||
<file>resource/five/kg_4.jpg</file>
|
<file>resource/five/kg_4.jpg</file>
|
||||||
<file>resource/five/kg_5.jpg</file>
|
<file>resource/five/kg_5.jpg</file>
|
||||||
<file>resource/custom_logo/demo_2.jpg</file>
|
|
||||||
<file>_exp/Ubuntu-Medium.ttf</file>
|
|
||||||
<file>resource/custom_logo/bg_2.jpg</file>
|
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>902</width>
|
<width>946</width>
|
||||||
<height>780</height>
|
<height>817</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@ -25,20 +25,15 @@
|
|||||||
background-color: rgb(0, 0, 0);
|
background-color: rgb(0, 0, 0);
|
||||||
}</string>
|
}</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,10">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>100</number>
|
|
||||||
</property>
|
|
||||||
<property name="sizeConstraint">
|
|
||||||
<enum>QLayout::SetDefaultConstraint</enum>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="version_label">
|
<widget class="QLabel" name="version_label">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>181</width>
|
||||||
|
<height>16</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Yu Gothic UI</family>
|
<family>Yu Gothic UI</family>
|
||||||
@ -59,96 +54,13 @@
|
|||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="font_name_label">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Yu Gothic UI</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
<weight>50</weight>
|
|
||||||
<italic>false</italic>
|
|
||||||
<bold>false</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">color: rgb(255, 255, 255);
|
|
||||||
</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>font_name</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="font_comboBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QScrollArea" name="scrollArea">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeAdjustPolicy">
|
|
||||||
<enum>QAbstractScrollArea::AdjustToContents</enum>
|
|
||||||
</property>
|
|
||||||
<property name="widgetResizable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>884</width>
|
|
||||||
<height>734</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">QWidget#scrollAreaWidgetContents{
|
|
||||||
background-color: rgb(0, 0, 0);
|
|
||||||
}</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QFrame" name="frame">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>10</x>
|
||||||
<y>0</y>
|
<y>40</y>
|
||||||
<width>861</width>
|
<width>851</width>
|
||||||
<height>681</height>
|
<height>581</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
@ -165,129 +77,8 @@ border-color: rgb(255, 255, 255);
|
|||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="7" column="0">
|
<item row="2" column="1">
|
||||||
<widget class="QLabel" name="tital_label_7">
|
<widget class="QPushButton" name="fivesingle_btn">
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Yu Gothic UI</family>
|
|
||||||
<pointsize>20</pointsize>
|
|
||||||
<weight>50</weight>
|
|
||||||
<italic>false</italic>
|
|
||||||
<bold>false</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">
|
|
||||||
color: rgb(255, 255, 255);
|
|
||||||
</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>生日禮產生器(英/英)</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0">
|
|
||||||
<widget class="QPushButton" name="birthday_zh_eng_btn">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>76</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Open File</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="tital_label_4">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Yu Gothic UI</family>
|
|
||||||
<pointsize>20</pointsize>
|
|
||||||
<weight>50</weight>
|
|
||||||
<italic>false</italic>
|
|
||||||
<bold>false</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">
|
|
||||||
color: rgb(255, 255, 255);
|
|
||||||
</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>生日禮產生器</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QPushButton" name="fivesingle_zh_eng_btn">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>76</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Open File</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="tital_label_3">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Yu Gothic UI</family>
|
|
||||||
<pointsize>20</pointsize>
|
|
||||||
<weight>50</weight>
|
|
||||||
<italic>false</italic>
|
|
||||||
<bold>false</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">color: rgb(255, 255, 255);
|
|
||||||
</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>五入組產生器</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="0">
|
|
||||||
<widget class="QLabel" name="tital_label_9">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Yu Gothic UI</family>
|
|
||||||
<pointsize>20</pointsize>
|
|
||||||
<weight>50</weight>
|
|
||||||
<italic>false</italic>
|
|
||||||
<bold>false</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">
|
|
||||||
color: rgb(255, 255, 255);
|
|
||||||
</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>客製底圖產生器</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="0">
|
|
||||||
<widget class="QPushButton" name="birthday_eng_eng_btn">
|
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
@ -322,43 +113,6 @@ color: rgb(255, 255, 255);
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QLabel" name="tital_label_6">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Yu Gothic UI</family>
|
|
||||||
<pointsize>20</pointsize>
|
|
||||||
<weight>50</weight>
|
|
||||||
<italic>false</italic>
|
|
||||||
<bold>false</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">
|
|
||||||
color: rgb(255, 255, 255);
|
|
||||||
</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>生日禮產生器(中/英)</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QPushButton" name="birthday_btn">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>76</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Open File</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="1">
|
<item row="8" column="1">
|
||||||
<widget class="QPushButton" name="handkerchief_btn">
|
<widget class="QPushButton" name="handkerchief_btn">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
@ -372,6 +126,29 @@ color: rgb(255, 255, 255);
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLabel" name="tital_label_2">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Yu Gothic UI</family>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
<weight>50</weight>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: rgb(255, 255, 255);
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>五入組拆成單入產生器(中/英)</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="6" column="1">
|
<item row="6" column="1">
|
||||||
<widget class="QPushButton" name="towel_btn">
|
<widget class="QPushButton" name="towel_btn">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
@ -385,45 +162,6 @@ color: rgb(255, 255, 255);
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QPushButton" name="fivesingle_btn">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>76</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Open File</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="10" column="0">
|
|
||||||
<widget class="QPushButton" name="customlogo_btn">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>76</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Open Dialog</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="10" column="1">
|
|
||||||
<widget class="QPushButton" name="customlogo2_btn">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>76</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Open Dialog</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QLabel" name="tital_label">
|
<widget class="QLabel" name="tital_label">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@ -460,53 +198,6 @@ color: rgb(255, 255, 255);
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="1">
|
|
||||||
<widget class="QLabel" name="tital_label_10">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Yu Gothic UI</family>
|
|
||||||
<pointsize>20</pointsize>
|
|
||||||
<weight>50</weight>
|
|
||||||
<italic>false</italic>
|
|
||||||
<bold>false</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">
|
|
||||||
color: rgb(255, 255, 255);
|
|
||||||
</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>扶輪社</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QLabel" name="tital_label_2">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Yu Gothic UI</family>
|
|
||||||
<pointsize>20</pointsize>
|
|
||||||
<weight>50</weight>
|
|
||||||
<italic>false</italic>
|
|
||||||
<bold>false</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">color: rgb(255, 255, 255);
|
|
||||||
</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>五入組拆成單入產生器(中/英)</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="1">
|
<item row="7" column="1">
|
||||||
<widget class="QLabel" name="tital_label_8">
|
<widget class="QLabel" name="tital_label_8">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@ -531,13 +222,175 @@ color: rgb(250, 250, 250);
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="tital_label_3">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Yu Gothic UI</family>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
<weight>50</weight>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: rgb(255, 255, 255);
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>五入組產生器</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QPushButton" name="fivesingle_zh_eng_btn">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>76</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open File</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="tital_label_4">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Yu Gothic UI</family>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
<weight>50</weight>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>生日禮產生器</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QPushButton" name="birthday_btn">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>76</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open File</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="tital_label_6">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Yu Gothic UI</family>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
<weight>50</weight>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>生日禮產生器(中/英)</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QPushButton" name="birthday_zh_eng_btn">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>76</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open File</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0">
|
||||||
|
<widget class="QLabel" name="tital_label_7">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Yu Gothic UI</family>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
<weight>50</weight>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>生日禮產生器(英/英)</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="0">
|
||||||
|
<widget class="QPushButton" name="birthday_eng_eng_btn">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>76</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open File</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenuBar" name="menuBar">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>946</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QToolBar" name="mainToolBar">
|
||||||
|
<attribute name="toolBarArea">
|
||||||
|
<enum>TopToolBarArea</enum>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="toolBarBreak">
|
||||||
|
<bool>false</bool>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="QStatusBar" name="statusBar"/>
|
||||||
<action name="actionOpen_File">
|
<action name="actionOpen_File">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Open File</string>
|
<string>Open File</string>
|
||||||
|
|||||||
@ -21,30 +21,28 @@
|
|||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<ProjectGuid>{B66B108B-6DA8-408D-936D-988FF8B6B722}</ProjectGuid>
|
<ProjectGuid>{B66B108B-6DA8-408D-936D-988FF8B6B722}</ProjectGuid>
|
||||||
<Keyword>QtVS_v304</Keyword>
|
<Keyword>QtVS_v304</Keyword>
|
||||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">10.0</WindowsTargetPlatformVersion>
|
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">10.0.16299.0</WindowsTargetPlatformVersion>
|
||||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">10.0</WindowsTargetPlatformVersion>
|
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">10.0</WindowsTargetPlatformVersion>
|
||||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">10.0.16299.0</WindowsTargetPlatformVersion>
|
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">10.0.16299.0</WindowsTargetPlatformVersion>
|
||||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)'=='Release|x64'">10.0</WindowsTargetPlatformVersion>
|
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)'=='Release|x64'">10.0.19041.0</WindowsTargetPlatformVersion>
|
||||||
<QtMsBuild Condition="'$(QtMsBuild)'=='' OR !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
|
<QtMsBuild Condition="'$(QtMsBuild)'=='' OR !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
<CharacterSet>NotSet</CharacterSet>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
<CharacterSet>NotSet</CharacterSet>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
|
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
|
||||||
@ -52,12 +50,12 @@
|
|||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="QtSettings">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="QtSettings">
|
||||||
<QtInstall>5.15.2_msvc2019_64</QtInstall>
|
<QtInstall>5.15.2_msvc2019_64</QtInstall>
|
||||||
<QtModules>core;gui;widgets;network</QtModules>
|
<QtModules>core;gui;widgets</QtModules>
|
||||||
<QtBuildConfig>debug</QtBuildConfig>
|
<QtBuildConfig>debug</QtBuildConfig>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
|
||||||
<QtInstall>$(DefaultQtVersion)</QtInstall>
|
<QtInstall>5.15.2_msvc2019_64</QtInstall>
|
||||||
<QtModules>core;gui;widgets;network</QtModules>
|
<QtModules>core;gui;widgets</QtModules>
|
||||||
<QtBuildConfig>debug</QtBuildConfig>
|
<QtBuildConfig>debug</QtBuildConfig>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="QtSettings">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="QtSettings">
|
||||||
@ -67,7 +65,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
|
||||||
<QtInstall>$(DefaultQtVersion)</QtInstall>
|
<QtInstall>$(DefaultQtVersion)</QtInstall>
|
||||||
<QtModules>core;gui;widgets;network;core5compat</QtModules>
|
<QtModules>core;gui;widgets</QtModules>
|
||||||
<QtBuildConfig>release</QtBuildConfig>
|
<QtBuildConfig>release</QtBuildConfig>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
|
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
|
||||||
@ -114,14 +112,8 @@
|
|||||||
<Command>xcopy /y "$(ProjectDir)_exp\*" "$(TargetDir)"</Command>
|
<Command>xcopy /y "$(ProjectDir)_exp\*" "$(TargetDir)"</Command>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalOptions>/Zm1000</AdditionalOptions>
|
<AdditionalOptions>/Zm100</AdditionalOptions>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
|
||||||
<HeapCommitSize>
|
|
||||||
</HeapCommitSize>
|
|
||||||
<HeapReserveSize>
|
|
||||||
</HeapReserveSize>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
@ -187,15 +179,11 @@
|
|||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="BirthdayCreater.cpp" />
|
<ClCompile Include="BirthdayCreater.cpp" />
|
||||||
<ClCompile Include="customlogo.cpp" />
|
|
||||||
<ClCompile Include="customlogo2.cpp" />
|
|
||||||
<ClCompile Include="HKHolderCreater.cpp" />
|
<ClCompile Include="HKHolderCreater.cpp" />
|
||||||
<ClCompile Include="NewFiveCreater.cpp" />
|
<ClCompile Include="NewFiveCreater.cpp" />
|
||||||
<ClCompile Include="OldFiveCreater.cpp" />
|
<ClCompile Include="OldFiveCreater.cpp" />
|
||||||
<ClCompile Include="TowelCreater.cpp" />
|
<ClCompile Include="TowelCreater.cpp" />
|
||||||
<QtRcc Include="NameCreater.qrc" />
|
<QtRcc Include="NameCreater.qrc" />
|
||||||
<QtUic Include="customlogo.ui" />
|
|
||||||
<QtUic Include="customlogo2.ui" />
|
|
||||||
<QtUic Include="NameCreater.ui" />
|
<QtUic Include="NameCreater.ui" />
|
||||||
<QtMoc Include="NameCreater.h" />
|
<QtMoc Include="NameCreater.h" />
|
||||||
<ClCompile Include="FiveToSingle.cpp" />
|
<ClCompile Include="FiveToSingle.cpp" />
|
||||||
@ -205,9 +193,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="BirthdayCreater.h" />
|
<ClInclude Include="BirthdayCreater.h" />
|
||||||
<QtMoc Include="customlogo.h" />
|
|
||||||
<QtMoc Include="customlogo2.h" />
|
|
||||||
<ClInclude Include="def.h" />
|
|
||||||
<ClInclude Include="FiveToSingle.h" />
|
<ClInclude Include="FiveToSingle.h" />
|
||||||
<ClInclude Include="HKHolderCreater.h" />
|
<ClInclude Include="HKHolderCreater.h" />
|
||||||
<ClInclude Include="INameCreater.h" />
|
<ClInclude Include="INameCreater.h" />
|
||||||
|
|||||||
@ -64,12 +64,6 @@
|
|||||||
<ClCompile Include="HKHolderCreater.cpp">
|
<ClCompile Include="HKHolderCreater.cpp">
|
||||||
<Filter>Creaters</Filter>
|
<Filter>Creaters</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="customlogo.cpp">
|
|
||||||
<Filter>Creaters</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="customlogo2.cpp">
|
|
||||||
<Filter>Creaters</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="resource.h">
|
<ClInclude Include="resource.h">
|
||||||
@ -96,29 +90,10 @@
|
|||||||
<ClInclude Include="HKHolderCreater.h">
|
<ClInclude Include="HKHolderCreater.h">
|
||||||
<Filter>Creaters</Filter>
|
<Filter>Creaters</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="def.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="NameCreater.rc">
|
<ResourceCompile Include="NameCreater.rc">
|
||||||
<Filter>Resource Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<QtUic Include="customlogo.ui">
|
|
||||||
<Filter>Form Files</Filter>
|
|
||||||
</QtUic>
|
|
||||||
<QtUic Include="customlogo2.ui">
|
|
||||||
<Filter>Form Files</Filter>
|
|
||||||
</QtUic>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<QtMoc Include="customlogo.h">
|
|
||||||
<Filter>Creaters</Filter>
|
|
||||||
</QtMoc>
|
|
||||||
<QtMoc Include="customlogo2.h">
|
|
||||||
<Filter>Creaters</Filter>
|
|
||||||
</QtMoc>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
@ -17,23 +17,15 @@
|
|||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<QtLastBackgroundBuild>2024-05-14T07:08:49.3700216Z</QtLastBackgroundBuild>
|
<QtLastBackgroundBuild>2024-03-08T00:24:36.2679670Z</QtLastBackgroundBuild>
|
||||||
<QtTouchProperty>
|
|
||||||
</QtTouchProperty>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
|
||||||
<QtLastBackgroundBuild>2024-05-14T07:08:49.6936159Z</QtLastBackgroundBuild>
|
<QtLastBackgroundBuild>2024-03-08T00:24:36.4421487Z</QtLastBackgroundBuild>
|
||||||
<QtTouchProperty>
|
|
||||||
</QtTouchProperty>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<QtLastBackgroundBuild>2024-05-14T07:08:49.8356144Z</QtLastBackgroundBuild>
|
<QtLastBackgroundBuild>2024-03-08T00:24:36.6106971Z</QtLastBackgroundBuild>
|
||||||
<QtTouchProperty>
|
|
||||||
</QtTouchProperty>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
|
||||||
<QtLastBackgroundBuild>2024-05-14T07:08:49.9726151Z</QtLastBackgroundBuild>
|
<QtLastBackgroundBuild>2024-03-08T00:24:36.7243928Z</QtLastBackgroundBuild>
|
||||||
<QtTouchProperty>
|
|
||||||
</QtTouchProperty>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@ -1,61 +0,0 @@
|
|||||||
name
|
|
||||||
曹瑀樂
|
|
||||||
謝沛希
|
|
||||||
何采璇
|
|
||||||
余梓鳳
|
|
||||||
陳品臻
|
|
||||||
邱媺涵
|
|
||||||
翁菀妏
|
|
||||||
鄭欣妮
|
|
||||||
林昱澔
|
|
||||||
林和緻
|
|
||||||
王芃宥
|
|
||||||
蔡曉蓉
|
|
||||||
郭乃甄
|
|
||||||
詹斐晴
|
|
||||||
游子萱
|
|
||||||
陳玟如
|
|
||||||
黃子芩
|
|
||||||
張凱晴
|
|
||||||
陳珈琳
|
|
||||||
曾靖媞
|
|
||||||
黃芷璿
|
|
||||||
吳子弘
|
|
||||||
黃珮綺
|
|
||||||
何飛翰
|
|
||||||
林筱芙
|
|
||||||
汪詩軒
|
|
||||||
蘇竹君
|
|
||||||
蔡芊薏
|
|
||||||
陳品蓁
|
|
||||||
林聿安
|
|
||||||
曾逸星
|
|
||||||
鄭亞兒
|
|
||||||
陳尚青
|
|
||||||
呂惠玉
|
|
||||||
陳品勳
|
|
||||||
鍾承羲
|
|
||||||
簡君恬
|
|
||||||
翁承毅
|
|
||||||
陳婕熙
|
|
||||||
柯彥辰
|
|
||||||
陳星月
|
|
||||||
張宸菲
|
|
||||||
林秭安
|
|
||||||
王宇安
|
|
||||||
林采睫
|
|
||||||
吳宇晴
|
|
||||||
王芷甯
|
|
||||||
巫少杰
|
|
||||||
易庭安
|
|
||||||
陳宥博
|
|
||||||
黃乙蔓
|
|
||||||
何盈萱
|
|
||||||
楊蕙慈
|
|
||||||
林珆安
|
|
||||||
吳秀一
|
|
||||||
鄭金柔
|
|
||||||
鄭碩軒
|
|
||||||
白浚緯
|
|
||||||
紀艾德
|
|
||||||
辛翊僑
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
eng_name,bg_type
|
eng_name,bg_type
|
||||||
Churchill,m
|
Alice,r
|
||||||
Alice,r
|
Alice,r
|
||||||
Alice,r
|
Alice,r
|
||||||
Alice,r
|
Alice,r
|
||||||
|
|||||||
|
@ -1,443 +0,0 @@
|
|||||||
#include "customlogo.h"
|
|
||||||
#include "ui_customlogo.h"
|
|
||||||
#include "QFileDialog"
|
|
||||||
|
|
||||||
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QDateTime>
|
|
||||||
#include <QTextCodec>
|
|
||||||
#include <QTextStream>
|
|
||||||
#include <QBuffer>
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QColorDialog>
|
|
||||||
|
|
||||||
|
|
||||||
#define DEMO_BG_PATH ":/NameCreater/resource/custom_logo/bg_1.jpg"
|
|
||||||
|
|
||||||
#define KEY_DEMO_BG_ITEM 10
|
|
||||||
#define KEY_WORD_ITEM 100
|
|
||||||
#define KEY_WORD_ITEM_X_POS 101
|
|
||||||
#define KEY_WORD_ITEM_Y_POS 102
|
|
||||||
#define DEMO_WORD_UNICODE "\u92ea\u96dc\u5152"
|
|
||||||
|
|
||||||
static QPointF BG_POS_START = QPointF(159, 61);
|
|
||||||
static QPointF BG_POS_ROT_START = QPointF(900, 2094);
|
|
||||||
static qreal BG_WIDTH_OFFSET = 320;
|
|
||||||
static int NAME_COUNT_IN_PAGE = 12;
|
|
||||||
|
|
||||||
|
|
||||||
static QPointF NAME_OFFSET_START = QPointF(79, 365);
|
|
||||||
static qreal EACH_WORD_OFFSET = 142;
|
|
||||||
static QColor FONT_COLOR = QColor(0, 0, 0);
|
|
||||||
|
|
||||||
static QColorDialog* s_colorDialog = nullptr;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class QGraphicsCloneTextItem : public QGraphicsTextItem {
|
|
||||||
public:
|
|
||||||
QGraphicsCloneTextItem(const QString& text, QGraphicsItem* parent = nullptr) :
|
|
||||||
QGraphicsTextItem(text, parent) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QGraphicsCloneTextItem* clone(QGraphicsItem* parent = nullptr) const {
|
|
||||||
|
|
||||||
QGraphicsCloneTextItem* newItem = new QGraphicsCloneTextItem(toPlainText(), parent);
|
|
||||||
newItem->setFont(font());
|
|
||||||
newItem->setPos(pos());
|
|
||||||
newItem->setDefaultTextColor(defaultTextColor());
|
|
||||||
return newItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CustomLogo::CustomLogo(QFont* font, QDialog* parent) :
|
|
||||||
QDialog(parent),
|
|
||||||
ui(new Ui::CustomLogo),
|
|
||||||
customFont(font),
|
|
||||||
fontColor(QColor(0, 0, 0))
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
x_adjust_offset = y_adjust_offset = 0;
|
|
||||||
onSliderValueChanged(0);
|
|
||||||
|
|
||||||
connect(ui->load_bg_btn, &QPushButton::released, this, &CustomLogo::onClickedBtn);
|
|
||||||
connect(ui->load_list_btn, &QPushButton::released, this, &CustomLogo::onClickedBtn);
|
|
||||||
connect(ui->color_btn, &QPushButton::released, this, &CustomLogo::onClickedBtn);
|
|
||||||
connect(ui->reset_adjust_btn, &QPushButton::released, this, &CustomLogo::onClickedBtn);
|
|
||||||
connect(ui->double_checkbox, &QCheckBox::clicked, this, &CustomLogo::onCheckboxClicked);
|
|
||||||
|
|
||||||
connect(ui->x_adjust_slider, &QSlider::valueChanged, this, &CustomLogo::onSliderValueChanged);
|
|
||||||
connect(ui->y_adjust_slider, &QSlider::valueChanged, this, &CustomLogo::onSliderValueChanged);
|
|
||||||
|
|
||||||
|
|
||||||
QFont _f(*font);
|
|
||||||
_f.setPixelSize(20);
|
|
||||||
|
|
||||||
|
|
||||||
QPalette palette = ui->color_label->palette();
|
|
||||||
palette.setColor(QPalette::WindowText, fontColor);
|
|
||||||
ui->color_label->setPalette(palette);
|
|
||||||
ui->color_label->setFont(_f);
|
|
||||||
ui->color_btn->setFont(_f);
|
|
||||||
ui->double_checkbox->setFont(_f);
|
|
||||||
ui->hor_label->setFont(_f);
|
|
||||||
ui->vel_label->setFont(_f);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
demo_scene.setBackgroundBrush(QBrush(QColor(255, 255, 255)));
|
|
||||||
ui->demo_graphicsView->setScene(&demo_scene);
|
|
||||||
|
|
||||||
QPixmap def_demo_bg(DEMO_BG_PATH);
|
|
||||||
createDemoGraphicItemBG(def_demo_bg);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
CustomLogo::~CustomLogo()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomLogo::loadBGFromFile()
|
|
||||||
{
|
|
||||||
auto fileContentReady = [this](const QString& fileName, const QByteArray& fileContent) {
|
|
||||||
if (fileName.isEmpty()) {
|
|
||||||
// No file was selected
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
QPixmap pix;
|
|
||||||
if (pix.loadFromData(fileContent, "JPG")) {
|
|
||||||
//ui->display_label->setPixmap(pix);
|
|
||||||
createDemoGraphicItemBG(pix);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
qDebug() << "Data content not image format";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
QFileDialog::getOpenFileContent("Image (*.jpg)", fileContentReady);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomLogo::createDemoGraphicItemBG(const QPixmap& img)
|
|
||||||
{
|
|
||||||
demo_scene.clear();
|
|
||||||
|
|
||||||
bool isReverse = ui->double_checkbox->isChecked();
|
|
||||||
|
|
||||||
QGraphicsPixmapItem* name_bgItem = new QGraphicsPixmapItem(img);
|
|
||||||
name_bgItem->setData(KEY_DEMO_BG_ITEM, KEY_DEMO_BG_ITEM);
|
|
||||||
name_bgItem->setPos(10, 10);
|
|
||||||
demo_scene.addItem(name_bgItem);
|
|
||||||
|
|
||||||
QGraphicsRectItem* name_rectItem = NULL, * name_reverse_rectItem = NULL;
|
|
||||||
|
|
||||||
name_rectItem = new QGraphicsRectItem(QRectF(0, 0, name_bgItem->boundingRect().width(), name_bgItem->boundingRect().height() / 2), name_bgItem);
|
|
||||||
name_rectItem->setPen(QPen(QColor(0, 0, 0, 255)));
|
|
||||||
|
|
||||||
if (isReverse) {
|
|
||||||
name_reverse_rectItem = new QGraphicsRectItem(name_rectItem->rect(), name_bgItem);
|
|
||||||
name_reverse_rectItem->setPen(QPen(QColor(0, 0, 0, 0)));
|
|
||||||
name_reverse_rectItem->setPos(name_bgItem->boundingRect().width(), name_bgItem->boundingRect().height());
|
|
||||||
name_reverse_rectItem->setRotation(180);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QString name = QString(DEMO_WORD_UNICODE);
|
|
||||||
int name_len = name.length();
|
|
||||||
QPointF pos = NAME_OFFSET_START;
|
|
||||||
qreal y_offset = 0;
|
|
||||||
if (name_len == 2) {
|
|
||||||
pos.setY(pos.y() + 65.0);
|
|
||||||
y_offset = 55;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (int k = 0; k < name_len; k++) {
|
|
||||||
QGraphicsCloneTextItem* textItem = new QGraphicsCloneTextItem(name.mid(k, 1), name_rectItem);
|
|
||||||
textItem->setFont(*customFont);
|
|
||||||
textItem->setDefaultTextColor(fontColor);
|
|
||||||
|
|
||||||
qreal _posX = (name_rectItem->boundingRect().width() / 2 - textItem->boundingRect().width() / 2);
|
|
||||||
qreal _posY = (pos.y()) + k * (EACH_WORD_OFFSET + y_offset);
|
|
||||||
qDebug() << "Name num:" << QString::number(k) << "PosY:" << QString::number(_posY);
|
|
||||||
textItem->setData(KEY_WORD_ITEM, QVariant(KEY_WORD_ITEM));
|
|
||||||
textItem->setData(KEY_WORD_ITEM_X_POS, QVariant(_posX));
|
|
||||||
textItem->setData(KEY_WORD_ITEM_Y_POS, QVariant(_posY));
|
|
||||||
textItem->setPos(_posX+x_adjust_offset, _posY+y_adjust_offset);
|
|
||||||
|
|
||||||
if (name_reverse_rectItem) {
|
|
||||||
QGraphicsCloneTextItem* _ti = ((QGraphicsCloneTextItem*)textItem)->clone(name_reverse_rectItem);
|
|
||||||
_ti->setData(KEY_WORD_ITEM, QVariant(KEY_WORD_ITEM));
|
|
||||||
_ti->setData(KEY_WORD_ITEM_X_POS, QVariant(_posX));
|
|
||||||
_ti->setData(KEY_WORD_ITEM_Y_POS, QVariant(_posY));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomLogo::updateDemoGraphicItemBG() {
|
|
||||||
foreach(QGraphicsItem * item, demo_scene.items()) {
|
|
||||||
QVariant v = item->data(KEY_WORD_ITEM);
|
|
||||||
if (v.toInt() == KEY_WORD_ITEM) {
|
|
||||||
((QGraphicsTextItem*)item)->setDefaultTextColor(fontColor);
|
|
||||||
qreal _ori_x = item->data(KEY_WORD_ITEM_X_POS).toReal();
|
|
||||||
qreal _ori_y = item->data(KEY_WORD_ITEM_Y_POS).toReal();
|
|
||||||
item->setPos(_ori_x + x_adjust_offset, _ori_y + y_adjust_offset);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomLogo::loadListFromFile()
|
|
||||||
{
|
|
||||||
auto fileContentReady = [this](const QString& fileName, const QByteArray& fileContent) {
|
|
||||||
if (fileName.isEmpty()) {
|
|
||||||
// No file was selected
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
QList<NameInfo_t> nameList = getNameByFileContent(Name_zh, fileContent);
|
|
||||||
if (!nameList.isEmpty()) {
|
|
||||||
qDebug() << "List size: " << QString::number(nameList.count());
|
|
||||||
gerneraImageFromList(nameList, Name_zh);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
qDebug() << "List is empty!!";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
QFileDialog::getOpenFileContent("CSV file (*.csv)", fileContentReady);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomLogo::gerneraImageFromList(const QList<NameInfo_t>& nameList, Name_Type_e type)
|
|
||||||
{
|
|
||||||
int export_times = 0;
|
|
||||||
QGraphicsScene scene;
|
|
||||||
scene.setBackgroundBrush(QBrush(QColor(255, 255, 255)));
|
|
||||||
QGraphicsView view(&scene);
|
|
||||||
|
|
||||||
switch (type) {
|
|
||||||
case Name_zh:
|
|
||||||
{
|
|
||||||
for (int n = 0; n < nameList.length(); n++) {
|
|
||||||
int idx = n % NAME_COUNT_IN_PAGE;
|
|
||||||
NameInfo_t name_info = nameList.at(n);
|
|
||||||
|
|
||||||
if (idx == 0) {
|
|
||||||
|
|
||||||
QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT);
|
|
||||||
bg_item->setBrush(QBrush(QColor(255, 255, 255)));
|
|
||||||
scene.addItem(bg_item);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QPixmap _bg;
|
|
||||||
|
|
||||||
foreach(QGraphicsItem * item, demo_scene.items()) {
|
|
||||||
QVariant v = item->data(KEY_DEMO_BG_ITEM);
|
|
||||||
if (v.toInt() == KEY_DEMO_BG_ITEM) {
|
|
||||||
_bg = ((QGraphicsPixmapItem*)item)->pixmap().copy();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QGraphicsPixmapItem* name_bgItem = new QGraphicsPixmapItem(_bg);
|
|
||||||
bool rot = (idx == 10 || idx == 11);
|
|
||||||
name_bgItem->setRotation(rot ? -90 : 0);
|
|
||||||
qreal item_pos_x = rot ? BG_POS_ROT_START.x() : BG_POS_START.x() + idx * BG_WIDTH_OFFSET;
|
|
||||||
qreal item_pos_y = rot ? BG_POS_ROT_START.y() + (idx - 10) * BG_WIDTH_OFFSET : BG_POS_START.y();
|
|
||||||
name_bgItem->setPos(item_pos_x, item_pos_y);
|
|
||||||
scene.addItem(name_bgItem);
|
|
||||||
|
|
||||||
|
|
||||||
if (name_info.name1.isEmpty()) {
|
|
||||||
QMessageBox msgBox;
|
|
||||||
msgBox.setText(QString().asprintf("Name is Empty at %d", export_times + 1));
|
|
||||||
msgBox.exec();
|
|
||||||
}
|
|
||||||
QGraphicsRectItem* name_rectItem = new QGraphicsRectItem(QRectF(0, 0, name_bgItem->boundingRect().width(), name_bgItem->boundingRect().height() / 2), name_bgItem);
|
|
||||||
name_rectItem->setPen(QPen(QColor(0, 0, 0, 0)));
|
|
||||||
|
|
||||||
QString name = name_info.name1;
|
|
||||||
int name_len = name.length();
|
|
||||||
QPointF pos = NAME_OFFSET_START;
|
|
||||||
qreal y_offset = 0;
|
|
||||||
if (name_len == 2) {
|
|
||||||
pos.setY(pos.y() + 65.0);
|
|
||||||
y_offset = 55;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int k = 0; k < name_len; k++) {
|
|
||||||
QGraphicsCloneTextItem* textItem = new QGraphicsCloneTextItem(name.mid(k, 1), name_rectItem);
|
|
||||||
textItem->setFont(*customFont);
|
|
||||||
textItem->setDefaultTextColor(fontColor);
|
|
||||||
qreal _posX = name_rectItem->boundingRect().width() / 2 - textItem->boundingRect().width() / 2;
|
|
||||||
qreal _posY = pos.y() + k * (EACH_WORD_OFFSET + y_offset);
|
|
||||||
qDebug() << "Name num:" << QString::number(k) << "PosY:" << QString::number(_posY);
|
|
||||||
textItem->setPos(_posX+x_adjust_offset, _posY+y_adjust_offset);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (ui->double_checkbox->isChecked()) {
|
|
||||||
QGraphicsRectItem* name_reverse_rectItem = new QGraphicsRectItem(name_rectItem->rect(), name_bgItem);
|
|
||||||
name_reverse_rectItem->setPen(QPen(QColor(0, 0, 0, 0)));
|
|
||||||
name_reverse_rectItem->setPos(name_bgItem->boundingRect().width(), name_bgItem->boundingRect().height());
|
|
||||||
foreach(auto item, name_rectItem->childItems()) {
|
|
||||||
QGraphicsCloneTextItem* _ti = ((QGraphicsCloneTextItem*)item)->clone(name_reverse_rectItem);
|
|
||||||
}
|
|
||||||
name_reverse_rectItem->setRotation(180);
|
|
||||||
qDebug() << "name_rect item child count:" << name_rectItem->childItems().size();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool is_export_page = ((idx + 1) % NAME_COUNT_IN_PAGE == 0);
|
|
||||||
if (is_export_page || n == nameList.count() - 1) {
|
|
||||||
QString date_str = QDateTime::currentDateTime().toString("MMddhhmm");
|
|
||||||
QString file_name = QString("Signal_%2_%1.jpg").arg(QString::number(export_times + 1), date_str);
|
|
||||||
//saveToImage(file_name, &scene);
|
|
||||||
INameCreater().saveToImage(file_name, &scene);
|
|
||||||
export_times++;
|
|
||||||
|
|
||||||
scene.clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
QMessageBox msgBox;
|
|
||||||
msgBox.setText(QString().asprintf("Export Finshed. Count:%d", export_times));
|
|
||||||
msgBox.exec();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QList<NameInfo_t> CustomLogo::getNameByFileContent(Name_Type_e type, const QByteArray& conetent)
|
|
||||||
{
|
|
||||||
QList<NameInfo_t> nameList;
|
|
||||||
|
|
||||||
QString codec_text = ui->codec_comboBox->currentText();
|
|
||||||
|
|
||||||
QTextCodec* tc = QTextCodec::codecForName(codec_text.toStdString().c_str()); // can also using "Utf8" or "Big5" codec
|
|
||||||
QString codec = tc->toUnicode(conetent.data());
|
|
||||||
QTextStream stream(&codec);
|
|
||||||
|
|
||||||
int row = 0;
|
|
||||||
while (!stream.atEnd())
|
|
||||||
{
|
|
||||||
NameInfo_t info;
|
|
||||||
QString line = stream.readLine();
|
|
||||||
QString name_tc = line;
|
|
||||||
QStringList csvList = name_tc.split(',');
|
|
||||||
|
|
||||||
QString name, eng_name, bg_type;
|
|
||||||
|
|
||||||
switch (type) {
|
|
||||||
case Name_zh:
|
|
||||||
name = csvList.at(0);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
qDebug() << "row :" << row << " " << name;
|
|
||||||
|
|
||||||
if (name.compare("name_1") == 0 || name.compare("name") == 0 ||
|
|
||||||
eng_name.compare("eng_name") == 0) {
|
|
||||||
//pass first line
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
info.name1 = name;
|
|
||||||
|
|
||||||
nameList.append(info);
|
|
||||||
|
|
||||||
row++;
|
|
||||||
}
|
|
||||||
return nameList;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomLogo::onColorSelected(const QColor& color)
|
|
||||||
{
|
|
||||||
qDebug() << "color accept: r:" << color.red() << ", g:" << color.green() <<", b:" << color.blue();
|
|
||||||
fontColor = QColor(color);
|
|
||||||
|
|
||||||
QPalette palette = ui->color_label->palette();
|
|
||||||
palette.setColor(QPalette::WindowText, fontColor);
|
|
||||||
ui->color_label->setPalette(palette);
|
|
||||||
|
|
||||||
updateDemoGraphicItemBG();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomLogo::onSliderValueChanged(int value)
|
|
||||||
{
|
|
||||||
auto slider = QObject::sender();
|
|
||||||
|
|
||||||
if (slider == ui->x_adjust_slider) {
|
|
||||||
x_adjust_offset = value;
|
|
||||||
}
|
|
||||||
else if (slider == ui->y_adjust_slider) {
|
|
||||||
y_adjust_offset = value;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ui->x_adjust_label->setText(QString("X: %1").arg(QString::number(x_adjust_offset)));
|
|
||||||
ui->y_adjust_label->setText(QString("Y: %1").arg(QString::number(y_adjust_offset)));
|
|
||||||
|
|
||||||
updateDemoGraphicItemBG();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomLogo::onCheckboxClicked(bool click)
|
|
||||||
{
|
|
||||||
(void)click;
|
|
||||||
foreach(QGraphicsItem * item, demo_scene.items()) {
|
|
||||||
QVariant v = item->data(KEY_DEMO_BG_ITEM);
|
|
||||||
if (v.toInt() == KEY_DEMO_BG_ITEM) {
|
|
||||||
QPixmap _bg = ((QGraphicsPixmapItem*)item)->pixmap().copy();
|
|
||||||
createDemoGraphicItemBG(_bg);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CustomLogo::onClickedBtn() {
|
|
||||||
auto sender = (QPushButton*)QObject::sender();
|
|
||||||
|
|
||||||
if (sender == ui->load_bg_btn) {
|
|
||||||
loadBGFromFile();
|
|
||||||
}
|
|
||||||
else if (sender == ui->load_list_btn) {
|
|
||||||
loadListFromFile();
|
|
||||||
}
|
|
||||||
else if (sender == ui->color_btn) {
|
|
||||||
|
|
||||||
if (s_colorDialog == nullptr) {
|
|
||||||
s_colorDialog = new QColorDialog(ui->color_label->palette().color(QPalette::WindowText), this);
|
|
||||||
connect(s_colorDialog, &QColorDialog::colorSelected, this, &CustomLogo::onColorSelected);
|
|
||||||
}
|
|
||||||
s_colorDialog->open();
|
|
||||||
|
|
||||||
}
|
|
||||||
else if (sender == ui->reset_adjust_btn) {
|
|
||||||
ui->x_adjust_slider->setValue(0);
|
|
||||||
ui->y_adjust_slider->setValue(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
#ifndef CUSTOMLOGO_H
|
|
||||||
#define CUSTOMLOGO_H
|
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
#include "QFont"
|
|
||||||
#include "INameCreater.h"
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class CustomLogo;
|
|
||||||
}
|
|
||||||
|
|
||||||
class CustomLogo : public QDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit CustomLogo(QFont *customFont, QDialog *parent = nullptr);
|
|
||||||
~CustomLogo();
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::CustomLogo *ui;
|
|
||||||
QFont* customFont;
|
|
||||||
QColor fontColor;
|
|
||||||
QGraphicsScene demo_scene;
|
|
||||||
|
|
||||||
qreal x_adjust_offset, y_adjust_offset;
|
|
||||||
|
|
||||||
void loadBGFromFile();
|
|
||||||
void createDemoGraphicItemBG(const QPixmap& img);
|
|
||||||
void updateDemoGraphicItemBG();
|
|
||||||
void loadListFromFile();
|
|
||||||
void gerneraImageFromList(const QList<NameInfo_t>& nameList, Name_Type_e type);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent);
|
|
||||||
|
|
||||||
private Q_SLOTS:
|
|
||||||
void onClickedBtn();
|
|
||||||
void onColorSelected(const QColor& color);
|
|
||||||
void onSliderValueChanged(int value);
|
|
||||||
void onCheckboxClicked(bool click);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // CUSTOMLOGO_H
|
|
||||||
@ -1,241 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>CustomLogo</class>
|
|
||||||
<widget class="QWidget" name="CustomLogo">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>545</width>
|
|
||||||
<height>653</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Form</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QPushButton" name="load_bg_btn">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>340</x>
|
|
||||||
<y>70</y>
|
|
||||||
<width>141</width>
|
|
||||||
<height>51</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Load BG</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QPushButton" name="load_list_btn">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>340</x>
|
|
||||||
<y>160</y>
|
|
||||||
<width>141</width>
|
|
||||||
<height>51</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Load List</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QCheckBox" name="double_checkbox">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>370</x>
|
|
||||||
<y>240</y>
|
|
||||||
<width>91</width>
|
|
||||||
<height>51</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>20</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>雙面</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>340</x>
|
|
||||||
<y>310</y>
|
|
||||||
<width>160</width>
|
|
||||||
<height>80</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="color_btn">
|
|
||||||
<property name="text">
|
|
||||||
<string>選色</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="color_label">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>18</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>顏色</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QGraphicsView" name="demo_graphicsView">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>50</y>
|
|
||||||
<width>311</width>
|
|
||||||
<height>561</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QFrame" name="frame">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>330</x>
|
|
||||||
<y>410</y>
|
|
||||||
<width>201</width>
|
|
||||||
<height>141</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout">
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="hor_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>水平</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QSlider" name="x_adjust_slider">
|
|
||||||
<property name="minimum">
|
|
||||||
<number>-100</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>100</number>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="invertedAppearance">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QSlider" name="y_adjust_slider">
|
|
||||||
<property name="minimum">
|
|
||||||
<number>-120</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>120</number>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="vel_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>垂直</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="x_adjust_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>X</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLabel" name="y_adjust_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Y</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QPushButton" name="reset_adjust_btn">
|
|
||||||
<property name="text">
|
|
||||||
<string>Reset</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="horizontalLayoutWidget_2">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>10</y>
|
|
||||||
<width>311</width>
|
|
||||||
<height>41</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Codec:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="codec_comboBox">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Big5</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Utf8</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<resources>
|
|
||||||
<include location="NameCreater.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
@ -1,231 +0,0 @@
|
|||||||
#include "customlogo2.h"
|
|
||||||
#include "ui_customlogo2.h"
|
|
||||||
#include "def.h"
|
|
||||||
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QDateTime>
|
|
||||||
#include <QTextCodec>
|
|
||||||
#include <QTextStream>
|
|
||||||
#include <QBuffer>
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QFontDatabase>
|
|
||||||
#include <QFileDialog>
|
|
||||||
|
|
||||||
|
|
||||||
//#define BG_DEMO_PATH ":/NameCreater/resource/custom_logo/demo_2.jpg"
|
|
||||||
#define BG_DEMO_PATH ":/NameCreater/resource/custom_logo/bg_2.jpg"
|
|
||||||
#define FONT_PATH ":/NameCreater/_exp/Ubuntu-Medium.ttf"
|
|
||||||
|
|
||||||
|
|
||||||
static QPoint BG_START_POS(20, 100);
|
|
||||||
static QPoint BG_ROT_START_POS(2080, 880);
|
|
||||||
static int BG_POS_COUNT = 12;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
customlogo2::customlogo2(QFont *font, QDialog*parent)
|
|
||||||
: QDialog(parent)
|
|
||||||
, ui(new Ui::customlogo2)
|
|
||||||
, zhFont(font)
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
|
|
||||||
connect(ui->loadcsv_btn, &QPushButton::released, this,&customlogo2::OnClickedBtn);
|
|
||||||
|
|
||||||
|
|
||||||
// read ubuntu font
|
|
||||||
QFile font_file(FONT_PATH);
|
|
||||||
if (!font_file.open(QIODevice::ReadOnly)) {
|
|
||||||
QMessageBox msgBox;
|
|
||||||
msgBox.setText("Can not load font file!" + QString(FONT_PATH));
|
|
||||||
msgBox.exec();
|
|
||||||
font_file.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int id = QFontDatabase::addApplicationFontFromData(font_file.readAll());
|
|
||||||
QString font_families = QFontDatabase::applicationFontFamilies(id).at(0);
|
|
||||||
enFont = QFont(font_families);
|
|
||||||
enFont.setPixelSize(60);
|
|
||||||
|
|
||||||
// set zh font size
|
|
||||||
zhFont->setPixelSize(120);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
customlogo2::~customlogo2()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void customlogo2::OnClickedBtn(){
|
|
||||||
QPushButton *sender = (QPushButton*)QObject::sender();
|
|
||||||
|
|
||||||
if(sender == ui->loadcsv_btn){
|
|
||||||
loadListFromFile();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void customlogo2::loadListFromFile()
|
|
||||||
{
|
|
||||||
auto fileContentReady = [this](const QString& fileName, const QByteArray& fileContent) {
|
|
||||||
if (fileName.isEmpty()) {
|
|
||||||
// No file was selected
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
QList<NameInfo_t> nameList = getNameByFileContent(Name_zh, fileContent);
|
|
||||||
if (!nameList.isEmpty()) {
|
|
||||||
qDebug() << "List size: "<< QString::number(nameList.count());
|
|
||||||
gerneraImageFromList(nameList, Name_zh);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
qDebug() << "List is empty!!";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
QFileDialog::getOpenFileContent("CSV file (*.csv)", fileContentReady);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QList<NameInfo_t> customlogo2::getNameByFileContent(Name_Type_e type, const QByteArray& conetent)
|
|
||||||
{
|
|
||||||
QList<NameInfo_t> nameList;
|
|
||||||
|
|
||||||
QTextCodec* tc = QTextCodec::codecForName("Utf8");
|
|
||||||
QString codec = tc->toUnicode(conetent.data());
|
|
||||||
QTextStream stream(&codec);
|
|
||||||
|
|
||||||
int row = 0;
|
|
||||||
while (!stream.atEnd())
|
|
||||||
{
|
|
||||||
NameInfo_t info;
|
|
||||||
QString line = stream.readLine();
|
|
||||||
QString name_tc = line;
|
|
||||||
QStringList csvList = name_tc.split(',');
|
|
||||||
|
|
||||||
QString name, eng_name;
|
|
||||||
|
|
||||||
switch (type) {
|
|
||||||
case Name_zh:
|
|
||||||
{
|
|
||||||
int n = 1;
|
|
||||||
name = csvList.at(0);
|
|
||||||
|
|
||||||
while(n < csvList.count()){
|
|
||||||
if(n==2)eng_name.append(",");
|
|
||||||
eng_name.append(csvList.at(n));
|
|
||||||
n++;
|
|
||||||
}
|
|
||||||
eng_name.replace("\"","");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
qDebug() << "row :" << row << " " << name << " eng: "<<eng_name;
|
|
||||||
|
|
||||||
if (name.compare("name_1") == 0 || name.compare("name") == 0 ||
|
|
||||||
eng_name.compare("eng_name") == 0 ) {
|
|
||||||
//pass first line
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
info.name1 = name;
|
|
||||||
info.name_eng = eng_name;
|
|
||||||
|
|
||||||
nameList.append(info);
|
|
||||||
|
|
||||||
row++;
|
|
||||||
}
|
|
||||||
return nameList;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void customlogo2::gerneraImageFromList(const QList<NameInfo_t>& nameList, Name_Type_e type)
|
|
||||||
{
|
|
||||||
int export_times = 0;
|
|
||||||
QGraphicsScene scene;
|
|
||||||
scene.setBackgroundBrush(QBrush(QColor(255, 255, 255)));
|
|
||||||
QGraphicsView view(&scene);
|
|
||||||
QRectF itemRect(0, 0, 880, 280);
|
|
||||||
QColor fontColor(33,142,188);
|
|
||||||
|
|
||||||
switch (type) {
|
|
||||||
case Name_zh:
|
|
||||||
{
|
|
||||||
for (int n = 0; n < nameList.length(); n++) {
|
|
||||||
int idx = n % BG_POS_COUNT;
|
|
||||||
NameInfo_t name_info = nameList.at(n);
|
|
||||||
|
|
||||||
if (idx == 0) {
|
|
||||||
|
|
||||||
QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_HEIGHT,BG_WIDTH);
|
|
||||||
bg_item->setBrush(QBrush(QColor(255, 255, 255)));
|
|
||||||
scene.addItem(bg_item);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QGraphicsPixmapItem* name_bgItem = new QGraphicsPixmapItem(QPixmap(BG_DEMO_PATH));
|
|
||||||
bool rot = (idx == 10 || idx == 11);
|
|
||||||
name_bgItem->setRotation(rot ? 90 : 0);
|
|
||||||
if (!rot)
|
|
||||||
name_bgItem->setPos(BG_START_POS.x(), BG_START_POS.y() + (name_bgItem->boundingRect().height()+30)*idx);
|
|
||||||
else
|
|
||||||
name_bgItem->setPos(BG_ROT_START_POS.x()+ (name_bgItem->boundingRect().height()+30)*(idx-10), BG_ROT_START_POS.y());
|
|
||||||
scene.addItem(name_bgItem);
|
|
||||||
|
|
||||||
|
|
||||||
if (name_info.name1.isEmpty()) {
|
|
||||||
QMessageBox msgBox;
|
|
||||||
msgBox.setText(QString().asprintf("Name is Empty at %d", export_times + 1));
|
|
||||||
msgBox.exec();
|
|
||||||
}
|
|
||||||
|
|
||||||
QString name = name_info.name1;
|
|
||||||
QGraphicsTextItem* textItem = new QGraphicsTextItem(name, name_bgItem);
|
|
||||||
QFont _font = QFont(*zhFont);
|
|
||||||
_font.setLetterSpacing(QFont::PercentageSpacing, 110);
|
|
||||||
textItem->setFont(_font);
|
|
||||||
textItem->setDefaultTextColor(fontColor);
|
|
||||||
textItem->setPos(20+(itemRect.width() - textItem->boundingRect().width())/2,42);
|
|
||||||
|
|
||||||
|
|
||||||
QString name_en = name_info.name_eng;
|
|
||||||
QGraphicsTextItem* textItem_en = new QGraphicsTextItem(name_en, name_bgItem);
|
|
||||||
textItem_en->setFont(enFont);
|
|
||||||
textItem_en->setDefaultTextColor(fontColor);
|
|
||||||
textItem_en->setPos(20+(itemRect.width() - textItem_en->boundingRect().width())/2,170);
|
|
||||||
|
|
||||||
|
|
||||||
bool is_export_page = ((idx + 1) % BG_POS_COUNT == 0);
|
|
||||||
if (is_export_page || n == nameList.count() - 1) {
|
|
||||||
QString date_str = QDateTime::currentDateTime().toString("MMddhhmm");
|
|
||||||
QString file_name = QString("Signal_%2_%1.jpg").arg(QString::number(export_times + 1), date_str);
|
|
||||||
INameCreater().saveToImage(file_name, &scene);
|
|
||||||
export_times++;
|
|
||||||
|
|
||||||
scene.clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
QMessageBox msgBox;
|
|
||||||
msgBox.setText(QString().asprintf("Export Finshed. Count:%d", export_times));
|
|
||||||
msgBox.exec();
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,37 +0,0 @@
|
|||||||
#ifndef CUSTOMLOGO2_H
|
|
||||||
#define CUSTOMLOGO2_H
|
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
#include "INameCreater.h"
|
|
||||||
#include "QFont"
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class customlogo2;
|
|
||||||
}
|
|
||||||
|
|
||||||
class customlogo2 : public QDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit customlogo2(QFont *font , QDialog*parent = nullptr);
|
|
||||||
~customlogo2();
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::customlogo2 *ui;
|
|
||||||
|
|
||||||
QFont *zhFont,enFont;
|
|
||||||
|
|
||||||
void loadListFromFile();
|
|
||||||
void gerneraImageFromList(const QList<NameInfo_t>& nameList, Name_Type_e type);
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
|
||||||
QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent);
|
|
||||||
|
|
||||||
private Q_SLOTS:
|
|
||||||
void OnClickedBtn();
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // CUSTOMLOGO2_H
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>customlogo2</class>
|
|
||||||
<widget class="QWidget" name="customlogo2">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>338</width>
|
|
||||||
<height>182</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Form</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="loadcsv_btn">
|
|
||||||
<property name="text">
|
|
||||||
<string>Load CSV</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
@ -1,7 +1,6 @@
|
|||||||
#ifndef DEF_H
|
#ifndef DEF_H
|
||||||
#define DEF_H
|
#define DEF_H
|
||||||
|
|
||||||
#define VERSION "v2.10.3"
|
#define VERSION "v2.4.1"
|
||||||
|
|
||||||
|
|
||||||
#endif // DEF_H
|
#endif // DEF_H
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 145 KiB |
|
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 176 KiB After Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 381 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 904 KiB |
|
Before Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 176 KiB After Width: | Height: | Size: 145 KiB |
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 119 KiB |