OSDN Git Service

First Commit
authorENDO Michiaki <inugami.mamoru@gmail.com>
Mon, 15 Sep 2014 00:16:46 +0000 (09:16 +0900)
committerENDO Michiaki <inugami.mamoru@gmail.com>
Mon, 15 Sep 2014 00:16:46 +0000 (09:16 +0900)
19 files changed:
KODS_GUI.pro [new file with mode: 0644]
KODS_GUI.pro.user [new file with mode: 0644]
KODS_GUI.pro.user.16 [new file with mode: 0644]
lidialog.cpp [new file with mode: 0644]
lidialog.h [new file with mode: 0644]
lidialog.ui [new file with mode: 0644]
main.cpp [new file with mode: 0644]
mainwindow.cpp [new file with mode: 0644]
mainwindow.h [new file with mode: 0644]
mainwindow.ui [new file with mode: 0644]
nkdialog.cpp [new file with mode: 0644]
nkdialog.h [new file with mode: 0644]
nkdialog.ui [new file with mode: 0644]
optimize.cpp [new file with mode: 0644]
optimize.h [new file with mode: 0644]
optimize.ui [new file with mode: 0644]
rayinputdialog.cpp [new file with mode: 0644]
rayinputdialog.h [new file with mode: 0644]
rayinputdialog.ui [new file with mode: 0644]

diff --git a/KODS_GUI.pro b/KODS_GUI.pro
new file mode 100644 (file)
index 0000000..7adc6a5
--- /dev/null
@@ -0,0 +1,32 @@
+#-------------------------------------------------
+#
+# Project created by QtCreator 2014-08-07T16:07:35
+#
+#-------------------------------------------------
+
+QT       += core gui
+
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+
+TARGET = KODS_GUI
+TEMPLATE = app
+
+
+SOURCES += main.cpp\
+        mainwindow.cpp \
+    nkdialog.cpp \
+    optimize.cpp \
+    lidialog.cpp \
+    rayinputdialog.cpp
+
+HEADERS  += mainwindow.h \
+    nkdialog.h \
+    optimize.h \
+    lidialog.h \
+    rayinputdialog.h
+
+FORMS    += mainwindow.ui \
+    nkdialog.ui \
+    optimize.ui \
+    lidialog.ui \
+    rayinputdialog.ui
diff --git a/KODS_GUI.pro.user b/KODS_GUI.pro.user
new file mode 100644 (file)
index 0000000..5708a15
--- /dev/null
@@ -0,0 +1,260 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE QtCreatorProject>
+<!-- Written by QtCreator 3.0.1, 2014-09-15T08:53:33. -->
+<qtcreator>
+ <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="bool" key="EditorConfiguration.MouseNavigation">true</value>
+   <value type="int" key="EditorConfiguration.PaddingMode">1</value>
+   <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
+   <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</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</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{8ed612c4-8a9a-4247-b844-c11a8c7dc973}</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</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">/home/dino/KODS_GUI/build-KODS_GUI-Desktop-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">false</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
+      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">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">/home/dino/KODS_GUI/build-KODS_GUI-Desktop-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="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
+      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">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>
+   <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</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">
+    <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">KODS_GUI</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/dino/KODS_GUI/KODSGUI2/KODS_GUI.pro</value>
+    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
+    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">KODS_GUI.pro</value>
+    <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
+    <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
+    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
+    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</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.EnvironmentId</variable>
+  <value type="QByteArray">{8311896f-e53a-4a38-ac24-a0d4586d7253}</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+  <value type="int">15</value>
+ </data>
+</qtcreator>
diff --git a/KODS_GUI.pro.user.16 b/KODS_GUI.pro.user.16
new file mode 100644 (file)
index 0000000..13b4177
--- /dev/null
@@ -0,0 +1,477 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE QtCreatorProject>
+<!-- Written by QtCreator 3.2.0, 2014-09-14T19:30:32. -->
+<qtcreator>
+ <data>
+  <variable>EnvironmentId</variable>
+  <value type="QByteArray">{6a94a7a4-0028-4f8c-a4e8-5f6e84261a89}</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.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.3 clang 64bit</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.3 clang 64bit</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.53.clang_64_kit</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</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/dino/Desktop/KODSGUI2/build-KODS_GUI-Desktop_Qt_5_3_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">false</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
+      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">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">ビルド</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">クリーン</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">デバッグ</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/dino/Desktop/KODSGUI2/build-KODS_GUI-Desktop_Qt_5_3_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="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
+      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">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">ビルド</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">クリーン</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">リリース</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">2</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">デプロイ</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">ローカルにデプロイ</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">
+    <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">KODS_GUI</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/Users/dino/Desktop/KODSGUI2/KODSGUI2/KODS_GUI.pro</value>
+    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
+    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">KODS_GUI.pro</value>
+    <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
+    <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
+    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></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.Target.1</variable>
+  <valuemap type="QVariantMap">
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">armeabi-v7a 用 Android (GCC 4.8, Qt 5.3.1)</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">armeabi-v7a 用 Android (GCC 4.8, Qt 5.3.1)</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{450305a6-b8cd-4b70-86c4-e7db42e7815f}</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</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/dino/Desktop/KODSGUI2/build-KODS_GUI-armeabi_v7a_Android_GCC_4_8_Qt_5_3_1-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">false</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
+      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">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">ビルド</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">クリーン</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">デバッグ</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/dino/Desktop/KODSGUI2/build-KODS_GUI-armeabi_v7a_Android_GCC_4_8_Qt_5_3_1-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="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
+      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">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">ビルド</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">クリーン</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">リリース</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">2</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="int" key="Android.AndroidPackageInstallationStep.AndroidDirectory">1</value>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">アプリケーションデータのコピー</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.AndroidPackageInstallationStep</value>
+     </valuemap>
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
+      <value type="QString" key="BuildTargetSdk">android-20</value>
+      <value type="QString" key="KeystoreLocation"></value>
+      <value type="QString" key="ProFilePathForInputFile">/Users/dino/Desktop/KODSGUI2/KODSGUI2/KODS_GUI.pro</value>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Android デバイスにデプロイ</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.AndroidDeployQtStep</value>
+      <value type="int" key="Qt4ProjectManager.AndroidDeployQtStep.DeployQtAction">2</value>
+      <value type="bool" key="SignPackage">false</value>
+      <value type="bool" key="VerboseOutput">false</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">デプロイ</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">Android デバイスにデプロイ</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Android デバイスにデプロイ</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.AndroidDeployConfiguration2</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">
+    <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="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Android デバイス上で実行</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.AndroidRunConfiguration:/Users/dino/Desktop/KODSGUI2/KODSGUI2/KODS_GUI.pro</value>
+    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">KODS_GUI.pro</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">2</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+  <value type="int">16</value>
+ </data>
+ <data>
+  <variable>Version</variable>
+  <value type="int">16</value>
+ </data>
+</qtcreator>
diff --git a/lidialog.cpp b/lidialog.cpp
new file mode 100644 (file)
index 0000000..046255b
--- /dev/null
@@ -0,0 +1,31 @@
+#include "lidialog.h"
+#include "ui_lidialog.h"
+
+LIDialog::LIDialog(QWidget *parent) :
+    QDialog(parent),
+    ui(new Ui::LIDialog)
+{
+    ui->setupUi(this);
+    connect( ui->buttonBox, SIGNAL(accepted()), this, SLOT(onAccept()) );
+    connect( ui->buttonBox, SIGNAL(rejected()), this, SLOT(onReject()) );
+}
+
+void LIDialog::onAccept()
+{
+
+    LensIdentifier = ui->lineEdit->text();
+
+
+Button3 = ui->buttonBox->Ok;
+
+}
+
+void LIDialog::onReject()
+{
+reject();
+}
+
+LIDialog::~LIDialog()
+{
+    delete ui;
+}
diff --git a/lidialog.h b/lidialog.h
new file mode 100644 (file)
index 0000000..1d0437a
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef LIDIALOG_H
+#define LIDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+class LIDialog;
+}
+
+class LIDialog : public QDialog
+{
+    Q_OBJECT
+
+public:
+    explicit LIDialog(QWidget *parent = 0);
+
+    QString LensIdentifier;
+
+    int Button3;
+
+    Ui::LIDialog *ui;
+
+    ~LIDialog();
+
+private:
+
+private slots:
+    void onAccept();
+    void onReject();
+
+};
+
+#endif // LIDIALOG_H
diff --git a/lidialog.ui b/lidialog.ui
new file mode 100644 (file)
index 0000000..6f11a30
--- /dev/null
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>LIDialog</class>
+ <widget class="QDialog" name="LIDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>150</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Input Lens Identifier</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QLineEdit" name="lineEdit"/>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>LIDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>LIDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/main.cpp b/main.cpp
new file mode 100644 (file)
index 0000000..b48f94e
--- /dev/null
+++ b/main.cpp
@@ -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();
+}
diff --git a/mainwindow.cpp b/mainwindow.cpp
new file mode 100644 (file)
index 0000000..848768f
--- /dev/null
@@ -0,0 +1,1724 @@
+#include "mainwindow.h"
+#include "nkdialog.h"
+#include "optimize.h"
+#include "lidialog.h"
+#include "ui_mainwindow.h"
+#include <QtWidgets>
+#include <QDebug>
+#include <QLineEdit>
+#include <QFont>
+#include <QMenu>
+
+MainWindow::MainWindow(QMainWindow *parent)
+    : QMainWindow( parent )
+{
+
+    hdir="/usr/local/KODS";   //For Linux, MacOSX
+
+//    hdir="/sdcard/KODS";     //For Android
+
+
+
+    setupUi(this);
+
+    msgView->setFont(QFont("courier",10,QFont::Bold));
+
+    proc = new QProcess(this);
+    QObject::connect( proc, SIGNAL(readyReadStandardOutput()), this, SLOT(slot_appendView()) ); //display stdout
+    QObject::connect( proc, SIGNAL(readyReadStandardError()), this, SLOT(slot_appendView()) ); //display stderr
+
+    table->installEventFilter(this);  //install event filter
+
+    table->setColumnCount( 6 );
+    table->setRowCount( 20 );
+
+    table ->setContextMenuPolicy(Qt::CustomContextMenu);
+    connect(table, SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(slot_ShowContextMenu(QPoint)));    //context menu
+
+    addcontextmenu();
+
+    proc->start(hdir+"/kods");
+    proc->write("RTG ALL\n");
+    ReadFileToTable(hdir+"/CURLENS/LENSTEXT.DAT");
+
+    for(int i=0; i<=nol-1; i++){
+            tableitem=table->item(i,2);
+            tableitem->setFlags(Qt::ItemIsEnabled);    // material is not editable
+    }
+
+    for(int i=0; i<=1; i++){
+            tableitem=table->item(0,i);
+            tableitem->setFlags(Qt::ItemIsEnabled);    // infinity distance is not editable
+    }
+
+    for(int i=0; i<=1; i++){
+            tableitem=table->item(nol-1,i);
+            tableitem->setFlags(Qt::ItemIsEnabled);    // last surface is not editable
+    }
+
+}
+
+void MainWindow::addcontextmenu()
+{
+
+    Glass("CHANCE.BIN");
+    GN1 << GN;
+    GN1.sort();
+    NoGlass1=NoGlass;
+
+    Glass("CORNIN.BIN");
+    GN2 << GN;
+    GN2.sort();
+    NoGlass2=NoGlass;
+
+    Glass("HIKARI.BIN");
+    GN3 << GN;
+    GN3.sort();
+    NoGlass3=NoGlass;
+
+    Glass("HOYA.BIN");
+    GN4 << GN;
+    GN4.sort();
+    NoGlass4=NoGlass;
+
+    Glass("OHARA.BIN");
+    GN5 << GN;
+    GN5.sort();
+    NoGlass5=NoGlass;
+
+    Glass("OHARA-O.BIN");
+    GN6 << GN;
+    GN6.sort();
+    NoGlass6=NoGlass;
+
+    Glass("RADHARD.BIN");
+    GN7 << GN;
+    GN7.sort();
+    NoGlass7=NoGlass;
+
+    Glass("SCH2000.BIN");
+    GN8 << GN;
+    GN8.sort();
+    NoGlass8=NoGlass;
+
+    Glass("SCHOTT.BIN");
+    GN9 << GN;
+    GN9.sort();
+    NoGlass9=NoGlass;
+
+    MaterialMenu=menuEdit->addMenu("Input Material");
+
+    Airaction=new QAction("Air",this);
+    MaterialMenu->addAction(Airaction);
+    connect(Airaction, SIGNAL(triggered()), this, SLOT(InputAir()));
+
+    SubMenu1=MaterialMenu->addMenu("CHANCE");
+    SubMenu2=MaterialMenu->addMenu("CORNIN");
+    SubMenu3=MaterialMenu->addMenu("HIKARI");
+    SubMenu4=MaterialMenu->addMenu("HOYA");
+    SubMenu5=MaterialMenu->addMenu("OHARA");
+    SubMenu6=MaterialMenu->addMenu("OHARA-O");
+    SubMenu7=MaterialMenu->addMenu("RADHARD");
+    SubMenu8=MaterialMenu->addMenu("SCH2000");
+    SubMenu9=MaterialMenu->addMenu("SCHOTT");
+
+    menuEdit->insertMenu(actionInput_Lens_Idenfier, MaterialMenu);
+
+    for (int i=0;i<=NoGlass1;i++){
+
+        Makeraction=new QAction(QString(GN1.at(i)),this);
+        Makeraction->setData(QString(GN1.at(i)));
+        this->SubMenu1->addAction(Makeraction);
+
+    }
+
+    connect(SubMenu1, SIGNAL(triggered(QAction*)),this,SLOT(ShowContextMenu(QAction*)));
+
+    SubMenu1->setStyleSheet("QMenu {menu-scrollable: 1;}");
+
+
+    for (int i=0;i<=NoGlass2;i++){
+
+        Makeraction=new QAction(QString(GN2.at(i)),this);
+        Makeraction->setData(QString(GN2.at(i)));
+        this->SubMenu2->addAction(Makeraction);
+
+    }
+
+    connect(SubMenu2, SIGNAL(triggered(QAction*)),this,SLOT(ShowContextMenu2(QAction*)));
+
+    SubMenu2->setStyleSheet("QMenu {menu-scrollable: 1;}");
+
+
+    for (int i=0;i<=NoGlass3;i++){
+
+        Makeraction=new QAction(QString(GN3.at(i)),this);
+        Makeraction->setData(QString(GN3.at(i)));
+        this->SubMenu3->addAction(Makeraction);
+
+    }
+
+    connect(SubMenu3, SIGNAL(triggered(QAction*)),this,SLOT(ShowContextMenu3(QAction*)));
+
+    SubMenu3->setStyleSheet("QMenu {menu-scrollable: 1;}");
+
+
+    for (int i=0;i<=NoGlass4;i++){
+
+        Makeraction=new QAction(QString(GN4.at(i)),this);
+        Makeraction->setData(QString(GN4.at(i)));
+        this->SubMenu4->addAction(Makeraction);
+
+    }
+
+    connect(SubMenu4, SIGNAL(triggered(QAction*)),this,SLOT(ShowContextMenu4(QAction*)));
+
+    SubMenu4->setStyleSheet("QMenu {menu-scrollable: 1;}");
+
+
+    for (int i=0;i<=NoGlass5;i++){
+
+        Makeraction=new QAction(QString(GN5.at(i)),this);
+        Makeraction->setData(QString(GN5.at(i)));
+        this->SubMenu5->addAction(Makeraction);
+
+    }
+
+    connect(SubMenu5, SIGNAL(triggered(QAction*)),this,SLOT(ShowContextMenu5(QAction*)));
+
+    SubMenu5->setStyleSheet("QMenu {menu-scrollable: 1;}");
+
+
+    for (int i=0;i<=NoGlass6;i++){
+
+        Makeraction=new QAction(QString(GN6.at(i)),this);
+        Makeraction->setData(QString(GN6.at(i)));
+        this->SubMenu6->addAction(Makeraction);
+
+    }
+
+    connect(SubMenu6, SIGNAL(triggered(QAction*)),this,SLOT(ShowContextMenu6(QAction*)));
+
+    SubMenu6->setStyleSheet("QMenu {menu-scrollable: 1;}");
+
+
+    for (int i=0;i<=NoGlass7;i++){
+
+        Makeraction=new QAction(QString(GN7.at(i)),this);
+        Makeraction->setData(QString(GN7.at(i)));
+        this->SubMenu7->addAction(Makeraction);
+
+    }
+
+    connect(SubMenu7, SIGNAL(triggered(QAction*)),this,SLOT(ShowContextMenu7(QAction*)));
+
+    SubMenu7->setStyleSheet("QMenu {menu-scrollable: 1;}");
+
+
+    for (int i=0;i<=NoGlass8;i++){
+
+        Makeraction=new QAction(QString(GN8.at(i)),this);
+        Makeraction->setData(QString(GN8.at(i)));
+        this->SubMenu8->addAction(Makeraction);
+
+    }
+
+    connect(SubMenu8, SIGNAL(triggered(QAction*)),this,SLOT(ShowContextMenu8(QAction*)));
+
+    SubMenu8->setStyleSheet("QMenu {menu-scrollable: 1;}");
+
+
+
+    for (int i=0;i<=NoGlass9;i++){
+
+        Makeraction=new QAction(QString(GN9.at(i)),this);
+        Makeraction->setData(QString(GN9.at(i)));
+        this->SubMenu9->addAction(Makeraction);
+
+    }
+
+    connect(SubMenu9, SIGNAL(triggered(QAction*)),this,SLOT(ShowContextMenu9(QAction*)));
+
+    SubMenu9->setStyleSheet("QMenu {menu-scrollable: 1;}");
+
+}
+
+
+void MainWindow::slot_commandExec()
+{
+    QString cmd;
+
+    cmd = cmdLine->text();
+
+    QByteArray input(cmd.toLatin1()+"\n");
+    msgView->append(cmd);
+
+    proc->write(input);
+
+    if (input == "exit")
+    {
+        proc->write("EXIT\n");
+    }
+
+    cmdLine->clear();
+}
+
+
+void MainWindow::slot_appendView()
+{
+    QTextCodec *codec = QTextCodec::codecForName( "UTF8" );
+    QString str( codec->toUnicode(proc->readAllStandardOutput()) );
+    QString str2( codec->toUnicode(proc->readAllStandardError()) );
+    msgView->append(str);
+    msgView->append(str2);
+}
+
+
+void MainWindow::ShowContextMenu(QAction *Action)
+
+{
+    QString str = Action->text();
+    row = table->currentRow();          //get number of row
+    QString Qrow = QString::number(row);
+    qDebug() << Action->parent()->objectName();
+
+    LF=18;
+    DataRead("CHANCE.BIN",str,row);
+    table->setItem(row, 2, new QTableWidgetItem("CHANCE "+str));  //Change table value to MODEL
+    table->resizeColumnToContents(2);
+    tableitem=table->item(row,2);
+    tableitem->setFlags(Qt::ItemIsEnabled);
+    proc->write("U L\n");
+    proc->write("CHG "+Qrow.toLatin1()+"\n");
+    proc->write("CHANCE "+str.toLatin1()+"\n");
+    proc->write("EOS\n");
+    proc->write("RTG ALL\n");
+}
+
+void MainWindow::ShowContextMenu2(QAction *Action)
+
+{
+    QString str = Action->text();
+    row = table->currentRow();          //get number of row
+    QString Qrow = QString::number(row);
+    qDebug() << Action->parent()->objectName();
+
+    LF=18;
+    DataRead("CORNIN.BIN",str,row);
+    table->setItem(row, 2, new QTableWidgetItem("CORNIN "+str));  //Change table value to MODEL
+    table->resizeColumnToContents(2);
+    tableitem=table->item(row,2);
+    tableitem->setFlags(Qt::ItemIsEnabled);
+    proc->write("U L\n");
+    proc->write("CHG "+Qrow.toLatin1()+"\n");
+    proc->write("CORNIN "+str.toLatin1()+"\n");
+    proc->write("EOS\n");
+    proc->write("RTG ALL\n");
+}
+
+void MainWindow::ShowContextMenu3(QAction *Action)
+
+{
+    QString str = Action->text();
+    row = table->currentRow();          //get number of row
+    QString Qrow = QString::number(row);
+    qDebug() << Action->parent()->objectName();
+
+    LF=18;
+    DataRead("HIKARI.BIN",str,row);
+    table->setItem(row, 2, new QTableWidgetItem("HIKARI "+str));  //Change table value to MODEL
+    table->resizeColumnToContents(2);
+    tableitem=table->item(row,2);
+    tableitem->setFlags(Qt::ItemIsEnabled);
+    proc->write("U L\n");
+    proc->write("CHG "+Qrow.toLatin1()+"\n");
+    proc->write("HIKARI "+str.toLatin1()+"\n");
+    proc->write("EOS\n");
+    proc->write("RTG ALL\n");
+}
+
+void MainWindow::ShowContextMenu4(QAction *Action)
+
+{
+    QString str = Action->text();
+    row = table->currentRow();          //get number of row
+    QString Qrow = QString::number(row);
+    qDebug() << Action->parent()->objectName();
+
+    LF=18;
+    DataRead("HOYA.BIN",str,row);
+    table->setItem(row, 2, new QTableWidgetItem("HOYA "+str));  //Change table value to MODEL
+    table->resizeColumnToContents(2);
+    tableitem=table->item(row,2);
+    tableitem->setFlags(Qt::ItemIsEnabled);
+    proc->write("U L\n");
+    proc->write("CHG "+Qrow.toLatin1()+"\n");
+    proc->write("HOYA "+str.toLatin1()+"\n");
+    proc->write("EOS\n");
+    proc->write("RTG ALL\n");
+}
+
+void MainWindow::ShowContextMenu5(QAction *Action)
+
+{
+    QString str = Action->text();
+    row = table->currentRow();          //get number of row
+    QString Qrow = QString::number(row);
+    qDebug() << Action->parent()->objectName();
+
+    LF=18;
+    DataRead("OHARA.BIN",str,row);
+    table->setItem(row, 2, new QTableWidgetItem("OHARA "+str));  //Change table value to MODEL
+    table->resizeColumnToContents(2);
+    tableitem=table->item(row,2);
+    tableitem->setFlags(Qt::ItemIsEnabled);
+    proc->write("U L\n");
+    proc->write("CHG "+Qrow.toLatin1()+"\n");
+    proc->write("OHARA "+str.toLatin1()+"\n");
+    proc->write("EOS\n");
+    proc->write("RTG ALL\n");
+}
+
+void MainWindow::ShowContextMenu6(QAction *Action)
+
+{
+    QString str = Action->text();
+    row = table->currentRow();          //get number of row
+    QString Qrow = QString::number(row);
+    qDebug() << Action->parent()->objectName();
+
+    LF=18;
+    DataRead("OHARA-O.BIN",str,row);
+    table->setItem(row, 2, new QTableWidgetItem("OHARA-O "+str));  //Change table value to MODEL
+    table->resizeColumnToContents(2);
+    tableitem=table->item(row,2);
+    tableitem->setFlags(Qt::ItemIsEnabled);
+    proc->write("U L\n");
+    proc->write("CHG "+Qrow.toLatin1()+"\n");
+    proc->write("OHARA-O "+str.toLatin1()+"\n");
+    proc->write("EOS\n");
+    proc->write("RTG ALL\n");
+}
+
+void MainWindow::ShowContextMenu7(QAction *Action)
+
+{
+    QString str = Action->text();
+    row = table->currentRow();          //get number of row
+    QString Qrow = QString::number(row);
+    qDebug() << Action->parent()->objectName();
+
+    LF=18;
+    DataRead("RADHARD.BIN",str,row);
+    table->setItem(row, 2, new QTableWidgetItem("RADHARD "+str));  //Change table value to MODEL
+    table->resizeColumnToContents(2);
+    tableitem=table->item(row,2);
+    tableitem->setFlags(Qt::ItemIsEnabled);
+    proc->write("U L\n");
+    proc->write("CHG "+Qrow.toLatin1()+"\n");
+    proc->write("RADHARD "+str.toLatin1()+"\n");
+    proc->write("EOS\n");
+    proc->write("RTG ALL\n");
+}
+
+void MainWindow::ShowContextMenu8(QAction *Action)
+
+{
+    QString str = Action->text();
+    row = table->currentRow();          //get number of row
+    QString Qrow = QString::number(row);
+    qDebug() << Action->parent()->objectName();
+
+    LF=18;
+    DataRead("SCH2000.BIN",str,row);
+    table->setItem(row, 2, new QTableWidgetItem("SCH2000 "+str));  //Change table value to MODEL
+    table->resizeColumnToContents(2);
+    tableitem=table->item(row,2);
+    tableitem->setFlags(Qt::ItemIsEnabled);
+    proc->write("U L\n");
+    proc->write("CHG "+Qrow.toLatin1()+"\n");
+    proc->write("SCH2000 "+str.toLatin1()+"\n");
+    proc->write("EOS\n");
+    proc->write("RTG ALL\n");
+}
+
+void MainWindow::ShowContextMenu9(QAction *Action)
+
+{
+    QString str = Action->text();
+    row = table->currentRow();          //get number of row
+    QString Qrow = QString::number(row);
+    qDebug() << Action->parent()->objectName();
+
+    LF=18;
+    DataRead("SCHOTT.BIN",str,row);
+    table->setItem(row, 2, new QTableWidgetItem("SCHOTT "+str));  //Change table value to MODEL
+    table->resizeColumnToContents(2);
+    tableitem=table->item(row,2);
+    tableitem->setFlags(Qt::ItemIsEnabled);
+    proc->write("U L\n");
+    proc->write("CHG "+Qrow.toLatin1()+"\n");
+    proc->write("SCHOTT "+str.toLatin1()+"\n");
+    proc->write("EOS\n");
+    proc->write("RTG ALL\n");
+}
+
+
+
+void MainWindow::InputAir()
+{
+    row = table->currentRow();          //get number of row
+    QString Qrow = QString::number(row);
+
+    table->setItem(row, 2, new QTableWidgetItem("AIR"));
+    tableitem=table->item(row,2);
+    tableitem->setFlags(Qt::ItemIsEnabled);
+    table->setItem(row, 3, new QTableWidgetItem(""));
+    table->setItem(row, 4, new QTableWidgetItem(""));
+    proc->write("U L\n");
+    proc->write("CHG "+QString(Qrow).toLatin1()+"\n");
+    proc->write("AIR\n");
+    proc->write("EOS\n");
+    proc->write("RTG ALL\n");
+}
+
+
+void MainWindow::slot_ShowContextMenu(const QPoint& Pos){
+
+    row = table->currentRow();          //get number of row
+    QString Qrow = QString::number(row);
+    column = table->currentColumn();    //get number of column
+
+    QMenu ContextMenu(this);
+    QMenu SubMenu1("CHANCE");
+    QMenu SubMenu2("CORNIN");
+    QMenu SubMenu3("HIKARI");
+    QMenu SubMenu4("HOYA");
+    QMenu SubMenu5("OHARA");
+    QMenu SubMenu6("OHARA-O");
+    QMenu SubMenu7("RADHARD");
+    QMenu SubMenu8("SCH2000");
+    QMenu SubMenu9("SCHOTT");
+
+    ContextMenu.addAction("Insert Surface");
+    ContextMenu.addAction("Delete Surface");
+    ContextMenu.addSeparator();
+    ContextMenu.addAction("Model");
+    ContextMenu.addAction("AIR");
+
+    ContextMenu.addMenu(&SubMenu1);
+    for (int i=0;i<=NoGlass1;i++){
+        SubMenu1.addAction(QString(GN1.at(i)).toLatin1());
+        SubMenu1.setStyleSheet("QMenu {menu-scrollable: 1;}");
+    }
+
+    ContextMenu.addMenu(&SubMenu2);
+    for (int i=0;i<=NoGlass2;i++){
+        SubMenu2.addAction(QString(GN2.at(i)).toLatin1());
+        SubMenu2.setStyleSheet("QMenu {menu-scrollable: 1;}");
+    }
+
+    ContextMenu.addMenu(&SubMenu3);
+    for (int i=0;i<=NoGlass3;i++){
+        SubMenu3.addAction(QString(GN3.at(i)).toLatin1());
+        SubMenu3.setStyleSheet("QMenu {menu-scrollable: 1;}");
+    }
+
+    ContextMenu.addMenu(&SubMenu4);
+    for (int i=0;i<=NoGlass4;i++){
+        SubMenu4.addAction(QString(GN4.at(i)).toLatin1());
+        SubMenu4.setStyleSheet("QMenu {menu-scrollable: 1;}");
+    }
+
+    ContextMenu.addMenu(&SubMenu5);
+    for (int i=0;i<=NoGlass5;i++){
+        SubMenu5.addAction(QString(GN5.at(i)).toLatin1());
+        SubMenu5.setStyleSheet("QMenu {menu-scrollable: 1;}");
+    }
+
+    ContextMenu.addMenu(&SubMenu6);
+      for (int i=0;i<=NoGlass6;i++){
+        SubMenu6.addAction(QString(GN6.at(i)).toLatin1());
+        SubMenu6.setStyleSheet("QMenu {menu-scrollable: 1;}");
+    }
+
+    ContextMenu.addMenu(&SubMenu7);
+    for (int i=0;i<=NoGlass7;i++){
+        SubMenu7.addAction(QString(GN7.at(i)).toLatin1());
+        SubMenu7.setStyleSheet("QMenu {menu-scrollable: 1;}");
+    }
+
+    ContextMenu.addMenu(&SubMenu8);
+    for (int i=0;i<=NoGlass8;i++){
+        SubMenu8.addAction(QString(GN8.at(i)).toLatin1());
+        SubMenu8.setStyleSheet("QMenu {menu-scrollable: 1;}");
+    }
+
+    ContextMenu.addMenu(&SubMenu9);
+    for (int i=0;i<=NoGlass9;i++){
+        SubMenu9.addAction(QString(GN9.at(i)).toLatin1());
+        SubMenu9.setStyleSheet("QMenu {menu-scrollable: 1;}");
+    }
+
+
+    QAction* selectedItem = ContextMenu.exec(table->mapToGlobal(Pos));
+
+    if (selectedItem==NULL){
+        return;
+    }
+
+
+    if (selectedItem->text()==QString("Insert Surface")){
+        slot_actionInsert_surface();
+    }
+
+    if (selectedItem->text()==QString("Delete Surface")){
+        slot_actionDelete_surface();
+    }
+
+    if (selectedItem->text()==QString("Model")){
+        slot_actionModeldialog();
+        table->resizeColumnToContents(2);
+    }
+
+    if (selectedItem->text()==QString("AIR")){
+        InputAir();
+    }
+
+    if (selectedItem->parent()==&SubMenu1){
+        LF=18;
+        DataRead("CHANCE.BIN",selectedItem->text(),row);
+        table->setItem(row, 2, new QTableWidgetItem("CHANCE "+selectedItem->text()));  //Change table value to MODEL
+        table->resizeColumnToContents(2);
+        tableitem=table->item(row,2);
+        tableitem->setFlags(Qt::ItemIsEnabled);
+        proc->write("U L\n");
+        proc->write("CHG "+Qrow.toLatin1()+"\n");
+        proc->write("CHANCE "+selectedItem->text().toLatin1()+"\n");
+        proc->write("EOS\n");
+        proc->write("RTG ALL\n");
+        return;
+    }
+
+    if (selectedItem->parent()==&SubMenu2){
+        LF=18;
+        DataRead("CORNIN.BIN",selectedItem->text(),row);
+        table->setItem(row, 2, new QTableWidgetItem("CORNIN "+selectedItem->text()));  //Change table value to MODEL
+        table->resizeColumnToContents(2);
+        tableitem=table->item(row,2);
+        tableitem->setFlags(Qt::ItemIsEnabled);
+        proc->write("U L\n");
+        proc->write("CHG "+Qrow.toLatin1()+"\n");
+        proc->write("CORNIN "+selectedItem->text().toLatin1()+"\n");
+        proc->write("EOS\n");
+        proc->write("RTG ALL\n");
+        return;
+    }
+
+    if (selectedItem->parent()==&SubMenu3){
+        LF=18;
+        DataRead("HIKARI.BIN",selectedItem->text(),row);
+        table->setItem(row, 2, new QTableWidgetItem("HIKARI "+selectedItem->text()));  //Change table value to MODEL
+        table->resizeColumnToContents(2);
+        tableitem=table->item(row,2);
+        tableitem->setFlags(Qt::ItemIsEnabled);
+        proc->write("U L\n");
+        proc->write("CHG "+Qrow.toLatin1()+"\n");
+        proc->write("HIKARI "+selectedItem->text().toLatin1()+"\n");
+        proc->write("EOS\n");
+        proc->write("RTG ALL\n");
+        return;
+    }
+
+    if (selectedItem->parent()==&SubMenu4){
+        LF=18;
+        DataRead("HOYA.BIN",selectedItem->text(),row);
+        table->setItem(row, 2, new QTableWidgetItem("HOYA "+selectedItem->text()));  //Change table value to MODEL
+        table->resizeColumnToContents(2);
+        tableitem=table->item(row,2);
+        tableitem->setFlags(Qt::ItemIsEnabled);
+        proc->write("U L\n");
+        proc->write("CHG "+Qrow.toLatin1()+"\n");
+        proc->write("HOYA "+selectedItem->text().toLatin1()+"\n");
+        proc->write("EOS\n");
+        proc->write("RTG ALL\n");
+        return;
+    }
+
+    if (selectedItem->parent()==&SubMenu5){
+        LF=18;
+        DataRead("OHARA.BIN",selectedItem->text(),row);
+        table->setItem(row, 2, new QTableWidgetItem("OHARA "+selectedItem->text()));  //Change table value to MODEL
+        table->resizeColumnToContents(2);
+        tableitem=table->item(row,2);
+        tableitem->setFlags(Qt::ItemIsEnabled);
+        proc->write("U L\n");
+        proc->write("CHG "+Qrow.toLatin1()+"\n");
+        proc->write("OHARA "+selectedItem->text().toLatin1()+"\n");
+        proc->write("EOS\n");
+        proc->write("RTG ALL\n");
+        return;
+    }
+
+    if (selectedItem->parent()==&SubMenu6){
+        LF=18;
+        DataRead("OHARA-O.BIN",selectedItem->text(),row);
+        table->setItem(row, 2, new QTableWidgetItem("OHARA-O "+selectedItem->text()));  //Change table value to MODEL
+        table->resizeColumnToContents(2);
+        tableitem=table->item(row,2);
+        tableitem->setFlags(Qt::ItemIsEnabled);
+        proc->write("U L\n");
+        proc->write("CHG "+Qrow.toLatin1()+"\n");
+        proc->write("OHARA "+selectedItem->text().toLatin1()+"\n");
+        proc->write("EOS\n");
+        proc->write("RTG ALL\n");
+        return;
+    }
+
+    if (selectedItem->parent()==&SubMenu7){
+        LF=18;
+        DataRead("RADHARD.BIN",selectedItem->text(),row);
+        table->setItem(row, 2, new QTableWidgetItem("RADHARD "+selectedItem->text()));  //Change table value to MODEL
+        table->resizeColumnToContents(2);
+        tableitem=table->item(row,2);
+        tableitem->setFlags(Qt::ItemIsEnabled);
+        proc->write("U L\n");
+        proc->write("CHG "+Qrow.toLatin1()+"\n");
+        proc->write("RADHARD "+selectedItem->text().toLatin1()+"\n");
+        proc->write("EOS\n");
+        proc->write("RTG ALL\n");
+        return;
+    }
+
+    if (selectedItem->parent()==&SubMenu8){
+        LF=18;
+        DataRead("SCH2000.BIN",selectedItem->text(),row);
+        table->setItem(row, 2, new QTableWidgetItem("SCH2000 "+selectedItem->text()));  //Change table value to MODEL
+        table->resizeColumnToContents(2);
+        tableitem=table->item(row,2);
+        tableitem->setFlags(Qt::ItemIsEnabled);
+        proc->write("U L\n");
+        proc->write("CHG "+Qrow.toLatin1()+"\n");
+        proc->write("SCH2000 "+selectedItem->text().toLatin1()+"\n");
+        proc->write("EOS\n");
+        proc->write("RTG ALL\n");
+        return;
+    }
+
+    if (selectedItem->parent()==&SubMenu9){
+        LF=18;
+        DataRead("SCHOTT.BIN",selectedItem->text(),row);
+        table->setItem(row, 2, new QTableWidgetItem("SCHOTT "+selectedItem->text()));  //Change table value to MODEL
+        table->resizeColumnToContents(2);
+        tableitem=table->item(row,2);
+        tableitem->setFlags(Qt::ItemIsEnabled);
+        proc->write("U L\n");
+        proc->write("CHG "+Qrow.toLatin1()+"\n");
+        proc->write("SCHOTT "+selectedItem->text().toLatin1()+"\n");
+        proc->write("EOS\n");
+        proc->write("RTG ALL\n");
+        return;
+    }
+
+    else return;
+
+}
+
+
+void MainWindow::Glass(QString BinName){
+
+    QByteArray HexData;
+    GN.clear();
+
+    QFile GlassData(hdir+"/LIBGLA/" + BinName);                 //set data file
+
+    GlassData.open(QIODevice::ReadOnly);                    //file open
+    HexData = GlassData.readAll();                          //Read all data to Hex
+    GlassData.close();
+
+    int DataSize = int(GlassData.size());
+    int j=0;                                                //skip first 2 words ('CA')
+
+    QByteArray GlassName;
+
+    int i=132;
+
+    while (i<=DataSize){
+
+
+        while (HexData[i]==char(0x00)){                                   //skip '00'
+            i++;
+        }
+
+        for (int k=i;k<=i+8;k++){
+            GlassName= GlassName+HexData[k];
+        }
+        i=i+8;
+
+        GN << GlassName;
+        j++;
+        i+=100;
+
+        GlassName.clear();
+    }
+
+    NoGlass=j-2;
+
+    return;
+
+}
+
+
+void MainWindow::DataRead(QString BinName, QString name, int k){
+
+    QByteArray HexData;
+    QByteArray GlassName;
+    GlassName.clear();
+    GN.clear();
+
+    double nF,nD,nC;
+
+
+    QFile GlassData(hdir+"/LIBGLA/"+ BinName);                 //set data file
+    GlassData.open(QIODevice::ReadOnly);                    //file open
+    HexData = GlassData.readAll();                          //Read all data to Hex
+    GlassData.close();
+
+    int i=2;                                                 //skip first 2 word
+
+    while (GlassName!=name.trimmed()){
+
+        while (HexData[i]==char(0x00)){                                   //skip '00'
+            i++;
+        }
+
+        GlassName.clear();
+
+            for(int j=i;j<=i+10;j++){                                       //Read GlassName (10 letters)
+                GlassName=(GlassName+HexData[j]).trimmed();
+            }
+                qDebug()<<GlassName;
+            if (GlassName==name.trimmed()) {
+                break;
+             }
+
+            i=i+74;
+    }
+
+      i=i+10;
+      GN << GlassName;
+    qDebug() << "GlassName= "+GlassName;
+
+      while (HexData[i]==char(0x20)){                                 //skip '0x20'
+          i++;
+      }
+
+
+      while (HexData[i]!=char(0x20)){                                 //read catalog No. until '0x20'
+              qDebug() << char(HexData[i]);
+        i++;
+      }
+
+
+      while (HexData[i]==char(0x20)){                                   //skip '0x20'
+        i++;
+      }
+
+
+    double A0,A1,A2,A3,A4,A5;
+                                                                       // Read binary data
+        A0=numconv(i,HexData);
+        A1=numconv(i+8,HexData);
+        A2=numconv(i+16,HexData);
+        A3=numconv(i+24,HexData);
+        A4=numconv(i+32,HexData);
+        A5=numconv(i+40,HexData);
+
+    if (BinName=="SCHOTT.BIN"||BinName=="SCH2000.BIN"||BinName=="OHARA.BIN"){
+        qDebug() << BinName;
+        nF=sqrt(1+((A0*lF*lF)/(lF*lF-A3))+((A1*lF*lF)/(lF*lF-A4))+((A2*lF*lF)/(lF*lF-A5)));
+        nD=sqrt(1+((A0*lD*lD)/(lD*lD-A3))+((A1*lD*lD)/(lD*lD-A4))+((A2*lD*lD)/(lD*lD-A5)));
+        nC=sqrt(1+((A0*lC*lC)/(lC*lC-A3))+((A1*lC*lC)/(lC*lC-A4))+((A2*lC*lC)/(lC*lC-A5)));
+        }
+
+    else{
+        qDebug() << BinName;
+        nF=sqrt(A0+A1*pow(lF,2)+A2*1/pow(lF,2)+A3*1/pow(lF,4)+A4*1/pow(lF,6)+A5*1/pow(lF,8));
+        nD=sqrt(A0+A1*pow(lD,2)+A2*1/pow(lD,2)+A3*1/pow(lD,4)+A4*1/pow(lD,6)+A5*1/pow(lD,8));
+        nC=sqrt(A0+A1*pow(lC,2)+A2*1/pow(lC,2)+A3*1/pow(lC,4)+A4*1/pow(lC,6)+A5*1/pow(lC,8));
+    }
+
+    double Abbe=(nD-1)/(nF-nC);
+
+    qDebug() << nD;
+    qDebug() << Abbe;
+    table->setItem(k,3,new QTableWidgetItem(QString::number(nD)));
+    table->setItem(k,4,new QTableWidgetItem(QString::number(Abbe)));
+
+    table->item(k,3)->setFlags(Qt::ItemIsEnabled); //Index & Abbe are not editable.
+    table->item(k,4)->setFlags(Qt::ItemIsEnabled);
+
+    return;
+
+}
+
+
+double MainWindow::numconv(int k,QByteArray HexData){
+
+    QByteArray HEXarray0="";
+    QByteArray HEXarray="";
+
+    for (int j=k;j<=k+7;j++){
+        HEXarray0=HEXarray0+HexData[j];                         //read numerical data
+    }
+
+    HEXarray0=HEXarray0.toHex();
+
+    bool ok;
+    int sign = 1;
+
+    for (int i=15;i>0;i-=2){
+        HEXarray[15-i] = HEXarray0[i-1];
+        HEXarray[15-i+1] = HEXarray0[i];
+    }
+
+
+    QByteArray array = QByteArray::number(HEXarray.toULongLong(&ok,16),2); //convert hex to binary -you don't need this since your incoming data is binary
+
+    if(array.length()==64) {
+        if(array.at(0)=='1') sign =-1; // if bit 0 is 1 number is negative
+        array.remove(0,1); // remove sign bit
+    }
+    QByteArray fraction0 =array.right(52); //get the fractional part
+    QByteArray fraction = fraction0;
+
+    double mantissa = 1;
+
+    for(int i=0;i<fraction.length();i++){ // iterate through the array to calculate the fraction as a decimal.
+        if(fraction.at(i)=='1') mantissa += 1.0/(pow(2,i+1));
+    }
+
+    int exponent = array.left(array.length()-52).toULongLong(&ok,2); //calculate the exponent
+    QString Ax = QString::number( sign*pow(2,exponent-1023)*(mantissa),'e', 10 );
+    double num = Ax.toDouble();
+
+    return num;
+
+}
+
+
+void MainWindow::ReadFileToTable(QString pathname)
+{
+
+    QFile textFile(pathname);
+    QString buffer = "";
+    textFile.open(QIODevice::ReadOnly); // file open
+
+    QTextStream input(&textFile);
+    buffer = input.readAll();    // read data
+    textFile.close();
+
+    QStringList lines;
+    nol = buffer.count("CV"); //number of lines of lens data file
+    int nof = buffer.count("\n"); //total number of lines in lens data file
+    lines << buffer.split("\n");  //separate single lines
+
+    int k=0;
+    QString item;
+
+    int comma;
+    int comma2;
+    QString separeter;
+
+    QStringList label;
+    for (int i=0; i<=nol-1; i++){
+        label << QString::number(i);    //set table vetical label start to 0
+    }
+
+    table->clear();
+    table->setRowCount( nol );          //number of row = nol
+    table->setVerticalHeaderLabels(label);
+    table->setHorizontalHeaderLabels( QStringList() << tr("Radius") << tr("Thickness" ) << tr("Material") << tr("Index n")<< tr("Abbe V")<< tr("aperture"));
+
+    QStringList lambda;
+    QRegExp RegExp("WV *");
+    RegExp.setPatternSyntax(QRegExp::Wildcard); //pick up Wavelength
+
+    for(int i=0; i<=nof; i++){
+        item = lines[i];
+
+        if (RegExp.exactMatch(item)){
+
+            for(int j=0; j<=100; j++){
+                separeter = item.mid(j,1);
+
+                if (separeter == "."){
+                lambda << item.mid(j-1,7);
+
+                }
+
+            }
+
+            lD=lambda[0].toDouble();
+            lF=lambda[1].toDouble();
+            lC=lambda[2].toDouble();
+
+            qDebug() << lD;
+            qDebug() << lF;
+            qDebug() << lC;
+
+        }
+    }
+
+
+    QString radius;
+    QString curveture;
+    QRegExp RegExp1("CV *");
+    RegExp1.setPatternSyntax(QRegExp::Wildcard); //pick up lens curveture
+
+    k=0;
+
+    for(int i=0; i<=nof; i++){        
+
+        item = lines[i];
+
+        comma = item.indexOf(",")+1; // pick up numenical value
+        curveture = item.trimmed().mid(comma,25);
+        radius = radius.setNum(1.0E0/curveture.toDouble(),'g',6); //convert curveture to radius
+
+        if (RegExp1.exactMatch(item)){
+        table->setItem( k, 0, new QTableWidgetItem(radius));
+        }
+
+    QString thickness;
+    QRegExp RegExp2("TH *");
+    RegExp2.setPatternSyntax(QRegExp::Wildcard);  //pick up lens thickness
+
+
+        item = lines[i];
+        comma = item.indexOf(",")+1;
+
+        if (RegExp2.exactMatch(item)){
+        thickness = item.trimmed().mid(comma,25);
+        thickness = thickness.setNum(thickness.toDouble(),'g',comma2-comma);
+        table->setItem( k, 1, new QTableWidgetItem(thickness));
+        k++;
+        }
+
+    QString aperture;
+    QRegExp RegExp4("CLAP *");
+    RegExp4.setPatternSyntax(QRegExp::Wildcard);  //pick up lens aperture radius
+
+        item = lines[i];
+        comma = item.indexOf(",")+1;
+        comma2 =comma+item.indexOf(",");
+
+        if (RegExp4.exactMatch(item)){
+            aperture = item.trimmed().mid(comma,comma2-comma);
+            aperture = aperture.setNum(aperture.toDouble(),'g',6);
+            table->setItem( k-1, 5, new QTableWidgetItem(aperture));
+        }
+    }
+
+
+    QRegExp RegExp3("RAYERROR*");        //pick up glass name/air. Material name is just below "RAYERROR"
+    RegExp3.setPatternSyntax(QRegExp::Wildcard);
+
+    QString material;
+    QString name;
+    QString index;
+    QString Abbe;
+    k=0;
+
+    for(int i=0; i<nof; i++){
+        item = lines[i];
+        comma = lines[i+1].indexOf(",");
+        material = lines[i+1].trimmed();
+        LF = lines[i+1].length();
+        name = lines[i+1].mid(7,LF).trimmed();
+
+        if (k==nol){
+            table->setItem(k-1,2,new QTableWidgetItem("LAST SURFACE"));
+            table->resizeColumnToContents(2);
+            return;
+        }
+
+
+        if (material.left(3)=="AIR"){
+            table->setItem(k,2,new QTableWidgetItem("AIR"));
+            k++;
+        }
+
+
+        if (material.left(4)=="REFS"){
+
+            if((lines[i+2].trimmed()=="ASTOP")*(lines[i+3].trimmed()=="REFL")){
+                table->setItem(k,2,new QTableWidgetItem("REFS STOP REFL"));
+                k++;
+                i=i+3;
+            }
+
+            if(lines[i+2].trimmed()=="ASTOP"){
+                table->setItem(k,2,new QTableWidgetItem("REFS STOP"));
+                k++;
+                i=i+2;
+            }
+            if(lines[i+2].trimmed()=="REFL"){
+                table->setItem(k,2,new QTableWidgetItem("REFS REFL"));
+                k++;
+                i=i+2;
+            }
+
+        }
+
+
+        if (material.left(4)=="REFL"){
+            table->setItem(k,2,new QTableWidgetItem("REFL"));
+            k++;
+        }
+
+
+        if (material.left(3)=="GLA"){
+            table->setItem(k,2,new QTableWidgetItem(material));
+            table->setItem(k,3,new QTableWidgetItem("1.00000"));
+            table->setItem(k,4,new QTableWidgetItem("0.00000"));
+            k++;
+        }
+
+        if (material.left(5)=="MODEL"){
+            index = lines[i+1].mid(comma+4,20);
+            Abbe =  lines[i+1].mid(comma+28,20);
+            table->setItem(k,2,new QTableWidgetItem(material.left(15)));
+            table->setItem(k,3,new QTableWidgetItem(index.setNum(index.toDouble(),'g',6)));
+            table->setItem(k,4,new QTableWidgetItem(Abbe.setNum(Abbe.toDouble(),'g',6)));
+            table->resizeColumnToContents(2);
+            k++;
+        }
+
+        if (material.left(3)=="SCH"){
+            DataRead("SCHOTT.BIN",name,k);
+            table->setItem(k,2,new QTableWidgetItem(material));
+            table->resizeColumnToContents(2);
+            k++;
+            continue;
+        }
+
+
+        if (material.left(7)=="SCH2000"){
+            DataRead("SCH2000.BIN",name,k);
+            table->setItem(k,2,new QTableWidgetItem(material));
+            table->resizeColumnToContents(2);
+            k++;
+            continue;
+        }
+
+
+        if (material.left(6)=="CHANCE"){
+            DataRead("CHANCE.BIN",name,k);
+            table->setItem(k,2,new QTableWidgetItem(material));
+            table->resizeColumnToContents(2);
+            k++;
+            continue;
+        }
+
+        if (material.left(6)=="CORNIN"){
+            DataRead("CORNIN.BIN",name,k);
+            table->setItem(k,2,new QTableWidgetItem(material));
+            table->resizeColumnToContents(2);
+            k++;
+            continue;
+        }
+
+        if (material.left(6)=="HIKARI"){
+            DataRead("HIKARI.BIN",name,k);
+            table->setItem(k,2,new QTableWidgetItem(material));
+            table->resizeColumnToContents(2);
+            k++;
+            continue;
+        }
+
+        if (material.left(4)=="HOYA"){
+            DataRead("HOYA.BIN",name,k);
+            table->setItem(k,2,new QTableWidgetItem(material));
+            table->resizeColumnToContents(2);
+            k++;
+            continue;
+        }
+
+        if (material.left(5)=="OHARA"){
+            qDebug()<<material;
+            DataRead("OHARA-O.BIN",name,k);
+            table->setItem(k,2,new QTableWidgetItem(material));
+            table->resizeColumnToContents(2);
+            k++;
+            continue;
+        }
+
+
+        if (material.left(5)=="OHARA"){
+                        qDebug()<<material;
+                        qDebug()<<name;
+            DataRead("OHARA.BIN",name,k);
+            qDebug()<<"Hello";
+            table->setItem(k,2,new QTableWidgetItem(material));
+            table->resizeColumnToContents(2);
+            k++;
+            continue;
+        }
+
+
+        if (material.left(7)=="RADHARD"){
+            DataRead("RADHARD.BIN",name,k);
+            table->setItem(k,2,new QTableWidgetItem(material));
+            table->resizeColumnToContents(2);
+            k++;
+            continue;
+        }
+
+    }
+
+}
+
+
+// File Menu
+
+
+void MainWindow::slot_actionOpen()
+{
+
+    QFileDialog dlg;
+    QString pathname = dlg.getOpenFileName(this,tr("Open Lens File"), hdir+"/LENSES",tr("LENS (*.PRG);;All Files (*)"));
+
+        QFileInfo info1 (pathname);
+        QString filename = info1.baseName();
+
+    if (filename!=""){                                             // OPEN Button
+        proc->write("\n");
+        proc->write("LENSREST "+filename.toUtf8()+"\n");
+        proc->write("RTG ALL\n");
+
+        ReadFileToTable(pathname);
+
+        proc->write("\n");
+        proc->write("VIE XZ\n");
+        return;
+    }
+
+        if (filename==""){                                              //CANCEL Button
+        return;
+    }
+}
+
+
+
+void MainWindow::slot_actionSave()
+{
+
+    QString pathname = QFileDialog::getSaveFileName(this,tr("Save Lens File"), hdir+"/LENSES",tr("LENS (*.PRG);;All Files (*)"));
+    QFileInfo info1 (pathname);
+    QString filename = info1.baseName();
+
+    if (filename!=""){
+        proc->write("\n");
+        proc->write("LENSSAVE "+filename.toUtf8()+"\n");
+        return;
+    }
+
+    if (filename==""){                                              //CANCEL Button
+        return;
+    }
+
+}
+
+void MainWindow::slot_actionImport_Zemax()
+{
+
+    QString pathname = QFileDialog::getOpenFileName(this,tr("Import ZEMAX File"), hdir+"/LENSES",tr("ZEMAX (*.ZMX);;All Files (*)"));
+    QFileInfo info1 (pathname);
+    QString filename = info1.fileName();
+
+    if (filename!=""){
+        proc->write("\n");
+        proc->write("ZMX2PRG "+filename.toUtf8()+"\n");
+        proc->write("LENSSAVE\n");
+        proc->write("RTG ALL\n");
+
+        ReadFileToTable(hdir+"/LENSES/LENS.PRG");
+        proc->write("VIE XZ\n");
+        return;
+    }
+
+    if (filename==""){                                              //CANCEL Button
+        return;
+    }
+
+}
+
+
+void MainWindow::slot_actionImport_CODE_V()
+{
+
+    QString pathname = QFileDialog::getOpenFileName(this,tr("Import Code-V File"), hdir+"/LENSES",tr("Code-V (*.SEQ);;All Files (*)"));
+    QFileInfo info1 (pathname);
+    QString filename = info1.fileName();
+
+    if (filename!=""){
+        proc->write("\n");
+        proc->write("CV2PRG "+filename.toUtf8()+"\n");
+        proc->write("RTG ALL\n");
+        proc->write("LENSSAVE\n");
+        ReadFileToTable(hdir+"/LENSES/LENS.PRG");
+        proc->write("VIE XZ\n");
+        return;
+    }
+
+    if (filename==""){                                              //CANCEL Button
+        return;
+    }
+
+}
+
+
+void MainWindow::slot_actionExport_Zemax()
+{
+
+    QString pathname = QFileDialog::getSaveFileName(this,tr("Export ZEMAX File"), hdir+"/LENSES",tr("ZEMAX (*.ZMX);;All Files (*)"));
+    QFileInfo info1 (pathname);
+    QString filename = info1.fileName();
+
+    if (filename!=""){
+        proc->write("\n");
+        proc->write("OUT FILE "+filename.toUtf8()+"\nLENO ZMX\nOUT TP\n");
+    return;
+    }
+
+    if (filename==""){                                              //CANCEL Button
+        return;
+    }
+
+}
+
+void MainWindow::slot_actionExport_CODE_V()
+{
+
+    QString pathname = QFileDialog::getSaveFileName(this,tr("Export Code-V File"), hdir+"/LENSES",tr("Code-V (*.SEQ);;All Files (*)"));
+    QFileInfo info1 (pathname);
+    QString filename = info1.fileName();
+
+    if (filename!=""){
+        proc->write("\n");
+        proc->write("OUT FILE "+filename.toUtf8()+"\nLENO CV\nOUT TP\n");
+    return;
+    }
+
+    if (filename==""){                                              //CANCEL Button
+        return;
+    }
+
+}
+
+
+//Edit Menu
+
+void MainWindow::slot_actionInsert_surface()
+{
+    proc->write("\n");
+
+    int row;
+
+    row = table->currentRow();              //get number of row
+
+    if (row < 0){
+        row=1;
+    }
+
+    if (row != 0){
+        table->insertRow(row);              //insert row to GUI table
+        table->setItem(row,0,new QTableWidgetItem("inf"));
+        table->setItem(row,1,new QTableWidgetItem("0"));
+        table->setItem(row,2,new QTableWidgetItem("AIR"));
+        tableitem=table->item(row,2);
+        tableitem->setFlags(Qt::ItemIsEnabled);
+        nol++;
+    }
+
+    QStringList label;
+    for (int i=0; i<=nol-1; i++){
+        label << QString::number(i);        //set table vetical label start to 0
+    }
+
+    table->setRowCount( nol );              //number of row = nol
+    table->setVerticalHeaderLabels(label);
+
+    QString Qrow = QString::number(row);    //get number of insert surface
+    QString cmd = "INS "+Qrow+"\n";
+    proc->write("\n");
+    proc->write("U L\n");                   //move to ULN mode
+    proc->write(cmd.toLatin1());
+    proc->write("EOS\n");                   //return to CMD mode
+    proc->write("RTG ALL\n");
+}
+
+
+void MainWindow::slot_actionDelete_surface()
+{
+    int row;
+    row = table->currentRow();              //get number of row
+
+    if (row < 0) return;
+
+    proc->write("\n");
+
+    if ((row != 0)&&(row != nol-1)){
+        table->removeRow(row);              //delete row from GUI table
+        nol--;
+    }
+    QStringList label;
+    for (int i=0; i<=nol-1; i++){
+        label << QString::number(i);        //set table vetical label start to 0
+    }
+
+    table->setRowCount( nol );              //number of row = nol
+    table->setVerticalHeaderLabels(label);
+
+
+    QString Qrow = QString::number(row);    //get number of delete surface
+    QString cmd = "DEL "+Qrow+"\n";
+    proc->write("\n");
+    proc->write("U L\n");                   //move to ULN mode
+    proc->write(cmd.toLatin1());
+    proc->write("EOS\n");                   //return to CMD mode
+    proc->write("RTG ALL\n");
+}
+
+
+void MainWindow::slot_actionDisplayLensData()
+{
+    proc->write("\n");
+    proc->write("LIS\n");
+}
+
+
+//View Menu
+
+void MainWindow::slot_actionXZ()
+{
+    proc->write("\n");
+    proc->write("VIE XZ\n");
+}
+
+void MainWindow::slot_actionOrtho()
+{
+    proc->write("\n");
+    proc->write("VIE ORTHO\n");
+}
+
+void MainWindow::slot_focus()
+{
+    QString cmd;
+    QString opr = "CHG ";               //set edit surface
+    QString num = QString::number(nol-2);
+    QString lf = "\n";
+    const char *input_cmd;
+    qDebug()<< num;
+    cmd = "";
+    cmd = opr + num + lf;               //generate command
+    input_cmd = cmd.toLatin1();
+
+    proc->write("U L\n");
+    proc->write(input_cmd);
+    proc->write("PY\n");
+    proc->write("EOS\n");
+    proc->write("RTG ALL\n");
+    proc->write("VIE\n");
+
+}
+
+
+//Graph Menu
+
+void MainWindow::slot_actionXZ_YZ_Transverce_Aberrations()
+{
+    proc->write("\n");
+    proc->write("FANS\n");
+}
+
+void MainWindow::slot_actionDistortion()
+{
+    proc->write("\n");
+    proc->write("DIST\nPLTDIST\n");
+}
+
+void MainWindow::slot_actionField_Curvature()
+{
+    proc->write("\n");
+    proc->write("FLDCV\nPLTFLDCV\n");
+}
+
+void MainWindow::slot_actionAstigmatism()
+{
+    proc->write("\n");
+    proc->write("AST\nPLTAST\n");
+}
+
+void MainWindow::slot_actionGeometical()
+{
+    proc->write("\n");
+    proc->write("GOTF\nPLTGOTF\n");
+}
+
+void MainWindow::slot_actionGeometical_Leica()
+{
+    proc->write("\n");
+    proc->write("GOTF\nPLTGOTF LEICA\n");
+}
+
+void MainWindow::slot_actionDiffraction()
+{
+    proc->write("\n");
+    proc->write("DOTF\nPLTDOTF\n");
+}
+
+void MainWindow::slot_actionDiffraction_Leica()
+{
+    proc->write("\n");
+    proc->write("DOTF\nPLTDOTF LEICA\n");
+}
+
+void MainWindow::slot_actionSpot_Diagram()
+{
+    proc->write("\n");
+    proc->write("SPD\nPLTSPD\n");
+}
+
+void MainWindow::slot_actionWavefront_Phase()
+{
+    proc->write("\n");
+    proc->write("CAPFN\nPLOT CAPFNOPD\n");
+}
+
+void MainWindow::slot_actionWavefront_Intensity()
+{
+    proc->write("\n");
+    proc->write("CAPFN\nPLOT CAPFNAPD\n");
+}
+
+void MainWindow::slot_actionPoint_Spread_Function()
+{
+    proc->write("\n");
+    proc->write("PSF\n");
+}
+
+
+void MainWindow::slot_action_value_entered()
+{
+    proc->write("\n");
+
+    row = table->currentRow();          //get number of row
+    column = table->currentColumn();    //get number of column
+
+    if (row==0) return;
+
+    QString cmd;
+    QString opr = "CHG ";               //set edit surface
+    QString num = QString::number(row);
+    QString lf = "\n";
+
+    const char *input_cmd;
+
+
+    cmd = "";
+    cmd = opr + num + lf;               //generate command
+    input_cmd = cmd.toLatin1();
+
+    proc->write("U L\n");
+    proc->write(input_cmd);             //input command (edit surface)
+
+    switch (column){
+        case 0:
+            opr="RD ";                  //edit radius
+            break;
+        case 1:
+            opr="TH ";                  //edit thickness
+            break;
+        case 2:                         //edit glass data
+            dialog = new nkDialog();
+            dialog->exec();
+
+        if (dialog->Button1 == 1024){
+
+            proc->write("U L\n");
+            proc->write("CHG 2\n");
+            proc->write("MODEL "+dialog->GlassName.toLatin1()+","+dialog->Index.toLatin1()+","+dialog->Abbe.toLatin1()+",\n");
+            proc->write("EOS\n");
+            proc->write("RTG ALL\n");
+
+            table->setItem(row, 2, new QTableWidgetItem(dialog->GlassName.toUpper()));  //Change table value to MODEL
+            table->setItem(row, 3, new QTableWidgetItem(dialog->Index.trimmed()));
+            table->setItem(row, 4, new QTableWidgetItem(dialog->Abbe.trimmed()));
+            break;
+        }
+
+        case 5:
+        opr="CLAP ";                  //edit aperture radius
+        break;
+
+    }
+
+    num = table->item(row,column)->text();  //get input value
+
+    cmd = "";
+    cmd = opr + num + lf;
+    input_cmd = cmd.toLatin1();
+
+    proc->write(input_cmd);
+    proc->write("EOS\n");                   //exit LENS INPUT mode (Return to CMD mode)
+    proc->write("RTG ALL\n");
+
+}
+
+
+//Input Model menu
+
+void MainWindow::slot_actionModeldialog()
+{
+
+    int row;
+    row = table->currentRow();              //get number of row
+    QString Qrow = QString::number(row);    //get number of modify surface
+
+    dialog = new nkDialog();
+//    dialog->setWindowState(dialog->windowState() | Qt::WindowMaximized); //for android
+    dialog->exec();
+
+    if (dialog->Button1 == 1024){
+
+    proc->write("\n");
+    proc->write("U L\n");
+    proc->write("CHG "+Qrow.toLatin1()+"\n");
+    proc->write("MODEL "+dialog->GlassName.toLatin1()+","+dialog->Index.toLatin1()+","+dialog->Abbe.toLatin1()+",\n");
+    proc->write("EOS\n");
+    proc->write("RTG ALL\n");
+    proc->write("FINDGLASS "+Qrow.toLatin1()+"\n");
+
+    table->setItem(Qrow.toInt(), 2, new QTableWidgetItem("MODEL "+dialog->GlassName.toUpper()));  //Change table value to MODEL
+    tableitem=table->item(row,2);
+    tableitem->setFlags(Qt::ItemIsEnabled);
+    table->setItem(Qrow.toInt(), 3, new QTableWidgetItem(dialog->Index.trimmed()));
+    tableitem=table->item(row,3);
+    tableitem->setFlags(Qt::ItemIsEnabled);
+    table->setItem(Qrow.toInt(), 4, new QTableWidgetItem(dialog->Abbe.trimmed()));
+    tableitem=table->item(row,4);
+    tableitem->setFlags(Qt::ItemIsEnabled);
+
+    }
+
+}
+
+
+void MainWindow::slot_actionInput_Variables()
+{
+
+    dialog2 = new Optimize();
+//    dialog2->setWindowState(dialog2->windowState() | Qt::WindowMaximized); //for android
+    dialog2->exec();
+
+    if (dialog2->Button2 == 1024){
+
+    proc->write("\n");
+    proc->write("MERIT\n");
+    proc->write("FLCLTH "+dialog2->FocalLength.toLatin1()+" 1 0 "+QString::number(nol-1).toLatin1()+"\n");
+    proc->write(dialog2->Target.toLatin1()+" 0.0 1\n");
+    proc->write("EOS\n");
+
+    proc->write("VARIABLES\n");
+    proc->write(dialog2->Parameter1.toLatin1()+" "+dialog2->ParamValue1.toLatin1()+"\n");
+    proc->write(dialog2->Parameter2.toLatin1()+" "+dialog2->ParamValue2.toLatin1()+"\n");
+    proc->write(dialog2->Parameter3.toLatin1()+" "+dialog2->ParamValue3.toLatin1()+"\n");
+    proc->write(dialog2->Parameter4.toLatin1()+" "+dialog2->ParamValue4.toLatin1()+"\n");
+    proc->write(dialog2->Parameter5.toLatin1()+" "+dialog2->ParamValue5.toLatin1()+"\n");
+    proc->write("EOS\n");
+
+    proc->write("VB\n");
+    proc->write("OPRD\n");
+
+    proc->write("ITER FULL\n");
+    proc->write("RTG ALL\n");
+
+    }
+}
+
+
+void MainWindow::slot_actionInput_LensIdentifier()
+{
+
+    dialog3 = new LIDialog();
+//    dialog3->setWindowState(dialog3->windowState() | Qt::WindowMaximized); //for android
+    dialog3->exec();
+
+    if (dialog3->Button3 == 1024){
+
+    proc->write("\n");
+    proc->write("U L\n");
+    proc->write("LI "+dialog3->LensIdentifier.toLatin1()+" \n");
+    proc->write("EOS\n");
+
+    proc->write("LI\n");
+
+    }
+}
+
+void MainWindow::slot_actionRay_input_angle()
+{
+
+    dialog4 = new rayinputDialog();
+//    dialog4->setWindowState(dialog4->windowState() | Qt::WindowMaximized); //for android
+    dialog4->exec();
+
+    if (dialog4->Button4 == 1024){
+
+    proc->write("\n");
+    proc->write("U L\n");
+    proc->write("SCY FANG "+dialog4->inputangle.toLatin1()+"\n");
+    qDebug()<< dialog4->inputangle.toLatin1();
+    proc->write("EOS\n");
+
+    proc->write("VIE\n");
+
+    }
+}
+
+
+bool MainWindow::eventFilter(QObject* object, QEvent* event)
+{
+
+    if (object==table){
+    if (event->type()==QEvent::KeyRelease)
+    {
+        // key pressed
+        // transforms QEvent into QKeyEvent
+        QKeyEvent* pKeyEvent=static_cast<QKeyEvent*>(event);
+        switch(pKeyEvent->key())
+        {
+            case Qt::Key_Return:
+            {
+                // Return key pressed - record update
+
+                qDebug() << "Return key pressed";
+                slot_action_value_entered();
+                break;
+            }
+            case Qt::Key_Enter:
+            {
+               // Enter key pressed - record update
+
+                qDebug() << "Enter key pressed";
+                slot_action_value_entered();
+                break;
+            }
+        }
+    }
+    }
+        return QWidget::eventFilter(object, event);
+}
+
diff --git a/mainwindow.h b/mainwindow.h
new file mode 100644 (file)
index 0000000..8298bf4
--- /dev/null
@@ -0,0 +1,126 @@
+#ifndef __MAIN_WINDOW_H
+#define __MAIN_WINDOW_H
+
+#include <QWidget>
+#include <QProcess>
+#include "ui_mainwindow.h"
+#include "nkdialog.h"
+#include "optimize.h"
+#include "lidialog.h"
+#include "rayinputdialog.h"
+
+class MainWindow : public QMainWindow, public Ui::MainWindow
+{
+    Q_OBJECT
+
+public:
+    MainWindow(QMainWindow *parnet=0);
+    QProcess *proc;
+    QString hdir;
+    double lF,lD,lC;
+
+    QMenu *MaterialMenu;
+    QMenu *menuAir;
+    QMenu *SubMenu1;
+    QMenu *SubMenu2;
+    QMenu *SubMenu3;
+    QMenu *SubMenu4;
+    QMenu *SubMenu5;
+    QMenu *SubMenu6;
+    QMenu *SubMenu7;
+    QMenu *SubMenu8;
+    QMenu *SubMenu9;
+
+    QAction *Modelaction;
+    QAction *Airaction;
+    QAction *Makeraction;
+    QString String;
+    QAction* selectedItem;
+
+    QTableWidgetItem *tableitem;
+
+private:
+
+    int nol;
+    int NoGlass,NoGlass1,NoGlass2,NoGlass3,NoGlass4,NoGlass5,NoGlass6,NoGlass7,NoGlass8,NoGlass9;
+    int row;
+    int column;
+    int LF;
+    double numconv(int,QByteArray);
+    void ndex();
+    void Glass(QString);
+    void DataRead(QString, QString, int);
+    void ReadFileToTable(QString);
+    void addcontextmenu();
+    void menu();
+    nkDialog *dialog;
+    Optimize *dialog2;
+    LIDialog *dialog3;
+    rayinputDialog *dialog4;
+    QStringList GN,GN1,GN2,GN3,GN4,GN5,GN6,GN7,GN8,GN9;
+    bool eventFilter(QObject* object, QEvent* event);
+
+    QMouseEvent *event;
+
+private slots:
+
+    void slot_commandExec();
+    void slot_appendView();
+
+    void slot_actionOpen();
+    void slot_actionSave();
+    void slot_actionImport_Zemax();
+    void slot_actionImport_CODE_V();
+    void slot_actionExport_Zemax();
+    void slot_actionExport_CODE_V();
+
+    void slot_actionInsert_surface();
+    void slot_actionDelete_surface();
+    void slot_actionDisplayLensData();
+
+    void slot_actionXZ();
+    void slot_actionOrtho();
+    void slot_focus();
+
+    void slot_actionXZ_YZ_Transverce_Aberrations();
+    void slot_actionDistortion();
+    void slot_actionField_Curvature();
+    void slot_actionAstigmatism();
+    void slot_actionGeometical();
+    void slot_actionGeometical_Leica();
+    void slot_actionDiffraction();
+    void slot_actionDiffraction_Leica();
+    void slot_actionSpot_Diagram();
+    void slot_actionWavefront_Phase();
+    void slot_actionWavefront_Intensity();
+    void slot_actionPoint_Spread_Function();
+    void slot_action_value_entered();
+
+    void slot_actionModeldialog();
+
+    void slot_actionInput_Variables();
+
+    void slot_actionInput_LensIdentifier();
+
+    void slot_actionRay_input_angle();
+
+    void slot_ShowContextMenu(const QPoint& Pos);
+
+    void ShowContextMenu(QAction *Action);
+    void ShowContextMenu2(QAction *Action);
+    void ShowContextMenu3(QAction *Action);
+    void ShowContextMenu4(QAction *Action);
+    void ShowContextMenu5(QAction *Action);
+    void ShowContextMenu6(QAction *Action);
+    void ShowContextMenu7(QAction *Action);
+    void ShowContextMenu8(QAction *Action);
+    void ShowContextMenu9(QAction *Action);
+
+
+    void InputAir();
+
+};
+
+
+#endif /* __MAIN_WINDOW_H */
+
diff --git a/mainwindow.ui b/mainwindow.ui
new file mode 100644 (file)
index 0000000..017ac91
--- /dev/null
@@ -0,0 +1,946 @@
+<?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>680</width>
+    <height>670</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>KODS GUI</string>
+  </property>
+  <widget class="QWidget" name="centralWidget">
+   <layout class="QGridLayout" name="gridLayout">
+    <item row="0" column="0">
+     <layout class="QVBoxLayout" name="verticalLayout_2">
+      <item>
+       <widget class="QTableWidget" name="table">
+        <property name="enabled">
+         <bool>true</bool>
+        </property>
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>800</width>
+          <height>400</height>
+         </size>
+        </property>
+        <property name="contextMenuPolicy">
+         <enum>Qt::CustomContextMenu</enum>
+        </property>
+        <property name="autoFillBackground">
+         <bool>false</bool>
+        </property>
+        <property name="verticalScrollBarPolicy">
+         <enum>Qt::ScrollBarAsNeeded</enum>
+        </property>
+        <property name="horizontalScrollBarPolicy">
+         <enum>Qt::ScrollBarAsNeeded</enum>
+        </property>
+        <property name="sizeAdjustPolicy">
+         <enum>QAbstractScrollArea::AdjustToContents</enum>
+        </property>
+        <row>
+         <property name="text">
+          <string>0</string>
+         </property>
+        </row>
+        <row>
+         <property name="text">
+          <string>1</string>
+         </property>
+        </row>
+        <row>
+         <property name="text">
+          <string>2</string>
+         </property>
+        </row>
+        <row>
+         <property name="text">
+          <string>3</string>
+         </property>
+        </row>
+        <row>
+         <property name="text">
+          <string>4</string>
+         </property>
+        </row>
+        <row>
+         <property name="text">
+          <string>5</string>
+         </property>
+        </row>
+        <row>
+         <property name="text">
+          <string>6</string>
+         </property>
+        </row>
+        <row>
+         <property name="text">
+          <string>7</string>
+         </property>
+        </row>
+        <row>
+         <property name="text">
+          <string>8</string>
+         </property>
+        </row>
+        <row>
+         <property name="text">
+          <string>9</string>
+         </property>
+        </row>
+        <row>
+         <property name="text">
+          <string>10</string>
+         </property>
+        </row>
+        <column>
+         <property name="text">
+          <string>Thickness</string>
+         </property>
+        </column>
+        <column>
+         <property name="text">
+          <string>Material</string>
+         </property>
+        </column>
+        <column>
+         <property name="text">
+          <string>Index n</string>
+         </property>
+        </column>
+        <column>
+         <property name="text">
+          <string>Abbe V</string>
+         </property>
+        </column>
+        <column>
+         <property name="text">
+          <string>Radius</string>
+         </property>
+        </column>
+        <column>
+         <property name="text">
+          <string>Aperture</string>
+         </property>
+        </column>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item row="1" column="0">
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QTextEdit" name="msgView">
+        <property name="maximumSize">
+         <size>
+          <width>800</width>
+          <height>2000</height>
+         </size>
+        </property>
+        <property name="font">
+         <font>
+          <family>Takao Pゴシック</family>
+         </font>
+        </property>
+        <property name="readOnly">
+         <bool>true</bool>
+        </property>
+        <property name="acceptRichText">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout">
+        <item>
+         <widget class="QLabel" name="label">
+          <property name="text">
+           <string>Command &gt;</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLineEdit" name="cmdLine"/>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menuBar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>680</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuFile">
+    <property name="title">
+     <string>File</string>
+    </property>
+    <addaction name="actionOpen"/>
+    <addaction name="actionSave"/>
+    <addaction name="separator"/>
+    <addaction name="actionImport_Zemax"/>
+    <addaction name="actionImport_Code_V"/>
+    <addaction name="actionExport_Zemax"/>
+    <addaction name="actionExport_Code_V"/>
+    <addaction name="separator"/>
+    <addaction name="actionQuit"/>
+   </widget>
+   <widget class="QMenu" name="menuEdit">
+    <property name="title">
+     <string>Edit</string>
+    </property>
+    <addaction name="actionInsert_Surface"/>
+    <addaction name="actionDelete_Surface"/>
+    <addaction name="actionInput_Glass_Model"/>
+    <addaction name="actionInput_Lens_Idenfier"/>
+    <addaction name="separator"/>
+    <addaction name="actionAll_Lens_Data"/>
+   </widget>
+   <widget class="QMenu" name="menuLens_View">
+    <property name="title">
+     <string>Lens View</string>
+    </property>
+    <addaction name="actionXZ"/>
+    <addaction name="actionOrtho"/>
+    <addaction name="separator"/>
+    <addaction name="actionSet_ray_input_angle"/>
+    <addaction name="actionSet_Focus"/>
+   </widget>
+   <widget class="QMenu" name="menuGraphs">
+    <property name="title">
+     <string>Graphs</string>
+    </property>
+    <widget class="QMenu" name="menuAberration_Fans">
+     <property name="title">
+      <string>Aberration Fans</string>
+     </property>
+     <addaction name="actionXZ_YZ_Transverce_Aberrations"/>
+    </widget>
+    <widget class="QMenu" name="menuOptical_Transfar_Function">
+     <property name="title">
+      <string>Optical Transfar Function</string>
+     </property>
+     <addaction name="actionGeometical"/>
+     <addaction name="actionGeometical_Leica"/>
+     <addaction name="actionDiffraction"/>
+     <addaction name="actionDiffraction_Leica"/>
+    </widget>
+    <widget class="QMenu" name="menuComplex_Aperture_Function">
+     <property name="title">
+      <string>Complex Aperture Function</string>
+     </property>
+     <addaction name="actionWavefront_Phase"/>
+     <addaction name="actionWavefront_Intensity"/>
+    </widget>
+    <addaction name="menuAberration_Fans"/>
+    <addaction name="actionDistortion"/>
+    <addaction name="actionField_Curvature"/>
+    <addaction name="actionAstigmatism"/>
+    <addaction name="menuOptical_Transfar_Function"/>
+    <addaction name="actionSpot_Diagram"/>
+    <addaction name="menuComplex_Aperture_Function"/>
+    <addaction name="actionPoint_Spread_Function"/>
+   </widget>
+   <widget class="QMenu" name="menuOptimize">
+    <property name="title">
+     <string>Optimize</string>
+    </property>
+    <addaction name="actionInput_Variables"/>
+   </widget>
+   <addaction name="menuFile"/>
+   <addaction name="menuEdit"/>
+   <addaction name="menuLens_View"/>
+   <addaction name="menuGraphs"/>
+   <addaction name="menuOptimize"/>
+  </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="actionInput_Variables">
+   <property name="text">
+    <string>Input Variables</string>
+   </property>
+  </action>
+  <action name="actionOpen">
+   <property name="text">
+    <string>Open</string>
+   </property>
+  </action>
+  <action name="actionSave">
+   <property name="text">
+    <string>Save</string>
+   </property>
+  </action>
+  <action name="actionImport_Zemax">
+   <property name="text">
+    <string>Import Zemax</string>
+   </property>
+  </action>
+  <action name="actionImport_Code_V">
+   <property name="text">
+    <string>Import Code-V</string>
+   </property>
+  </action>
+  <action name="actionExport_Zemax">
+   <property name="text">
+    <string>Export Zemax</string>
+   </property>
+  </action>
+  <action name="actionExport_Code_V">
+   <property name="text">
+    <string>Export Code-V</string>
+   </property>
+  </action>
+  <action name="actionQuit">
+   <property name="text">
+    <string>Quit</string>
+   </property>
+  </action>
+  <action name="actionInsert_Surface">
+   <property name="text">
+    <string>Insert Surface</string>
+   </property>
+  </action>
+  <action name="actionDelete_Surface">
+   <property name="text">
+    <string>Delete Surface</string>
+   </property>
+  </action>
+  <action name="actionInput_Glass_Model">
+   <property name="text">
+    <string>Input Model Glass</string>
+   </property>
+  </action>
+  <action name="actionXZ">
+   <property name="text">
+    <string>XZ</string>
+   </property>
+  </action>
+  <action name="actionOrtho">
+   <property name="text">
+    <string>Ortho</string>
+   </property>
+  </action>
+  <action name="actionXZ_YZ_Transverce_Aberrations">
+   <property name="text">
+    <string>XZ/YZ Transverce Aberrations</string>
+   </property>
+  </action>
+  <action name="actionDistortion">
+   <property name="text">
+    <string>Distortion</string>
+   </property>
+  </action>
+  <action name="actionField_Curvature">
+   <property name="text">
+    <string>Field Curvature</string>
+   </property>
+  </action>
+  <action name="actionAstigmatism">
+   <property name="text">
+    <string>Astigmatism</string>
+   </property>
+  </action>
+  <action name="actionGeometical">
+   <property name="text">
+    <string>Geometical</string>
+   </property>
+  </action>
+  <action name="actionGeometical_Leica">
+   <property name="text">
+    <string>Geometical (Leica)</string>
+   </property>
+  </action>
+  <action name="actionDiffraction">
+   <property name="text">
+    <string>Diffraction</string>
+   </property>
+  </action>
+  <action name="actionDiffraction_Leica">
+   <property name="text">
+    <string>Diffraction (Leica)</string>
+   </property>
+  </action>
+  <action name="actionSpot_Diagram">
+   <property name="text">
+    <string>Spot Diagram</string>
+   </property>
+  </action>
+  <action name="actionWavefront_Phase">
+   <property name="text">
+    <string>Wavefront Phase</string>
+   </property>
+  </action>
+  <action name="actionWavefront_Intensity">
+   <property name="text">
+    <string>Wavefront Intensity</string>
+   </property>
+  </action>
+  <action name="actionPoint_Spread_Function">
+   <property name="text">
+    <string>Point Spread Function</string>
+   </property>
+  </action>
+  <action name="actionAll_Lens_Data">
+   <property name="text">
+    <string>Display Lens Data</string>
+   </property>
+  </action>
+  <action name="actionInput_Lens_Idenfier">
+   <property name="text">
+    <string>Input Lens Idenfier</string>
+   </property>
+  </action>
+  <action name="actionSet_Focus">
+   <property name="text">
+    <string>Set Focus</string>
+   </property>
+  </action>
+  <action name="actionSet_ray_input_angle">
+   <property name="text">
+    <string>Set ray input angle</string>
+   </property>
+  </action>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>actionInput_Variables</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionInput_Variables()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionOpen</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionOpen()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionQuit</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionSave</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionSave()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionImport_Zemax</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionImport_Zemax()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionImport_Code_V</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionImport_CODE_V()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionExport_Zemax</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionExport_Zemax()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionExport_Code_V</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionExport_CODE_V()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionInsert_Surface</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionInsert_surface()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionDelete_Surface</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionDelete_surface()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionInput_Glass_Model</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionModeldialog()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionXZ</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionXZ()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionOrtho</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionOrtho()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionXZ_YZ_Transverce_Aberrations</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionXZ_YZ_Transverce_Aberrations()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionDistortion</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionDistortion()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionField_Curvature</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionField_Curvature()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionAstigmatism</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionAstigmatism()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionGeometical</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionGeometical()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionGeometical_Leica</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionGeometical_Leica()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionDiffraction</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionDiffraction()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionDiffraction_Leica</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionDiffraction_Leica()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionSpot_Diagram</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionSpot_Diagram()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionWavefront_Phase</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionWavefront_Phase()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionWavefront_Intensity</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionWavefront_Intensity()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionPoint_Spread_Function</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionPoint_Spread_Function()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cmdLine</sender>
+   <signal>returnPressed()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_commandExec()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>319</x>
+     <y>612</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionAll_Lens_Data</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionDisplayLensData()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionInput_Lens_Idenfier</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionInput_LensIdentifier()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>274</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionSet_Focus</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_focus()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>339</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionSet_ray_input_angle</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>slot_actionRay_input_angle()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>339</x>
+     <y>334</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <signal>actionInput_Variables()</signal>
+  <slot>slot_actionInput_Variables()</slot>
+  <slot>slot_actionModeldialog()</slot>
+  <slot>slot_actionOpen()</slot>
+  <slot>slot_actionQuit()</slot>
+  <slot>slot_actionSave()</slot>
+  <slot>slot_actionImport_Zemax()</slot>
+  <slot>slot_actionImport_CODE_V()</slot>
+  <slot>slot_actionExport_Zemax()</slot>
+  <slot>slot_actionExport_CODE_V()</slot>
+  <slot>slot_actionInsert_surface()</slot>
+  <slot>slot_actionDelete_surface()</slot>
+  <slot>slot_actionXZ()</slot>
+  <slot>slot_actionOrtho()</slot>
+  <slot>slot_actionXZ_YZ_Transverce_Aberrations()</slot>
+  <slot>slot_actionDistortion()</slot>
+  <slot>slot_actionField_Curvature()</slot>
+  <slot>slot_actionAstigmatism()</slot>
+  <slot>slot_actionGeometical()</slot>
+  <slot>slot_actionGeometical_Leica()</slot>
+  <slot>slot_actionDiffraction()</slot>
+  <slot>slot_actionDiffraction_Leica()</slot>
+  <slot>slot_actionSpot_Diagram()</slot>
+  <slot>slot_actionWavefront_Phase()</slot>
+  <slot>slot_actionWavefront_Intensity()</slot>
+  <slot>slot_actionPoint_Spread_Function()</slot>
+  <slot>slot_action_value_entered()</slot>
+  <slot>slot_commandExec()</slot>
+  <slot>slot_actionDisplayLensData()</slot>
+  <slot>slot_actionInput_LensIdentifier()</slot>
+  <slot>slot_focus()</slot>
+  <slot>slot_actionRay_input_angle()</slot>
+ </slots>
+</ui>
diff --git a/nkdialog.cpp b/nkdialog.cpp
new file mode 100644 (file)
index 0000000..c2dcf1b
--- /dev/null
@@ -0,0 +1,33 @@
+#include "nkdialog.h"
+#include "ui_nkdialog.h"
+
+nkDialog::nkDialog(QWidget *parent) :
+    QDialog(parent),
+    ui(new Ui::nkDialog)
+{
+    ui->setupUi(this);
+    connect( ui->buttonBox, SIGNAL(accepted()), this, SLOT(onAccept()) );
+    connect( ui->buttonBox, SIGNAL(rejected()), this, SLOT(onReject()) );
+}
+
+void nkDialog::onAccept()
+{
+
+    GlassName = ui->lineEdit->text();
+    Index = ui->lineEdit_2->text();
+    Abbe = ui->lineEdit_3->text();
+
+    Button1 = ui->buttonBox->Ok;
+
+}
+
+void nkDialog::onReject()
+{
+  reject();
+}
+
+
+nkDialog::~nkDialog()
+{
+    delete ui;
+}
diff --git a/nkdialog.h b/nkdialog.h
new file mode 100644 (file)
index 0000000..3860e50
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef NKDIALOG_H
+#define NKDIALOG_H
+
+#include <QDialog>
+#include <QProcess>
+#include "ui_nkdialog.h"
+
+
+class nkDialog : public QDialog, public Ui::nkDialog
+{
+    Q_OBJECT
+
+public:
+    explicit nkDialog(QWidget *parent = 0);
+
+    QString GlassName;
+    QString Index;
+    QString Abbe;
+
+    int Button1;
+
+    Ui::nkDialog *ui;
+
+    ~nkDialog();
+
+private:
+
+private slots:
+    void onAccept();
+    void onReject();
+
+};
+
+#endif // NKDIALOG_H
diff --git a/nkdialog.ui b/nkdialog.ui
new file mode 100644 (file)
index 0000000..f9a4e47
--- /dev/null
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>nkDialog</class>
+ <widget class="QDialog" name="nkDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>380</width>
+    <height>230</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <layout class="QVBoxLayout" name="verticalLayout">
+       <item>
+        <spacer name="verticalSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QLabel" name="label">
+         <property name="text">
+          <string>Glass name</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="verticalSpacer_2">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QLabel" name="label2">
+         <property name="text">
+          <string>Index n</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="verticalSpacer_3">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QLabel" name="label3">
+         <property name="text">
+          <string>Abbe Number V</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <layout class="QVBoxLayout" name="verticalLayout_2">
+       <item>
+        <spacer name="verticalSpacer_4">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QLineEdit" name="lineEdit">
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="verticalSpacer_5">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QLineEdit" name="lineEdit_2">
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="verticalSpacer_6">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QLineEdit" name="lineEdit_3">
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </item>
+   <item row="1" column="0">
+    <spacer name="verticalSpacer_7">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="2" column="0">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>nkDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>170</x>
+     <y>205</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>189</x>
+     <y>119</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>nkDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>170</x>
+     <y>205</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>189</x>
+     <y>119</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/optimize.cpp b/optimize.cpp
new file mode 100644 (file)
index 0000000..395f544
--- /dev/null
@@ -0,0 +1,44 @@
+#include "optimize.h"
+#include "ui_optimize.h"
+
+Optimize::Optimize(QWidget *parent) :
+    QDialog(parent),
+    ui(new Ui::Optimize)
+{
+    ui->setupUi(this);
+    connect( ui->buttonBox, SIGNAL(accepted()), this, SLOT(onAccept()) );
+    connect( ui->buttonBox, SIGNAL(rejected()), this, SLOT(onReject()) );
+}
+
+void Optimize::onAccept()
+{
+
+    FocalLength = ui->lineEdit->text();
+    Target = ui->comboBox_6->currentText();
+
+    Parameter1 = ui->comboBox->currentText();
+    Parameter2 = ui->comboBox_2->currentText();
+    Parameter3 = ui->comboBox_3->currentText();
+    Parameter4 = ui->comboBox_4->currentText();
+    Parameter5 = ui->comboBox_5->currentText();
+
+    ParamValue1 = ui->lineEdit_2->text();
+    ParamValue2 = ui->lineEdit_3->text();
+    ParamValue3 = ui->lineEdit_4->text();
+    ParamValue4 = ui->lineEdit_5->text();
+    ParamValue5 = ui->lineEdit_6->text();
+
+    Button2 = ui->buttonBox->Ok;
+
+}
+
+void Optimize::onReject()
+{
+  reject();
+}
+
+
+Optimize::~Optimize()
+{
+    delete ui;
+}
diff --git a/optimize.h b/optimize.h
new file mode 100644 (file)
index 0000000..16e8eb7
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef OPTIMIZE_H
+#define OPTIMIZE_H
+
+#include <QDialog>
+#include "ui_optimize.h"
+
+namespace Ui {
+class Optimize;
+}
+
+class Optimize : public QDialog
+{
+    Q_OBJECT
+
+public:
+    explicit Optimize(QWidget *parent = 0);
+    ~Optimize();
+    QString FocalLength;
+    QString Target;
+    QString Parameter1;
+    QString Parameter2;
+    QString Parameter3;
+    QString Parameter4;
+    QString Parameter5;
+    QString ParamValue1;
+    QString ParamValue2;
+    QString ParamValue3;
+    QString ParamValue4;
+    QString ParamValue5;
+
+    int Button2;
+
+private:
+    Ui::Optimize *ui;
+
+private slots:
+
+    void onAccept();
+    void onReject();
+
+};
+
+#endif // OPTIMIZE_H
diff --git a/optimize.ui b/optimize.ui
new file mode 100644 (file)
index 0000000..1860042
--- /dev/null
@@ -0,0 +1,409 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Optimize</class>
+ <widget class="QDialog" name="Optimize">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>350</width>
+    <height>350</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Input Variables</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0">
+    <layout class="QVBoxLayout" name="verticalLayout_7">
+     <item>
+      <layout class="QHBoxLayout" name="horizontalLayout_2">
+       <item>
+        <spacer name="horizontalSpacer">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>8</width>
+           <height>250</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <layout class="QVBoxLayout" name="verticalLayout_5">
+         <item>
+          <spacer name="verticalSpacer_2">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>20</width>
+             <height>40</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <layout class="QVBoxLayout" name="verticalLayout">
+           <item>
+            <widget class="QLabel" name="label">
+             <property name="text">
+              <string>Focal Length(mm)</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QLineEdit" name="lineEdit"/>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <spacer name="verticalSpacer">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>112</width>
+             <height>27</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <layout class="QVBoxLayout" name="verticalLayout_3">
+           <item>
+            <widget class="QComboBox" name="comboBox">
+             <property name="currentText">
+              <string/>
+             </property>
+             <item>
+              <property name="text">
+               <string/>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>CV</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>TH</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>Index n</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>Abbe V</string>
+              </property>
+             </item>
+            </widget>
+           </item>
+           <item>
+            <widget class="QComboBox" name="comboBox_2">
+             <item>
+              <property name="text">
+               <string/>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>CV</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>TH</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>Index n</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>Abbe V</string>
+              </property>
+             </item>
+            </widget>
+           </item>
+           <item>
+            <widget class="QComboBox" name="comboBox_3">
+             <item>
+              <property name="text">
+               <string/>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>CV</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>TH</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>Index n</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>Abbe V</string>
+              </property>
+             </item>
+            </widget>
+           </item>
+           <item>
+            <widget class="QComboBox" name="comboBox_4">
+             <item>
+              <property name="text">
+               <string/>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>CV</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>TH</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>Index n</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>Abbe V</string>
+              </property>
+             </item>
+            </widget>
+           </item>
+           <item>
+            <widget class="QComboBox" name="comboBox_5">
+             <item>
+              <property name="text">
+               <string/>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>CV</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>TH</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>Index n</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>Abbe V</string>
+              </property>
+             </item>
+            </widget>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <layout class="QVBoxLayout" name="verticalLayout_6">
+         <item>
+          <spacer name="verticalSpacer_3">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>143</width>
+             <height>13</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <layout class="QHBoxLayout" name="horizontalLayout">
+           <item>
+            <layout class="QVBoxLayout" name="verticalLayout_2">
+             <item>
+              <widget class="QLabel" name="label_2">
+               <property name="text">
+                <string>Target</string>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QComboBox" name="comboBox_6">
+               <property name="currentText">
+                <string>SA3</string>
+               </property>
+               <item>
+                <property name="text">
+                 <string>SA3</string>
+                </property>
+               </item>
+               <item>
+                <property name="text">
+                 <string>SA5</string>
+                </property>
+               </item>
+               <item>
+                <property name="text">
+                 <string>SA7</string>
+                </property>
+               </item>
+              </widget>
+             </item>
+            </layout>
+           </item>
+           <item>
+            <widget class="QLabel" name="label_3">
+             <property name="text">
+              <string>= 0.0</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <spacer name="verticalSpacer_4">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>143</width>
+             <height>13</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <layout class="QVBoxLayout" name="verticalLayout_4">
+           <item>
+            <widget class="QLineEdit" name="lineEdit_2"/>
+           </item>
+           <item>
+            <widget class="QLineEdit" name="lineEdit_3"/>
+           </item>
+           <item>
+            <widget class="QLineEdit" name="lineEdit_4"/>
+           </item>
+           <item>
+            <widget class="QLineEdit" name="lineEdit_5"/>
+           </item>
+           <item>
+            <widget class="QLineEdit" name="lineEdit_6"/>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="horizontalSpacer_2">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>14</width>
+           <height>250</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <spacer name="verticalSpacer_5">
+       <property name="orientation">
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>311</width>
+         <height>60</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QDialogButtonBox" name="buttonBox">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="standardButtons">
+        <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+  <zorder></zorder>
+  <zorder>horizontalSpacer_2</zorder>
+  <zorder>verticalSpacer</zorder>
+  <zorder>verticalSpacer_4</zorder>
+  <zorder>verticalSpacer_3</zorder>
+  <zorder>verticalSpacer_5</zorder>
+  <zorder>horizontalSpacer_2</zorder>
+  <zorder>horizontalSpacer</zorder>
+  <zorder>verticalSpacer_2</zorder>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Optimize</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>177</x>
+     <y>370</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>174</x>
+     <y>199</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Optimize</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>177</x>
+     <y>370</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>174</x>
+     <y>199</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/rayinputdialog.cpp b/rayinputdialog.cpp
new file mode 100644 (file)
index 0000000..b439ef9
--- /dev/null
@@ -0,0 +1,31 @@
+#include "rayinputdialog.h"
+#include "ui_rayinputdialog.h"
+
+rayinputDialog::rayinputDialog(QWidget *parent) :
+    QDialog(parent),
+    ui(new Ui::rayinputDialog)
+{
+    ui->setupUi(this);
+    connect( ui->buttonBox, SIGNAL(accepted()), this, SLOT(onAccept()) );
+    connect( ui->buttonBox, SIGNAL(rejected()), this, SLOT(onReject()) );
+}
+
+void rayinputDialog::onAccept()
+{
+
+    inputangle = ui->lineEdit->text();
+
+
+    Button4 = ui->buttonBox->Ok;
+
+}
+
+void rayinputDialog::onReject()
+{
+    reject();
+}
+
+rayinputDialog::~rayinputDialog()
+{
+    delete ui;
+}
diff --git a/rayinputdialog.h b/rayinputdialog.h
new file mode 100644 (file)
index 0000000..497cdad
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef RAYINPUTDIALOG_H
+#define RAYINPUTDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+class rayinputDialog;
+}
+
+class rayinputDialog : public QDialog
+{
+    Q_OBJECT
+
+public:
+    explicit rayinputDialog(QWidget *parent = 0);
+    ~rayinputDialog();
+
+    Ui::rayinputDialog *ui;
+
+    QString inputangle;
+
+    int Button4;
+
+
+private:
+
+
+private slots:
+    void onAccept();
+    void onReject();
+
+};
+
+#endif // RAYINPUTDIALOG_H
diff --git a/rayinputdialog.ui b/rayinputdialog.ui
new file mode 100644 (file)
index 0000000..6ea34cb
--- /dev/null
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>rayinputDialog</class>
+ <widget class="QDialog" name="rayinputDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>200</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Set Ray Input Angle</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0">
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>12</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="0">
+    <widget class="QLabel" name="label">
+     <property name="text">
+      <string>Set ray input angle</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <spacer name="verticalSpacer_2">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>16</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="3" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="lineEdit"/>
+     </item>
+     <item>
+      <widget class="QLabel" name="label_2">
+       <property name="text">
+        <string>degree</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer_2">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+   <item row="4" column="0">
+    <spacer name="verticalSpacer_3">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="5" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout_2">
+     <item>
+      <spacer name="horizontalSpacer_3">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QDialogButtonBox" name="buttonBox">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="standardButtons">
+        <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>rayinputDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>rayinputDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>