-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial commit Station Graph #7
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LineGraphScene: class to hold a graph and its logics StationGraphObject: represent a single station inside the railway line
LineGraphScene: class to hold a graph and its logics StationGraphObject: represent a single station inside the railway line
…imetable_GIT_master_ into new_station_graph
Implement loading full railway line.
LineGraphViewport: draws station platforms and jobs StationLabelsHeader: draws station labels on top of graph
HourPanel: shows hour labels on the left LineGraphWidget: manages the graph logic all in one class.
It's more clear and smaller classes are better
Allow setting model after creating the line edit
Now NoGraph is -1 so in a combobox it gets empty name.
Manages the graph selection and in future maybe zooming
Leftovers of conflict caused by messy commits when I started this branch
Initialize scene to nullptr
Starting from -1 allowed to have empty combobox on NoGraph but this way when setting another value you cannot go back to NoGraph which is needed to clear the graph query object for now. Without finalizing SQL statements (in future will be done automatically on timer basis) the database canno close correctly.
Always clear previous model when changing type and also clear line edit when selecting NoGraph
LineGraphScene: allow setting NoGraph
* Re-use names already fetched by scene when possible
* Paint electric platform in blue and embolden throgh tracks
Behavior is unaffected.
LineGraphScene: do not reload when requested same object unless forced.
Initial implementation. All models or part of code which modify railway layout report to MeetingSession.
Single instance member of ViewManager. Central place which listens to notifications about railway layout changes from MeetingSession and decides which graphs needs to be refreshed. It is also a central place to clear all graph before closing database. All scenes must be registered, they get automatially unregistered if destroyed.
Subclass of QAbstractScrollArea which is a bit more efficient than having a custom QWidget (formet LineGraphViewport) inside a QScrollArea. QScrollArea was already subclassed in LineGraphScrollArea to add headers (HourPanel and StationLabelsHeader). LineGraphView replaces both LineGraphViewport and LineGraphScrollArea in a single class and manages headers.
Update viewport instead of the scroll view (self) to prevent glitches on clearing graph. No need to manually paint background for now. Set background to white for a better contrast with the graph and to be closer to printed output.
LineGraphView is a subclass of QAbstractScrollArea which is a subclass of QFrame. QFrame draws a box around widget contents but we cover top and left borders with our custom headers. Move the headers away.
Do not calculate size in LineGraphView, do it in scene.
Center station labels on station platforms and leave half stationOffset on left and right borders of graph to give extra space for last station label and to separate a bit first station from HourPanel.
Listen settings for changes and update consequently.
Listen setting for changes and reload all scenes
Not working. Needs translating rect argument.
Draw visible hour lines in the background.
Now horizOffset is already included in station xPos And also half station offset on left to searate first station from HourPanel.
This reverts commit 77d1410.
…imetable_GIT_master_ into new_station_graph
New database schema diagram generated by SchemaCrawler.
Added diagram with old_* tables excluded for clarity. I.e. old_stops just mirrors stops so do not put it in diagram.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
LineGraphScene: class to hold a graph and its logics
StationGraphObject: represent a single station inside the railway line
Issue #4