[mythtv] MythRemoteLineEdit

Robert Currey avalonforest at centurytel.net
Mon Dec 1 13:53:15 EST 2003


Ok,

First off the answer to "why do you get garbage" in MythRemoteLineEdit is
because is coded to do that ...

The problem is that MythVideo shouldn't be using MythRemoteLineEdit ... the
attached mythvideo.cvsudiff fixes that.

The problem then becomes that MythLineEdit won't give up the focus once it's
got it, so we'll emit the same signal emitted by MythRemoteLineEdit to fix
that ... see the attached libmyth.cvsudiff

It looks like mythmusic and mythdvd should also have a similar change
applied (they use a MythRemoteLineEdit for widgets that where remote codes
are probably not appropriate).

Not sure who the maintainers are, so the udiffs.

Rob

----- Original Message -----
From: "Robert Currey" <avalonforest at centurytel.net>
To: "Development of mythtv" <mythtv-dev at mythtv.org>
Sent: Sunday, November 30, 2003 3:36 PM
Subject: [mythtv] MythRemoteLineEdit


> I think I've found a problem in MythRemoteLineEdit ...
>
> In the usage by mythvideo (Setup->Videos settings->File types), enetring a
> number into the "Command" MythRemoteLineEdit results in garbage.
>
> Could a likely suspect perhaps be a "TranslateKeyPress" that shouldn't be
> happening?
>
> I'm very unfamiliar here, so if someone can help narrow down where to
look,
> I'll dig in.
>
> Rob
>
> P.S. got a "Now Showing" list into my MythTivo module (yea!).
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
-------------- next part --------------
risa:/workspace/MythTV/mythtv/libs/libmyth# cvs diff -u
cvs server: Diffing .
Index: mythwidgets.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmyth/mythwidgets.cpp,v
retrieving revision 1.68
diff -u -r1.68 mythwidgets.cpp
--- mythwidgets.cpp     28 Nov 2003 07:11:36 -0000      1.68
+++ mythwidgets.cpp     1 Dec 2003 18:41:48 -0000
@@ -262,11 +262,13 @@
             if (action == "UP")
             {
                 focusNextPrevChild(false);
+                emit tryingToLooseFocus(false);
                 handled = true;
             }
             else if (action == "DOWN")
             {
                 focusNextPrevChild(true);
+                emit tryingToLooseFocus(true);
                 handled = true;
             }
             else if (action == "SELECT" && e->text().isNull())
Index: mythwidgets.h
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmyth/mythwidgets.h,v
retrieving revision 1.47
diff -u -r1.47 mythwidgets.h
--- mythwidgets.h       28 Nov 2003 07:11:36 -0000      1.47
+++ mythwidgets.h       1 Dec 2003 18:41:49 -0000
@@ -120,6 +120,7 @@

   signals:
     void changeHelpText(QString);
+    void    tryingToLooseFocus(bool up_or_down);

   protected:
     virtual void keyPressEvent(QKeyEvent *e);
-------------- next part --------------
risa:/workspace/MythTV/mythvideo# cvs diff -u
cvs server: Diffing .
cvs server: Diffing i18n
cvs server: Diffing mythvideo
Index: mythvideo/editmetadata.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythvideo/mythvideo/editmetadata.cpp,v
retrieving revision 1.5
diff -u -r1.5 editmetadata.cpp
--- mythvideo/editmetadata.cpp  28 Nov 2003 19:00:53 -0000      1.5
+++ mythvideo/editmetadata.cpp  1 Dec 2003 18:40:15 -0000
@@ -245,7 +245,7 @@
 {
     nextPrevWidgetFocus(up_or_down);

-    MythRemoteLineEdit *which_editor = (MythRemoteLineEdit *)sender();
+    MythLineEdit *which_editor = (MythLineEdit *)sender();

     if(which_editor)
     {
@@ -330,7 +330,8 @@
     {
         title_hack->allowFocus(true);
         QFont f( "arial", 14, QFont::Bold);
-        title_editor = new MythRemoteLineEdit(&f, this);
+        title_editor = new MythLineEdit(this);
+       title_editor->setFont(f);
         title_editor->setFocusPolicy(QWidget::NoFocus);
         title_editor->setGeometry(title_hack->getScreenArea());
         connect(title_hack, SIGNAL(takingFocus()),
@@ -346,7 +347,8 @@
     {
         player_hack->allowFocus(true);
         QFont f( "arial", 14, QFont::Bold);
-        player_editor = new MythRemoteLineEdit(&f, this);
+        player_editor = new MythLineEdit(this);
+       player_editor->setFont(f);
         player_editor->setFocusPolicy(QWidget::NoFocus);
         player_editor->setGeometry(player_hack->getScreenArea());
         connect(player_hack, SIGNAL(takingFocus()),
Index: mythvideo/editmetadata.h
===================================================================
RCS file: /var/lib/mythcvs/mythvideo/mythvideo/editmetadata.h,v
retrieving revision 1.1
diff -u -r1.1 editmetadata.h
--- mythvideo/editmetadata.h    2 Sep 2003 20:09:52 -0000       1.1
+++ mythvideo/editmetadata.h    1 Dec 2003 18:40:15 -0000
@@ -62,10 +62,10 @@
     //  GUI stuff
     //

-    MythRemoteLineEdit  *title_editor;
+    MythLineEdit        *title_editor;
     UIBlackHoleType     *title_hack;

-    MythRemoteLineEdit  *player_editor;
+    MythLineEdit        *player_editor;
     UIBlackHoleType     *player_hack;

     UISelectorType      *level_select;
Index: mythvideo/fileassoc.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythvideo/mythvideo/fileassoc.cpp,v
retrieving revision 1.3
diff -u -r1.3 fileassoc.cpp
--- mythvideo/fileassoc.cpp     28 Nov 2003 19:00:53 -0000      1.3
+++ mythvideo/fileassoc.cpp     1 Dec 2003 18:40:16 -0000
@@ -446,7 +446,7 @@
     new_extension_popup->addLabel("");


-    new_extension_editor = new MythRemoteLineEdit(new_extension_popup);
+    new_extension_editor = new MythLineEdit(new_extension_popup);
     new_extension_popup->addWidget(new_extension_editor);

     new_extension_popup->addButton(tr("Create new extension"), this,
@@ -514,7 +514,8 @@
     {
         command_hack->allowFocus(true);
         QFont f( "arial", 14, QFont::Bold);
-        command_editor = new MythRemoteLineEdit(&f, this);
+        command_editor = new MythLineEdit(this);
+       command_editor->setFont(f);
         command_editor->setFocusPolicy(QWidget::NoFocus);
         command_editor->setGeometry(command_hack->getScreenArea());
         connect(command_hack, SIGNAL(takingFocus()),
Index: mythvideo/fileassoc.h
===================================================================
RCS file: /var/lib/mythcvs/mythvideo/mythvideo/fileassoc.h,v
retrieving revision 1.1
diff -u -r1.1 fileassoc.h
--- mythvideo/fileassoc.h       21 Aug 2003 07:54:37 -0000      1.1
+++ mythvideo/fileassoc.h       1 Dec 2003 18:40:16 -0000
@@ -114,7 +114,7 @@
     //  GUI stuff
     //

-    MythRemoteLineEdit  *command_editor;
+    MythLineEdit       *command_editor;
     UISelectorType      *extension_select;
     UIBlackHoleType     *command_hack;
     UICheckBoxType      *default_check;
@@ -128,7 +128,7 @@
     //

     MythPopupBox        *new_extension_popup;
-    MythRemoteLineEdit  *new_extension_editor;
+    MythLineEdit       *new_extension_editor;
 };


cvs server: Diffing mythvideo/images
cvs server: Diffing videodb
cvs server: Diffing videodb/old


More information about the mythtv-dev mailing list