- SessionRSExport: prevent overlapping border between table cells
- StationSheetExport: fixed wrong table-row termination and prevent overlapping borders
JOBS:
- fixed categories not translated because MeetingSession constructor is called before translations are loaded
now categories are loaded on-demand instead of cached in MeetingSession constructor
- StopModel: prevent setting departure = arrival on normal stops (at least 1 minute stop)
- StopModel: fixed wrong query always using default freight platform even for passengers
- StopEditor: prevent setting departure < arrival and on normal stops at least 1 minute
- StopEditor: holding shift while changing arrival doesn't update departure, without shift deparure follows arrival (stop duration is preserved)
- JobCategory: added HIGH_SPEED catecory (HSP)
- JobCategory: FAST_REGIONAL is abbreviated RF (instead of RV) and FREIGHT is abbreviated FRG (instead of FR)
- JobEditor: warn if user tries to set jobId to an already existent number
SETTINGS:
- Changed default JobCategory colors
- Default auto inster transit to true
- Bigger SettingsDialog size
SEARCHBOX:
- fixed weird bug sometimes not showing results, turns out that when re-using task we must mReceiver again
otherwise we don't receive result (thus results are not shown to the user) and the task deletes himself
while SearchResultModel still holds a reference to it causing memory corruption and sometimes also forever hanging on held-lock when stopping all task
MAINWINDOW:
- Renamed 'Save As' action to 'Save Copy As' because when saving a copy we keep editing original file, while with 'Save As' the user would expect to edit the new file
- Added warning label that tells user to create at least 1 line in session if there aren't lines and prevents showing QGraphicsView until 1 line is created
- New managing that goes through setCentralWidgetMode() and checkLineNumber(), tooltips and action are enabled/disabled in a central place
BACKGROUND_MANAGER
- Added new subfolder backgroundmanager
- New generic class BackgroundManager which is a central place to manage tasks
- RsChackerManager: new class to manage Rs Error Checking, tied to BackgroundManager
- StopModel: removed some queries, now they are prepared only when needed
- StopModel: do not depend on StationsModel and validate platform (ex. platform 6 but station has only 5 platforms)
- Removed ShiftCombo class in favour of generic CustomCompletionLineEdit
- RSCoupleDialog: added legend box, explaining the meanings of RS colors
ROLLINGSTOCK:
- RS Import: allow custom importation like import only RS Models but no owners or viceversa. (Still to import RS you have to import also both Models and Owners)
- RS Import: custom options per Import Source (Currently ODS and TrainTimetable Session)
- ImportTask: fixed wrong suffix imported
- Duplicates: allow not to import one to avoid having to fake its name/number to only then pass and unselect
- RSImportedOwnersModel::clearDatabeseData(): removed in favour of MeetingSession equivalent function
- RSImportedRollingstockModel: format number according to RS type
- FixDuplicatesDlg: allow to go back to previous page
- RollingStockManager: removed UI file, all UI is now C++ based
- RollingStockManager: added 'Delete All Models' and 'Delete All Owners'
- RollingStockManager: allow to search for a RS and view it's plan instead of having to scroll and find it in the list
- RSJobViewer: fixed wrong owner name displayed
STATIONS:
- KmSpinBox: better focus on single sections, pressing '+' switches sections
- RailwayNodeModel: add at 1000 m (1 km) after highest km in line when adding new station
- StationsModel: prevent invalid default platform (like out of bound)
SESSION:
- rs_list.number NOT NULL, rs_models.suffix NOT NULL, rs_models.type NOT NULL, rs_models.sub_type NOT NULL
METADATA:
- Fixed memory leak, not deleting ImageMetaData::ImageBlobDevice, QPointer is weak, use std::unique_pointer
- IQuittableTask: unified base class for QThreadPool worker tasks
SEARCHBOX:
- SearchEngine: moved to ISqlFKMatchModel, and use unified CustomCompletionLineEdit
SESSION:
- removed unused 'rs_view' sql view
- 'railways' table: renamed column 'km' to 'pos_meters', now position is expressed in meters to achieve a better precision
SQL CONSOLE:
- Moved files to /sqlconsole/ sub directory and splitted in multiple files
JOBS:
- StopModel: when propagating time shift, first shift all subsequent stops by 24 hours to avoid hitting UNIQUE constraint, then manually reset one by one
- StopModel: auto uncouple RS at end of job, and move uncoupled in last stop when adding a new stop after.
- Started replacing QOds and QuaZip libs with bare libzip
- OdtDocument: use libzip instead of QuaZip
- OdtDocument: instead of creating the mimetype file in the temp directory now it's added directly to the zip archive
- SessionRSExport: export ODT sheet for session rs position at start/end
- SessionStartEndRSViewer: new window to view all RS position at start or end of session order by station/owner, managed by ViewManager
- Mainwindow: deleted unused action JobPlanner and added RsErrorsWidget action to toolbar and also SessionStartEndRSViewer
- SettingsDialog: added Sheet Export page, with header and footer settings, in future they will be session-specific
- ShiftGraph: added option to change job shift by double clicking job line and a dialog shows.
- JobPathEditor: (StopDelegate) replaced line type simbols with lightning svg icon (Electric: normal icon, Diesel lines: lightning with a diaglonal red bar), loading icon "app_path/icons/lightning.svg"
- Removed unused UI fine app/importrsdialog.ui replaced by RSImportWizard
- StationsModel: added columns DefaulPlatformFreight and DefaulPlatformPassenger, with DefaulPlatformDelegate that uses PlatformSpinBox (simple subclass)
- StopModel: when setting stop's station the platform resets to station's default platform for that job category
- TrainGraphics: removed enum Category replaced by JobCategory enum in utils headers
- MeetingSession: use new class JobCategoryName as context for translating categories
- Settings: job category colors are now accessed by index instead of one getter/setters for each category
- SettingsDialog: job category colors are now loop-based and grouped in Passenger/Non Passenger in a scroll area
- StopModel: fixed bug when deleting all job stops it didn't delete last remained segment causing errors and hiding the job in graph (it was trying to delete segment before deleting stop, failing)
- RS Error Checker: from settings now you can choose to start it when opening a file and when a job is edited
- Added common FileFormats class in 'utils/file_format_names.h' to translate file formats in file dialogs
- New Experimental RS Importer
- NSIS installer -> new registered file format *.ttt
- RS import: deleted old models and pages, created new ondemand models (data is loaded in small chunks),
it can import from ODS and in future also from other sessions,
you can filter out owners and models, assign custom names and numbers and match existing models/owners,
additionally it detects duplicates in models/owners/RS and impose user to fix them by setting a custom name
- MeetingSession: check if imported_rs_* tables are empty when opening database, if not give user chance to recover data (probably app crashed) and resume RS importation
- MeetingSession: new metadata table, now stores FormatVersion when creating a new session and checks it when opening
- JobPathEditor: prevent context menu while editing stop
- RollingstockModel: experimental use of cached iterators
- RSModelsModel: shifted RS SubType by one: Now Electric is 1 (previously zero) and Zero is Invalid
- RSCouplingInterface: warn if coupling an Electric engine in a non-electric line
- StationSheetExport: bigger font point size in P4 style for highlighted Arrival/Departure
- EditStopDialog: FIXED BUG, wrong query for selecting max train speed, was removing uncoupled rollingstock of all jobs and stops instead of considering only stops before the current one and of course only of the current job
- StopsModel, EditStopDialog: check Arrival, set minimum accepted value to previous departure plus 1 minute
- EditStopDialog: use originalArrival for getting train speed instead of UI QTimeEdit value because the latter may be changed by the user and might be after the next stop
- EditStopDialog: renamed onAccepted() slot to normal function saveDataToModel(), directly called in done() instead of connecting to slot
- StopModel: removed hack aboutToEditCoupling(), startStopEditing() now is called directly from RSCouplingInterface whit bonus thath if from EditStopDialog user opens coupling dialog but doesn't modify couplings, the JobPathEditor is not marked as edited
- StopModel: reload of stops on revertChanged() is now done internally
- StopModel: when editing arrival/departure/platform/transit/description now station is also marked for update
- StopModel: removed q_fixPlatform, more correct platform fix in setStation_intenal and just reusing q_setPlatform
- EditStopDialog: recalculate platform on station change
- StationsModel: don't allow negative numberf for platform/depot count. Ensure station has at least 1 platform (main or depot but at least 1)
- SearchEngine: more efficent, store also JobCategory instead of asking twice per row the category from JobsModel (which involves a QHash lookup)
- StationFreeRSViewer: added widget/model to view free RS at a given time in a given station
- StationFreeRSViewer: model can sort by column (but only ascending order)
- ViewManager: fix bug, didn't connect RS removed signal
- StationsModel: fixed possible memory leak, when removing line from all stations it didn't delete JobStops. (Luckily they should be already deleted by then because of FK constraint)
- StopsModel: fix BUG last station not setting rw_node in 'setStation()' (q_getRwNode query called before setting s.stationId -> now uses 'stId' function argument directly)
- StopModel: warn if Last stop is set Transit or TransitLineChange in the database
- StopModel: fix BUG if removing Last stop of job and the previous one was transit now becoming the new Last stop it also unsets the 'transit' flag
- FremoSession: if disconnecting from database returns SQLITE_BUSY (db is still used somewhere) re-prepare queries and abort closing
- FremoSession: new enum DB_Error to get spcific open/new/close db errors
- Mainwindow: show messagebox when try to close database while busy
- Main: wait 10 secs for threapool to finish before closing
- SearchEngine: new experimental Async Mode
- Rs Errors Checker: ported from raw QThread to QThreadPool
- Rs Errors: deprecated and removed RsErrorsModel in favor of RsErrorTreeModel
- Rs Errors: fixed and update translations
- Rs Errors: added check for 'Rs not uncoupled at the end of the job' also when coupling twice.
- Rs error check: added possibility to check only specific RS instead of check all of them
- JobPathEditor: moved rsToUpdate to StopModel
- JobPathEditor: when saving or discarding send rsToUpdate to ViewManager and to background error checker for specific check.
- RSJobViewer: removed call to adjustSize() in updatePlan()
- RSJobViewer: moved data to new model RsPlanModel
- RSJobViewer: do not update plan if only info (model, number, owner) changed ('updateInfo()')
- RSJobViewer: added context menu with 'Show in JobEditor' action
- RsErrorsWidget: fixed context menu coordinates (mapToGlobal() must be called from viewport)
- Added file utils/worker_event_types.h as a centralized place for custom QEvent::Type enumeration
- rs_models: added 'sub_type' column for engine type (Steam, Diesel, Electric)
- RSModelsModel: added SubType column with delegate
- ShiftGraph: removed QGraphicsSimpleText items for hour labels. Now they are drawn directly in scene 'drawBackground()', more efficent
- ShiftGraph: removed hack to manually update the view on graph option change. It's enough to call QGraphicsScene::invalidate(sceneRect) passing the whole scene rect.
- myMessageHandler: custom message handler now guard QTextStream with a QMutexLocker, seems to fix crashes in QDebug destructor
- JobPathEditor: moved stationToUpdate logic to StopModel; Now involved StationJobView are updated when saving/discarding job changes
- StationJobView: using new StationPlanModel, added possibility to show JobEditor selecting the stop.
- ShiftViewer: using new model ShiftJobModel, added possibility to show job in JobEditor.
- SearchEngine: fixed bug not resetting query results in only partial result shown
- JobPathEditor: fixed in Mainwindow that JobPathEditor was enabled when opening a file
- JobPathEditor: fixed still enabled after current job was removed
- JobPathEditor: when Job has less than 2 stops but user doesn't want to remove it we give a second chance, not closing still editing
- StopModel: auto insert transit is now faster because instead of calling 'begingInsertRows()' and 'setStation()' for each transit
we now do a single cumulative insert and then use 'setStation_intenal()' that skips dataChanged() and other stuff
- FremoSession: use database::enable_foreign_keys() instead of executing PRAGMA in openDB() and createNewDB()
- New Feature: initial experimental implementation of background checker for rollingstock
- Fix: workaround QT-BUG, QDockWidget doesn't dock anymore if closed whie floating, install event filter and re-dock it manually when closed. See mainwindow.cpp
- Mainwindow: added RS Errors dock in Top/Bottom areas, allow Job Dock to use all vertical space when RS Errors dock is docked at bottom.
- RollingstockModel: fix bug, not able to create first rollingstock
- Fix Crash on closing: JobPathEditor tried to check a shift after database was closed
- Fix JobPathEditor: if job has less than 2 stops (+ AddHere) and chooses to save changes but not to delete job now changes are committed to db
- Feature: now is possible to edit multiple things at the same time, like adding rollingstock while editing a job
- JobManager: can now create new job and delete selected job
- JobPathEditor: translate 'Line %1'
- Moved TrainGraphics::Category enum to independent JobCategory enum in utils/types.h so there is no need to include the whole traingraphics.h (removed include from fremosession.h)
- StopModel: default stop time is now category specific, if it's 0 minutes the stop is trasformed into Transit
- EditStopDialog: fixed bug not changing station if edited from there
- ViewManager: removed slot onStAdded, when a station is created it isn't in any line so no need to redraw jobs
- StationsModel: new signal 'stationNameChanged()' to separate name/short name changes from platform/depots changed, updated ViewManager, JobsModel, ShiftGraphHolder and StationLayer to use this signal instead of 'stationModified()'
- GraphManager: redraw names in StationLayer if current line is modified
- StationObj: JobStop stores stopId to avoid duplicates in shadow stops
- LinesModel: update line when station is added or removed
- LineStationsModel, StationLinesModel: update line if user changed station km
- LinesModel: stations platform now have z value of -1 so they stay below jobs and labels
- TrainGraphics, StationObj::JobStop: labels now have z value of +1 so they stay above jobs and platforms
- SQLViewer: replaced QStandardItemModel with custom SQLResultModel.
- SQLConsole: new feature, timed query execute every interval and results blink in red to notify update
- StopModel: transit are set to 0 minutes stop time, and when switching back from transit stop time becomes default for that job category but at least 1 minute
- StopModel: fixed bug trying to destroy segment before setting to NULL references to it -> Foreign Key prevented deletion.
- StopModel: fixed bug resetting otherSegment without resetting also other_rw_node -> removed query q_resetStopNextSeg in favour of setNextSeg()
- StopModel: fixed bug resetting next line may cause two separate segment adjacent of the same line because it break the loop too early.
- StopModel: fixed bug transit type was inverted on saving
- JobPathEditor: rename slot 'onViewMenu' to 'onContextMenu'
- StopEditor/StopDelegate: now transit are editable too, only arrival box is shown
- EditStopDialog: on transits disable Departure box and Edit Coupled/uncoupled RS.
- Changed data() function on many item models to return also on Qt::EditRole so when user edits a cell it's previous value is shown instead of clearing cell contents
- RSImportWizard: experimental import wizard for rollingstock, almost working
- JobSheetExport: smaller font on job_stops and wider column A of job_summary
- Fixed crash: when no line selected in graph StationLayer tried to retrive station names of a null LineObj* pointer. This prevented the creation of new files because new files have no line yet
- StationLayer: ensure stations names are update when changing line by explicitly calling update()
- LinesModel: now lines can be non-electric or electric
- LinesModel: prevent line removal only if there are jobs on that line
- JobsModel: fix job removal, must delete stops before segments not after
- DB: added UNIQUE constraint to railways table on (lineId, stationId)
- DB, StopsModel: now stops table registers also curent and next railway node to prevent user removing railway nodes (uses foreign key restrict)
- SQLite version 3.29
- JobsModel: fix foreign key preventing changing jobId -> added ON UPDATE CASCADE to stops and jobsegmets
- StationLinesModel, LineStationsModel: use query error codes to check if there is already that station in that line to avoid duplicates instead of a separate query
- TrainGraphics: fixed bug, when setting a new id old stop labels in stations weren't erased so you ended up with multiple labels
- ShiftGraph: center job name, fix job line height not constant
- Removed old RSImportDialog in favour of the new RSImportWizard
- ShiftGraph: shift name labels centered horizontally and automatically add the word Shift -> 'Shift %name%' in ShiftGraph and Shift Sheet
- Job Sheet, Station Sheet, ShiftSheet: column Binario -> Bin, to save space
- Station Sheet: arrival column in bold for Arrival row, Departure in bold for Departure row
- Removed files 'rsnumber.h' and '.cpp', now RS numbers are fixed to XXX-X
- Added new RsNumberDelegate with custom spinbox (it is enabled only for non Engines)
- Rs delgates moved to /rollingstock/manager/delegates/
- Rs Dialogs moved to /rollingstock/manager/dialogs/ (MergeOwners and MergeModels)
- Job Sheet: in last stop show asset before stop so reapeat previous row. This is because last stop should uncouple all rollingstock so asset after stop is always empty
- Removed Fremosession::getLineId and FremoSession::getLineName, use LinesModel directly (removed also query from FremoSession)
- Fixed BUG: when chosing to delete a job (because it has less than 2 stop, First + Last) it crashed because of recursion in JobPathEditor::clearJob()
- Job Graph: stations label locked on top like HourPane
- RS: added new types 'Freight Wagon' and 'Coach' instead of generic 'Wagon'. Warning: Engine type was changed from '1' to '0'
- EditStopDialog: now Passes/Crosses views have label on top.
- EditStopDialog: removed q_getLineSpeed (now LinesModel from StopsModel is used instead) and q_selectPasses
- EditStopDialog: moved passes/crosses to a custom model
- GraphManager: fixed bug, if a job was selected and user selected another job with searchbox bot jobs get selected, now only the one from searchbox is selected
- StationJobView: prevent cell editing
- StationJobView: fixed platform column was skipped on repeated Departure rows
- StationJobView: don't repeat Arrival on Departure rows
- StationJobView: reuse 'insertStop()' also for the first time a stop is inserted (removes duplicate code)
- Station Sheet ODT: fixed, it was putting '0' in description column
- Station Sheet ODT: fixed extension is now ODT instead of ODS
- Station Sheet ODT and StationJobView: fixed BUG, sort repeated rows by Departure
- Job Sheet ODT: don't duplicate Arrival/Departure on first and last stops
- RollingstockModel, RSModelsModel, RSOwnersModel: 'removeRS' and 'removeRSAtRow' now based on 'removeRS_internal' (removed duplicate code)
- RSJobViewer: fixed arrival and departure displayed in minutes (internal integer) instead of 'HH:mm'
- Removed action JobPlanner (deprecated) and added separator before View->Editor toggle
- Fixed crash: JobPathEditor read-only mode when clicking job number spinbox and then clicking out, anywhere else
- JobPathEditor in editing mode hides 'Save Job Sheet' button. It doesn't make sense while editing
- JobSheetExport and ShiftSheetExport and StationSheetExport, new API and implementation to write sheets in ODT format rather then ODS format used previously
ODT is better for formatting and table columns when there are more tables in the same page. Also better page break handling
- ShiftViewer: minimum width to 600 so user doesn't need to resize
- JobManager: minimum width to 750 and height to 300 so user doesn't need to resize