[mythtv] Re: Dialog help
Velorider
velorider at publicemail.us
Sat Dec 31 05:29:15 EST 2005
I was able to found some examples are got the dialog working.
But I have a question about focus on text fields (i.e MythRemoteLineEdit). I
have two textfields to enter username and pasword. But I can't seem to get
the focus to work right. I want to hit tab and toggle between the two fields
like the reset of the myth screens, the down and up arrow work for toggling
focus. Currently tab only insert a tab into the textfield. Any suggestions?
container = m_Theme->GetSet("config-account");
if (!container)
{
VERBOSE(VB_IMPORTANT, QString("MythFlix: Failed to get account
container."));
exit(-1);
}
UIBlackHoleType* usernameHolder =
(UIBlackHoleType*)container->GetType("username_holder");
if (usernameHolder)
{
usernameHolder->allowFocus(true);
QFont f = gContext->GetMediumFont();
m_username = new MythRemoteLineEdit(&f, this);
//m_username->setFocusPolicy(QWidget::NoFocus);
m_username->setGeometry(usernameHolder->getScreenArea());
m_username->hide();
connect(usernameHolder, SIGNAL(takingFocus()),
m_username, SLOT(setFocus()));
// connect(m_username, SIGNAL(tryingToLooseFocus(bool)),
// this, SLOT(takeFocusAwayFromEditor(bool)));
// connect(title_editor, SIGNAL(textChanged(QString)),
// this, SLOT(setTitle(QString)));
}
UIBlackHoleType* passwordHolder =
(UIBlackHoleType*)container->GetType("password_holder");
if (passwordHolder)
{
passwordHolder->allowFocus(true);
QFont f = gContext->GetMediumFont();
m_password = new MythRemoteLineEdit(&f, this);
//m_password->setFocusPolicy(QWidget::NoFocus);
m_password->setGeometry(passwordHolder->getScreenArea());
m_password->hide();
connect(passwordHolder, SIGNAL(takingFocus()),
m_password, SLOT(setFocus()));
// connect(m_password, SIGNAL(tryingToLooseFocus(bool)),
// this, SLOT(takeFocusAwayFromEditor(bool)));
// connect(title_editor, SIGNAL(textChanged(QString)),
// this, SLOT(setTitle(QString)));
}
John
On Friday 30 December 2005 04:32 pm, you wrote:
> I'm working on improving the UI for mythflix. One of the things I looking
> to do is create a popup dialog box to give the users a list of options they
> can perform on the selected movie. Very much like when you select a
> recording in "Delete Recording" a dialog box is present with a list of
> options: "Delete", "Cancel", etc.
>
> But I'm having a hard to understand how this works in myth. Can any one
> point me to some examples?
>
>
> Thanks
> John
More information about the mythtv-dev
mailing list