Compare commits

..

9 Commits

Author SHA1 Message Date
shouchih_chen
db15997b79 1. Adjust Birthday creator detail: label position, eng word position, star style position. 2025-06-21 10:42:16 +08:00
shouchih_chen
fc685d47ce update to 2.10.2
detail for update:
change domain name to "bazaar1688.duckdns.org"
2025-06-01 19:49:51 +08:00
shouchih_chen
267157e9f7 1. not use eventloop in customlogo widget 2024-11-02 06:44:40 +08:00
shouchih_chen
6fc1220bff 1. add codec selector. 2024-11-01 08:36:13 +08:00
a4f9faac10 customlogo.cpp change to utf8 codedc. 2024-11-01 08:05:33 +08:00
shouchih_chen
07b9905254 1. move webassembly-master to master. 2024-10-29 15:21:04 +08:00
a4e9ba9274 modify to x64 env 2022-12-28 21:39:06 +08:00
92e491d0d1 Merge branch 'master' of https://gitlab.com/portfolio91/namecreater 2022-12-28 21:34:10 +08:00
shouchih_chen
62fc71cf6a change mac deploy configure. 2022-02-20 07:32:59 +08:00
48 changed files with 5012 additions and 2838 deletions

21
.gitignore vendored
View File

@ -1,10 +1,11 @@
*Debug/ *Debug/
*Release/ *Release/
/.vs/ /.vs/
/*.opendb /*.opendb
/*.db /*.db
/_bin /_bin
/web_build /web_build
/buildwed /buildwed
/NameCreater/*.aps /NameCreater/*.aps
/buildweb/ /buildweb/
/NameCreater/build/*

View File

@ -1,308 +1,308 @@
#include "BirthdayCreater.h" #include "BirthdayCreater.h"
#include <QTextCodec> #include <QTextCodec>
#include <QTextStream> #include <QTextStream>
#include <QDebug> #include <QDebug>
#include <QMessageBox> #include <QMessageBox>
#include <QDateTime> #include <QDateTime>
#define LABEL_HIGHT_LIMIT 350.0 #define LABEL_HIGHT_LIMIT 350.0
#define LABEL_POS_X_OFFSET 323.0 #define LABEL_POS_X_OFFSET 323.0
#define NAME_TWO_WORD_OFFSET 170.0 #define NAME_TWO_WORD_OFFSET 170.0
#define NAME_THREE_WORD_OFFSET 145.0 #define NAME_THREE_WORD_OFFSET 145.0
#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, 115); static QPoint LABEL_POS_START = QPoint(163, 70);
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);
BirthdayCreater::BirthdayCreater() :INameCreater() BirthdayCreater::BirthdayCreater() :INameCreater()
{ {
label_bg_map["b"] = ":/NameCreater/resource/b.jpg"; label_bg_map["b"] = ":/NameCreater/resource/b.jpg";
label_bg_map["g"] = ":/NameCreater/resource/g.jpg"; label_bg_map["g"] = ":/NameCreater/resource/g.jpg";
label_bg_map["m"] = ":/NameCreater/resource/m.jpg"; label_bg_map["m"] = ":/NameCreater/resource/m.jpg";
label_bg_map["p"] = ":/NameCreater/resource/p.jpg"; label_bg_map["p"] = ":/NameCreater/resource/p.jpg";
label_bg_map["r"] = ":/NameCreater/resource/r.jpg"; label_bg_map["r"] = ":/NameCreater/resource/r.jpg";
label_bg_map["w"] = ":/NameCreater/resource/w.jpg"; label_bg_map["w"] = ":/NameCreater/resource/w.jpg";
label_bg_map["y"] = ":/NameCreater/resource/y.jpg"; label_bg_map["y"] = ":/NameCreater/resource/y.jpg";
label_bg_map["co"] = ":/NameCreater/resource/co.jpg"; label_bg_map["co"] = ":/NameCreater/resource/co.jpg";
label_bg_map["ol"] = ":/NameCreater/resource/ol.jpg"; label_bg_map["ol"] = ":/NameCreater/resource/ol.jpg";
label_bg_map["sn"] = ":/NameCreater/resource/sn.jpg"; label_bg_map["sn"] = ":/NameCreater/resource/sn.jpg";
label_bg_map["st"] = ":/NameCreater/resource/st.jpg"; label_bg_map["st"] = ":/NameCreater/resource/st.jpg";
label_bg_map["a"] = ":/NameCreater/resource/a.jpg"; label_bg_map["a"] = ":/NameCreater/resource/a.jpg";
label_bg_map["pg"] = ":/NameCreater/resource/pg.jpg"; label_bg_map["pg"] = ":/NameCreater/resource/pg.jpg";
} }
BirthdayCreater::~BirthdayCreater() BirthdayCreater::~BirthdayCreater()
{ {
} }
QList<NameInfo_t> BirthdayCreater::getNameByFileContent(Name_Type_e type, const QByteArray& conetent) QList<NameInfo_t> BirthdayCreater::getNameByFileContent(Name_Type_e type, const QByteArray& conetent)
{ {
QList<NameInfo_t> nameList; QList<NameInfo_t> nameList;
QTextCodec* tc = QTextCodec::codecForName("Big5"); QTextCodec* tc = QTextCodec::codecForName("Big5");
QString codec = tc->toUnicode(conetent.data()); QString codec = tc->toUnicode(conetent.data());
QTextStream stream(&codec); QTextStream stream(&codec);
int row = 0; int row = 0;
while (!stream.atEnd()) while (!stream.atEnd())
{ {
NameInfo_t info; NameInfo_t info;
QString line = stream.readLine(); QString line = stream.readLine();
QString name_tc = line; QString name_tc = line;
QStringList csvList = name_tc.split(','); QStringList csvList = name_tc.split(',');
QString name, eng_name, bg_type; QString name, eng_name, bg_type;
switch (type) { switch (type) {
case Name_zh: case Name_zh:
name = csvList.at(0); name = csvList.at(0);
bg_type = csvList.at(1); bg_type = csvList.at(1);
break; break;
case Name_zh_eng: case Name_zh_eng:
name = csvList.at(0); name = csvList.at(0);
eng_name = csvList.at(1); eng_name = csvList.at(1);
bg_type = csvList.at(2); bg_type = csvList.at(2);
break; break;
case Name_eng: case Name_eng:
eng_name = csvList.at(0); eng_name = csvList.at(0);
bg_type = csvList.at(1); bg_type = csvList.at(1);
default: default:
break; break;
} }
qDebug() << "row :" << row << " " << name <<", eng: "<< eng_name << ", bg_type: " << bg_type; qDebug() << "row :" << row << " " << name <<", eng: "<< eng_name << ", bg_type: " << bg_type;
if (name.compare("name") == 0 || eng_name.compare("eng_name")==0) { if (name.compare("name") == 0 || eng_name.compare("eng_name")==0) {
//pass first line //pass first line
continue; continue;
} }
info.name1 = name; info.name1 = name;
info.name_eng = eng_name; info.name_eng = eng_name;
info.name2 = bg_type; info.name2 = bg_type;
nameList.append(info); nameList.append(info);
row++; row++;
} }
return nameList; return nameList;
} }
void BirthdayCreater::generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color) void BirthdayCreater::generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color)
{ {
int export_times = 0; int export_times = 0;
QList<NameInfo_t> nameList = getNameByFileContent(type, filecontent); QList<NameInfo_t> nameList = getNameByFileContent(type, filecontent);
if (nameList.isEmpty()) { if (nameList.isEmpty()) {
QMessageBox msgBox; QMessageBox msgBox;
msgBox.setText(QString("Name is empty ! ").append(filename)); msgBox.setText(QString("Name is empty ! ").append(filename));
msgBox.exec(); msgBox.exec();
} }
QGraphicsScene scene; QGraphicsScene scene;
scene.setBackgroundBrush(QBrush(QColor(255, 255, 255))); scene.setBackgroundBrush(QBrush(QColor(255, 255, 255)));
QGraphicsView view(&scene); QGraphicsView view(&scene);
switch (type) switch (type)
{ {
case Name_zh: case Name_zh:
for (int idx = 0; idx < nameList.length(); idx++) { for (int idx = 0; idx < nameList.length(); idx++) {
if ((idx % MAX_LABEL_IN_PAPER) == 0) { if ((idx % MAX_LABEL_IN_PAPER) == 0) {
QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT); QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT);
bg_item->setBrush(QBrush(QColor(255, 255, 255))); bg_item->setBrush(QBrush(QColor(255, 255, 255)));
//QGraphicsPixmapItem* bg_item = QGraphicsPixmapItem(QPixmap(BG_SMAPLE_PATH)); //QGraphicsPixmapItem* bg_item = QGraphicsPixmapItem(QPixmap(BG_SMAPLE_PATH));
scene.addItem(bg_item); scene.addItem(bg_item);
} }
NameInfo_t name_info = nameList.at(idx); NameInfo_t name_info = nameList.at(idx);
int col_index = idx % MAX_LABEL_IN_PAPER; int col_index = idx % MAX_LABEL_IN_PAPER;
QString label_rel_path = label_bg_map[name_info.name2]; QString label_rel_path = label_bg_map[name_info.name2];
QGraphicsPixmapItem* label_item = new QGraphicsPixmapItem(QPixmap(label_rel_path)); QGraphicsPixmapItem* label_item = new QGraphicsPixmapItem(QPixmap(label_rel_path));
label_item->setPos(int(LABEL_POS_START.x() + LABEL_POS_X_OFFSET * col_index), int(LABEL_POS_START.y())); label_item->setPos(int(LABEL_POS_START.x() + LABEL_POS_X_OFFSET * col_index), int(LABEL_POS_START.y()));
label_item->setOpacity(1); label_item->setOpacity(1);
scene.addItem(label_item); scene.addItem(label_item);
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;
} }
for (int i = 0; i < 2; i++) { for (int i = 0; i < 2; i++) {
int name_word_len = name_info.name1.length(); int name_word_len = name_info.name1.length();
qreal two_word_y = (name_word_len == 2) ? NAME_TWO_WORD_OFFSET / 2 : 0; qreal two_word_y = (name_word_len == 2) ? NAME_TWO_WORD_OFFSET / 2 : 0;
qreal offset_y = (name_word_len == 2) ? NAME_TWO_WORD_OFFSET : NAME_THREE_WORD_OFFSET; qreal offset_y = (name_word_len == 2) ? NAME_TWO_WORD_OFFSET : NAME_THREE_WORD_OFFSET;
for (int w = 0; w < name_word_len; w++) { for (int w = 0; w < name_word_len; w++) {
QGraphicsTextItem* word_item = new QGraphicsTextItem(name_info.name1.at(w)); QGraphicsTextItem* word_item = new QGraphicsTextItem(name_info.name1.at(w));
word_item->setFont(font); word_item->setFont(font);
word_item->setDefaultTextColor(font_color); word_item->setDefaultTextColor(font_color);
if (i == 0) { if (i == 0) {
word_item->setPos(label_item->x() + NAME_OFFSET_START.x(), label_item->y() + NAME_OFFSET_START.y() + two_word_y + chrismas_y_offset + offset_y * w); word_item->setPos(label_item->x() + NAME_OFFSET_START.x(), label_item->y() + NAME_OFFSET_START.y() + two_word_y + chrismas_y_offset + offset_y * w);
} }
else { else {
word_item->setTransform(QTransform().fromScale(-1, -1)); word_item->setTransform(QTransform().fromScale(-1, -1));
word_item->setPos(label_item->x() + NAME_OFFSET_REVERSE_START.x(), label_item->y() + NAME_OFFSET_REVERSE_START.y() - two_word_y - chrismas_y_offset - offset_y * w); word_item->setPos(label_item->x() + NAME_OFFSET_REVERSE_START.x(), label_item->y() + NAME_OFFSET_REVERSE_START.y() - two_word_y - chrismas_y_offset - offset_y * w);
} }
scene.addItem(word_item); scene.addItem(word_item);
} }
} }
if ((idx % MAX_LABEL_IN_PAPER) == (MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) { if ((idx % MAX_LABEL_IN_PAPER) == (MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) {
QString date_str = QDateTime::currentDateTime().toString("MMddhhmm"); QString date_str = QDateTime::currentDateTime().toString("MMddhhmm");
QString file_name = QString("Birthday_%2_%1.jpg").arg(QString::number(export_times + 1), date_str); QString file_name = QString("Birthday_%2_%1.jpg").arg(QString::number(export_times + 1), date_str);
saveToImage(file_name, &scene); saveToImage(file_name, &scene);
export_times++; export_times++;
scene.clear(); scene.clear();
} }
} }
break; break;
case Name_eng: case Name_eng:
for (int idx = 0; idx < nameList.length(); idx++) { for (int idx = 0; idx < nameList.length(); idx++) {
if ((idx % MAX_LABEL_IN_PAPER) == 0) { if ((idx % MAX_LABEL_IN_PAPER) == 0) {
QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT); QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT);
bg_item->setBrush(QBrush(QColor(255, 255, 255))); bg_item->setBrush(QBrush(QColor(255, 255, 255)));
//QGraphicsPixmapItem* bg_item = QGraphicsPixmapItem(QPixmap(BG_SMAPLE_PATH)); //QGraphicsPixmapItem* bg_item = QGraphicsPixmapItem(QPixmap(BG_SMAPLE_PATH));
scene.addItem(bg_item); scene.addItem(bg_item);
} }
NameInfo_t name_info = nameList.at(idx); NameInfo_t name_info = nameList.at(idx);
int col_index = idx % MAX_LABEL_IN_PAPER; int col_index = idx % MAX_LABEL_IN_PAPER;
QString label_rel_path = label_bg_map[name_info.name2]; QString label_rel_path = label_bg_map[name_info.name2];
QGraphicsPixmapItem* label_item = new QGraphicsPixmapItem(QPixmap(label_rel_path)); QGraphicsPixmapItem* label_item = new QGraphicsPixmapItem(QPixmap(label_rel_path));
label_item->setPos(int(LABEL_POS_START.x() + LABEL_POS_X_OFFSET * col_index), int(LABEL_POS_START.y())); label_item->setPos(int(LABEL_POS_START.x() + LABEL_POS_X_OFFSET * col_index), int(LABEL_POS_START.y()));
label_item->setOpacity(1); label_item->setOpacity(1);
scene.addItem(label_item); scene.addItem(label_item);
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;
} }
QFont _new_font = QFont(EnglisthFont()); QFont _new_font = QFont(EnglisthFont());
_new_font.setWeight(QFont::ExtraLight); _new_font.setWeight(QFont::ExtraLight);
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);
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) ? 290.0 : 170.0; qreal x_offset = (i == 0) ? 280.0 : 170.0;
qreal y_offset = (i == 0) ? 780.0 : 1580.0; qreal y_offset = (i == 0) ? 890.0 : 1550.0;
int sp_y_offset = chrismas_y_offset;//(i == 0)? 1.0*chrismas_y_offset:-1.0*chrismas_y_offset-30.0; int sp_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); QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng,label_item);
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(label_item->x() + x_offset - rect.height()/2.0, label_item->y() + y_offset + sp_y_offset + (rect.width()/2*dir)); eng_word_item->setPos(x_offset - rect.height()/2.0, y_offset + sp_y_offset + (rect.width()/2*dir));
scene.addItem(eng_word_item); //scene.addItem(eng_word_item);
} }
if ((idx % MAX_LABEL_IN_PAPER) == (MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) { if ((idx % MAX_LABEL_IN_PAPER) == (MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) {
QString date_str = QDateTime::currentDateTime().toString("MMddhhmm"); QString date_str = QDateTime::currentDateTime().toString("MMddhhmm");
QString file_name = QString("Birthday_%2_%1.jpg").arg(QString::number(export_times + 1), date_str); QString file_name = QString("Birthday_%2_%1.jpg").arg(QString::number(export_times + 1), date_str);
saveToImage(file_name, &scene); saveToImage(file_name, &scene);
export_times++; export_times++;
scene.clear(); scene.clear();
} }
} }
break; break;
case Name_zh_eng: case Name_zh_eng:
for (int idx = 0; idx < nameList.length(); idx++) { for (int idx = 0; idx < nameList.length(); idx++) {
if ((idx % MAX_LABEL_IN_PAPER) == 0) { if ((idx % MAX_LABEL_IN_PAPER) == 0) {
QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT); QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT);
bg_item->setBrush(QBrush(QColor(255, 255, 255))); bg_item->setBrush(QBrush(QColor(255, 255, 255)));
//QGraphicsPixmapItem* bg_item = QGraphicsPixmapItem(QPixmap(BG_SMAPLE_PATH)); //QGraphicsPixmapItem* bg_item = QGraphicsPixmapItem(QPixmap(BG_SMAPLE_PATH));
scene.addItem(bg_item); scene.addItem(bg_item);
} }
NameInfo_t name_info = nameList.at(idx); NameInfo_t name_info = nameList.at(idx);
int col_index = idx % MAX_LABEL_IN_PAPER; int col_index = idx % MAX_LABEL_IN_PAPER;
QString label_rel_path = label_bg_map[name_info.name2]; QString label_rel_path = label_bg_map[name_info.name2];
QGraphicsPixmapItem* label_item = new QGraphicsPixmapItem(QPixmap(label_rel_path)); QGraphicsPixmapItem* label_item = new QGraphicsPixmapItem(QPixmap(label_rel_path));
label_item->setPos(int(LABEL_POS_START.x() + LABEL_POS_X_OFFSET * col_index), int(LABEL_POS_START.y())); label_item->setPos(int(LABEL_POS_START.x() + LABEL_POS_X_OFFSET * col_index), int(LABEL_POS_START.y()));
label_item->setOpacity(1); label_item->setOpacity(1);
scene.addItem(label_item); scene.addItem(label_item);
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;
} }
// add ZH word // add ZH word
int name_word_len = name_info.name1.length(); int name_word_len = name_info.name1.length();
qreal two_word_y = (name_word_len == 2) ? NAME_TWO_WORD_OFFSET / 2 : 0; qreal two_word_y = (name_word_len == 2) ? NAME_TWO_WORD_OFFSET / 2 : 0;
qreal offset_y = (name_word_len == 2) ? NAME_TWO_WORD_OFFSET : NAME_THREE_WORD_OFFSET; qreal offset_y = (name_word_len == 2) ? NAME_TWO_WORD_OFFSET : NAME_THREE_WORD_OFFSET;
for (int w = 0; w < name_word_len; w++) { for (int w = 0; w < name_word_len; w++) {
QGraphicsTextItem* word_item = new QGraphicsTextItem(name_info.name1.at(w)); QGraphicsTextItem* word_item = new QGraphicsTextItem(name_info.name1.at(w));
word_item->setFont(font); word_item->setFont(font);
word_item->setDefaultTextColor(font_color); word_item->setDefaultTextColor(font_color);
word_item->setPos(label_item->x() + NAME_OFFSET_START.x(), label_item->y() + NAME_OFFSET_START.y() + two_word_y + chrismas_y_offset + offset_y * w); word_item->setPos(label_item->x() + NAME_OFFSET_START.x(), label_item->y() + NAME_OFFSET_START.y() + two_word_y + chrismas_y_offset + offset_y * w);
scene.addItem(word_item); scene.addItem(word_item);
} }
//TODO: add English world //TODO: add English world
QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng); QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng);
QFont _new_font = QFont(EnglisthFont()); QFont _new_font = QFont(EnglisthFont());
_new_font.setWeight(QFont::ExtraLight); _new_font.setWeight(QFont::ExtraLight);
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);
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(-90); eng_word_item->setRotation(-90);
eng_word_item->setPos(label_item->x() + 170.0 - rect.height()/2.0, label_item->y() + 1580 - chrismas_y_offset + rect.width()/2); eng_word_item->setPos(label_item->x() + 170.0 - rect.height()/2.0, label_item->y() + 1580 - chrismas_y_offset + rect.width()/2);
scene.addItem(eng_word_item); scene.addItem(eng_word_item);
if ((idx % MAX_LABEL_IN_PAPER) == (MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) { if ((idx % MAX_LABEL_IN_PAPER) == (MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) {
QString date_str = QDateTime::currentDateTime().toString("MMddhhmm"); QString date_str = QDateTime::currentDateTime().toString("MMddhhmm");
QString file_name = QString("Birthday_%2_%1.jpg").arg(QString::number(export_times + 1), date_str); QString file_name = QString("Birthday_%2_%1.jpg").arg(QString::number(export_times + 1), date_str);
saveToImage(file_name, &scene); saveToImage(file_name, &scene);
export_times++; export_times++;
scene.clear(); scene.clear();
} }
} }
break; break;
default: default:
break; break;
} }
QMessageBox msgBox; QMessageBox msgBox;
msgBox.setText(QString().asprintf("Export Finshed. Count:%d", export_times)); msgBox.setText(QString().asprintf("Export Finshed. Count:%d", export_times));
msgBox.exec(); msgBox.exec();
} }

View File

@ -1,19 +1,19 @@
#pragma once #pragma once
#include "INameCreater.h" #include "INameCreater.h"
#include <QMap> #include <QMap>
class BirthdayCreater : public INameCreater class BirthdayCreater : public INameCreater
{ {
public: public:
BirthdayCreater(); BirthdayCreater();
~BirthdayCreater(); ~BirthdayCreater();
protected: protected:
QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent); QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent);
public: public:
virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color); virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color);
private: private:
QMap<QString, QString> label_bg_map; QMap<QString, QString> label_bg_map;
}; };

View File

@ -1,411 +1,369 @@
#include "FiveToSingle.h" #include "FiveToSingle.h"
#include <QMessageBox> #include <QMessageBox>
#include <QDateTime> #include <QDateTime>
#include <QTextCodec> #include <QTextCodec>
#include <QTextStream> #include <QTextStream>
#include <QDebug> #include <QDebug>
#define BG_PATH_FORMAT ":/NameCreater/resource/background_%1.jpg" #define BG_PATH_FORMAT ":/NameCreater/resource/background_%1.jpg"
static QPointF BG_POS[] = { static QPointF BG_POS[] = {
QPointF(159, 61), QPointF(482, 61), QPointF(802, 61), QPointF(159, 61), QPointF(482, 61), QPointF(802, 61),
QPointF(1122, 61), QPointF(1449, 61), QPointF(1772, 61), QPointF(1122, 61), QPointF(1449, 61), QPointF(1772, 61),
QPointF(2095, 61), QPointF(2414, 61), QPointF(2738, 61), QPointF(2095, 61), QPointF(2414, 61), QPointF(2738, 61),
QPointF(3060, 61), QPointF(900, 2094), QPointF(900, 2420), QPointF(3060, 61), QPointF(900, 2094), QPointF(900, 2420),
}; };
static int BG_POS_COUNT = sizeof(BG_POS) / sizeof(BG_POS[0]); static int BG_POS_COUNT = sizeof(BG_POS) / sizeof(BG_POS[0]);
static QPointF NAME_POS[] = { static QPointF NAME_POS[] = {
QPointF(240, 430), QPointF(372, 1402), QPointF(240, 430), QPointF(372, 1402),
QPointF(564, 430), QPointF(694, 1402), QPointF(564, 430), QPointF(694, 1402),
QPointF(883, 430), QPointF(1014, 1402), QPointF(883, 430), QPointF(1014, 1402),
QPointF(1205, 430), QPointF(1337, 1402), QPointF(1205, 430), QPointF(1337, 1402),
QPointF(1532, 430), QPointF(1663, 1402), QPointF(1532, 430), QPointF(1663, 1402),
QPointF(1854, 430), QPointF(1987, 1402), QPointF(1854, 430), QPointF(1987, 1402),
QPointF(2176, 430), QPointF(2309, 1402), QPointF(2176, 430), QPointF(2309, 1402),
QPointF(2498, 430), QPointF(2629, 1402), QPointF(2498, 430), QPointF(2629, 1402),
QPointF(2821, 430), QPointF(2952, 1402), QPointF(2821, 430), QPointF(2952, 1402),
QPointF(3145, 430), QPointF(3276, 1402), QPointF(3145, 430), QPointF(3276, 1402),
QPointF(1268, 2012), QPointF(2240, 1880), QPointF(1268, 2012), QPointF(2240, 1880),
QPointF(1268, 2334), QPointF(2240, 2202), QPointF(1268, 2334), QPointF(2240, 2202),
}; };
static QPointF NAME_POS_NUMBER[] = { static QPointF NAME_POS_NUMBER[] = {
QPointF(240, 370), QPointF(372, 1442), QPointF(240, 370), QPointF(372, 1442),
QPointF(564, 370), QPointF(694, 1442), QPointF(564, 370), QPointF(694, 1442),
QPointF(883, 370), QPointF(1014, 1442), QPointF(883, 370), QPointF(1014, 1442),
QPointF(1205, 370), QPointF(1337, 1442), QPointF(1205, 370), QPointF(1337, 1442),
QPointF(1532, 370), QPointF(1663, 1442), QPointF(1532, 370), QPointF(1663, 1442),
QPointF(1854, 370), QPointF(1987, 1442), QPointF(1854, 370), QPointF(1987, 1442),
QPointF(2176, 370), QPointF(2309, 1442), QPointF(2176, 370), QPointF(2309, 1442),
QPointF(2498, 370), QPointF(2629, 1442), QPointF(2498, 370), QPointF(2629, 1442),
QPointF(2821, 370), QPointF(2952, 1442), QPointF(2821, 370), QPointF(2952, 1442),
QPointF(3145, 370), QPointF(3276, 1442), QPointF(3145, 370), QPointF(3276, 1442),
QPointF(1228, 2012), QPointF(2280, 1880), QPointF(1228, 2012), QPointF(2280, 1880),
QPointF(1228, 2334), QPointF(2280, 2202), QPointF(1228, 2334), QPointF(2280, 2202),
}; };
//static int NAME_POS_COUNT = sizeof(NAME_POS) / sizeof(NAME_POS[0]); static QPointF NEW_POS = QPoint(81, 320);
FiveToSingle::FiveToSingle() :INameCreater() //static int NAME_POS_COUNT = sizeof(NAME_POS) / sizeof(NAME_POS[0]);
{
FiveToSingle::FiveToSingle() :INameCreater()
{
}
FiveToSingle::~FiveToSingle() }
{
} FiveToSingle::~FiveToSingle()
{
QList<NameInfo_t> FiveToSingle::getNameByFileContent(Name_Type_e type, const QByteArray& conetent) }
{
QList<NameInfo_t> nameList; QList<NameInfo_t> FiveToSingle::getNameByFileContent(Name_Type_e type, const QByteArray& conetent)
{
QTextCodec* tc = QTextCodec::codecForName("Big5"); QList<NameInfo_t> nameList;
QString codec = tc->toUnicode(conetent.data());
QTextStream stream(&codec); QTextCodec* tc = QTextCodec::codecForName("Big5");
QString codec = tc->toUnicode(conetent.data());
int row = 0; QTextStream stream(&codec);
while (!stream.atEnd())
{ int row = 0;
NameInfo_t info; while (!stream.atEnd())
QString line = stream.readLine(); {
QString name_tc = line; NameInfo_t info;
QStringList csvList = name_tc.split(','); QString line = stream.readLine();
QString name_tc = line;
QString name, eng_name, bg_type; QStringList csvList = name_tc.split(',');
switch (type) { QString name, eng_name, bg_type;
case Name_zh:
name = csvList.at(0); switch (type) {
bg_type = csvList.at(1); case Name_zh:
name = csvList.at(0);
break; bg_type = csvList.at(1);
case Name_zh_eng:
name = csvList.at(0); break;
eng_name = csvList.at(1); case Name_zh_eng:
bg_type = csvList.at(2); name = csvList.at(0);
eng_name = csvList.at(1);
break; bg_type = csvList.at(2);
case Name_eng:
eng_name = csvList.at(0); break;
bg_type = csvList.at(1); case Name_eng:
default: eng_name = csvList.at(0);
break; bg_type = csvList.at(1);
default:
} break;
qDebug() << "row :" << row << " " << name << ", eng: " << eng_name << ", bg_type: " << bg_type; }
if (name.compare("name_1") == 0 || eng_name.compare("eng_name") == 0) { qDebug() << "row :" << row << " " << name << ", eng: " << eng_name << ", bg_type: " << bg_type;
//pass first line
continue; if (name.compare("name_1") == 0 || eng_name.compare("eng_name") == 0) {
} //pass first line
continue;
info.name1 = name; }
info.name_eng = eng_name;
info.name2 = QString(BG_PATH_FORMAT).arg(bg_type); info.name1 = name;
info.name_eng = eng_name;
nameList.append(info); info.name2 = QString(BG_PATH_FORMAT).arg(bg_type);
row++; nameList.append(info);
}
return nameList; row++;
} }
return nameList;
void FiveToSingle::generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color) }
{
int export_times = 0; void FiveToSingle::generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color)
{
QList<NameInfo_t> nameList = getNameByFileContent(type, filecontent); int export_times = 0;
if (nameList.isEmpty()) {
QMessageBox msgBox; QList<NameInfo_t> nameList = getNameByFileContent(type, filecontent);
msgBox.setText(QString("Name is empty ! ").append(filename)); if (nameList.isEmpty()) {
msgBox.exec(); QMessageBox msgBox;
} msgBox.setText(QString("Name is empty ! ").append(filename));
msgBox.exec();
QGraphicsScene scene; }
scene.setBackgroundBrush(QBrush(QColor(255, 255, 255)));
QGraphicsView view(&scene); QGraphicsScene scene;
scene.setBackgroundBrush(QBrush(QColor(255, 255, 255)));
QGraphicsView view(&scene);
/*QImage image(BG_SAMPLE_PATH);
QGraphicsPixmapItem* bgItem = new QGraphicsPixmapItem(QPixmap::fromImage(image));
scene.addItem(bgItem);*/ /*QImage image(BG_SAMPLE_PATH);
QGraphicsPixmapItem* bgItem = new QGraphicsPixmapItem(QPixmap::fromImage(image));
scene.addItem(bgItem);*/
switch (type) {
case Name_zh:
{ switch (type) {
for (int n = 0; n < nameList.length(); n++) { case Name_zh:
int idx = n % BG_POS_COUNT; {
NameInfo_t name_info = nameList.at(n); for (int n = 0; n < nameList.length(); n++) {
QImage name_image(name_info.name2); int idx = n % BG_POS_COUNT;
if (idx == 0) { NameInfo_t name_info = nameList.at(n);
QImage name_image(name_info.name2);
QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT); if (idx == 0) {
bg_item->setBrush(QBrush(QColor(255, 255, 255)));
scene.addItem(bg_item); QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT);
} bg_item->setBrush(QBrush(QColor(255, 255, 255)));
scene.addItem(bg_item);
}
QGraphicsPixmapItem* name_bgItem = new QGraphicsPixmapItem(QPixmap::fromImage(name_image));
bool rot = (idx == 10 || idx == 11);
name_bgItem->setRotation(rot ? -90 : 0); QGraphicsPixmapItem* name_bgItem = new QGraphicsPixmapItem(QPixmap::fromImage(name_image));
name_bgItem->setPos(BG_POS[idx]); bool rot = (idx == 10 || idx == 11);
scene.addItem(name_bgItem); name_bgItem->setRotation(rot ? -90 : 0);
name_bgItem->setPos(BG_POS[idx]);
scene.addItem(name_bgItem);
if (name_info.name1.isEmpty()) {
QMessageBox msgBox;
msgBox.setText(QString().asprintf("Name is Empty at %d", export_times + 1)); if (name_info.name1.isEmpty()) {
msgBox.exec(); QMessageBox msgBox;
} msgBox.setText(QString().asprintf("Name is Empty at %d", export_times + 1));
QString name = name_info.name1; msgBox.exec();
int name_len = name.length(); }
for (int j = 0; j < 2; j++) { QString name = name_info.name1;
int pos_idx = idx * 2 + j; int name_len = name.length();
qreal xscale, yscale; for (int j = 0; j < 2; j++) {
int pos_idx = idx * 2 + j;
xscale = yscale = (j == 1) ? -1 : 1; qreal xscale, yscale;
QPointF pos = name_info.is_number_bg ? NAME_POS_NUMBER[pos_idx] : NAME_POS[pos_idx];
qreal y_offset[2] = { 0 }; xscale = yscale = (j == 1) ? -1 : 1;
if (name_len == 2) { QPointF pos = name_info.is_number_bg ? NAME_POS_NUMBER[pos_idx] : NAME_POS_NUMBER[pos_idx];
if (!rot) { qreal y_offset[2] = { 0 };
pos.setY(pos.y() + 82.0 * xscale); if (name_len == 2) {
} if (!rot) {
else { pos.setY(pos.y() + 82.0 * xscale);
pos.setX(pos.x() + 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)); }
textItem1->setFont(font);
textItem1->setDefaultTextColor(font_color); QGraphicsTextItem* textItem1 = new QGraphicsTextItem(name.mid(0, 1));
if (!rot) { textItem1->setFont(font);
textItem1->setPos(pos); textItem1->setDefaultTextColor(font_color);
textItem1->setTransform(QTransform::fromScale(xscale, yscale)); if (!rot) {
} textItem1->setPos(pos);
else { textItem1->setTransform(QTransform::fromScale(xscale, yscale));
textItem1->setPos(pos); }
textItem1->setRotation(-90); else {
textItem1->setTransform(QTransform::fromScale(xscale, yscale)); textItem1->setPos(pos);
} textItem1->setRotation(-90);
textItem1->setTransform(QTransform::fromScale(xscale, yscale));
}
scene.addItem(textItem1);
QGraphicsTextItem* textItem2 = new QGraphicsTextItem(name.mid(1, 1)); scene.addItem(textItem1);
textItem2->setFont(font);
textItem2->setDefaultTextColor(font_color); QGraphicsTextItem* textItem2 = new QGraphicsTextItem(name.mid(1, 1));
if (!rot) { textItem2->setFont(font);
textItem2->setDefaultTextColor(font_color);
textItem2->setPos(pos.x(), pos.y() + (145 + y_offset[0]) * xscale); if (!rot) {
textItem2->setTransform(QTransform::fromScale(xscale, yscale));
} textItem2->setPos(pos.x(), pos.y() + (145 + y_offset[0]) * xscale);
else { textItem2->setTransform(QTransform::fromScale(xscale, yscale));
textItem2->setPos(pos.x() + (145 + y_offset[0]) * xscale, pos.y()); }
textItem2->setRotation(-90); else {
textItem2->setTransform(QTransform::fromScale(xscale, yscale)); 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) { scene.addItem(textItem2);
QGraphicsTextItem* textItem3 = new QGraphicsTextItem(name.mid(2, 1));
textItem3->setFont(font); if (name_len > 2) {
textItem3->setDefaultTextColor(font_color); QGraphicsTextItem* textItem3 = new QGraphicsTextItem(name.mid(2, 1));
if (!rot) { textItem3->setFont(font);
textItem3->setPos(pos.x(), pos.y() + 290 * xscale); textItem3->setDefaultTextColor(font_color);
textItem3->setTransform(QTransform::fromScale(xscale, yscale)); if (!rot) {
} textItem3->setPos(pos.x(), pos.y() + 290 * xscale);
else { textItem3->setTransform(QTransform::fromScale(xscale, yscale));
textItem3->setPos(pos.x() + 290 * xscale, pos.y()); }
textItem3->setRotation(-90); else {
textItem3->setTransform(QTransform::fromScale(xscale, yscale)); textItem3->setPos(pos.x() + 290 * xscale, pos.y());
} textItem3->setRotation(-90);
textItem3->setTransform(QTransform::fromScale(xscale, yscale));
scene.addItem(textItem3); }
}
scene.addItem(textItem3);
}
}
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"); bool is_export_page = ((idx + 1) % BG_POS_COUNT == 0);
QString file_name = QString("Signal_%2_%1.jpg").arg(QString::number(export_times + 1), date_str); if (is_export_page || n == nameList.count() - 1) {
saveToImage(file_name, &scene); QString date_str = QDateTime::currentDateTime().toString("MMddhhmm");
export_times++; QString file_name = QString("Signal_%2_%1.jpg").arg(QString::number(export_times + 1), date_str);
saveToImage(file_name, &scene);
scene.clear(); export_times++;
}
} scene.clear();
} }
break; }
case Name_zh_eng: }
{ break;
QFont _new_font = QFont(this->EnglisthFont()); case Name_zh_eng:
_new_font.setWeight(QFont::ExtraLight); {
QFont _new_font = QFont(this->EnglisthFont());
for (int n = 0; n < nameList.length(); n++) { _new_font.setWeight(QFont::ExtraLight);
int idx = n % BG_POS_COUNT;
NameInfo_t name_info = nameList.at(n); for (int n = 0; n < nameList.length(); n++) {
QImage name_image(name_info.name2); int idx = n % BG_POS_COUNT;
if (idx == 0) { NameInfo_t name_info = nameList.at(n);
QImage name_image(name_info.name2);
QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT); if (idx == 0) {
bg_item->setBrush(QBrush(QColor(255, 255, 255)));
scene.addItem(bg_item); QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT);
} bg_item->setBrush(QBrush(QColor(255, 255, 255)));
scene.addItem(bg_item);
}
QGraphicsPixmapItem* name_bgItem = new QGraphicsPixmapItem(QPixmap::fromImage(name_image));
bool rot = (idx == 10 || idx == 11);
name_bgItem->setRotation(rot ? -90 : 0); QGraphicsPixmapItem* name_bgItem = new QGraphicsPixmapItem(QPixmap::fromImage(name_image));
name_bgItem->setPos(BG_POS[idx]); bool rot = (idx == 10 || idx == 11);
scene.addItem(name_bgItem); name_bgItem->setRotation(rot ? -90 : 0);
name_bgItem->setPos(BG_POS[idx]);
scene.addItem(name_bgItem);
if (name_info.name1.isEmpty()) {
QMessageBox msgBox;
msgBox.setText(QString().asprintf("Name is Empty at %d", export_times + 1)); if (name_info.name1.isEmpty()) {
msgBox.exec(); QMessageBox msgBox;
} msgBox.setText(QString().asprintf("Name is Empty at %d", export_times + 1));
QString name = name_info.name1; msgBox.exec();
int name_len = name.length(); }
for (int j = 0; j < 2; j++) { QString name = name_info.name1;
int pos_idx = idx * 2 + j; int name_len = name.length();
QPointF pos = name_info.is_number_bg ? NAME_POS_NUMBER[pos_idx] : NAME_POS[pos_idx]; for (int j = 0; j < 2; j++) {
if (j == 0) { int pos_idx = idx * 2 + j;
qreal xscale, yscale; QPointF pos = NEW_POS;
xscale = yscale = 1; if (j == 0) {
qreal xscale, yscale;
qreal y_offset[2] = { 0 }; xscale = yscale = 1;
if (name_len == 2) {
if (!rot) { qreal y_offset[2] = { 0 };
pos.setY(pos.y() + 82.0 * xscale); if (name_len == 2) {
} pos.setY(pos.y() + 82.0 * xscale);
else { y_offset[0] = 25;
pos.setX(pos.x() + 82.0 * xscale); }
} QGraphicsTextItem* textItem1 = new QGraphicsTextItem(name.mid(0, 1), name_bgItem);
textItem1->setFont(font);
y_offset[0] = 25; textItem1->setDefaultTextColor(font_color);
} textItem1->setPos(pos);
textItem1->setTransform(QTransform::fromScale(xscale, yscale));
QGraphicsTextItem* textItem1 = new QGraphicsTextItem(name.mid(0, 1));
textItem1->setFont(font); //scene.addItem(textItem1);
textItem1->setDefaultTextColor(font_color); QGraphicsTextItem* textItem2 = new QGraphicsTextItem(name.mid(1, 1), name_bgItem);
if (!rot) { textItem2->setFont(font);
textItem1->setPos(pos); textItem2->setDefaultTextColor(font_color);
textItem1->setTransform(QTransform::fromScale(xscale, yscale)); textItem2->setPos(pos.x(), pos.y() + (145 + y_offset[0]) * xscale);
} textItem2->setTransform(QTransform::fromScale(xscale, yscale));
else {
textItem1->setPos(pos);
textItem1->setRotation(-90); if (name_len > 2) {
textItem1->setTransform(QTransform::fromScale(xscale, yscale)); QGraphicsTextItem* textItem3 = new QGraphicsTextItem(name.mid(2, 1), name_bgItem);
} textItem3->setFont(font);
textItem3->setDefaultTextColor(font_color);
textItem3->setPos(pos.x(), pos.y() + 290 * xscale);
scene.addItem(textItem1); textItem3->setTransform(QTransform::fromScale(xscale, yscale));
QGraphicsTextItem* textItem2 = new QGraphicsTextItem(name.mid(1, 1)); }
textItem2->setFont(font); }
textItem2->setDefaultTextColor(font_color); else if (j == 1) {
if (!rot) { //TODO: add English world
QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng, name_bgItem);
textItem2->setPos(pos.x(), pos.y() + (145 + y_offset[0]) * xscale);
textItem2->setTransform(QTransform::fromScale(xscale, yscale));
} int _new_size = getFontSizebyStr(_new_font, 120, 480, name_info.name_eng);
else { _new_font.setPixelSize(_new_size);
textItem2->setPos(pos.x() + (145 + y_offset[0]) * xscale, pos.y());
textItem2->setRotation(-90); eng_word_item->setFont(_new_font);
textItem2->setTransform(QTransform::fromScale(xscale, yscale)); eng_word_item->adjustSize();
}
QRectF rect = eng_word_item->boundingRect();
scene.addItem(textItem2); eng_word_item->setDefaultTextColor(font_color);
if (name_len > 2) {
QGraphicsTextItem* textItem3 = new QGraphicsTextItem(name.mid(2, 1)); eng_word_item->setRotation(-90);
textItem3->setFont(font); // the position export from web is different.
textItem3->setDefaultTextColor(font_color); eng_word_item->setPos((name_bgItem->boundingRect().width()/2 - rect.height()/2)+20, 1230 + rect.width() / 2);
if (!rot) {
textItem3->setPos(pos.x(), pos.y() + 290 * xscale);
textItem3->setTransform(QTransform::fromScale(xscale, yscale)); }
}
else { }
textItem3->setPos(pos.x() + 290 * xscale, pos.y()); bool is_export_page = ((idx + 1) % BG_POS_COUNT == 0);
textItem3->setRotation(-90); if (is_export_page || n == nameList.count() - 1) {
textItem3->setTransform(QTransform::fromScale(xscale, yscale)); 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);
scene.addItem(textItem3); export_times++;
}
} scene.clear();
else if (j == 1) { }
//TODO: add English world }
QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng);
}
break;
int _new_size = getFontSizebyStr(_new_font, 120, 480, name_info.name_eng);
_new_font.setPixelSize(_new_size); default:
break;
eng_word_item->setFont(_new_font); }
QRectF rect = eng_word_item->boundingRect();
eng_word_item->setDefaultTextColor(font_color);
if (!rot) {
eng_word_item->setRotation(-90);
eng_word_item->setPos(pos.x() + 20 - rect.height(), (pos.y() - 200) + rect.width() / 2); QMessageBox msgBox;
scene.addItem(eng_word_item); msgBox.setText(QString().asprintf("Export Finshed. Count:%d", export_times));
} msgBox.exec();
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);
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);
export_times++;
scene.clear();
}
}
}
break;
default:
break;
}
QMessageBox msgBox;
msgBox.setText(QString().asprintf("Export Finshed. Count:%d", export_times));
msgBox.exec();
}

View File

@ -1,15 +1,15 @@
#pragma once #pragma once
#include "INameCreater.h" #include "INameCreater.h"
class FiveToSingle : public INameCreater class FiveToSingle : public INameCreater
{ {
public: public:
FiveToSingle(); FiveToSingle();
~FiveToSingle(); ~FiveToSingle();
protected: protected:
QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent); QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent);
public: public:
virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color); virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color);
}; };

View File

@ -1,313 +1,313 @@
#include "HKHolderCreater.h" #include "HKHolderCreater.h"
#include <QTextCodec> #include <QTextCodec>
#include <QTextStream> #include <QTextStream>
#include <QDebug> #include <QDebug>
#include <QMessageBox> #include <QMessageBox>
#include <QDateTime> #include <QDateTime>
#include <QGraphicsPixmapItem> #include <QGraphicsPixmapItem>
#define HK_BG_WIDTH 2482 #define HK_BG_WIDTH 2482
#define HK_BG_HEIGH 3509 #define HK_BG_HEIGH 3509
#define MAX_COL_IN_ROW 7 #define MAX_COL_IN_ROW 7
#define MAX_LABEL_IN_PAPER 14 #define MAX_LABEL_IN_PAPER 14
#define NAME_TWO_WORD_OFFSET 90.0 #define NAME_TWO_WORD_OFFSET 90.0
#define NAME_THREE_WORD_OFFSET 82.0 #define NAME_THREE_WORD_OFFSET 82.0
#define NAME_TWO_EXT_Y 20.0 #define NAME_TWO_EXT_Y 20.0
#define NAME_TWO_EXT_REV_Y 23.0 #define NAME_TWO_EXT_REV_Y 23.0
static qreal row_x_offset = 132; static qreal row_x_offset = 132;
static qreal row_x_gap = 320; static qreal row_x_gap = 320;
static qreal row_y_offset[] = { 105 , 1615 }; static qreal row_y_offset[] = { 105 , 1615 };
static QPoint NAME_OFFSET_START = QPoint(92, 413); static QPoint NAME_OFFSET_START = QPoint(92, 413);
static QPoint NAME_OFFSET_REVERSE_START = QPoint(179, 1030); static QPoint NAME_OFFSET_REVERSE_START = QPoint(179, 1030);
HKHolderCreater::HKHolderCreater() : INameCreater() HKHolderCreater::HKHolderCreater() : INameCreater()
{ {
label_bg_map["a"] = ":/NameCreater/resource/hk_holder/a.jpg"; label_bg_map["a"] = ":/NameCreater/resource/hk_holder/a.jpg";
label_bg_map["b"] = ":/NameCreater/resource/hk_holder/b.jpg"; label_bg_map["b"] = ":/NameCreater/resource/hk_holder/b.jpg";
label_bg_map["m"] = ":/NameCreater/resource/hk_holder/m.jpg"; label_bg_map["m"] = ":/NameCreater/resource/hk_holder/m.jpg";
label_bg_map["g"] = ":/NameCreater/resource/hk_holder/g.jpg"; label_bg_map["g"] = ":/NameCreater/resource/hk_holder/g.jpg";
label_bg_map["st"] = ":/NameCreater/resource/hk_holder/st.jpg"; label_bg_map["st"] = ":/NameCreater/resource/hk_holder/st.jpg";
label_bg_map["w"] = ":/NameCreater/resource/hk_holder/w.jpg"; label_bg_map["w"] = ":/NameCreater/resource/hk_holder/w.jpg";
label_bg_map["p"] = ":/NameCreater/resource/hk_holder/p.jpg"; label_bg_map["p"] = ":/NameCreater/resource/hk_holder/p.jpg";
label_bg_map["pg"] = ":/NameCreater/resource/hk_holder/pg.jpg"; label_bg_map["pg"] = ":/NameCreater/resource/hk_holder/pg.jpg";
label_bg_map["r"] = ":/NameCreater/resource/hk_holder/r.jpg"; label_bg_map["r"] = ":/NameCreater/resource/hk_holder/r.jpg";
label_bg_map["y"] = ":/NameCreater/resource/hk_holder/y.jpg"; label_bg_map["y"] = ":/NameCreater/resource/hk_holder/y.jpg";
} }
HKHolderCreater::~HKHolderCreater() HKHolderCreater::~HKHolderCreater()
{ {
} }
QList<NameInfo_t> HKHolderCreater::getNameByFileContent(Name_Type_e type, const QByteArray& conetent) QList<NameInfo_t> HKHolderCreater::getNameByFileContent(Name_Type_e type, const QByteArray& conetent)
{ {
QList<NameInfo_t> nameList; QList<NameInfo_t> nameList;
QTextCodec* tc = QTextCodec::codecForName("Big5"); QTextCodec* tc = QTextCodec::codecForName("Big5");
QString codec = tc->toUnicode(conetent.data()); QString codec = tc->toUnicode(conetent.data());
QTextStream stream(&codec); QTextStream stream(&codec);
int row = 0; int row = 0;
while (!stream.atEnd()) while (!stream.atEnd())
{ {
NameInfo_t info; NameInfo_t info;
QString line = stream.readLine(); QString line = stream.readLine();
QString name_tc = line; QString name_tc = line;
QStringList csvList = name_tc.split(','); QStringList csvList = name_tc.split(',');
QString name, eng_name, bg_type; QString name, eng_name, bg_type;
switch (type) { switch (type) {
case Name_zh: case Name_zh:
name = csvList.at(0); name = csvList.at(0);
bg_type = csvList.at(1); bg_type = csvList.at(1);
break; break;
case Name_zh_eng: case Name_zh_eng:
/*name = csvList.at(0); /*name = csvList.at(0);
eng_name = csvList.at(1); eng_name = csvList.at(1);
bg_type = csvList.at(2);*/ bg_type = csvList.at(2);*/
break; break;
case Name_eng: case Name_eng:
//eng_name = csvList.at(0); //eng_name = csvList.at(0);
//bg_type = csvList.at(1); //bg_type = csvList.at(1);
default: default:
break; break;
} }
qDebug() << "row :" << row << " " << name << ", eng: " << eng_name << ", bg_type: " << bg_type; qDebug() << "row :" << row << " " << name << ", eng: " << eng_name << ", bg_type: " << bg_type;
if (name.compare("name") == 0 || eng_name.compare("eng_name") == 0) { if (name.compare("name") == 0 || eng_name.compare("eng_name") == 0) {
//pass first line //pass first line
continue; continue;
} }
info.name1 = name; info.name1 = name;
info.name_eng = eng_name; info.name_eng = eng_name;
info.name2 = bg_type; info.name2 = bg_type;
nameList.append(info); nameList.append(info);
row++; row++;
} }
return nameList; return nameList;
} }
void HKHolderCreater::generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color) void HKHolderCreater::generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color)
{ {
int export_times = 0; int export_times = 0;
QList<NameInfo_t> nameList = getNameByFileContent(type, filecontent); QList<NameInfo_t> nameList = getNameByFileContent(type, filecontent);
if (nameList.isEmpty()) { if (nameList.isEmpty()) {
QMessageBox msgBox; QMessageBox msgBox;
msgBox.setText(QString("Name is empty ! ").append(filename)); msgBox.setText(QString("Name is empty ! ").append(filename));
msgBox.exec(); msgBox.exec();
} }
QGraphicsScene scene; QGraphicsScene scene;
scene.setBackgroundBrush(QBrush(QColor(255, 255, 255))); scene.setBackgroundBrush(QBrush(QColor(255, 255, 255)));
QGraphicsView view(&scene); QGraphicsView view(&scene);
switch (type) switch (type)
{ {
case Name_zh: case Name_zh:
for (int idx = 0; idx < nameList.length(); idx++) { for (int idx = 0; idx < nameList.length(); idx++) {
if ((idx % MAX_LABEL_IN_PAPER) == 0) { if ((idx % MAX_LABEL_IN_PAPER) == 0) {
QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, HK_BG_WIDTH, HK_BG_HEIGH); QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, HK_BG_WIDTH, HK_BG_HEIGH);
bg_item->setBrush(QBrush(QColor(255, 255, 255))); bg_item->setBrush(QBrush(QColor(255, 255, 255)));
//QGraphicsPixmapItem* bg_item = new QGraphicsPixmapItem(QPixmap(":/NameCreater/resource/hk_holder/sample.jpg")); //QGraphicsPixmapItem* bg_item = new QGraphicsPixmapItem(QPixmap(":/NameCreater/resource/hk_holder/sample.jpg"));
scene.addItem(bg_item); scene.addItem(bg_item);
} }
int re_idx, row_idx, col_idx; int re_idx, row_idx, col_idx;
re_idx = idx % MAX_LABEL_IN_PAPER; re_idx = idx % MAX_LABEL_IN_PAPER;
row_idx = re_idx / MAX_COL_IN_ROW; row_idx = re_idx / MAX_COL_IN_ROW;
col_idx = re_idx % MAX_COL_IN_ROW; col_idx = re_idx % MAX_COL_IN_ROW;
NameInfo_t name_info = nameList.at(idx); NameInfo_t name_info = nameList.at(idx);
QString label_rel_path = label_bg_map[name_info.name2]; QString label_rel_path = label_bg_map[name_info.name2];
QGraphicsPixmapItem* label_item = new QGraphicsPixmapItem(QPixmap(label_rel_path)); QGraphicsPixmapItem* label_item = new QGraphicsPixmapItem(QPixmap(label_rel_path));
label_item->setPos(qreal(row_x_offset + col_idx* row_x_gap), row_y_offset[row_idx]); label_item->setPos(qreal(row_x_offset + col_idx* row_x_gap), row_y_offset[row_idx]);
//label_item->setOpacity(0.5); //label_item->setOpacity(0.5);
scene.addItem(label_item); scene.addItem(label_item);
for (int i = 0; i < 2; i++) { for (int i = 0; i < 2; i++) {
int name_word_len = name_info.name1.length(); int name_word_len = name_info.name1.length();
qreal two_word_y = (name_word_len == 2) ? NAME_TWO_EXT_Y : 0; qreal two_word_y = (name_word_len == 2) ? NAME_TWO_EXT_Y : 0;
qreal two_word_rev_y = (name_word_len == 2) ? NAME_TWO_EXT_REV_Y : 0; qreal two_word_rev_y = (name_word_len == 2) ? NAME_TWO_EXT_REV_Y : 0;
qreal offset_y = (name_word_len == 2) ? NAME_TWO_WORD_OFFSET : NAME_THREE_WORD_OFFSET; qreal offset_y = (name_word_len == 2) ? NAME_TWO_WORD_OFFSET : NAME_THREE_WORD_OFFSET;
for (int w = 0; w < name_word_len; w++) { for (int w = 0; w < name_word_len; w++) {
QGraphicsTextItem* word_item = new QGraphicsTextItem(name_info.name1.at(w)); QGraphicsTextItem* word_item = new QGraphicsTextItem(name_info.name1.at(w));
word_item->setFont(font); word_item->setFont(font);
word_item->setDefaultTextColor(font_color); word_item->setDefaultTextColor(font_color);
if (i == 0) { if (i == 0) {
word_item->setPos(label_item->x() + NAME_OFFSET_START.x(), label_item->y() + NAME_OFFSET_START.y() + two_word_y + offset_y * w); word_item->setPos(label_item->x() + NAME_OFFSET_START.x(), label_item->y() + NAME_OFFSET_START.y() + two_word_y + offset_y * w);
} }
else { else {
word_item->setTransform(QTransform().fromScale(-1, -1)); word_item->setTransform(QTransform().fromScale(-1, -1));
word_item->setPos(label_item->x() + NAME_OFFSET_REVERSE_START.x(), label_item->y() + NAME_OFFSET_REVERSE_START.y() - two_word_rev_y - offset_y * w); word_item->setPos(label_item->x() + NAME_OFFSET_REVERSE_START.x(), label_item->y() + NAME_OFFSET_REVERSE_START.y() - two_word_rev_y - offset_y * w);
} }
scene.addItem(word_item); scene.addItem(word_item);
} }
} }
if ((idx % MAX_LABEL_IN_PAPER) == (MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) { if ((idx % MAX_LABEL_IN_PAPER) == (MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) {
QString date_str = QDateTime::currentDateTime().toString("MMddhhmm"); QString date_str = QDateTime::currentDateTime().toString("MMddhhmm");
QString file_name = QString("HK_%2_%1.jpg").arg(QString::number(export_times + 1), date_str); QString file_name = QString("HK_%2_%1.jpg").arg(QString::number(export_times + 1), date_str);
saveToImage(file_name, &scene); saveToImage(file_name, &scene);
export_times++; export_times++;
scene.clear(); scene.clear();
} }
} }
break; break;
/* /*
case Name_eng: case Name_eng:
for (int idx = 0; idx < nameList.length(); idx++) { for (int idx = 0; idx < nameList.length(); idx++) {
if ((idx % MAX_LABEL_IN_PAPER) == 0) { if ((idx % MAX_LABEL_IN_PAPER) == 0) {
QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT); QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT);
bg_item->setBrush(QBrush(QColor(255, 255, 255))); bg_item->setBrush(QBrush(QColor(255, 255, 255)));
//QGraphicsPixmapItem* bg_item = QGraphicsPixmapItem(QPixmap(BG_SMAPLE_PATH)); //QGraphicsPixmapItem* bg_item = QGraphicsPixmapItem(QPixmap(BG_SMAPLE_PATH));
scene.addItem(bg_item); scene.addItem(bg_item);
} }
NameInfo_t name_info = nameList.at(idx); NameInfo_t name_info = nameList.at(idx);
int col_index = idx % MAX_LABEL_IN_PAPER; int col_index = idx % MAX_LABEL_IN_PAPER;
QString label_rel_path = label_bg_map[name_info.name2]; QString label_rel_path = label_bg_map[name_info.name2];
QGraphicsPixmapItem* label_item = new QGraphicsPixmapItem(QPixmap(label_rel_path)); QGraphicsPixmapItem* label_item = new QGraphicsPixmapItem(QPixmap(label_rel_path));
label_item->setPos(int(LABEL_POS_START.x() + LABEL_POS_X_OFFSET * col_index), int(LABEL_POS_START.y())); label_item->setPos(int(LABEL_POS_START.x() + LABEL_POS_X_OFFSET * col_index), int(LABEL_POS_START.y()));
label_item->setOpacity(1); label_item->setOpacity(1);
scene.addItem(label_item); scene.addItem(label_item);
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;
} }
QFont _new_font = QFont(EnglisthFont()); QFont _new_font = QFont(EnglisthFont());
_new_font.setWeight(QFont::ExtraLight); _new_font.setWeight(QFont::ExtraLight);
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);
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) ? 290.0 : 170.0; qreal x_offset = (i == 0) ? 290.0 : 170.0;
qreal y_offset = (i == 0) ? 780.0 : 1580.0; qreal y_offset = (i == 0) ? 780.0 : 1580.0;
chrismas_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); 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(label_item->x() + x_offset - rect.height() / 2.0, label_item->y() + y_offset + chrismas_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);
} }
if ((idx % MAX_LABEL_IN_PAPER) == (MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) { if ((idx % MAX_LABEL_IN_PAPER) == (MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) {
QString date_str = QDateTime::currentDateTime().toString("MMddhhmm"); QString date_str = QDateTime::currentDateTime().toString("MMddhhmm");
QString file_name = QString("Birthday_%2_%1.jpg").arg(QString::number(export_times + 1), date_str); QString file_name = QString("Birthday_%2_%1.jpg").arg(QString::number(export_times + 1), date_str);
saveToImage(file_name, &scene); saveToImage(file_name, &scene);
export_times++; export_times++;
scene.clear(); scene.clear();
} }
} }
break; break;
case Name_zh_eng: case Name_zh_eng:
for (int idx = 0; idx < nameList.length(); idx++) { for (int idx = 0; idx < nameList.length(); idx++) {
if ((idx % MAX_LABEL_IN_PAPER) == 0) { if ((idx % MAX_LABEL_IN_PAPER) == 0) {
QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT); QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT);
bg_item->setBrush(QBrush(QColor(255, 255, 255))); bg_item->setBrush(QBrush(QColor(255, 255, 255)));
//QGraphicsPixmapItem* bg_item = QGraphicsPixmapItem(QPixmap(BG_SMAPLE_PATH)); //QGraphicsPixmapItem* bg_item = QGraphicsPixmapItem(QPixmap(BG_SMAPLE_PATH));
scene.addItem(bg_item); scene.addItem(bg_item);
} }
NameInfo_t name_info = nameList.at(idx); NameInfo_t name_info = nameList.at(idx);
int col_index = idx % MAX_LABEL_IN_PAPER; int col_index = idx % MAX_LABEL_IN_PAPER;
QString label_rel_path = label_bg_map[name_info.name2]; QString label_rel_path = label_bg_map[name_info.name2];
QGraphicsPixmapItem* label_item = new QGraphicsPixmapItem(QPixmap(label_rel_path)); QGraphicsPixmapItem* label_item = new QGraphicsPixmapItem(QPixmap(label_rel_path));
label_item->setPos(int(LABEL_POS_START.x() + LABEL_POS_X_OFFSET * col_index), int(LABEL_POS_START.y())); label_item->setPos(int(LABEL_POS_START.x() + LABEL_POS_X_OFFSET * col_index), int(LABEL_POS_START.y()));
label_item->setOpacity(1); label_item->setOpacity(1);
scene.addItem(label_item); scene.addItem(label_item);
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;
} }
// add ZH word // add ZH word
int name_word_len = name_info.name1.length(); int name_word_len = name_info.name1.length();
qreal two_word_y = (name_word_len == 2) ? NAME_TWO_WORD_OFFSET / 2 : 0; qreal two_word_y = (name_word_len == 2) ? NAME_TWO_WORD_OFFSET / 2 : 0;
qreal offset_y = (name_word_len == 2) ? NAME_TWO_WORD_OFFSET : NAME_THREE_WORD_OFFSET; qreal offset_y = (name_word_len == 2) ? NAME_TWO_WORD_OFFSET : NAME_THREE_WORD_OFFSET;
for (int w = 0; w < name_word_len; w++) { for (int w = 0; w < name_word_len; w++) {
QGraphicsTextItem* word_item = new QGraphicsTextItem(name_info.name1.at(w)); QGraphicsTextItem* word_item = new QGraphicsTextItem(name_info.name1.at(w));
word_item->setFont(font); word_item->setFont(font);
word_item->setDefaultTextColor(font_color); word_item->setDefaultTextColor(font_color);
word_item->setPos(label_item->x() + NAME_OFFSET_START.x(), label_item->y() + NAME_OFFSET_START.y() + two_word_y + chrismas_y_offset + offset_y * w); word_item->setPos(label_item->x() + NAME_OFFSET_START.x(), label_item->y() + NAME_OFFSET_START.y() + two_word_y + chrismas_y_offset + offset_y * w);
scene.addItem(word_item); scene.addItem(word_item);
} }
//TODO: add English world //TODO: add English world
QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng); QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng);
QFont _new_font = QFont(EnglisthFont()); QFont _new_font = QFont(EnglisthFont());
_new_font.setWeight(QFont::ExtraLight); _new_font.setWeight(QFont::ExtraLight);
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);
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(-90); eng_word_item->setRotation(-90);
eng_word_item->setPos(label_item->x() + 170.0 - rect.height() / 2.0, label_item->y() + 1580 - chrismas_y_offset + rect.width() / 2); eng_word_item->setPos(label_item->x() + 170.0 - rect.height() / 2.0, label_item->y() + 1580 - chrismas_y_offset + rect.width() / 2);
scene.addItem(eng_word_item); scene.addItem(eng_word_item);
if ((idx % MAX_LABEL_IN_PAPER) == (MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) { if ((idx % MAX_LABEL_IN_PAPER) == (MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) {
QString date_str = QDateTime::currentDateTime().toString("MMddhhmm"); QString date_str = QDateTime::currentDateTime().toString("MMddhhmm");
QString file_name = QString("Birthday_%2_%1.jpg").arg(QString::number(export_times + 1), date_str); QString file_name = QString("Birthday_%2_%1.jpg").arg(QString::number(export_times + 1), date_str);
saveToImage(file_name, &scene); saveToImage(file_name, &scene);
export_times++; export_times++;
scene.clear(); scene.clear();
} }
} }
break; break;
*/ */
default: default:
break; break;
} }
QMessageBox msgBox; QMessageBox msgBox;
msgBox.setText(QString().asprintf("Export Finshed. Count:%d", export_times)); msgBox.setText(QString().asprintf("Export Finshed. Count:%d", export_times));
msgBox.exec(); msgBox.exec();
} }

View File

@ -1,20 +1,20 @@
#pragma once #pragma once
#include "INameCreater.h" #include "INameCreater.h"
#include <QMap> #include <QMap>
class HKHolderCreater : class HKHolderCreater :
public INameCreater public INameCreater
{ {
public: public:
HKHolderCreater(); HKHolderCreater();
~HKHolderCreater(); ~HKHolderCreater();
protected: protected:
QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent); QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent);
public: public:
virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color); virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color);
private: private:
QMap<QString, QString> label_bg_map; QMap<QString, QString> label_bg_map;
}; };

View File

@ -1,170 +1,181 @@
#include "INameCreater.h" #include "INameCreater.h"
#include <QDebug> #include <QDebug>
#include <QApplication> #include <QApplication>
#include <QPainter> #include <QPainter>
#include <QDateTime> #include <QDateTime>
#include <QBuffer> #include <QBuffer>
#include <QFileDialog> #include <QFileDialog>
#include <QTextCodec> #include <QTextCodec>
#include <QTextStream> #include <QTextStream>
#include <QMessageBox> #include <QMessageBox>
#include <QRegularExpression> #include <QRegularExpression>
#define BG_PATH_FORMAT ":/NameCreater/resource/background_%1.jpg" #define BG_PATH_FORMAT ":/NameCreater/resource/background_%1.jpg"
INameCreater::INameCreater() INameCreater::INameCreater()
{ {
} }
INameCreater::~INameCreater() INameCreater::~INameCreater()
{ {
} }
void INameCreater::saveToImage(const QString& filename, QGraphicsScene* scene) void INameCreater::saveToImage(const QString& filename, QGraphicsScene* scene)
{ {
scene->clearSelection(); // Selections would also render to the file scene->clearSelection(); // Selections would also render to the file
scene->setSceneRect(scene->itemsBoundingRect()); // Re-shrink the scene to it's bounding contents scene->setSceneRect(scene->itemsBoundingRect()); // Re-shrink the scene to it's bounding contents
QImage image(scene->sceneRect().size().toSize(), QImage::Format_ARGB32); // Create the image with the exact size of the shrunk scene QImage image(scene->sceneRect().size().toSize(), QImage::Format_ARGB32); // Create the image with the exact size of the shrunk scene
image.fill(Qt::transparent); // Start all pixels transparent image.fill(Qt::transparent); // Start all pixels transparent
int dpm = 300 / 0.0254; // ~300 DPI int dpm = 300 / 0.0254; // ~300 DPI
image.setDotsPerMeterX(dpm); image.setDotsPerMeterX(dpm);
image.setDotsPerMeterY(dpm); image.setDotsPerMeterY(dpm);
QPainter painter(&image); QPainter painter(&image);
scene->render(&painter); scene->render(&painter);
#ifdef Q_OS_MAC
QString folder_name = QCoreApplication::applicationDirPath() + "/../../../export_" + QDateTime::currentDateTime().toString("yyyyMMdd");
#else #ifdef Q_OS_MAC
QString folder_name = QCoreApplication::applicationDirPath() + "/export_" + QDateTime::currentDateTime().toString("yyyyMMdd"); QString folder_name = QCoreApplication::applicationDirPath() + "/../../../export_" + QDateTime::currentDateTime().toString("yyyyMMdd");
#endif qDebug() << "app director path" <<QCoreApplication::applicationDirPath();
#else
image.save(filename, "JPEG"); QString folder_name = "./";//QCoreApplication::applicationDirPath() + "/export_" + QDateTime::currentDateTime().toString("yyyyMMdd");
#endif
QByteArray imageData;
QBuffer buffer(&imageData); QString savePath = folder_name.append(filename);
buffer.open(QIODevice::WriteOnly);
QPixmap pixmap = QPixmap::fromImage(image); #ifdef Q_OS_WASM
pixmap.save(&buffer, "JPEG", 100); // You can also use other formats like "JPEG" or "BMP" QByteArray imageData;
QBuffer buffer(&imageData);
QFileDialog::saveFileContent(imageData, filename); buffer.open(QIODevice::WriteOnly);
QPixmap pixmap = QPixmap::fromImage(image);
} pixmap.save(&buffer, "JPEG", 100); // You can also use other formats like "JPEG" or "BMP"
QList<NameInfo_t> INameCreater::getNameByFile(Name_Type_e type, const QString& filename) QFileDialog::saveFileContent(imageData, savePath);
{ #else
QList<NameInfo_t> nameList;
qDebug()<<"image save path:" << savePath;
#ifdef Q_OS_MAC image.save(savePath, "JPEG");
QString root_path = QCoreApplication::applicationDirPath() + "/../../../"; #endif
#else
QString root_path = "";//QCoreApplication::applicationDirPath() + "/"; }
#endif
QList<NameInfo_t> INameCreater::getNameByFile(Name_Type_e type, const QString& filename)
{
QFile file(filename); QList<NameInfo_t> nameList;
if (!file.open(QIODevice::ReadOnly)) { #ifdef Q_OS_MAC
QMessageBox msgBox; QString root_path = QCoreApplication::applicationDirPath() + "/../../../";
msgBox.setText(QString("Load file failed!").append(filename)); #else
msgBox.exec(); QString root_path = "";//QCoreApplication::applicationDirPath() + "/";
file.close(); #endif
return nameList;
}
QFile file(filename);
int row = 0;
QTextCodec* tc = QTextCodec::codecForName("Big5"); if (!file.open(QIODevice::ReadOnly)) {
while (!file.atEnd()) QMessageBox msgBox;
{ msgBox.setText(QString("Load file failed!").append(filename));
NameInfo_t info; msgBox.exec();
QByteArray line = file.readLine(); file.close();
return nameList;
QString name_tc = tc->toUnicode(line); }
QStringList csvList = name_tc.split(',');
int row = 0;
QTextCodec* tc = QTextCodec::codecForName("Big5");
QString name1 = csvList.at(0); while (!file.atEnd())
QString type_str = csvList.last();//QString::fromLocal8Bit(csvList.last()); {
qDebug() << "row :" << row << " " << name1; NameInfo_t info;
QByteArray line = file.readLine();
type_str = type_str.remove(QRegularExpression("\r"));
type_str = type_str.remove(QRegularExpression("\n")); QString name_tc = tc->toUnicode(line);
QStringList csvList = name_tc.split(',');
if (name1.compare("name_1") == 0) { QString name1 = csvList.at(0);
continue; QString type_str = csvList.last();//QString::fromLocal8Bit(csvList.last());
} qDebug() << "row :" << row << " " << name1;
info.name1 = name1; type_str = type_str.remove(QRegularExpression("\r"));
info.bg_path = QString(BG_PATH_FORMAT).arg(type_str); type_str = type_str.remove(QRegularExpression("\n"));
info.is_number_bg = type_str[0].isDigit();
nameList.append(info);
if (name1.compare("name_1") == 0) {
row++; continue;
} }
file.close();
return nameList; info.name1 = name1;
} info.bg_path = QString(BG_PATH_FORMAT).arg(type_str);
info.is_number_bg = type_str[0].isDigit();
QList<NameInfo_t> INameCreater::getNameByFileContent(Name_Type_e type, const QByteArray& conetent)
{ nameList.append(info);
(void)type;
QList<NameInfo_t> nameList; row++;
QTextCodec* tc = QTextCodec::codecForName("Big5"); }
QString codec = tc->toUnicode(conetent.data()); file.close();
QTextStream stream(&codec); return nameList;
}
int row = 0; QList<NameInfo_t> INameCreater::getNameByFileContent(Name_Type_e type, const QByteArray& conetent)
while (!stream.atEnd()) {
{ (void)type;
NameInfo_t info; QList<NameInfo_t> nameList;
QString line = stream.readLine(); QTextCodec* tc = QTextCodec::codecForName("Big5");
QString name_tc = line; QString codec = tc->toUnicode(conetent.data());
QStringList csvList = name_tc.split(','); QTextStream stream(&codec);
QString name1 = csvList.at(0);
QString type_str = csvList.last();//QString::fromLocal8Bit(csvList.last()); int row = 0;
qDebug() << "row :" << row << " " << name1; while (!stream.atEnd())
{
type_str = type_str.remove(QRegularExpression("\r")); NameInfo_t info;
type_str = type_str.remove(QRegularExpression("\n")); QString line = stream.readLine();
QString name_tc = line;
QStringList csvList = name_tc.split(',');
if (name1.compare("name_1") == 0) { QString name1 = csvList.at(0);
continue; QString type_str = csvList.last();//QString::fromLocal8Bit(csvList.last());
} qDebug() << "row :" << row << " " << name1;
info.name1 = name1; type_str = type_str.remove(QRegularExpression("\r"));
info.bg_path = QString(BG_PATH_FORMAT).arg(type_str); type_str = type_str.remove(QRegularExpression("\n"));
info.is_number_bg = type_str[0].isDigit();
nameList.append(info);
if (name1.compare("name_1") == 0) {
row++; continue;
} }
return nameList;
} info.name1 = name1;
info.bg_path = QString(BG_PATH_FORMAT).arg(type_str);
void INameCreater::generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color) info.is_number_bg = type_str[0].isDigit();
{
} nameList.append(info);
int INameCreater::getFontSizebyStr(const QFont& font, int max_font_size,int max_label_width, const QString& str) row++;
{ }
QFont _font(font); return nameList;
int font_size = max_font_size; }
while (font_size > 10) {
_font.setPixelSize(font_size); void INameCreater::generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color)
QFontMetrics fm(_font); {
if (fm.horizontalAdvance(str) <= max_label_width) break; }
font_size--;
} int INameCreater::getFontSizebyStr(const QFont& font, int max_font_size,int max_label_width, const QString& str)
{
return font_size; QFont _font(font);
} int font_size = max_font_size;
while (font_size > 10) {
_font.setPixelSize(font_size);
QFontMetrics fm(_font);
if (fm.horizontalAdvance(str) <= max_label_width) return font_size;
font_size--;
}
return font_size;
}

View File

@ -1,49 +1,52 @@
#pragma once #pragma once
#include <QObject> #include <QObject>
#include <QGraphicsScene> #include <QGraphicsScene>
#include <QGraphicsView> #include <QGraphicsView>
#include <QGraphicsRectItem> #include <QGraphicsRectItem>
#include <QCoreApplication>
#define BG_WIDTH 3508
#define BG_HEIGHT 2481 #define BG_WIDTH 3508
#define BG_HEIGHT 2481
struct NameInfo_t {
QString name1;
QString name2;
QString name_eng; struct NameInfo_t {
QString bg_path; QString name1;
bool is_number_bg; QString name2;
int bg_type; QString name_eng;
}; QString bg_path;
bool is_number_bg;
enum Name_Type_e { int bg_type;
Name_zh = 0, };
Name_eng,
Name_zh_eng enum Name_Type_e {
}; Name_zh = 0,
Name_eng,
class INameCreater : public QObject { Name_zh_eng
public: };
INameCreater();
~INameCreater(); class INameCreater : public QObject {
public:
void setEnglishFont(const QFont& font) { INameCreater();
eng_Font = QFont(font); ~INameCreater();
}
void setEnglishFont(const QFont& font) {
QFont EnglisthFont() const { eng_Font = QFont(font);
return eng_Font; }
}
QFont EnglisthFont() const {
protected: return eng_Font;
void saveToImage(const QString& filename, QGraphicsScene* scene); }
QList<NameInfo_t> getNameByFile(Name_Type_e type, const QString& filename); void saveToImage(const QString& filename, QGraphicsScene* scene);
QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent); protected:
virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color); QList<NameInfo_t> getNameByFile(Name_Type_e type, const QString& filename);
int getFontSizebyStr(const QFont& font, int max_font_size, int max_label_width, const QString& str); QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent);
private:
virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color);
QFont eng_Font; int getFontSizebyStr(const QFont& font, int max_font_size, int max_label_width, const QString& str);
private:
};
QFont eng_Font;
};

View File

@ -1,151 +1,322 @@
#include "def.h" #include "def.h"
#include "NameCreater.h" #include "NameCreater.h"
#include <QDebug> #include <QDebug>
#include <QFileDialog> #include <QFileDialog>
#include <QMessageBox> #include <QMessageBox>
#include <QFontDatabase> #include <QFontDatabase>
#include <QTextCodec> #include <QTextCodec>
#include <QGraphicsScene> #include <QGraphicsScene>
#include <QGraphicsView> #include <QGraphicsView>
#include <QGraphicsPixmapItem> #include <QGraphicsPixmapItem>
#include <QDateTime> #include <QDateTime>
#include <QBuffer> #include <QBuffer>
#include <QRegularExpression> #include <QRegularExpression>
#include <QJsonDocument>
#include "FiveToSingle.h" #include <QJsonObject>
#include "BirthdayCreater.h" #include <QJsonArray>
#include "TowelCreater.h" #include <QComboBox>
#include "NewFiveCreater.h"
#include "HKHolderCreater.h"
#include "FiveToSingle.h"
#include "BirthdayCreater.h"
#define FONT_PATH ":/NameCreater/_exp/DFYuanStd-W8.otf" #include "TowelCreater.h"
#define TOWEL_FONT_PATH ":/NameCreater/_exp/W1.ttc" #include "NewFiveCreater.h"
#define ENGLISH_FONT_PATH ":/NameCreater/_exp/FontsFree-Net-Acumin-Pro-Semibold.ttf" #include "HKHolderCreater.h"
#include "customlogo.h"
#define FONT_SIZE 120 #include "customlogo2.h"
#define TOWEL_FONT_PATH ":/NameCreater/_exp/W1.ttc"
NameCreater::NameCreater(QWidget *parent) #define ENGLISH_FONT_PATH ":/NameCreater/_exp/FontsFree-Net-Acumin-Pro-Semibold.ttf"
: QMainWindow(parent)
{ #define FONT_SIZE 120
ui.setupUi(this);
connect(ui.fivesingle_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn); //#define FONT_CHT_URL "https://bazaar1688.ddns.net/font/TaiwanPearl-SemiBold.ttf"
//connect(ui.fiveold_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
connect(ui.birthday_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn); #define FONT_JSON_URL "https://namecreater.bazaar1688.duckdns.org/font/fonts.json"
connect(ui.towel_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
connect(ui.fivenew_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn); //#define FONT_CHT_URL "http://45.32.51.135/font/TaiwanPearl-SemiBold.ttf"
connect(ui.birthday_zh_eng_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
connect(ui.birthday_eng_eng_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn); static CustomLogo* s_custom_logo_widget = nullptr;
connect(ui.handkerchief_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
connect(ui.fivesingle_zh_eng_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn); NameCreater::NameCreater(QWidget* parent)
: QMainWindow(parent)
QString font_path = FONT_PATH; {
QFile font_res(font_path); ui.setupUi(this);
if (!font_res.open(QIODevice::ReadOnly)) {
QMessageBox msgBox;
msgBox.setText("Can not load font file!" + font_path); ui.scrollAreaWidgetContents->setMinimumSize(ui.frame->size());
msgBox.exec();
font_res.close(); connect(ui.fivesingle_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
} //connect(ui.fiveold_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
connect(ui.birthday_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
int id = QFontDatabase::addApplicationFontFromData(font_res.readAll()); connect(ui.towel_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
QStringList family_list = QFontDatabase::applicationFontFamilies(id); connect(ui.fivenew_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
connect(ui.birthday_zh_eng_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
font = QFont(family_list.at(0)); connect(ui.birthday_eng_eng_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
font.setPixelSize(FONT_SIZE); connect(ui.handkerchief_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
font_res.close(); connect(ui.fivesingle_zh_eng_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
connect(ui.customlogo_btn, &QPushButton::released, this, &NameCreater::OnClickedCustomLogoBtn);
font_path = QString(TOWEL_FONT_PATH); connect(ui.customlogo2_btn, &QPushButton::released, this, &NameCreater::OnClickedCustomLogo2Btn);
QFile font_res_towel(font_path);
if (!font_res_towel.open(QIODevice::ReadOnly)) { #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QMessageBox msgBox; connect(ui.font_comboBox, &QComboBox::currentTextChanged, this, &NameCreater::OnFontComboBoxTextChanged);
msgBox.setText("Can not load font file!" + font_path); #else
msgBox.exec(); connect(ui.font_comboBox, &QComboBox::currentIndexChanged, this, &NameCreater::OnFontComboBoxIndexChanged);
font_res_towel.close(); #endif
} //qDebug()<<"QSslSocket="<<QSslSocket::sslLibraryBuildVersionString();
id = QFontDatabase::addApplicationFontFromData(font_res_towel.readAll()); connect(&network_mgr, &QNetworkAccessManager::finished, this, &NameCreater::onFontDownloadFinished);
font_towel = QFont(QFontDatabase::applicationFontFamilies(id).at(0));
font_towel.setPixelSize(240); query_type = 10;
font_towel.setLetterSpacing(QFont::PercentageSpacing, 42); query(QUrl(FONT_JSON_URL), 10);
}
font_path = QString(ENGLISH_FONT_PATH);
QFile font_res_eng(font_path); NameCreater::~NameCreater()
if (!font_res_eng.open(QIODevice::ReadOnly)) { {
QMessageBox msgBox;
msgBox.setText("Can not load font file!" + font_path); }
msgBox.exec();
font_res_eng.close(); void NameCreater::parseFontJson(const QByteArray& data)
} {
QJsonDocument jsonDoc = QJsonDocument::fromJson(data);
id = QFontDatabase::addApplicationFontFromData(font_res_eng.readAll());
font_english = QFont(QFontDatabase::applicationFontFamilies(id).at(0)); if (jsonDoc.isNull()) {
qDebug() << "Failed to create JSON doc.";
return;
font_color = QColor(0, 0, 0); }
QFont tital_font = QFont(font); if (jsonDoc.isObject()) {
tital_font.setPixelSize(20); QJsonObject jsonObj = jsonDoc.object();
// Process the JSON object
QFont version_font = QFont(font); qDebug() << "JSON Object:" << jsonObj;
version_font.setPixelSize(12); }
else if (jsonDoc.isArray()) {
//ui.tital_label->setFont(tital_font); ui.font_comboBox->clear();
ui.version_label->setFont(version_font); QJsonArray jsonArray = jsonDoc.array();
ui.version_label->setText(VERSION);
foreach(auto val, jsonArray) {
QList<QLabel*> titals = findChildren<QLabel*>(QRegularExpression("tital_label")); auto obj = val.toObject();
foreach(auto tital, titals) { QString n = obj["font_name"].toString();
tital->setFont(tital_font); QString u = obj["font_url"].toString();
} ui.font_comboBox->addItem(n, u);
}
// Process the JSON array
qDebug() << "JSON Array:" << jsonArray;
}
void NameCreater::OnClickedReadBtn() {
auto sender =(QPushButton*) QObject::sender(); }
auto fileContentReady = [this, sender](const QString &fileName, const QByteArray &fileContent) {
if (fileName.isEmpty()) { }
// No file was selected
} void NameCreater::query(const QUrl& url, int type)
else { {
// Use fileName and fileContent QNetworkRequest req(url);
if(sender == ui.fivesingle_btn) FiveToSingle().generaImageFromCSV(Name_Type_e::Name_zh,fileName, fileContent, this->font, this->font_color); req.setAttribute(QNetworkRequest::User, QVariant(type));
network_mgr.get(req);
if(sender == ui.birthday_btn) BirthdayCreater().generaImageFromCSV(Name_Type_e::Name_zh, fileName, fileContent, this->font, this->font_color);
if(sender == ui.fivenew_btn) NewFiveCreater().generaImageFromCSV(Name_Type_e::Name_zh, fileName, fileContent, this->font, this->font_color);
if(sender == ui.towel_btn) TowelCreater().generaImageFromCSV(Name_Type_e::Name_zh, fileName, fileContent, this->font_towel, this->font_color); }
if (sender == ui.birthday_zh_eng_btn) {
BirthdayCreater creater; void NameCreater::loadFont(const QByteArray& fontdata) {
creater.setEnglishFont(font_english);
creater.generaImageFromCSV(Name_Type_e::Name_zh_eng, fileName, fileContent, this->font, this->font_color); int id = QFontDatabase::addApplicationFontFromData(fontdata);
} QStringList family_list = QFontDatabase::applicationFontFamilies(id);
if (sender == ui.birthday_eng_eng_btn){ qDebug() << "font family list:" << family_list;
BirthdayCreater b; QString cht_fontname = family_list.at(0);
b.setEnglishFont(font_english);
b.generaImageFromCSV(Name_Type_e::Name_eng, fileName,fileContent,this->font, this->font_color); font = QFont(cht_fontname);
} font.setPixelSize(FONT_SIZE);
if (sender == ui.handkerchief_btn) {
QFont newFont(font); QString font_path = QString(TOWEL_FONT_PATH);
newFont.setPixelSize(78); QFile font_res_towel(font_path);
QColor newColor(0,0,0); if (!font_res_towel.open(QIODevice::ReadOnly)) {
HKHolderCreater().generaImageFromCSV(Name_Type_e::Name_zh, fileName, fileContent, newFont, newColor); QMessageBox msgBox;
} msgBox.setText("Can not load font file!" + font_path);
if (sender == ui.fivesingle_zh_eng_btn) { msgBox.exec();
FiveToSingle f; font_res_towel.close();
f.setEnglishFont(this->font_english); }
f.generaImageFromCSV(Name_Type_e::Name_zh_eng, fileName, fileContent, this->font, this->font_color);
return; id = QFontDatabase::addApplicationFontFromData(font_res_towel.readAll());
} font_towel = QFont(QFontDatabase::applicationFontFamilies(id).at(0));
font_towel.setPixelSize(240);
} font_towel.setLetterSpacing(QFont::PercentageSpacing, 42);
};
QFileDialog::getOpenFileContent("CSV (*.csv)", fileContentReady);
} font_path = QString(ENGLISH_FONT_PATH);
QFile font_res_eng(font_path);
if (!font_res_eng.open(QIODevice::ReadOnly)) {
QMessageBox msgBox;
msgBox.setText("Can not load font file!" + font_path);
msgBox.exec();
font_res_eng.close();
}
id = QFontDatabase::addApplicationFontFromData(font_res_eng.readAll());
font_english = QFont(QFontDatabase::applicationFontFamilies(id).at(0));
font_color = QColor(0, 0, 0);
QFont tital_font = QFont(font);
tital_font.setPixelSize(20);
QFont version_font = QFont(font);
version_font.setPixelSize(12);
//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->setText(VERSION);
ui.font_comboBox->setFont(version_font);
QList<QLabel*> titals = findChildren<QLabel*>(QRegularExpression("tital_label"));
foreach(auto tital, titals) {
tital->setFont(tital_font);
}
qDebug() << "Load Font Succeed!";
}
void NameCreater::OnClickedReadBtn() {
auto sender = (QPushButton*)QObject::sender();
#ifdef Q_OS_WASM
auto fileContentReady = [this, sender](const QString& fileName, const QByteArray& fileContent) {
if (!fileName.isEmpty()) {
this->execCreater(sender, fileName, fileContent);
}
};
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
if (sender == ui.fivesingle_btn) FiveToSingle().generaImageFromCSV(Name_Type_e::Name_zh, fileName, fileContent, this->font, this->font_color);
if (sender == ui.birthday_btn) BirthdayCreater().generaImageFromCSV(Name_Type_e::Name_zh, fileName, fileContent, this->font, this->font_color);
if (sender == ui.fivenew_btn) NewFiveCreater().generaImageFromCSV(Name_Type_e::Name_zh, fileName, fileContent, this->font, this->font_color);
if (sender == ui.towel_btn) TowelCreater().generaImageFromCSV(Name_Type_e::Name_zh, fileName, fileContent, this->font_towel, this->font_color);
if (sender == ui.birthday_zh_eng_btn) {
BirthdayCreater creater;
creater.setEnglishFont(font_english);
creater.generaImageFromCSV(Name_Type_e::Name_zh_eng, fileName, fileContent, this->font, this->font_color);
}
if (sender == ui.birthday_eng_eng_btn) {
BirthdayCreater b;
b.setEnglishFont(font_english);
b.generaImageFromCSV(Name_Type_e::Name_eng, fileName, fileContent, this->font, this->font_color);
}
if (sender == ui.handkerchief_btn) {
QFont newFont(font);
newFont.setPixelSize(78);
QColor newColor(0, 0, 0);
HKHolderCreater().generaImageFromCSV(Name_Type_e::Name_zh, fileName, fileContent, newFont, newColor);
}
if (sender == ui.fivesingle_zh_eng_btn) {
FiveToSingle f;
f.setEnglishFont(this->font_english);
f.generaImageFromCSV(Name_Type_e::Name_zh_eng, fileName, fileContent, this->font, this->font_color);
return;
}
}
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);
}

View File

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

View File

@ -1,30 +1,37 @@
# ---------------------------------------------------- # ----------------------------------------------------
# This file is generated by the Qt Visual Studio Tools. # This file is generated by the Qt Visual Studio Tools.
# ------------------------------------------------------ # ------------------------------------------------------
# This is a reminder that you are using a generated .pro file. # This is a reminder that you are using a generated .pro file.
# Remove it when you are finished editing this file. # Remove it when you are finished editing this file.
message("You are running qmake on a generated .pro file. This may not work!") message("You are running qmake on a generated .pro file. This may not work!")
HEADERS += ./resource.h \ HEADERS += ./resource.h \
$$PWD/def.h \ $$PWD/def.h \
./NameCreater.h \ ./NameCreater.h \
./BirthdayCreater.h \ ./BirthdayCreater.h \
./FiveToSingle.h \ ./FiveToSingle.h \
./INameCreater.h \ ./INameCreater.h \
./OldFiveCreater.h \ ./OldFiveCreater.h \
./TowelCreater.h \ ./TowelCreater.h \
./NewFiveCreater.h \ ./NewFiveCreater.h \
./HKHolderCreater.h ./HKHolderCreater.h \
SOURCES += ./NameCreater.cpp \ ./customlogo.h \
./main.cpp \ ./customlogo2.h
./BirthdayCreater.cpp \
./OldFiveCreater.cpp \ SOURCES += ./NameCreater.cpp \
./FiveToSingle.cpp \ ./main.cpp \
./INameCreater.cpp \ ./BirthdayCreater.cpp \
./TowelCreater.cpp \ ./OldFiveCreater.cpp \
./NewFiveCreater.cpp \ ./FiveToSingle.cpp \
./HKHolderCreater.cpp ./INameCreater.cpp \
FORMS += ./NameCreater.ui ./TowelCreater.cpp \
RESOURCES += NameCreater.qrc ./NewFiveCreater.cpp \
./HKHolderCreater.cpp \
./customlogo.cpp \
./customlogo2.cpp
FORMS += ./NameCreater.ui \
./customlogo.ui \
./customlogo2.ui
RESOURCES += NameCreater.qrc

View File

@ -1,23 +1,27 @@
QT += core gui QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets network
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat
CONFIG += c++11 resources_big CONFIG += c++11 resources_big
# You can make your code fail to compile if it uses deprecated APIs. # You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line. # In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
include(NameCreater.pri) include(NameCreater.pri)
# Default rules for deployment. # Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target !isEmpty(target.path): INSTALLS += target
QMAKE_LFLAGS+= -s TOTAL_MEMORY=67108864 wasm-emscripten{
QMAKE_LFLAGS+= -s TOTAL_MEMORY=67108864
QMAKE_LFLAGS += -s ALLOW_MEMORY_GROWTH=1
}

File diff suppressed because it is too large Load Diff

View File

@ -1,417 +0,0 @@
<?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>

View File

@ -1,6 +1,6 @@
<RCC> <RCC>
<qresource prefix="/NameCreater"> <qresource prefix="/NameCreater">
<file>_exp/DFYuanStd-W8.otf</file> <file>resource/custom_logo/bg_1.jpg</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,5 +100,8 @@
<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>

View File

@ -1,60 +1,60 @@
// Microsoft Visual C++ generated resource script. // Microsoft Visual C++ generated resource script.
// //
#include "resource.h" #include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS #define APSTUDIO_READONLY_SYMBOLS
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Generated from the TEXTINCLUDE 2 resource. // Generated from the TEXTINCLUDE 2 resource.
// //
#include "winres.h" #include "winres.h"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS #undef APSTUDIO_READONLY_SYMBOLS
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// ­^¤å (¬ü°ê) resources // ­^¤å (¬ü°ê) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE 4, 1 LANGUAGE 4, 1
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// TEXTINCLUDE // TEXTINCLUDE
// //
1 TEXTINCLUDE 1 TEXTINCLUDE
BEGIN BEGIN
"resource.h\0" "resource.h\0"
END END
2 TEXTINCLUDE 2 TEXTINCLUDE
BEGIN BEGIN
"#include ""winres.h""\r\n" "#include ""winres.h""\r\n"
"\0" "\0"
END END
3 TEXTINCLUDE 3 TEXTINCLUDE
BEGIN BEGIN
"\r\n" "\r\n"
"\0" "\0"
END END
#endif // APSTUDIO_INVOKED #endif // APSTUDIO_INVOKED
#endif // ­^¤å (¬ü°ê) resources #endif // ­^¤å (¬ü°ê) resources
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED #ifndef APSTUDIO_INVOKED
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Generated from the TEXTINCLUDE 3 resource. // Generated from the TEXTINCLUDE 3 resource.
// //
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED #endif // not APSTUDIO_INVOKED

View File

@ -1,403 +1,550 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>NameCreaterClass</class> <class>NameCreaterClass</class>
<widget class="QMainWindow" name="NameCreaterClass"> <widget class="QMainWindow" name="NameCreaterClass">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>946</width> <width>902</width>
<height>817</height> <height>780</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
<font/> <font/>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>NameCreater</string> <string>NameCreater</string>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true"/>
</property> </property>
<widget class="QWidget" name="centralWidget"> <widget class="QWidget" name="centralWidget">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QWidget#centralWidget{ <string notr="true">QWidget#centralWidget{
background-color: rgb(0, 0, 0); background-color: rgb(0, 0, 0);
}</string> }</string>
</property> </property>
<widget class="QLabel" name="version_label"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="geometry"> <item>
<rect> <layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,10">
<x>10</x> <property name="spacing">
<y>10</y> <number>100</number>
<width>181</width> </property>
<height>16</height> <property name="sizeConstraint">
</rect> <enum>QLayout::SetDefaultConstraint</enum>
</property> </property>
<property name="font"> <property name="leftMargin">
<font> <number>0</number>
<family>Yu Gothic UI</family> </property>
<pointsize>10</pointsize> <item>
<weight>50</weight> <widget class="QLabel" name="version_label">
<italic>false</italic> <property name="font">
<bold>false</bold> <font>
</font> <family>Yu Gothic UI</family>
</property> <pointsize>10</pointsize>
<property name="styleSheet"> <weight>50</weight>
<string notr="true">color: rgb(255, 255, 255); <italic>false</italic>
</string> <bold>false</bold>
</property> </font>
<property name="text"> </property>
<string>v1.0.0</string> <property name="styleSheet">
</property> <string notr="true">color: rgb(255, 255, 255);
<property name="alignment"> </string>
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> </property>
</property> <property name="text">
</widget> <string>v1.0.0</string>
<widget class="QFrame" name="frame"> </property>
<property name="geometry"> <property name="alignment">
<rect> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
<x>10</x> </property>
<y>40</y> </widget>
<width>851</width> </item>
<height>581</height> <item>
</rect> <widget class="QLabel" name="font_name_label">
</property> <property name="font">
<property name="styleSheet"> <font>
<string notr="true">QFrame#frame{ <family>Yu Gothic UI</family>
border: 3px solid #FFFFFF; <pointsize>10</pointsize>
border-color: rgb(255, 255, 255); <weight>50</weight>
<italic>false</italic>
}</string> <bold>false</bold>
</property> </font>
<property name="frameShape"> </property>
<enum>QFrame::StyledPanel</enum> <property name="styleSheet">
</property> <string notr="true">color: rgb(255, 255, 255);
<property name="frameShadow"> </string>
<enum>QFrame::Raised</enum> </property>
</property> <property name="text">
<layout class="QGridLayout" name="gridLayout"> <string>font_name</string>
<item row="2" column="1"> </property>
<widget class="QPushButton" name="fivesingle_btn"> <property name="alignment">
<property name="minimumSize"> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
<size> </property>
<width>0</width> </widget>
<height>76</height> </item>
</size> <item>
</property> <widget class="QComboBox" name="font_comboBox">
<property name="text"> <property name="minimumSize">
<string>Open File</string> <size>
</property> <width>200</width>
</widget> <height>0</height>
</item> </size>
<item row="5" column="1"> </property>
<widget class="QLabel" name="tital_label_5"> </widget>
<property name="font"> </item>
<font> <item>
<family>Yu Gothic UI</family> <spacer name="horizontalSpacer">
<pointsize>20</pointsize> <property name="orientation">
<weight>50</weight> <enum>Qt::Horizontal</enum>
<italic>false</italic> </property>
<bold>false</bold> <property name="sizeHint" stdset="0">
</font> <size>
</property> <width>40</width>
<property name="styleSheet"> <height>20</height>
<string notr="true">color: rgb(255, 255, 255); </size>
</string> </property>
</property> </spacer>
<property name="text"> </item>
<string>小方巾產生器</string> </layout>
</property> </item>
<property name="alignment"> <item>
<set>Qt::AlignCenter</set> <widget class="QScrollArea" name="scrollArea">
</property> <property name="styleSheet">
</widget> <string notr="true"/>
</item> </property>
<item row="8" column="1"> <property name="frameShape">
<widget class="QPushButton" name="handkerchief_btn"> <enum>QFrame::NoFrame</enum>
<property name="minimumSize"> </property>
<size> <property name="sizeAdjustPolicy">
<width>0</width> <enum>QAbstractScrollArea::AdjustToContents</enum>
<height>76</height> </property>
</size> <property name="widgetResizable">
</property> <bool>true</bool>
<property name="text"> </property>
<string>Open File</string> <widget class="QWidget" name="scrollAreaWidgetContents">
</property> <property name="geometry">
</widget> <rect>
</item> <x>0</x>
<item row="3" column="1"> <y>0</y>
<widget class="QLabel" name="tital_label_2"> <width>884</width>
<property name="font"> <height>734</height>
<font> </rect>
<family>Yu Gothic UI</family> </property>
<pointsize>20</pointsize> <property name="minimumSize">
<weight>50</weight> <size>
<italic>false</italic> <width>0</width>
<bold>false</bold> <height>0</height>
</font> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255); <string notr="true">QWidget#scrollAreaWidgetContents{
</string> background-color: rgb(0, 0, 0);
</property> }</string>
<property name="text"> </property>
<string>五入組拆成單入產生器(中/英)</string> <widget class="QFrame" name="frame">
</property> <property name="geometry">
<property name="alignment"> <rect>
<set>Qt::AlignCenter</set> <x>0</x>
</property> <y>0</y>
</widget> <width>861</width>
</item> <height>681</height>
<item row="6" column="1"> </rect>
<widget class="QPushButton" name="towel_btn"> </property>
<property name="minimumSize"> <property name="styleSheet">
<size> <string notr="true">QFrame#frame{
<width>0</width> border: 3px solid #FFFFFF;
<height>76</height> border-color: rgb(255, 255, 255);
</size>
</property> }</string>
<property name="text"> </property>
<string>Open File</string> <property name="frameShape">
</property> <enum>QFrame::StyledPanel</enum>
</widget> </property>
</item> <property name="frameShadow">
<item row="1" column="1"> <enum>QFrame::Raised</enum>
<widget class="QLabel" name="tital_label"> </property>
<property name="font"> <layout class="QGridLayout" name="gridLayout">
<font> <item row="7" column="0">
<family>Yu Gothic UI</family> <widget class="QLabel" name="tital_label_7">
<pointsize>20</pointsize> <property name="font">
<weight>50</weight> <font>
<italic>false</italic> <family>Yu Gothic UI</family>
<bold>false</bold> <pointsize>20</pointsize>
</font> <weight>50</weight>
</property> <italic>false</italic>
<property name="styleSheet"> <bold>false</bold>
<string notr="true">color: rgb(255, 255, 255); </font>
</string> </property>
</property> <property name="styleSheet">
<property name="text"> <string notr="true">
<string>五入組拆成單入產生器</string> color: rgb(255, 255, 255);
</property> </string>
<property name="alignment"> </property>
<set>Qt::AlignCenter</set> <property name="text">
</property> <string>生日禮產生器(英/英)</string>
</widget> </property>
</item> <property name="alignment">
<item row="2" column="0"> <set>Qt::AlignCenter</set>
<widget class="QPushButton" name="fivenew_btn"> </property>
<property name="minimumSize"> </widget>
<size> </item>
<width>0</width> <item row="6" column="0">
<height>76</height> <widget class="QPushButton" name="birthday_zh_eng_btn">
</size> <property name="minimumSize">
</property> <size>
<property name="text"> <width>0</width>
<string>Open File</string> <height>76</height>
</property> </size>
</widget> </property>
</item> <property name="text">
<item row="7" column="1"> <string>Open File</string>
<widget class="QLabel" name="tital_label_8"> </property>
<property name="font"> </widget>
<font> </item>
<family>Yu Gothic UI</family> <item row="3" column="0">
<pointsize>20</pointsize> <widget class="QLabel" name="tital_label_4">
<weight>50</weight> <property name="font">
<italic>false</italic> <font>
<bold>false</bold> <family>Yu Gothic UI</family>
</font> <pointsize>20</pointsize>
</property> <weight>50</weight>
<property name="styleSheet"> <italic>false</italic>
<string notr="true"> <bold>false</bold>
color: rgb(250, 250, 250); </font>
</string> </property>
</property> <property name="styleSheet">
<property name="text"> <string notr="true">
<string>手帕夾產生器</string> color: rgb(255, 255, 255);
</property> </string>
<property name="alignment"> </property>
<set>Qt::AlignCenter</set> <property name="text">
</property> <string>生日禮產生器</string>
</widget> </property>
</item> <property name="alignment">
<item row="1" column="0"> <set>Qt::AlignCenter</set>
<widget class="QLabel" name="tital_label_3"> </property>
<property name="font"> </widget>
<font> </item>
<family>Yu Gothic UI</family> <item row="4" column="1">
<pointsize>20</pointsize> <widget class="QPushButton" name="fivesingle_zh_eng_btn">
<weight>50</weight> <property name="minimumSize">
<italic>false</italic> <size>
<bold>false</bold> <width>0</width>
</font> <height>76</height>
</property> </size>
<property name="styleSheet"> </property>
<string notr="true">color: rgb(255, 255, 255); <property name="text">
</string> <string>Open File</string>
</property> </property>
<property name="text"> </widget>
<string>五入組產生器</string> </item>
</property> <item row="1" column="0">
<property name="alignment"> <widget class="QLabel" name="tital_label_3">
<set>Qt::AlignCenter</set> <property name="font">
</property> <font>
</widget> <family>Yu Gothic UI</family>
</item> <pointsize>20</pointsize>
<item row="4" column="1"> <weight>50</weight>
<widget class="QPushButton" name="fivesingle_zh_eng_btn"> <italic>false</italic>
<property name="minimumSize"> <bold>false</bold>
<size> </font>
<width>0</width> </property>
<height>76</height> <property name="styleSheet">
</size> <string notr="true">color: rgb(255, 255, 255);
</property> </string>
<property name="text"> </property>
<string>Open File</string> <property name="text">
</property> <string>五入組產生器</string>
</widget> </property>
</item> <property name="alignment">
<item row="3" column="0"> <set>Qt::AlignCenter</set>
<widget class="QLabel" name="tital_label_4"> </property>
<property name="font"> </widget>
<font> </item>
<family>Yu Gothic UI</family> <item row="9" column="0">
<pointsize>20</pointsize> <widget class="QLabel" name="tital_label_9">
<weight>50</weight> <property name="font">
<italic>false</italic> <font>
<bold>false</bold> <family>Yu Gothic UI</family>
</font> <pointsize>20</pointsize>
</property> <weight>50</weight>
<property name="styleSheet"> <italic>false</italic>
<string notr="true"> <bold>false</bold>
color: rgb(255, 255, 255); </font>
</string> </property>
</property> <property name="styleSheet">
<property name="text"> <string notr="true">
<string>生日禮產生器</string> color: rgb(255, 255, 255);
</property> </string>
<property name="alignment"> </property>
<set>Qt::AlignCenter</set> <property name="text">
</property> <string>客製底圖產生器</string>
</widget> </property>
</item> <property name="alignment">
<item row="4" column="0"> <set>Qt::AlignCenter</set>
<widget class="QPushButton" name="birthday_btn"> </property>
<property name="minimumSize"> </widget>
<size> </item>
<width>0</width> <item row="8" column="0">
<height>76</height> <widget class="QPushButton" name="birthday_eng_eng_btn">
</size> <property name="minimumSize">
</property> <size>
<property name="text"> <width>0</width>
<string>Open File</string> <height>76</height>
</property> </size>
</widget> </property>
</item> <property name="text">
<item row="5" column="0"> <string>Open File</string>
<widget class="QLabel" name="tital_label_6"> </property>
<property name="font"> </widget>
<font> </item>
<family>Yu Gothic UI</family> <item row="5" column="1">
<pointsize>20</pointsize> <widget class="QLabel" name="tital_label_5">
<weight>50</weight> <property name="font">
<italic>false</italic> <font>
<bold>false</bold> <family>Yu Gothic UI</family>
</font> <pointsize>20</pointsize>
</property> <weight>50</weight>
<property name="styleSheet"> <italic>false</italic>
<string notr="true"> <bold>false</bold>
color: rgb(255, 255, 255); </font>
</string> </property>
</property> <property name="styleSheet">
<property name="text"> <string notr="true">color: rgb(255, 255, 255);
<string>生日禮產生器(中/英)</string> </string>
</property> </property>
<property name="alignment"> <property name="text">
<set>Qt::AlignCenter</set> <string>小方巾產生器</string>
</property> </property>
</widget> <property name="alignment">
</item> <set>Qt::AlignCenter</set>
<item row="6" column="0"> </property>
<widget class="QPushButton" name="birthday_zh_eng_btn"> </widget>
<property name="minimumSize"> </item>
<size> <item row="5" column="0">
<width>0</width> <widget class="QLabel" name="tital_label_6">
<height>76</height> <property name="font">
</size> <font>
</property> <family>Yu Gothic UI</family>
<property name="text"> <pointsize>20</pointsize>
<string>Open File</string> <weight>50</weight>
</property> <italic>false</italic>
</widget> <bold>false</bold>
</item> </font>
<item row="7" column="0"> </property>
<widget class="QLabel" name="tital_label_7"> <property name="styleSheet">
<property name="font"> <string notr="true">
<font> color: rgb(255, 255, 255);
<family>Yu Gothic UI</family> </string>
<pointsize>20</pointsize> </property>
<weight>50</weight> <property name="text">
<italic>false</italic> <string>生日禮產生器(中/英)</string>
<bold>false</bold> </property>
</font> <property name="alignment">
</property> <set>Qt::AlignCenter</set>
<property name="styleSheet"> </property>
<string notr="true"> </widget>
color: rgb(255, 255, 255); </item>
</string> <item row="4" column="0">
</property> <widget class="QPushButton" name="birthday_btn">
<property name="text"> <property name="minimumSize">
<string>生日禮產生器(英/英)</string> <size>
</property> <width>0</width>
<property name="alignment"> <height>76</height>
<set>Qt::AlignCenter</set> </size>
</property> </property>
</widget> <property name="text">
</item> <string>Open File</string>
<item row="8" column="0"> </property>
<widget class="QPushButton" name="birthday_eng_eng_btn"> </widget>
<property name="minimumSize"> </item>
<size> <item row="8" column="1">
<width>0</width> <widget class="QPushButton" name="handkerchief_btn">
<height>76</height> <property name="minimumSize">
</size> <size>
</property> <width>0</width>
<property name="text"> <height>76</height>
<string>Open File</string> </size>
</property> </property>
</widget> <property name="text">
</item> <string>Open File</string>
</layout> </property>
</widget> </widget>
</widget> </item>
<widget class="QMenuBar" name="menuBar"> <item row="6" column="1">
<property name="geometry"> <widget class="QPushButton" name="towel_btn">
<rect> <property name="minimumSize">
<x>0</x> <size>
<y>0</y> <width>0</width>
<width>946</width> <height>76</height>
<height>21</height> </size>
</rect> </property>
</property> <property name="text">
</widget> <string>Open File</string>
<widget class="QToolBar" name="mainToolBar"> </property>
<attribute name="toolBarArea"> </widget>
<enum>TopToolBarArea</enum> </item>
</attribute> <item row="2" column="1">
<attribute name="toolBarBreak"> <widget class="QPushButton" name="fivesingle_btn">
<bool>false</bool> <property name="minimumSize">
</attribute> <size>
</widget> <width>0</width>
<widget class="QStatusBar" name="statusBar"/> <height>76</height>
<action name="actionOpen_File"> </size>
<property name="text"> </property>
<string>Open File</string> <property name="text">
</property> <string>Open File</string>
</action> </property>
</widget> </widget>
<layoutdefault spacing="6" margin="11"/> </item>
<resources/> <item row="10" column="0">
<connections/> <widget class="QPushButton" name="customlogo_btn">
</ui> <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">
<widget class="QLabel" name="tital_label">
<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="2" column="0">
<widget class="QPushButton" name="fivenew_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="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">
<widget class="QLabel" name="tital_label_8">
<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(250, 250, 250);
</string>
</property>
<property name="text">
<string>手帕夾產生器</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
</item>
</layout>
</widget>
<action name="actionOpen_File">
<property name="text">
<string>Open File</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>
<connections/>
</ui>

View File

@ -1,213 +1,228 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64"> <ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|x64"> <ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<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.16299.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">10.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.19041.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)'=='Release|x64'">10.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>v140</PlatformToolset> <PlatformToolset>v143</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>v142</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
</PropertyGroup> <CharacterSet>NotSet</CharacterSet>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration"> </PropertyGroup>
<ConfigurationType>Application</ConfigurationType> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration">
<PlatformToolset>v140</PlatformToolset> <ConfigurationType>Application</ConfigurationType>
</PropertyGroup> <PlatformToolset>v143</PlatformToolset>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> </PropertyGroup>
<ConfigurationType>Application</ConfigurationType> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<PlatformToolset>v142</PlatformToolset> <ConfigurationType>Application</ConfigurationType>
</PropertyGroup> <PlatformToolset>v143</PlatformToolset>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <CharacterSet>NotSet</CharacterSet>
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')"> </PropertyGroup>
<Import Project="$(QtMsBuild)\qt_defaults.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
</ImportGroup> <ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="QtSettings"> <Import Project="$(QtMsBuild)\qt_defaults.props" />
<QtInstall>5.15.2_msvc2019_64</QtInstall> </ImportGroup>
<QtModules>core;gui;widgets</QtModules> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="QtSettings">
<QtBuildConfig>debug</QtBuildConfig> <QtInstall>5.15.2_msvc2019_64</QtInstall>
</PropertyGroup> <QtModules>core;gui;widgets;network</QtModules>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings"> <QtBuildConfig>debug</QtBuildConfig>
<QtInstall>5.15.2_msvc2019_64</QtInstall> </PropertyGroup>
<QtModules>core;gui;widgets</QtModules> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
<QtBuildConfig>debug</QtBuildConfig> <QtInstall>$(DefaultQtVersion)</QtInstall>
</PropertyGroup> <QtModules>core;gui;widgets;network</QtModules>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="QtSettings"> <QtBuildConfig>debug</QtBuildConfig>
<QtInstall>$(DefaultQtVersion)</QtInstall> </PropertyGroup>
<QtModules>core;gui;widgets</QtModules> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="QtSettings">
<QtBuildConfig>release</QtBuildConfig> <QtInstall>$(DefaultQtVersion)</QtInstall>
</PropertyGroup> <QtModules>core;gui;widgets</QtModules>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings"> <QtBuildConfig>release</QtBuildConfig>
<QtInstall>$(DefaultQtVersion)</QtInstall> </PropertyGroup>
<QtModules>core;gui;widgets</QtModules> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
<QtBuildConfig>release</QtBuildConfig> <QtInstall>$(DefaultQtVersion)</QtInstall>
</PropertyGroup> <QtModules>core;gui;widgets;network;core5compat</QtModules>
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')"> <QtBuildConfig>release</QtBuildConfig>
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." /> </PropertyGroup>
</Target> <Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
<ImportGroup Label="ExtensionSettings" /> <Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
<ImportGroup Label="Shared" /> </Target>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'"> <ImportGroup Label="ExtensionSettings" />
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <ImportGroup Label="Shared" />
<Import Project="$(QtMsBuild)\Qt.props" /> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">
</ImportGroup> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <Import Project="$(QtMsBuild)\Qt.props" />
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup>
<Import Project="$(QtMsBuild)\Qt.props" /> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
</ImportGroup> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'"> <Import Project="$(QtMsBuild)\Qt.props" />
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup>
<Import Project="$(QtMsBuild)\Qt.props" /> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">
</ImportGroup> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <Import Project="$(QtMsBuild)\Qt.props" />
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup>
<Import Project="$(QtMsBuild)\Qt.props" /> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
</ImportGroup> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<PropertyGroup Label="UserMacros" /> <Import Project="$(QtMsBuild)\Qt.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'"> </ImportGroup>
<OutDir>$(SolutionDir)_bin\</OutDir> <PropertyGroup Label="UserMacros" />
<IntDir>$(Configuration)\</IntDir> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">
</PropertyGroup> <OutDir>$(SolutionDir)_bin\</OutDir>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> <IntDir>$(Configuration)\</IntDir>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'"> </PropertyGroup>
<OutDir>$(SolutionDir)_bin\</OutDir> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<IntDir>$(Configuration)\</IntDir> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">
</PropertyGroup> <OutDir>$(SolutionDir)_bin\</OutDir>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <IntDir>$(Configuration)\</IntDir>
<PreBuildEvent> </PropertyGroup>
<Command>xcopy /y "$(ProjectDir)_exp\*" "$(TargetDir)"</Command> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PreBuildEvent> <PreBuildEvent>
<ClCompile> <Command>xcopy /y "$(ProjectDir)_exp\*" "$(TargetDir)"</Command>
<AdditionalOptions>/Zm1000</AdditionalOptions> </PreBuildEvent>
</ClCompile> <ClCompile>
</ItemDefinitionGroup> <AdditionalOptions>/Zm1000</AdditionalOptions>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> </ClCompile>
<PreBuildEvent> </ItemDefinitionGroup>
<Command>xcopy /y "$(ProjectDir)_exp\*" "$(TargetDir)"</Command> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PreBuildEvent> <PreBuildEvent>
<ClCompile> <Command>xcopy /y "$(ProjectDir)_exp\*" "$(TargetDir)"</Command>
<AdditionalOptions>/Zm100</AdditionalOptions> </PreBuildEvent>
</ClCompile> <ClCompile>
</ItemDefinitionGroup> <AdditionalOptions>/Zm1000</AdditionalOptions>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> </ClCompile>
<PreBuildEvent> <Link>
<Command>xcopy /y "$(ProjectDir)_exp\*" "$(TargetDir)"</Command> <HeapCommitSize>
</PreBuildEvent> </HeapCommitSize>
</ItemDefinitionGroup> <HeapReserveSize>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> </HeapReserveSize>
<PreBuildEvent> </Link>
<Command>xcopy /y "$(ProjectDir)_exp\*" "$(TargetDir)"</Command> </ItemDefinitionGroup>
</PreBuildEvent> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</ItemDefinitionGroup> <PreBuildEvent>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="Configuration"> <Command>xcopy /y "$(ProjectDir)_exp\*" "$(TargetDir)"</Command>
<ClCompile> </PreBuildEvent>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> </ItemDefinitionGroup>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <PreBuildEvent>
<Optimization>Disabled</Optimization> <Command>xcopy /y "$(ProjectDir)_exp\*" "$(TargetDir)"</Command>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> </PreBuildEvent>
</ClCompile> </ItemDefinitionGroup>
<Link> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="Configuration">
<SubSystem>Windows</SubSystem> <ClCompile>
<GenerateDebugInformation>true</GenerateDebugInformation> <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
</Link> <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ItemDefinitionGroup> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <Optimization>Disabled</Optimization>
<ClCompile> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> </ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <Link>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <SubSystem>Windows</SubSystem>
<Optimization>Disabled</Optimization> <GenerateDebugInformation>true</GenerateDebugInformation>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> </Link>
</ClCompile> </ItemDefinitionGroup>
<Link> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<SubSystem>Windows</SubSystem> <ClCompile>
<GenerateDebugInformation>true</GenerateDebugInformation> <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
</Link> <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ItemDefinitionGroup> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration"> <Optimization>Disabled</Optimization>
<ClCompile> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> </ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <Link>
<DebugInformationFormat>None</DebugInformationFormat> <SubSystem>Windows</SubSystem>
<Optimization>MaxSpeed</Optimization> <GenerateDebugInformation>true</GenerateDebugInformation>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> </Link>
</ClCompile> </ItemDefinitionGroup>
<Link> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration">
<SubSystem>Windows</SubSystem> <ClCompile>
<GenerateDebugInformation>false</GenerateDebugInformation> <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
</Link> <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ItemDefinitionGroup> <DebugInformationFormat>None</DebugInformationFormat>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <Optimization>MaxSpeed</Optimization>
<ClCompile> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> </ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <Link>
<DebugInformationFormat>None</DebugInformationFormat> <SubSystem>Windows</SubSystem>
<Optimization>MaxSpeed</Optimization> <GenerateDebugInformation>false</GenerateDebugInformation>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> </Link>
</ClCompile> </ItemDefinitionGroup>
<Link> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<SubSystem>Windows</SubSystem> <ClCompile>
<GenerateDebugInformation>false</GenerateDebugInformation> <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
</Link> <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ItemDefinitionGroup> <DebugInformationFormat>None</DebugInformationFormat>
<ItemGroup> <Optimization>MaxSpeed</Optimization>
<ClCompile Include="BirthdayCreater.cpp" /> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<ClCompile Include="HKHolderCreater.cpp" /> </ClCompile>
<ClCompile Include="NewFiveCreater.cpp" /> <Link>
<ClCompile Include="OldFiveCreater.cpp" /> <SubSystem>Windows</SubSystem>
<ClCompile Include="TowelCreater.cpp" /> <GenerateDebugInformation>false</GenerateDebugInformation>
<QtRcc Include="NameCreater.qrc" /> </Link>
<QtUic Include="NameCreater.ui" /> </ItemDefinitionGroup>
<QtMoc Include="NameCreater.h" /> <ItemGroup>
<ClCompile Include="FiveToSingle.cpp" /> <ClCompile Include="BirthdayCreater.cpp" />
<ClCompile Include="INameCreater.cpp" /> <ClCompile Include="customlogo.cpp" />
<ClCompile Include="NameCreater.cpp" /> <ClCompile Include="customlogo2.cpp" />
<ClCompile Include="main.cpp" /> <ClCompile Include="HKHolderCreater.cpp" />
</ItemGroup> <ClCompile Include="NewFiveCreater.cpp" />
<ItemGroup> <ClCompile Include="OldFiveCreater.cpp" />
<ClInclude Include="BirthdayCreater.h" /> <ClCompile Include="TowelCreater.cpp" />
<ClInclude Include="FiveToSingle.h" /> <QtRcc Include="NameCreater.qrc" />
<ClInclude Include="HKHolderCreater.h" /> <QtUic Include="customlogo.ui" />
<ClInclude Include="INameCreater.h" /> <QtUic Include="customlogo2.ui" />
<ClInclude Include="NewFiveCreater.h" /> <QtUic Include="NameCreater.ui" />
<ClInclude Include="OldFiveCreater.h" /> <QtMoc Include="NameCreater.h" />
<ClInclude Include="resource.h" /> <ClCompile Include="FiveToSingle.cpp" />
<ClInclude Include="TowelCreater.h" /> <ClCompile Include="INameCreater.cpp" />
</ItemGroup> <ClCompile Include="NameCreater.cpp" />
<ItemGroup> <ClCompile Include="main.cpp" />
<ResourceCompile Include="NameCreater.rc" /> </ItemGroup>
</ItemGroup> <ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ClInclude Include="BirthdayCreater.h" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')"> <QtMoc Include="customlogo.h" />
<Import Project="$(QtMsBuild)\qt.targets" /> <QtMoc Include="customlogo2.h" />
</ImportGroup> <ClInclude Include="def.h" />
<ImportGroup Label="ExtensionTargets"> <ClInclude Include="FiveToSingle.h" />
</ImportGroup> <ClInclude Include="HKHolderCreater.h" />
<ClInclude Include="INameCreater.h" />
<ClInclude Include="NewFiveCreater.h" />
<ClInclude Include="OldFiveCreater.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="TowelCreater.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="NameCreater.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
<Import Project="$(QtMsBuild)\qt.targets" />
</ImportGroup>
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project> </Project>

View File

@ -1,99 +1,124 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup> <ItemGroup>
<Filter Include="Source Files"> <Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter> </Filter>
<Filter Include="Header Files"> <Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions> <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter> </Filter>
<Filter Include="Resource Files"> <Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> <Extensions>qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter> </Filter>
<Filter Include="Form Files"> <Filter Include="Form Files">
<UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier> <UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
<Extensions>ui</Extensions> <Extensions>ui</Extensions>
</Filter> </Filter>
<Filter Include="Translation Files"> <Filter Include="Translation Files">
<UniqueIdentifier>{639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}</UniqueIdentifier> <UniqueIdentifier>{639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}</UniqueIdentifier>
<Extensions>ts</Extensions> <Extensions>ts</Extensions>
</Filter> </Filter>
<Filter Include="Creaters"> <Filter Include="Creaters">
<UniqueIdentifier>{c0b8778b-3058-44d2-9adc-b902360289e6}</UniqueIdentifier> <UniqueIdentifier>{c0b8778b-3058-44d2-9adc-b902360289e6}</UniqueIdentifier>
</Filter> </Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<QtRcc Include="NameCreater.qrc"> <QtRcc Include="NameCreater.qrc">
<Filter>Resource Files</Filter> <Filter>Resource Files</Filter>
</QtRcc> </QtRcc>
<QtUic Include="NameCreater.ui"> <QtUic Include="NameCreater.ui">
<Filter>Form Files</Filter> <Filter>Form Files</Filter>
</QtUic> </QtUic>
<QtMoc Include="NameCreater.h"> <QtMoc Include="NameCreater.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</QtMoc> </QtMoc>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="main.cpp"> <ClCompile Include="main.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="FiveToSingle.cpp"> <ClCompile Include="FiveToSingle.cpp">
<Filter>Creaters</Filter> <Filter>Creaters</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="INameCreater.cpp"> <ClCompile Include="INameCreater.cpp">
<Filter>Creaters</Filter> <Filter>Creaters</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="OldFiveCreater.cpp"> <ClCompile Include="OldFiveCreater.cpp">
<Filter>Creaters</Filter> <Filter>Creaters</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="NameCreater.cpp"> <ClCompile Include="NameCreater.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="BirthdayCreater.cpp"> <ClCompile Include="BirthdayCreater.cpp">
<Filter>Creaters</Filter> <Filter>Creaters</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="TowelCreater.cpp"> <ClCompile Include="TowelCreater.cpp">
<Filter>Creaters</Filter> <Filter>Creaters</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="NewFiveCreater.cpp"> <ClCompile Include="NewFiveCreater.cpp">
<Filter>Creaters</Filter> <Filter>Creaters</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="HKHolderCreater.cpp"> <ClCompile Include="HKHolderCreater.cpp">
<Filter>Creaters</Filter> <Filter>Creaters</Filter>
</ClCompile> </ClCompile>
</ItemGroup> <ClCompile Include="customlogo.cpp">
<ItemGroup> <Filter>Creaters</Filter>
<ClInclude Include="resource.h"> </ClCompile>
<Filter>Header Files</Filter> <ClCompile Include="customlogo2.cpp">
</ClInclude> <Filter>Creaters</Filter>
<ClInclude Include="FiveToSingle.h"> </ClCompile>
<Filter>Creaters</Filter> </ItemGroup>
</ClInclude> <ItemGroup>
<ClInclude Include="INameCreater.h"> <ClInclude Include="resource.h">
<Filter>Creaters</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="OldFiveCreater.h"> <ClInclude Include="FiveToSingle.h">
<Filter>Creaters</Filter> <Filter>Creaters</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="BirthdayCreater.h"> <ClInclude Include="INameCreater.h">
<Filter>Creaters</Filter> <Filter>Creaters</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="TowelCreater.h"> <ClInclude Include="OldFiveCreater.h">
<Filter>Creaters</Filter> <Filter>Creaters</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="NewFiveCreater.h"> <ClInclude Include="BirthdayCreater.h">
<Filter>Creaters</Filter> <Filter>Creaters</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="HKHolderCreater.h"> <ClInclude Include="TowelCreater.h">
<Filter>Creaters</Filter> <Filter>Creaters</Filter>
</ClInclude> </ClInclude>
</ItemGroup> <ClInclude Include="NewFiveCreater.h">
<ItemGroup> <Filter>Creaters</Filter>
<ResourceCompile Include="NameCreater.rc"> </ClInclude>
<Filter>Resource Files</Filter> <ClInclude Include="HKHolderCreater.h">
</ResourceCompile> <Filter>Creaters</Filter>
</ItemGroup> </ClInclude>
<ClInclude Include="def.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="NameCreater.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</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>

View File

@ -1,31 +1,39 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory> <LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory> <LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory> <LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory> <LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory>
<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-03-08T00:24:36.2679670Z</QtLastBackgroundBuild> <QtLastBackgroundBuild>2024-05-14T07:08:49.3700216Z</QtLastBackgroundBuild>
</PropertyGroup> <QtTouchProperty>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings"> </QtTouchProperty>
<QtLastBackgroundBuild>2024-03-08T00:24:36.4421487Z</QtLastBackgroundBuild> </PropertyGroup>
</PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <QtLastBackgroundBuild>2024-05-14T07:08:49.6936159Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-03-08T00:24:36.6106971Z</QtLastBackgroundBuild> <QtTouchProperty>
</PropertyGroup> </QtTouchProperty>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings"> </PropertyGroup>
<QtLastBackgroundBuild>2024-03-08T00:24:36.7243928Z</QtLastBackgroundBuild> <PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PropertyGroup> <QtLastBackgroundBuild>2024-05-14T07:08:49.8356144Z</QtLastBackgroundBuild>
<QtTouchProperty>
</QtTouchProperty>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
<QtLastBackgroundBuild>2024-05-14T07:08:49.9726151Z</QtLastBackgroundBuild>
<QtTouchProperty>
</QtTouchProperty>
</PropertyGroup>
</Project> </Project>

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,61 @@
name
曹瑀樂
謝沛希
何采璇
余梓鳳
陳品臻
邱媺涵
翁菀妏
鄭欣妮
林昱澔
林和緻
王芃宥
蔡曉蓉
郭乃甄
詹斐晴
游子萱
陳玟如
黃子芩
張凱晴
陳珈琳
曾靖媞
黃芷璿
吳子弘
黃珮綺
何飛翰
林筱芙
汪詩軒
蘇竹君
蔡芊薏
陳品蓁
林聿安
曾逸星
鄭亞兒
陳尚青
呂惠玉
陳品勳
鍾承羲
簡君恬
翁承毅
陳婕熙
柯彥辰
陳星月
張宸菲
林秭安
王宇安
林采睫
吳宇晴
王芷甯
巫少杰
易庭安
陳宥博
黃乙蔓
何盈萱
楊蕙慈
林珆安
吳秀一
鄭金柔
鄭碩軒
白浚緯
紀艾德
辛翊僑
1 name
2 曹瑀樂
3 謝沛希
4 何采璇
5 余梓鳳
6 陳品臻
7 邱媺涵
8 翁菀妏
9 鄭欣妮
10 林昱澔
11 林和緻
12 王芃宥
13 蔡曉蓉
14 郭乃甄
15 詹斐晴
16 游子萱
17 陳玟如
18 黃子芩
19 張凱晴
20 陳珈琳
21 曾靖媞
22 黃芷璿
23 吳子弘
24 黃珮綺
25 何飛翰
26 林筱芙
27 汪詩軒
28 蘇竹君
29 蔡芊薏
30 陳品蓁
31 林聿安
32 曾逸星
33 鄭亞兒
34 陳尚青
35 呂惠玉
36 陳品勳
37 鍾承羲
38 簡君恬
39 翁承毅
40 陳婕熙
41 柯彥辰
42 陳星月
43 張宸菲
44 林秭安
45 王宇安
46 林采睫
47 吳宇晴
48 王芷甯
49 巫少杰
50 易庭安
51 陳宥博
52 黃乙蔓
53 何盈萱
54 楊蕙慈
55 林珆安
56 吳秀一
57 鄭金柔
58 鄭碩軒
59 白浚緯
60 紀艾德
61 辛翊僑

View File

@ -1,21 +1,21 @@
name,bg_type name,bg_type
§d¦t°a,a §d¦t°a,a
Á¤_¹ä,m Á¤_¹ä,m
Á¤_¹ä,g Á¤_¹ä,g
Á¤_¹ä,b Á¤_¹ä,b
Á¤_¹ä,w Á¤_¹ä,w
²ÀÇ,r ²ÀÇ,r
¸â¨°ºÓ,pg ¸â¨°ºÓ,pg
¸â¨°ºÓ,y ¸â¨°ºÓ,y
¸â¨°ºÓ,b ¸â¨°ºÓ,b
¸â¨°ºÓ,p ¸â¨°ºÓ,p
¸â¨°ºÓ,g ¸â¨°ºÓ,g
³¯§Ó,st ³¯§Ó,st
³¯¦u§Ó,r ³¯¦u§Ó,r
³¯¦u§Ó,p ³¯¦u§Ó,p
³¯§Ó,r ³¯§Ó,r
§d¨Î¹a,y §d¨Î¹a,y
§d¨Î¹a,y §d¨Î¹a,y
§d¹a,y §d¹a,y
§d¹a,p §d¹a,p
§d¹a,st §d¹a,st

1 name bg_type
2 §d¦t°a a
3 Á¤_¹ä m
4 Á¤_¹ä g
5 Á¤_¹ä b
6 Á¤_¹ä w
7 ²ÀÇ r
8 ¸â¨°ºÓ pg
9 ¸â¨°ºÓ y
10 ¸â¨°ºÓ b
11 ¸â¨°ºÓ p
12 ¸â¨°ºÓ g
13 ³¯§Ó st
14 ³¯¦u§Ó r
15 ³¯¦u§Ó p
16 ³¯§Ó r
17 §d¨Î¹a y
18 §d¨Î¹a y
19 §d¹a y
20 §d¹a p
21 §d¹a st

View File

@ -1,5 +1,5 @@
eng_name,bg_type eng_name,bg_type
Alice,r Churchill,m
Alice,r Alice,r
Alice,r Alice,r
Alice,r Alice,r

1 eng_name bg_type
2 Alice Churchill r m
3 Alice r
4 Alice r
5 Alice r

443
NameCreater/customlogo.cpp Normal file
View File

@ -0,0 +1,443 @@
#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);
}
}

47
NameCreater/customlogo.h Normal file
View File

@ -0,0 +1,47 @@
#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

241
NameCreater/customlogo.ui Normal file
View File

@ -0,0 +1,241 @@
<?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>

231
NameCreater/customlogo2.cpp Normal file
View File

@ -0,0 +1,231 @@
#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();
}

37
NameCreater/customlogo2.h Normal file
View File

@ -0,0 +1,37 @@
#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

View File

@ -0,0 +1,28 @@
<?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>

View File

@ -1,6 +1,7 @@
#ifndef DEF_H #ifndef DEF_H
#define DEF_H #define DEF_H
#define VERSION "v2.4.2" #define VERSION "v2.10.3"
#endif // DEF_H #endif // DEF_H

View File

@ -1,14 +1,14 @@
//{{NO_DEPENDENCIES}} //{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file. // Microsoft Visual C++ generated include file.
// Used by NameCreater.rc // Used by NameCreater.rc
// Next default values for new objects // Next default values for new objects
// //
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101 #define _APS_NEXT_SYMED_VALUE 101
#endif #endif
#endif #endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 904 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 143 KiB