Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db15997b79 | ||
|
|
fc685d47ce | ||
|
|
267157e9f7 | ||
|
|
6fc1220bff | ||
| a4f9faac10 | |||
|
|
07b9905254 | ||
| a4e9ba9274 | |||
| 92e491d0d1 | |||
|
|
62fc71cf6a |
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@
|
||||
/buildwed
|
||||
/NameCreater/*.aps
|
||||
/buildweb/
|
||||
/NameCreater/build/*
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define MAX_LABEL_IN_PAPER 10
|
||||
#define FONT_PIXEL_SIZE 120
|
||||
|
||||
static QPoint LABEL_POS_START = QPoint(163, 115);
|
||||
static QPoint LABEL_POS_START = QPoint(163, 70);
|
||||
static QPoint NAME_OFFSET_START = QPoint(82, 712);
|
||||
static QPoint NAME_OFFSET_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) ? 290.0 : 170.0;
|
||||
qreal x_offset = (i == 0) ? 280.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);
|
||||
QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng,label_item);
|
||||
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));
|
||||
eng_word_item->setPos(x_offset - rect.height()/2.0, y_offset + sp_y_offset + (rect.width()/2*dir));
|
||||
|
||||
|
||||
scene.addItem(eng_word_item);
|
||||
//scene.addItem(eng_word_item);
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -177,3 +177,5 @@ int INameCreater::getFontSizebyStr(const QFont& font, int max_font_size,int max_
|
||||
|
||||
return font_size;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -33,14 +33,20 @@
|
||||
|
||||
//#define FONT_CHT_URL "https://bazaar1688.ddns.net/font/TaiwanPearl-SemiBold.ttf"
|
||||
|
||||
#define FONT_JSON_URL "https://bazaar1688.ddns.net/font/fonts.json"
|
||||
#define FONT_JSON_URL "https://namecreater.bazaar1688.duckdns.org/font/fonts.json"
|
||||
|
||||
//#define FONT_CHT_URL "http://45.32.51.135/font/TaiwanPearl-SemiBold.ttf"
|
||||
|
||||
static CustomLogo* s_custom_logo_widget = nullptr;
|
||||
|
||||
NameCreater::NameCreater(QWidget* parent)
|
||||
: 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);
|
||||
@ -67,6 +73,11 @@ NameCreater::NameCreater(QWidget* parent)
|
||||
|
||||
}
|
||||
|
||||
NameCreater::~NameCreater()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void NameCreater::parseFontJson(const QByteArray& data)
|
||||
{
|
||||
QJsonDocument jsonDoc = QJsonDocument::fromJson(data);
|
||||
@ -240,12 +251,14 @@ void NameCreater::execCreater(QObject* sender, const QString& fileName, const QB
|
||||
|
||||
|
||||
void NameCreater::OnClickedCustomLogoBtn() {
|
||||
QEventLoop loop;
|
||||
CustomLogo widget(&this->font);
|
||||
widget.show();
|
||||
connect(&widget, &CustomLogo::finished, &loop, &QEventLoop::quit);
|
||||
loop.exec();
|
||||
qDebug() << "exit event loop";
|
||||
//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();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -10,17 +10,22 @@
|
||||
|
||||
|
||||
|
||||
|
||||
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
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>916</width>
|
||||
<height>816</height>
|
||||
<width>902</width>
|
||||
<height>780</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
@ -25,15 +25,20 @@
|
||||
background-color: rgb(0, 0, 0);
|
||||
}</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="version_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>171</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
<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>
|
||||
@ -54,12 +59,95 @@
|
||||
<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>10</x>
|
||||
<y>40</y>
|
||||
<width>851</width>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>861</width>
|
||||
<height>681</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -77,43 +165,6 @@ border-color: rgb(255, 255, 255);
|
||||
<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="7" column="0">
|
||||
<widget class="QLabel" name="tital_label_7">
|
||||
<property name="font">
|
||||
@ -138,71 +189,8 @@ color: rgb(255, 255, 255);
|
||||
</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="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">
|
||||
<item row="6" column="0">
|
||||
<widget class="QPushButton" name="birthday_zh_eng_btn">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
@ -238,67 +226,8 @@ color: rgb(255, 255, 255);
|
||||
</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="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="6" column="1">
|
||||
<widget class="QPushButton" name="towel_btn">
|
||||
<item row="4" column="1">
|
||||
<widget class="QPushButton" name="fivesingle_zh_eng_btn">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
@ -333,6 +262,43 @@ color: rgb(255, 255, 255);
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="tital_label_9">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Yu Gothic UI</family>
|
||||
<pointsize>20</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">
|
||||
color: rgb(255, 255, 255);
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>客製底圖產生器</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QPushButton" name="birthday_eng_eng_btn">
|
||||
<property name="minimumSize">
|
||||
<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">
|
||||
@ -356,6 +322,43 @@ color: rgb(255, 255, 255);
|
||||
</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="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">
|
||||
@ -369,27 +372,29 @@ color: rgb(255, 255, 255);
|
||||
</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>
|
||||
<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>手帕夾產生器</string>
|
||||
<string>Open File</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</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>
|
||||
@ -419,6 +424,42 @@ color: rgb(250, 250, 250);
|
||||
</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">
|
||||
@ -443,21 +484,12 @@ color: rgb(255, 255, 255);
|
||||
</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>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="tital_label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Yu Gothic UI</family>
|
||||
<pointsize>10</pointsize>
|
||||
<pointsize>20</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
@ -468,42 +500,44 @@ color: rgb(255, 255, 255);
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>font_name</string>
|
||||
<string>五入組拆成單入產生器(中/英)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
<set>Qt::AlignCenter</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>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLabel" name="tital_label_8">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Yu Gothic UI</family>
|
||||
<pointsize>20</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">
|
||||
color: rgb(250, 250, 250);
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>手帕夾產生器</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget 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"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<action name="actionOpen_File">
|
||||
<property name="text">
|
||||
<string>Open File</string>
|
||||
|
||||
@ -35,6 +35,7 @@
|
||||
<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>
|
||||
@ -43,6 +44,7 @@
|
||||
<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')">
|
||||
@ -55,7 +57,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
|
||||
<QtInstall>$(DefaultQtVersion)</QtInstall>
|
||||
<QtModules>core;gui;widgets;network;core5compat</QtModules>
|
||||
<QtModules>core;gui;widgets;network</QtModules>
|
||||
<QtBuildConfig>debug</QtBuildConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="QtSettings">
|
||||
@ -205,6 +207,7 @@
|
||||
<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" />
|
||||
|
||||
@ -96,6 +96,9 @@
|
||||
<ClInclude Include="HKHolderCreater.h">
|
||||
<Filter>Creaters</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="def.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="NameCreater.rc">
|
||||
|
||||
@ -12,8 +12,5 @@ protected:
|
||||
public:
|
||||
virtual void generaImageFromCSV(Name_Type_e type, const QString& filename, const QByteArray& filecontent, const QFont& font, const QColor& font_color);
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -12,19 +12,28 @@
|
||||
#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, 377);
|
||||
static QPointF NAME_OFFSET_START = QPointF(79, 365);
|
||||
static qreal EACH_WORD_OFFSET = 142;
|
||||
static QColor FONT_COLOR = QColor(0, 0, 0);
|
||||
|
||||
static QColorDialog* s_colorDialog = nullptr;
|
||||
|
||||
|
||||
|
||||
class QGraphicsCloneTextItem : public QGraphicsTextItem {
|
||||
public:
|
||||
QGraphicsCloneTextItem(const QString& text, QGraphicsItem* parent = nullptr) :
|
||||
@ -52,11 +61,17 @@ 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);
|
||||
@ -69,6 +84,17 @@ 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);
|
||||
|
||||
}
|
||||
|
||||
@ -86,7 +112,8 @@ void CustomLogo::loadBGFromFile()
|
||||
else {
|
||||
QPixmap pix;
|
||||
if (pix.loadFromData(fileContent, "JPG")) {
|
||||
ui->display_label->setPixmap(pix);
|
||||
//ui->display_label->setPixmap(pix);
|
||||
createDemoGraphicItemBG(pix);
|
||||
}
|
||||
else {
|
||||
qDebug() << "Data content not image format";
|
||||
@ -97,6 +124,76 @@ 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) {
|
||||
@ -141,12 +238,17 @@ 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);
|
||||
@ -171,8 +273,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() + 82.0);
|
||||
y_offset = 25;
|
||||
pos.setY(pos.y() + 65.0);
|
||||
y_offset = 55;
|
||||
}
|
||||
|
||||
for (int k = 0; k < name_len; k++) {
|
||||
@ -180,7 +282,10 @@ 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;
|
||||
textItem->setPos(_posX, pos.y() + k * EACH_WORD_OFFSET + y_offset);
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -224,7 +329,9 @@ QList<NameInfo_t> CustomLogo::getNameByFileContent(Name_Type_e type, const QByte
|
||||
{
|
||||
QList<NameInfo_t> nameList;
|
||||
|
||||
QTextCodec* tc = QTextCodec::codecForName("Big5");
|
||||
QString codec_text = ui->codec_comboBox->currentText();
|
||||
|
||||
QTextCodec* tc = QTextCodec::codecForName(codec_text.toStdString().c_str()); // can also using "Utf8" or "Big5" codec
|
||||
QString codec = tc->toUnicode(conetent.data());
|
||||
QTextStream stream(&codec);
|
||||
|
||||
@ -272,6 +379,40 @@ 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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -293,6 +434,10 @@ 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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -21,8 +21,13 @@ 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);
|
||||
|
||||
@ -32,6 +37,8 @@ protected:
|
||||
private Q_SLOTS:
|
||||
void onClickedBtn();
|
||||
void onColorSelected(const QColor& color);
|
||||
void onSliderValueChanged(int value);
|
||||
void onCheckboxClicked(bool click);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -7,31 +7,12 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>545</width>
|
||||
<height>1741</height>
|
||||
<height>653</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>
|
||||
@ -112,6 +93,146 @@
|
||||
</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"/>
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
#ifndef DEF_H
|
||||
#define DEF_H
|
||||
|
||||
#define VERSION "v2.9.0"
|
||||
|
||||
|
||||
|
||||
|
||||
#define VERSION "v2.10.3"
|
||||
|
||||
|
||||
#endif // DEF_H
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user