Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nexus
Manage
Activity
Members
Labels
Plan
Issues
14
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Public
PASSOFT
nexus
Commits
0ecec9ac
Commit
0ecec9ac
authored
1 year ago
by
Destiny Kuehn
Committed by
Maeva Pourpoint
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
add elided start/end times
parent
0f0c0155
No related branches found
No related tags found
1 merge request
!27
Fix to issue 34: Allow user to copy datalogger type, gain and sensor type to other stations
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nexus/StationSelectDialog.py
+22
-4
22 additions, 4 deletions
nexus/StationSelectDialog.py
with
22 additions
and
4 deletions
nexus/StationSelectDialog.py
+
22
−
4
View file @
0ecec9ac
...
@@ -8,7 +8,7 @@ Datalogger Type, Sensor Type and Gain
...
@@ -8,7 +8,7 @@ Datalogger Type, Sensor Type and Gain
import
sys
import
sys
import
os
import
os
from
PySide6.Qt
Core
import
Qt
from
PySide6.Qt
Gui
import
QFont
,
QFontMetrics
,
Qt
from
PySide6.QtWidgets
import
QApplication
,
QTableWidgetItem
,
QAbstractItemView
from
PySide6.QtWidgets
import
QApplication
,
QTableWidgetItem
,
QAbstractItemView
from
PySide6.QtUiTools
import
loadUiType
from
PySide6.QtUiTools
import
loadUiType
...
@@ -70,10 +70,28 @@ class StationSelectDialog(*load_ui('StationSelectDialog.ui')):
...
@@ -70,10 +70,28 @@ class StationSelectDialog(*load_ui('StationSelectDialog.ui')):
for
row
,
stat
in
enumerate
(
self
.
stations
):
for
row
,
stat
in
enumerate
(
self
.
stations
):
self
.
tableWidget
.
setItem
(
self
.
tableWidget
.
setItem
(
row
,
0
,
QTableWidgetItem
(
'
{:<3s}
'
.
format
(
stat
.
code
)))
row
,
0
,
QTableWidgetItem
(
'
{:<3s}
'
.
format
(
stat
.
code
)))
# full start/time
start_date
=
utc_to_str
(
stat
.
start_date
)
start_item
=
QTableWidgetItem
()
start_item
.
setToolTip
(
start_date
)
# shortened start/time
start_date
=
QFontMetrics
(
QFont
()).
elidedText
(
start_date
,
Qt
.
ElideRight
,
100
)
start_item
.
setText
(
start_date
)
self
.
tableWidget
.
setItem
(
self
.
tableWidget
.
setItem
(
row
,
1
,
QTableWidgetItem
(
utc_to_str
(
stat
.
start_date
)))
row
,
1
,
start_item
)
# full start/time
end_date
=
utc_to_str
(
stat
.
end_date
)
end_item
=
QTableWidgetItem
()
end_item
.
setToolTip
(
end_date
)
# shortened start/time
end_date
=
QFontMetrics
(
QFont
()).
elidedText
(
end_date
,
Qt
.
ElideRight
,
100
)
end_item
.
setText
(
end_date
)
self
.
tableWidget
.
setItem
(
self
.
tableWidget
.
setItem
(
row
,
2
,
QTableWidgetItem
(
utc_to_str
(
stat
.
end_date
)))
row
,
2
,
end_item
)
self
.
stat_map
[
row
]
=
stat
self
.
stat_map
[
row
]
=
stat
row
+=
1
self
.
tableWidget
.
resizeColumnsToContents
()
self
.
tableWidget
.
resizeColumnsToContents
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment