adding project files
BIN
assets/.DS_Store
vendored
Normal file
35
assets/Info.plist
Normal file
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>buckshot</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>0.1, Copyright 2016 Dagen Brock</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>icons.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.dagenbrock.buckshot</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
</array>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.1</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>buckshot</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.1</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright 2016 Dagen Brock</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.3</string>
|
||||
</dict>
|
||||
</plist>
|
BIN
assets/icon1024.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
assets/icon128.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
assets/icon16.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
assets/icon256.png
Normal file
After Width: | Height: | Size: 7.3 KiB |
BIN
assets/icon32.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
assets/icon512.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
assets/icon64.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
assets/icons.icns
Normal file
0
buckshot/README.md
Normal file
23
buckshot/buckshot.pro
Normal file
@ -0,0 +1,23 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2016-11-28T18:58:07
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TARGET = buckshot
|
||||
TEMPLATE = app
|
||||
|
||||
|
||||
SOURCES += main.cpp\
|
||||
mainwindow.cpp
|
||||
|
||||
HEADERS += mainwindow.h
|
||||
|
||||
FORMS += mainwindow.ui
|
||||
|
||||
DISTFILES += \
|
||||
../b2d
|
336
buckshot/buckshot.pro.user
Normal file
@ -0,0 +1,336 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.1.0, 2016-12-05T15:16:15. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{604923ac-6650-4c69-8172-ab5bd4c4d88b}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</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="int" 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.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="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="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap"/>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.7.0 clang 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.7.0 clang 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.57.clang_64_kit</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/dbrock/Google Drive/appleiigs/buckshot/build-buckshot-Desktop_Qt_5_7_0_clang_64bit-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.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/dbrock/Google Drive/appleiigs/buckshot/build-buckshot-Desktop_Qt_5_7_0_clang_64bit-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.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/dbrock/Google Drive/appleiigs/buckshot/build-buckshot-Desktop_Qt_5_7_0_clang_64bit-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.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||
<value type="QString">-w</value>
|
||||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
|
||||
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
|
||||
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">buckshot</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/Users/dbrock/Google Drive/appleiigs/buckshot/buckshot/buckshot.pro</value>
|
||||
<value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">buckshot.pro</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">/Users/dbrock/Google Drive/appleiigs/buckshot/build-buckshot-Desktop_Qt_5_7_0_clang_64bit-Release/buckshot.app/Contents/MacOS</value>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="int">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">18</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">18</value>
|
||||
</data>
|
||||
</qtcreator>
|
11
buckshot/main.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
#include "mainwindow.h"
|
||||
#include <QApplication>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
MainWindow w;
|
||||
w.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
411
buckshot/mainwindow.cpp
Normal file
@ -0,0 +1,411 @@
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "qfiledialog.h"
|
||||
#include "qprocess.h"
|
||||
#include "qdebug.h"
|
||||
#include "qtimer.h"
|
||||
#include <Qtcore>
|
||||
#include "qmessagebox.h"
|
||||
|
||||
const QString MainWindow::imageName = QString("saved");
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
this->setWindowTitle("buckshot");
|
||||
|
||||
// SET TEMP DIR FOR CACHE/BUILDING
|
||||
tmpDir = new QTemporaryDir();
|
||||
if (tmpDir->isValid()) {
|
||||
tmpDirPath = tmpDir->path(); // dir.path() returns the unique directory path
|
||||
} else {
|
||||
tmpDirPath = "/tmp/"; // fallback. may not work on all OSes
|
||||
}
|
||||
// AND NOW THE PATHNAMES FOR OUR CACHE FILES
|
||||
|
||||
inputImgPath = QString("%1/%2.bmp").arg(tmpDirPath).arg(imageName);
|
||||
previewImgPath = QString("%1/%2_Preview.bmp").arg(tmpDirPath).arg(imageName);
|
||||
qDebug() << inputImgPath << previewImgPath;
|
||||
|
||||
// depends SAVED.A2FC, SAVEDC.BIN, SAVEDCH.BIN
|
||||
//outputImgPath = QString("%1/%2").arg(tmpDirPath).arg();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// populate combobox
|
||||
QStringList outputFormats;
|
||||
outputFormats << "LR" << "DLR" << "HGR" << "DHGR" << "MONO";
|
||||
ui->comboBox_outputFormat->addItems(outputFormats);
|
||||
|
||||
//
|
||||
QStringList inputResolutions;
|
||||
inputResolutions << "40 x 48 - Full Scale LGR"
|
||||
<< "80 x 48 - Full Scale DLGR"
|
||||
<< "140 x 192 - Full Scale (HGR & DHGR)"
|
||||
<< "280 x 192 - Double Width Scale (HGR & DHGR)"
|
||||
<< "320 x 200 - Classic Size"
|
||||
<< "560 x 384 - Quadruple Width, Double Height Scale"
|
||||
<< "640 x 400 - Classic Size"
|
||||
<< "640 x 480 - Classic Size";
|
||||
ui->comboBox_inputResolution->addItems(inputResolutions);
|
||||
updateDisplayModes();
|
||||
|
||||
// live preview stuff
|
||||
updateNeeded = false;
|
||||
previewTimer = new QTimer(this);
|
||||
connect(previewTimer, SIGNAL(timeout()), this, SLOT(previewTimerTimeout()));
|
||||
}
|
||||
|
||||
//ions << 0 "40 x 48 - Full Scale LGR (LGR ONLY)"
|
||||
// 1 "80 x 48 - Full Scale DLGR (DLGR ONLY)"
|
||||
// 2 "140 x 192 - Full Scale (HGR & DHGR)"
|
||||
// 3 "280 x 192 - Double Width Scale (HGR & DHGR)"
|
||||
// 4 "320 x 200 - Classic Size"
|
||||
// 5 "560 x 384 - Quadruple Width, Double Height Scale"
|
||||
// 6 "640 x 400 - Classic Size"
|
||||
// 7 "640 x 480 - Classic Size";
|
||||
void MainWindow::updateDisplayModes() {
|
||||
|
||||
QList<int> disabledList = QList<int>(); // = QList<int>() << 1 << 1;
|
||||
|
||||
// Enable all first
|
||||
QList<int> enabledList = QList<int>() << 0 << 1 << 2 << 3 << 4 << 5 << 6 << 7;
|
||||
QListIterator<int> e(enabledList);
|
||||
while (e.hasNext()) {
|
||||
// Get the index of the value to disable
|
||||
QModelIndex index = ui->comboBox_inputResolution->model()->index(e.next(), 0);
|
||||
// enable flag
|
||||
QVariant vEnable(1 | 32);
|
||||
// the magic
|
||||
ui->comboBox_inputResolution->model()->setData(index, vEnable, Qt::UserRole - 1);
|
||||
}
|
||||
|
||||
// DELETE?
|
||||
|
||||
// SET DISABLED ITEMS - AND DEFAULT RESOLUTION FOR MODE
|
||||
if (ui->comboBox_outputFormat->currentText() == "LR") {
|
||||
disabledList << 2 << 3;
|
||||
inputWidth = 40;
|
||||
inputHeight = 48;
|
||||
ui->comboBox_inputResolution->setCurrentIndex(0);
|
||||
} else if (ui->comboBox_outputFormat->currentText() == "DLR") {
|
||||
disabledList << 2 << 3;
|
||||
inputWidth = 80;
|
||||
inputHeight = 48;
|
||||
ui->comboBox_inputResolution->setCurrentIndex(1);
|
||||
} else if (ui->comboBox_outputFormat->currentText() == "MONO") {
|
||||
disabledList << 0 << 1 << 2 << 4 << 6 << 7;
|
||||
inputWidth = 280;
|
||||
inputHeight = 192;
|
||||
ui->comboBox_inputResolution->setCurrentIndex(3);
|
||||
} else if (ui->comboBox_outputFormat->currentText() == "DHGR") {
|
||||
inputWidth = 280;
|
||||
inputHeight = 192;
|
||||
ui->comboBox_inputResolution->setCurrentIndex(3);
|
||||
} else {
|
||||
inputWidth = 140;
|
||||
inputHeight = 192;
|
||||
ui->comboBox_inputResolution->setCurrentIndex(2);
|
||||
}
|
||||
// SET SOME DEFAULTS
|
||||
|
||||
|
||||
|
||||
|
||||
QListIterator<int> d(disabledList);
|
||||
while (d.hasNext()) {
|
||||
// Get the index of the value to disable
|
||||
QModelIndex index = ui->comboBox_inputResolution->model()->index(d.next(), 0);
|
||||
// This is the effective 'disable' flag
|
||||
QVariant vDisable(0);
|
||||
// the magic
|
||||
ui->comboBox_inputResolution->model()->setData(index, vDisable, Qt::UserRole - 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_pushButton_sourceFilename_clicked()
|
||||
{
|
||||
QString filename = QFileDialog::getOpenFileName();
|
||||
if (filename != NULL) {
|
||||
ui->lineEdit_sourceFilename->setText(filename);
|
||||
QPixmap mypix(filename);
|
||||
ui->label_source->setPixmap(mypix);
|
||||
ui->label_source->setScaledContents(true);
|
||||
QSize sourceSize = ui->label_source->pixmap()->size();
|
||||
qDebug() << sourceSize;
|
||||
QString resolutionString = QString("%1 x %2").arg(sourceSize.width()).arg(sourceSize.height());
|
||||
qDebug() << resolutionString;
|
||||
ui->label_sourceResolution->setText(resolutionString);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::updateInputSize()
|
||||
{
|
||||
switch (ui->comboBox_inputResolution->currentIndex()) {
|
||||
case 0:
|
||||
inputWidth = 40;
|
||||
inputHeight = 48;
|
||||
break;
|
||||
case 1:
|
||||
inputWidth = 80;
|
||||
inputHeight = 48;
|
||||
break;
|
||||
case 2:
|
||||
inputWidth = 140;
|
||||
inputHeight = 192;
|
||||
break;
|
||||
case 3:
|
||||
inputWidth = 280;
|
||||
inputHeight = 192;
|
||||
break;
|
||||
case 4:
|
||||
inputWidth = 320;
|
||||
inputHeight = 200;
|
||||
break;
|
||||
case 5:
|
||||
inputWidth = 560;
|
||||
inputHeight = 384;
|
||||
break;
|
||||
case 6:
|
||||
inputWidth = 640;
|
||||
inputHeight = 400;
|
||||
break;
|
||||
case 7:
|
||||
inputWidth = 640;
|
||||
inputHeight = 480;
|
||||
break;
|
||||
default:
|
||||
qDebug() << "default, error?";
|
||||
break;
|
||||
}
|
||||
|
||||
QSize sourceSize = ui->label_source->pixmap()->size();
|
||||
double sx = (double)inputWidth / sourceSize.width();
|
||||
double sy = (double)inputHeight / sourceSize.height();
|
||||
QString scaleString = QString("%1 x %2").arg(sx).arg(sy);
|
||||
ui->label_scaleFactor->setText(scaleString);
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::livePreview()
|
||||
{
|
||||
if (ui->checkBox_livePreview->isChecked()) {
|
||||
on_pushButton_preview_clicked();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_pushButton_preview_clicked()
|
||||
{
|
||||
if (ui->label_source->pixmap() == NULL) {
|
||||
ui->plainTextEdit_lastCmd->document()->setPlainText("Please open a source image first!");
|
||||
return;
|
||||
}
|
||||
// GET SCALE FACTOR
|
||||
updateInputSize();
|
||||
|
||||
// NOW GENERATE SCALED QPIXMAP TO SAVE
|
||||
QPixmap scaledPixmap = ui->label_source->pixmap()->scaled(inputWidth,inputHeight);
|
||||
scaledPixmap.save(inputImgPath,"BMP", 0);
|
||||
|
||||
// NOW FIND OUR OUTPUT FORMAT
|
||||
QString outputFormat = "H"; // HIRES
|
||||
switch (ui->comboBox_outputFormat->currentIndex()) {
|
||||
case 0:
|
||||
outputFormat = "L";
|
||||
break;
|
||||
case 1:
|
||||
outputFormat = "DL";
|
||||
break;
|
||||
case 2:
|
||||
outputFormat = "H";
|
||||
break;
|
||||
case 3:
|
||||
outputFormat = "D";
|
||||
break;
|
||||
case 4:
|
||||
outputFormat = "mono";
|
||||
break;
|
||||
}
|
||||
|
||||
QString tempDir = "/tmp";
|
||||
|
||||
|
||||
QString converterPath = "/Users/dbrock/appleiigs/grlib/b2d";
|
||||
//converterPath = QString("%1/b2d").arg(QDir::currentPath());
|
||||
converterPath = QString("%1/b2d").arg(QCoreApplication::applicationDirPath());
|
||||
|
||||
QProcess process;
|
||||
QStringList args;
|
||||
args << inputImgPath; // "/tmp/saved.bmp"
|
||||
args << outputFormat;
|
||||
|
||||
if (ui->horizontalSlider_crossHatch->value() > 0) {
|
||||
QString crossHatchArg = QString("Z%1").arg(ui->horizontalSlider_crossHatch->value());
|
||||
args << crossHatchArg;
|
||||
}
|
||||
if (ui->horizontalSlider_colorBleed->value() > 0) {
|
||||
QString colorBleedArg = QString("R%1").arg(ui->horizontalSlider_colorBleed->value());
|
||||
args << colorBleedArg;
|
||||
}
|
||||
|
||||
|
||||
args << "V"; // MUST HAVE! OUR PREVIEW IMAGE
|
||||
|
||||
|
||||
|
||||
//qint64 pid = 0;
|
||||
//QString working_dir = "/tmp/";
|
||||
//process.startDetached(converterPath, args, working_dir, &pid);
|
||||
process.start(converterPath,args);
|
||||
process.waitForFinished(); // BLOCKS!!!
|
||||
|
||||
qDebug() << converterPath << " " << args ;
|
||||
|
||||
|
||||
QString commandString = QString("%1 %2").arg(converterPath, args.join(" "));
|
||||
ui->plainTextEdit_lastCmd->document()->setPlainText(commandString);
|
||||
|
||||
// ALL DONE SO TRY TO LOAD PREVIEW
|
||||
QPixmap previewPix(previewImgPath);
|
||||
qDebug() << previewPix.width() << previewPix.height();
|
||||
float realScale = 1;
|
||||
if (previewPix.width() == 80) {
|
||||
int scale = 3;
|
||||
realScale = scale;
|
||||
previewPix = previewPix.scaled(80*scale, 48*scale);
|
||||
}
|
||||
if (previewPix.width() == 560) {
|
||||
float scale = 0.5f;
|
||||
realScale = scale;
|
||||
previewPix = previewPix.scaled((int)(560*scale),(int)(384*scale), Qt::KeepAspectRatio,Qt::SmoothTransformation);
|
||||
}
|
||||
ui->label_preview->setPixmap(previewPix);
|
||||
|
||||
ui->groupBox_preview->setTitle(QString("Preview - Scale %1").arg(realScale));
|
||||
|
||||
}
|
||||
|
||||
// When this timer is running, it checks to see if a
|
||||
// preview update has been requested, and handles it if so.
|
||||
void MainWindow::previewTimerTimeout()
|
||||
{
|
||||
if (updateNeeded) {
|
||||
on_pushButton_preview_clicked();
|
||||
updateNeeded = false;
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_horizontalSlider_crossHatch_valueChanged(int value)
|
||||
{
|
||||
if (value==0){
|
||||
ui->label_crossHatch->setText("Off");
|
||||
} else {
|
||||
ui->label_crossHatch->setText(QString::number(value));
|
||||
}
|
||||
updateNeeded = 1;
|
||||
}
|
||||
|
||||
void MainWindow::on_horizontalSlider_colorBleed_valueChanged(int value)
|
||||
{
|
||||
if (value==0){
|
||||
ui->label_colorBleed->setText("Off");
|
||||
} else {
|
||||
ui->label_colorBleed->setText(QString::number(value));
|
||||
}
|
||||
updateNeeded = 1;
|
||||
}
|
||||
|
||||
void MainWindow::on_comboBox_outputFormat_currentIndexChanged(int index)
|
||||
{
|
||||
updateNeeded = 1;
|
||||
updateDisplayModes();
|
||||
}
|
||||
|
||||
void MainWindow::on_comboBox_inputResolution_currentIndexChanged(int index)
|
||||
{
|
||||
updateNeeded = 1;
|
||||
}
|
||||
|
||||
void MainWindow::on_checkBox_livePreview_stateChanged(int arg1)
|
||||
{
|
||||
// preview update timer
|
||||
if (arg1) {
|
||||
updateNeeded = 1;
|
||||
|
||||
previewTimer->start(500);
|
||||
} else {
|
||||
previewTimer->stop();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_pushButton_saveImage_pressed()
|
||||
{
|
||||
if (ui->label_preview->pixmap() == NULL) {
|
||||
ui->plainTextEdit_lastCmd->document()->setPlainText("Please open a source image and run a preview first!");
|
||||
return;
|
||||
}
|
||||
QString a2filename;
|
||||
QString suffix;
|
||||
QString filters = QString("All Images (*.A2FC *.BIN *.SLO *.DLO);;HGR (*.BIN);;DHGR (*.A2FC);;LR (*.SLO);;DLR (*.DLO);;All files (*.*)");
|
||||
QString defaultFilter;
|
||||
// SAVED.A2FC
|
||||
|
||||
if (ui->comboBox_outputFormat->currentText() == "LR") {
|
||||
a2filename = QString("%1/%2.SLO").arg(tmpDirPath,imageName.toUpper());
|
||||
suffix = ".SLO";
|
||||
defaultFilter = "LR (*.SLO)";
|
||||
} else if (ui->comboBox_outputFormat->currentText() == "DLR") {
|
||||
a2filename = QString("%1/%2.DLO").arg(tmpDirPath,imageName.toUpper());
|
||||
suffix = ".DLO";
|
||||
defaultFilter = "DLR (*.DLO)";
|
||||
} else if (ui->comboBox_outputFormat->currentText() == "HGR") {
|
||||
a2filename = QString("%1/%2CH.BIN").arg(tmpDirPath,imageName.toUpper());
|
||||
suffix = ".BIN";
|
||||
defaultFilter = "HGR (*.BIN)";
|
||||
} else if (ui->comboBox_outputFormat->currentText() == "DHGR") {
|
||||
a2filename = QString("%1/%2.A2FC").arg(tmpDirPath,imageName.toUpper());
|
||||
suffix = ".A2FC";
|
||||
defaultFilter = "DHGR (*.A2FC)";
|
||||
} else if (ui->comboBox_outputFormat->currentText() == "MONO") {
|
||||
a2filename = QString("%1/%2M.BIN").arg(tmpDirPath,imageName.toUpper());
|
||||
suffix = ".BIN";
|
||||
defaultFilter = "HGR (*.BIN)";
|
||||
}
|
||||
|
||||
// QString filters("Music files (*.mp3);;Text files (*.txt);;All files (*.*)");
|
||||
|
||||
|
||||
/* Static method approach */
|
||||
QString saveFile = QFileDialog::getSaveFileName(0, "Save file", QDir::currentPath(),
|
||||
filters, &defaultFilter);
|
||||
QFile::copy(a2filename, saveFile);
|
||||
// /* Direct object construction approach */
|
||||
// QFileDialog fileDialog(0, "Save file", QDir::currentPath(), filters);
|
||||
// fileDialog.setD
|
||||
// fileDialog.selectNameFilter(defaultFilter);
|
||||
// fileDialog.exec();
|
||||
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_actionWhat_is_this_triggered()
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText("This is an image conversion utility to output images for use on classic 8-bit Apple II computers.\n\nPlease see readme for instructions.\n\nSorry for bugs, it's just a toy.\n\n(c)2016 Dagen Brock *\n\n\n * bmp2dhr is by Bill Buckles and does the the actual heavy lifting of conversion! But don't bug him about this software, please.");
|
||||
msgBox.exec();
|
||||
}
|
63
buckshot/mainwindow.h
Normal file
@ -0,0 +1,63 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QTemporaryDir>
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
/*
|
||||
* 280x192
|
||||
* ~306 x 210
|
||||
*/
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
private slots:
|
||||
|
||||
|
||||
void on_pushButton_sourceFilename_clicked();
|
||||
|
||||
void on_pushButton_preview_clicked();
|
||||
|
||||
void on_horizontalSlider_crossHatch_valueChanged(int value);
|
||||
|
||||
void on_horizontalSlider_colorBleed_valueChanged(int value);
|
||||
|
||||
void on_comboBox_outputFormat_currentIndexChanged(int index);
|
||||
|
||||
void on_comboBox_inputResolution_currentIndexChanged(int index);
|
||||
|
||||
void on_checkBox_livePreview_stateChanged(int arg1);
|
||||
void previewTimerTimeout();
|
||||
void on_pushButton_saveImage_pressed();
|
||||
|
||||
void on_actionWhat_is_this_triggered();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
void updateInputSize();
|
||||
void livePreview();
|
||||
void updateDisplayModes();
|
||||
int inputWidth;
|
||||
int inputHeight;
|
||||
bool updateNeeded;
|
||||
QTimer *previewTimer;
|
||||
|
||||
QTemporaryDir *tmpDir;
|
||||
QString tmpDirPath;
|
||||
static const QString imageName; //"saved"
|
||||
QString inputImgPath;
|
||||
QString previewImgPath;
|
||||
QString outputImgPath;
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
413
buckshot/mainwindow.ui
Normal file
@ -0,0 +1,413 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>671</width>
|
||||
<height>534</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<widget class="QGroupBox" name="groupBox_source">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>40</y>
|
||||
<width>331</width>
|
||||
<height>241</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Source</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_source">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>25</y>
|
||||
<width>306</width>
|
||||
<height>210</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use "Open Source Image" above to get started.</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_preview">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>362</x>
|
||||
<y>40</y>
|
||||
<width>301</width>
|
||||
<height>221</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Preview</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_preview">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>11</x>
|
||||
<y>22</y>
|
||||
<width>280</width>
|
||||
<height>192</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Apple ][ Preview</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>0</y>
|
||||
<width>651</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_sourceFilename"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_sourceFilename">
|
||||
<property name="text">
|
||||
<string>Open Source Image</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_preview">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>550</x>
|
||||
<y>260</y>
|
||||
<width>111</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Preview</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_crossHatch">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>320</x>
|
||||
<y>407</y>
|
||||
<width>31</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Off</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_colorBleed">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>320</x>
|
||||
<y>439</y>
|
||||
<width>31</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Off</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_livePreview">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>440</x>
|
||||
<y>260</y>
|
||||
<width>101</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Live Preview</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSlider" name="horizontalSlider_colorBleed">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>147</x>
|
||||
<y>438</y>
|
||||
<width>161</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>8</x>
|
||||
<y>296</y>
|
||||
<width>134</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Apple ][ Display Mode</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="comboBox_outputFormat">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>147</x>
|
||||
<y>294</y>
|
||||
<width>201</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>438</y>
|
||||
<width>140</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Color Bleed Reduction</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>105</x>
|
||||
<y>380</y>
|
||||
<width>37</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Scale:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>400</y>
|
||||
<width>140</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Crosshatch Threshold</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>28</x>
|
||||
<y>326</y>
|
||||
<width>114</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Source Resolution:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="comboBox_inputResolution">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>147</x>
|
||||
<y>348</y>
|
||||
<width>201</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSlider" name="horizontalSlider_crossHatch">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>147</x>
|
||||
<y>404</y>
|
||||
<width>161</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_sourceResolution">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>150</x>
|
||||
<y>326</y>
|
||||
<width>211</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Source Resolution:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>21</x>
|
||||
<y>350</y>
|
||||
<width>121</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Scale to Resolution:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_scaleFactor">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>150</x>
|
||||
<y>380</y>
|
||||
<width>211</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Scale</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>520</x>
|
||||
<y>360</y>
|
||||
<width>131</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Last Command Run:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit_lastCmd">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>370</x>
|
||||
<y>380</y>
|
||||
<width>291</width>
|
||||
<height>79</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_saveImage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>550</x>
|
||||
<y>290</y>
|
||||
<width>111</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save Image</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="Line" name="line">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
<y>290</y>
|
||||
<width>20</width>
|
||||
<height>181</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>671</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuAbout">
|
||||
<property name="title">
|
||||
<string>About</string>
|
||||
</property>
|
||||
<addaction name="actionWhat_is_this"/>
|
||||
</widget>
|
||||
<addaction name="menuAbout"/>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="mainToolBar">
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
<action name="actionWhat_is_this">
|
||||
<property name="text">
|
||||
<string>What is this?</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
4
doc/README.txt
Normal file
@ -0,0 +1,4 @@
|
||||
This is an image conversion utility by Dagen Brock.
|
||||
|
||||
It is actually just a GUI layer over bmp2dhgr by Bill Buckles.
|
||||
Don't bug him with support questions for this application.
|
23
make_dist_mac.sh
Executable file
@ -0,0 +1,23 @@
|
||||
DEXTRAS=buckshot-osx/
|
||||
DDIR=buckshot-osx/buckshot.app
|
||||
ADIR=assets
|
||||
|
||||
mkdir -p $DDIR
|
||||
cp -R build-buckshot-Desktop_Qt_5_7_0_clang_64bit-Release/buckshot.app $DEXTRAS
|
||||
|
||||
mkdir -p $DDIR/Contents/MacOS
|
||||
mkdir -p $DDIR/Contents/Resources
|
||||
cp $ADIR/Info.plist $DDIR/Contents
|
||||
cp $ADIR/icons.icns $DDIR/Contents/Resources
|
||||
dylibbundler -od -b -x $DDIR/Contents/MacOS/buckshot -d $DDIR/Contents/libs/
|
||||
|
||||
# files to include in dmg
|
||||
#cp doc/gsplusmanual.pdf $DEXTRAS
|
||||
#cp doc/gsplusmanual.txt $DEXTRAS
|
||||
cp doc/README.txt $DEXTRAS
|
||||
cp ../b2d $DDIR/Contents/MacOS
|
||||
#cp COPYING.txt $DEXTRAS
|
||||
|
||||
#tar -cvzf gsplus-osx.tar.gz gsplus-osx/
|
||||
|
||||
# packaging now in DMG script
|
22
make_dmg_mac.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
git clone https://github.com/andreyvit/yoursway-create-dmg.git
|
||||
cd yoursway-create-dmg
|
||||
|
||||
test -f buckshot.dmg && rm buckshot.dmg
|
||||
./create-dmg \
|
||||
--volname "buckshot" \
|
||||
--volicon "../assets/icons.icns" \
|
||||
--background "../../gsplus/assets/gsp_dmg_bg_600x500.png" \
|
||||
--window-pos 200 120 \
|
||||
--window-size 600 500 \
|
||||
--icon-size 100 \
|
||||
--icon buckshot.app 180 130 \
|
||||
--hide-extension buckshot.app \
|
||||
--icon README.txt 80 330 \
|
||||
--app-drop-link 410 130 \
|
||||
buckshot.dmg \
|
||||
../buckshot-osx/
|
||||
cp buckshot.dmg ..
|
||||
#--icon gsplusmanual.pdf 220 330 \
|
||||
#--icon gsplusmanual.txt 360 330 \
|
||||
#--icon COPYING.txt 500 330 \
|