rename button of profile dialog from OK to Close and remove Default property

This commit is contained in:
Volker Fischer 2015-01-31 10:04:59 +00:00
parent c9c1f78c3f
commit 31766ceab2

View File

@ -553,7 +553,7 @@ CMusProfDlg::CMusProfDlg ( CClient* pNCliP,
pedtCity = new QLineEdit ( this ); pedtCity = new QLineEdit ( this );
QLabel* plblSkill = new QLabel ( "Skill", this ); QLabel* plblSkill = new QLabel ( "Skill", this );
pcbxSkill = new QComboBox ( this ); pcbxSkill = new QComboBox ( this );
QPushButton* butOK = new QPushButton ( "&OK", this ); QPushButton* butClose = new QPushButton ( "&Close", this );
pMLeftSubLayout->addStretch(); pMLeftSubLayout->addStretch();
pMLeftSubLayout->addWidget ( plblAlias ); pMLeftSubLayout->addWidget ( plblAlias );
@ -574,12 +574,14 @@ CMusProfDlg::CMusProfDlg ( CClient* pNCliP,
pMainSubLayout->addLayout ( pMLeftSubLayout ); pMainSubLayout->addLayout ( pMLeftSubLayout );
pMainSubLayout->addLayout ( pMRightSubLayout ); pMainSubLayout->addLayout ( pMRightSubLayout );
pButSubLayout->addStretch(); pButSubLayout->addStretch();
pButSubLayout->addWidget ( butOK ); pButSubLayout->addWidget ( butClose );
pLayout->addLayout ( pMainSubLayout ); pLayout->addLayout ( pMainSubLayout );
pLayout->addLayout ( pButSubLayout ); pLayout->addLayout ( pButSubLayout );
// set some properties // we do not want to close button to be a default one (the mouse pointer
butOK->setDefault ( true ); // may jump to that button which we want to avoid)
butClose->setAutoDefault ( false );
butClose->setDefault ( false );
// Instrument pictures combo box ------------------------------------------- // Instrument pictures combo box -------------------------------------------
@ -681,7 +683,7 @@ CMusProfDlg::CMusProfDlg ( CClient* pNCliP,
QObject::connect ( pcbxSkill, SIGNAL ( activated ( int ) ), QObject::connect ( pcbxSkill, SIGNAL ( activated ( int ) ),
this, SLOT ( OnSkillActivated ( int ) ) ); this, SLOT ( OnSkillActivated ( int ) ) );
QObject::connect ( butOK, SIGNAL ( clicked() ), QObject::connect ( butClose, SIGNAL ( clicked() ),
this, SLOT ( accept() ) ); this, SLOT ( accept() ) );
} }