Login_Ui::Login_Ui( QWidget * parent ) : QWidget( parent ) { failCount = 0; ui.setupUi( this ); connect( ui.loginButton, SIGNAL( clicked() ), this, SLOT( CheckFields() ) ); connect( ui.cancelButton, SIGNAL( clicked() ), this, SLOT( ResetFields() ) ); connect( this, SIGNAL( FailedLogin() ), this, SLOT( BadLoginAttempt() ) ); connect( ui.username, SIGNAL( returnPressed() ), this, SLOT( CheckFields() ) ); connect( ui.password, SIGNAL( returnPressed() ), this, SLOT( CheckFields() ) ); connect( this, SIGNAL( ShowScreen() ), this, SLOT( ResetFields() ) ); }
Room_Resv_Edit_Ui::Room_Resv_Edit_Ui( QWidget * parent ) : QWidget( parent ) { qDebug("Created Room_Resv_Edit_Ui."); currentResv = 0; ui.setupUi( this ); //set validators QIntValidator* validRoomNum = new QIntValidator( ui.roomNumber ); ui.roomNumber->setValidator( validRoomNum ); ResetFields(); //connectiones connect( ui.saveButton, SIGNAL( clicked() ), this, SLOT( UpdateReservation() ) ); connect( ui.cancelButton, SIGNAL( clicked() ), this, SLOT( Cancel() ) ); connect( this, SIGNAL( Completed( int ) ), this, SLOT( YieldScreen( int ) ) ); //guest and customer edit buttons connect( ui.addGuestButton, SIGNAL( clicked() ), this, SLOT( EditGuest() ) ); connect( ui.addCustomerButton, SIGNAL( clicked() ), this, SLOT( EditCustomer() ) ); //guest and customer autocomplete mechanism connect( ui.guestName, SIGNAL( editingFinished() ), this, SLOT( FixupGuest() ) ); connect( ui.customerName, SIGNAL( editingFinished() ), this, SLOT( FixupCustomer() ) ); //guest and customer name change detection /* integrated into fixup functions instead connect( ui.guestName, SIGNAL( editingFinished() ), this, SLOT( GuestNameChanged() ) ); connect( ui.customerName, SIGNAL( editingFinished() ), this, SLOT( CustomerNameChanged() ) ); */ }
//-------------------------------------------------------------------------- //-------------------------------------------------------------------------- // // Work with fields // //-------------------------------------------------------------------------- void Game::InitFields() { ResetFields(); for (int index = 0; index < NUMOFFIELDS; index++) { playFields.emplace_back(std::make_shared<Field>(index )); }// for (int i = 0; i < NUMOFDICES; i++) }// void Game::InitFields()
bool ReMasterCdWithoutUnifiedBlocks(CCdCore* cd, int Row, bool resetFields) { if (Row == 0) return true; list<CRef< CSeq_align > >& seqAlignList = cd->GetSeqAligns(); const CRef< CSeq_align >& guide = cd->GetSeqAlign(Row); BlockModelPair guideBmp(guide); int i = 1; list<CRef< CSeq_align > >::iterator lit = seqAlignList.begin(); list<CRef< CSeq_align > >::iterator guideIt; for (; lit != seqAlignList.end(); lit++) { if ( i != Row) { BlockModelPair bmp (*lit); bmp.remaster(guideBmp); *lit = bmp.toSeqAlign(); } else guideIt = lit; i++; } guideBmp.reverse(); *guideIt = guideBmp.toSeqAlign(); // if there's a master3d if (cd->IsSetMaster3d() && resetFields) { // get rid of it cd->SetMaster3d().clear(); } // if the new master has a pdb-id CRef< CSeq_id > SeqID(new CSeq_id); if (cd->GetSeqIDForRow(0, 0, SeqID)) { if (SeqID->IsPdb()) { // make it the master3d // (the ref-counter for SeqID should have been incremented in GetSeqID) cd->SetMaster3d().clear(); cd->SetMaster3d().push_back(SeqID); } } if (resetFields) { ResetFields(cd); } return remasterAlignannot(*cd, Row); }
void CPyScriptAutoConfigDlg::OnBnClickedBtnBrowse() { CFileDialog dlgFile(true,_T(".py"),_T("*.py"),0,_T("Python Script Files (*.py)|*.py||")); CString str = GetDir(m_strConverterFilespec); dlgFile.m_ofn.lpstrInitialDir = str; if (dlgFile.DoModal() != IDOK) return; // since this is a new table, reset all the relevant fields ResetFields(); m_strConverterFilespec = dlgFile.GetPathName( ); if( m_strConverterFilespec.IsEmpty() ) return; m_ctlScriptFilespec.SetWindowText(m_strConverterFilespec); // initialize the combo box of function names InitFuncNameComboBox(); m_cbFunctionNames.SetFocus(); }