TempFanControl im Skin erstellen

Aus Gemini-Wiki
Wechseln zu: Navigation, Suche
Baustelle.png An diesem Artikel wird derzeit gearbeitet. Achtung: Der Artikel kann unvollständig und fehlerhaft sein!


Inhaltsverzeichnis

Einleitung

Der Screen name="TempFanControl" ist wie folgt zu finden:

  • Menü -> Einstellungen -> System -> "Temperatur- und Lüfter-Regelung"


TempFanControl im Defaultskin

Im OE 2.0 Default-HD skin ist dieser Abschnitt nicht geskinnt, und es wird daher der Defaultscreen direkt aus dem Plugin dargestellt:

		<screen position="center,center" size="570,420" title="Fan Control" >
			<ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />
			<ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" />
			<ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" />
			<ePixmap pixmap="skin_default/buttons/blue.png" position="420,0" size="140,40" alphatest="on" />
			<widget source="red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
			<widget source="green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
			<widget source="yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />
			<widget source="blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1" />
 
			<widget name="config" position="10,50" size="550,120" scrollbarMode="showOnDemand" />
 
			<widget source="SensorTempText0" render="Label" position="10,150" zPosition="1" size="90,40" font="Regular;20" halign="left" valign="top" backgroundColor="#9f1313" transparent="1" />
			<widget source="SensorTemp0" render="Label" position="100,150" zPosition="1" size="100,20" font="Regular;19" halign="right">
				<convert type="SensorToText"></convert>
			</widget>
			<widget source="SensorTempText1" render="Label" position="10,170" zPosition="1" size="90,40" font="Regular;20" halign="left" valign="top" backgroundColor="#9f1313" transparent="1" />
			<widget source="SensorTemp1" render="Label" position="100,170" zPosition="1" size="100,20" font="Regular;19" halign="right">
				<convert type="SensorToText"></convert>
			</widget>
			<widget source="SensorTempText2" render="Label" position="10,190" zPosition="1" size="90,40" font="Regular;20" halign="left" valign="top" backgroundColor="#9f1313" transparent="1" />
			<widget source="SensorTemp2" render="Label" position="100,190" zPosition="1" size="100,20" font="Regular;19" halign="right">
				<convert type="SensorToText"></convert>
			</widget>
			<widget source="SensorTempText3" render="Label" position="10,210" zPosition="1" size="90,40" font="Regular;20" halign="left" valign="top" backgroundColor="#9f1313" transparent="1" />
			<widget source="SensorTemp3" render="Label" position="100,210" zPosition="1" size="100,20" font="Regular;19" halign="right">
				<convert type="SensorToText"></convert>
			</widget>
			<widget source="SensorTempText4" render="Label" position="10,230" zPosition="1" size="90,40" font="Regular;20" halign="left" valign="top" backgroundColor="#9f1313" transparent="1" />
			<widget source="SensorTemp4" render="Label" position="100,230" zPosition="1" size="100,20" font="Regular;19" halign="right">
				<convert type="SensorToText"></convert>
			</widget>
			<widget source="SensorTempText5" render="Label" position="10,250" zPosition="1" size="90,40" font="Regular;20" halign="left" valign="top" backgroundColor="#9f1313" transparent="1" />
			<widget source="SensorTemp5" render="Label" position="100,250" zPosition="1" size="100,20" font="Regular;19" halign="right">
				<convert type="SensorToText"></convert>
			</widget>
			<widget source="SensorTempText6" render="Label" position="10,270" zPosition="1" size="90,40" font="Regular;20" halign="left" valign="top" backgroundColor="#9f1313" transparent="1" />
			<widget source="SensorTemp6" render="Label" position="100,270" zPosition="1" size="100,20" font="Regular;19" halign="right">
				<convert type="SensorToText"></convert>
			</widget>
			<widget source="SensorTempText7" render="Label" position="10,290" zPosition="1" size="90,40" font="Regular;20" halign="left" valign="top" backgroundColor="#9f1313" transparent="1" />
			<widget source="SensorTemp7" render="Label" position="100,290" zPosition="1" size="100,20" font="Regular;19" halign="right">
				<convert type="SensorToText"></convert>
			</widget>
 
			<widget source="SensorFanText0" render="Label" position="290,150" zPosition="1" size="90,40" font="Regular;20" halign="left" valign="top" backgroundColor="#9f1313" transparent="1" />
			<widget source="SensorFan0" render="Label" position="380,150" zPosition="1" size="150,20" font="Regular;19" halign="right">
				<convert type="SensorToText"></convert>
			</widget>
			<widget source="SensorFanText1" render="Label" position="290,170" zPosition="1" size="90,40" font="Regular;20" halign="left" valign="top" backgroundColor="#9f1313" transparent="1" />
			<widget source="SensorFan1" render="Label" position="380,170" zPosition="1" size="150,20" font="Regular;19" halign="right">
				<convert type="SensorToText"></convert>
			</widget>
			<widget source="SensorFanText2" render="Label" position="290,190" zPosition="1" size="90,40" font="Regular;20" halign="left" valign="top" backgroundColor="#9f1313" transparent="1" />
			<widget source="SensorFan2" render="Label" position="380,190" zPosition="1" size="150,20" font="Regular;19" halign="right">
				<convert type="SensorToText"></convert>
			</widget>
			<widget source="SensorFanText3" render="Label" position="290,210" zPosition="1" size="90,40" font="Regular;20" halign="left" valign="top" backgroundColor="#9f1313" transparent="1" />
			<widget source="SensorFan3" render="Label" position="380,210" zPosition="1" size="150,20" font="Regular;19" halign="right">
				<convert type="SensorToText"></convert>
			</widget>
			<widget source="SensorFanText4" render="Label" position="290,230" zPosition="1" size="90,40" font="Regular;20" halign="left" valign="top" backgroundColor="#9f1313" transparent="1" />
			<widget source="SensorFan4" render="Label" position="380,230" zPosition="1" size="150,20" font="Regular;19" halign="right">
				<convert type="SensorToText"></convert>
			</widget>
			<widget source="SensorFanText5" render="Label" position="290,250" zPosition="1" size="90,40" font="Regular;20" halign="left" valign="top" backgroundColor="#9f1313" transparent="1" />
			<widget source="SensorFan5" render="Label" position="380,250" zPosition="1" size="150,20" font="Regular;19" halign="right">
				<convert type="SensorToText"></convert>
			</widget>
			<widget source="SensorFanText6" render="Label" position="290,270" zPosition="1" size="90,40" font="Regular;20" halign="left" valign="top" backgroundColor="#9f1313" transparent="1" />
			<widget source="SensorFan6" render="Label" position="380,270" zPosition="1" size="150,20" font="Regular;19" halign="right">
				<convert type="SensorToText"></convert>
			</widget>
			<widget source="SensorFanText7" render="Label" position="290,290" zPosition="1" size="90,40" font="Regular;20" halign="left" valign="top" backgroundColor="#9f1313" transparent="1" />
			<widget source="SensorFan7" render="Label" position="380,290" zPosition="1" size="150,20" font="Regular;19" halign="right">
				<convert type="SensorToText"></convert>
			</widget>
		</screen>
Ambox notice.png Der Defaultscreen wird aus der usr/lib/enigma2/phyton/Plugins/SystemPlugins/TempFanControl/plugin.py gelesen


TempFanControl im BlueDreamHD

Hier die Variante ich ich für den BlueDreamHD ausgearbeitet habe.

	<!-- TempFanControl -->
	<screen name="TempFanControl" position="center,110" size="750,600" title="Fan Control" flags="wfNoBorder">
 
		<!-- Background -->
		<ePixmap position="0,0" size="750,600" zPosition="-5" pixmap="BlueDreamHD/bg_750x600.png"/>
		<eLabel  position="8,46" size="735,515" zPosition="-1" backgroundColor="#200d1940"/>
 
		<!-- Title & Titelicon -->
		<eLabel text="Fan Control" position="20,6" size="710,30" zPosition="1" halign="center" font="Regular;29" backgroundColor="background" shadowColor="black" shadowOffset="-2,-2" transparent="1"/>
		<ePixmap position="700,5" size="32,32" pixmap="BlueDreamHD/menu/setup32x32.png" alphatest="blend"/>
 
		<widget name="config" position="50,80" size="650,120" scrollbarMode="showOnDemand" itemHeight="30" selectionPixmap="BlueDreamHD/selpic.png" backgroundColor="background" transparent="1" />
 
		<widget source="SensorTempText0" render="Label" position="50,230" zPosition="1" size="90,30" font="Regular;25" halign="center" transparent="1"/>
		<widget source="SensorTemp0" render="Label" position="140,230" zPosition="1" size="70,30" font="Regular;25" halign="center" transparent="1">
			<convert type="SensorToText"></convert>
		</widget>
		<widget source="SensorTempText1" render="Label" position="50,270" zPosition="1" size="90,30" font="Regular;25" halign="center" transparent="1"/>
		<widget source="SensorTemp1" render="Label" position="140,270" zPosition="1" size="70,30" font="Regular;25" halign="center" transparent="1">
			<convert type="SensorToText"></convert>
		</widget>
		<widget source="SensorTempText2" render="Label" position="50,310" zPosition="1" size="90,30" font="Regular;25" halign="center" transparent="1"/>
		<widget source="SensorTemp2" render="Label" position="140,310" zPosition="1" size="70,30" font="Regular;25" halign="center" transparent="1">
			<convert type="SensorToText"></convert>
		</widget>
		<widget source="SensorTempText3" render="Label" position="50,350" zPosition="1" size="90,30" font="Regular;25" halign="center" transparent="1"/>
		<widget source="SensorTemp3" render="Label" position="140,350" zPosition="1" size="70,30" font="Regular;25" halign="center" transparent="1">
			<convert type="SensorToText"></convert>
		</widget>
		<widget source="SensorTempText4" render="Label" position="50,390" zPosition="1" size="90,30" font="Regular;25" halign="center" transparent="1"/>
		<widget source="SensorTemp4" render="Label" position="140,390" zPosition="1" size="70,30" font="Regular;25" halign="center" transparent="1">
			<convert type="SensorToText"></convert>
		</widget>
		<widget source="SensorTempText5" render="Label" position="50,430" zPosition="1" size="90,30" font="Regular;25" halign="center" transparent="1"/>
		<widget source="SensorTemp5" render="Label" position="140,430" zPosition="1" size="70,30" font="Regular;25" halign="center" transparent="1">
			<convert type="SensorToText"></convert>
		</widget>
		<widget source="SensorTempText6" render="Label" position="50,460" zPosition="1" size="90,30" font="Regular;25" halign="center" transparent="1"/>
		<widget source="SensorTemp6" render="Label" position="140,460" zPosition="1" size="70,30" font="Regular;25" halign="center" transparent="1">
			<convert type="SensorToText"></convert>
		</widget>
		<widget source="SensorTempText7" render="Label" position="50,510" zPosition="1" size="90,30" font="Regular;25" halign="center" transparent="1"/>
		<widget source="SensorTemp7" render="Label" position="140,510" zPosition="1" size="70,30" font="Regular;25" halign="center" transparent="1">
			<convert type="SensorToText"></convert>
		</widget>
 
		<widget source="SensorFanText0" render="Label" position="290,230" zPosition="1" size="150,30" font="Regular;25" halign="center" transparent="1"/>
		<widget source="SensorFan0" render="Label" position="550,230" zPosition="1" size="150,30" font="Regular;25" halign="center" transparent="1">
			<convert type="SensorToText"></convert>
		</widget>
		<widget source="SensorFanText1" render="Label" position="290,270" zPosition="1" size="150,30" font="Regular;25" halign="center" transparent="1"/>
		<widget source="SensorFan1" render="Label" position="550,270" zPosition="1" size="150,30" font="Regular;25" halign="center" transparent="1" >
			<convert type="SensorToText"></convert>
		</widget>
		<widget source="SensorFanText2" render="Label" position="290,310" zPosition="1" size="150,30" font="Regular;25" halign="center" transparent="1"/>
		<widget source="SensorFan2" render="Label" position="550,310" zPosition="1" size="150,30" font="Regular;25" halign="center" transparent="1">
			<convert type="SensorToText"></convert>
		</widget>
		<widget source="SensorFanText3" render="Label" position="290,350" zPosition="1" size="150,30" font="Regular;25" halign="center" transparent="1"/>
		<widget source="SensorFan3" render="Label" position="550,350" zPosition="1" size="150,30" font="Regular;25" halign="center" transparent="1">
			<convert type="SensorToText"></convert>
		</widget>
		<widget source="SensorFanText4" render="Label" position="290,390" zPosition="1" size="150,30" font="Regular;25" halign="center" transparent="1"/>
		<widget source="SensorFan4" render="Label" position="550,390" zPosition="1" size="150,30" font="Regular;25" halign="center" transparent="1">
			<convert type="SensorToText"></convert>
		</widget>
		<widget source="SensorFanText5" render="Label" position="290,430" zPosition="1" size="150,30" font="Regular;25" halign="center" transparent="1"/>
		<widget source="SensorFan5" render="Label" position="550,430" zPosition="1" size="150,30" font="Regular;25" halign="center" transparent="1">
			<convert type="SensorToText"></convert>
		</widget>
		<widget source="SensorFanText6" render="Label" position="290,470" zPosition="1" size="150,30" font="Regular;25" halign="center" transparent="1"/>
		<widget source="SensorFan6" render="Label" position="550,470" zPosition="1" size="150,30" font="Regular;25" halign="center" transparent="1">
			<convert type="SensorToText"></convert>
		</widget>
		<widget source="SensorFanText7" render="Label" position="290,510" zPosition="1" size="150,30" font="Regular;25" halign="center" transparent="1"/>
		<widget source="SensorFan7" render="Label" position="550,510" zPosition="1" size="150,30" font="Regular;25" halign="center" transparent="1">
			<convert type="SensorToText"></convert>
		</widget>
 
		<!-- Buttons & Keycode -->
		<ePixmap pixmap="BlueDreamHD/buttons/red.png" position="35,567" size="25,25" alphatest="on"/>
		<ePixmap pixmap="BlueDreamHD/buttons/green.png" position="205,567" size="25,25" alphatest="on"/>
		<ePixmap pixmap="BlueDreamHD/buttons/yellow.png" position="385,567" size="25,25" alphatest="on"/>
		<ePixmap pixmap="BlueDreamHD/buttons/blue.png" position="555,567" size="25,25" alphatest="on"/>
		<widget source="red" render="Label" position="70,567" zPosition="1" size="130,25" font="Regular;23" halign="left" backgroundColor="background" transparent="1" />
		<widget source="green" render="Label" position="240,567" zPosition="1" size="130,25" font="Regular;23" halign="left" backgroundColor="background" transparent="1" />
		<widget source="yellow" render="Label" position="425,567" zPosition="1" size="130,25" font="Regular;23" halign="left" backgroundColor="background" transparent="1" />
		<widget source="blue" render="Label" position="560,567" zPosition="1" size="130,25" font="Regular;23" halign="left" backgroundColor="background" transparent="1" />
	</screen>



TempFanControl im Vergleich

TempFanControl im Skin Default-HD des OE2.0
TempFanControl im Skin BluedreamHD des OE2.0



Kurzerklärung der XML

  • Wie man hier erkennen kann wird mittels dem Aussdruck "ePixmap pixmap" ein Grafik geladen.
  • Mittels dem Ausdruck "zPosition" können wir die Grafiken auch in unterschiedlichen Ebenen über oder Untereinander gelegt darstellen lassen