[mythtv] [PATCH] Add user functions GUI

Neil Whelchel koyama at firstlight.net
Wed Apr 20 10:19:41 UTC 2005


Hello,
Here is the GUI side of the patch. This adds a page "Myth User Functions"
to the global settings menu. (To be used in conjunction with my previous
'User Functions' patch.)

-Neil Whelchel-
First Light Internet Services
760 366-0145
- We don't do Window$, that's what the janitor is for -

Bubble Memory, n.:
        A derogatory term, usually referring to a person's
intelligence.  See also "vacuum tube".
-------------- next part --------------
--- mythtv.mod/programs/mythfrontend/globalsettings.cpp	Wed Apr 13 11:57:11 2005
+++ mythtv/programs/mythfrontend/globalsettings.cpp	Tue Apr 19 20:24:48 2005
@@ -2360,6 +2360,45 @@
      };
 };
 
+static GlobalLineEdit *MythUserFunction1()
+{
+    GlobalLineEdit *be = new GlobalLineEdit("Function1");
+    be->setLabel(QObject::tr("User Function 1"));
+    be->setValue("");
+    be->setHelpText(QObject::tr("User specified function 1"));
+    return be;
+}
+
+static GlobalLineEdit *MythUserFunction2()
+{
+    GlobalLineEdit *be = new GlobalLineEdit("Function2");
+    be->setLabel(QObject::tr("User Function 2"));
+    be->setValue("");
+    be->setHelpText(QObject::tr("User specified function 2"));
+    return be;
+}
+
+class MythFunctionSettings: public VerticalConfigurationGroup,
+                        public TriggeredConfigurationGroup {
+public:
+     MythFunctionSettings():
+         VerticalConfigurationGroup(false),
+         TriggeredConfigurationGroup(false) {
+         setLabel(QObject::tr("Myth User Functions"));
+         setUseLabel(false);
+
+         Setting* function1 = MythUserFunction1();
+         addChild(function1);
+         setTrigger(function1);
+
+         Setting* function2 = MythUserFunction2();
+         addChild(function2);
+         setTrigger(function2);
+
+     };
+};
+
+
 static HostCheckBox *LCDShowTime()
 {
     HostCheckBox *gc = new HostCheckBox("LCDShowTime");
@@ -2774,6 +2813,9 @@
 
     MythFillSettings *mythfill = new MythFillSettings();
     addChild(mythfill);
+
+    MythFunctionSettings *mythfunction = new MythFunctionSettings();
+    addChild(mythfunction);
 }
 
 PlaybackSettings::PlaybackSettings()


More information about the mythtv-dev mailing list