[mythtv] Next release // website stuff?

Bruce Markey bjm at lvcm.com
Tue Dec 9 20:05:40 EST 2003


Joseph A. Caputo wrote:
...
> This patch has the new behavior enabled on the 'start minute' and 
> 'duration' spinboxes in the Manual Schedule screen.

It seems to work for these spinboxes. There is some funky
behavior when crossing hour boundaries that pre-existed in
the 'start minute' box but otherwise each key works as
expected. The code doesn't look like it would cause any
other problems and I didn't find any. The only effect is
that the page up and down keys now do something =).

The patch did not apply cleanly against current CVS because
the "handled" flag changed. Attached is my modified version
for current CVS.
 
> Assuming there are no problems with this, it can be committed.  The only 
> enhancement I have planned is to extend this behavior to work with the 
> SpinBoxSetting class (SpinBoxSetting needs to expose the flag in its 
> constructor).  Maybe I'll get to this today...

That would be great. The other place that this would be a
big win would be the Post-Roll and Pre-Roll boxes which
use SpinBoxSetting. It would be a Good Thing if at least
these boxes worked this way now. Other boxes could be
considered later.

--  bjm

-------------- next part --------------
Index: libs/libmyth/mythwidgets.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmyth/mythwidgets.cpp,v
retrieving revision 1.70
diff -u -r1.70 mythwidgets.cpp
--- libs/libmyth/mythwidgets.cpp	8 Dec 2003 19:02:14 -0000	1.70
+++ libs/libmyth/mythwidgets.cpp	10 Dec 2003 00:53:56 -0000
@@ -147,8 +147,22 @@
             else if (action == "DOWN")
                 focusNextPrevChild(true);
             else if (action == "LEFT")
-                stepDown();
+            {
+                if (sstep)
+                    setValue(value() - 1);
+                else
+                    stepDown();
+            }
             else if (action == "RIGHT")
+            {
+                if (sstep)
+                   setValue(value() + 1);
+                else
+                    stepUp();
+            }
+            else if (action == "PAGEUP")
+                stepDown();
+            else if (action == "PAGEDOWN")
                 stepUp();
             else if (action == "SELECT" || action == "ESCAPE")
                 return FALSE;
Index: libs/libmyth/mythwidgets.h
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmyth/mythwidgets.h,v
retrieving revision 1.47
diff -u -r1.47 mythwidgets.h
--- libs/libmyth/mythwidgets.h	28 Nov 2003 07:11:36 -0000	1.47
+++ libs/libmyth/mythwidgets.h	10 Dec 2003 00:53:56 -0000
@@ -61,10 +61,14 @@
 {
     Q_OBJECT
   public:
-    MythSpinBox(QWidget* parent = NULL, const char* widgetName = 0):
-        QSpinBox(parent, widgetName) {};
+    MythSpinBox(QWidget* parent = NULL, const char* widgetName = 0, bool allow_single_step = false):
+        QSpinBox(parent, widgetName),
+        sstep(allow_single_step) { if (sstep) setLineStep(10); }
 
     void setHelpText(QString help) { helptext = help; }
+    
+    bool singleStep () { return sstep; }
+    void setSingleStep (bool arg = true) { sstep = arg; }
 
   signals:
     void changeHelpText(QString);
@@ -76,6 +80,7 @@
 
   private:
     QString helptext;
+    bool sstep;
 };
 
 class MythSlider: public QSlider 
Index: programs/mythfrontend/manualschedule.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythfrontend/manualschedule.cpp,v
retrieving revision 1.4
diff -u -r1.4 manualschedule.cpp
--- programs/mythfrontend/manualschedule.cpp	9 Jul 2003 07:36:49 -0000	1.4
+++ programs/mythfrontend/manualschedule.cpp	10 Dec 2003 00:53:56 -0000
@@ -144,7 +144,7 @@
     hbox->addWidget(m_starthour);
 
 
-    m_startminute = new MythSpinBox( this, "startminute" );
+    m_startminute = new MythSpinBox( this, "startminute", true );
     m_startminute->setBackgroundOrigin(WindowOrigin);
     m_startminute->setMinValue(-1);
     m_startminute->setMaxValue(60);
@@ -164,7 +164,7 @@
     label->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
     hbox->addWidget(label);
 
-    m_duration = new MythSpinBox( this, "duration" );
+    m_duration = new MythSpinBox( this, "duration", true );
     m_duration->setMinValue(1);
     m_duration->setMaxValue(300);
     m_duration->setValue(120);


More information about the mythtv-dev mailing list