Skip to content
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

Abby branch #185

Merged
merged 21 commits into from
Apr 1, 2024
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f354bb0
Small edits to block occupancies
magistroA Mar 30, 2024
9cf2c4d
Fixing CTC to Wayside HW signals
magistroA Mar 30, 2024
7d7648a
Merge branch 'main' of https://github.com/asmithie13/ECE-1140 into Ab…
magistroA Mar 30, 2024
14e00cd
CTC occupied blocks update on tracking trains
magistroA Mar 30, 2024
198c50b
gitignore test
magistroA Mar 30, 2024
24065ab
messing with git ignore
magistroA Mar 30, 2024
fc1be88
Tentative green line occupied blocks train tracking
magistroA Mar 30, 2024
4cbfbe8
Testing on green line train tracking adjustments
magistroA Mar 30, 2024
34f062c
Added buttons for reopening blocks and releasing switches
magistroA Mar 31, 2024
bf58a04
Added resizing of CTC window and table columns
magistroA Mar 31, 2024
a081221
Renames buttons on UI
magistroA Mar 31, 2024
07f7237
Formatting of buttons for releasing things in maintenance
magistroA Mar 31, 2024
948b27d
progress on reopening blocks in maintenance mode
magistroA Mar 31, 2024
0c055b6
Abby can't spell maintenance
magistroA Mar 31, 2024
2f6038b
Update train ID input, so the user has to follow the convention
magistroA Mar 31, 2024
da2d497
Release switch functionality
magistroA Mar 31, 2024
ff6319d
Beginning of being able to enter and exit maintenance mode
magistroA Mar 31, 2024
d717968
Merge branch 'main' of https://github.com/asmithie13/ECE-1140 into Ab…
magistroA Apr 1, 2024
5cb78e9
Progress on exiting maintenance mode and warning user that blocks/swi…
magistroA Apr 1, 2024
f9f21a2
Choosing to exit maintence mode with blocks closed or switches set no…
magistroA Apr 1, 2024
bea7b29
Small typo with switch/block maintenance tables
magistroA Apr 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added resizing of CTC window and table columns
  • Loading branch information
magistroA committed Mar 31, 2024
commit bf58a04ede67aca45714b6705ac2c26b907b554f
9 changes: 8 additions & 1 deletion CTC/CTC_UI.py
Original file line number Diff line number Diff line change
@@ -66,6 +66,8 @@ def __init__(self):
#Initializing Schedule
self.trainSchedule = Schedule()
self.ScheduleTable.setModel(ScheduleTableModel(self.trainSchedule.Scheduledata))
ScheduleHeader = self.ScheduleTable.horizontalHeader()
ScheduleHeader.setSectionResizeMode(QHeaderView.ResizeToContents)

#Initializing Manual Mode Functions before Manual Mode has been selected
self.TrainNameField.clear()
@@ -105,7 +107,12 @@ def __init__(self):
#Initializing Maintance Tables
self.Maintence = CTC_Maintenance()
self.BlockClosureTable.setModel(ClosedBlocksTableModel(self.Maintence.BlocksClosed))
BCHeader = self.BlockClosureTable.horizontalHeader()
BCHeader.setSectionResizeMode(QHeaderView.ResizeToContents)

self.SwitchPositionTable.setModel(SwitchPositionTableModel(self.Maintence.BlocksClosed))
SPHeader = self.SwitchPositionTable.horizontalHeader()
SPHeader.setSectionResizeMode(QHeaderView.ResizeToContents)

#Initializing Throughput
self.ThroughputGraph = Throughput()
@@ -383,7 +390,7 @@ def updateOccupiedBlocks(self, arr):
#update the current variable to be the newly calculated ones
self.occupiedBlocks.currentTrains = self.occupiedBlocks.newTrains
self.occupiedBlocks.BlockDataCurrent = self.occupiedBlocks.BlockDataNew

self.OccupiedBlockTable.setModel(BlocksTableModel(self.occupiedBlocks.BlockDataCurrent))


1 change: 1 addition & 0 deletions Main_UI.py
Original file line number Diff line number Diff line change
@@ -39,6 +39,7 @@ def __init__(self):

#CTC UI Window
self.CTCwindow = CTC_UI()
self.CTCwindow.resize(800, 600) #width, height
self.CTC_tb = CTC_Testbench()
self.CTC_Button.clicked.connect(self.open_CTC_UI)