Compare commits

..

70 Commits

Author SHA1 Message Date
shouchih_chen
0e9e58a389 1. fix QNetworkRequest url is empty issue. 2. release version 2.9.0 2024-09-27 11:42:19 +08:00
shouchih_chen
7aa79287c8 1. 增加動態字形 2. fix color dialog issue in webassembly. 2024-09-27 10:17:26 +08:00
shouchih_chen
40d41b36e2 1. Add custom logo can export double name 2. add color selector for custom logo. 2024-09-26 15:20:20 +08:00
shouchih_chen
cbba28fcf5 Merge branch 'master-webassembly' into dev-webassembly
# Conflicts:
#	NameCreater/customlogo2.cpp
#	NameCreater/def.h
2024-09-26 13:53:40 +08:00
shouchih_chen
e8b68cf0c4 Improve compatibility between Qt5 and Qt6 2024-09-20 13:25:29 +08:00
shouchih_chen
1405d54f33 Merge branch 'master-webassembly' of https://gitlab.com/portfolio91/namecreater into master-webassembly
# Conflicts:
#	NameCreater/NameCreater.pro.user
#	NameCreater/customlogo2.cpp
2024-09-20 12:54:50 +08:00
16431955de Refactor code, Split QFileDialog in Webassembly and other desktop OS. 2024-09-20 12:47:26 +08:00
shouchih_chen
c13e225d29 update for testing vs 2022 2024-09-20 12:45:36 +08:00
shouchih_chen
4c92f00cb2 1. change app save path coding. 2024-09-14 16:55:57 +08:00
shouchih_chen
e8a4557906 1. update version 2.8.0. 2. change save path dir in customlogo2 in MAC setting. 2024-09-14 16:35:01 +08:00
shouchih_chen
bfab4f20da Add customlogo2 class 2024-09-14 16:20:26 +08:00
5bc600c0ec 1. Change chinese font. 2. adjust Five to Single zh_eng english x posistion. 2024-07-10 09:04:14 +08:00
shouchih_chen
17e98668b2 try show font name 2024-07-03 22:45:59 +08:00
8e9375c7ac try to fix font name not show issue. 2024-07-03 22:31:37 +08:00
shouchih_chen
de6c1a0a6b complete to load cht font from url. 2024-07-03 22:05:43 +08:00
faad6b25ef try to change cht font. 2024-07-03 20:47:58 +08:00
8277a65bdd 1. Update new five girl background. 2. Adjustment eng to eng position. 2024-06-27 17:11:19 +08:00
d3dd641a59 adjust five to signal Cht_eng arrangement method and position. 2024-06-02 17:36:42 +08:00
8bfd5da5f1 完成客制化背景產生器:
1. only finish one side name.
2. only finish chinese name and three word name.
2024-05-15 12:48:57 +08:00
599480df0f adjust BirthdayCreater eng position. 2024-05-14 15:10:25 +08:00
91ca0f21a9 adjust five to single word position. 2024-03-20 09:15:43 +08:00
2b51d7ddee modify BirthdayCreater eng position. 2024-03-14 15:03:27 +08:00
d1e80ad04c modify birthday eng to eng position. 2024-03-13 15:04:34 +08:00
5655d824d7 adjust five to signal zh_eng window and webassembly different position y issue. 2024-03-12 11:40:56 +08:00
47b543aaa7 add new resource for new five group. 2024-03-08 08:28:33 +08:00
0d14515dc3 1. add apple and pg image in birthday creator. 2. release v2.3.2 2023-10-02 08:59:52 +08:00
d9ebf66831 調整手帕夾 2023-10-02 08:44:32 +08:00
e64e06bf56 modify hk csv file 2023-08-02 22:35:36 +08:00
shouchih_chen
5bbafd6668 Modify HKHolder image resource. 2023-08-02 22:18:34 +08:00
shouchih_chen
bbc348d859 Modify for qt 6 build env 2023-08-02 05:49:54 +08:00
shouchih_chen
7a8106b539 Merge commit '052d36b520c27e916bc77e1625aa60143902b9c4' into dev-webassembly 2023-08-02 05:49:10 +08:00
shouchih_chen
052d36b520 Merge branch 'master-webassembly' of gitlab.com:portfolio91/namecreater into master-webassembly
# Conflicts:
#	NameCreater/NameCreater.pro.user
2023-07-30 20:17:33 +08:00
shouchih_chen
c5e8bba4ff add project build setting for QT 2023-07-30 20:15:55 +08:00
62e75e4ca0 modify HK label names 2023-07-30 20:13:18 +08:00
shouchih_chen 陳守志
46c669d78e use new font 2023-07-25 15:43:05 +08:00
shouchih_chen 陳守志
e14743ca15 完成中文排列對齊 2023-07-25 15:33:48 +08:00
shouchih_chen 陳守志
6ea71180c8 ongoing modify 2023-07-24 17:42:44 +08:00
shouchih_chen 陳守志
10a119e7ea ongoing implement HK holder creator function 2023-07-24 17:24:09 +08:00
shouchih_chen 陳守志
39402a800f 增加手帕夾產生器 Class 2023-07-24 15:09:50 +08:00
ShouChih Chen
3eb58b7830 Add: add birthday english 2023-05-24 21:00:34 +08:00
ShouChih Chen
c6fb017745 Modify: add QMAKE_LFLAGS for memory size in .pro file 2023-05-17 22:42:47 +08:00
Shouchih_Chen
f9cddcb565 modify: adjust english word position. 2023-05-17 16:53:41 +08:00
Shouchih_Chen
aaf3751879 Modify: change english font 2023-05-17 14:08:02 +08:00
0c5abc203c Modify: 重新下載英文對應字體,以及修改位置 2023-05-17 06:50:27 +08:00
8166fc30ae Add: 增加生日禮英文排列 2023-05-16 23:17:05 +08:00
b2602b5ef7 add name type for English name. 2023-05-13 07:37:05 +08:00
231f63295f 完成所有功能整合 2023-05-06 07:43:12 +08:00
3b6987bb8b add towel creater 2023-05-04 23:22:47 +08:00
shouchih_chen 陳守志
3da5037ca7 remove unused file 2023-05-04 11:20:14 +08:00
shouchih_chen 陳守志
2f330ac463 Porting birthday python code to c++ 2023-05-04 11:13:37 +08:00
d425173179 完成舊五入組整合 2023-05-04 06:28:54 +08:00
3b7756393e add old five code in. 2023-05-03 23:05:23 +08:00
425e9fead2 adjust FiveToSingle class 2023-05-03 22:10:09 +08:00
shouchih_chen 陳守志
1a254c4898 Merge branch 'webassembly_birthday' of https://gitlab.com/portfolio91/namecreater into webassembly_birthday
# Conflicts:
#	NameCreater/NameCreater.cpp
2023-05-03 17:38:20 +08:00
shouchih_chen 陳守志
f40a56c656 add interface files. 2023-05-03 17:37:18 +08:00
3942d7f147 build webassembly succeed. 2023-04-07 05:57:05 +08:00
shouchih_chen 陳守志
fc8bb70f56 1. save file succeed 2023-03-31 16:17:51 +08:00
shouchih_chen 陳守志
24639c50b0 web assemble testing 2023-03-31 14:40:23 +08:00
d9d110ce04 1. add new five picture 2. add x64 env 2022-12-28 22:16:02 +08:00
83fde65fae 調整位置 2022-03-26 10:16:17 +08:00
56ea07365d Merge branch 'birthday' of https://gitlab.com/portfolio91/namecreater into birthday
# Conflicts:
#	NameCreater/main.cpp
2022-03-26 07:10:19 +08:00
6009f56287 add number sample 2022-03-26 06:55:59 +08:00
shouchih_chen
dd69403ee6 修正一些錯誤 2022-03-25 22:53:47 +08:00
shouchih_chen
3ce254f16d Merge branch 'birthday' of https://gitlab.com/portfolio91/namecreater into birthday 2022-03-25 22:36:50 +08:00
shouchih_chen
1216358657 commit build setting 2022-03-25 22:36:28 +08:00
793446dcd2 1. add two word template
2. add new background
2022-03-25 22:30:29 +08:00
4fa3d9dc1c fix bg type string '/r/n' 2022-02-20 11:07:11 +08:00
shouchih_chen
27a4eb5c8b marco mac/windows handle /r/n string 2022-02-20 07:53:55 +08:00
6025cc2913 finish birthday namecreater 2022-02-20 07:27:25 +08:00
615fa0e283 finish layout adjustment. 2022-02-19 08:44:26 +08:00
26 changed files with 2963 additions and 3919 deletions

1
.gitignore vendored
View File

@ -8,4 +8,3 @@
/buildwed
/NameCreater/*.aps
/buildweb/
/NameCreater/build/*

View File

@ -13,7 +13,7 @@
#define MAX_LABEL_IN_PAPER 10
#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_REVERSE_START = QPoint(214, 1745);
@ -135,7 +135,7 @@ void BirthdayCreater::generaImageFromCSV(Name_Type_e type, const QString& filena
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) {
name_info.name2.compare("st") == 0 || name_info.name2.compare("sn") == 0) {
chrismas_y_offset = 30;
}
@ -191,7 +191,7 @@ void BirthdayCreater::generaImageFromCSV(Name_Type_e type, const QString& filena
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) {
name_info.name2.compare("st") == 0 || name_info.name2.compare("sn") == 0) {
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++){
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;
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,label_item);
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(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;
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;
}

View File

@ -177,5 +177,3 @@ int INameCreater::getFontSizebyStr(const QFont& font, int max_font_size,int max_
return font_size;
}

View File

@ -33,20 +33,14 @@
//#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"
static CustomLogo* s_custom_logo_widget = nullptr;
NameCreater::NameCreater(QWidget* parent)
: QMainWindow(parent)
{
ui.setupUi(this);
ui.scrollAreaWidgetContents->setMinimumSize(ui.frame->size());
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);
@ -73,11 +67,6 @@ NameCreater::NameCreater(QWidget* parent)
}
NameCreater::~NameCreater()
{
}
void NameCreater::parseFontJson(const QByteArray& data)
{
QJsonDocument jsonDoc = QJsonDocument::fromJson(data);
@ -251,14 +240,12 @@ void NameCreater::execCreater(QObject* sender, const QString& fileName, const QB
void NameCreater::OnClickedCustomLogoBtn() {
//QEventLoop loop;
if (s_custom_logo_widget == nullptr) {
s_custom_logo_widget = new CustomLogo(&this->font);
}
s_custom_logo_widget->show();
//connect(&widget, &CustomLogo::finished, &loop, &QEventLoop::quit);
//loop.exec();
QEventLoop loop;
CustomLogo widget(&this->font);
widget.show();
connect(&widget, &CustomLogo::finished, &loop, &QEventLoop::quit);
loop.exec();
qDebug() << "exit event loop";
}

View File

@ -10,22 +10,17 @@
class NameCreater : public QMainWindow
{
Q_OBJECT
public:
NameCreater(QWidget *parent = Q_NULLPTR);
~NameCreater();
private:
Ui::NameCreaterClass ui;
QFont font, font_towel, font_english;
QColor font_color;
QNetworkAccessManager network_mgr;

File diff suppressed because it is too large Load Diff

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>902</width>
<height>780</height>
<width>916</width>
<height>816</height>
</rect>
</property>
<property name="font">
@ -25,519 +25,485 @@
background-color: rgb(0, 0, 0);
}</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,10">
<property name="spacing">
<number>100</number>
</property>
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="version_label">
<property name="font">
<font>
<family>Yu Gothic UI</family>
<pointsize>10</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
<widget class="QLabel" name="version_label">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>171</width>
<height>16</height>
</rect>
</property>
<property name="font">
<font>
<family>Yu Gothic UI</family>
<pointsize>10</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
</string>
</property>
<property name="text">
<string>v1.0.0</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="font_name_label">
<property name="font">
<font>
<family>Yu Gothic UI</family>
<pointsize>10</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
</string>
</property>
<property name="text">
<string>font_name</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="font_comboBox">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContents</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>884</width>
<height>734</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QWidget#scrollAreaWidgetContents{
background-color: rgb(0, 0, 0);
}</string>
</property>
<widget class="QFrame" name="frame">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>861</width>
<height>681</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">QFrame#frame{
</property>
<property name="text">
<string>v1.0.0</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QFrame" name="frame">
<property name="geometry">
<rect>
<x>10</x>
<y>40</y>
<width>851</width>
<height>681</height>
</rect>
</property>
<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="7" column="0">
<widget class="QLabel" name="tital_label_7">
<property name="font">
<font>
<family>Yu Gothic UI</family>
<pointsize>20</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">
</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>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">
color: rgb(255, 255, 255);
</string>
</property>
<property name="text">
<string>生日禮產生器(英/英)</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QPushButton" name="birthday_zh_eng_btn">
<property name="minimumSize">
<size>
<width>0</width>
<height>76</height>
</size>
</property>
<property name="text">
<string>Open File</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="tital_label_4">
<property name="font">
<font>
<family>Yu Gothic UI</family>
<pointsize>20</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">
</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>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">
color: rgb(255, 255, 255);
</string>
</property>
<property name="text">
<string>生日禮產生器</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QPushButton" name="fivesingle_zh_eng_btn">
<property name="minimumSize">
<size>
<width>0</width>
<height>76</height>
</size>
</property>
<property name="text">
<string>Open File</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="tital_label_3">
<property name="font">
<font>
<family>Yu Gothic UI</family>
<pointsize>20</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
</string>
</property>
<property name="text">
<string>五入組產生器</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="tital_label_9">
<property name="font">
<font>
<family>Yu Gothic UI</family>
<pointsize>20</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">
</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>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">
color: rgb(255, 255, 255);
</string>
</property>
<property name="text">
<string>客製底圖產生器</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QPushButton" name="birthday_eng_eng_btn">
<property name="minimumSize">
<size>
<width>0</width>
<height>76</height>
</size>
</property>
<property name="text">
<string>Open File</string>
</property>
</widget>
</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>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
</string>
</property>
<property name="text">
<string>小方巾產生器</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="tital_label_6">
<property name="font">
<font>
<family>Yu Gothic UI</family>
<pointsize>20</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">
</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>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">
color: rgb(255, 255, 255);
</string>
</property>
<property name="text">
<string>生日禮產生器(中/英)</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QPushButton" name="birthday_btn">
<property name="minimumSize">
<size>
<width>0</width>
<height>76</height>
</size>
</property>
<property name="text">
<string>Open File</string>
</property>
</widget>
</item>
<item row="8" column="1">
<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="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="2" column="1">
<widget class="QPushButton" name="fivesingle_btn">
<property name="minimumSize">
<size>
<width>0</width>
<height>76</height>
</size>
</property>
<property name="text">
<string>Open File</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QPushButton" name="customlogo_btn">
<property name="minimumSize">
<size>
<width>0</width>
<height>76</height>
</size>
</property>
<property name="text">
<string>Open Dialog</string>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QPushButton" name="customlogo2_btn">
<property name="minimumSize">
<size>
<width>0</width>
<height>76</height>
</size>
</property>
<property name="text">
<string>Open Dialog</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="tital_label">
<property name="font">
<font>
<family>Yu Gothic UI</family>
<pointsize>20</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
</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>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
</string>
</property>
<property name="text">
<string>五入組拆成單入產生器</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="fivenew_btn">
<property name="minimumSize">
<size>
<width>0</width>
<height>76</height>
</size>
</property>
<property name="text">
<string>Open File</string>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QLabel" name="tital_label_10">
<property name="font">
<font>
<family>Yu Gothic UI</family>
<pointsize>20</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">
color: rgb(255, 255, 255);
</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>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
</string>
</property>
<property name="text">
<string>扶輪社</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="tital_label_2">
<property name="font">
<font>
<family>Yu Gothic UI</family>
<pointsize>20</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
</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>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
</string>
</property>
<property name="text">
<string>五入組拆成單入產生器(中/英)</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLabel" name="tital_label_8">
<property name="font">
<font>
<family>Yu Gothic UI</family>
<pointsize>20</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">
</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>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
</string>
</property>
<property name="text">
<string>小方巾產生器</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="8" column="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>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">
color: rgb(250, 250, 250);
</string>
</property>
<property name="text">
<string>手帕夾產生器</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</property>
<property name="text">
<string>手帕夾產生器</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</widget>
</item>
</layout>
</item>
<item row="10" column="0">
<widget class="QPushButton" name="customlogo_btn">
<property name="minimumSize">
<size>
<width>0</width>
<height>76</height>
</size>
</property>
<property name="text">
<string>Open Dialog</string>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QPushButton" name="customlogo2_btn">
<property name="minimumSize">
<size>
<width>0</width>
<height>76</height>
</size>
</property>
<property name="text">
<string>Open Dialog</string>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QLabel" name="tital_label_10">
<property name="font">
<font>
<family>Yu Gothic UI</family>
<pointsize>20</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">
color: rgb(255, 255, 255);
</string>
</property>
<property name="text">
<string>扶輪社</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</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>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
</string>
</property>
<property name="text">
<string>font_name</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QComboBox" name="font_comboBox">
<property name="geometry">
<rect>
<x>380</x>
<y>10</y>
<width>201</width>
<height>21</height>
</rect>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>916</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>

View File

@ -35,7 +35,6 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
@ -44,7 +43,6 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
@ -57,7 +55,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
<QtInstall>$(DefaultQtVersion)</QtInstall>
<QtModules>core;gui;widgets;network</QtModules>
<QtModules>core;gui;widgets;network;core5compat</QtModules>
<QtBuildConfig>debug</QtBuildConfig>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="QtSettings">
@ -207,7 +205,6 @@
<ClInclude Include="BirthdayCreater.h" />
<QtMoc Include="customlogo.h" />
<QtMoc Include="customlogo2.h" />
<ClInclude Include="def.h" />
<ClInclude Include="FiveToSingle.h" />
<ClInclude Include="HKHolderCreater.h" />
<ClInclude Include="INameCreater.h" />

View File

@ -96,9 +96,6 @@
<ClInclude Include="HKHolderCreater.h">
<Filter>Creaters</Filter>
</ClInclude>
<ClInclude Include="def.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="NameCreater.rc">

View File

@ -12,5 +12,8 @@ protected:
public:
virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color);
};

View File

@ -12,28 +12,19 @@
#include <QColorDialog>
#define DEMO_BG_PATH ":/NameCreater/resource/custom_logo/bg_1.jpg"
#define KEY_DEMO_BG_ITEM 10
#define KEY_WORD_ITEM 100
#define KEY_WORD_ITEM_X_POS 101
#define KEY_WORD_ITEM_Y_POS 102
#define DEMO_WORD_UNICODE "\u92ea\u96dc\u5152"
static QPointF BG_POS_START = QPointF(159, 61);
static QPointF BG_POS_ROT_START = QPointF(900, 2094);
static qreal BG_WIDTH_OFFSET = 320;
static int NAME_COUNT_IN_PAGE = 12;
static QPointF NAME_OFFSET_START = QPointF(79, 365);
static QPointF NAME_OFFSET_START = QPointF(79, 377);
static qreal EACH_WORD_OFFSET = 142;
static QColor FONT_COLOR = QColor(0, 0, 0);
static QColorDialog* s_colorDialog = nullptr;
class QGraphicsCloneTextItem : public QGraphicsTextItem {
public:
QGraphicsCloneTextItem(const QString& text, QGraphicsItem* parent = nullptr) :
@ -61,17 +52,11 @@ CustomLogo::CustomLogo(QFont* font, QDialog* parent) :
fontColor(QColor(0, 0, 0))
{
ui->setupUi(this);
x_adjust_offset = y_adjust_offset = 0;
onSliderValueChanged(0);
connect(ui->load_bg_btn, &QPushButton::released, this, &CustomLogo::onClickedBtn);
connect(ui->load_list_btn, &QPushButton::released, this, &CustomLogo::onClickedBtn);
connect(ui->color_btn, &QPushButton::released, this, &CustomLogo::onClickedBtn);
connect(ui->reset_adjust_btn, &QPushButton::released, this, &CustomLogo::onClickedBtn);
connect(ui->double_checkbox, &QCheckBox::clicked, this, &CustomLogo::onCheckboxClicked);
connect(ui->x_adjust_slider, &QSlider::valueChanged, this, &CustomLogo::onSliderValueChanged);
connect(ui->y_adjust_slider, &QSlider::valueChanged, this, &CustomLogo::onSliderValueChanged);
QFont _f(*font);
@ -84,17 +69,6 @@ CustomLogo::CustomLogo(QFont* font, QDialog* parent) :
ui->color_label->setFont(_f);
ui->color_btn->setFont(_f);
ui->double_checkbox->setFont(_f);
ui->hor_label->setFont(_f);
ui->vel_label->setFont(_f);
demo_scene.setBackgroundBrush(QBrush(QColor(255, 255, 255)));
ui->demo_graphicsView->setScene(&demo_scene);
QPixmap def_demo_bg(DEMO_BG_PATH);
createDemoGraphicItemBG(def_demo_bg);
}
@ -112,8 +86,7 @@ void CustomLogo::loadBGFromFile()
else {
QPixmap pix;
if (pix.loadFromData(fileContent, "JPG")) {
//ui->display_label->setPixmap(pix);
createDemoGraphicItemBG(pix);
ui->display_label->setPixmap(pix);
}
else {
qDebug() << "Data content not image format";
@ -124,76 +97,6 @@ void CustomLogo::loadBGFromFile()
QFileDialog::getOpenFileContent("Image (*.jpg)", fileContentReady);
}
void CustomLogo::createDemoGraphicItemBG(const QPixmap& img)
{
demo_scene.clear();
bool isReverse = ui->double_checkbox->isChecked();
QGraphicsPixmapItem* name_bgItem = new QGraphicsPixmapItem(img);
name_bgItem->setData(KEY_DEMO_BG_ITEM, KEY_DEMO_BG_ITEM);
name_bgItem->setPos(10, 10);
demo_scene.addItem(name_bgItem);
QGraphicsRectItem* name_rectItem = NULL, * name_reverse_rectItem = NULL;
name_rectItem = new QGraphicsRectItem(QRectF(0, 0, name_bgItem->boundingRect().width(), name_bgItem->boundingRect().height() / 2), name_bgItem);
name_rectItem->setPen(QPen(QColor(0, 0, 0, 255)));
if (isReverse) {
name_reverse_rectItem = new QGraphicsRectItem(name_rectItem->rect(), name_bgItem);
name_reverse_rectItem->setPen(QPen(QColor(0, 0, 0, 0)));
name_reverse_rectItem->setPos(name_bgItem->boundingRect().width(), name_bgItem->boundingRect().height());
name_reverse_rectItem->setRotation(180);
}
QString name = QString(DEMO_WORD_UNICODE);
int name_len = name.length();
QPointF pos = NAME_OFFSET_START;
qreal y_offset = 0;
if (name_len == 2) {
pos.setY(pos.y() + 65.0);
y_offset = 55;
}
for (int k = 0; k < name_len; k++) {
QGraphicsCloneTextItem* textItem = new QGraphicsCloneTextItem(name.mid(k, 1), name_rectItem);
textItem->setFont(*customFont);
textItem->setDefaultTextColor(fontColor);
qreal _posX = (name_rectItem->boundingRect().width() / 2 - textItem->boundingRect().width() / 2);
qreal _posY = (pos.y()) + k * (EACH_WORD_OFFSET + y_offset);
qDebug() << "Name num:" << QString::number(k) << "PosY:" << QString::number(_posY);
textItem->setData(KEY_WORD_ITEM, QVariant(KEY_WORD_ITEM));
textItem->setData(KEY_WORD_ITEM_X_POS, QVariant(_posX));
textItem->setData(KEY_WORD_ITEM_Y_POS, QVariant(_posY));
textItem->setPos(_posX+x_adjust_offset, _posY+y_adjust_offset);
if (name_reverse_rectItem) {
QGraphicsCloneTextItem* _ti = ((QGraphicsCloneTextItem*)textItem)->clone(name_reverse_rectItem);
_ti->setData(KEY_WORD_ITEM, QVariant(KEY_WORD_ITEM));
_ti->setData(KEY_WORD_ITEM_X_POS, QVariant(_posX));
_ti->setData(KEY_WORD_ITEM_Y_POS, QVariant(_posY));
}
}
}
void CustomLogo::updateDemoGraphicItemBG() {
foreach(QGraphicsItem * item, demo_scene.items()) {
QVariant v = item->data(KEY_WORD_ITEM);
if (v.toInt() == KEY_WORD_ITEM) {
((QGraphicsTextItem*)item)->setDefaultTextColor(fontColor);
qreal _ori_x = item->data(KEY_WORD_ITEM_X_POS).toReal();
qreal _ori_y = item->data(KEY_WORD_ITEM_Y_POS).toReal();
item->setPos(_ori_x + x_adjust_offset, _ori_y + y_adjust_offset);
}
}
}
void CustomLogo::loadListFromFile()
{
auto fileContentReady = [this](const QString& fileName, const QByteArray& fileContent) {
@ -238,17 +141,12 @@ void CustomLogo::gerneraImageFromList(const QList<NameInfo_t>& nameList, Name_Ty
scene.addItem(bg_item);
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QPixmap _bg = ui->display_label->pixmap()->copy();
#else
QPixmap _bg = ui->display_label->pixmap().copy();
#endif //
QPixmap _bg;
foreach(QGraphicsItem * item, demo_scene.items()) {
QVariant v = item->data(KEY_DEMO_BG_ITEM);
if (v.toInt() == KEY_DEMO_BG_ITEM) {
_bg = ((QGraphicsPixmapItem*)item)->pixmap().copy();
break;
}
}
QGraphicsPixmapItem* name_bgItem = new QGraphicsPixmapItem(_bg);
@ -273,8 +171,8 @@ void CustomLogo::gerneraImageFromList(const QList<NameInfo_t>& nameList, Name_Ty
QPointF pos = NAME_OFFSET_START;
qreal y_offset = 0;
if (name_len == 2) {
pos.setY(pos.y() + 65.0);
y_offset = 55;
pos.setY(pos.y() + 82.0);
y_offset = 25;
}
for (int k = 0; k < name_len; k++) {
@ -282,10 +180,7 @@ void CustomLogo::gerneraImageFromList(const QList<NameInfo_t>& nameList, Name_Ty
textItem->setFont(*customFont);
textItem->setDefaultTextColor(fontColor);
qreal _posX = name_rectItem->boundingRect().width() / 2 - textItem->boundingRect().width() / 2;
qreal _posY = pos.y() + k * (EACH_WORD_OFFSET + y_offset);
qDebug() << "Name num:" << QString::number(k) << "PosY:" << QString::number(_posY);
textItem->setPos(_posX+x_adjust_offset, _posY+y_adjust_offset);
textItem->setPos(_posX, pos.y() + k * EACH_WORD_OFFSET + y_offset);
}
@ -329,9 +224,7 @@ QList<NameInfo_t> CustomLogo::getNameByFileContent(Name_Type_e type, const QByte
{
QList<NameInfo_t> nameList;
QString codec_text = ui->codec_comboBox->currentText();
QTextCodec* tc = QTextCodec::codecForName(codec_text.toStdString().c_str()); // can also using "Utf8" or "Big5" codec
QTextCodec* tc = QTextCodec::codecForName("Big5");
QString codec = tc->toUnicode(conetent.data());
QTextStream stream(&codec);
@ -379,40 +272,6 @@ void CustomLogo::onColorSelected(const QColor& color)
QPalette palette = ui->color_label->palette();
palette.setColor(QPalette::WindowText, fontColor);
ui->color_label->setPalette(palette);
updateDemoGraphicItemBG();
}
void CustomLogo::onSliderValueChanged(int value)
{
auto slider = QObject::sender();
if (slider == ui->x_adjust_slider) {
x_adjust_offset = value;
}
else if (slider == ui->y_adjust_slider) {
y_adjust_offset = value;
}
ui->x_adjust_label->setText(QString("X: %1").arg(QString::number(x_adjust_offset)));
ui->y_adjust_label->setText(QString("Y: %1").arg(QString::number(y_adjust_offset)));
updateDemoGraphicItemBG();
}
void CustomLogo::onCheckboxClicked(bool click)
{
(void)click;
foreach(QGraphicsItem * item, demo_scene.items()) {
QVariant v = item->data(KEY_DEMO_BG_ITEM);
if (v.toInt() == KEY_DEMO_BG_ITEM) {
QPixmap _bg = ((QGraphicsPixmapItem*)item)->pixmap().copy();
createDemoGraphicItemBG(_bg);
break;
}
}
}
@ -434,10 +293,6 @@ void CustomLogo::onClickedBtn() {
s_colorDialog->open();
}
else if (sender == ui->reset_adjust_btn) {
ui->x_adjust_slider->setValue(0);
ui->y_adjust_slider->setValue(0);
}
}

View File

@ -21,13 +21,8 @@ private:
Ui::CustomLogo *ui;
QFont* customFont;
QColor fontColor;
QGraphicsScene demo_scene;
qreal x_adjust_offset, y_adjust_offset;
void loadBGFromFile();
void createDemoGraphicItemBG(const QPixmap& img);
void updateDemoGraphicItemBG();
void loadListFromFile();
void gerneraImageFromList(const QList<NameInfo_t>& nameList, Name_Type_e type);
@ -37,8 +32,6 @@ protected:
private Q_SLOTS:
void onClickedBtn();
void onColorSelected(const QColor& color);
void onSliderValueChanged(int value);
void onCheckboxClicked(bool click);

View File

@ -7,12 +7,31 @@
<x>0</x>
<y>0</y>
<width>545</width>
<height>653</height>
<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>
@ -93,146 +112,6 @@
</item>
</layout>
</widget>
<widget class="QGraphicsView" name="demo_graphicsView">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>311</width>
<height>561</height>
</rect>
</property>
</widget>
<widget class="QFrame" name="frame">
<property name="geometry">
<rect>
<x>330</x>
<y>410</y>
<width>201</width>
<height>141</height>
</rect>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="1" column="0">
<widget class="QLabel" name="hor_label">
<property name="text">
<string>水平</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSlider" name="x_adjust_slider">
<property name="minimum">
<number>-100</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="invertedAppearance">
<bool>false</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSlider" name="y_adjust_slider">
<property name="minimum">
<number>-120</number>
</property>
<property name="maximum">
<number>120</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="vel_label">
<property name="text">
<string>垂直</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="x_adjust_label">
<property name="text">
<string>X</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="y_adjust_label">
<property name="text">
<string>Y</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QPushButton" name="reset_adjust_btn">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget_2">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>311</width>
<height>41</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label">
<property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Codec:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="codec_comboBox">
<item>
<property name="text">
<string>Big5</string>
</property>
</item>
<item>
<property name="text">
<string>Utf8</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</widget>
<resources>
<include location="NameCreater.qrc"/>

View File

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