Compare commits

..

65 Commits

Author SHA1 Message Date
ba43c3147e Ankerseite verbessert 2025-10-27 18:23:21 +01:00
1661c81dfa Kartenservice erstellt. Erster Test in der Ankerseite 2025-10-26 18:45:49 +01:00
cd04a5560d Konfigurationsmodus für Tide begonnen 2025-10-26 09:38:50 +01:00
9ffb28d65b Tide weiterprogrammiert 2025-10-09 20:12:54 +02:00
7613a5b7cb Seite RollPitch funktionsfähig gemacht 2025-10-09 14:24:29 +02:00
f969df8cb8 Bugfixing und einige Platzhalterseiten mit Daten gefüllt 2025-10-07 11:19:08 +02:00
e7a2f4bb54 Tide: Anzeige erster Testdaten 2025-10-05 12:04:19 +02:00
e9d473fd10 Seite Tide vorbereitet für Wasserstandsvorhersagen 2025-10-05 09:54:00 +02:00
fb7c688a99 NAVTEX-Feature hinzugefügt. Daten nur über das Netzwerk 2025-10-01 06:54:56 +02:00
99dcf00242 Tippfehler in INSTALL gefixt 2025-09-27 14:59:22 +02:00
2572d156e0 Megafon-Symbol erstellt 2025-09-27 08:09:05 +02:00
de1cff974d INSTALL verbessert und Mauszeiger verschönert 2025-09-25 15:13:45 +02:00
8d75782ae8 INSTALL korrigiert, Python Versionsprüfung 2025-09-25 13:46:09 +02:00
d4ac504e08 Korrekturen in README 2025-09-25 09:47:33 +02:00
fd5b2c96b9 Audio, Erkennung Regattaende 2025-09-24 20:03:37 +02:00
adb1b4e63a Audio-Ansagen weiterprogrammiert 2025-09-23 19:35:04 +02:00
a5baea524e Audio einbauen, erste Tests. Audiodateien von Regatta Hero. 2025-09-22 19:44:58 +02:00
f6f515ea14 Tracker weiter verbessert 2025-09-22 18:35:18 +02:00
f47379b6d3 Verbesserungen für Clock-Seite, neue allgemeine display_new Methode 2025-09-22 17:05:33 +02:00
e7a96390f2 Lokaler Tracker funktionsfähig. Bugfixes. 2025-09-22 14:27:05 +02:00
f0ebdd0201 Tracker verbessert, lokales Tracking vorbereitet 2025-09-21 10:00:56 +02:00
e5646b6f27 Tracker NONE implementiert und kleine Verbesserungen 2025-09-20 09:05:45 +02:00
84a99a747e Abfragedialog J/N eingebaut. Für Rennabbruch Tracker. 2025-09-19 21:29:06 +02:00
bcbaa25cf5 Anpassung an Vollbild 800x480 auf OBP60P physischem Display 2025-09-19 20:01:53 +02:00
65335e3c91 Bugfix und Regattaauswahl verbessert 2025-09-18 19:09:12 +02:00
eab6cdf4c9 Logging und Tracker GUI weiterprogrammiert 2025-09-17 20:37:12 +02:00
d3a984075e Tracker GUI Verbesserungen 2025-09-16 21:11:20 +02:00
fc87a5959d Flaggen verbessert und ergänzt 2025-09-15 21:33:59 +02:00
9b4811a11d Tracker Regattaselektion verbessert 2025-09-15 20:16:10 +02:00
eb41bdafa4 Erste funktionsfähige Tracker-Version 2025-09-15 19:33:33 +02:00
ebb7b42d48 Seiten umbenannt entsprechend ESP32-Code 2025-09-15 08:40:51 +02:00
766b191109 Appdata für Header, Flaggensymbole laden 2025-09-15 08:30:15 +02:00
f3c9ced477 Verbessertes Zeichnen mit mehreren Drawing-Areas 2025-09-14 17:19:45 +02:00
20882feeca Flash LED programmierung 2025-09-14 09:41:53 +02:00
defe4e3c03 Flaggen für den Tracker hinzugefügt 2025-09-14 07:21:41 +02:00
5b000f4f1f NMEA0183 Empfangscode in entsprechendes Modul verlagert 2025-09-13 07:55:56 +02:00
612783454e Weiterarbeit am Tracker 2025-09-12 15:28:01 +02:00
b1d0687952 Trace-Modus für den Tracker 2025-09-12 13:19:20 +02:00
acbcfac425 Tracker in eigene Klasse und AppData eingeführt 2025-09-12 11:31:24 +02:00
fd673d5e55 Tracker-Seite und -daten vorbereitet 2025-09-12 08:13:39 +02:00
4ba75b5686 Publish für MQTT integriert 2025-09-11 15:31:50 +02:00
e738438a94 Tracker und MQTT code 2025-09-10 20:04:31 +02:00
14108b1165 Alarmdialog programmiert 2025-09-10 16:58:20 +02:00
7d8ce221fd Some buf fixes and small enhancements 2025-08-28 19:33:38 +02:00
be20826ab5 Programmierung Alarmfunktion 2025-07-22 15:37:05 +02:00
d7136e38bf Logging implementiert 2025-07-22 14:08:03 +02:00
dafcfaca6b Ankerseite: Werte über Tastatur änderbar 2025-07-22 13:12:00 +02:00
986d222a98 Anker-Konfigurationsseite, erste Versuche mit Menü 2025-07-21 19:59:40 +02:00
664d6c7d49 Ankerseite und mehr NMEA0183 code 2025-07-20 21:29:22 +02:00
5d8b33b086 Noch mehr NMEA0183 code 2025-07-19 21:41:50 +02:00
ae38d2b681 NMEA0183 weiter programmiert 2025-07-19 12:26:49 +02:00
7f0a0f280b Datenübertragung über Netzwerk vorbereitet 2025-07-19 07:44:35 +02:00
658806446e Installationsanleitung korrigiert 2025-07-18 20:21:42 +02:00
7d3a113ba3 Entfernungsberechnung für große und kleine Distanzen 2025-07-18 19:46:52 +02:00
46295f8139 Anker weiterprogrammiert 2025-07-18 15:26:40 +02:00
f7337a0c6c Weitere NMEA0183 Daten verarbeiten 2025-07-18 14:40:19 +02:00
9e4622aeef Arbeit an Ankerseite und NMEA0183 2025-07-18 09:06:19 +02:00
df04c9ad8e NMEA0183 in eigenes Modul ausgelagert 2025-07-12 07:26:32 +02:00
b1fdb592b0 Vorüberlegungen für die Anker-Seite 2025-07-11 13:16:37 +02:00
6214d08174 GPS-Code von NMEA0183 getrennt, NMEA0183 weiterprogrammiert 2025-07-05 10:12:57 +02:00
aefd01e0f9 Schnittstellenverwaltung für u.a NMEA0183 verbessert 2025-07-05 09:19:14 +02:00
b06d88d0ec Programmname "obp60v" umgesetzt. Konfigurationshandling verbessert 2025-07-05 08:05:05 +02:00
bae459c4d4 Platzhalter für zukünftige Seiten erstellt 2025-07-04 14:44:11 +02:00
8b5168a83e Seitenstil an aktuelles OBP60 angenähert 2025-07-03 15:20:23 +02:00
5c2f058888 Fensterposition merken 2025-07-03 12:47:56 +02:00
159 changed files with 4579 additions and 337 deletions

2
.gitignore vendored
View File

@@ -1,2 +1,4 @@
*~ *~
__pycache__ __pycache__
nmea2000
obp60v.conf

16
INSTALL
View File

@@ -4,7 +4,8 @@ erforderlich. Die unten angegebenen Abhängigkeiten müssen erfüllt sein.
Python muß mindestens Version 3.10 sein. Python muß mindestens Version 3.10 sein.
apt-get install python3-cairo python3-gi python3-gi-cairo gir1.2-rsvg-2.0 \ apt-get install python3-cairo python3-gi python3-gi-cairo gir1.2-rsvg-2.0 \
python3-serial python3-nmea2 python3-smbus2 python3-bme280 python3-astral python3-serial python3-nmea2 python3-smbus2 python3-bme280 python3-astral \
python3-can python3-paho-mqtt python3-setproctitle gir1.2-gtk-3.0
Zusätzlich zu diesem Programm muß auch die zugehörige NMEA2000-Bibliothek Zusätzlich zu diesem Programm muß auch die zugehörige NMEA2000-Bibliothek
für Python vorhanden sein. Diese kann momentan am besten parallel zu dem für Python vorhanden sein. Diese kann momentan am besten parallel zu dem
@@ -13,13 +14,20 @@ OBP60v-Verzeichnis installiert werden:
cd OBP60v cd OBP60v
ln -s ../nmea2000 . ln -s ../nmea2000 .
Das Programm wird über eine Konfigurationsdatei obp60.conf im gleichen Das Programm wird über eine Konfigurationsdatei obp60v.conf im gleichen
Verzeichnis wie das Hauptprogramm gesteuert. Die Konfiguration wird Verzeichnis wie das Hauptprogramm gesteuert. Die Konfiguration wird
einmalig beim Programmstart eingelesen. einmalig beim Programmstart eingelesen. Dazu kann die Vorlage kopiert
werden:
cp obp60v.conf-sample obp60v.conf
Die Schriftarten aus dem fonts-Verzeichnis müssen in /usr/local/share/fonts Die Schriftarten aus dem fonts-Verzeichnis müssen in /usr/local/share/fonts
abgelegt werden. abgelegt werden.
sudo cp -a fonts/* /usr/local/share/fonts
Meßdaten werden im Homeverzeichnis unter ~/.local/lib/obp60 gespeichert. Meßdaten werden im Homeverzeichnis unter ~/.local/lib/obp60v gespeichert.
Dies betrifft momentan Luftdruckmessungen mit dem BME280. Dies betrifft momentan Luftdruckmessungen mit dem BME280.
Das Verzeichnis wird automatisch angelegt. Das Verzeichnis wird automatisch angelegt.
Wenn das GUI-Fenster an den Ecken schwarze Stellen hat, dann ist vermutlich
kein Kompositor vorhanden. Nachinstallieren z.B.:
apt-get install xcompmgr

12
README
View File

@@ -31,14 +31,20 @@ Abhängigkeiten
- python3-heapdict - python3-heapdict
- python3-setproctitle - python3-setproctitle
Für GPS Für GPS und/oder NMEA0183
- python3-serial - python3-serial
- python3-nmea2 - python3-nmea2
Achtung: in Debian ist Version 1.15, die aktuelle Version 1.19 hat
weitere Satzarten implementiert. Allerdings ist dort auch kein AIS
vorhanden.
Für BME280 Für BME280
- python3-smbus2 - python3-smbus2
- python3-bme280 - python3-bme280
Für den Tracker
- python3-paho-mqtt
Die Konfiguration des virtuellen Geräts erfolgt über die Datei "obp60.conf". Die Konfiguration des virtuellen Geräts erfolgt über die Datei "obp60.conf".
Die Einstellungen sollten vor dem ersten Start überprüft und ggf. angepaßt Die Einstellungen sollten vor dem ersten Start überprüft und ggf. angepaßt
werden. werden.
@@ -48,7 +54,7 @@ Der Standardmodus sollte im Design möglichst nahme am Original OBP60 liegen.
Es ist ein Fenster was immer im Vordergrund liegt, sich jedoch auf dem Es ist ein Fenster was immer im Vordergrund liegt, sich jedoch auf dem
Bildschirm positionieren läßt. Bildschirm positionieren läßt.
Der Vollbildmodus ist für das Display des OBP60P gedacht und setzt eine Der Vollbildmodus ist für das Display des OBP60P gedacht und setzt eine
physische Bildschirmauflösung von 800x600 Pixeln voraus. physische Bildschirmauflösung von 800x480 Pixeln voraus.
Der Modus kann vor dem Programmstart in der Konfigurationsdatei obp60.conf Der Modus kann vor dem Programmstart in der Konfigurationsdatei obp60.conf
eingestellt werden: eingestellt werden:
[system] [system]
@@ -73,7 +79,7 @@ Folgende Wischfunktionen sind implementiert:
Routen und Wegepunkte können von OpenCPN empfangen werden. Dazu muß eine Routen und Wegepunkte können von OpenCPN empfangen werden. Dazu muß eine
passende serielle Schnittstelle für den NMEA0183-Ausgang definiert werden. passende serielle Schnittstelle für den NMEA0183-Ausgang definiert werden.
Im System kann diese in der Datei rc.local aktiviert werden: Im System kann diese in der Datei z.B. rc.local aktiviert werden:
# Create virtual serial connection # Create virtual serial connection
socat pty,rawer,echo=0,group-late=dialout,mode=0660,link=/dev/ttyV0 \ socat pty,rawer,echo=0,group-late=dialout,mode=0660,link=/dev/ttyV0 \
pty,rawer,echo=0,group-late=dialout,mode=0660,link=/dev/ttyV1 & pty,rawer,echo=0,group-late=dialout,mode=0660,link=/dev/ttyV1 &

38
TODO
View File

@@ -1,4 +1,26 @@
Aufgaben- und Planungs- und Ideenliste Aufgaben, Planungs- und Ideenliste
- Tracker
a) Regatta Hero
python3-paho-mqtt benötigt
b) lokal
c) Server
- Internationalisierung
1. EN (Standardsprache)
2. DE
3. FR
4. ES
5. IT
- Satelliten: SatelliteList verwenden und dieses auch in
nmea2000 implementieren
- Satellitenübersicht / SkyView
Kreis mit Sats
Rechtecke mit SNR (Signal/Noise)
- datareader für mehrere I²C-Sensoren. History muß entsprechend
eine Liste sein.
- Barograph - Barograph
@@ -6,8 +28,14 @@ Aufgaben- und Planungs- und Ideenliste
Kreis um Position, Liste letzter Positionen Kreis um Position, Liste letzter Positionen
Tasten: Set/Clear, Radius+, Radius- Tasten: Set/Clear, Radius+, Radius-
- Satellitenübersicht / SkyView
Kreis mit Sats
Rechtecke mit SNR (Signal/Noise)
- Sea wave recorder (siehe Steamrock) - Sea wave recorder (siehe Steamrock)
- Datenübertragung über Ethernet
Achtung: Fast Packets
- SeaSmart
NMEA2000 in NMEA0183 gekapselt
- Yacht Devices ASCII Raw Protokoll
https://www.yachtd.com/downloads/ydnr02.pdf
- Actisense?
- AIS

80
appdata.py Normal file
View File

@@ -0,0 +1,80 @@
"""
Generische Applikationsdaten
"""
import os
from web import WebInterface
from tracker import Tracker
from navtex import NAVTEX
from mapservice import MapService
class AppData():
def __init__(self, logger, cfg):
self.shutdown = False # Globaler Ausschalter
self.log = logger
if cfg['navtex']:
self.navtex = NAVTEX(logger, cfg)
else:
self.navtex = None
if cfg['tide']:
self.web = WebInterface(logger, cfg)
else:
self.web = None
self.track = Tracker(logger, cfg)
self.mapsrv = MapService(logger, cfg)
self.frontend = None
self.bv_lat = None
self.bv_lon = None
# Für u.a. Header-Indikatoren
# TODO
self.status = {
'AP': False, # Accesspoint
'WIFI': False, # Wireless Client
'TCP': False, # TCP Network
'N2K': False, # NMEA2000
'183': False, # NMEA0183
'USB': False, # USB Datenverbindung
'GPS': False, # GPS-Fix und -daten
'TRK': False # Tracker
}
def setFrontend(self, frontend):
self.frontend = frontend # Referenz zur GUI
self.bv_lat = frontend.boatdata.getRef("LAT")
self.bv_lon = frontend.boatdata.getRef("LON")
def refreshStatus(self):
self.status['AP'] = False # nicht implementiert
self.status['TCP'] = False
self.status['WIFI'] = False
for intf in os.listdir('/sys/class/net'):
statefile = os.path.join('/sys/class/net', intf, 'operstate')
wififile = os.path.join('/sys/class/net', intf, 'wireless')
if os.path.exists(statefile):
with open(statefile) as fh:
state = fh.read().strip()
if state == 'up':
if os.path.exists(wififile):
self.status['WIFI'] = True
else:
self.status['TCP'] = True
# TODO NMEA2000
# can-Interface can0 im Netzwerk. Identifikation?
# TODO NMEA0183 tty auf Konfiguration
# enabled in Konfiguration
# port muß gültige Schnittstelle sein
# TODO USB /dev/ttyUSB0?
# GPS
# Kann ein Empfänger am USB sein. Siehe Konfiguration
self.status['GPS'] = self.bv_lat and self.bv_lon and self.bv_lat.valid and self.bv_lon.valid
# Tracker
self.status['TRK'] = self.track.is_active()

BIN
audio/30sek_alerter.mp3 Normal file

Binary file not shown.

BIN
audio/30sek_alerter_en.mp3 Normal file

Binary file not shown.

BIN
audio/abbruch.mp3 Normal file

Binary file not shown.

BIN
audio/abbruch_en.mp3 Normal file

Binary file not shown.

BIN
audio/acht.mp3 Normal file

Binary file not shown.

BIN
audio/acht_en.mp3 Normal file

Binary file not shown.

BIN
audio/alive.mp3 Normal file

Binary file not shown.

BIN
audio/allgmRueck.mp3 Normal file

Binary file not shown.

BIN
audio/allgmRueck_en.mp3 Normal file

Binary file not shown.

BIN
audio/bahnVerk.mp3 Normal file

Binary file not shown.

BIN
audio/bahnVerk_en.mp3 Normal file

Binary file not shown.

BIN
audio/bahnmarke.mp3 Normal file

Binary file not shown.

BIN
audio/bahnmarke_en.mp3 Normal file

Binary file not shown.

BIN
audio/batteryLevel.mp3 Normal file

Binary file not shown.

BIN
audio/batteryLevel_en.mp3 Normal file

Binary file not shown.

BIN
audio/cellback.mp3 Normal file

Binary file not shown.

BIN
audio/cellback_en.mp3 Normal file

Binary file not shown.

BIN
audio/drei.mp3 Normal file

Binary file not shown.

BIN
audio/dreiMin.mp3 Normal file

Binary file not shown.

BIN
audio/dreiMin_en.mp3 Normal file

Binary file not shown.

BIN
audio/drei_en.mp3 Normal file

Binary file not shown.

BIN
audio/dreissig.mp3 Normal file

Binary file not shown.

BIN
audio/dreissig_en.mp3 Normal file

Binary file not shown.

BIN
audio/eineMin.mp3 Normal file

Binary file not shown.

BIN
audio/eineMin_en.mp3 Normal file

Binary file not shown.

BIN
audio/eins.mp3 Normal file

Binary file not shown.

BIN
audio/eins_en.mp3 Normal file

Binary file not shown.

BIN
audio/einzelRueck.mp3 Normal file

Binary file not shown.

BIN
audio/einzelRueck_en.mp3 Normal file

Binary file not shown.

BIN
audio/endeEineMinute.mp3 Normal file

Binary file not shown.

BIN
audio/endeEineMinute_en.mp3 Normal file

Binary file not shown.

BIN
audio/endeWettfahrt.mp3 Normal file

Binary file not shown.

BIN
audio/endeWettfahrt_en.mp3 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
audio/fuenf.mp3 Normal file

Binary file not shown.

BIN
audio/fuenfMin.mp3 Normal file

Binary file not shown.

BIN
audio/fuenfMin_en.mp3 Normal file

Binary file not shown.

BIN
audio/fuenf_en.mp3 Normal file

Binary file not shown.

BIN
audio/fuenfzehn.mp3 Normal file

Binary file not shown.

BIN
audio/fuenfzehn_en.mp3 Normal file

Binary file not shown.

BIN
audio/fuenfzig.mp3 Normal file

Binary file not shown.

BIN
audio/fuenfzig_en.mp3 Normal file

Binary file not shown.

BIN
audio/jumping.mp3 Normal file

Binary file not shown.

BIN
audio/jumping_en.mp3 Normal file

Binary file not shown.

BIN
audio/neueAnsage.mp3 Normal file

Binary file not shown.

BIN
audio/neueAnsage_en.mp3 Normal file

Binary file not shown.

BIN
audio/neun.mp3 Normal file

Binary file not shown.

BIN
audio/neun_en.mp3 Normal file

Binary file not shown.

BIN
audio/noconnection.mp3 Normal file

Binary file not shown.

BIN
audio/noconnection_en.mp3 Normal file

Binary file not shown.

BIN
audio/runde.mp3 Normal file

Binary file not shown.

BIN
audio/runde_en.mp3 Normal file

Binary file not shown.

BIN
audio/sechs.mp3 Normal file

Binary file not shown.

BIN
audio/sechs_en.mp3 Normal file

Binary file not shown.

BIN
audio/sieben.mp3 Normal file

Binary file not shown.

BIN
audio/sieben_en.mp3 Normal file

Binary file not shown.

BIN
audio/startErfolgt.mp3 Normal file

Binary file not shown.

BIN
audio/startErfolgt_en.mp3 Normal file

Binary file not shown.

BIN
audio/startVerschiebung.mp3 Normal file

Binary file not shown.

Binary file not shown.

BIN
audio/startlinie.mp3 Normal file

Binary file not shown.

BIN
audio/startlinie_en.mp3 Normal file

Binary file not shown.

BIN
audio/startnotready.mp3 Normal file

Binary file not shown.

BIN
audio/startnotready_en.mp3 Normal file

Binary file not shown.

BIN
audio/startready.mp3 Normal file

Binary file not shown.

BIN
audio/startready_en.mp3 Normal file

Binary file not shown.

BIN
audio/vier.mp3 Normal file

Binary file not shown.

BIN
audio/vierMin.mp3 Normal file

Binary file not shown.

BIN
audio/vierMin_en.mp3 Normal file

Binary file not shown.

BIN
audio/vier_en.mp3 Normal file

Binary file not shown.

BIN
audio/vierzig.mp3 Normal file

Binary file not shown.

BIN
audio/vierzig_en.mp3 Normal file

Binary file not shown.

BIN
audio/wartenAnkuend.mp3 Normal file

Binary file not shown.

BIN
audio/wartenAnkuend_en.mp3 Normal file

Binary file not shown.

BIN
audio/zehn.mp3 Normal file

Binary file not shown.

BIN
audio/zehn_en.mp3 Normal file

Binary file not shown.

BIN
audio/ziellinie.mp3 Normal file

Binary file not shown.

BIN
audio/ziellinie_en.mp3 Normal file

Binary file not shown.

BIN
audio/zwanzig.mp3 Normal file

Binary file not shown.

BIN
audio/zwanzig_en.mp3 Normal file

Binary file not shown.

BIN
audio/zwei.mp3 Normal file

Binary file not shown.

BIN
audio/zweiMin.mp3 Normal file

Binary file not shown.

BIN
audio/zweiMin_en.mp3 Normal file

Binary file not shown.

BIN
audio/zwei_en.mp3 Normal file

Binary file not shown.

98
cfgmenu.py Normal file
View File

@@ -0,0 +1,98 @@
"""
Menüsystem für Konfiguration(en)
"""
class MenuItem():
def __init__(self, valtype, label, value=None, unit=''):
validtypes = ('int', 'bool')
valtype = valtype.lower() # Groß- und Kleinschreibung lassen wir gemischt zu
if valtype not in validtypes:
raise TypeError(f"Invalid value type: '{valtype}'. Only supported: {validtypes}")
self.label = label # Anzeigetext des Menüeintrag
self.value = value # Zugeordneter Wert für diesen Eintrag
self.unit = unit
self._type = valtype
self._min = 0
self._max = 99999
self.steps = (1, 10, 100, 1000) # Sprungmöglichkeiten für +/- Tasten
self.step = 0 # index into tuple above
self.position = None # Menüposition gezählt von 0 an
def setRange(self, valmin, valmax, steps):
self.min = valmin
self.max = valmax
self.steps = steps
def setValue(self, val):
if self._type == 'int':
if val >= self._min and val <= self._max:
self.value = val
return True
elif self.type == 'bool':
self.value = val
return True
return False
class Menu():
def __init__(self, title, x, y):
self.title = title
self.items = {} # Items über Schlüssel zugreifbar
self.activeitem = -1 # Noch nichts aktiv
self._x = x
self._y = y
self._w = 100
self._h = 20
self._index = [] # Mapping zwischen Index(Position) und Schlüssel
self._iter_index = 0
def __iter__(self):
return self
def __next__(self):
if self._iter_index < len(self.items):
itm = self.items[self._index[self._iter_index]]
self._iter_index += 1
return itm
self._iter_index = 0
raise StopIteration
def addItem(self, key, label, valtype, value=None, unit=''):
if key in self.items.keys():
raise KeyError(f"Duplicate menu item key: '{key}'")
itm = MenuItem(valtype, label, value, unit)
self.items[key] = itm
self._index.append(key)
itm.position = self._index.index(key)
return itm
def setItemActive(self, key):
self.activeitem = self._index.index(key)
def getActiveItem(self):
return self.items[self._index[self.activeitem]]
def getItemByIndex(self, index):
return self.items[self._index[index]]
def getItemByKey(self, key):
return self.items[key]
def getItemCount(self):
return len(self.items)
def setItemDimension(self, w, h):
self._w = w
self._h = h
def getXY(self):
return (self._x, self._y)
def getRect(self):
return (self._x, self._y, self._w, self._h * len(self.items))
def getItemRect(self, index):
y = self._y + index * self._h
return (self._x, y, self._w, self._h)

21
graph.py Normal file
View File

@@ -0,0 +1,21 @@
"""
Generische Klasse zum Diagramme-Zeichnen
"""
class Graph():
def __init__(self):
self.title = "Title"
self.subtitle = "Subtitle"
self.title_x = "Title X"
self.title_y = "Title Y"
self.has_arrows = False
def paint(self, ctx):
"""
Output Graph to Cairo context
"""
pass
def add_series(self):
pass

BIN
images/arrow_dn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

BIN
images/arrow_up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

BIN
images/exclamation.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

BIN
images/flags/alpha.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
images/flags/answer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
images/flags/black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
images/flags/blue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
images/flags/charlie.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Some files were not shown because too many files have changed in this diff Show More