Compare commits
59 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5bc600c0ec | |||
|
|
17e98668b2 | ||
| 8e9375c7ac | |||
|
|
de6c1a0a6b | ||
| faad6b25ef | |||
| 8277a65bdd | |||
| d3dd641a59 | |||
| 8bfd5da5f1 | |||
| 599480df0f | |||
| 91ca0f21a9 | |||
| 2b51d7ddee | |||
| d1e80ad04c | |||
| 5655d824d7 | |||
| 47b543aaa7 | |||
| 0d14515dc3 | |||
| d9ebf66831 | |||
| e64e06bf56 | |||
|
|
5bbafd6668 | ||
|
|
bbc348d859 | ||
|
|
7a8106b539 | ||
|
|
052d36b520 | ||
|
|
c5e8bba4ff | ||
| 62e75e4ca0 | |||
|
|
46c669d78e | ||
|
|
e14743ca15 | ||
|
|
6ea71180c8 | ||
|
|
10a119e7ea | ||
|
|
39402a800f | ||
|
|
3eb58b7830 | ||
|
|
c6fb017745 | ||
|
|
f9cddcb565 | ||
|
|
aaf3751879 | ||
| 0c5abc203c | |||
| 8166fc30ae | |||
| b2602b5ef7 | |||
| 231f63295f | |||
| 3b6987bb8b | |||
|
|
3da5037ca7 | ||
|
|
2f330ac463 | ||
| d425173179 | |||
| 3b7756393e | |||
| 425e9fead2 | |||
|
|
1a254c4898 | ||
|
|
f40a56c656 | ||
| 3942d7f147 | |||
|
|
fc8bb70f56 | ||
|
|
24639c50b0 | ||
| d9d110ce04 | |||
| 83fde65fae | |||
| 56ea07365d | |||
| 6009f56287 | |||
|
|
dd69403ee6 | ||
|
|
3ce254f16d | ||
|
|
1216358657 | ||
| 793446dcd2 | |||
| 4fa3d9dc1c | |||
|
|
27a4eb5c8b | ||
| 6025cc2913 | |||
| 615fa0e283 |
16
.gitignore
vendored
@ -1,6 +1,10 @@
|
|||||||
*Debug/
|
*Debug/
|
||||||
*Release/
|
*Release/
|
||||||
/.vs/
|
/.vs/
|
||||||
/*.opendb
|
/*.opendb
|
||||||
/*.db
|
/*.db
|
||||||
/_bin
|
/_bin
|
||||||
|
/web_build
|
||||||
|
/buildwed
|
||||||
|
/NameCreater/*.aps
|
||||||
|
/buildweb/
|
||||||
|
|||||||
@ -7,12 +7,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NameCreater", "NameCreater\
|
|||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
Debug|x86 = Debug|x86
|
Debug|x86 = Debug|x86
|
||||||
|
Release|x64 = Release|x64
|
||||||
Release|x86 = Release|x86
|
Release|x86 = Release|x86
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{B66B108B-6DA8-408D-936D-988FF8B6B722}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{B66B108B-6DA8-408D-936D-988FF8B6B722}.Debug|x64.Build.0 = Debug|x64
|
||||||
{B66B108B-6DA8-408D-936D-988FF8B6B722}.Debug|x86.ActiveCfg = Debug|Win32
|
{B66B108B-6DA8-408D-936D-988FF8B6B722}.Debug|x86.ActiveCfg = Debug|Win32
|
||||||
{B66B108B-6DA8-408D-936D-988FF8B6B722}.Debug|x86.Build.0 = Debug|Win32
|
{B66B108B-6DA8-408D-936D-988FF8B6B722}.Debug|x86.Build.0 = Debug|Win32
|
||||||
|
{B66B108B-6DA8-408D-936D-988FF8B6B722}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{B66B108B-6DA8-408D-936D-988FF8B6B722}.Release|x64.Build.0 = Release|x64
|
||||||
{B66B108B-6DA8-408D-936D-988FF8B6B722}.Release|x86.ActiveCfg = Release|Win32
|
{B66B108B-6DA8-408D-936D-988FF8B6B722}.Release|x86.ActiveCfg = Release|Win32
|
||||||
{B66B108B-6DA8-408D-936D-988FF8B6B722}.Release|x86.Build.0 = Release|Win32
|
{B66B108B-6DA8-408D-936D-988FF8B6B722}.Release|x86.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
|||||||
308
NameCreater/BirthdayCreater.cpp
Normal file
@ -0,0 +1,308 @@
|
|||||||
|
#include "BirthdayCreater.h"
|
||||||
|
#include <QTextCodec>
|
||||||
|
#include <QTextStream>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QDateTime>
|
||||||
|
|
||||||
|
|
||||||
|
#define LABEL_HIGHT_LIMIT 350.0
|
||||||
|
#define LABEL_POS_X_OFFSET 323.0
|
||||||
|
#define NAME_TWO_WORD_OFFSET 170.0
|
||||||
|
#define NAME_THREE_WORD_OFFSET 145.0
|
||||||
|
#define MAX_LABEL_IN_PAPER 10
|
||||||
|
#define FONT_PIXEL_SIZE 120
|
||||||
|
|
||||||
|
static QPoint LABEL_POS_START = QPoint(163, 115);
|
||||||
|
static QPoint NAME_OFFSET_START = QPoint(82, 712);
|
||||||
|
static QPoint NAME_OFFSET_REVERSE_START = QPoint(214, 1745);
|
||||||
|
|
||||||
|
BirthdayCreater::BirthdayCreater() :INameCreater()
|
||||||
|
{
|
||||||
|
label_bg_map["b"] = ":/NameCreater/resource/b.jpg";
|
||||||
|
label_bg_map["g"] = ":/NameCreater/resource/g.jpg";
|
||||||
|
label_bg_map["m"] = ":/NameCreater/resource/m.jpg";
|
||||||
|
label_bg_map["p"] = ":/NameCreater/resource/p.jpg";
|
||||||
|
label_bg_map["r"] = ":/NameCreater/resource/r.jpg";
|
||||||
|
label_bg_map["w"] = ":/NameCreater/resource/w.jpg";
|
||||||
|
label_bg_map["y"] = ":/NameCreater/resource/y.jpg";
|
||||||
|
label_bg_map["co"] = ":/NameCreater/resource/co.jpg";
|
||||||
|
label_bg_map["ol"] = ":/NameCreater/resource/ol.jpg";
|
||||||
|
label_bg_map["sn"] = ":/NameCreater/resource/sn.jpg";
|
||||||
|
label_bg_map["st"] = ":/NameCreater/resource/st.jpg";
|
||||||
|
label_bg_map["a"] = ":/NameCreater/resource/a.jpg";
|
||||||
|
label_bg_map["pg"] = ":/NameCreater/resource/pg.jpg";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
BirthdayCreater::~BirthdayCreater()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<NameInfo_t> BirthdayCreater::getNameByFileContent(Name_Type_e type, const QByteArray& conetent)
|
||||||
|
{
|
||||||
|
QList<NameInfo_t> nameList;
|
||||||
|
|
||||||
|
QTextCodec* tc = QTextCodec::codecForName("Big5");
|
||||||
|
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);
|
||||||
|
bg_type = csvList.at(1);
|
||||||
|
|
||||||
|
break;
|
||||||
|
case Name_zh_eng:
|
||||||
|
name = csvList.at(0);
|
||||||
|
eng_name = csvList.at(1);
|
||||||
|
bg_type = csvList.at(2);
|
||||||
|
|
||||||
|
break;
|
||||||
|
case Name_eng:
|
||||||
|
eng_name = csvList.at(0);
|
||||||
|
bg_type = csvList.at(1);
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
qDebug() << "row :" << row << " " << name <<", eng: "<< eng_name << ", bg_type: " << bg_type;
|
||||||
|
|
||||||
|
if (name.compare("name") == 0 || eng_name.compare("eng_name")==0) {
|
||||||
|
//pass first line
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
info.name1 = name;
|
||||||
|
info.name_eng = eng_name;
|
||||||
|
info.name2 = bg_type;
|
||||||
|
|
||||||
|
nameList.append(info);
|
||||||
|
|
||||||
|
row++;
|
||||||
|
}
|
||||||
|
return nameList;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BirthdayCreater::generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color)
|
||||||
|
{
|
||||||
|
int export_times = 0;
|
||||||
|
|
||||||
|
QList<NameInfo_t> nameList = getNameByFileContent(type, filecontent);
|
||||||
|
if (nameList.isEmpty()) {
|
||||||
|
QMessageBox msgBox;
|
||||||
|
msgBox.setText(QString("Name is empty ! ").append(filename));
|
||||||
|
msgBox.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
QGraphicsScene scene;
|
||||||
|
scene.setBackgroundBrush(QBrush(QColor(255, 255, 255)));
|
||||||
|
QGraphicsView view(&scene);
|
||||||
|
|
||||||
|
switch (type)
|
||||||
|
|
||||||
|
{
|
||||||
|
case Name_zh:
|
||||||
|
for (int idx = 0; idx < nameList.length(); idx++) {
|
||||||
|
|
||||||
|
if ((idx % MAX_LABEL_IN_PAPER) == 0) {
|
||||||
|
|
||||||
|
QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT);
|
||||||
|
bg_item->setBrush(QBrush(QColor(255, 255, 255)));
|
||||||
|
//QGraphicsPixmapItem* bg_item = QGraphicsPixmapItem(QPixmap(BG_SMAPLE_PATH));
|
||||||
|
scene.addItem(bg_item);
|
||||||
|
|
||||||
|
}
|
||||||
|
NameInfo_t name_info = nameList.at(idx);
|
||||||
|
int col_index = idx % MAX_LABEL_IN_PAPER;
|
||||||
|
QString label_rel_path = label_bg_map[name_info.name2];
|
||||||
|
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->setOpacity(1);
|
||||||
|
scene.addItem(label_item);
|
||||||
|
|
||||||
|
int chrismas_y_offset = 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) {
|
||||||
|
chrismas_y_offset = 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
int name_word_len = name_info.name1.length();
|
||||||
|
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;
|
||||||
|
|
||||||
|
for (int w = 0; w < name_word_len; w++) {
|
||||||
|
QGraphicsTextItem* word_item = new QGraphicsTextItem(name_info.name1.at(w));
|
||||||
|
word_item->setFont(font);
|
||||||
|
word_item->setDefaultTextColor(font_color);
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
scene.addItem(word_item);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((idx % MAX_LABEL_IN_PAPER) == (MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) {
|
||||||
|
QString date_str = QDateTime::currentDateTime().toString("MMddhhmm");
|
||||||
|
QString file_name = QString("Birthday_%2_%1.jpg").arg(QString::number(export_times + 1), date_str);
|
||||||
|
saveToImage(file_name, &scene);
|
||||||
|
export_times++;
|
||||||
|
|
||||||
|
scene.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Name_eng:
|
||||||
|
for (int idx = 0; idx < nameList.length(); idx++) {
|
||||||
|
|
||||||
|
if ((idx % MAX_LABEL_IN_PAPER) == 0) {
|
||||||
|
|
||||||
|
QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT);
|
||||||
|
bg_item->setBrush(QBrush(QColor(255, 255, 255)));
|
||||||
|
//QGraphicsPixmapItem* bg_item = QGraphicsPixmapItem(QPixmap(BG_SMAPLE_PATH));
|
||||||
|
scene.addItem(bg_item);
|
||||||
|
|
||||||
|
}
|
||||||
|
NameInfo_t name_info = nameList.at(idx);
|
||||||
|
int col_index = idx % MAX_LABEL_IN_PAPER;
|
||||||
|
QString label_rel_path = label_bg_map[name_info.name2];
|
||||||
|
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->setOpacity(1);
|
||||||
|
scene.addItem(label_item);
|
||||||
|
|
||||||
|
int chrismas_y_offset = 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) {
|
||||||
|
chrismas_y_offset = 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QFont _new_font = QFont(EnglisthFont());
|
||||||
|
_new_font.setWeight(QFont::ExtraLight);
|
||||||
|
int _new_size = getFontSizebyStr(_new_font, 120, 480, name_info.name_eng);
|
||||||
|
_new_font.setPixelSize(_new_size);
|
||||||
|
|
||||||
|
for(int i = 0; i < 2; i++){
|
||||||
|
qreal dir = (i == 0) ? -1.0:1.0;
|
||||||
|
qreal x_offset = (i == 0) ? 290.0 : 170.0;
|
||||||
|
qreal y_offset = (i == 0) ? 890.0 : 1550.0;
|
||||||
|
int sp_y_offset = (i == 0)? 1.0*chrismas_y_offset:-1.0*chrismas_y_offset;
|
||||||
|
//add English world
|
||||||
|
QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng);
|
||||||
|
eng_word_item->setFont(_new_font);
|
||||||
|
QRectF rect = eng_word_item->boundingRect();
|
||||||
|
eng_word_item->setDefaultTextColor(font_color);
|
||||||
|
|
||||||
|
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));
|
||||||
|
|
||||||
|
|
||||||
|
scene.addItem(eng_word_item);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ((idx % MAX_LABEL_IN_PAPER) == (MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) {
|
||||||
|
QString date_str = QDateTime::currentDateTime().toString("MMddhhmm");
|
||||||
|
QString file_name = QString("Birthday_%2_%1.jpg").arg(QString::number(export_times + 1), date_str);
|
||||||
|
saveToImage(file_name, &scene);
|
||||||
|
export_times++;
|
||||||
|
scene.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
case Name_zh_eng:
|
||||||
|
for (int idx = 0; idx < nameList.length(); idx++) {
|
||||||
|
|
||||||
|
if ((idx % MAX_LABEL_IN_PAPER) == 0) {
|
||||||
|
|
||||||
|
QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT);
|
||||||
|
bg_item->setBrush(QBrush(QColor(255, 255, 255)));
|
||||||
|
//QGraphicsPixmapItem* bg_item = QGraphicsPixmapItem(QPixmap(BG_SMAPLE_PATH));
|
||||||
|
scene.addItem(bg_item);
|
||||||
|
|
||||||
|
}
|
||||||
|
NameInfo_t name_info = nameList.at(idx);
|
||||||
|
int col_index = idx % MAX_LABEL_IN_PAPER;
|
||||||
|
QString label_rel_path = label_bg_map[name_info.name2];
|
||||||
|
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->setOpacity(1);
|
||||||
|
scene.addItem(label_item);
|
||||||
|
|
||||||
|
int chrismas_y_offset = 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) {
|
||||||
|
chrismas_y_offset = 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
// add ZH word
|
||||||
|
int name_word_len = name_info.name1.length();
|
||||||
|
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;
|
||||||
|
|
||||||
|
for (int w = 0; w < name_word_len; w++) {
|
||||||
|
QGraphicsTextItem* word_item = new QGraphicsTextItem(name_info.name1.at(w));
|
||||||
|
word_item->setFont(font);
|
||||||
|
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);
|
||||||
|
scene.addItem(word_item);
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO: add English world
|
||||||
|
QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng);
|
||||||
|
QFont _new_font = QFont(EnglisthFont());
|
||||||
|
_new_font.setWeight(QFont::ExtraLight);
|
||||||
|
int _new_size = getFontSizebyStr(_new_font, 120, 480, name_info.name_eng);
|
||||||
|
_new_font.setPixelSize(_new_size);
|
||||||
|
|
||||||
|
eng_word_item->setFont(_new_font);
|
||||||
|
QRectF rect = eng_word_item->boundingRect();
|
||||||
|
eng_word_item->setDefaultTextColor(font_color);
|
||||||
|
|
||||||
|
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);
|
||||||
|
scene.addItem(eng_word_item);
|
||||||
|
|
||||||
|
|
||||||
|
if ((idx % MAX_LABEL_IN_PAPER) == (MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) {
|
||||||
|
QString date_str = QDateTime::currentDateTime().toString("MMddhhmm");
|
||||||
|
QString file_name = QString("Birthday_%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();
|
||||||
|
|
||||||
|
}
|
||||||
19
NameCreater/BirthdayCreater.h
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "INameCreater.h"
|
||||||
|
#include <QMap>
|
||||||
|
class BirthdayCreater : public INameCreater
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
BirthdayCreater();
|
||||||
|
~BirthdayCreater();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent);
|
||||||
|
public:
|
||||||
|
virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color);
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
QMap<QString, QString> label_bg_map;
|
||||||
|
};
|
||||||
|
|
||||||
369
NameCreater/FiveToSingle.cpp
Normal file
@ -0,0 +1,369 @@
|
|||||||
|
#include "FiveToSingle.h"
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QDateTime>
|
||||||
|
#include <QTextCodec>
|
||||||
|
#include <QTextStream>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
#define BG_PATH_FORMAT ":/NameCreater/resource/background_%1.jpg"
|
||||||
|
|
||||||
|
static QPointF BG_POS[] = {
|
||||||
|
QPointF(159, 61), QPointF(482, 61), QPointF(802, 61),
|
||||||
|
QPointF(1122, 61), QPointF(1449, 61), QPointF(1772, 61),
|
||||||
|
QPointF(2095, 61), QPointF(2414, 61), QPointF(2738, 61),
|
||||||
|
QPointF(3060, 61), QPointF(900, 2094), QPointF(900, 2420),
|
||||||
|
};
|
||||||
|
|
||||||
|
static int BG_POS_COUNT = sizeof(BG_POS) / sizeof(BG_POS[0]);
|
||||||
|
|
||||||
|
|
||||||
|
static QPointF NAME_POS[] = {
|
||||||
|
QPointF(240, 430), QPointF(372, 1402),
|
||||||
|
QPointF(564, 430), QPointF(694, 1402),
|
||||||
|
QPointF(883, 430), QPointF(1014, 1402),
|
||||||
|
QPointF(1205, 430), QPointF(1337, 1402),
|
||||||
|
QPointF(1532, 430), QPointF(1663, 1402),
|
||||||
|
QPointF(1854, 430), QPointF(1987, 1402),
|
||||||
|
QPointF(2176, 430), QPointF(2309, 1402),
|
||||||
|
QPointF(2498, 430), QPointF(2629, 1402),
|
||||||
|
QPointF(2821, 430), QPointF(2952, 1402),
|
||||||
|
QPointF(3145, 430), QPointF(3276, 1402),
|
||||||
|
QPointF(1268, 2012), QPointF(2240, 1880),
|
||||||
|
QPointF(1268, 2334), QPointF(2240, 2202),
|
||||||
|
};
|
||||||
|
|
||||||
|
static QPointF NAME_POS_NUMBER[] = {
|
||||||
|
QPointF(240, 370), QPointF(372, 1442),
|
||||||
|
QPointF(564, 370), QPointF(694, 1442),
|
||||||
|
QPointF(883, 370), QPointF(1014, 1442),
|
||||||
|
QPointF(1205, 370), QPointF(1337, 1442),
|
||||||
|
QPointF(1532, 370), QPointF(1663, 1442),
|
||||||
|
QPointF(1854, 370), QPointF(1987, 1442),
|
||||||
|
QPointF(2176, 370), QPointF(2309, 1442),
|
||||||
|
QPointF(2498, 370), QPointF(2629, 1442),
|
||||||
|
QPointF(2821, 370), QPointF(2952, 1442),
|
||||||
|
QPointF(3145, 370), QPointF(3276, 1442),
|
||||||
|
QPointF(1228, 2012), QPointF(2280, 1880),
|
||||||
|
QPointF(1228, 2334), QPointF(2280, 2202),
|
||||||
|
};
|
||||||
|
|
||||||
|
static QPointF NEW_POS = QPoint(81, 320);
|
||||||
|
|
||||||
|
//static int NAME_POS_COUNT = sizeof(NAME_POS) / sizeof(NAME_POS[0]);
|
||||||
|
|
||||||
|
FiveToSingle::FiveToSingle() :INameCreater()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
FiveToSingle::~FiveToSingle()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<NameInfo_t> FiveToSingle::getNameByFileContent(Name_Type_e type, const QByteArray& conetent)
|
||||||
|
{
|
||||||
|
QList<NameInfo_t> nameList;
|
||||||
|
|
||||||
|
QTextCodec* tc = QTextCodec::codecForName("Big5");
|
||||||
|
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);
|
||||||
|
bg_type = csvList.at(1);
|
||||||
|
|
||||||
|
break;
|
||||||
|
case Name_zh_eng:
|
||||||
|
name = csvList.at(0);
|
||||||
|
eng_name = csvList.at(1);
|
||||||
|
bg_type = csvList.at(2);
|
||||||
|
|
||||||
|
break;
|
||||||
|
case Name_eng:
|
||||||
|
eng_name = csvList.at(0);
|
||||||
|
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) {
|
||||||
|
//pass first line
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
info.name1 = name;
|
||||||
|
info.name_eng = eng_name;
|
||||||
|
info.name2 = QString(BG_PATH_FORMAT).arg(bg_type);
|
||||||
|
|
||||||
|
nameList.append(info);
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
QList<NameInfo_t> nameList = getNameByFileContent(type, filecontent);
|
||||||
|
if (nameList.isEmpty()) {
|
||||||
|
QMessageBox msgBox;
|
||||||
|
msgBox.setText(QString("Name is empty ! ").append(filename));
|
||||||
|
msgBox.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
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);*/
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
QImage name_image(name_info.name2);
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QGraphicsPixmapItem* name_bgItem = new QGraphicsPixmapItem(QPixmap::fromImage(name_image));
|
||||||
|
bool rot = (idx == 10 || idx == 11);
|
||||||
|
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));
|
||||||
|
msgBox.exec();
|
||||||
|
}
|
||||||
|
QString name = name_info.name1;
|
||||||
|
int name_len = name.length();
|
||||||
|
for (int j = 0; j < 2; j++) {
|
||||||
|
int pos_idx = idx * 2 + j;
|
||||||
|
qreal xscale, yscale;
|
||||||
|
|
||||||
|
xscale = yscale = (j == 1) ? -1 : 1;
|
||||||
|
QPointF pos = name_info.is_number_bg ? NAME_POS_NUMBER[pos_idx] : NAME_POS_NUMBER[pos_idx];
|
||||||
|
qreal y_offset[2] = { 0 };
|
||||||
|
if (name_len == 2) {
|
||||||
|
if (!rot) {
|
||||||
|
pos.setY(pos.y() + 82.0 * xscale);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pos.setX(pos.x() + 82.0 * xscale);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
y_offset[0] = 25;
|
||||||
|
}
|
||||||
|
|
||||||
|
QGraphicsTextItem* textItem1 = new QGraphicsTextItem(name.mid(0, 1));
|
||||||
|
textItem1->setFont(font);
|
||||||
|
textItem1->setDefaultTextColor(font_color);
|
||||||
|
if (!rot) {
|
||||||
|
textItem1->setPos(pos);
|
||||||
|
textItem1->setTransform(QTransform::fromScale(xscale, yscale));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
textItem1->setPos(pos);
|
||||||
|
textItem1->setRotation(-90);
|
||||||
|
textItem1->setTransform(QTransform::fromScale(xscale, yscale));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
scene.addItem(textItem1);
|
||||||
|
|
||||||
|
QGraphicsTextItem* textItem2 = new QGraphicsTextItem(name.mid(1, 1));
|
||||||
|
textItem2->setFont(font);
|
||||||
|
textItem2->setDefaultTextColor(font_color);
|
||||||
|
if (!rot) {
|
||||||
|
|
||||||
|
textItem2->setPos(pos.x(), pos.y() + (145 + y_offset[0]) * xscale);
|
||||||
|
textItem2->setTransform(QTransform::fromScale(xscale, yscale));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
textItem2->setPos(pos.x() + (145 + y_offset[0]) * xscale, pos.y());
|
||||||
|
textItem2->setRotation(-90);
|
||||||
|
textItem2->setTransform(QTransform::fromScale(xscale, yscale));
|
||||||
|
}
|
||||||
|
|
||||||
|
scene.addItem(textItem2);
|
||||||
|
|
||||||
|
if (name_len > 2) {
|
||||||
|
QGraphicsTextItem* textItem3 = new QGraphicsTextItem(name.mid(2, 1));
|
||||||
|
textItem3->setFont(font);
|
||||||
|
textItem3->setDefaultTextColor(font_color);
|
||||||
|
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());
|
||||||
|
textItem3->setRotation(-90);
|
||||||
|
textItem3->setTransform(QTransform::fromScale(xscale, yscale));
|
||||||
|
}
|
||||||
|
|
||||||
|
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");
|
||||||
|
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;
|
||||||
|
case Name_zh_eng:
|
||||||
|
{
|
||||||
|
QFont _new_font = QFont(this->EnglisthFont());
|
||||||
|
_new_font.setWeight(QFont::ExtraLight);
|
||||||
|
|
||||||
|
for (int n = 0; n < nameList.length(); n++) {
|
||||||
|
int idx = n % BG_POS_COUNT;
|
||||||
|
NameInfo_t name_info = nameList.at(n);
|
||||||
|
QImage name_image(name_info.name2);
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QGraphicsPixmapItem* name_bgItem = new QGraphicsPixmapItem(QPixmap::fromImage(name_image));
|
||||||
|
bool rot = (idx == 10 || idx == 11);
|
||||||
|
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));
|
||||||
|
msgBox.exec();
|
||||||
|
}
|
||||||
|
QString name = name_info.name1;
|
||||||
|
int name_len = name.length();
|
||||||
|
for (int j = 0; j < 2; j++) {
|
||||||
|
int pos_idx = idx * 2 + j;
|
||||||
|
QPointF pos = NEW_POS;
|
||||||
|
if (j == 0) {
|
||||||
|
qreal xscale, yscale;
|
||||||
|
xscale = yscale = 1;
|
||||||
|
|
||||||
|
qreal y_offset[2] = { 0 };
|
||||||
|
if (name_len == 2) {
|
||||||
|
pos.setY(pos.y() + 82.0 * xscale);
|
||||||
|
y_offset[0] = 25;
|
||||||
|
}
|
||||||
|
|
||||||
|
QGraphicsTextItem* textItem1 = new QGraphicsTextItem(name.mid(0, 1), name_bgItem);
|
||||||
|
textItem1->setFont(font);
|
||||||
|
textItem1->setDefaultTextColor(font_color);
|
||||||
|
textItem1->setPos(pos);
|
||||||
|
textItem1->setTransform(QTransform::fromScale(xscale, yscale));
|
||||||
|
|
||||||
|
//scene.addItem(textItem1);
|
||||||
|
QGraphicsTextItem* textItem2 = new QGraphicsTextItem(name.mid(1, 1), name_bgItem);
|
||||||
|
textItem2->setFont(font);
|
||||||
|
textItem2->setDefaultTextColor(font_color);
|
||||||
|
textItem2->setPos(pos.x(), pos.y() + (145 + y_offset[0]) * xscale);
|
||||||
|
textItem2->setTransform(QTransform::fromScale(xscale, yscale));
|
||||||
|
|
||||||
|
|
||||||
|
if (name_len > 2) {
|
||||||
|
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);
|
||||||
|
textItem3->setTransform(QTransform::fromScale(xscale, yscale));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (j == 1) {
|
||||||
|
//TODO: add English world
|
||||||
|
QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng, name_bgItem);
|
||||||
|
|
||||||
|
|
||||||
|
int _new_size = getFontSizebyStr(_new_font, 120, 480, name_info.name_eng);
|
||||||
|
_new_font.setPixelSize(_new_size);
|
||||||
|
|
||||||
|
eng_word_item->setFont(_new_font);
|
||||||
|
eng_word_item->adjustSize();
|
||||||
|
|
||||||
|
QRectF rect = eng_word_item->boundingRect();
|
||||||
|
eng_word_item->setDefaultTextColor(font_color);
|
||||||
|
|
||||||
|
|
||||||
|
eng_word_item->setRotation(-90);
|
||||||
|
// the position export from web is different.
|
||||||
|
eng_word_item->setPos((name_bgItem->boundingRect().width()/2 - rect.height()/2)+20, 1230 + rect.width() / 2);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
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();
|
||||||
|
|
||||||
|
}
|
||||||
15
NameCreater/FiveToSingle.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "INameCreater.h"
|
||||||
|
class FiveToSingle : public INameCreater
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
FiveToSingle();
|
||||||
|
~FiveToSingle();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent);
|
||||||
|
public:
|
||||||
|
virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
313
NameCreater/HKHolderCreater.cpp
Normal file
@ -0,0 +1,313 @@
|
|||||||
|
#include "HKHolderCreater.h"
|
||||||
|
#include <QTextCodec>
|
||||||
|
#include <QTextStream>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QDateTime>
|
||||||
|
#include <QGraphicsPixmapItem>
|
||||||
|
|
||||||
|
#define HK_BG_WIDTH 2482
|
||||||
|
#define HK_BG_HEIGH 3509
|
||||||
|
|
||||||
|
#define MAX_COL_IN_ROW 7
|
||||||
|
#define MAX_LABEL_IN_PAPER 14
|
||||||
|
|
||||||
|
#define NAME_TWO_WORD_OFFSET 90.0
|
||||||
|
#define NAME_THREE_WORD_OFFSET 82.0
|
||||||
|
|
||||||
|
#define NAME_TWO_EXT_Y 20.0
|
||||||
|
#define NAME_TWO_EXT_REV_Y 23.0
|
||||||
|
|
||||||
|
static qreal row_x_offset = 132;
|
||||||
|
static qreal row_x_gap = 320;
|
||||||
|
static qreal row_y_offset[] = { 105 , 1615 };
|
||||||
|
|
||||||
|
static QPoint NAME_OFFSET_START = QPoint(92, 413);
|
||||||
|
static QPoint NAME_OFFSET_REVERSE_START = QPoint(179, 1030);
|
||||||
|
|
||||||
|
HKHolderCreater::HKHolderCreater() : INameCreater()
|
||||||
|
{
|
||||||
|
label_bg_map["a"] = ":/NameCreater/resource/hk_holder/a.jpg";
|
||||||
|
label_bg_map["b"] = ":/NameCreater/resource/hk_holder/b.jpg";
|
||||||
|
label_bg_map["m"] = ":/NameCreater/resource/hk_holder/m.jpg";
|
||||||
|
label_bg_map["g"] = ":/NameCreater/resource/hk_holder/g.jpg";
|
||||||
|
label_bg_map["st"] = ":/NameCreater/resource/hk_holder/st.jpg";
|
||||||
|
label_bg_map["w"] = ":/NameCreater/resource/hk_holder/w.jpg";
|
||||||
|
label_bg_map["p"] = ":/NameCreater/resource/hk_holder/p.jpg";
|
||||||
|
label_bg_map["pg"] = ":/NameCreater/resource/hk_holder/pg.jpg";
|
||||||
|
label_bg_map["r"] = ":/NameCreater/resource/hk_holder/r.jpg";
|
||||||
|
label_bg_map["y"] = ":/NameCreater/resource/hk_holder/y.jpg";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
HKHolderCreater::~HKHolderCreater()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<NameInfo_t> HKHolderCreater::getNameByFileContent(Name_Type_e type, const QByteArray& conetent)
|
||||||
|
{
|
||||||
|
QList<NameInfo_t> nameList;
|
||||||
|
QTextCodec* tc = QTextCodec::codecForName("Big5");
|
||||||
|
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);
|
||||||
|
bg_type = csvList.at(1);
|
||||||
|
|
||||||
|
break;
|
||||||
|
case Name_zh_eng:
|
||||||
|
/*name = csvList.at(0);
|
||||||
|
eng_name = csvList.at(1);
|
||||||
|
bg_type = csvList.at(2);*/
|
||||||
|
|
||||||
|
break;
|
||||||
|
case Name_eng:
|
||||||
|
//eng_name = csvList.at(0);
|
||||||
|
//bg_type = csvList.at(1);
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
qDebug() << "row :" << row << " " << name << ", eng: " << eng_name << ", bg_type: " << bg_type;
|
||||||
|
|
||||||
|
if (name.compare("name") == 0 || eng_name.compare("eng_name") == 0) {
|
||||||
|
//pass first line
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
info.name1 = name;
|
||||||
|
info.name_eng = eng_name;
|
||||||
|
info.name2 = bg_type;
|
||||||
|
|
||||||
|
nameList.append(info);
|
||||||
|
|
||||||
|
row++;
|
||||||
|
}
|
||||||
|
return nameList;
|
||||||
|
}
|
||||||
|
|
||||||
|
void HKHolderCreater::generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color)
|
||||||
|
{
|
||||||
|
int export_times = 0;
|
||||||
|
|
||||||
|
|
||||||
|
QList<NameInfo_t> nameList = getNameByFileContent(type, filecontent);
|
||||||
|
if (nameList.isEmpty()) {
|
||||||
|
QMessageBox msgBox;
|
||||||
|
msgBox.setText(QString("Name is empty ! ").append(filename));
|
||||||
|
msgBox.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
QGraphicsScene scene;
|
||||||
|
scene.setBackgroundBrush(QBrush(QColor(255, 255, 255)));
|
||||||
|
QGraphicsView view(&scene);
|
||||||
|
|
||||||
|
switch (type)
|
||||||
|
|
||||||
|
{
|
||||||
|
case Name_zh:
|
||||||
|
for (int idx = 0; idx < nameList.length(); idx++) {
|
||||||
|
|
||||||
|
if ((idx % MAX_LABEL_IN_PAPER) == 0) {
|
||||||
|
|
||||||
|
QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, HK_BG_WIDTH, HK_BG_HEIGH);
|
||||||
|
bg_item->setBrush(QBrush(QColor(255, 255, 255)));
|
||||||
|
//QGraphicsPixmapItem* bg_item = new QGraphicsPixmapItem(QPixmap(":/NameCreater/resource/hk_holder/sample.jpg"));
|
||||||
|
scene.addItem(bg_item);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int re_idx, row_idx, col_idx;
|
||||||
|
re_idx = idx % MAX_LABEL_IN_PAPER;
|
||||||
|
row_idx = re_idx / MAX_COL_IN_ROW;
|
||||||
|
col_idx = re_idx % MAX_COL_IN_ROW;
|
||||||
|
|
||||||
|
NameInfo_t name_info = nameList.at(idx);
|
||||||
|
QString label_rel_path = label_bg_map[name_info.name2];
|
||||||
|
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->setOpacity(0.5);
|
||||||
|
scene.addItem(label_item);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
int name_word_len = name_info.name1.length();
|
||||||
|
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 offset_y = (name_word_len == 2) ? NAME_TWO_WORD_OFFSET : NAME_THREE_WORD_OFFSET;
|
||||||
|
|
||||||
|
for (int w = 0; w < name_word_len; w++) {
|
||||||
|
QGraphicsTextItem* word_item = new QGraphicsTextItem(name_info.name1.at(w));
|
||||||
|
word_item->setFont(font);
|
||||||
|
word_item->setDefaultTextColor(font_color);
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
scene.addItem(word_item);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((idx % MAX_LABEL_IN_PAPER) == (MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) {
|
||||||
|
QString date_str = QDateTime::currentDateTime().toString("MMddhhmm");
|
||||||
|
QString file_name = QString("HK_%2_%1.jpg").arg(QString::number(export_times + 1), date_str);
|
||||||
|
saveToImage(file_name, &scene);
|
||||||
|
export_times++;
|
||||||
|
|
||||||
|
scene.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
/*
|
||||||
|
case Name_eng:
|
||||||
|
for (int idx = 0; idx < nameList.length(); idx++) {
|
||||||
|
|
||||||
|
if ((idx % MAX_LABEL_IN_PAPER) == 0) {
|
||||||
|
|
||||||
|
QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT);
|
||||||
|
bg_item->setBrush(QBrush(QColor(255, 255, 255)));
|
||||||
|
//QGraphicsPixmapItem* bg_item = QGraphicsPixmapItem(QPixmap(BG_SMAPLE_PATH));
|
||||||
|
scene.addItem(bg_item);
|
||||||
|
|
||||||
|
}
|
||||||
|
NameInfo_t name_info = nameList.at(idx);
|
||||||
|
int col_index = idx % MAX_LABEL_IN_PAPER;
|
||||||
|
QString label_rel_path = label_bg_map[name_info.name2];
|
||||||
|
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->setOpacity(1);
|
||||||
|
scene.addItem(label_item);
|
||||||
|
|
||||||
|
int chrismas_y_offset = 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) {
|
||||||
|
chrismas_y_offset = 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QFont _new_font = QFont(EnglisthFont());
|
||||||
|
_new_font.setWeight(QFont::ExtraLight);
|
||||||
|
int _new_size = getFontSizebyStr(_new_font, 120, 480, name_info.name_eng);
|
||||||
|
_new_font.setPixelSize(_new_size);
|
||||||
|
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
qreal dir = (i == 0) ? -1.0 : 1.0;
|
||||||
|
qreal x_offset = (i == 0) ? 290.0 : 170.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;
|
||||||
|
//add English world
|
||||||
|
QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng);
|
||||||
|
eng_word_item->setFont(_new_font);
|
||||||
|
QRectF rect = eng_word_item->boundingRect();
|
||||||
|
eng_word_item->setDefaultTextColor(font_color);
|
||||||
|
|
||||||
|
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));
|
||||||
|
scene.addItem(eng_word_item);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ((idx % MAX_LABEL_IN_PAPER) == (MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) {
|
||||||
|
QString date_str = QDateTime::currentDateTime().toString("MMddhhmm");
|
||||||
|
QString file_name = QString("Birthday_%2_%1.jpg").arg(QString::number(export_times + 1), date_str);
|
||||||
|
saveToImage(file_name, &scene);
|
||||||
|
export_times++;
|
||||||
|
scene.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
case Name_zh_eng:
|
||||||
|
for (int idx = 0; idx < nameList.length(); idx++) {
|
||||||
|
|
||||||
|
if ((idx % MAX_LABEL_IN_PAPER) == 0) {
|
||||||
|
|
||||||
|
QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT);
|
||||||
|
bg_item->setBrush(QBrush(QColor(255, 255, 255)));
|
||||||
|
//QGraphicsPixmapItem* bg_item = QGraphicsPixmapItem(QPixmap(BG_SMAPLE_PATH));
|
||||||
|
scene.addItem(bg_item);
|
||||||
|
|
||||||
|
}
|
||||||
|
NameInfo_t name_info = nameList.at(idx);
|
||||||
|
int col_index = idx % MAX_LABEL_IN_PAPER;
|
||||||
|
QString label_rel_path = label_bg_map[name_info.name2];
|
||||||
|
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->setOpacity(1);
|
||||||
|
scene.addItem(label_item);
|
||||||
|
|
||||||
|
int chrismas_y_offset = 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) {
|
||||||
|
chrismas_y_offset = 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
// add ZH word
|
||||||
|
int name_word_len = name_info.name1.length();
|
||||||
|
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;
|
||||||
|
|
||||||
|
for (int w = 0; w < name_word_len; w++) {
|
||||||
|
QGraphicsTextItem* word_item = new QGraphicsTextItem(name_info.name1.at(w));
|
||||||
|
word_item->setFont(font);
|
||||||
|
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);
|
||||||
|
scene.addItem(word_item);
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO: add English world
|
||||||
|
QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng);
|
||||||
|
QFont _new_font = QFont(EnglisthFont());
|
||||||
|
_new_font.setWeight(QFont::ExtraLight);
|
||||||
|
int _new_size = getFontSizebyStr(_new_font, 120, 480, name_info.name_eng);
|
||||||
|
_new_font.setPixelSize(_new_size);
|
||||||
|
|
||||||
|
eng_word_item->setFont(_new_font);
|
||||||
|
QRectF rect = eng_word_item->boundingRect();
|
||||||
|
eng_word_item->setDefaultTextColor(font_color);
|
||||||
|
|
||||||
|
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);
|
||||||
|
scene.addItem(eng_word_item);
|
||||||
|
|
||||||
|
|
||||||
|
if ((idx % MAX_LABEL_IN_PAPER) == (MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) {
|
||||||
|
QString date_str = QDateTime::currentDateTime().toString("MMddhhmm");
|
||||||
|
QString file_name = QString("Birthday_%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();
|
||||||
|
}
|
||||||
20
NameCreater/HKHolderCreater.h
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "INameCreater.h"
|
||||||
|
#include <QMap>
|
||||||
|
class HKHolderCreater :
|
||||||
|
public INameCreater
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
HKHolderCreater();
|
||||||
|
~HKHolderCreater();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent);
|
||||||
|
public:
|
||||||
|
virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QMap<QString, QString> label_bg_map;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
170
NameCreater/INameCreater.cpp
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
#include "INameCreater.h"
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QDateTime>
|
||||||
|
#include <QBuffer>
|
||||||
|
#include <QFileDialog>
|
||||||
|
#include <QTextCodec>
|
||||||
|
#include <QTextStream>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QRegularExpression>
|
||||||
|
|
||||||
|
#define BG_PATH_FORMAT ":/NameCreater/resource/background_%1.jpg"
|
||||||
|
|
||||||
|
INameCreater::INameCreater()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
INameCreater::~INameCreater()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void INameCreater::saveToImage(const QString& filename, QGraphicsScene* scene)
|
||||||
|
{
|
||||||
|
scene->clearSelection(); // Selections would also render to the file
|
||||||
|
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
|
||||||
|
image.fill(Qt::transparent); // Start all pixels transparent
|
||||||
|
int dpm = 300 / 0.0254; // ~300 DPI
|
||||||
|
image.setDotsPerMeterX(dpm);
|
||||||
|
image.setDotsPerMeterY(dpm);
|
||||||
|
|
||||||
|
|
||||||
|
QPainter painter(&image);
|
||||||
|
scene->render(&painter);
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
QString folder_name = QCoreApplication::applicationDirPath() + "/../../../export_" + QDateTime::currentDateTime().toString("yyyyMMdd");
|
||||||
|
#else
|
||||||
|
QString folder_name = QCoreApplication::applicationDirPath() + "/export_" + QDateTime::currentDateTime().toString("yyyyMMdd");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
image.save(filename, "JPEG");
|
||||||
|
|
||||||
|
QByteArray imageData;
|
||||||
|
QBuffer buffer(&imageData);
|
||||||
|
buffer.open(QIODevice::WriteOnly);
|
||||||
|
QPixmap pixmap = QPixmap::fromImage(image);
|
||||||
|
pixmap.save(&buffer, "JPEG", 100); // You can also use other formats like "JPEG" or "BMP"
|
||||||
|
|
||||||
|
QFileDialog::saveFileContent(imageData, filename);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<NameInfo_t> INameCreater::getNameByFile(Name_Type_e type, const QString& filename)
|
||||||
|
{
|
||||||
|
QList<NameInfo_t> nameList;
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
QString root_path = QCoreApplication::applicationDirPath() + "/../../../";
|
||||||
|
#else
|
||||||
|
QString root_path = "";//QCoreApplication::applicationDirPath() + "/";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
QFile file(filename);
|
||||||
|
|
||||||
|
if (!file.open(QIODevice::ReadOnly)) {
|
||||||
|
QMessageBox msgBox;
|
||||||
|
msgBox.setText(QString("Load file failed!").append(filename));
|
||||||
|
msgBox.exec();
|
||||||
|
file.close();
|
||||||
|
return nameList;
|
||||||
|
}
|
||||||
|
|
||||||
|
int row = 0;
|
||||||
|
QTextCodec* tc = QTextCodec::codecForName("Big5");
|
||||||
|
while (!file.atEnd())
|
||||||
|
{
|
||||||
|
NameInfo_t info;
|
||||||
|
QByteArray line = file.readLine();
|
||||||
|
|
||||||
|
QString name_tc = tc->toUnicode(line);
|
||||||
|
QStringList csvList = name_tc.split(',');
|
||||||
|
|
||||||
|
|
||||||
|
QString name1 = csvList.at(0);
|
||||||
|
QString type_str = csvList.last();//QString::fromLocal8Bit(csvList.last());
|
||||||
|
qDebug() << "row :" << row << " " << name1;
|
||||||
|
|
||||||
|
type_str = type_str.remove(QRegularExpression("\r"));
|
||||||
|
type_str = type_str.remove(QRegularExpression("\n"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (name1.compare("name_1") == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
info.name1 = name1;
|
||||||
|
info.bg_path = QString(BG_PATH_FORMAT).arg(type_str);
|
||||||
|
info.is_number_bg = type_str[0].isDigit();
|
||||||
|
|
||||||
|
nameList.append(info);
|
||||||
|
|
||||||
|
row++;
|
||||||
|
}
|
||||||
|
file.close();
|
||||||
|
return nameList;
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<NameInfo_t> INameCreater::getNameByFileContent(Name_Type_e type, const QByteArray& conetent)
|
||||||
|
{
|
||||||
|
(void)type;
|
||||||
|
QList<NameInfo_t> nameList;
|
||||||
|
QTextCodec* tc = QTextCodec::codecForName("Big5");
|
||||||
|
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 name1 = csvList.at(0);
|
||||||
|
QString type_str = csvList.last();//QString::fromLocal8Bit(csvList.last());
|
||||||
|
qDebug() << "row :" << row << " " << name1;
|
||||||
|
|
||||||
|
type_str = type_str.remove(QRegularExpression("\r"));
|
||||||
|
type_str = type_str.remove(QRegularExpression("\n"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (name1.compare("name_1") == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
info.name1 = name1;
|
||||||
|
info.bg_path = QString(BG_PATH_FORMAT).arg(type_str);
|
||||||
|
info.is_number_bg = type_str[0].isDigit();
|
||||||
|
|
||||||
|
nameList.append(info);
|
||||||
|
|
||||||
|
row++;
|
||||||
|
}
|
||||||
|
return nameList;
|
||||||
|
}
|
||||||
|
|
||||||
|
void INameCreater::generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
int INameCreater::getFontSizebyStr(const QFont& font, int max_font_size,int max_label_width, const QString& str)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
49
NameCreater/INameCreater.h
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <QObject>
|
||||||
|
#include <QGraphicsScene>
|
||||||
|
#include <QGraphicsView>
|
||||||
|
#include <QGraphicsRectItem>
|
||||||
|
|
||||||
|
#define BG_WIDTH 3508
|
||||||
|
#define BG_HEIGHT 2481
|
||||||
|
|
||||||
|
struct NameInfo_t {
|
||||||
|
QString name1;
|
||||||
|
QString name2;
|
||||||
|
QString name_eng;
|
||||||
|
QString bg_path;
|
||||||
|
bool is_number_bg;
|
||||||
|
int bg_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum Name_Type_e {
|
||||||
|
Name_zh = 0,
|
||||||
|
Name_eng,
|
||||||
|
Name_zh_eng
|
||||||
|
};
|
||||||
|
|
||||||
|
class INameCreater : public QObject {
|
||||||
|
public:
|
||||||
|
INameCreater();
|
||||||
|
~INameCreater();
|
||||||
|
|
||||||
|
void setEnglishFont(const QFont& font) {
|
||||||
|
eng_Font = QFont(font);
|
||||||
|
}
|
||||||
|
|
||||||
|
QFont EnglisthFont() const {
|
||||||
|
return eng_Font;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void saveToImage(const QString& filename, QGraphicsScene* scene);
|
||||||
|
QList<NameInfo_t> getNameByFile(Name_Type_e type, const QString& filename);
|
||||||
|
QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent);
|
||||||
|
|
||||||
|
virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color);
|
||||||
|
int getFontSizebyStr(const QFont& font, int max_font_size, int max_label_width, const QString& str);
|
||||||
|
private:
|
||||||
|
|
||||||
|
QFont eng_Font;
|
||||||
|
|
||||||
|
};
|
||||||
@ -1,12 +1,188 @@
|
|||||||
#include "NameCreater.h"
|
#include "def.h"
|
||||||
#include <QDebug>
|
#include "NameCreater.h"
|
||||||
|
#include <QDebug>
|
||||||
NameCreater::NameCreater(QWidget *parent)
|
#include <QFileDialog>
|
||||||
: QMainWindow(parent)
|
#include <QMessageBox>
|
||||||
{
|
#include <QFontDatabase>
|
||||||
ui.setupUi(this);
|
#include <QTextCodec>
|
||||||
|
#include <QGraphicsScene>
|
||||||
|
#include <QGraphicsView>
|
||||||
qDebug() << ui.label->font().family();
|
#include <QGraphicsPixmapItem>
|
||||||
|
#include <QDateTime>
|
||||||
}
|
#include <QBuffer>
|
||||||
|
#include <QRegularExpression>
|
||||||
|
|
||||||
|
#include "FiveToSingle.h"
|
||||||
|
#include "BirthdayCreater.h"
|
||||||
|
#include "TowelCreater.h"
|
||||||
|
#include "NewFiveCreater.h"
|
||||||
|
#include "HKHolderCreater.h"
|
||||||
|
#include "customlogo.h"
|
||||||
|
|
||||||
|
#define TOWEL_FONT_PATH ":/NameCreater/_exp/W1.ttc"
|
||||||
|
#define ENGLISH_FONT_PATH ":/NameCreater/_exp/FontsFree-Net-Acumin-Pro-Semibold.ttf"
|
||||||
|
|
||||||
|
#define FONT_SIZE 120
|
||||||
|
|
||||||
|
#define FONT_CHT_URL "https://bazaar1688.ddns.net/font/TaiwanPearl-SemiBold.ttf"
|
||||||
|
|
||||||
|
//#define FONT_CHT_URL "http://45.32.51.135/font/TaiwanPearl-SemiBold.ttf"
|
||||||
|
|
||||||
|
NameCreater::NameCreater(QWidget *parent)
|
||||||
|
: QMainWindow(parent)
|
||||||
|
{
|
||||||
|
ui.setupUi(this);
|
||||||
|
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);
|
||||||
|
connect(ui.towel_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
|
||||||
|
connect(ui.fivenew_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
|
||||||
|
connect(ui.birthday_zh_eng_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
|
||||||
|
connect(ui.birthday_eng_eng_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
|
||||||
|
connect(ui.handkerchief_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
|
||||||
|
connect(ui.fivesingle_zh_eng_btn, &QPushButton::released, this, &NameCreater::OnClickedReadBtn);
|
||||||
|
connect(ui.customlogo_btn, &QPushButton::released, this , &NameCreater::OnClickedCustomLogoBtn);
|
||||||
|
|
||||||
|
|
||||||
|
//qDebug()<<"QSslSocket="<<QSslSocket::sslLibraryBuildVersionString();
|
||||||
|
|
||||||
|
connect(&network_mgr, &QNetworkAccessManager::finished, this, &NameCreater::onFontDownloadFinished);
|
||||||
|
network_mgr.get(QNetworkRequest(QUrl(FONT_CHT_URL)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void NameCreater::loadFont(const QByteArray& fontdata){
|
||||||
|
|
||||||
|
int id = QFontDatabase::addApplicationFontFromData(fontdata);
|
||||||
|
QStringList family_list = QFontDatabase::applicationFontFamilies(id);
|
||||||
|
qDebug()<<"font family list:" <<family_list;
|
||||||
|
QString cht_fontname = family_list.at(0);
|
||||||
|
|
||||||
|
font = QFont(cht_fontname);
|
||||||
|
font.setPixelSize(FONT_SIZE);
|
||||||
|
|
||||||
|
QString font_path = QString(TOWEL_FONT_PATH);
|
||||||
|
QFile font_res_towel(font_path);
|
||||||
|
if (!font_res_towel.open(QIODevice::ReadOnly)) {
|
||||||
|
QMessageBox msgBox;
|
||||||
|
msgBox.setText("Can not load font file!" + font_path);
|
||||||
|
msgBox.exec();
|
||||||
|
font_res_towel.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
QList<QLabel*> titals = findChildren<QLabel*>(QRegularExpression("tital_label"));
|
||||||
|
foreach(auto tital, titals) {
|
||||||
|
tital->setFont(tital_font);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
QFileDialog::getOpenFileContent("CSV (*.csv)", fileContentReady);
|
||||||
|
}
|
||||||
|
|
||||||
|
void NameCreater::OnClickedCustomLogoBtn() {
|
||||||
|
QEventLoop loop;
|
||||||
|
CustomLogo widget(&this->font);
|
||||||
|
widget.show();
|
||||||
|
connect(&widget, &CustomLogo::finished, &loop, &QEventLoop::quit);
|
||||||
|
loop.exec();
|
||||||
|
qDebug()<<"exit event loop";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void NameCreater::onFontDownloadFinished(QNetworkReply *reply){
|
||||||
|
|
||||||
|
if(reply->error() == QNetworkReply::NoError){
|
||||||
|
//do somthine
|
||||||
|
loadFont(reply->readAll());
|
||||||
|
qDebug()<<"Load Font Succeed!";
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
QMessageBox msgBox;
|
||||||
|
msgBox.setText("Can not load font file!" + reply->errorString());
|
||||||
|
msgBox.exec();
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
|
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@ -1,15 +1,30 @@
|
|||||||
#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:
|
class NameCreater : public QMainWindow
|
||||||
NameCreater(QWidget *parent = Q_NULLPTR);
|
{
|
||||||
|
Q_OBJECT
|
||||||
private:
|
|
||||||
Ui::NameCreaterClass ui;
|
public:
|
||||||
};
|
NameCreater(QWidget *parent = Q_NULLPTR);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::NameCreaterClass ui;
|
||||||
|
QFont font, font_towel, font_english;
|
||||||
|
|
||||||
|
QColor font_color;
|
||||||
|
|
||||||
|
QNetworkAccessManager network_mgr;
|
||||||
|
void loadFont(const QByteArray& fontdata);
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void OnClickedReadBtn();
|
||||||
|
void OnClickedCustomLogoBtn();
|
||||||
|
void onFontDownloadFinished(QNetworkReply *reply);
|
||||||
|
};
|
||||||
|
|||||||
@ -1,14 +1,33 @@
|
|||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
# 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 += ./NameCreater.h
|
HEADERS += ./resource.h \
|
||||||
SOURCES += ./NameCreater.cpp \
|
$$PWD/def.h \
|
||||||
./main.cpp
|
./NameCreater.h \
|
||||||
FORMS += ./NameCreater.ui
|
./BirthdayCreater.h \
|
||||||
RESOURCES += ./NameCreater.qrc
|
./FiveToSingle.h \
|
||||||
|
./INameCreater.h \
|
||||||
|
./OldFiveCreater.h \
|
||||||
|
./TowelCreater.h \
|
||||||
|
./NewFiveCreater.h \
|
||||||
|
./HKHolderCreater.h \
|
||||||
|
./customlogo.h
|
||||||
|
SOURCES += ./NameCreater.cpp \
|
||||||
|
./main.cpp \
|
||||||
|
./BirthdayCreater.cpp \
|
||||||
|
./OldFiveCreater.cpp \
|
||||||
|
./FiveToSingle.cpp \
|
||||||
|
./INameCreater.cpp \
|
||||||
|
./TowelCreater.cpp \
|
||||||
|
./NewFiveCreater.cpp \
|
||||||
|
./HKHolderCreater.cpp \
|
||||||
|
./customlogo.cpp
|
||||||
|
FORMS += ./NameCreater.ui \
|
||||||
|
./customlogo.ui
|
||||||
|
RESOURCES += NameCreater.qrc
|
||||||
|
|||||||
@ -1,21 +1,24 @@
|
|||||||
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
|
||||||
CONFIG += c++11
|
|
||||||
|
CONFIG += c++11 resources_big
|
||||||
# You can make your code fail to compile if it uses deprecated APIs.
|
|
||||||
# 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
|
# You can make your code fail to compile if it uses deprecated APIs.
|
||||||
|
# In order to do so, uncomment the following line.
|
||||||
include(NameCreater.pri)
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
|
include(NameCreater.pri)
|
||||||
# Default rules for deployment.
|
|
||||||
qnx: target.path = /tmp/$${TARGET}/bin
|
|
||||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
# Default rules for deployment.
|
||||||
!isEmpty(target.path): INSTALLS += target
|
qnx: target.path = /tmp/$${TARGET}/bin
|
||||||
|
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||||
|
!isEmpty(target.path): INSTALLS += target
|
||||||
|
|
||||||
|
|
||||||
|
QMAKE_LFLAGS+= -s TOTAL_MEMORY=67108864
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 6.0.2, 2022-02-16T21:45:54. -->
|
<!-- Written by QtCreator 7.0.2, 2024-07-04T13:39:25. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
<value type="QByteArray">{8bb291bd-a051-421c-ae4a-e741fd4db4a3}</value>
|
<value type="QByteArray">{4a5c8cc9-7483-402d-a0a2-3701e5257fd0}</value>
|
||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
@ -70,14 +70,16 @@
|
|||||||
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
||||||
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
||||||
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
||||||
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey"/>
|
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey">
|
||||||
|
<value type="QString">-fno-delayed-template-parsing</value>
|
||||||
|
</valuelist>
|
||||||
<value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
|
<value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
|
||||||
<value type="QString" key="ClangCodeModel.WarningConfigId">Builtin.BuildSystem</value>
|
<value type="QString" key="ClangCodeModel.WarningConfigId">Builtin.BuildSystem</value>
|
||||||
<valuemap type="QVariantMap" key="ClangTools">
|
<valuemap type="QVariantMap" key="ClangTools">
|
||||||
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||||
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||||
<value type="int" key="ClangTools.ParallelJobs">2</value>
|
<value type="int" key="ClangTools.ParallelJobs">4</value>
|
||||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||||
@ -88,17 +90,17 @@
|
|||||||
<data>
|
<data>
|
||||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||||
<valuemap type="QVariantMap">
|
<valuemap type="QVariantMap">
|
||||||
<value type="QString" key="DeviceType">Desktop</value>
|
<value type="QString" key="DeviceType">WebAssemblyDeviceType</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.15.2 clang 64bit</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 5.15.2 WebAssembly</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.2 clang 64bit</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 5.15.2 WebAssembly</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5152.clang_64_kit</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.ActiveBuildConfiguration">0</value>
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">-1</value>
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
<value type="int" key="EnableQmlDebugging">0</value>
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/shouchih_chen/Documents/namecreater/build-NameCreater-Desktop_Qt_5_15_2_clang_64bit-Debug</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\_develop\_project\NameCreater\build-NameCreater-Qt_5_15_2_WebAssembly-Debug</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Users/shouchih_chen/Documents/namecreater/build-NameCreater-Desktop_Qt_5_15_2_clang_64bit-Debug</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/_develop/_project/NameCreater/build-NameCreater-Qt_5_15_2_WebAssembly-Debug</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
@ -136,8 +138,8 @@
|
|||||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/shouchih_chen/Documents/namecreater/build-NameCreater-Desktop_Qt_5_15_2_clang_64bit-Release</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\_develop\_project\NameCreater\build-NameCreater-Qt_5_15_2_WebAssembly-Release</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Users/shouchih_chen/Documents/namecreater/build-NameCreater-Desktop_Qt_5_15_2_clang_64bit-Release</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/_develop/_project/NameCreater/build-NameCreater-Qt_5_15_2_WebAssembly-Release</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
@ -177,8 +179,159 @@
|
|||||||
</valuemap>
|
</valuemap>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||||
<value type="int" key="EnableQmlDebugging">0</value>
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/shouchih_chen/Documents/namecreater/build-NameCreater-Desktop_Qt_5_15_2_clang_64bit-Profile</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\_develop\_project\NameCreater\build-NameCreater-Qt_5_15_2_WebAssembly-Profile</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Users/shouchih_chen/Documents/namecreater/build-NameCreater-Desktop_Qt_5_15_2_clang_64bit-Profile</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/_develop/_project/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.EmrunD:/_develop/_project/NameCreater/NameCreater/NameCreater.pro</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">D:/_develop/_project/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">chrome</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 MSVC2019 64bit</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.2 MSVC2019 64bit</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5152.win64_msvc2019_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">D:\_develop\_project\NameCreater\build-NameCreater-Desktop_Qt_5_15_2_MSVC2019_64bit-Debug</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/_develop/_project/NameCreater/build-NameCreater-Desktop_Qt_5_15_2_MSVC2019_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">D:\_develop\_project\NameCreater\build-NameCreater-Desktop_Qt_5_15_2_MSVC2019_64bit-Release</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/_develop/_project/NameCreater/build-NameCreater-Desktop_Qt_5_15_2_MSVC2019_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">D:\_develop\_project\NameCreater\build-NameCreater-Desktop_Qt_5_15_2_MSVC2019_64bit-Profile</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/_develop/_project/NameCreater/build-NameCreater-Desktop_Qt_5_15_2_MSVC2019_64bit-Profile</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
@ -238,21 +391,21 @@
|
|||||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/Users/shouchih_chen/Documents/namecreater/NameCreater/NameCreater.pro</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/_develop/_project/NameCreater/NameCreater/NameCreater.pro</value>
|
||||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/Users/shouchih_chen/Documents/namecreater/NameCreater/NameCreater.pro</value>
|
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">D:/_develop/_project/NameCreater/NameCreater/NameCreater.pro</value>
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/Users/shouchih_chen/Documents/namecreater/build-NameCreater-Desktop_Qt_5_15_2_clang_64bit-Debug/NameCreater.app/Contents/MacOS</value>
|
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/_develop/_project/NameCreater/build-NameCreater-Desktop_Qt_5_15_2_MSVC2019_64bit-Debug</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||||
<value type="qlonglong">1</value>
|
<value type="qlonglong">2</value>
|
||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||||
|
|||||||
417
NameCreater/NameCreater.pro.user.b811b07
Normal file
@ -0,0 +1,417 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE QtCreatorProject>
|
||||||
|
<!-- Written by QtCreator 10.0.1, 2023-05-24T20:05:08. -->
|
||||||
|
<qtcreator>
|
||||||
|
<data>
|
||||||
|
<variable>EnvironmentId</variable>
|
||||||
|
<value type="QByteArray">{b811b073-5bd9-459e-9aa0-418d2f1f6d39}</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
|
<value type="qlonglong">1</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||||
|
<value type="QString" key="language">Cpp</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||||
|
<value type="QString" key="language">QmlJS</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||||
|
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||||
|
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
|
||||||
|
<value type="bool" key="AutoTest.Framework.Boost">true</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.CTest">false</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.Catch">true</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.GTest">true</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
||||||
|
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
||||||
|
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
||||||
|
<valuemap type="QVariantMap" key="ClangTools">
|
||||||
|
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||||
|
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||||
|
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||||
|
<value type="int" key="ClangTools.ParallelJobs">4</value>
|
||||||
|
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||||
|
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||||
|
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||||
|
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="CppEditor.QuickFix">
|
||||||
|
<value type="bool" key="UseGlobalSettings">true</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="QString" key="DeviceType">WebAssemblyDeviceType</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 5.15.2 WebAssembly</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 5.15.2 WebAssembly</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5152.wasm_32_kit</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">-1</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/shouchih/qt_ws/namecreater/build-NameCreater-Qt_5_15_2_WebAssembly-Debug</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/shouchih/qt_ws/namecreater/build-NameCreater-Qt_5_15_2_WebAssembly-Debug</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/shouchih/qt_ws/namecreater/build-NameCreater-Qt_5_15_2_WebAssembly-Release</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/shouchih/qt_ws/namecreater/build-NameCreater-Qt_5_15_2_WebAssembly-Release</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
|
<value type="int" key="QtQuickCompiler">0</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||||
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/shouchih/qt_ws/namecreater/build-NameCreater-Qt_5_15_2_WebAssembly-Profile</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/shouchih/qt_ws/namecreater/build-NameCreater-Qt_5_15_2_WebAssembly-Profile</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
|
<value type="int" key="QtQuickCompiler">0</value>
|
||||||
|
<value type="int" key="SeparateDebugInfo">0</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">0</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||||
|
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||||
|
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||||
|
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">NameCreater</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">WebAssembly.RunConfiguration.Emrun/home/shouchih/qt_ws/namecreater/NameCreater/NameCreater.pro</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/home/shouchih/qt_ws/namecreater/NameCreater/NameCreater.pro</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
|
<value type="QString" key="WASM.WebBrowserSelectionAspect.Browser">firefox</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Target.1</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="QString" key="DeviceType">Desktop</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.15.2 GCC 64bit</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.2 GCC 64bit</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5152.gcc_64_kit</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/shouchih/qt_ws/namecreater/build-NameCreater-Desktop_Qt_5_15_2_GCC_64bit-Debug</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/shouchih/qt_ws/namecreater/build-NameCreater-Desktop_Qt_5_15_2_GCC_64bit-Debug</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/shouchih/qt_ws/namecreater/build-NameCreater-Desktop_Qt_5_15_2_GCC_64bit-Release</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/shouchih/qt_ws/namecreater/build-NameCreater-Desktop_Qt_5_15_2_GCC_64bit-Release</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
|
<value type="int" key="QtQuickCompiler">0</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||||
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/shouchih/qt_ws/namecreater/build-NameCreater-Desktop_Qt_5_15_2_GCC_64bit-Profile</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/shouchih/qt_ws/namecreater/build-NameCreater-Desktop_Qt_5_15_2_GCC_64bit-Profile</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
|
<value type="int" key="QtQuickCompiler">0</value>
|
||||||
|
<value type="int" key="SeparateDebugInfo">0</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||||
|
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||||
|
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||||
|
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||||
|
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||||
|
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/shouchih/qt_ws/namecreater/NameCreater/NameCreater.pro</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/home/shouchih/qt_ws/namecreater/NameCreater/NameCreater.pro</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
|
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/shouchih/qt_ws/namecreater/build-NameCreater-Desktop_Qt_5_15_2_GCC_64bit-Debug</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||||
|
<value type="qlonglong">2</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||||
|
<value type="int">22</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>Version</variable>
|
||||||
|
<value type="int">22</value>
|
||||||
|
</data>
|
||||||
|
</qtcreator>
|
||||||
@ -1,8 +1,104 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/NameCreater">
|
<qresource prefix="/NameCreater">
|
||||||
<file>resource/background.jpg</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_g.jpg</file>
|
||||||
|
<file>resource/background_r.jpg</file>
|
||||||
|
<file>resource/background_y.jpg</file>
|
||||||
|
<file>resource/two_word_sample.jpg</file>
|
||||||
|
<file>resource/background_1.jpg</file>
|
||||||
|
<file>resource/background_2.jpg</file>
|
||||||
|
<file>resource/background_3.jpg</file>
|
||||||
|
<file>resource/background_4.jpg</file>
|
||||||
|
<file>resource/background_5.jpg</file>
|
||||||
|
<file>resource/background_6.jpg</file>
|
||||||
|
<file>resource/background_7.jpg</file>
|
||||||
|
<file>resource/background_8.jpg</file>
|
||||||
|
<file>resource/background_9.jpg</file>
|
||||||
|
<file>resource/background_10.jpg</file>
|
||||||
|
<file>resource/background_number_smaple.jpg</file>
|
||||||
|
<file>resource/background_11.jpg</file>
|
||||||
|
<file>resource/background_12.jpg</file>
|
||||||
|
<file>resource/background_13.jpg</file>
|
||||||
|
<file>resource/background_14.jpg</file>
|
||||||
|
<file>resource/background_15.jpg</file>
|
||||||
|
<file>resource/background_16.jpg</file>
|
||||||
|
<file>resource/background_17.jpg</file>
|
||||||
|
<file>resource/background_18.jpg</file>
|
||||||
|
<file>resource/background_19.jpg</file>
|
||||||
|
<file>resource/background_20.jpg</file>
|
||||||
|
<file>resource/background.jpg</file>
|
||||||
<file>resource/background_boy.jpg</file>
|
<file>resource/background_boy.jpg</file>
|
||||||
<file>resource/background_girl.jpg</file>
|
<file>resource/background_girl.jpg</file>
|
||||||
|
<file>resource/b.jpg</file>
|
||||||
|
<file>resource/boy_bg.jpg</file>
|
||||||
|
<file>resource/co.jpg</file>
|
||||||
|
<file>resource/g.jpg</file>
|
||||||
|
<file>resource/girl_bg.jpg</file>
|
||||||
|
<file>resource/m.jpg</file>
|
||||||
|
<file>resource/ol.jpg</file>
|
||||||
|
<file>resource/p.jpg</file>
|
||||||
|
<file>resource/r.jpg</file>
|
||||||
|
<file>resource/sn.jpg</file>
|
||||||
|
<file>resource/st.jpg</file>
|
||||||
|
<file>resource/w.jpg</file>
|
||||||
|
<file>resource/y.jpg</file>
|
||||||
|
<file>_exp/W1.ttc</file>
|
||||||
|
<file>resource/five/b_1.jpg</file>
|
||||||
|
<file>resource/five/b_2.jpg</file>
|
||||||
|
<file>resource/five/b_3.jpg</file>
|
||||||
|
<file>resource/five/b_4.jpg</file>
|
||||||
|
<file>resource/five/b_5.jpg</file>
|
||||||
|
<file>resource/five/g_1.jpg</file>
|
||||||
|
<file>resource/five/g_2.jpg</file>
|
||||||
|
<file>resource/five/g_3.jpg</file>
|
||||||
|
<file>resource/five/g_4.jpg</file>
|
||||||
|
<file>resource/five/g_5.jpg</file>
|
||||||
|
<file>resource/five/nb_1.jpg</file>
|
||||||
|
<file>resource/five/nb_2.jpg</file>
|
||||||
|
<file>resource/five/nb_3.jpg</file>
|
||||||
|
<file>resource/five/nb_4.jpg</file>
|
||||||
|
<file>resource/five/nb_5.jpg</file>
|
||||||
|
<file>resource/five/new_bg_sample.jpg</file>
|
||||||
|
<file>resource/five/ng_1.jpg</file>
|
||||||
|
<file>resource/five/ng_2.jpg</file>
|
||||||
|
<file>resource/five/ng_3.jpg</file>
|
||||||
|
<file>resource/five/ng_4.jpg</file>
|
||||||
|
<file>resource/five/ng_5.jpg</file>
|
||||||
|
<file>_exp/FontsFree-Net-Acumin-Pro-Semibold.ttf</file>
|
||||||
|
<file>resource/hk_holder/b.jpg</file>
|
||||||
|
<file>resource/hk_holder/g.jpg</file>
|
||||||
|
<file>resource/hk_holder/p.jpg</file>
|
||||||
|
<file>resource/hk_holder/r.jpg</file>
|
||||||
|
<file>resource/hk_holder/sample.jpg</file>
|
||||||
|
<file>resource/hk_holder/y.jpg</file>
|
||||||
|
<file>resource/hk_holder/m.jpg</file>
|
||||||
|
<file>resource/hk_holder/st.jpg</file>
|
||||||
|
<file>resource/hk_holder/w.jpg</file>
|
||||||
|
<file>resource/hk_holder/a.jpg</file>
|
||||||
|
<file>resource/hk_holder/pg.jpg</file>
|
||||||
|
<file>resource/a.jpg</file>
|
||||||
|
<file>resource/pg.jpg</file>
|
||||||
|
<file>resource/background_21.jpg</file>
|
||||||
|
<file>resource/background_22.jpg</file>
|
||||||
|
<file>resource/background_23.jpg</file>
|
||||||
|
<file>resource/background_24.jpg</file>
|
||||||
|
<file>resource/background_25.jpg</file>
|
||||||
|
<file>resource/background_26.jpg</file>
|
||||||
|
<file>resource/background_27.jpg</file>
|
||||||
|
<file>resource/background_28.jpg</file>
|
||||||
|
<file>resource/background_29.jpg</file>
|
||||||
|
<file>resource/background_30.jpg</file>
|
||||||
|
<file>resource/five/kb_1.jpg</file>
|
||||||
|
<file>resource/five/kb_2.jpg</file>
|
||||||
|
<file>resource/five/kb_3.jpg</file>
|
||||||
|
<file>resource/five/kb_4.jpg</file>
|
||||||
|
<file>resource/five/kb_5.jpg</file>
|
||||||
|
<file>resource/five/kg_1.jpg</file>
|
||||||
|
<file>resource/five/kg_2.jpg</file>
|
||||||
|
<file>resource/five/kg_3.jpg</file>
|
||||||
|
<file>resource/five/kg_4.jpg</file>
|
||||||
|
<file>resource/five/kg_5.jpg</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
60
NameCreater/NameCreater.rc
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
// Microsoft Visual C++ generated resource script.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
|
//
|
||||||
|
#include "winres.h"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// ^¤å (¬ü°ê) resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||||
|
LANGUAGE 4, 1
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// TEXTINCLUDE
|
||||||
|
//
|
||||||
|
|
||||||
|
1 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"resource.h\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
2 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"#include ""winres.h""\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
3 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
#endif // ^¤å (¬ü°ê) resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 3 resource.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#endif // not APSTUDIO_INVOKED
|
||||||
@ -1,65 +1,458 @@
|
|||||||
<?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>977</width>
|
<width>946</width>
|
||||||
<height>716</height>
|
<height>817</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>
|
||||||
<widget class="QWidget" name="centralWidget">
|
<property name="styleSheet">
|
||||||
<widget class="QLabel" name="label">
|
<string notr="true"/>
|
||||||
<property name="geometry">
|
</property>
|
||||||
<rect>
|
<widget class="QWidget" name="centralWidget">
|
||||||
<x>240</x>
|
<property name="styleSheet">
|
||||||
<y>220</y>
|
<string notr="true">QWidget#centralWidget{
|
||||||
<width>441</width>
|
background-color: rgb(0, 0, 0);
|
||||||
<height>261</height>
|
}</string>
|
||||||
</rect>
|
</property>
|
||||||
</property>
|
<widget class="QLabel" name="version_label">
|
||||||
<property name="styleSheet">
|
<property name="geometry">
|
||||||
<string notr="true">font: 26pt "華康圓體 Std W8";</string>
|
<rect>
|
||||||
</property>
|
<x>10</x>
|
||||||
<property name="text">
|
<y>10</y>
|
||||||
<string/>
|
<width>171</width>
|
||||||
</property>
|
<height>16</height>
|
||||||
<property name="pixmap">
|
</rect>
|
||||||
<pixmap resource="NameCreater.qrc">:/NameCreater/resource/background.jpg</pixmap>
|
</property>
|
||||||
</property>
|
<property name="font">
|
||||||
</widget>
|
<font>
|
||||||
</widget>
|
<family>Yu Gothic UI</family>
|
||||||
<widget class="QMenuBar" name="menuBar">
|
<pointsize>10</pointsize>
|
||||||
<property name="geometry">
|
<italic>false</italic>
|
||||||
<rect>
|
<bold>false</bold>
|
||||||
<x>0</x>
|
</font>
|
||||||
<y>0</y>
|
</property>
|
||||||
<width>977</width>
|
<property name="styleSheet">
|
||||||
<height>22</height>
|
<string notr="true">color: rgb(255, 255, 255);
|
||||||
</rect>
|
</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="text">
|
||||||
<widget class="QToolBar" name="mainToolBar">
|
<string>v1.0.0</string>
|
||||||
<attribute name="toolBarArea">
|
</property>
|
||||||
<enum>TopToolBarArea</enum>
|
<property name="alignment">
|
||||||
</attribute>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
<attribute name="toolBarBreak">
|
</property>
|
||||||
<bool>false</bool>
|
</widget>
|
||||||
</attribute>
|
<widget class="QFrame" name="frame">
|
||||||
</widget>
|
<property name="geometry">
|
||||||
<widget class="QStatusBar" name="statusBar"/>
|
<rect>
|
||||||
</widget>
|
<x>10</x>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<y>40</y>
|
||||||
<resources>
|
<width>851</width>
|
||||||
<include location="NameCreater.qrc"/>
|
<height>681</height>
|
||||||
</resources>
|
</rect>
|
||||||
<connections/>
|
</property>
|
||||||
</ui>
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QFrame#frame{
|
||||||
|
border: 3px solid #FFFFFF;
|
||||||
|
border-color: rgb(255, 255, 255);
|
||||||
|
|
||||||
|
}</string>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QPushButton" name="birthday_btn">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>76</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open File</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="0">
|
||||||
|
<widget class="QLabel" name="tital_label_9">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Yu Gothic UI</family>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
<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="0">
|
||||||
|
<widget class="QLabel" name="tital_label_7">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Yu Gothic UI</family>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
<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="5" column="0">
|
||||||
|
<widget class="QLabel" name="tital_label_6">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Yu Gothic UI</family>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
<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="1">
|
||||||
|
<widget class="QPushButton" name="fivesingle_btn">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>76</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open File</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="0">
|
||||||
|
<widget class="QPushButton" name="birthday_eng_eng_btn">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>76</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open File</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</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="4" column="1">
|
||||||
|
<widget class="QPushButton" name="fivesingle_zh_eng_btn">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>76</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open File</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="tital_label_4">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Yu Gothic UI</family>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
<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="1" column="1">
|
||||||
|
<widget class="QLabel" name="tital_label">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Yu Gothic UI</family>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: rgb(255, 255, 255);
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>五入組拆成單入產生器</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QPushButton" name="birthday_zh_eng_btn">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>76</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open File</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLabel" name="tital_label_2">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Yu Gothic UI</family>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: rgb(255, 255, 255);
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>五入組拆成單入產生器(中/英)</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1">
|
||||||
|
<widget class="QPushButton" name="towel_btn">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>76</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open File</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="tital_label_3">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Yu Gothic UI</family>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
<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="5" column="1">
|
||||||
|
<widget class="QLabel" name="tital_label_5">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Yu Gothic UI</family>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: rgb(255, 255, 255);
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>小方巾產生器</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="1">
|
||||||
|
<widget class="QPushButton" name="handkerchief_btn">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>76</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open File</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1">
|
||||||
|
<widget class="QLabel" name="tital_label_8">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Yu Gothic UI</family>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
<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>
|
||||||
|
<item row="10" column="0">
|
||||||
|
<widget class="QPushButton" name="customlogo_btn">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>76</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open Dialog</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="font_name_label">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>230</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>171</width>
|
||||||
|
<height>16</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Yu Gothic UI</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: rgb(255, 255, 255);
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>font_name</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenuBar" name="menuBar">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>946</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QToolBar" name="mainToolBar">
|
||||||
|
<attribute name="toolBarArea">
|
||||||
|
<enum>TopToolBarArea</enum>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="toolBarBreak">
|
||||||
|
<bool>false</bool>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="QStatusBar" name="statusBar"/>
|
||||||
|
<action name="actionOpen_File">
|
||||||
|
<property name="text">
|
||||||
|
<string>Open File</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
</widget>
|
||||||
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
|
|||||||
@ -1,114 +1,222 @@
|
|||||||
<?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="Release|Win32">
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
<Configuration>Release</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>x64</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
</ItemGroup>
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
<PropertyGroup Label="Globals">
|
<Configuration>Release</Configuration>
|
||||||
<ProjectGuid>{B66B108B-6DA8-408D-936D-988FF8B6B722}</ProjectGuid>
|
<Platform>Win32</Platform>
|
||||||
<Keyword>QtVS_v304</Keyword>
|
</ProjectConfiguration>
|
||||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">10.0.19041.0</WindowsTargetPlatformVersion>
|
<ProjectConfiguration Include="Release|x64">
|
||||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">10.0.19041.0</WindowsTargetPlatformVersion>
|
<Configuration>Release</Configuration>
|
||||||
<QtMsBuild Condition="'$(QtMsBuild)'=='' OR !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
|
<Platform>x64</Platform>
|
||||||
</PropertyGroup>
|
</ProjectConfiguration>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
</ItemGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="Configuration">
|
<PropertyGroup Label="Globals">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ProjectGuid>{B66B108B-6DA8-408D-936D-988FF8B6B722}</ProjectGuid>
|
||||||
<PlatformToolset>v142</PlatformToolset>
|
<Keyword>QtVS_v304</Keyword>
|
||||||
</PropertyGroup>
|
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">10.0.16299.0</WindowsTargetPlatformVersion>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration">
|
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">10.0</WindowsTargetPlatformVersion>
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">10.0.16299.0</WindowsTargetPlatformVersion>
|
||||||
<PlatformToolset>v142</PlatformToolset>
|
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)'=='Release|x64'">10.0.19041.0</WindowsTargetPlatformVersion>
|
||||||
</PropertyGroup>
|
<QtMsBuild Condition="'$(QtMsBuild)'=='' OR !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
</PropertyGroup>
|
||||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<Import Project="$(QtMsBuild)\qt_defaults.props" />
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="Configuration">
|
||||||
</ImportGroup>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="QtSettings">
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<QtInstall>$(DefaultQtVersion)</QtInstall>
|
</PropertyGroup>
|
||||||
<QtModules>core;gui;widgets</QtModules>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
<QtBuildConfig>debug</QtBuildConfig>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
</PropertyGroup>
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="QtSettings">
|
</PropertyGroup>
|
||||||
<QtInstall>$(DefaultQtVersion)</QtInstall>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration">
|
||||||
<QtModules>core;gui;widgets</QtModules>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<QtBuildConfig>release</QtBuildConfig>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
</Target>
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
<ImportGroup Label="ExtensionSettings" />
|
</PropertyGroup>
|
||||||
<ImportGroup Label="Shared" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">
|
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(QtMsBuild)\qt_defaults.props" />
|
||||||
<Import Project="$(QtMsBuild)\Qt.props" />
|
</ImportGroup>
|
||||||
</ImportGroup>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="QtSettings">
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">
|
<QtInstall>5.15.2_msvc2019_64</QtInstall>
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<QtModules>core;gui;widgets</QtModules>
|
||||||
<Import Project="$(QtMsBuild)\Qt.props" />
|
<QtBuildConfig>debug</QtBuildConfig>
|
||||||
</ImportGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">
|
<QtInstall>5.15.2_msvc2019_64</QtInstall>
|
||||||
<OutDir>$(SolutionDir)_bin\</OutDir>
|
<QtModules>core;gui;widgets;network</QtModules>
|
||||||
<IntDir>$(Configuration)\</IntDir>
|
<QtBuildConfig>debug</QtBuildConfig>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="QtSettings">
|
||||||
<OutDir>$(SolutionDir)_bin\</OutDir>
|
<QtInstall>$(DefaultQtVersion)</QtInstall>
|
||||||
<IntDir>$(Configuration)\</IntDir>
|
<QtModules>core;gui;widgets</QtModules>
|
||||||
</PropertyGroup>
|
<QtBuildConfig>release</QtBuildConfig>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
</PropertyGroup>
|
||||||
<PreBuildEvent>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
|
||||||
<Command>xcopy /y "$(ProjectDir)_exp\*" "$(TargetDir)"</Command>
|
<QtInstall>$(DefaultQtVersion)</QtInstall>
|
||||||
</PreBuildEvent>
|
<QtModules>core;gui;widgets;network</QtModules>
|
||||||
</ItemDefinitionGroup>
|
<QtBuildConfig>release</QtBuildConfig>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
</PropertyGroup>
|
||||||
<PreBuildEvent>
|
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
|
||||||
<Command>xcopy /y "$(ProjectDir)_exp\*" "$(TargetDir)"</Command>
|
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
|
||||||
</PreBuildEvent>
|
</Target>
|
||||||
</ItemDefinitionGroup>
|
<ImportGroup Label="ExtensionSettings" />
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="Configuration">
|
<ImportGroup Label="Shared" />
|
||||||
<ClCompile>
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">
|
||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<Import Project="$(QtMsBuild)\Qt.props" />
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
</ImportGroup>
|
||||||
<Optimization>Disabled</Optimization>
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
</ClCompile>
|
<Import Project="$(QtMsBuild)\Qt.props" />
|
||||||
<Link>
|
</ImportGroup>
|
||||||
<SubSystem>Windows</SubSystem>
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
</Link>
|
<Import Project="$(QtMsBuild)\Qt.props" />
|
||||||
</ItemDefinitionGroup>
|
</ImportGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||||
<ClCompile>
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<Import Project="$(QtMsBuild)\Qt.props" />
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
</ImportGroup>
|
||||||
<DebugInformationFormat>None</DebugInformationFormat>
|
<PropertyGroup Label="UserMacros" />
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<OutDir>$(SolutionDir)_bin\</OutDir>
|
||||||
</ClCompile>
|
<IntDir>$(Configuration)\</IntDir>
|
||||||
<Link>
|
</PropertyGroup>
|
||||||
<SubSystem>Windows</SubSystem>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">
|
||||||
</Link>
|
<OutDir>$(SolutionDir)_bin\</OutDir>
|
||||||
</ItemDefinitionGroup>
|
<IntDir>$(Configuration)\</IntDir>
|
||||||
<ItemGroup>
|
</PropertyGroup>
|
||||||
<QtRcc Include="NameCreater.qrc" />
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<QtUic Include="NameCreater.ui" />
|
<PreBuildEvent>
|
||||||
<QtMoc Include="NameCreater.h" />
|
<Command>xcopy /y "$(ProjectDir)_exp\*" "$(TargetDir)"</Command>
|
||||||
<ClCompile Include="NameCreater.cpp" />
|
</PreBuildEvent>
|
||||||
<ClCompile Include="main.cpp" />
|
<ClCompile>
|
||||||
</ItemGroup>
|
<AdditionalOptions>/Zm1000</AdditionalOptions>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
</ClCompile>
|
||||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
|
</ItemDefinitionGroup>
|
||||||
<Import Project="$(QtMsBuild)\qt.targets" />
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
</ImportGroup>
|
<PreBuildEvent>
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<Command>xcopy /y "$(ProjectDir)_exp\*" "$(TargetDir)"</Command>
|
||||||
</ImportGroup>
|
</PreBuildEvent>
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalOptions>/Zm1000</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<HeapCommitSize>
|
||||||
|
</HeapCommitSize>
|
||||||
|
<HeapReserveSize>
|
||||||
|
</HeapReserveSize>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<PreBuildEvent>
|
||||||
|
<Command>xcopy /y "$(ProjectDir)_exp\*" "$(TargetDir)"</Command>
|
||||||
|
</PreBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<PreBuildEvent>
|
||||||
|
<Command>xcopy /y "$(ProjectDir)_exp\*" "$(TargetDir)"</Command>
|
||||||
|
</PreBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="Configuration">
|
||||||
|
<ClCompile>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ClCompile>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration">
|
||||||
|
<ClCompile>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<DebugInformationFormat>None</DebugInformationFormat>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ClCompile>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<DebugInformationFormat>None</DebugInformationFormat>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="BirthdayCreater.cpp" />
|
||||||
|
<ClCompile Include="customlogo.cpp" />
|
||||||
|
<ClCompile Include="HKHolderCreater.cpp" />
|
||||||
|
<ClCompile Include="NewFiveCreater.cpp" />
|
||||||
|
<ClCompile Include="OldFiveCreater.cpp" />
|
||||||
|
<ClCompile Include="TowelCreater.cpp" />
|
||||||
|
<QtRcc Include="NameCreater.qrc" />
|
||||||
|
<QtUic Include="customlogo.ui" />
|
||||||
|
<QtUic Include="NameCreater.ui" />
|
||||||
|
<QtMoc Include="NameCreater.h" />
|
||||||
|
<ClCompile Include="FiveToSingle.cpp" />
|
||||||
|
<ClCompile Include="INameCreater.cpp" />
|
||||||
|
<ClCompile Include="NameCreater.cpp" />
|
||||||
|
<ClCompile Include="main.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="BirthdayCreater.h" />
|
||||||
|
<QtMoc Include="customlogo.h" />
|
||||||
|
<ClInclude Include="FiveToSingle.h" />
|
||||||
|
<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>
|
||||||
@ -1,44 +1,112 @@
|
|||||||
<?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>
|
||||||
</ItemGroup>
|
<Filter Include="Creaters">
|
||||||
<ItemGroup>
|
<UniqueIdentifier>{c0b8778b-3058-44d2-9adc-b902360289e6}</UniqueIdentifier>
|
||||||
<QtRcc Include="NameCreater.qrc">
|
</Filter>
|
||||||
<Filter>Resource Files</Filter>
|
</ItemGroup>
|
||||||
</QtRcc>
|
<ItemGroup>
|
||||||
<QtUic Include="NameCreater.ui">
|
<QtRcc Include="NameCreater.qrc">
|
||||||
<Filter>Form Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</QtUic>
|
</QtRcc>
|
||||||
<QtMoc Include="NameCreater.h">
|
<QtUic Include="NameCreater.ui">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Form Files</Filter>
|
||||||
</QtMoc>
|
</QtUic>
|
||||||
<ClCompile Include="NameCreater.cpp">
|
<QtMoc Include="NameCreater.h">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClCompile>
|
</QtMoc>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="main.cpp">
|
<ClCompile Include="main.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
<ClCompile Include="FiveToSingle.cpp">
|
||||||
|
<Filter>Creaters</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="INameCreater.cpp">
|
||||||
|
<Filter>Creaters</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="OldFiveCreater.cpp">
|
||||||
|
<Filter>Creaters</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="NameCreater.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="BirthdayCreater.cpp">
|
||||||
|
<Filter>Creaters</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="TowelCreater.cpp">
|
||||||
|
<Filter>Creaters</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="NewFiveCreater.cpp">
|
||||||
|
<Filter>Creaters</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="HKHolderCreater.cpp">
|
||||||
|
<Filter>Creaters</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="customlogo.cpp">
|
||||||
|
<Filter>Creaters</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="resource.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="FiveToSingle.h">
|
||||||
|
<Filter>Creaters</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="INameCreater.h">
|
||||||
|
<Filter>Creaters</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="OldFiveCreater.h">
|
||||||
|
<Filter>Creaters</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="BirthdayCreater.h">
|
||||||
|
<Filter>Creaters</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="TowelCreater.h">
|
||||||
|
<Filter>Creaters</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="NewFiveCreater.h">
|
||||||
|
<Filter>Creaters</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="HKHolderCreater.h">
|
||||||
|
<Filter>Creaters</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ResourceCompile Include="NameCreater.rc">
|
||||||
|
<Filter>Resource Files</Filter>
|
||||||
|
</ResourceCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<QtUic Include="customlogo.ui">
|
||||||
|
<Filter>Form Files</Filter>
|
||||||
|
</QtUic>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<QtMoc Include="customlogo.h">
|
||||||
|
<Filter>Creaters</Filter>
|
||||||
|
</QtMoc>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@ -1,17 +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)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory>
|
<LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory>
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<QtLastBackgroundBuild>2022-02-09T21:34:52.5655210Z</QtLastBackgroundBuild>
|
<LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory>
|
||||||
</PropertyGroup>
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
</PropertyGroup>
|
||||||
<QtLastBackgroundBuild>2022-02-09T21:34:53.9897137Z</QtLastBackgroundBuild>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
</PropertyGroup>
|
<LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory>
|
||||||
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<QtLastBackgroundBuild>2024-05-14T07:08:49.3700216Z</QtLastBackgroundBuild>
|
||||||
|
<QtTouchProperty>
|
||||||
|
</QtTouchProperty>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
|
||||||
|
<QtLastBackgroundBuild>2024-05-14T07:08:49.6936159Z</QtLastBackgroundBuild>
|
||||||
|
<QtTouchProperty>
|
||||||
|
</QtTouchProperty>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<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>
|
||||||
144
NameCreater/NewFiveCreater.cpp
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
#include "NewFiveCreater.h"
|
||||||
|
#include <QTextCodec>
|
||||||
|
#include <QTextStream>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QDateTime>
|
||||||
|
|
||||||
|
|
||||||
|
static QString BG_SMAPLE_PATH = ":/NameCreater/resource/five/new_bg_sample.jpg";
|
||||||
|
static QString LABEL_BG_PATH_FORMAT = ":/NameCreater/resource/five/%1_%2.jpg";
|
||||||
|
|
||||||
|
static int LABEL_HIGHT_LIMIT = 350;
|
||||||
|
static QPoint LABEL_POS_START = QPoint(145, 55);
|
||||||
|
static int LABEL_POS_X_OFFSET = 323;
|
||||||
|
|
||||||
|
static QPoint NAME_OFFSET_START = QPoint(90, 335);
|
||||||
|
static QPoint NAME_OFFSET_REVERSE_START = QPoint(216, 1398);
|
||||||
|
static qreal NAME_TWO_WORD_OFFSET = 170;
|
||||||
|
static qreal NAME_THREE_WORD_OFFSET = 145;
|
||||||
|
|
||||||
|
static int MAX_LABEL_IN_PAPER = 10;
|
||||||
|
static int FONT_PIXEL_SIZE = 120;
|
||||||
|
|
||||||
|
|
||||||
|
NewFiveCreater::NewFiveCreater() : INameCreater()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
NewFiveCreater::~NewFiveCreater()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<NameInfo_t> NewFiveCreater::getNameByFileContent(Name_Type_e type, const QByteArray& conetent)
|
||||||
|
{
|
||||||
|
QList<NameInfo_t> nameList;
|
||||||
|
|
||||||
|
QTextCodec* tc = QTextCodec::codecForName("Big5");
|
||||||
|
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 = csvList.at(0); //QString::fromLocal8Bit(csvList.at(0));
|
||||||
|
QString bg_type = csvList.at(1);//QString::fromLocal8Bit(csvList.at(1));
|
||||||
|
|
||||||
|
qDebug() << "row :" << row << " " << name << ", bg_type: " << bg_type;
|
||||||
|
|
||||||
|
if (name.compare("name") == 0) {
|
||||||
|
//pass first line
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
info.name1 = name;
|
||||||
|
info.bg_path = bg_type;
|
||||||
|
|
||||||
|
nameList.append(info);
|
||||||
|
|
||||||
|
row++;
|
||||||
|
}
|
||||||
|
return nameList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void NewFiveCreater::generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color)
|
||||||
|
{
|
||||||
|
|
||||||
|
int export_times = 0;
|
||||||
|
|
||||||
|
QList<NameInfo_t> nameList = getNameByFileContent(type, filecontent);
|
||||||
|
if (nameList.isEmpty()) {
|
||||||
|
QMessageBox msgBox;
|
||||||
|
msgBox.setText(QString("Name is empty ! ").append(filename));
|
||||||
|
msgBox.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
QGraphicsScene scene;
|
||||||
|
scene.setBackgroundBrush(QBrush(QColor(255, 255, 255)));
|
||||||
|
QGraphicsView view(&scene);
|
||||||
|
|
||||||
|
|
||||||
|
int idx = 0;
|
||||||
|
foreach(auto name, nameList) {
|
||||||
|
if ((idx % MAX_LABEL_IN_PAPER) == 0) {
|
||||||
|
QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT);
|
||||||
|
bg_item->setBrush(QBrush(QColor(255, 255, 255)));
|
||||||
|
//QGraphicsPixmapItem* bg_item = QGraphicsPixmapItem(QPixmap(BG_SMAPLE_PATH));
|
||||||
|
scene.addItem(bg_item);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int l = 0; l < 5; l++) {
|
||||||
|
int col_index = idx % MAX_LABEL_IN_PAPER;
|
||||||
|
QString label_rel_path = LABEL_BG_PATH_FORMAT.arg(name.bg_path, QString::number(l + 1));
|
||||||
|
auto label_item = new QGraphicsPixmapItem(QPixmap(label_rel_path));
|
||||||
|
label_item->setPos(LABEL_POS_START.x() + LABEL_POS_X_OFFSET * col_index, LABEL_POS_START.y());
|
||||||
|
label_item->setOpacity(1);
|
||||||
|
scene.addItem(label_item);
|
||||||
|
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
int name_word_len = name.name1.count();
|
||||||
|
qreal two_word_y = (name_word_len == 2) ? NAME_TWO_WORD_OFFSET / 2.0 : 0;
|
||||||
|
qreal offset_y = (name_word_len == 2) ? NAME_TWO_WORD_OFFSET : NAME_THREE_WORD_OFFSET;
|
||||||
|
|
||||||
|
for (int w = 0; w < name_word_len; w++) {
|
||||||
|
QGraphicsTextItem* word_item = new QGraphicsTextItem(name.name1.at(w));
|
||||||
|
word_item->setFont(font);
|
||||||
|
word_item->setDefaultTextColor(font_color);
|
||||||
|
qreal _x = (i == 0) ? label_item->x() + NAME_OFFSET_START.x() : label_item->x() + NAME_OFFSET_REVERSE_START.x();
|
||||||
|
qreal _y = (i == 0) ? (label_item->y() + NAME_OFFSET_START.y() + two_word_y + offset_y * w) : (label_item->y() + NAME_OFFSET_REVERSE_START.y() - two_word_y - offset_y * w);
|
||||||
|
if (i == 1) word_item->setTransform(QTransform::fromScale(-1, -1));
|
||||||
|
word_item->setPos(_x, _y);
|
||||||
|
scene.addItem(word_item);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((idx % MAX_LABEL_IN_PAPER == MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() * 5 - 1) {
|
||||||
|
QString date_str = QDateTime::currentDateTime().toString("MMddhhmm");
|
||||||
|
QString file_name = QString("Five_%2_%1.jpg").arg(QString::number(export_times + 1), date_str);
|
||||||
|
saveToImage(file_name, &scene);
|
||||||
|
export_times++;
|
||||||
|
scene.clear();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
idx++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
QMessageBox msgBox;
|
||||||
|
msgBox.setText(QString().asprintf("Export Finshed. Count:%d", export_times));
|
||||||
|
msgBox.exec();
|
||||||
|
|
||||||
|
}
|
||||||
19
NameCreater/NewFiveCreater.h
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "INameCreater.h"
|
||||||
|
class NewFiveCreater :
|
||||||
|
public INameCreater
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
NewFiveCreater();
|
||||||
|
~NewFiveCreater();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent);
|
||||||
|
public:
|
||||||
|
virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
152
NameCreater/OldFiveCreater.cpp
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
#include "OldFiveCreater.h"
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QTextCodec>
|
||||||
|
#include <QTextStream>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QRegularExpression>
|
||||||
|
|
||||||
|
#define BG_MIX_PATH ":/NameCreater/resource/background.jpg"
|
||||||
|
#define BG_BOY_PATH ":/NameCreater/resource/background_boy.jpg"
|
||||||
|
#define BG_GIRL_PATH ":/NameCreater/resource/background_girl.jpg"
|
||||||
|
|
||||||
|
static QPointF BOY_POS[] = {
|
||||||
|
QPointF(235, 387), QPointF(366, 1433),
|
||||||
|
QPointF(555, 387), QPointF(692, 1433),
|
||||||
|
QPointF(878, 387), QPointF(1014, 1433),
|
||||||
|
QPointF(1200, 387), QPointF(1337, 1433),
|
||||||
|
QPointF(1527, 387), QPointF(1663, 1433),
|
||||||
|
};
|
||||||
|
|
||||||
|
static int BOY_POS_COUNT = sizeof(BOY_POS) / sizeof(BOY_POS[0]);
|
||||||
|
|
||||||
|
|
||||||
|
static QPointF GIRL_POS[] = {
|
||||||
|
QPointF(1854, 387), QPointF(1987, 1433),
|
||||||
|
QPointF(2176, 387), QPointF(2314, 1433),
|
||||||
|
QPointF(2498, 387), QPointF(2635, 1433),
|
||||||
|
QPointF(2821, 387), QPointF(2958, 1433),
|
||||||
|
QPointF(3147, 387), QPointF(3285, 1433),
|
||||||
|
};
|
||||||
|
|
||||||
|
static int GIRL_POS_COUNT = sizeof(GIRL_POS) / sizeof(GIRL_POS[0]);
|
||||||
|
|
||||||
|
|
||||||
|
OldFiveCreater::OldFiveCreater():INameCreater()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
OldFiveCreater::~OldFiveCreater()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<NameInfo_t> OldFiveCreater::getNameByFileContent(Name_Type_e type, const QByteArray& conetent)
|
||||||
|
{
|
||||||
|
QList<NameInfo_t> nameList;
|
||||||
|
|
||||||
|
QTextCodec* tc = QTextCodec::codecForName("Big5");
|
||||||
|
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 name1 = csvList.at(0); //QString::fromLocal8Bit(csvList.at(0));
|
||||||
|
QString name2 = csvList.at(1);//QString::fromLocal8Bit(csvList.at(1));
|
||||||
|
QString type_str = csvList.last();//QString::fromLocal8Bit(csvList.last());
|
||||||
|
qDebug() << "row :" << row << " " << name1 << " " << name2;
|
||||||
|
|
||||||
|
if (name1.compare("name_1") == 0 || name2.compare("name_2") == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
info.name1 = name1;
|
||||||
|
info.name2 = name2;
|
||||||
|
info.bg_type = type_str.contains(QRegularExpression("boy")) ? 1 : (type_str.contains(QRegularExpression("girl"))) ? 2 : 0;
|
||||||
|
|
||||||
|
nameList.append(info);
|
||||||
|
|
||||||
|
row++;
|
||||||
|
}
|
||||||
|
return nameList;
|
||||||
|
}
|
||||||
|
|
||||||
|
void OldFiveCreater::generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color)
|
||||||
|
{
|
||||||
|
int export_times = 0;
|
||||||
|
|
||||||
|
QList<NameInfo_t> nameList = getNameByFileContent(type, filecontent);
|
||||||
|
if (nameList.isEmpty()) {
|
||||||
|
QMessageBox msgBox;
|
||||||
|
msgBox.setText(QString("Name is empty ! ").append(filename));
|
||||||
|
msgBox.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QGraphicsScene scene;
|
||||||
|
QGraphicsView view(&scene);
|
||||||
|
|
||||||
|
|
||||||
|
for (int n = 0; n < nameList.length(); n++) {
|
||||||
|
//msgBox.setText(QString().sprintf("Export: %d / %d", export_times, nameList.length()));
|
||||||
|
|
||||||
|
NameInfo_t name_info = nameList.at(n);
|
||||||
|
|
||||||
|
scene.clear();
|
||||||
|
QImage image((name_info.bg_type == 1) ? BG_BOY_PATH : (name_info.bg_type == 2) ? BG_GIRL_PATH : BG_MIX_PATH);
|
||||||
|
QGraphicsPixmapItem* bgItem = new QGraphicsPixmapItem(QPixmap::fromImage(image));
|
||||||
|
scene.addItem(bgItem);
|
||||||
|
|
||||||
|
|
||||||
|
for (int j = 0; j < 2; j++) {
|
||||||
|
int flag = j % 2;
|
||||||
|
QString name = (flag == 0) ? name_info.name1 : name_info.name2;
|
||||||
|
for (int i = 0; i < BOY_POS_COUNT; i++) {
|
||||||
|
qreal xscale, yscale;
|
||||||
|
xscale = yscale = (i % 2 == 1) ? -1 : 1;
|
||||||
|
QPointF pos = (flag == 0) ? BOY_POS[i] : GIRL_POS[i];
|
||||||
|
|
||||||
|
QGraphicsTextItem* textItem1 = new QGraphicsTextItem(name.mid(0, 1));
|
||||||
|
textItem1->setFont(font);
|
||||||
|
textItem1->setDefaultTextColor(font_color);
|
||||||
|
textItem1->setPos(pos);
|
||||||
|
textItem1->setTransform(QTransform::fromScale(xscale, yscale));
|
||||||
|
scene.addItem(textItem1);
|
||||||
|
|
||||||
|
QGraphicsTextItem* textItem2 = new QGraphicsTextItem(name.mid(1, 1));
|
||||||
|
textItem2->setFont(font);
|
||||||
|
textItem2->setDefaultTextColor(font_color);
|
||||||
|
textItem2->setPos(pos.x(), pos.y() + 148.0 * xscale);
|
||||||
|
textItem2->setTransform(QTransform::fromScale(xscale, yscale));
|
||||||
|
scene.addItem(textItem2);
|
||||||
|
|
||||||
|
QGraphicsTextItem* textItem3 = new QGraphicsTextItem(name.mid(2, 1));
|
||||||
|
textItem3->setFont(font);
|
||||||
|
textItem3->setDefaultTextColor(font_color);
|
||||||
|
textItem3->setPos(pos.x(), pos.y() + 294.0 * xscale);
|
||||||
|
textItem3->setTransform(QTransform::fromScale(xscale, yscale));
|
||||||
|
scene.addItem(textItem3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//if (name_info.bg_type == 0) {
|
||||||
|
// view.show();
|
||||||
|
// break;
|
||||||
|
//}
|
||||||
|
|
||||||
|
QString file_name = QString("%1_%2_%3.jpg").arg(QString::number(export_times + 1), name_info.name1, name_info.name2);
|
||||||
|
saveToImage(file_name, &scene);
|
||||||
|
export_times++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QMessageBox msgBox;
|
||||||
|
msgBox.setText(QString().asprintf("Export Finshed. Count:%d", export_times));
|
||||||
|
msgBox.exec();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
15
NameCreater/OldFiveCreater.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "INameCreater.h"
|
||||||
|
class OldFiveCreater :
|
||||||
|
public INameCreater
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
OldFiveCreater();
|
||||||
|
~OldFiveCreater();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent);
|
||||||
|
public:
|
||||||
|
virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color);
|
||||||
|
};
|
||||||
|
|
||||||
160
NameCreater/TowelCreater.cpp
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
#include "TowelCreater.h"
|
||||||
|
#include <QTextCodec>
|
||||||
|
#include <QTextStream>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QDateTime>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static QString LABEL_BG_PATH[] = { ":/NameCreater/resource/girl_bg.jpg",":/NameCreater/resource/boy_bg.jpg" };
|
||||||
|
static qreal LABEL_POS_X[] = { 250,1645,3300 };
|
||||||
|
|
||||||
|
static qreal LABEL_POS_Y_START = 120;
|
||||||
|
static qreal LABEL_POS_Y_DIFF = 315;
|
||||||
|
|
||||||
|
|
||||||
|
static qreal NAME_OFFSET_X[] = { 128, 715 };
|
||||||
|
static qreal NAME_OFFSET_Y = 38;
|
||||||
|
static qreal NAME_TWO_WORD_OFFSET = 25;
|
||||||
|
|
||||||
|
static int MAX_LABEL_IN_PAPER = 15;
|
||||||
|
static int LABEL_MAX_NUM_PER_COL = 7;
|
||||||
|
static int FONT_PIXEL_SIZE = 240;
|
||||||
|
|
||||||
|
static qreal LABEL_HIGHT_LIMIT = 350;
|
||||||
|
static int TEXT_WIDTH = 800;
|
||||||
|
|
||||||
|
TowelCreater::TowelCreater()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
TowelCreater::~TowelCreater()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<NameInfo_t> TowelCreater::getNameByFileContent(Name_Type_e type, const QByteArray& conetent)
|
||||||
|
{
|
||||||
|
|
||||||
|
QList<NameInfo_t> nameList;
|
||||||
|
|
||||||
|
QTextCodec* tc = QTextCodec::codecForName("Big5");
|
||||||
|
QString codec = tc->toUnicode(conetent.data());
|
||||||
|
QTextStream stream(&codec);
|
||||||
|
|
||||||
|
int row = 0;
|
||||||
|
while (!stream.atEnd())
|
||||||
|
{
|
||||||
|
|
||||||
|
QString line = stream.readLine();
|
||||||
|
QString name_tc = line;
|
||||||
|
QStringList csvList = name_tc.split(',');
|
||||||
|
|
||||||
|
|
||||||
|
QString name = csvList.at(0); //QString::fromLocal8Bit(csvList.at(0));
|
||||||
|
QString bg_type = csvList.at(1);//QString::fromLocal8Bit(csvList.at(1));
|
||||||
|
int num = csvList.last().toInt();//QString::fromLocal8Bit(csvList.last());
|
||||||
|
qDebug() << "row :" << row << " " << name << ", bg_type: " << bg_type << "Count: " <<QString::number(num);
|
||||||
|
|
||||||
|
if (name.compare("name") == 0) {
|
||||||
|
//pass first line
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (int i = 0; i < num; ++i) {
|
||||||
|
NameInfo_t info;
|
||||||
|
info.name1 = name;
|
||||||
|
info.bg_type = (bg_type.compare("g") == 0) ? 0 : 1;
|
||||||
|
nameList.append(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
row++;
|
||||||
|
}
|
||||||
|
return nameList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void TowelCreater::generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color)
|
||||||
|
{
|
||||||
|
int export_times = 0;
|
||||||
|
|
||||||
|
QList<NameInfo_t> nameList = getNameByFileContent(type, filecontent);
|
||||||
|
if (nameList.isEmpty()) {
|
||||||
|
QMessageBox msgBox;
|
||||||
|
msgBox.setText(QString("Name is empty ! ").append(filename));
|
||||||
|
msgBox.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
QGraphicsScene scene;
|
||||||
|
scene.setBackgroundBrush(QBrush(QColor(255, 255, 255)));
|
||||||
|
QGraphicsView view(&scene);
|
||||||
|
|
||||||
|
|
||||||
|
for (int idx = 0; idx < nameList.length(); idx++) {
|
||||||
|
NameInfo_t name = nameList.at(idx);
|
||||||
|
if ((idx % MAX_LABEL_IN_PAPER) == 0) {
|
||||||
|
QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, BG_WIDTH, BG_HEIGHT);
|
||||||
|
bg_item->setBrush(QBrush(QColor(255, 255, 255)));
|
||||||
|
//QGraphicsPixmapItem* bg_item = QGraphicsPixmapItem(QPixmap(BG_SMAPLE_PATH));
|
||||||
|
scene.addItem(bg_item);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int col_idx = (idx % MAX_LABEL_IN_PAPER) / LABEL_MAX_NUM_PER_COL;
|
||||||
|
int col_num = (idx % MAX_LABEL_IN_PAPER) % LABEL_MAX_NUM_PER_COL;
|
||||||
|
|
||||||
|
QString label_rel_path = LABEL_BG_PATH[name.bg_type];
|
||||||
|
|
||||||
|
if (col_idx < 2) {
|
||||||
|
QGraphicsPixmapItem* label_item = new QGraphicsPixmapItem(QPixmap(label_rel_path));
|
||||||
|
label_item->setPos(LABEL_POS_X[col_idx], LABEL_POS_Y_START + LABEL_POS_Y_DIFF * col_num);
|
||||||
|
label_item->setOpacity(1);
|
||||||
|
scene.addItem(label_item);
|
||||||
|
|
||||||
|
for (int i = 0; i < 2; ++i) {
|
||||||
|
qreal offset_x = name.name1.count() == 2 ? NAME_TWO_WORD_OFFSET : 0;
|
||||||
|
QGraphicsTextItem* name_item = new QGraphicsTextItem(name.name1);
|
||||||
|
name_item->setTextWidth(TEXT_WIDTH);
|
||||||
|
name_item->setFont(font);
|
||||||
|
name_item->setDefaultTextColor(font_color);
|
||||||
|
name_item->setPos(label_item->x() + NAME_OFFSET_X[i] + offset_x, label_item->y() + NAME_OFFSET_Y);
|
||||||
|
scene.addItem(name_item);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
QGraphicsPixmapItem* label_item = new QGraphicsPixmapItem(QPixmap(label_rel_path));
|
||||||
|
label_item->setRotation(90);
|
||||||
|
label_item->setPos(LABEL_POS_X[col_idx], LABEL_POS_Y_START + LABEL_POS_Y_DIFF * col_num);
|
||||||
|
label_item->setOpacity(1);
|
||||||
|
scene.addItem(label_item);
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i < 2; ++i) {
|
||||||
|
qreal offset_x = name.name1.count() == 2 ? NAME_TWO_WORD_OFFSET : 0;
|
||||||
|
QGraphicsTextItem* name_item = new QGraphicsTextItem(name.name1);
|
||||||
|
name_item->setTextWidth(TEXT_WIDTH);
|
||||||
|
name_item->setFont(font);
|
||||||
|
name_item->setDefaultTextColor(font_color);
|
||||||
|
name_item->setRotation(90);
|
||||||
|
name_item->setPos(label_item->x() - NAME_OFFSET_Y, label_item->y() + NAME_OFFSET_X[i] + offset_x);
|
||||||
|
scene.addItem(name_item);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((idx % MAX_LABEL_IN_PAPER == MAX_LABEL_IN_PAPER - 1) || idx == nameList.count() - 1) {
|
||||||
|
QString date_str = QDateTime::currentDateTime().toString("MMddhhmm");
|
||||||
|
QString file_name = QString("Towel_%2_%1.jpg").arg(QString::number(export_times + 1), date_str);
|
||||||
|
saveToImage(file_name, &scene);
|
||||||
|
export_times++;
|
||||||
|
|
||||||
|
scene.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
14
NameCreater/TowelCreater.h
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "INameCreater.h"
|
||||||
|
class TowelCreater : public INameCreater
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TowelCreater();
|
||||||
|
~TowelCreater();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent);
|
||||||
|
public:
|
||||||
|
virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color);
|
||||||
|
};
|
||||||
|
|
||||||
BIN
NameCreater/_exp/FontsFree-Net-Acumin-Pro-Semibold.ttf
Normal file
BIN
NameCreater/_exp/TaiwanPearl-SemiBold.ttf
Normal file
BIN
NameCreater/_exp/W1.ttc
Normal file
26
NameCreater/_exp/五入拆單入範例.csv
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
name_1,bg_type
|
||||||
|
艾小沙,1
|
||||||
|
夏小,2
|
||||||
|
吳苡需,3
|
||||||
|
尹小,4
|
||||||
|
艾小,5
|
||||||
|
夏小,g
|
||||||
|
吳苡,b
|
||||||
|
尹小,y
|
||||||
|
艾小,r
|
||||||
|
夏小,g
|
||||||
|
艾小,6
|
||||||
|
夏小天,7
|
||||||
|
艾小沙,8
|
||||||
|
夏小,9
|
||||||
|
吳苡需,10
|
||||||
|
陳守志,11
|
||||||
|
陳宣愉,12
|
||||||
|
吳佳鈴,13
|
||||||
|
陳守志,14
|
||||||
|
陳宣愉,15
|
||||||
|
吳佳鈴,16
|
||||||
|
陳守志,17
|
||||||
|
陳宣愉,18
|
||||||
|
吳佳鈴,19
|
||||||
|
艾小沙,20
|
||||||
|
32
NameCreater/_exp/五入拆單入範例_中英.csv
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
name_1,eng_name,bg_type
|
||||||
|
¦ã¤p¨F,Elsa,1
|
||||||
|
®L¤p,Ana,2
|
||||||
|
§dÐw»Ý,Jolin,3
|
||||||
|
¤¨¤p,Elsa,4
|
||||||
|
¦ã¤p,Elsa,5
|
||||||
|
®L¤p,Elsa,g
|
||||||
|
§dÐw,Elsa,b
|
||||||
|
¤¨¤p,Elsa,y
|
||||||
|
¦ã¤p,Elsa,r
|
||||||
|
®L¤p,Elsa,g
|
||||||
|
¦ã¤p,Elsa,21
|
||||||
|
®L¤p¤Ñ,Elsa,22
|
||||||
|
¦ã¤p¨F,Elsa,23
|
||||||
|
®L¤p,Elsa,24
|
||||||
|
§dÐw»Ý,Elsa,10
|
||||||
|
³¯¦u§Ó,ShouChih,11
|
||||||
|
³¯«Å´r,Shirly,12
|
||||||
|
§d¨Î¹a,Elsa,13
|
||||||
|
³¯¦u§Ó,Elsa,14
|
||||||
|
³¯«Å´r,Elsa,15
|
||||||
|
§d¨Î¹a,Jolin,16
|
||||||
|
³¯¦u§Ó,Elsa,17
|
||||||
|
³¯«Å´r,Elsa,18
|
||||||
|
§d¨Î¹a,Elsa,19
|
||||||
|
¦ã¤p¨F,Elsa,25
|
||||||
|
¦ã¤p¨F,Elsa,26
|
||||||
|
¦ã¤p¨F,Elsa,27
|
||||||
|
¦ã¤p¨F,Elsa,28
|
||||||
|
¦ã¤p¨F,Elsa,29
|
||||||
|
¦ã¤p¨F,Elsa,30
|
||||||
|
¦ã¤p¨F,Elsa,1
|
||||||
|
21
NameCreater/_exp/五入組範例.csv
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
name,bg_type
|
||||||
|
林禮諾,kb
|
||||||
|
陳宣愉,kb
|
||||||
|
陳宣愉,kg
|
||||||
|
陳宣愉,kg
|
||||||
|
陳宣愉,nb
|
||||||
|
陳宣愉,nb
|
||||||
|
李能安,ng
|
||||||
|
陳宣愉,ng
|
||||||
|
陳宣愉,g
|
||||||
|
李能安,b
|
||||||
|
陳守志,nb
|
||||||
|
陳志,ng
|
||||||
|
陳守志,g
|
||||||
|
陳守志,g
|
||||||
|
陳志,b
|
||||||
|
吳佳鈴,b
|
||||||
|
吳佳鈴,ng
|
||||||
|
吳鈴,kg
|
||||||
|
吳鈴,kb
|
||||||
|
吳鈴,nb
|
||||||
|
61
NameCreater/_exp/客制背景範例_中.csv
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
name
|
||||||
|
曹瑀樂
|
||||||
|
謝沛希
|
||||||
|
何采璇
|
||||||
|
余梓鳳
|
||||||
|
陳品臻
|
||||||
|
邱媺涵
|
||||||
|
翁菀妏
|
||||||
|
鄭欣妮
|
||||||
|
林昱澔
|
||||||
|
林和緻
|
||||||
|
王芃宥
|
||||||
|
蔡曉蓉
|
||||||
|
郭乃甄
|
||||||
|
詹斐晴
|
||||||
|
游子萱
|
||||||
|
陳玟如
|
||||||
|
黃子芩
|
||||||
|
張凱晴
|
||||||
|
陳珈琳
|
||||||
|
曾靖媞
|
||||||
|
黃芷璿
|
||||||
|
吳子弘
|
||||||
|
黃珮綺
|
||||||
|
何飛翰
|
||||||
|
林筱芙
|
||||||
|
汪詩軒
|
||||||
|
蘇竹君
|
||||||
|
蔡芊薏
|
||||||
|
陳品蓁
|
||||||
|
林聿安
|
||||||
|
曾逸星
|
||||||
|
鄭亞兒
|
||||||
|
陳尚青
|
||||||
|
呂惠玉
|
||||||
|
陳品勳
|
||||||
|
鍾承羲
|
||||||
|
簡君恬
|
||||||
|
翁承毅
|
||||||
|
陳婕熙
|
||||||
|
柯彥辰
|
||||||
|
陳星月
|
||||||
|
張宸菲
|
||||||
|
林秭安
|
||||||
|
王宇安
|
||||||
|
林采睫
|
||||||
|
吳宇晴
|
||||||
|
王芷甯
|
||||||
|
巫少杰
|
||||||
|
易庭安
|
||||||
|
陳宥博
|
||||||
|
黃乙蔓
|
||||||
|
何盈萱
|
||||||
|
楊蕙慈
|
||||||
|
林珆安
|
||||||
|
吳秀一
|
||||||
|
鄭金柔
|
||||||
|
鄭碩軒
|
||||||
|
白浚緯
|
||||||
|
紀艾德
|
||||||
|
辛翊僑
|
||||||
|
5
NameCreater/_exp/小方巾範例.csv
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
name,bg_type,num
|
||||||
|
³¯¦u§Ó,b,16
|
||||||
|
§d¨Î¹a,g,13
|
||||||
|
«Å´r,b,1
|
||||||
|
«Å´r,g,2
|
||||||
|
21
NameCreater/_exp/手帕夾範例.csv
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
name,bg_type
|
||||||
|
§d¦t°a,a
|
||||||
|
Á¤_¹ä,m
|
||||||
|
Á¤_¹ä,g
|
||||||
|
Á¤_¹ä,b
|
||||||
|
Á¤_¹ä,w
|
||||||
|
²ÀÇ,r
|
||||||
|
¸â¨°ºÓ,pg
|
||||||
|
¸â¨°ºÓ,y
|
||||||
|
¸â¨°ºÓ,b
|
||||||
|
¸â¨°ºÓ,p
|
||||||
|
¸â¨°ºÓ,g
|
||||||
|
³¯§Ó,st
|
||||||
|
³¯¦u§Ó,r
|
||||||
|
³¯¦u§Ó,p
|
||||||
|
³¯§Ó,r
|
||||||
|
§d¨Î¹a,y
|
||||||
|
§d¨Î¹a,y
|
||||||
|
§d¹a,y
|
||||||
|
§d¹a,p
|
||||||
|
§d¹a,st
|
||||||
|
21
NameCreater/_exp/生日禮範例.csv
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
name,bg_type
|
||||||
|
Á¤_¹ä,a
|
||||||
|
Á¤_¹ä,pg
|
||||||
|
Á¤_¹ä,r
|
||||||
|
Á¤_¹ä,r
|
||||||
|
Á¤_¹ä,r
|
||||||
|
¸â¨°ºÓ,sn
|
||||||
|
¸â¨°ºÓ,co
|
||||||
|
¸â¨°ºÓ,ol
|
||||||
|
¸â¨°ºÓ,m
|
||||||
|
¸â¨°ºÓ,y
|
||||||
|
¸â¨°ºÓ,b
|
||||||
|
³¯§Ó,g
|
||||||
|
³¯¦u§Ó,m
|
||||||
|
³¯¦u§Ó,p
|
||||||
|
³¯§Ó,r
|
||||||
|
§d¨Î¹a,co
|
||||||
|
§d¨Î¹a,ol
|
||||||
|
§d¹a,sn
|
||||||
|
§d¹a,st
|
||||||
|
§d¹a,b
|
||||||
|
21
NameCreater/_exp/生日禮範例_中英.csv
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
name,eng_name,bg_type
|
||||||
|
Á¤_¹ä,Alice,r
|
||||||
|
Á¤_¹ä,Alice,r
|
||||||
|
Á¤_¹ä,Alice,r
|
||||||
|
Á¤_¹ä,Alice,r
|
||||||
|
Á¤_¹ä,Alice,r
|
||||||
|
¸â¨°ºÓ,George,sn
|
||||||
|
¸â¨°ºÓ,George,co
|
||||||
|
¸â¨°ºÓ,George,ol
|
||||||
|
¸â¨°ºÓ,George,m
|
||||||
|
¸â¨°ºÓ,George,y
|
||||||
|
¸â¨°ºÓ,George,b
|
||||||
|
³¯§Ó,Jolin,g
|
||||||
|
³¯¦u§Ó,Chirs,m
|
||||||
|
³¯¦u§Ó,xxxxxxxdgde,p
|
||||||
|
³¯§Ó,gfdgadgdd,r
|
||||||
|
§d¨Î¹a,Jolin,co
|
||||||
|
§d¨Î¹a,Jolin,ol
|
||||||
|
§d¹a,Jessica,sn
|
||||||
|
§d¹a,Arial,st
|
||||||
|
§d¹a,Arial,b
|
||||||
|
21
NameCreater/_exp/生日禮範例_英英.csv
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
eng_name,bg_type
|
||||||
|
Churchill,m
|
||||||
|
Alice,r
|
||||||
|
Alice,r
|
||||||
|
Alice,r
|
||||||
|
Alice,r
|
||||||
|
George,sn
|
||||||
|
George,co
|
||||||
|
George,ol
|
||||||
|
George,m
|
||||||
|
George,y
|
||||||
|
George,b
|
||||||
|
Jolin,g
|
||||||
|
Chirs,m
|
||||||
|
xxxxxxxdgde,p
|
||||||
|
gfdgadgdd,r
|
||||||
|
Jolin,co
|
||||||
|
Jolin,ol
|
||||||
|
Jessica,sn
|
||||||
|
Arial,st
|
||||||
|
Arial,b
|
||||||
|
264
NameCreater/customlogo.cpp
Normal file
@ -0,0 +1,264 @@
|
|||||||
|
#include "customlogo.h"
|
||||||
|
#include "ui_customlogo.h"
|
||||||
|
#include "QFileDialog"
|
||||||
|
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QDateTime>
|
||||||
|
#include <QTextCodec>
|
||||||
|
#include <QTextStream>
|
||||||
|
#include <QBuffer>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
|
||||||
|
static QPointF BG_POS[] = {
|
||||||
|
QPointF(159, 61), QPointF(482, 61), QPointF(802, 61),
|
||||||
|
QPointF(1122, 61), QPointF(1449, 61), QPointF(1772, 61),
|
||||||
|
QPointF(2095, 61), QPointF(2414, 61), QPointF(2738, 61),
|
||||||
|
QPointF(3060, 61), QPointF(900, 2094), QPointF(900, 2420),
|
||||||
|
};
|
||||||
|
|
||||||
|
static int BG_POS_COUNT = sizeof(BG_POS) / sizeof(BG_POS[0]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static QPointF NAME_OFFSET_START = QPointF(79, 377);
|
||||||
|
static qreal EACH_WORD_OFFSET = 142;
|
||||||
|
|
||||||
|
static QColor FONT_COLOR = QColor(0, 0, 0);
|
||||||
|
|
||||||
|
CustomLogo::CustomLogo(QFont* font, QDialog* parent):
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::CustomLogo),
|
||||||
|
customFont(font)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
|
||||||
|
connect(ui->load_bg_btn, &QPushButton::released,this, &CustomLogo::onClickedBtn);
|
||||||
|
connect(ui->load_list_btn, &QPushButton::released, this, &CustomLogo::onClickedBtn);
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}else{
|
||||||
|
qDebug()<<"Data content not image format";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
QFileDialog::getOpenFileContent("Image (*.jpg)", fileContentReady);
|
||||||
|
}
|
||||||
|
|
||||||
|
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 % BG_POS_COUNT;
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QGraphicsPixmapItem* name_bgItem = new QGraphicsPixmapItem(*ui->display_label->pixmap());
|
||||||
|
bool rot = (idx == 10 || idx == 11);
|
||||||
|
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));
|
||||||
|
msgBox.exec();
|
||||||
|
}
|
||||||
|
QString name = name_info.name1;
|
||||||
|
int name_len = name.length();
|
||||||
|
for (int j = 0; j < 1; j++) { // never reverse
|
||||||
|
int pos_idx = idx * 2 + j;
|
||||||
|
qreal xscale, yscale;
|
||||||
|
|
||||||
|
xscale = yscale = (j == 1) ? -1 : 1;
|
||||||
|
QPointF pos = NAME_OFFSET_START;
|
||||||
|
qreal y_offset = 0;
|
||||||
|
if (name_len == 2) {
|
||||||
|
if (!rot) {
|
||||||
|
pos.setY(pos.y() + 82.0 * xscale);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pos.setX(pos.x() + 82.0 * xscale);
|
||||||
|
|
||||||
|
}
|
||||||
|
y_offset = 25;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int k = 0; k < name_len; k++) {
|
||||||
|
QGraphicsTextItem* textItem = new QGraphicsTextItem(name.mid(k, 1), name_bgItem);
|
||||||
|
textItem->setFont(*customFont);
|
||||||
|
textItem->setDefaultTextColor(FONT_COLOR);
|
||||||
|
textItem->setPos(pos.x(),pos.y() + k* EACH_WORD_OFFSET + y_offset);
|
||||||
|
textItem->setTransform(QTransform::fromScale(xscale, yscale));
|
||||||
|
scene.addItem(textItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<NameInfo_t> CustomLogo::getNameByFileContent(Name_Type_e type, const QByteArray& conetent)
|
||||||
|
{
|
||||||
|
QList<NameInfo_t> nameList;
|
||||||
|
|
||||||
|
QTextCodec* tc = QTextCodec::codecForName("Big5");
|
||||||
|
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::onClickedBtn() {
|
||||||
|
auto sender = (QPushButton*)QObject::sender();
|
||||||
|
|
||||||
|
if (sender == ui->load_bg_btn) {
|
||||||
|
loadBGFromFile();
|
||||||
|
}
|
||||||
|
else if (sender == ui->load_list_btn) {
|
||||||
|
loadListFromFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CustomLogo::saveToImage(const QString& filename, QGraphicsScene* scene)
|
||||||
|
{
|
||||||
|
scene->clearSelection(); // Selections would also render to the file
|
||||||
|
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
|
||||||
|
image.fill(Qt::transparent); // Start all pixels transparent
|
||||||
|
int dpm = 300 / 0.0254; // ~300 DPI
|
||||||
|
image.setDotsPerMeterX(dpm);
|
||||||
|
image.setDotsPerMeterY(dpm);
|
||||||
|
|
||||||
|
|
||||||
|
QPainter painter(&image);
|
||||||
|
scene->render(&painter);
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
QString folder_name = QCoreApplication::applicationDirPath() + "/../../../export_" + QDateTime::currentDateTime().toString("yyyyMMdd");
|
||||||
|
#else
|
||||||
|
QString folder_name = QCoreApplication::applicationDirPath() + "/export_" + QDateTime::currentDateTime().toString("yyyyMMdd");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
image.save(filename, "JPEG");
|
||||||
|
|
||||||
|
QByteArray imageData;
|
||||||
|
QBuffer buffer(&imageData);
|
||||||
|
buffer.open(QIODevice::WriteOnly);
|
||||||
|
QPixmap pixmap = QPixmap::fromImage(image);
|
||||||
|
pixmap.save(&buffer, "JPEG", 100); // You can also use other formats like "JPEG" or "BMP"
|
||||||
|
|
||||||
|
QFileDialog::saveFileContent(imageData, filename);
|
||||||
|
|
||||||
|
}
|
||||||
39
NameCreater/customlogo.h
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#ifndef CUSTOMLOGO_H
|
||||||
|
#define CUSTOMLOGO_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
#include "INameCreater.h"
|
||||||
|
#include "QFont"
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
void loadBGFromFile();
|
||||||
|
void loadListFromFile();
|
||||||
|
void gerneraImageFromList(const QList<NameInfo_t>& nameList, Name_Type_e type);
|
||||||
|
void saveToImage(const QString& filename, QGraphicsScene* scene);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QList<NameInfo_t> getNameByFileContent(Name_Type_e type, const QByteArray& conetent);
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void onClickedBtn();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CUSTOMLOGO_H
|
||||||
66
NameCreater/customlogo.ui
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
<?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>1741</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QLabel" name="display_label">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>293</width>
|
||||||
|
<height>1715</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap resource="NameCreater.qrc">:/NameCreater/resource/custom_logo/bg_1.jpg</pixmap>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<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>
|
||||||
|
<resources>
|
||||||
|
<include location="NameCreater.qrc"/>
|
||||||
|
</resources>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
6
NameCreater/def.h
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef DEF_H
|
||||||
|
#define DEF_H
|
||||||
|
|
||||||
|
#define VERSION "v2.7.1"
|
||||||
|
|
||||||
|
#endif // DEF_H
|
||||||
@ -1,237 +1,11 @@
|
|||||||
#include "NameCreater.h"
|
#include "NameCreater.h"
|
||||||
#include <QtWidgets/QApplication>
|
#include <QtWidgets/QApplication>
|
||||||
#include <QTextCodec>
|
|
||||||
#include <QGraphicsScene>
|
|
||||||
#include <QGraphicsView>
|
|
||||||
#include <QGraphicsPixmapItem>
|
|
||||||
#include <QGraphicsTextItem>
|
|
||||||
#include <QFile>
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QDir>
|
|
||||||
#include <QDateTime>
|
|
||||||
#include <QFontDatabase>
|
|
||||||
|
|
||||||
#define BG_MIX_PATH ":/NameCreater/resource/background.jpg"
|
|
||||||
#define BG_BOY_PATH ":/NameCreater/resource/background_boy.jpg"
|
|
||||||
#define BG_GIRL_PATH ":/NameCreater/resource/background_girl.jpg"
|
|
||||||
#define FONT_NAME "DFYuanStd-W8.otf"
|
|
||||||
#define FONT_SIZE 120
|
|
||||||
//#define FONT_SIZE 74
|
|
||||||
|
|
||||||
#define BG_MIX_TYPE_STR "mix"
|
|
||||||
#define BG_BOY_TYPE_STR "boy"
|
|
||||||
#define BG_GIRL_TYPE_STR "girl"
|
|
||||||
|
|
||||||
struct NameInfo_t {
|
|
||||||
QString name1;
|
|
||||||
QString name2;
|
|
||||||
int bg_type;
|
|
||||||
};
|
|
||||||
|
|
||||||
static QPointF BOY_POS[] = {
|
|
||||||
QPointF(235, 387), QPointF(366, 1433),
|
|
||||||
QPointF(555, 387), QPointF(692, 1433),
|
|
||||||
QPointF(878, 387), QPointF(1014, 1433),
|
|
||||||
QPointF(1200, 387), QPointF(1337, 1433),
|
|
||||||
QPointF(1527, 387), QPointF(1663, 1433),
|
|
||||||
};
|
|
||||||
|
|
||||||
static int BOY_POS_COUNT = sizeof(BOY_POS) / sizeof(BOY_POS[0]);
|
|
||||||
|
|
||||||
|
|
||||||
static QPointF GIRL_POS[] = {
|
|
||||||
QPointF(1854, 387), QPointF(1987, 1433),
|
|
||||||
QPointF(2176, 387), QPointF(2314, 1433),
|
|
||||||
QPointF(2498, 387), QPointF(2635, 1433),
|
|
||||||
QPointF(2821, 387), QPointF(2958, 1433),
|
|
||||||
QPointF(3147, 387), QPointF(3285, 1433),
|
|
||||||
};
|
|
||||||
|
|
||||||
static int GIRL_POS_COUNT = sizeof(GIRL_POS) / sizeof(GIRL_POS[0]);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void saveToImage(const QString& filename, QGraphicsScene* scene) {
|
|
||||||
|
|
||||||
scene->clearSelection(); // Selections would also render to the file
|
|
||||||
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
|
|
||||||
image.fill(Qt::transparent); // Start all pixels transparent
|
|
||||||
int dpm = 300 / 0.0254; // ~300 DPI
|
|
||||||
image.setDotsPerMeterX(dpm);
|
|
||||||
image.setDotsPerMeterY(dpm);
|
|
||||||
|
|
||||||
|
|
||||||
QPainter painter(&image);
|
|
||||||
scene->render(&painter);
|
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
QString folder_name = QCoreApplication::applicationDirPath()+"/../../../export_" + QDateTime::currentDateTime().toString("yyyyMMdd");
|
|
||||||
#else
|
|
||||||
QString folder_name = QCoreApplication::applicationDirPath() + "/export_" + QDateTime::currentDateTime().toString("yyyyMMdd");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
qDebug() << "folder_name :" << folder_name;
|
|
||||||
if (!QDir(folder_name).exists()) {
|
|
||||||
QDir().mkdir(folder_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
image.save(QString(folder_name).append("/").append(filename), "JPG", 100);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QList<NameInfo_t> getNameByFile(const QString& filename) {
|
|
||||||
QList<NameInfo_t> nameList;
|
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
QString root_path = QCoreApplication::applicationDirPath() + "/../../../";
|
|
||||||
#else
|
|
||||||
QString root_path = QCoreApplication::applicationDirPath() + "/";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
QFile file(root_path.append(filename));
|
|
||||||
|
|
||||||
if (!file.open(QIODevice::ReadOnly)) {
|
|
||||||
QMessageBox msgBox;
|
|
||||||
msgBox.setText("Load file failed!");
|
|
||||||
msgBox.exec();
|
|
||||||
file.close();
|
|
||||||
return nameList;
|
|
||||||
}
|
|
||||||
|
|
||||||
int row = 0;
|
|
||||||
QTextCodec *tc = QTextCodec::codecForName("Big5");
|
|
||||||
while (!file.atEnd())
|
|
||||||
{
|
|
||||||
NameInfo_t info;
|
|
||||||
QByteArray line = file.readLine();
|
|
||||||
QString name_tc = tc->toUnicode(line);
|
|
||||||
QStringList csvList = name_tc.split(',');
|
|
||||||
|
|
||||||
|
|
||||||
QString name1 = csvList.at(0); //QString::fromLocal8Bit(csvList.at(0));
|
|
||||||
QString name2 = csvList.at(1);//QString::fromLocal8Bit(csvList.at(1));
|
|
||||||
QString type_str = csvList.last();//QString::fromLocal8Bit(csvList.last());
|
|
||||||
qDebug() << "row :" << row << " " << name1 << " " << name2;
|
|
||||||
|
|
||||||
if (name1.compare("name_1") == 0 || name2.compare("name_2") == 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
info.name1 = name1;
|
|
||||||
info.name2 = name2;
|
|
||||||
info.bg_type = type_str.contains(QRegExp("boy")) ? 1 : (type_str.contains(QRegExp("girl"))) ? 2 : 0;
|
|
||||||
|
|
||||||
nameList.append(info);
|
|
||||||
|
|
||||||
row++;
|
|
||||||
}
|
|
||||||
file.close();
|
|
||||||
return nameList;
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
int export_times = 0;
|
|
||||||
|
QApplication a(argc, argv);
|
||||||
|
NameCreater w;
|
||||||
|
w.show();
|
||||||
QApplication a(argc, argv);
|
return a.exec();
|
||||||
// NameCreater w;
|
|
||||||
// w.show();
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
QString root_path = QCoreApplication::applicationDirPath() + "/../../../";
|
|
||||||
#else
|
|
||||||
QString root_path = QCoreApplication::applicationDirPath() + "/";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QString font_path = root_path.append(FONT_NAME);
|
|
||||||
QFile font_res(font_path);
|
|
||||||
if (!font_res.open(QIODevice::ReadOnly)) {
|
|
||||||
QMessageBox msgBox;
|
|
||||||
msgBox.setText("Can not load font file!" + font_path);
|
|
||||||
msgBox.exec();
|
|
||||||
font_res.close();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
int id = QFontDatabase::addApplicationFontFromData(font_res.readAll());
|
|
||||||
QStringList family_list = QFontDatabase::applicationFontFamilies(id);
|
|
||||||
QFont font = QFont(family_list.at(0));
|
|
||||||
font.setPixelSize(FONT_SIZE);
|
|
||||||
QColor font_color(0, 0, 0);
|
|
||||||
|
|
||||||
|
|
||||||
QList<NameInfo_t> nameList = getNameByFile("name.csv");
|
|
||||||
if (nameList.isEmpty()) {
|
|
||||||
QMessageBox msgBox;
|
|
||||||
msgBox.setText(("Name is empty !"));
|
|
||||||
msgBox.exec();
|
|
||||||
}
|
|
||||||
|
|
||||||
QGraphicsScene scene;
|
|
||||||
QGraphicsView view(&scene);
|
|
||||||
|
|
||||||
|
|
||||||
for (int n = 0; n < nameList.length(); n++) {
|
|
||||||
//msgBox.setText(QString().sprintf("Export: %d / %d", export_times, nameList.length()));
|
|
||||||
|
|
||||||
NameInfo_t name_info = nameList.at(n);
|
|
||||||
|
|
||||||
scene.clear();
|
|
||||||
QImage image((name_info.bg_type == 1) ? BG_BOY_PATH : (name_info.bg_type == 2) ? BG_GIRL_PATH : BG_MIX_PATH);
|
|
||||||
QGraphicsPixmapItem* bgItem = new QGraphicsPixmapItem(QPixmap::fromImage(image));
|
|
||||||
scene.addItem(bgItem);
|
|
||||||
|
|
||||||
|
|
||||||
for (int j = 0; j < 2; j++) {
|
|
||||||
int flag = j % 2;
|
|
||||||
QString name = (flag == 0) ? name_info.name1 : name_info.name2;
|
|
||||||
for (int i = 0; i < BOY_POS_COUNT; i++) {
|
|
||||||
int xscale, yscale;
|
|
||||||
xscale = yscale = (i % 2 == 1) ? -1 : 1;
|
|
||||||
QPointF pos = (flag == 0) ? BOY_POS[i] : GIRL_POS[i];
|
|
||||||
|
|
||||||
QGraphicsTextItem* textItem1 = new QGraphicsTextItem(name.mid(0, 1));
|
|
||||||
textItem1->setFont(font);
|
|
||||||
textItem1->setDefaultTextColor(font_color);
|
|
||||||
textItem1->setPos(pos);
|
|
||||||
textItem1->setTransform(QTransform::fromScale(xscale, yscale));
|
|
||||||
scene.addItem(textItem1);
|
|
||||||
|
|
||||||
QGraphicsTextItem* textItem2 = new QGraphicsTextItem(name.mid(1, 1));
|
|
||||||
textItem2->setFont(font);
|
|
||||||
textItem2->setDefaultTextColor(font_color);
|
|
||||||
textItem2->setPos(pos.x(), pos.y() + 148 * xscale);
|
|
||||||
textItem2->setTransform(QTransform::fromScale(xscale, yscale));
|
|
||||||
scene.addItem(textItem2);
|
|
||||||
|
|
||||||
QGraphicsTextItem* textItem3 = new QGraphicsTextItem(name.mid(2, 1));
|
|
||||||
textItem3->setFont(font);
|
|
||||||
textItem3->setDefaultTextColor(font_color);
|
|
||||||
textItem3->setPos(pos.x(), pos.y() + 294 * xscale);
|
|
||||||
textItem3->setTransform(QTransform::fromScale(xscale, yscale));
|
|
||||||
scene.addItem(textItem3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// if (name_info.bg_type == 0) {
|
|
||||||
// view.show();
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
|
|
||||||
QString file_name = QString("%1_%2_%3.jpg").arg(QString::number(export_times+1),name_info.name1,name_info.name2);
|
|
||||||
saveToImage(file_name, &scene);
|
|
||||||
export_times++;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QMessageBox msgBox;
|
|
||||||
msgBox.setText(QString().asprintf("Export Finshed. Count:%d",export_times));
|
|
||||||
msgBox.exec();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
font_res.close();
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|||||||
14
NameCreater/resource.h
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Visual C++ generated include file.
|
||||||
|
// Used by NameCreater.rc
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
BIN
NameCreater/resource/a.jpg
Normal file
|
After Width: | Height: | Size: 219 KiB |
BIN
NameCreater/resource/b.jpg
Normal file
|
After Width: | Height: | Size: 279 KiB |
BIN
NameCreater/resource/background_1.jpg
Normal file
|
After Width: | Height: | Size: 189 KiB |
BIN
NameCreater/resource/background_10.jpg
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
NameCreater/resource/background_11.jpg
Normal file
|
After Width: | Height: | Size: 107 KiB |
BIN
NameCreater/resource/background_12.jpg
Normal file
|
After Width: | Height: | Size: 164 KiB |
BIN
NameCreater/resource/background_13.jpg
Normal file
|
After Width: | Height: | Size: 119 KiB |
BIN
NameCreater/resource/background_14.jpg
Normal file
|
After Width: | Height: | Size: 146 KiB |
BIN
NameCreater/resource/background_15.jpg
Normal file
|
After Width: | Height: | Size: 137 KiB |
BIN
NameCreater/resource/background_16.jpg
Normal file
|
After Width: | Height: | Size: 143 KiB |
BIN
NameCreater/resource/background_17.jpg
Normal file
|
After Width: | Height: | Size: 123 KiB |
BIN
NameCreater/resource/background_18.jpg
Normal file
|
After Width: | Height: | Size: 116 KiB |
BIN
NameCreater/resource/background_19.jpg
Normal file
|
After Width: | Height: | Size: 146 KiB |
BIN
NameCreater/resource/background_2.jpg
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
NameCreater/resource/background_20.jpg
Normal file
|
After Width: | Height: | Size: 176 KiB |
BIN
NameCreater/resource/background_21.jpg
Normal file
|
After Width: | Height: | Size: 322 KiB |
BIN
NameCreater/resource/background_22.jpg
Normal file
|
After Width: | Height: | Size: 266 KiB |
BIN
NameCreater/resource/background_23.jpg
Normal file
|
After Width: | Height: | Size: 239 KiB |
BIN
NameCreater/resource/background_24.jpg
Normal file
|
After Width: | Height: | Size: 228 KiB |
BIN
NameCreater/resource/background_25.jpg
Normal file
|
After Width: | Height: | Size: 158 KiB |
BIN
NameCreater/resource/background_26.jpg
Normal file
|
After Width: | Height: | Size: 225 KiB |
BIN
NameCreater/resource/background_27.jpg
Normal file
|
After Width: | Height: | Size: 224 KiB |
BIN
NameCreater/resource/background_28.jpg
Normal file
|
After Width: | Height: | Size: 348 KiB |
BIN
NameCreater/resource/background_29.jpg
Normal file
|
After Width: | Height: | Size: 290 KiB |
BIN
NameCreater/resource/background_3.jpg
Normal file
|
After Width: | Height: | Size: 156 KiB |
BIN
NameCreater/resource/background_30.jpg
Normal file
|
After Width: | Height: | Size: 239 KiB |
BIN
NameCreater/resource/background_4.jpg
Normal file
|
After Width: | Height: | Size: 167 KiB |
BIN
NameCreater/resource/background_5.jpg
Normal file
|
After Width: | Height: | Size: 135 KiB |
BIN
NameCreater/resource/background_6.jpg
Normal file
|
After Width: | Height: | Size: 149 KiB |
BIN
NameCreater/resource/background_7.jpg
Normal file
|
After Width: | Height: | Size: 180 KiB |
BIN
NameCreater/resource/background_8.jpg
Normal file
|
After Width: | Height: | Size: 177 KiB |
BIN
NameCreater/resource/background_9.jpg
Normal file
|
After Width: | Height: | Size: 223 KiB |
BIN
NameCreater/resource/background_b.jpg
Normal file
|
After Width: | Height: | Size: 225 KiB |
BIN
NameCreater/resource/background_g.jpg
Normal file
|
After Width: | Height: | Size: 238 KiB |
BIN
NameCreater/resource/background_number_smaple.jpg
Normal file
|
After Width: | Height: | Size: 1.9 MiB |
BIN
NameCreater/resource/background_r.jpg
Normal file
|
After Width: | Height: | Size: 220 KiB |
|
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 2.7 MiB |
BIN
NameCreater/resource/background_y.jpg
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
NameCreater/resource/boy_bg.jpg
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
NameCreater/resource/co.jpg
Normal file
|
After Width: | Height: | Size: 323 KiB |
BIN
NameCreater/resource/custom_logo/bg_1.jpg
Normal file
|
After Width: | Height: | Size: 381 KiB |
BIN
NameCreater/resource/custom_logo/demo_1.jpg
Normal file
|
After Width: | Height: | Size: 904 KiB |
BIN
NameCreater/resource/five/b_1.jpg
Normal file
|
After Width: | Height: | Size: 189 KiB |
BIN
NameCreater/resource/five/b_2.jpg
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
NameCreater/resource/five/b_3.jpg
Normal file
|
After Width: | Height: | Size: 156 KiB |
BIN
NameCreater/resource/five/b_4.jpg
Normal file
|
After Width: | Height: | Size: 167 KiB |
BIN
NameCreater/resource/five/b_5.jpg
Normal file
|
After Width: | Height: | Size: 135 KiB |
BIN
NameCreater/resource/five/g_1.jpg
Normal file
|
After Width: | Height: | Size: 149 KiB |
BIN
NameCreater/resource/five/g_2.jpg
Normal file
|
After Width: | Height: | Size: 180 KiB |
BIN
NameCreater/resource/five/g_3.jpg
Normal file
|
After Width: | Height: | Size: 177 KiB |
BIN
NameCreater/resource/five/g_4.jpg
Normal file
|
After Width: | Height: | Size: 223 KiB |
BIN
NameCreater/resource/five/g_5.jpg
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
NameCreater/resource/five/kb_1.jpg
Normal file
|
After Width: | Height: | Size: 322 KiB |