Hi here goes:
There are 3 attachements Select a group, name a group, and a populated index.
The program is part of a study I am making on program interfaces for non-computer people. The index is for a disc storage system "discgear" which I use. I have no connection with discgear except using their products.
I have tried to extract just enough code to see where the problem is. Thanks
//--------------------------------------------------------------keypress functions
void BaseForm::slotFromKeyboard()
{
if ( functionNumber == 2 )
{
if( ui.le1.hasFocus() == true ) emit returnGroupListNumber( &ui.le1->text() );
else if( ui.le2.hasFocus() == true ) emit returnGroupListName( &ui.le2->text() );
}
}
//-------------------------------------------------------------signal/slot items
connect ( this,
SIGNAL ( returnGroupListNumber
( QString * ) ), pb2Functions,
SLOT ( slotReturnGroupListNumber
( QString * ) ) );
connect ( this,
SIGNAL ( returnGroupListName
( QString * ) ), pb2Functions,
SLOT ( slotReturnGroupListName
( QString * ) ) );
//--------------------------------------------------------------- in the pb2headerfile:
void slotReturnGroupListNumber
( QString * );
void slotReturnGroupListName
( QString * );
//---------------------------------------------------------------in the pb2cpp file: the functions themselves
void PB2
::slotReturnGroupListNumber( QString *item
) {
k = *item;
emit setEnabledItems( "n||y||n||n||n" ); // disable 1st, enable 2nd
emit setFocusItems( "n||y||n||n||n" ); // no focus on 1st, set focus on 2nd
k = "You have selected <Group> " + *item + ".\n";
k += "If the <Yellow> box is empty, enter a name for this group.\n";
k += "If there is a name in the <box> you may edit it.\n";
k += "When it is what you want press the <enter> key.";
emit setMessageBox( k );
//----------------------------------------------------------------------Second slot function items
}
void PB2
::slotReturnGroupListName( QString *item
) {
h = *item;
}
//--------------------------------------------------------------keypress functions
void BaseForm::slotFromKeyboard()
{
if ( functionNumber == 2 )
{
if( ui.le1.hasFocus() == true ) emit returnGroupListNumber( &ui.le1->text() );
else if( ui.le2.hasFocus() == true ) emit returnGroupListName( &ui.le2->text() );
}
}
//-------------------------------------------------------------signal/slot items
connect ( this, SIGNAL ( returnGroupListNumber ( QString * ) ), pb2Functions, SLOT ( slotReturnGroupListNumber ( QString * ) ) );
connect ( this, SIGNAL ( returnGroupListName( QString * ) ), pb2Functions, SLOT ( slotReturnGroupListName ( QString * ) ) );
//--------------------------------------------------------------- in the pb2headerfile:
void slotReturnGroupListNumber( QString * );
void slotReturnGroupListName ( QString * );
//---------------------------------------------------------------in the pb2cpp file: the functions themselves
void PB2::slotReturnGroupListNumber( QString *item )
{
k = *item;
emit setEnabledItems( "n||y||n||n||n" ); // disable 1st, enable 2nd
emit setFocusItems( "n||y||n||n||n" ); // no focus on 1st, set focus on 2nd
k = "You have selected <Group> " + *item + ".\n";
k += "If the <Yellow> box is empty, enter a name for this group.\n";
k += "If there is a name in the <box> you may edit it.\n";
k += "When it is what you want press the <enter> key.";
emit setMessageBox( k );
//----------------------------------------------------------------------Second slot function items
}
void PB2::slotReturnGroupListName( QString *item )
{
h = *item;
}
To copy to clipboard, switch view to plain text mode
Thanks for any help and/or comments about what I am trying to do
Bookmarks