Compare commits
No commits in common. "master" and "2.10.1" have entirely different histories.
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,4 +8,3 @@
|
|||||||
/buildwed
|
/buildwed
|
||||||
/NameCreater/*.aps
|
/NameCreater/*.aps
|
||||||
/buildweb/
|
/buildweb/
|
||||||
/NameCreater/build/*
|
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
#define MAX_LABEL_IN_PAPER 10
|
#define MAX_LABEL_IN_PAPER 10
|
||||||
#define FONT_PIXEL_SIZE 120
|
#define FONT_PIXEL_SIZE 120
|
||||||
|
|
||||||
static QPoint LABEL_POS_START = QPoint(163, 70);
|
static QPoint LABEL_POS_START = QPoint(163, 115);
|
||||||
static QPoint NAME_OFFSET_START = QPoint(82, 712);
|
static QPoint NAME_OFFSET_START = QPoint(82, 712);
|
||||||
static QPoint NAME_OFFSET_REVERSE_START = QPoint(214, 1745);
|
static QPoint NAME_OFFSET_REVERSE_START = QPoint(214, 1745);
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ void BirthdayCreater::generaImageFromCSV(Name_Type_e type, const QString& filena
|
|||||||
|
|
||||||
int chrismas_y_offset = 0;
|
int chrismas_y_offset = 0;
|
||||||
if (name_info.name2.compare("co") == 0 || name_info.name2.compare("ol") == 0 ||
|
if (name_info.name2.compare("co") == 0 || name_info.name2.compare("ol") == 0 ||
|
||||||
/*name_info.name2.compare("st") == 0 ||*/ name_info.name2.compare("sn") == 0) {
|
name_info.name2.compare("st") == 0 || name_info.name2.compare("sn") == 0) {
|
||||||
chrismas_y_offset = 30;
|
chrismas_y_offset = 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ void BirthdayCreater::generaImageFromCSV(Name_Type_e type, const QString& filena
|
|||||||
|
|
||||||
int chrismas_y_offset = 0;
|
int chrismas_y_offset = 0;
|
||||||
if (name_info.name2.compare("co") == 0 || name_info.name2.compare("ol") == 0 ||
|
if (name_info.name2.compare("co") == 0 || name_info.name2.compare("ol") == 0 ||
|
||||||
/*name_info.name2.compare("st") == 0 ||*/ name_info.name2.compare("sn") == 0) {
|
name_info.name2.compare("st") == 0 || name_info.name2.compare("sn") == 0) {
|
||||||
chrismas_y_offset = 30;
|
chrismas_y_offset = 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,20 +203,20 @@ void BirthdayCreater::generaImageFromCSV(Name_Type_e type, const QString& filena
|
|||||||
|
|
||||||
for(int i = 0; i < 2; i++){
|
for(int i = 0; i < 2; i++){
|
||||||
qreal dir = (i == 0) ? -1.0:1.0;
|
qreal dir = (i == 0) ? -1.0:1.0;
|
||||||
qreal x_offset = (i == 0) ? 280.0 : 170.0;
|
qreal x_offset = (i == 0) ? 290.0 : 170.0;
|
||||||
qreal y_offset = (i == 0) ? 890.0 : 1550.0;
|
qreal y_offset = (i == 0) ? 890.0 : 1550.0;
|
||||||
int sp_y_offset = (i == 0)? 1.0*chrismas_y_offset:-1.0*chrismas_y_offset;
|
int sp_y_offset = (i == 0)? 1.0*chrismas_y_offset:-1.0*chrismas_y_offset;
|
||||||
//add English world
|
//add English world
|
||||||
QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng,label_item);
|
QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng);
|
||||||
eng_word_item->setFont(_new_font);
|
eng_word_item->setFont(_new_font);
|
||||||
QRectF rect = eng_word_item->boundingRect();
|
QRectF rect = eng_word_item->boundingRect();
|
||||||
eng_word_item->setDefaultTextColor(font_color);
|
eng_word_item->setDefaultTextColor(font_color);
|
||||||
|
|
||||||
eng_word_item->setRotation(i == 0 ? 90 : -90);
|
eng_word_item->setRotation(i == 0 ? 90 : -90);
|
||||||
eng_word_item->setPos(x_offset - rect.height()/2.0, y_offset + sp_y_offset + (rect.width()/2*dir));
|
eng_word_item->setPos(label_item->x() + x_offset - rect.height()/2.0, label_item->y() + y_offset + sp_y_offset + (rect.width()/2*dir));
|
||||||
|
|
||||||
|
|
||||||
//scene.addItem(eng_word_item);
|
scene.addItem(eng_word_item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -253,7 +253,7 @@ void BirthdayCreater::generaImageFromCSV(Name_Type_e type, const QString& filena
|
|||||||
|
|
||||||
int chrismas_y_offset = 0;
|
int chrismas_y_offset = 0;
|
||||||
if (name_info.name2.compare("co") == 0 || name_info.name2.compare("ol") == 0 ||
|
if (name_info.name2.compare("co") == 0 || name_info.name2.compare("ol") == 0 ||
|
||||||
/*name_info.name2.compare("st") == 0 ||*/ name_info.name2.compare("sn") == 0) {
|
name_info.name2.compare("st") == 0 || name_info.name2.compare("sn") == 0) {
|
||||||
chrismas_y_offset = 30;
|
chrismas_y_offset = 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,12 +33,10 @@
|
|||||||
|
|
||||||
//#define FONT_CHT_URL "https://bazaar1688.ddns.net/font/TaiwanPearl-SemiBold.ttf"
|
//#define FONT_CHT_URL "https://bazaar1688.ddns.net/font/TaiwanPearl-SemiBold.ttf"
|
||||||
|
|
||||||
#define FONT_JSON_URL "https://namecreater.bazaar1688.duckdns.org/font/fonts.json"
|
#define FONT_JSON_URL "https://bazaar1688.ddns.net/font/fonts.json"
|
||||||
|
|
||||||
//#define FONT_CHT_URL "http://45.32.51.135/font/TaiwanPearl-SemiBold.ttf"
|
//#define FONT_CHT_URL "http://45.32.51.135/font/TaiwanPearl-SemiBold.ttf"
|
||||||
|
|
||||||
static CustomLogo* s_custom_logo_widget = nullptr;
|
|
||||||
|
|
||||||
NameCreater::NameCreater(QWidget* parent)
|
NameCreater::NameCreater(QWidget* parent)
|
||||||
: QMainWindow(parent)
|
: QMainWindow(parent)
|
||||||
{
|
{
|
||||||
@ -251,14 +249,12 @@ void NameCreater::execCreater(QObject* sender, const QString& fileName, const QB
|
|||||||
|
|
||||||
|
|
||||||
void NameCreater::OnClickedCustomLogoBtn() {
|
void NameCreater::OnClickedCustomLogoBtn() {
|
||||||
//QEventLoop loop;
|
QEventLoop loop;
|
||||||
if (s_custom_logo_widget == nullptr) {
|
CustomLogo widget(&this->font);
|
||||||
s_custom_logo_widget = new CustomLogo(&this->font);
|
widget.show();
|
||||||
}
|
connect(&widget, &CustomLogo::finished, &loop, &QEventLoop::quit);
|
||||||
s_custom_logo_widget->show();
|
loop.exec();
|
||||||
|
qDebug() << "exit event loop";
|
||||||
//connect(&widget, &CustomLogo::finished, &loop, &QEventLoop::quit);
|
|
||||||
//loop.exec();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,6 @@ private:
|
|||||||
|
|
||||||
QFont font, font_towel, font_english;
|
QFont font, font_towel, font_english;
|
||||||
|
|
||||||
|
|
||||||
QColor font_color;
|
QColor font_color;
|
||||||
|
|
||||||
QNetworkAccessManager network_mgr;
|
QNetworkAccessManager network_mgr;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -57,7 +57,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
|
||||||
<QtInstall>$(DefaultQtVersion)</QtInstall>
|
<QtInstall>$(DefaultQtVersion)</QtInstall>
|
||||||
<QtModules>core;gui;widgets;network</QtModules>
|
<QtModules>core;gui;widgets;network;core5compat</QtModules>
|
||||||
<QtBuildConfig>debug</QtBuildConfig>
|
<QtBuildConfig>debug</QtBuildConfig>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="QtSettings">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="QtSettings">
|
||||||
|
|||||||
@ -12,5 +12,8 @@ protected:
|
|||||||
public:
|
public:
|
||||||
virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color);
|
virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#ifndef DEF_H
|
#ifndef DEF_H
|
||||||
#define DEF_H
|
#define DEF_H
|
||||||
|
|
||||||
#define VERSION "v2.10.3"
|
#define VERSION "v2.10.1"
|
||||||
|
|
||||||
|
|
||||||
#endif // DEF_H
|
#endif // DEF_H
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user