Compare commits

..

9 Commits

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

1
.gitignore vendored
View File

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

View File

@ -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, 115); static QPoint LABEL_POS_START = QPoint(163, 70);
static QPoint NAME_OFFSET_START = QPoint(82, 712); static QPoint NAME_OFFSET_START = QPoint(82, 712);
static QPoint NAME_OFFSET_REVERSE_START = QPoint(214, 1745); static QPoint NAME_OFFSET_REVERSE_START = QPoint(214, 1745);
@ -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) ? 290.0 : 170.0; qreal x_offset = (i == 0) ? 280.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); QGraphicsTextItem* eng_word_item = new QGraphicsTextItem(name_info.name_eng,label_item);
eng_word_item->setFont(_new_font); eng_word_item->setFont(_new_font);
QRectF rect = eng_word_item->boundingRect(); QRectF rect = eng_word_item->boundingRect();
eng_word_item->setDefaultTextColor(font_color); eng_word_item->setDefaultTextColor(font_color);
eng_word_item->setRotation(i == 0 ? 90 : -90); eng_word_item->setRotation(i == 0 ? 90 : -90);
eng_word_item->setPos(label_item->x() + x_offset - rect.height()/2.0, label_item->y() + y_offset + sp_y_offset + (rect.width()/2*dir)); eng_word_item->setPos(x_offset - rect.height()/2.0, y_offset + sp_y_offset + (rect.width()/2*dir));
scene.addItem(eng_word_item); //scene.addItem(eng_word_item);
} }
@ -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;
} }

View File

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

View File

@ -33,10 +33,12 @@
//#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://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" //#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)
{ {
@ -249,12 +251,14 @@ void NameCreater::execCreater(QObject* sender, const QString& fileName, const QB
void NameCreater::OnClickedCustomLogoBtn() { void NameCreater::OnClickedCustomLogoBtn() {
QEventLoop loop; //QEventLoop loop;
CustomLogo widget(&this->font); if (s_custom_logo_widget == nullptr) {
widget.show(); s_custom_logo_widget = new CustomLogo(&this->font);
connect(&widget, &CustomLogo::finished, &loop, &QEventLoop::quit); }
loop.exec(); s_custom_logo_widget->show();
qDebug() << "exit event loop";
//connect(&widget, &CustomLogo::finished, &loop, &QEventLoop::quit);
//loop.exec();
} }

View File

@ -25,6 +25,7 @@ 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

View File

@ -35,6 +35,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v143</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
@ -43,6 +44,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v143</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')"> <ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
@ -55,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;core5compat</QtModules> <QtModules>core;gui;widgets;network</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">

View File

@ -12,8 +12,5 @@ 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);
}; };

View File

@ -12,6 +12,14 @@
#include <QColorDialog> #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_START = QPointF(159, 61);
static QPointF BG_POS_ROT_START = QPointF(900, 2094); static QPointF BG_POS_ROT_START = QPointF(900, 2094);
static qreal BG_WIDTH_OFFSET = 320; static qreal BG_WIDTH_OFFSET = 320;
@ -25,6 +33,7 @@ static QColor FONT_COLOR = QColor(0, 0, 0);
static QColorDialog* s_colorDialog = nullptr; static QColorDialog* s_colorDialog = nullptr;
class QGraphicsCloneTextItem : public QGraphicsTextItem { class QGraphicsCloneTextItem : public QGraphicsTextItem {
public: public:
QGraphicsCloneTextItem(const QString& text, QGraphicsItem* parent = nullptr) : QGraphicsCloneTextItem(const QString& text, QGraphicsItem* parent = nullptr) :
@ -52,11 +61,17 @@ CustomLogo::CustomLogo(QFont* font, QDialog* parent) :
fontColor(QColor(0, 0, 0)) fontColor(QColor(0, 0, 0))
{ {
ui->setupUi(this); 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_bg_btn, &QPushButton::released, this, &CustomLogo::onClickedBtn);
connect(ui->load_list_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->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); QFont _f(*font);
@ -69,6 +84,17 @@ CustomLogo::CustomLogo(QFont* font, QDialog* parent) :
ui->color_label->setFont(_f); ui->color_label->setFont(_f);
ui->color_btn->setFont(_f); ui->color_btn->setFont(_f);
ui->double_checkbox->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 { else {
QPixmap pix; QPixmap pix;
if (pix.loadFromData(fileContent, "JPG")) { if (pix.loadFromData(fileContent, "JPG")) {
ui->display_label->setPixmap(pix); //ui->display_label->setPixmap(pix);
createDemoGraphicItemBG(pix);
} }
else { else {
qDebug() << "Data content not image format"; qDebug() << "Data content not image format";
@ -97,6 +124,76 @@ void CustomLogo::loadBGFromFile()
QFileDialog::getOpenFileContent("Image (*.jpg)", fileContentReady); 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() void CustomLogo::loadListFromFile()
{ {
auto fileContentReady = [this](const QString& fileName, const QByteArray& fileContent) { 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); 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); QGraphicsPixmapItem* name_bgItem = new QGraphicsPixmapItem(_bg);
@ -182,7 +284,7 @@ void CustomLogo::gerneraImageFromList(const QList<NameInfo_t>& nameList, Name_Ty
qreal _posX = name_rectItem->boundingRect().width() / 2 - textItem->boundingRect().width() / 2; qreal _posX = name_rectItem->boundingRect().width() / 2 - textItem->boundingRect().width() / 2;
qreal _posY = 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); qDebug() << "Name num:" << QString::number(k) << "PosY:" << QString::number(_posY);
textItem->setPos(_posX, _posY); textItem->setPos(_posX+x_adjust_offset, _posY+y_adjust_offset);
} }
@ -227,7 +329,9 @@ QList<NameInfo_t> CustomLogo::getNameByFileContent(Name_Type_e type, const QByte
{ {
QList<NameInfo_t> nameList; 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()); QString codec = tc->toUnicode(conetent.data());
QTextStream stream(&codec); QTextStream stream(&codec);
@ -275,6 +379,40 @@ void CustomLogo::onColorSelected(const QColor& color)
QPalette palette = ui->color_label->palette(); QPalette palette = ui->color_label->palette();
palette.setColor(QPalette::WindowText, fontColor); palette.setColor(QPalette::WindowText, fontColor);
ui->color_label->setPalette(palette); 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;
}
}
} }
@ -296,6 +434,10 @@ void CustomLogo::onClickedBtn() {
s_colorDialog->open(); 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,8 +21,13 @@ private:
Ui::CustomLogo *ui; Ui::CustomLogo *ui;
QFont* customFont; QFont* customFont;
QColor fontColor; QColor fontColor;
QGraphicsScene demo_scene;
qreal x_adjust_offset, y_adjust_offset;
void loadBGFromFile(); void loadBGFromFile();
void createDemoGraphicItemBG(const QPixmap& img);
void updateDemoGraphicItemBG();
void loadListFromFile(); void loadListFromFile();
void gerneraImageFromList(const QList<NameInfo_t>& nameList, Name_Type_e type); void gerneraImageFromList(const QList<NameInfo_t>& nameList, Name_Type_e type);
@ -32,6 +37,8 @@ protected:
private Q_SLOTS: private Q_SLOTS:
void onClickedBtn(); void onClickedBtn();
void onColorSelected(const QColor& color); void onColorSelected(const QColor& color);
void onSliderValueChanged(int value);
void onCheckboxClicked(bool click);

View File

@ -7,31 +7,12 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>545</width> <width>545</width>
<height>1741</height> <height>653</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </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"> <widget class="QPushButton" name="load_bg_btn">
<property name="geometry"> <property name="geometry">
<rect> <rect>
@ -112,6 +93,146 @@
</item> </item>
</layout> </layout>
</widget> </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> </widget>
<resources> <resources>
<include location="NameCreater.qrc"/> <include location="NameCreater.qrc"/>

View File

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