fiffty-50 4 yıl önce
ebeveyn
işleme
6b32a70d96

+ 52 - 3
.gitignore

@@ -1,4 +1,53 @@
-openLog.pro.user
-openLog.pro.user*
 *.autosave
-openPilotLog.pro.user
+# C++ objects and libs
+*.slo
+*.lo
+*.o
+*.a
+*.la
+*.lai
+*.so
+*.so.*
+*.dll
+*.dylib
+
+# Qt-es
+object_script.*.Release
+object_script.*.Debug
+*_plugin_import.cpp
+/.qmake.cache
+/.qmake.stash
+*.pro.user
+*.pro.user.*
+*.qbs.user
+*.qbs.user.*
+*.moc
+moc_*.cpp
+moc_*.h
+qrc_*.cpp
+ui_*.h
+*.qmlc
+*.jsc
+Makefile*
+*build-*
+*.qm
+*.prl
+
+# Qt unit tests
+target_wrapper.*
+
+# QtCreator
+*.autosave
+
+# QtCreator Qml
+*.qmlproject.user
+*.qmlproject.user.*
+
+# QtCreator CMake
+CMakeLists.txt.user*
+
+# QtCreator 4.8< compilation database 
+compile_commands.json
+
+# QtCreator local machine specific files for imported projects
+*creator.user*

+ 0 - 317
openPilotLog.pro.user

@@ -1,317 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE QtCreatorProject>
-<!-- Written by QtCreator 4.11.0, 2020-11-19T14:37:17. -->
-<qtcreator>
- <data>
-  <variable>EnvironmentId</variable>
-  <value type="QByteArray">{a0f6673a-c661-4d8b-81b8-1724428a41f3}</value>
- </data>
- <data>
-  <variable>ProjectExplorer.Project.ActiveTarget</variable>
-  <value type="int">0</value>
- </data>
- <data>
-  <variable>ProjectExplorer.Project.EditorSettings</variable>
-  <valuemap type="QVariantMap">
-   <value type="bool" key="EditorConfiguration.AutoIndent">true</value>
-   <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
-   <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
-   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
-    <value type="QString" key="language">Cpp</value>
-    <valuemap type="QVariantMap" key="value">
-     <value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
-    </valuemap>
-   </valuemap>
-   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
-    <value type="QString" key="language">QmlJS</value>
-    <valuemap type="QVariantMap" key="value">
-     <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
-    </valuemap>
-   </valuemap>
-   <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
-   <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
-   <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
-   <value type="int" key="EditorConfiguration.IndentSize">4</value>
-   <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
-   <value type="int" key="EditorConfiguration.MarginColumn">80</value>
-   <value type="bool" key="EditorConfiguration.MouseHiding">true</value>
-   <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
-   <value type="int" key="EditorConfiguration.PaddingMode">1</value>
-   <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
-   <value type="bool" key="EditorConfiguration.ShowMargin">false</value>
-   <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
-   <value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
-   <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
-   <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
-   <value type="int" key="EditorConfiguration.TabSize">8</value>
-   <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
-   <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
-   <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
-   <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
-   <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
-   <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
-  </valuemap>
- </data>
- <data>
-  <variable>ProjectExplorer.Project.PluginSettings</variable>
-  <valuemap type="QVariantMap">
-   <valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey"/>
-   <value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
-  </valuemap>
- </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">{81b21802-8d40-4fed-bfad-a0b033cfd246}</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/klacki/git/build-openPilotLog-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.Id">QtProjectManager.QMakeBuildStep</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
-      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
-     </valuemap>
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
-      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
-      <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>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</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">Build</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
-    </valuemap>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
-      <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>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</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">Clean</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
-    </valuemap>
-    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
-    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
-    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
-   </valuemap>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
-    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/klacki/git/build-openPilotLog-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.Id">QtProjectManager.QMakeBuildStep</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
-      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</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.Id">Qt4ProjectManager.MakeStep</value>
-      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
-      <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>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</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">Build</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
-    </valuemap>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
-      <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>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</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">Clean</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
-    </valuemap>
-    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
-    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
-    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
-   </valuemap>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
-    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/klacki/git/build-openPilotLog-Desktop-Profile</value>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
-      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</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.Id">Qt4ProjectManager.MakeStep</value>
-      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
-      <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>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</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">Build</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
-    </valuemap>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
-      <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>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</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">Clean</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
-    </valuemap>
-    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
-    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
-    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
-   </valuemap>
-   <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</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.Id">ProjectExplorer.DefaultDeployConfiguration</value>
-   </valuemap>
-   <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
-    <value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
-    <valuelist type="QVariantList" key="Analyzer.Perf.Events">
-     <value type="QString">cpu-cycles</value>
-    </valuelist>
-    <valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/>
-    <value type="int" key="Analyzer.Perf.Frequency">250</value>
-    <valuelist type="QVariantList" key="Analyzer.Perf.RecordArguments">
-     <value type="QString">-e</value>
-     <value type="QString">cpu-cycles</value>
-     <value type="QString">--call-graph</value>
-     <value type="QString">dwarf,4096</value>
-     <value type="QString">-F</value>
-     <value type="QString">250</value>
-    </valuelist>
-    <value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
-    <value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
-    <value type="int" key="Analyzer.Perf.StackSize">4096</value>
-    <value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
-    <value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
-    <value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
-    <value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
-    <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
-    <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
-    <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
-    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
-    <value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</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.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/klacki/git/openpilotlog/openPilotLog.pro</value>
-    <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/home/klacki/git/openpilotlog/openPilotLog.pro</value>
-    <value type="QString" key="RunConfiguration.Arguments"></value>
-    <value type="bool" key="RunConfiguration.Arguments.multi">false</value>
-    <value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value>
-    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
-    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
-    <value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
-    <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
-    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
-    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
-    <value type="QString" key="RunConfiguration.WorkingDirectory"></value>
-    <value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/klacki/git/build-openPilotLog-Desktop-Debug</value>
-   </valuemap>
-   <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
-  </valuemap>
- </data>
- <data>
-  <variable>ProjectExplorer.Project.TargetCount</variable>
-  <value type="int">1</value>
- </data>
- <data>
-  <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
-  <value type="int">22</value>
- </data>
- <data>
-  <variable>Version</variable>
-  <value type="int">22</value>
- </data>
-</qtcreator>

+ 130 - 113
src/gui/dialogues/newflight.cpp

@@ -87,8 +87,7 @@ NewFlight::NewFlight(QWidget *parent, Flight oldFlight) :
 {
     ui->setupUi(this);
     setup();
-    DEBUG("Work in progress");
-    formFiller();
+    formFiller(oldFlight);
 }
 
 NewFlight::~NewFlight()
@@ -118,12 +117,12 @@ void NewFlight::setup(){
     }
     this->allOkBits.resize(line_edits.size());
     this->mandatoryLineEdits = {
-        ui->newDeptLocLineEdit,
-        ui->newDestLocLineEdit,
-        ui->newDeptTimeLineEdit,
-        ui->newDestTimeLineEdit,
-        ui->newPicNameLineEdit,
-        ui->newAcft,
+        ui->deptLocLineEdit,
+        ui->destLocLineEdit,
+        ui->tofbTimeLineEdit,
+        ui->tonbTimeLineEdit,
+        ui->picNameLineEdit,
+        ui->acftLineEdit,
     };
 
     for(auto line_edit : line_edits)
@@ -136,7 +135,7 @@ void NewFlight::setup(){
         {
             setupLineEdit(line_edit, time_settings);
         }
-        else if (QRegularExpression("Acft").match(le_name).hasMatch())
+        else if (QRegularExpression("acft").match(le_name).hasMatch())
         {
             setupLineEdit(line_edit, aircraft_settings);
         }
@@ -171,21 +170,34 @@ void NewFlight::setup(){
     ui->newDoft->setDate(date);
 
     // Visually mark mandatory fields
-    ui->newDeptLocLineEdit->setStyleSheet("border: 1px solid orange");
-    ui->newDestLocLineEdit->setStyleSheet("border: 1px solid orange");
-    ui->newDeptTimeLineEdit->setStyleSheet("border: 1px solid orange");
-    ui->newDestTimeLineEdit->setStyleSheet("border: 1px solid orange");
-    ui->newPicNameLineEdit->setStyleSheet("border: 1px solid orange");
-    ui->newAcft->setStyleSheet("border: 1px solid orange");
+    ui->deptLocLineEdit->setStyleSheet("border: 1px solid orange");
+    ui->destLocLineEdit->setStyleSheet("border: 1px solid orange");
+    ui->tofbTimeLineEdit->setStyleSheet("border: 1px solid orange");
+    ui->tonbTimeLineEdit->setStyleSheet("border: 1px solid orange");
+    ui->picNameLineEdit->setStyleSheet("border: 1px solid orange");
+    ui->acftLineEdit->setStyleSheet("border: 1px solid orange");
 
     readSettings();
     ui->tabWidget->setCurrentIndex(0);
-    ui->newDeptLocLineEdit->setFocus();
+    ui->deptLocLineEdit->setFocus();
 }
 
-void NewFlight::formFiller()
+void NewFlight::formFiller(Flight oldFlight)
 {
-
+    auto line_edits = parent()->findChildren<QLineEdit *>();
+    QStringList line_edits_names;
+    for(const auto& le : line_edits){
+        line_edits_names << le->objectName();
+    }
+    for(const auto& key : oldFlight.data.keys()){
+        auto rx = QRegularExpression(key + "\\w+?");
+        for(const auto& leName : line_edits_names){
+            if(rx.match(leName).hasMatch())  {
+                DEBUG("Match found: " << key << " - " << rx.match(leName).captured(0));
+                break;
+            }
+        }
+    }
 }
 
 /*
@@ -271,10 +283,10 @@ void NewFlight::readSettings()
     ui->flightNumberPrefixLabel->setText(Settings::read("userdata/flightnumberPrefix").toString() + QLatin1Char('-'));
 
     if(Settings::read("NewFlight/FunctionComboBox").toString() == "PIC"){
-        ui->newPicNameLineEdit->setText("self");
+        ui->picNameLineEdit->setText("self");
         ui->secondPilotNameLineEdit->setText("");
     }else if (Settings::read("NewFlight/FunctionComboBox").toString() == "Co-Pilot") {
-        ui->newPicNameLineEdit->setText("");
+        ui->picNameLineEdit->setText("");
         ui->secondPilotNameLineEdit->setText("self");
     }
 }
@@ -334,35 +346,35 @@ void NewFlight::collectBasicData()
     auto doft = date.toString(Qt::ISODate);
     newData.insert("doft",doft);
     // Departure Loc
-    newData.insert("dept",ui->newDeptLocLineEdit->text());
+    newData.insert("dept",ui->deptLocLineEdit->text());
     // Time Off Blocks
-    auto timeOff = QTime::fromString(ui->newDeptTimeLineEdit->text(),"hh:mm");
+    auto timeOff = QTime::fromString(ui->tofbTimeLineEdit->text(),"hh:mm");
     if(timeOff.isValid()){
         int tofb = timeOff.hour() * 60 + timeOff.minute();
         newData.insert("tofb",QString::number(tofb));
     }
     // Destination Loc
-    newData.insert("dest",ui->newDestLocLineEdit->text());
+    newData.insert("dest",ui->destLocLineEdit->text());
     // Time On Blocks
-    auto timeOn = QTime::fromString(ui->newDestTimeLineEdit->text(),"hh:mm");
+    auto timeOn = QTime::fromString(ui->tonbTimeLineEdit->text(),"hh:mm");
     if(timeOn.isValid()){
         int tonb = timeOn.hour() * 60 + timeOn.minute();
         newData.insert("tonb",QString::number(tonb));
     }
 
     // Aircraft
-    QString reg = ui->newAcft->text();
+    QString reg = ui->acftLineEdit->text();
     QString acft = Db::singleSelect("tail_id","tails","registration",reg,Db::exactMatch);
     if(!acft.isEmpty()){
         newData.insert("acft",acft);
     } else {
-        emit ui->newAcft->inputRejected();
+        emit ui->acftLineEdit->inputRejected();
     }
     // Pilot
-    if(ui->newPicNameLineEdit->text() == "self" || ui->newPicNameLineEdit->text() == "self"){
+    if(ui->picNameLineEdit->text() == "self" || ui->picNameLineEdit->text() == "self"){
         newData.insert("pic","1");
     } else {
-        QString name = ui->newPicNameLineEdit->text();
+        QString name = ui->picNameLineEdit->text();
         QStringList names = name.split(',');
         if(names.length()==2){
             QString firstNames = names[1].simplified();
@@ -373,7 +385,7 @@ void NewFlight::collectBasicData()
             if(!pic.isEmpty()){
                 newData.insert("pic",pic.first());
             }else {
-                emit ui->newPicNameLineEdit->inputRejected();
+                emit ui->picNameLineEdit->inputRejected();
             }
         }
     }
@@ -428,8 +440,8 @@ void NewFlight::collectAdditionalData()
     }
 
     // Extra Times
-    auto tofb = QTime::fromString(ui->newDeptTimeLineEdit->text(),"hh:mm");
-    auto tonb = QTime::fromString(ui->newDestTimeLineEdit->text(),"hh:mm");
+    auto tofb = QTime::fromString(ui->tofbTimeLineEdit->text(),"hh:mm");
+    auto tonb = QTime::fromString(ui->tonbTimeLineEdit->text(),"hh:mm");
     QString blockTime = Calc::blocktime(tofb, tonb).toString("hh:mm");
     QString blockMinutes = QString::number(Calc::stringToMinutes(blockTime));
     DEBUG("Blocktime: " << blockTime << " (" << blockMinutes << " minutes)");
@@ -503,7 +515,7 @@ void NewFlight::collectAdditionalData()
         newData.insert("toDay", "0");
         newData.insert("ldgDay", "0");
     } else {
-        if(Calc::isNight(ui->newDeptLocLineEdit->text(), deptDateTime,  nightAngle)){
+        if(Calc::isNight(ui->deptLocLineEdit->text(), deptDateTime,  nightAngle)){
             newData.insert("toNight", QString::number(ui->TakeoffSpinBox->value()));
             newData.insert("toDay", "0");
         }else{
@@ -512,7 +524,7 @@ void NewFlight::collectAdditionalData()
         }
         QString destDate = ui->newDoft->date().toString(Qt::ISODate) + 'T' + tonb.toString("hh:mm");
         QDateTime destDateTime = QDateTime::fromString(destDate,"yyyy-MM-ddThh:mm");
-        if(Calc::isNight(ui->newDestLocLineEdit->text(), destDateTime,  nightAngle)){
+        if(Calc::isNight(ui->destLocLineEdit->text(), destDateTime,  nightAngle)){
             newData.insert("ldgNight", QString::number(ui->LandingSpinBox->value()));
             newData.insert("ldgDay", "0");
         }else{
@@ -535,8 +547,8 @@ void NewFlight::collectAdditionalData()
 void NewFlight::fillExtras()
 {
     //Times
-    auto tofb = QTime::fromString(ui->newDeptTimeLineEdit->text(),"hh:mm");
-    auto tonb = QTime::fromString(ui->newDestTimeLineEdit->text(),"hh:mm");
+    auto tofb = QTime::fromString(ui->tofbTimeLineEdit->text(),"hh:mm");
+    auto tonb = QTime::fromString(ui->tonbTimeLineEdit->text(),"hh:mm");
     QString blockTime = Calc::blocktime(tofb, tonb).toString("hh:mm");
     QString blockMinutes = QString::number(Calc::stringToMinutes(blockTime));
     DEBUG("Blocktime: " << blockTime << " (" << blockMinutes << " minutes)");
@@ -546,23 +558,23 @@ void NewFlight::fillExtras()
     if(!acft.data.isEmpty()){// valid aircraft
         // SP SE
         if(acft.data.value("singlepilot") == "1" && acft.data.value("singleengine") == "1"){
-            ui->spseTimeLineEdit->setText(blockTime);
+            ui->tSPSETimeLineEdit->setText(blockTime);
         }
         // SP ME
         if(acft.data.value("singlepilot") == "1" && acft.data.value("multiengine") == "1"){
-            ui->spmeTimeLineEdit->setText(blockTime);
+            ui->tSPMETimeLineEdit->setText(blockTime);
         }
         // MP
         if(acft.data.value("multipilot") == "1"){
-            ui->mpTimeLineEdit->setText(blockTime);
+            ui->tMPTimeLineEdit->setText(blockTime);
         }
     }else{DEBUG("Aircraft Details Empty");}//invalid aircraft
 
     // TOTAL
-    ui->totalTimeLineEdit->setText(blockTime);
+    ui->tblkTimeLineEdit->setText(blockTime);
     // IFR
     if(ui->IfrCheckBox->isChecked()){
-        ui->ifrTimeLineEdit->setText(blockTime);
+        ui->tIFRTimeLineEdit->setText(blockTime);
     }
     // Night
     QString deptDate = ui->newDoft->date().toString(Qt::ISODate) + 'T' + tofb.toString("hh:mm");
@@ -574,32 +586,32 @@ void NewFlight::fillExtras()
                         Calc::calculateNightTime(
                         newData.value("dept"), newData.value("dest"),
                         deptDateTime, tblk, nightAngle));
-    ui->nightTimeLineEdit->setText(Calc::minutesToString(nightTime));
+    ui->tNIGHTTimeLineEdit->setText(Calc::minutesToString(nightTime));
     // Function times
     switch (ui->FunctionComboBox->currentIndex()) {
     case 0://PIC
-        ui->picTimeLineEdit->setText(blockTime);
-        ui->copTimeLineEdit->setText("");
-        ui->dualTimeLineEdit->setText("");
-        ui->fiTimeLineEdit->setText("");
+        ui->tPICTimeLineEdit->setText(blockTime);
+        ui->tSICTimeLineEdit->setText("");
+        ui->tDualTimeLineEdit->setText("");
+        ui->tFITimeLineEdit->setText("");
         break;
     case 1://Co-Pilot
-        ui->picTimeLineEdit->setText("");
-        ui->copTimeLineEdit->setText(blockTime);
-        ui->dualTimeLineEdit->setText("");
-        ui->fiTimeLineEdit->setText("");
+        ui->tPICTimeLineEdit->setText("");
+        ui->tSICTimeLineEdit->setText(blockTime);
+        ui->tDualTimeLineEdit->setText("");
+        ui->tFITimeLineEdit->setText("");
         break;
     case 2://Dual
-        ui->picTimeLineEdit->setText("");
-        ui->copTimeLineEdit->setText("");
-        ui->dualTimeLineEdit->setText(blockTime);
-        ui->fiTimeLineEdit->setText("");
+        ui->tPICTimeLineEdit->setText("");
+        ui->tSICTimeLineEdit->setText("");
+        ui->tDualTimeLineEdit->setText(blockTime);
+        ui->tFITimeLineEdit->setText("");
         break;
     case 3://Instructor
-        ui->picTimeLineEdit->setText("");
-        ui->copTimeLineEdit->setText("");
-        ui->dualTimeLineEdit->setText("");
-        ui->fiTimeLineEdit->setText(blockTime);
+        ui->tPICTimeLineEdit->setText("");
+        ui->tSICTimeLineEdit->setText("");
+        ui->tDualTimeLineEdit->setText("");
+        ui->tFITimeLineEdit->setText(blockTime);
     }
 }
 
@@ -705,23 +717,23 @@ void NewFlight::on_destTZ_currentIndexChanged(const QString &arg1)
 
 /// Departure
 
-void NewFlight::on_newDeptLocLineEdit_inputRejected()
+void NewFlight::on_deptLocLineEdit_inputRejected()
 {
     DEBUG("SENDER --->" << sender());
-    ui->newDeptLocLineEdit->setText(ui->newDeptLocLineEdit->text().toUpper());
-    onInputRejected(ui->newDeptLocLineEdit, QRegularExpression(LOC_INVALID_RGX));
+    ui->deptLocLineEdit->setText(ui->deptLocLineEdit->text().toUpper());
+    onInputRejected(ui->deptLocLineEdit, QRegularExpression(LOC_INVALID_RGX));
 }
 
-void NewFlight::on_newDeptLocLineEdit_textEdited(const QString &arg1)
+void NewFlight::on_deptLocLineEdit_textEdited(const QString &arg1)
 {
-    ui->newDeptLocLineEdit->setText(arg1.toUpper());
+    ui->deptLocLineEdit->setText(arg1.toUpper());
 }
 
-void NewFlight::on_newDeptLocLineEdit_editingFinished()
+void NewFlight::on_deptLocLineEdit_editingFinished()
 {
     DEBUG(sender()->objectName() << "EDITING FINISHED");
-    auto line_edit = ui->newDeptLocLineEdit;
-    auto text = ui->newDeptLocLineEdit->text();
+    auto line_edit = ui->deptLocLineEdit;
+    auto text = ui->deptLocLineEdit->text();
 
     // check if iata exists, replace with icao code if it does.
     if(text.length() == 3){
@@ -736,21 +748,22 @@ void NewFlight::on_newDeptLocLineEdit_editingFinished()
         DEBUG("Departure accepted: " << text);
         line_edit->setText(text);
         onEditingFinishedCleanup(line_edit); //reset style sheet
+        ui->deptNameLabel->setText(Db::singleSelect("name","airports","icao",text,Db::exactMatch));
         update();
     }
 }
 
-void NewFlight::on_newDeptTimeLineEdit_inputRejected()
+void NewFlight::on_tofbTimeLineEdit_inputRejected()
 {
-    onInputRejected(ui->newDeptTimeLineEdit, QRegularExpression(TIME_INVALID_RGX));
+    onInputRejected(ui->tofbTimeLineEdit, QRegularExpression(TIME_INVALID_RGX));
 }
 
-void NewFlight::on_newDeptTimeLineEdit_editingFinished()
+void NewFlight::on_tofbTimeLineEdit_editingFinished()
 {
-    ui->newDeptTimeLineEdit->setText(Calc::formatTimeInput(ui->newDeptTimeLineEdit->text()));
-    const auto time = QTime::fromString(ui->newDeptTimeLineEdit->text(),"hh:mm");
+    ui->tofbTimeLineEdit->setText(Calc::formatTimeInput(ui->tofbTimeLineEdit->text()));
+    const auto time = QTime::fromString(ui->tofbTimeLineEdit->text(),"hh:mm");
 
-    auto line_edit = ui->newDeptTimeLineEdit;
+    auto line_edit = ui->tofbTimeLineEdit;
     onEditingFinishedCleanup(line_edit);
 
     if(time.isValid()){
@@ -766,22 +779,22 @@ void NewFlight::on_newDeptTimeLineEdit_editingFinished()
 
 /// Destination
 
-void NewFlight::on_newDestLocLineEdit_inputRejected()
+void NewFlight::on_destLocLineEdit_inputRejected()
 {
-    ui->newDestLocLineEdit->setText(ui->newDestLocLineEdit->text().toUpper());
-    onInputRejected(ui->newDestLocLineEdit, QRegularExpression(LOC_INVALID_RGX));
+    ui->destLocLineEdit->setText(ui->destLocLineEdit->text().toUpper());
+    onInputRejected(ui->destLocLineEdit, QRegularExpression(LOC_INVALID_RGX));
 }
 
-void NewFlight::on_newDestLocLineEdit_textEdited(const QString &arg1)
+void NewFlight::on_destLocLineEdit_textEdited(const QString &arg1)
 {
-    ui->newDestLocLineEdit->setText(arg1.toUpper());
+    ui->destLocLineEdit->setText(arg1.toUpper());
 }
 
-void NewFlight::on_newDestLocLineEdit_editingFinished()
+void NewFlight::on_destLocLineEdit_editingFinished()
 {
     DEBUG(sender()->objectName() << "EDITING FINISHED");
-    auto line_edit = ui->newDestLocLineEdit;
-    auto text = ui->newDestLocLineEdit->text();
+    auto line_edit = ui->destLocLineEdit;
+    auto text = ui->destLocLineEdit->text();
 
     // check if iata exists, replace with icao code if it does.
     if(text.length() == 3){
@@ -796,20 +809,21 @@ void NewFlight::on_newDestLocLineEdit_editingFinished()
         DEBUG("Destination accepted: " << text);
         line_edit->setText(text);
         onEditingFinishedCleanup(line_edit); //reset style sheet
+        ui->destNameLabel->setText(Db::singleSelect("name","airports","icao",text,Db::exactMatch));
         update();
     }
 }
 
-void NewFlight::on_newDestTimeLineEdit_inputRejected()
+void NewFlight::on_tonbTimeLineEdit_inputRejected()
 {
-    onInputRejected(ui->newDestTimeLineEdit, QRegularExpression(TIME_INVALID_RGX));
+    onInputRejected(ui->tonbTimeLineEdit, QRegularExpression(TIME_INVALID_RGX));
 }
 
-void NewFlight::on_newDestTimeLineEdit_editingFinished()
+void NewFlight::on_tonbTimeLineEdit_editingFinished()
 {
-    ui->newDestTimeLineEdit->setText(Calc::formatTimeInput(ui->newDestTimeLineEdit->text()));
-    auto line_edit = ui->newDestTimeLineEdit;
-    const auto time = QTime::fromString(ui->newDestTimeLineEdit->text(),"hh:mm");
+    ui->tonbTimeLineEdit->setText(Calc::formatTimeInput(ui->tonbTimeLineEdit->text()));
+    auto line_edit = ui->tonbTimeLineEdit;
+    const auto time = QTime::fromString(ui->tonbTimeLineEdit->text(),"hh:mm");
     if(time.isValid()){
         int minutes = time.hour() * 60 + time.minute();
         QString tonb = QString::number(minutes);
@@ -831,17 +845,17 @@ void NewFlight::on_newDoft_editingFinished()
 
 /// Aircraft
 
-void NewFlight::on_newAcft_inputRejected()
+void NewFlight::on_acftLineEdit_inputRejected()
 {
-    ui->newAcft->setText(ui->newAcft->text().toUpper());
-    onInputRejected(ui->newAcft, QRegularExpression(AIRCRAFT_INVALID_RGX));
+    ui->acftLineEdit->setText(ui->acftLineEdit->text().toUpper());
+    onInputRejected(ui->acftLineEdit, QRegularExpression(AIRCRAFT_INVALID_RGX));
 }
 
-void NewFlight::on_newAcft_editingFinished()
+void NewFlight::on_acftLineEdit_editingFinished()
 {
     auto registrationList = CompletionList(CompleterTarget::registrations).list;
-    auto line_edit = ui->newAcft;
-    auto text = ui->newAcft->text();
+    auto line_edit = ui->acftLineEdit;
+    auto text = ui->acftLineEdit->text();
 
     QStringList match = registrationList.filter(line_edit->text(), Qt::CaseInsensitive);
     DEBUG("aircraft accepted: " << match);
@@ -849,6 +863,9 @@ void NewFlight::on_newAcft_editingFinished()
         text = match[0];
         line_edit->setText(text.toUpper());
         onEditingFinishedCleanup(line_edit);
+        QString column = "make||' '||model||'-'||variant";
+        ui->acftTypeLabel->setText(
+                    Db::singleSelect(column,"tails","registration",text,Db::exactMatch));
         update();
     }else{
         DEBUG("Registration not in List!");
@@ -858,14 +875,14 @@ void NewFlight::on_newAcft_editingFinished()
 
 /// Pilot(s)
 
-void NewFlight::on_newPicNameLineEdit_inputRejected()
+void NewFlight::on_picNameLineEdit_inputRejected()
 {
-    onInputRejected(ui->newPicNameLineEdit, QRegularExpression(PILOT_NAME_INVALID_RGX));
+    onInputRejected(ui->picNameLineEdit, QRegularExpression(PILOT_NAME_INVALID_RGX));
 }
 
-void NewFlight::on_newPicNameLineEdit_editingFinished()
+void NewFlight::on_picNameLineEdit_editingFinished()
 {
-    auto line_edit = ui->newPicNameLineEdit;
+    auto line_edit = ui->picNameLineEdit;
     auto text = line_edit->text();
     if(text == "self" || text == "SELF") // Logbook owner is PIC
     {
@@ -1082,9 +1099,9 @@ inline bool NewFlight::isLessOrEqualToTotalTime(QString timeString)
 
 }
 
-void NewFlight::on_spseTimeLineEdit_editingFinished()
+void NewFlight::on_tSPSETimeLineEdit_editingFinished()
 {
-    const auto &le = ui->spseTimeLineEdit;
+    const auto &le = ui->tSPSETimeLineEdit;
     le->setText(Calc::formatTimeInput(le->text()));
     const auto &text = le->text();
 
@@ -1095,9 +1112,9 @@ void NewFlight::on_spseTimeLineEdit_editingFinished()
     }
 }
 
-void NewFlight::on_spmeTimeLineEdit_editingFinished()
+void NewFlight::on_tSPMETimeLineEdit_editingFinished()
 {
-    const auto &le = ui->spmeTimeLineEdit;
+    const auto &le = ui->tSPMETimeLineEdit;
     le->setText(Calc::formatTimeInput(le->text()));
     const auto &text = le->text();
 
@@ -1108,9 +1125,9 @@ void NewFlight::on_spmeTimeLineEdit_editingFinished()
     }
 }
 
-void NewFlight::on_mpTimeLineEdit_editingFinished()
+void NewFlight::on_tMPTimeLineEdit_editingFinished()
 {
-    const auto &le = ui->mpTimeLineEdit;
+    const auto &le = ui->tMPTimeLineEdit;
     le->setText(Calc::formatTimeInput(le->text()));
     const auto &text = le->text();
 
@@ -1120,9 +1137,9 @@ void NewFlight::on_mpTimeLineEdit_editingFinished()
         le->setText(QString());
     }
 }
-void NewFlight::on_ifrTimeLineEdit_editingFinished()
+void NewFlight::on_tIFRTimeLineEdit_editingFinished()
 {
-    const auto &le = ui->ifrTimeLineEdit;
+    const auto &le = ui->tIFRTimeLineEdit;
     le->setText(Calc::formatTimeInput(le->text()));
     const auto &text = le->text();
 
@@ -1133,9 +1150,9 @@ void NewFlight::on_ifrTimeLineEdit_editingFinished()
     }
 }
 
-void NewFlight::on_nightTimeLineEdit_editingFinished()
+void NewFlight::on_tNIGHTTimeLineEdit_editingFinished()
 {
-    const auto &le = ui->nightTimeLineEdit;
+    const auto &le = ui->tNIGHTTimeLineEdit;
     le->setText(Calc::formatTimeInput(le->text()));
     const auto &text = le->text();
 
@@ -1146,9 +1163,9 @@ void NewFlight::on_nightTimeLineEdit_editingFinished()
     }
 }
 
-void NewFlight::on_picTimeLineEdit_editingFinished()
+void NewFlight::on_tPICTimeLineEdit_editingFinished()
 {
-    const auto &le = ui->picTimeLineEdit;
+    const auto &le = ui->tPICTimeLineEdit;
     le->setText(Calc::formatTimeInput(le->text()));
     const auto &text = le->text();
 
@@ -1159,9 +1176,9 @@ void NewFlight::on_picTimeLineEdit_editingFinished()
     }
 }
 
-void NewFlight::on_copTimeLineEdit_editingFinished()
+void NewFlight::on_tSICTimeLineEdit_editingFinished()
 {
-    const auto &le = ui->copTimeLineEdit;
+    const auto &le = ui->tSICTimeLineEdit;
     le->setText(Calc::formatTimeInput(le->text()));
     const auto &text = le->text();
 
@@ -1172,9 +1189,9 @@ void NewFlight::on_copTimeLineEdit_editingFinished()
     }
 }
 
-void NewFlight::on_dualTimeLineEdit_editingFinished()
+void NewFlight::on_tDualTimeLineEdit_editingFinished()
 {
-    const auto &le = ui->dualTimeLineEdit;
+    const auto &le = ui->tDualTimeLineEdit;
     le->setText(Calc::formatTimeInput(le->text()));
     const auto &text = le->text();
 
@@ -1185,9 +1202,9 @@ void NewFlight::on_dualTimeLineEdit_editingFinished()
     }
 }
 
-void NewFlight::on_fiTimeLineEdit_editingFinished()
+void NewFlight::on_tFITimeLineEdit_editingFinished()
 {
-    const auto &le = ui->fiTimeLineEdit;
+    const auto &le = ui->tFITimeLineEdit;
     le->setText(Calc::formatTimeInput(le->text()));
     const auto &text = le->text();
 

+ 24 - 24
src/gui/dialogues/newflight.h

@@ -89,7 +89,7 @@ private:
 
     void setup();
 
-    void formFiller();
+    void formFiller(Flight oldFlight);
 
     void setupLineEdit(QLineEdit* line_edit, LineEditSettings settings);
 
@@ -124,26 +124,26 @@ private slots:
     void on_deptTZ_currentTextChanged(const QString &arg1);
     void on_destTZ_currentIndexChanged(const QString &arg1);
 
-    void on_newDeptTimeLineEdit_editingFinished();
-    void on_newDestTimeLineEdit_editingFinished();
-    void on_newDeptTimeLineEdit_inputRejected();
-    void on_newDestTimeLineEdit_inputRejected();
+    void on_tofbTimeLineEdit_editingFinished();
+    void on_tonbTimeLineEdit_editingFinished();
+    void on_tofbTimeLineEdit_inputRejected();
+    void on_tonbTimeLineEdit_inputRejected();
 
-    void on_newDeptLocLineEdit_editingFinished();
-    void on_newDestLocLineEdit_editingFinished();
-    void on_newDestLocLineEdit_inputRejected();
-    void on_newDeptLocLineEdit_inputRejected();
+    void on_deptLocLineEdit_editingFinished();
+    void on_destLocLineEdit_editingFinished();
+    void on_destLocLineEdit_inputRejected();
+    void on_deptLocLineEdit_inputRejected();
 
-    void on_newDeptLocLineEdit_textEdited(const QString &arg1);
-    void on_newDestLocLineEdit_textEdited(const QString &arg1);
+    void on_deptLocLineEdit_textEdited(const QString &arg1);
+    void on_destLocLineEdit_textEdited(const QString &arg1);
 
     void on_newDoft_editingFinished();
 
-    void on_newAcft_inputRejected();
-    void on_newAcft_editingFinished();
+    void on_acftLineEdit_inputRejected();
+    void on_acftLineEdit_editingFinished();
 
-    void on_newPicNameLineEdit_inputRejected();
-    void on_newPicNameLineEdit_editingFinished();
+    void on_picNameLineEdit_inputRejected();
+    void on_picNameLineEdit_editingFinished();
     void on_secondPilotNameLineEdit_editingFinished();
     void on_secondPilotNameLineEdit_inputRejected();
     void on_thirdPilotNameLineEdit_editingFinished();
@@ -159,18 +159,18 @@ private slots:
 
     void on_ApproachComboBox_currentTextChanged(const QString &arg1);
 
-    void on_spseTimeLineEdit_editingFinished();
-    void on_spmeTimeLineEdit_editingFinished();
+    void on_tSPSETimeLineEdit_editingFinished();
+    void on_tSPMETimeLineEdit_editingFinished();
 
-    void on_mpTimeLineEdit_editingFinished();
+    void on_tMPTimeLineEdit_editingFinished();
 
-    void on_ifrTimeLineEdit_editingFinished();
-    void on_nightTimeLineEdit_editingFinished();
+    void on_tIFRTimeLineEdit_editingFinished();
+    void on_tNIGHTTimeLineEdit_editingFinished();
     //void on_xcTimeLineEdit_editingFinished();
-    void on_picTimeLineEdit_editingFinished();
-    void on_copTimeLineEdit_editingFinished();
-    void on_dualTimeLineEdit_editingFinished();
-    void on_fiTimeLineEdit_editingFinished();
+    void on_tPICTimeLineEdit_editingFinished();
+    void on_tSICTimeLineEdit_editingFinished();
+    void on_tDualTimeLineEdit_editingFinished();
+    void on_tFITimeLineEdit_editingFinished();
     //void on_simTimeLineEdit_editingFinished();
     void on_FlightNumberLineEdit_editingFinished();
 

+ 380 - 200
src/gui/dialogues/newflight.ui

@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>625</width>
-    <height>619</height>
+    <width>588</width>
+    <height>708</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -24,170 +24,199 @@
        <string>Flight Data</string>
       </attribute>
       <layout class="QGridLayout" name="gridLayout">
-       <item row="3" column="3">
-        <widget class="QLabel" name="picLabel">
-         <property name="text">
-          <string>Name PIC</string>
+       <item row="6" column="2">
+        <widget class="QLineEdit" name="acftLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
          </property>
-        </widget>
-       </item>
-       <item row="3" column="0">
-        <widget class="QLabel" name="acftLabel">
-         <property name="text">
-          <string>Aircraft</string>
+         <property name="placeholderText">
+          <string>D-LMAO</string>
          </property>
         </widget>
        </item>
-       <item row="2" column="2">
-        <widget class="QLineEdit" name="newDestLocLineEdit">
+       <item row="1" column="5">
+        <widget class="QLineEdit" name="tofbTimeLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
+         </property>
          <property name="toolTip">
-          <string>Enter the ICAO 4-letter Identifier of the Airport</string>
+          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#a8abb0;&quot;&gt;Enter a valid time.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#a8abb0;&quot;&gt;e.g.: 845 0845 8:45 08:45&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
          </property>
-         <property name="inputMethodHints">
-          <set>Qt::ImhNone</set>
+         <property name="whatsThis">
+          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
          </property>
          <property name="maxLength">
-          <number>4</number>
+          <number>5</number>
          </property>
          <property name="placeholderText">
-          <string>EDDF</string>
+          <string>00:00</string>
          </property>
         </widget>
        </item>
-       <item row="4" column="5">
-        <widget class="QLineEdit" name="thirdPilotNameLineEdit">
-         <property name="placeholderText">
-          <string>optional</string>
+       <item row="4" column="4">
+        <widget class="QLabel" name="tonbLabel">
+         <property name="text">
+          <string>Time</string>
          </property>
         </widget>
        </item>
-       <item row="2" column="0">
-        <widget class="QLabel" name="destLabel">
+       <item row="0" column="0">
+        <widget class="QLabel" name="doftLabel">
          <property name="text">
-          <string>Destination</string>
+          <string>Date of Flight</string>
          </property>
         </widget>
        </item>
-       <item row="3" column="2">
-        <widget class="QLineEdit" name="newAcft">
-         <property name="placeholderText">
-          <string>D-LMAO</string>
+       <item row="4" column="0">
+        <widget class="QLabel" name="destLabel">
+         <property name="text">
+          <string>Destination</string>
          </property>
         </widget>
        </item>
-       <item row="1" column="0">
-        <widget class="QLabel" name="deptLabel">
+       <item row="1" column="1">
+        <widget class="QLabel" name="placeLabel1">
          <property name="text">
-          <string>Departure</string>
+          <string>Place</string>
          </property>
         </widget>
        </item>
-       <item row="0" column="0">
-        <widget class="QLabel" name="doftLabel">
+       <item row="9" column="3">
+        <widget class="QLabel" name="RemarksLabel">
          <property name="text">
-          <string>Date of Flight</string>
+          <string>Remarks</string>
          </property>
         </widget>
        </item>
-       <item row="1" column="2">
-        <widget class="QLineEdit" name="newDeptLocLineEdit">
+       <item row="9" column="1">
+        <widget class="QLabel" name="flightNumberPrefixLabel">
          <property name="toolTip">
-          <string>Enter the ICAO 4-letter Identifier of the Airport</string>
-         </property>
-         <property name="inputMethodHints">
-          <set>Qt::ImhNone</set>
+          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Can bet changed in Settings&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
          </property>
-         <property name="maxLength">
-          <number>4</number>
+         <property name="text">
+          <string/>
          </property>
-         <property name="placeholderText">
-          <string>KJFK</string>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
          </property>
         </widget>
        </item>
-       <item row="2" column="1">
+       <item row="4" column="1">
         <widget class="QLabel" name="placeLabel2">
          <property name="text">
           <string>Place</string>
          </property>
         </widget>
        </item>
-       <item row="5" column="0">
-        <widget class="QLabel" name="FlightNumberLabel">
+       <item row="5" column="2" colspan="2">
+        <widget class="QLabel" name="destNameLabel">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>160</width>
+           <height>20</height>
+          </size>
+         </property>
          <property name="text">
-          <string>Flight number</string>
+          <string/>
          </property>
         </widget>
        </item>
-       <item row="5" column="2">
+       <item row="9" column="2">
         <widget class="QLineEdit" name="FlightNumberLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
+         </property>
          <property name="placeholderText">
           <string>optional</string>
          </property>
         </widget>
        </item>
-       <item row="2" column="4">
-        <widget class="QLabel" name="tonbLabel">
-         <property name="text">
-          <string>Time</string>
+       <item row="1" column="2">
+        <widget class="QLineEdit" name="deptLocLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
          </property>
-        </widget>
-       </item>
-       <item row="1" column="3">
-        <widget class="QComboBox" name="deptTZ">
          <property name="toolTip">
-          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;UTC - Universal Time Coordinated&lt;/p&gt;&lt;p&gt;LOCAL - Local time at Airfield&lt;/p&gt;&lt;p&gt;BASE - Local time at Home Base&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+          <string>Enter the ICAO 4-letter Identifier of the Airport</string>
          </property>
-         <item>
-          <property name="text">
-           <string>UTC</string>
-          </property>
-         </item>
-         <item>
-          <property name="text">
-           <string>Local</string>
-          </property>
-         </item>
-        </widget>
-       </item>
-       <item row="2" column="3">
-        <widget class="QComboBox" name="destTZ">
-         <property name="toolTip">
-          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;UTC - Universal Time Coordinated&lt;/p&gt;&lt;p&gt;LOCAL - Local time at Airfield&lt;/p&gt;&lt;p&gt;BASE - Local time at Home Base&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+         <property name="inputMethodHints">
+          <set>Qt::ImhNone</set>
+         </property>
+         <property name="maxLength">
+          <number>4</number>
+         </property>
+         <property name="placeholderText">
+          <string>KJFK</string>
          </property>
-         <item>
-          <property name="text">
-           <string>UTC</string>
-          </property>
-         </item>
-         <item>
-          <property name="text">
-           <string>Local</string>
-          </property>
-         </item>
         </widget>
        </item>
-       <item row="3" column="5">
-        <widget class="QLineEdit" name="newPicNameLineEdit">
-         <property name="placeholderText">
-          <string>self</string>
+       <item row="10" column="0">
+        <widget class="QLabel" name="totalTimeLabel">
+         <property name="text">
+          <string>Total Time</string>
          </property>
         </widget>
        </item>
-       <item row="5" column="5">
-        <widget class="QLineEdit" name="RemarksLineEdit">
-         <property name="placeholderText">
-          <string>optional</string>
+       <item row="1" column="0">
+        <widget class="QLabel" name="deptLabel">
+         <property name="text">
+          <string>Departure</string>
          </property>
         </widget>
        </item>
-       <item row="4" column="2">
-        <widget class="QLineEdit" name="secondPilotNameLineEdit">
+       <item row="2" column="2" colspan="2">
+        <widget class="QLabel" name="deptNameLabel">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>160</width>
+           <height>20</height>
+          </size>
+         </property>
          <property name="text">
           <string/>
          </property>
+        </widget>
+       </item>
+       <item row="4" column="5">
+        <widget class="QLineEdit" name="tonbTimeLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
+         </property>
+         <property name="toolTip">
+          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#a8abb0;&quot;&gt;Enter a valid time.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#a8abb0;&quot;&gt;e.g.: 845 0845 8:45 08:45&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+         </property>
+         <property name="whatsThis">
+          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+         </property>
          <property name="placeholderText">
-          <string>optional</string>
+          <string>00:00</string>
          </property>
         </widget>
        </item>
@@ -200,7 +229,7 @@
            <second>0</second>
            <year>2019</year>
            <month>12</month>
-           <day>7</day>
+           <day>6</day>
           </datetime>
          </property>
          <property name="displayFormat">
@@ -214,33 +243,113 @@
          </property>
         </widget>
        </item>
-       <item row="1" column="5">
-        <widget class="QLineEdit" name="newDeptTimeLineEdit">
-         <property name="toolTip">
-          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#a8abb0;&quot;&gt;Enter a valid time.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#a8abb0;&quot;&gt;e.g.: 845 0845 8:45 08:45&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+       <item row="8" column="0">
+        <widget class="QLabel" name="picLabel_2">
+         <property name="text">
+          <string>Second Pilot</string>
          </property>
-         <property name="whatsThis">
-          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </widget>
+       </item>
+       <item row="9" column="5">
+        <widget class="QLineEdit" name="RemarksLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
          </property>
-         <property name="maxLength">
-          <number>5</number>
+         <property name="placeholderText">
+          <string>optional</string>
+         </property>
+        </widget>
+       </item>
+       <item row="8" column="5">
+        <widget class="QLineEdit" name="thirdPilotNameLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
          </property>
          <property name="placeholderText">
-          <string>00:00</string>
+          <string>optional</string>
          </property>
         </widget>
        </item>
-       <item row="1" column="1">
-        <widget class="QLabel" name="placeLabel1">
+       <item row="6" column="5">
+        <widget class="QLineEdit" name="picNameLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
+         </property>
+         <property name="placeholderText">
+          <string>self</string>
+         </property>
+        </widget>
+       </item>
+       <item row="6" column="0">
+        <widget class="QLabel" name="acftLabel">
          <property name="text">
-          <string>Place</string>
+          <string>Aircraft</string>
          </property>
         </widget>
        </item>
+       <item row="1" column="3">
+        <widget class="QComboBox" name="deptTZ">
+         <property name="toolTip">
+          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;UTC - Universal Time Coordinated&lt;/p&gt;&lt;p&gt;LOCAL - Local time at Airfield&lt;/p&gt;&lt;p&gt;BASE - Local time at Home Base&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+         </property>
+         <item>
+          <property name="text">
+           <string>UTC</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>Local</string>
+          </property>
+         </item>
+        </widget>
+       </item>
        <item row="4" column="3">
-        <widget class="QLabel" name="thirdPilotLabel">
+        <widget class="QComboBox" name="destTZ">
+         <property name="toolTip">
+          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;UTC - Universal Time Coordinated&lt;/p&gt;&lt;p&gt;LOCAL - Local time at Airfield&lt;/p&gt;&lt;p&gt;BASE - Local time at Home Base&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+         </property>
+         <item>
+          <property name="text">
+           <string>UTC</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>Local</string>
+          </property>
+         </item>
+        </widget>
+       </item>
+       <item row="10" column="2">
+        <widget class="QLineEdit" name="tblkTimeLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
+         </property>
+         <property name="focusPolicy">
+          <enum>Qt::NoFocus</enum>
+         </property>
+         <property name="placeholderText">
+          <string>00:00</string>
+         </property>
+        </widget>
+       </item>
+       <item row="6" column="3">
+        <widget class="QLabel" name="picLabel">
          <property name="text">
-          <string>Third Pilot</string>
+          <string>Name PIC</string>
          </property>
         </widget>
        </item>
@@ -251,44 +360,75 @@
          </property>
         </widget>
        </item>
-       <item row="5" column="3">
-        <widget class="QLabel" name="RemarksLabel">
+       <item row="9" column="0">
+        <widget class="QLabel" name="FlightNumberLabel">
          <property name="text">
-          <string>Remarks</string>
+          <string>Flight number</string>
          </property>
         </widget>
        </item>
-       <item row="4" column="0">
-        <widget class="QLabel" name="picLabel_2">
+       <item row="8" column="2">
+        <widget class="QLineEdit" name="secondPilotNameLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
+         </property>
          <property name="text">
-          <string>Second Pilot</string>
+          <string/>
+         </property>
+         <property name="placeholderText">
+          <string>optional</string>
          </property>
         </widget>
        </item>
-       <item row="2" column="5">
-        <widget class="QLineEdit" name="newDestTimeLineEdit">
+       <item row="8" column="3">
+        <widget class="QLabel" name="thirdPilotLabel">
+         <property name="text">
+          <string>Third Pilot</string>
+         </property>
+        </widget>
+       </item>
+       <item row="4" column="2">
+        <widget class="QLineEdit" name="destLocLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
+         </property>
          <property name="toolTip">
-          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#a8abb0;&quot;&gt;Enter a valid time.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#a8abb0;&quot;&gt;e.g.: 845 0845 8:45 08:45&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+          <string>Enter the ICAO 4-letter Identifier of the Airport</string>
          </property>
-         <property name="whatsThis">
-          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+         <property name="inputMethodHints">
+          <set>Qt::ImhNone</set>
+         </property>
+         <property name="maxLength">
+          <number>4</number>
          </property>
          <property name="placeholderText">
-          <string>00:00</string>
+          <string>EDDF</string>
          </property>
         </widget>
        </item>
-       <item row="5" column="1">
-        <widget class="QLabel" name="flightNumberPrefixLabel">
-         <property name="toolTip">
-          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Can bet changed in Settings&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+       <item row="7" column="2">
+        <widget class="QLabel" name="acftTypeLabel">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>160</width>
+           <height>20</height>
+          </size>
          </property>
          <property name="text">
           <string/>
          </property>
-         <property name="alignment">
-          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-         </property>
         </widget>
        </item>
       </layout>
@@ -581,17 +721,31 @@
         </widget>
        </item>
        <item row="0" column="1">
-        <widget class="QLineEdit" name="spseTimeLineEdit"/>
+        <widget class="QLineEdit" name="tSPSETimeLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
+         </property>
+        </widget>
        </item>
        <item row="0" column="2">
-        <widget class="QLabel" name="nightLabel">
+        <widget class="QLabel" name="picTimeLabel">
          <property name="text">
-          <string>Night</string>
+          <string>PIC</string>
          </property>
         </widget>
        </item>
-       <item row="0" column="4">
-        <widget class="QLineEdit" name="nightTimeLineEdit"/>
+       <item row="0" column="3">
+        <widget class="QLineEdit" name="tPICTimeLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
+         </property>
+        </widget>
        </item>
        <item row="1" column="0">
         <widget class="QLabel" name="spmeLabel">
@@ -601,17 +755,31 @@
         </widget>
        </item>
        <item row="1" column="1">
-        <widget class="QLineEdit" name="spmeTimeLineEdit"/>
+        <widget class="QLineEdit" name="tSPMETimeLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
+         </property>
+        </widget>
        </item>
        <item row="1" column="2">
-        <widget class="QLabel" name="xcLabel">
+        <widget class="QLabel" name="picTimeLabel_2">
          <property name="text">
-          <string>XC</string>
+          <string>PICus</string>
          </property>
         </widget>
        </item>
-       <item row="1" column="4">
-        <widget class="QLineEdit" name="xcTimeLineEdit"/>
+       <item row="1" column="3">
+        <widget class="QLineEdit" name="tPICUSTimeLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
+         </property>
+        </widget>
        </item>
        <item row="2" column="0">
         <widget class="QLabel" name="mpLabel">
@@ -621,82 +789,100 @@
         </widget>
        </item>
        <item row="2" column="1">
-        <widget class="QLineEdit" name="mpTimeLineEdit"/>
+        <widget class="QLineEdit" name="tMPTimeLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
+         </property>
+        </widget>
        </item>
        <item row="2" column="2">
-        <widget class="QLabel" name="picTimeLabel">
+        <widget class="QLabel" name="coPilotTimeLabel">
          <property name="text">
-          <string>PIC</string>
+          <string>Co-Pilot</string>
          </property>
         </widget>
        </item>
-       <item row="2" column="4" rowspan="2">
-        <widget class="QLineEdit" name="picTimeLineEdit"/>
+       <item row="2" column="3">
+        <widget class="QLineEdit" name="tSICTimeLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
+         </property>
+        </widget>
        </item>
-       <item row="3" column="0" rowspan="2">
-        <widget class="QLabel" name="totalTimeLabel">
+       <item row="3" column="0">
+        <widget class="QLabel" name="ifrLabel">
          <property name="text">
-          <string>TOTAL</string>
+          <string>IFR</string>
          </property>
         </widget>
        </item>
-       <item row="3" column="1" rowspan="2">
-        <widget class="QLineEdit" name="totalTimeLineEdit">
-         <property name="focusPolicy">
-          <enum>Qt::NoFocus</enum>
+       <item row="3" column="1">
+        <widget class="QLineEdit" name="tIFRTimeLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
          </property>
         </widget>
        </item>
-       <item row="4" column="2" colspan="2">
-        <widget class="QLabel" name="coPilotTimeLabel">
+       <item row="3" column="2">
+        <widget class="QLabel" name="dualTimeLabel">
          <property name="text">
-          <string>Co-Pilot</string>
+          <string>Dual</string>
          </property>
         </widget>
        </item>
-       <item row="4" column="4" rowspan="2">
-        <widget class="QLineEdit" name="copTimeLineEdit"/>
-       </item>
-       <item row="5" column="0" rowspan="2">
-        <widget class="QLabel" name="ifrLabel">
-         <property name="text">
-          <string>IFR</string>
+       <item row="3" column="3">
+        <widget class="QLineEdit" name="tDualTimeLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
          </property>
         </widget>
        </item>
-       <item row="5" column="1" rowspan="2">
-        <widget class="QLineEdit" name="ifrTimeLineEdit"/>
-       </item>
-       <item row="6" column="2">
-        <widget class="QLabel" name="dualTimeLabel">
+       <item row="4" column="0">
+        <widget class="QLabel" name="nightLabel">
          <property name="text">
-          <string>Dual</string>
+          <string>Night</string>
          </property>
         </widget>
        </item>
-       <item row="6" column="4" rowspan="2">
-        <widget class="QLineEdit" name="dualTimeLineEdit"/>
+       <item row="4" column="1">
+        <widget class="QLineEdit" name="tNIGHTTimeLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
+         </property>
+        </widget>
        </item>
-       <item row="8" column="2">
+       <item row="4" column="2">
         <widget class="QLabel" name="fiTimeLabel">
          <property name="text">
           <string>FI</string>
          </property>
         </widget>
        </item>
-       <item row="8" column="4">
-        <widget class="QLineEdit" name="fiTimeLineEdit"/>
-       </item>
-       <item row="9" column="2">
-        <widget class="QLabel" name="simTimeLabel">
-         <property name="text">
-          <string>SIM</string>
+       <item row="4" column="3">
+        <widget class="QLineEdit" name="tFITimeLineEdit">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>20</height>
+          </size>
          </property>
         </widget>
        </item>
-       <item row="9" column="3" colspan="2">
-        <widget class="QLineEdit" name="simTimeLineEdit"/>
-       </item>
       </layout>
      </widget>
     </widget>
@@ -704,30 +890,24 @@
   </layout>
  </widget>
  <tabstops>
-  <tabstop>newDeptLocLineEdit</tabstop>
-  <tabstop>newDeptTimeLineEdit</tabstop>
-  <tabstop>newDestLocLineEdit</tabstop>
-  <tabstop>newDestTimeLineEdit</tabstop>
-  <tabstop>newAcft</tabstop>
-  <tabstop>newPicNameLineEdit</tabstop>
+  <tabstop>deptLocLineEdit</tabstop>
+  <tabstop>tofbTimeLineEdit</tabstop>
+  <tabstop>destLocLineEdit</tabstop>
+  <tabstop>tonbTimeLineEdit</tabstop>
+  <tabstop>acftLineEdit</tabstop>
+  <tabstop>picNameLineEdit</tabstop>
   <tabstop>secondPilotNameLineEdit</tabstop>
   <tabstop>thirdPilotNameLineEdit</tabstop>
   <tabstop>FlightNumberLineEdit</tabstop>
   <tabstop>RemarksLineEdit</tabstop>
   <tabstop>setAsDefaultButton</tabstop>
   <tabstop>restoreDefaultButton</tabstop>
-  <tabstop>spseTimeLineEdit</tabstop>
-  <tabstop>spmeTimeLineEdit</tabstop>
-  <tabstop>mpTimeLineEdit</tabstop>
-  <tabstop>totalTimeLineEdit</tabstop>
-  <tabstop>ifrTimeLineEdit</tabstop>
-  <tabstop>nightTimeLineEdit</tabstop>
-  <tabstop>xcTimeLineEdit</tabstop>
-  <tabstop>picTimeLineEdit</tabstop>
-  <tabstop>copTimeLineEdit</tabstop>
-  <tabstop>dualTimeLineEdit</tabstop>
-  <tabstop>fiTimeLineEdit</tabstop>
-  <tabstop>simTimeLineEdit</tabstop>
+  <tabstop>tSPSETimeLineEdit</tabstop>
+  <tabstop>tSPMETimeLineEdit</tabstop>
+  <tabstop>tMPTimeLineEdit</tabstop>
+  <tabstop>tblkTimeLineEdit</tabstop>
+  <tabstop>tIFRTimeLineEdit</tabstop>
+  <tabstop>tNIGHTTimeLineEdit</tabstop>
   <tabstop>destTZ</tabstop>
   <tabstop>verifyButton</tabstop>
   <tabstop>verifyEdit</tabstop>

+ 1 - 1
src/gui/widgets/homewidget.cpp

@@ -38,7 +38,7 @@ HomeWidget::~HomeWidget()
 
 void HomeWidget::on_pushButton_clicked()
 {
-    NewFlight nf(this);
+    NewFlight nf(this, Flight(10));
     nf.exec();
 }