mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Results: Add tables and open window.
This commit is contained in:
1 parent
b31be5ac36
commit
d499636cb6
7 files changed
+167
-4
No files matched your search
@@ -26,6 +26,14 @@ class Profile(object):
|
||||
self._profile = profile # Source profile in the study
|
||||
self._data = {} # Dict of dict {<ts>: {<key>: <value>, ...}, ...}
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return self._profile.name
|
||||
|
||||
@property
|
||||
def kp(self):
|
||||
return self._profile.kp
|
||||
|
||||
def set(self, timestamp, key, data):
|
||||
if timestamp not in self._data:
|
||||
self._data[timestamp] = {}
|
||||
@@ -54,10 +62,17 @@ class Reach(object):
|
||||
)
|
||||
)
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return self._reach.name
|
||||
|
||||
@property
|
||||
def profiles(self):
|
||||
return self._profiles.copy()
|
||||
|
||||
def profile(self, id):
|
||||
return self._profiles[id]
|
||||
|
||||
def set(self, profile_id, timestamp, key, data):
|
||||
self._profiles[profile_id].set(timestamp, key, data)
|
||||
|
||||
@@ -70,7 +85,10 @@ class River(object):
|
||||
|
||||
@property
|
||||
def reachs(self):
|
||||
return self.reachs.copy()
|
||||
return self._reachs.copy()
|
||||
|
||||
def reach(self, id):
|
||||
return self._reachs[id]
|
||||
|
||||
def add(self, reach_id):
|
||||
reachs = self._study.river.enable_edges()
|
||||
|
||||
Reference in new issue
Block a user