Commit graph

1165 commits

Author SHA1 Message Date
Filippo Gentile
9727d68493 SplitRailwaySegmentDlg: make taller and better align buttons 2022-07-18 18:23:24 +02:00
Filippo Gentile
6bb011d96b Doxygen: fix ref not parsed well 2022-07-17 19:54:02 +02:00
Filippo Gentile
b7e1f7284a SplitRailwaySegmentDlg: allow to edit first segment, fix connections
Allow to edit both halves of original segment.
Fix segment onnections not remembered.

Pass 2 RailwaySegmentConnectionModel to RailwaySegmentSplitHelper
2022-07-17 19:53:22 +02:00
Filippo Gentile
dfc856aabe EditRailwaySegmentDlg: allow to save custom connections
Allow to pass a RailwaySegmentConnection model so if manually apply is
true, caller can store segment connections and applying them later
togheter with other changes made by user

Also document constructor and setManuallyApply()
2022-07-17 19:41:17 +02:00
Filippo Gentile
042644c00a RailwaySegmentConnectionsModel: fix default connections
The same logic was repeated 3 times but only first one was correct.
Move the duplicated connection check to insertOrReplace()
2022-07-17 19:13:15 +02:00
Filippo Gentile
0497d6442f Translations: update translations 2022-07-17 11:59:46 +02:00
Filippo Gentile
0c1d9db3bf Merge branch 'feature/german_translation' 2022-07-17 11:46:31 +02:00
Filippo Gentile
cbebaf5204 ViewManager: small optimization for StationSVGPlanDlg 2022-07-17 11:08:05 +02:00
Filippo Gentile
6a3281b4f1 EditRailwaySegmentDlg: reorder functions 2022-07-17 10:24:32 +02:00
Filippo Gentile
5608f0bc28 Merge branch 'feature/layout_split_segment' into master
Merge SplitRailwaySegmentDlg with previous implementation
2022-07-17 10:24:12 +02:00
Filippo Gentile
36bfe821f1 Add initial SplitRailwaySegmentDlg
Created new dialog to split existing railway segments
With help of RailwaySegmentSplitHelper
2022-07-16 18:58:47 +02:00
Filippo Gentile
b1f202c1cd Utils: move GateInfo and SegmentInfo out from RailwaySegmentHelper
Move it to utils:: namespace so it can be forward declared

- EditRailwaySegmentDlg: allow to manually apply changes after closing
dialog:
This is useful for reusing dialog in another dialog such as splitting
segments
2022-07-16 18:43:15 +02:00
Filippo Gentile
38e1248f60 SQLite: fix if clause in models
Affected: RollingstockSQLModel, LinesModel, StationsModel
2022-05-30 22:02:35 +02:00
Filippo Gentile
b8483827ae ViewManager: ask to create Shifts before creating Jobs
JobsHelper: check if there are no shifts
2022-03-08 23:38:38 +01:00
Filippo Gentile
2a3496f0bc Translations: update Italian translation 2022-03-08 15:42:09 +01:00
Filippo Gentile
63335f7613 StationTrackConnectionsModel: better error message 2022-03-08 15:41:55 +01:00
Filippo Gentile
7a3a34a1ac StationTrackConnectionsModel: check also for constraint trigger error 2022-03-08 15:36:54 +01:00
Filippo Gentile
816a0830d9 RSCoupleDialog: align legend in a table with 2 columns
Add "normal" state in the ledend, now they are 6

MRTPSettings: remember if legend was hidden or shown
2022-03-08 15:33:59 +01:00
Filippo Gentile
1c7d288632 StationsModel: fix typo 2022-03-08 15:32:50 +01:00
Filippo Gentile
3ef0a142ef StationsManager, StationEditDialog: show error directly 2022-03-08 15:32:34 +01:00
Filippo Gentile
783683b232 RailwaySegmentHelper: add custom error text on segment removal 2022-03-08 15:31:57 +01:00
Filippo Gentile
573dfac662 RsPlanModel: mark cells with errors 2022-03-08 13:23:12 +01:00
Filippo Gentile
82c154fca2 StationsManager: ask confirmation before deleting items 2022-03-08 12:17:31 +01:00
Filippo Gentile
d185c0016e Models: check also for SQLITE_CONSTRAINT_FOREIGNKEY error 2022-03-08 12:17:00 +01:00
Filippo Gentile
48d7180cd5 ShiftsModel: better shift creation, better error reporting 2022-03-08 12:10:04 +01:00
Filippo Gentile
d3d6e099b6 MeetingSession: fix database table creation
Add note on SQLite extended error codes
Explicitly set Foreign Key ON DELETE RESTRICT for jobs.shift_id
2022-03-08 12:08:00 +01:00
Filippo Gentile
4c25de9133 RSOwnersSQLModel: better error message for failing removal 2022-03-08 11:42:46 +01:00
Filippo Gentile
f1fc42dd9b ShiftManager: ask name on shift creation, show errors to user 2022-03-08 11:42:02 +01:00
Filippo Gentile
1816b6292c RollingStockManager: show model errors to user 2022-03-08 11:40:55 +01:00
Filippo Gentile
c04d77d004 SQLite: use sqlite3_prepare_v2 to get extended_error_code()
See SQLite documentation for more info.
The old deprecated sqlite3_prepare() made sqlite3_step() always
return generic SQLITE_ERROR on fail, now we get better error codes.
2022-03-08 11:32:59 +01:00
Filippo Gentile
e536d1897f RSImportWizard: fix progress page complete
When importation is done we need to tell progress page to enable
'Finish' button.
But we were using load page instead of import page so 'Finish' remained
disabled.
2022-02-13 23:41:47 +01:00
Filippo Gentile
ba97509c2b Translations: update Italian translation 2022-02-13 23:32:46 +01:00
Filippo Gentile
1aa479afcd MainWindow: fix infinite loop when closing is busy
When Database is busy on closing it migth be because some background
task is still running,
so we wait for a bit and then try to close again.
But if second closeSession() is succesful we need to stopCloseTimer()
otherwise we trigger an infinite loop.
2022-02-13 23:29:42 +01:00
Filippo Gentile
0f0aa2c94e StopEditingHelper: add tooltips for fields
Some tooltips are taken from placeholder texts
2022-02-13 23:27:45 +01:00
Filippo Gentile
80630fbb2a StopEditingHelper: fix showing out gate track on last stop
Last stop has not 'out' gate so hide gate track spinbox
2022-02-13 23:14:22 +01:00
gfgit
b48372faa7
Merge pull request #48 from gfgit/feature/detect_direction_change
Feature detect direction change

Detect train direction change on stops by comparing station track sides.
When a direction change is detected:

- draw a little U-shaped arrow near station in JobPathEditor
- In EditStopDialog tell user about it in "Additional Notes" section
- In Job (and Shift) and Station sheets prepend "Reverses direction" on stop description

In addition, show line traction type in EditStopDialog
Cache rendered SVG in pixmaps for StopDelegate
2022-02-13 23:09:59 +01:00
Filippo Gentile
e0e22c8830 Translations: update Italian translation 2022-02-13 22:53:58 +01:00
Filippo Gentile
11637625f8 JobWriter: add direction change in notes
StationWriter: do the same
Odt: add translation text for direction reverse
2022-02-13 22:53:58 +01:00
Filippo Gentile
a005f0f49e StationPlanModel: show direction change in description field 2022-02-13 22:53:47 +01:00
Filippo Gentile
1c4d27351d Icons: fix reverse_direction.svg icon join betwen arrow and path 2022-02-13 22:50:51 +01:00
Filippo Gentile
7fe4e130ea StopDelegate: cache SVG in pixmaps, draw direction change indicator 2022-02-13 22:50:51 +01:00
Filippo Gentile
50a2f94233 CMake: add reverse_direction.svg icon and install it in icon folder 2022-02-13 22:50:51 +01:00
Filippo Gentile
b533c5dfe6 EditStopDialog: remove unused variable and unused logic if 2022-02-13 22:50:51 +01:00
Filippo Gentile
3ad2ab563f StopDelegate: always put a space on left of segment name
Previously was done only for transits

- Use constant for sizeHint()
2022-02-13 22:50:51 +01:00
Filippo Gentile
681220732c EditStopDialog: add Additional Notes section
These are automatically generated (as opposed to stop description
which is manually typed by the user).

Current notes: traction type and direction changes
2022-02-13 22:50:50 +01:00
Filippo Gentile
5ccf083911 StopEditingHelper: notify when station track is changed 2022-02-13 22:50:50 +01:00
Filippo Gentile
95c1633103 StopItem: rename gate track member to avoid confusion with station track 2022-02-13 22:50:50 +01:00
Filippo Gentile
4dd467212c StopModel: store station in and out connections side
- Generally improve comments
2022-02-13 22:50:50 +01:00
Filippo Gentile
97cd886109 Style: modernize C++, remove typedef from struct and enum declarations 2022-02-12 16:46:43 +01:00
Filippo Gentile
d25897424e Clang: mismatched forward declarations struct/class 2022-02-12 16:35:24 +01:00