create .pro for QtCreator
This commit is contained in:
parent
67b370fd36
commit
54281c4cee
14
NameCreater/NameCreater.pri
Normal file
14
NameCreater/NameCreater.pri
Normal file
@ -0,0 +1,14 @@
|
||||
# ----------------------------------------------------
|
||||
# This file is generated by the Qt Visual Studio Tools.
|
||||
# ------------------------------------------------------
|
||||
|
||||
# This is a reminder that you are using a generated .pro file.
|
||||
# Remove it when you are finished editing this file.
|
||||
message("You are running qmake on a generated .pro file. This may not work!")
|
||||
|
||||
|
||||
HEADERS += ./NameCreater.h
|
||||
SOURCES += ./NameCreater.cpp \
|
||||
./main.cpp
|
||||
FORMS += ./NameCreater.ui
|
||||
RESOURCES += ./NameCreater.qrc
|
||||
21
NameCreater/NameCreater.pro
Normal file
21
NameCreater/NameCreater.pro
Normal file
@ -0,0 +1,21 @@
|
||||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
# You can make your code fail to compile if it uses deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
include(NameCreater.pri)
|
||||
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
|
||||
|
||||
|
||||
|
||||
419
NameCreater/NameCreater.pro.user
Normal file
419
NameCreater/NameCreater.pro.user
Normal file
@ -0,0 +1,419 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 6.0.2, 2022-02-15T14:40:12. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{f917f426-b975-46c9-8edb-fd77a95b6be2}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="qlonglong">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
|
||||
<value type="bool" key="AutoTest.Framework.Boost">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.CTest">false</value>
|
||||
<value type="bool" key="AutoTest.Framework.Catch">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.GTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
||||
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
||||
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
||||
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey">
|
||||
<value type="QString">-fno-delayed-template-parsing</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
|
||||
<value type="QString" key="ClangCodeModel.WarningConfigId">Builtin.BuildSystem</value>
|
||||
<valuemap type="QVariantMap" key="ClangTools">
|
||||
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">4</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.15.2 MinGW 32-bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.2 MinGW 32-bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5152.win32_mingw81_kit</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\_0E\_Private\_Software\namecreater\build-NameCreater-Desktop_Qt_5_15_2_MinGW_32_bit-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/_0E/_Private/_Software/namecreater/build-NameCreater-Desktop_Qt_5_15_2_MinGW_32_bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\_0E\_Private\_Software\namecreater\build-NameCreater-Desktop_Qt_5_15_2_MinGW_32_bit-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/_0E/_Private/_Software/namecreater/build-NameCreater-Desktop_Qt_5_15_2_MinGW_32_bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="int" key="QtQuickCompiler">0</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\_0E\_Private\_Software\namecreater\build-NameCreater-Desktop_Qt_5_15_2_MinGW_32_bit-Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/_0E/_Private/_Software/namecreater/build-NameCreater-Desktop_Qt_5_15_2_MinGW_32_bit-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="int" key="QtQuickCompiler">0</value>
|
||||
<value type="int" key="SeparateDebugInfo">0</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/_0E/_Private/_Software/namecreater/NameCreater/NameCreater.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">D:/_0E/_Private/_Software/namecreater/NameCreater/NameCreater.pro</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory">D:/_0E/_Private/_Software/namecreater/build-NameCreater-Desktop_Qt_5_15_2_MinGW_32_bit-Release/release</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/_0E/_Private/_Software/namecreater/build-NameCreater-Desktop_Qt_5_15_2_MinGW_32_bit-Release</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.1</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="DeviceType">WebAssemblyDeviceType</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 5.15.2 WebAssembly</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 5.15.2 WebAssembly</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5152.wasm_32_kit</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">-1</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\_0E\_Private\_Software\namecreater\build-NameCreater-Qt_5_15_2_WebAssembly-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/_0E/_Private/_Software/namecreater/build-NameCreater-Qt_5_15_2_WebAssembly-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\_0E\_Private\_Software\namecreater\build-NameCreater-Qt_5_15_2_WebAssembly-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/_0E/_Private/_Software/namecreater/build-NameCreater-Qt_5_15_2_WebAssembly-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="int" key="QtQuickCompiler">0</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\_0E\_Private\_Software\namecreater\build-NameCreater-Qt_5_15_2_WebAssembly-Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/_0E/_Private/_Software/namecreater/build-NameCreater-Qt_5_15_2_WebAssembly-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="int" key="QtQuickCompiler">0</value>
|
||||
<value type="int" key="SeparateDebugInfo">0</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Launch with emrun</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">WebAssembly.RunConfiguration.Emrun</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="WASM.WebBrowserSelectionAspect.Browser">chrome</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="qlonglong">2</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
@ -11,9 +11,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>華康圓體 Std W8</family>
|
||||
</font>
|
||||
<font/>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>NameCreater</string>
|
||||
@ -24,15 +22,18 @@
|
||||
<rect>
|
||||
<x>240</x>
|
||||
<y>220</y>
|
||||
<width>201</width>
|
||||
<height>91</height>
|
||||
<width>441</width>
|
||||
<height>261</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font: 26pt "華康圓體 Std W8";</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="NameCreater.qrc">:/NameCreater/resource/background.jpg</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
@ -42,7 +43,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>977</width>
|
||||
<height>21</height>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
#define BG_MIX_PATH ":/NameCreater/resource/background.jpg"
|
||||
#define BG_BOY_PATH ":/NameCreater/resource/background_boy.jpg"
|
||||
#define BG_GIRL_PATH ":/NameCreater/resource/background_girl.jpg"
|
||||
#define FONT_NAME QStringLiteral("µØ±d¶êÅé Std W8")
|
||||
#define FONT_NAME QStringLiteral("DFYuan Std W8")
|
||||
#define FONT_SIZE 120
|
||||
//#define FONT_SIZE 74
|
||||
|
||||
@ -25,28 +25,28 @@
|
||||
#define BG_GIRL_TYPE_STR "girl"
|
||||
|
||||
struct NameInfo_t {
|
||||
QString name1;
|
||||
QString name2;
|
||||
int bg_type;
|
||||
QString name1;
|
||||
QString name2;
|
||||
int bg_type;
|
||||
};
|
||||
|
||||
static QPointF BOY_POS[] = {
|
||||
QPointF(235, 387), QPointF(366, 1433),
|
||||
QPointF(555, 387), QPointF(692, 1433),
|
||||
QPointF(878, 387), QPointF(1014, 1433),
|
||||
QPointF(1200, 387), QPointF(1337, 1433),
|
||||
QPointF(1527, 387), QPointF(1663, 1433),
|
||||
QPointF(235, 387), QPointF(366, 1433),
|
||||
QPointF(555, 387), QPointF(692, 1433),
|
||||
QPointF(878, 387), QPointF(1014, 1433),
|
||||
QPointF(1200, 387), QPointF(1337, 1433),
|
||||
QPointF(1527, 387), QPointF(1663, 1433),
|
||||
};
|
||||
|
||||
static int BOY_POS_COUNT = sizeof(BOY_POS) / sizeof(BOY_POS[0]);
|
||||
|
||||
|
||||
static QPointF GIRL_POS[] = {
|
||||
QPointF(1854, 387), QPointF(1987, 1433),
|
||||
QPointF(2176, 387), QPointF(2314, 1433),
|
||||
QPointF(2498, 387), QPointF(2635, 1433),
|
||||
QPointF(2821, 387), QPointF(2958, 1433),
|
||||
QPointF(3147, 387), QPointF(3285, 1433),
|
||||
QPointF(1854, 387), QPointF(1987, 1433),
|
||||
QPointF(2176, 387), QPointF(2314, 1433),
|
||||
QPointF(2498, 387), QPointF(2635, 1433),
|
||||
QPointF(2821, 387), QPointF(2958, 1433),
|
||||
QPointF(3147, 387), QPointF(3285, 1433),
|
||||
};
|
||||
|
||||
static int GIRL_POS_COUNT = sizeof(GIRL_POS) / sizeof(GIRL_POS[0]);
|
||||
@ -54,147 +54,150 @@ static int GIRL_POS_COUNT = sizeof(GIRL_POS) / sizeof(GIRL_POS[0]);
|
||||
|
||||
void saveToImage(const QString& filename, QGraphicsScene* scene) {
|
||||
|
||||
scene->clearSelection(); // Selections would also render to the file
|
||||
scene->setSceneRect(scene->itemsBoundingRect()); // Re-shrink the scene to it's bounding contents
|
||||
QImage image(scene->sceneRect().size().toSize(), QImage::Format_ARGB32); // Create the image with the exact size of the shrunk scene
|
||||
image.fill(Qt::transparent); // Start all pixels transparent
|
||||
int dpm = 300 / 0.0254; // ~300 DPI
|
||||
image.setDotsPerMeterX(dpm);
|
||||
image.setDotsPerMeterY(dpm);
|
||||
scene->clearSelection(); // Selections would also render to the file
|
||||
scene->setSceneRect(scene->itemsBoundingRect()); // Re-shrink the scene to it's bounding contents
|
||||
QImage image(scene->sceneRect().size().toSize(), QImage::Format_ARGB32); // Create the image with the exact size of the shrunk scene
|
||||
image.fill(Qt::transparent); // Start all pixels transparent
|
||||
int dpm = 300 / 0.0254; // ~300 DPI
|
||||
image.setDotsPerMeterX(dpm);
|
||||
image.setDotsPerMeterY(dpm);
|
||||
|
||||
|
||||
QPainter painter(&image);
|
||||
scene->render(&painter);
|
||||
QPainter painter(&image);
|
||||
scene->render(&painter);
|
||||
|
||||
|
||||
QString folder_name = "export_" + QDateTime::currentDateTime().toString("yyyyMMdd");
|
||||
QString folder_name = "export_" + QDateTime::currentDateTime().toString("yyyyMMdd");
|
||||
|
||||
if (!QDir(folder_name).exists()) {
|
||||
QDir().mkdir(folder_name);
|
||||
}
|
||||
if (!QDir(folder_name).exists()) {
|
||||
QDir().mkdir(folder_name);
|
||||
}
|
||||
|
||||
image.save(QString(folder_name).append("/").append(filename), "JPG", 100);
|
||||
image.save(QString(folder_name).append("/").append(filename), "JPG", 100);
|
||||
|
||||
}
|
||||
|
||||
QList<NameInfo_t> getNameByFile(const QString& filename) {
|
||||
QList<NameInfo_t> nameList;
|
||||
QFile file(filename);
|
||||
if (!file.open(QIODevice::ReadOnly)) {
|
||||
qDebug() << "Load file failed!";
|
||||
return nameList;
|
||||
}
|
||||
QList<NameInfo_t> nameList;
|
||||
QFile file(filename);
|
||||
if (!file.open(QIODevice::ReadOnly)) {
|
||||
qDebug() << "Load file failed!";
|
||||
return nameList;
|
||||
}
|
||||
|
||||
int row = 0;
|
||||
while (!file.atEnd())
|
||||
{
|
||||
NameInfo_t info;
|
||||
QByteArray line = file.readLine();
|
||||
QByteArrayList csvList = line.split(',');
|
||||
int row = 0;
|
||||
while (!file.atEnd())
|
||||
{
|
||||
NameInfo_t info;
|
||||
QByteArray line = file.readLine();
|
||||
QByteArrayList csvList = line.split(',');
|
||||
|
||||
|
||||
QString name1 = QString::fromLocal8Bit(csvList.at(0));
|
||||
QString name2 = QString::fromLocal8Bit(csvList.at(1));
|
||||
QString type_str = QString::fromLocal8Bit(csvList.last());
|
||||
qDebug() << "row :" << row << " " << name1 << " " << name2;
|
||||
QString name1 = QString::fromLocal8Bit(csvList.at(0));
|
||||
QString name2 = QString::fromLocal8Bit(csvList.at(1));
|
||||
QString type_str = QString::fromLocal8Bit(csvList.last());
|
||||
qDebug() << "row :" << row << " " << name1 << " " << name2;
|
||||
|
||||
if (name1.compare("name_1") == 0 || name2.compare("name_2") == 0) {
|
||||
continue;
|
||||
}
|
||||
if (name1.compare("name_1") == 0 || name2.compare("name_2") == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
info.name1 = name1;
|
||||
info.name2 = name2;
|
||||
info.bg_type = type_str.contains(QRegExp("boy")) ? 1 : (type_str.contains(QRegExp("girl"))) ? 2 : 0;
|
||||
info.name1 = name1;
|
||||
info.name2 = name2;
|
||||
info.bg_type = type_str.contains(QRegExp("boy")) ? 1 : (type_str.contains(QRegExp("girl"))) ? 2 : 0;
|
||||
|
||||
nameList.append(info);
|
||||
nameList.append(info);
|
||||
|
||||
row++;
|
||||
}
|
||||
row++;
|
||||
}
|
||||
|
||||
return nameList;
|
||||
return nameList;
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int export_times = 0;
|
||||
//QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QApplication a(argc, argv);
|
||||
int export_times = 0;
|
||||
|
||||
|
||||
QFont font(FONT_NAME);
|
||||
font.setPixelSize(FONT_SIZE);
|
||||
QColor font_color(0, 0, 0);
|
||||
|
||||
QApplication a(argc, argv);
|
||||
// NameCreater w;
|
||||
// w.show();
|
||||
|
||||
QFont font(FONT_NAME);
|
||||
font.setPixelSize(FONT_SIZE);
|
||||
QColor font_color(0, 0, 0);
|
||||
|
||||
|
||||
QList<NameInfo_t> nameList = getNameByFile("name.csv");
|
||||
if (nameList.isEmpty()) {
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText(("Name is empty !"));
|
||||
msgBox.exec();
|
||||
}
|
||||
QList<NameInfo_t> nameList = getNameByFile("name.csv");
|
||||
if (nameList.isEmpty()) {
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText(("Name is empty !"));
|
||||
msgBox.exec();
|
||||
}
|
||||
|
||||
QGraphicsScene scene;
|
||||
QGraphicsView view(&scene);
|
||||
QGraphicsScene scene;
|
||||
QGraphicsView view(&scene);
|
||||
|
||||
|
||||
for (int n = 0; n < nameList.length(); n++) {
|
||||
//msgBox.setText(QString().sprintf("Export: %d / %d", export_times, nameList.length()));
|
||||
for (int n = 0; n < nameList.length(); n++) {
|
||||
//msgBox.setText(QString().sprintf("Export: %d / %d", export_times, nameList.length()));
|
||||
|
||||
NameInfo_t name_info = nameList.at(n);
|
||||
NameInfo_t name_info = nameList.at(n);
|
||||
|
||||
scene.clear();
|
||||
QImage image((name_info.bg_type == 1) ? BG_BOY_PATH : (name_info.bg_type == 2) ? BG_GIRL_PATH : BG_MIX_PATH);
|
||||
QGraphicsPixmapItem* bgItem = new QGraphicsPixmapItem(QPixmap::fromImage(image));
|
||||
scene.addItem(bgItem);
|
||||
scene.clear();
|
||||
QImage image((name_info.bg_type == 1) ? BG_BOY_PATH : (name_info.bg_type == 2) ? BG_GIRL_PATH : BG_MIX_PATH);
|
||||
QGraphicsPixmapItem* bgItem = new QGraphicsPixmapItem(QPixmap::fromImage(image));
|
||||
scene.addItem(bgItem);
|
||||
|
||||
|
||||
for (int j = 0; j < 2; j++) {
|
||||
int flag = j % 2;
|
||||
QString name = (flag == 0) ? name_info.name1 : name_info.name2;
|
||||
for (int i = 0; i < BOY_POS_COUNT; i++) {
|
||||
int xscale, yscale;
|
||||
xscale = yscale = (i % 2 == 1) ? -1 : 1;
|
||||
QPointF pos = (flag == 0) ? BOY_POS[i] : GIRL_POS[i];
|
||||
for (int j = 0; j < 2; j++) {
|
||||
int flag = j % 2;
|
||||
QString name = (flag == 0) ? name_info.name1 : name_info.name2;
|
||||
for (int i = 0; i < BOY_POS_COUNT; i++) {
|
||||
int xscale, yscale;
|
||||
xscale = yscale = (i % 2 == 1) ? -1 : 1;
|
||||
QPointF pos = (flag == 0) ? BOY_POS[i] : GIRL_POS[i];
|
||||
|
||||
QGraphicsTextItem* textItem1 = new QGraphicsTextItem(name.mid(0, 1));
|
||||
textItem1->setFont(font);
|
||||
textItem1->setDefaultTextColor(font_color);
|
||||
textItem1->setPos(pos);
|
||||
textItem1->setTransform(QTransform::fromScale(xscale, yscale));
|
||||
scene.addItem(textItem1);
|
||||
QGraphicsTextItem* textItem1 = new QGraphicsTextItem(name.mid(0, 1));
|
||||
textItem1->setFont(font);
|
||||
textItem1->setDefaultTextColor(font_color);
|
||||
textItem1->setPos(pos);
|
||||
textItem1->setTransform(QTransform::fromScale(xscale, yscale));
|
||||
scene.addItem(textItem1);
|
||||
|
||||
QGraphicsTextItem* textItem2 = new QGraphicsTextItem(name.mid(1, 1));
|
||||
textItem2->setFont(font);
|
||||
textItem2->setDefaultTextColor(font_color);
|
||||
textItem2->setPos(pos.x(), pos.y() + 148 * xscale);
|
||||
textItem2->setTransform(QTransform::fromScale(xscale, yscale));
|
||||
scene.addItem(textItem2);
|
||||
QGraphicsTextItem* textItem2 = new QGraphicsTextItem(name.mid(1, 1));
|
||||
textItem2->setFont(font);
|
||||
textItem2->setDefaultTextColor(font_color);
|
||||
textItem2->setPos(pos.x(), pos.y() + 148 * xscale);
|
||||
textItem2->setTransform(QTransform::fromScale(xscale, yscale));
|
||||
scene.addItem(textItem2);
|
||||
|
||||
QGraphicsTextItem* textItem3 = new QGraphicsTextItem(name.mid(2, 1));
|
||||
textItem3->setFont(font);
|
||||
textItem3->setDefaultTextColor(font_color);
|
||||
textItem3->setPos(pos.x(), pos.y() + 294 * xscale);
|
||||
textItem3->setTransform(QTransform::fromScale(xscale, yscale));
|
||||
scene.addItem(textItem3);
|
||||
}
|
||||
}
|
||||
//if (name_info.bg_type == 0) {
|
||||
// view.show();
|
||||
// break;
|
||||
//}
|
||||
QGraphicsTextItem* textItem3 = new QGraphicsTextItem(name.mid(2, 1));
|
||||
textItem3->setFont(font);
|
||||
textItem3->setDefaultTextColor(font_color);
|
||||
textItem3->setPos(pos.x(), pos.y() + 294 * xscale);
|
||||
textItem3->setTransform(QTransform::fromScale(xscale, yscale));
|
||||
scene.addItem(textItem3);
|
||||
}
|
||||
}
|
||||
// if (name_info.bg_type == 0) {
|
||||
// view.show();
|
||||
// break;
|
||||
// }
|
||||
|
||||
QString file_name = QString("%1_%2_%3.jpg").arg(QString::number(export_times+1),name_info.name1,name_info.name2);
|
||||
saveToImage(file_name, &scene);
|
||||
export_times++;
|
||||
}
|
||||
QString file_name = QString("%1_%2_%3.jpg").arg(QString::number(export_times+1),name_info.name1,name_info.name2);
|
||||
saveToImage(file_name, &scene);
|
||||
export_times++;
|
||||
}
|
||||
|
||||
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText(QString().sprintf("Export Finshed. Count:%d",export_times));
|
||||
msgBox.exec();
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText(QString().asprintf("Export Finshed. Count:%d",export_times));
|
||||
msgBox.exec();
|
||||
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user