mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 15:20:02 +02:00
ang conversion enables positions without having to do refresh
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@73 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
parent
4143c648d8
commit
4e4b8b9beb
@ -139,6 +139,32 @@ void qTabActions::SetupWidgetWindow(){
|
||||
|
||||
}
|
||||
|
||||
//load positions
|
||||
if(lblName[NumPositions]->isEnabled()){
|
||||
//delete existing positions
|
||||
if (positions) delete [] positions;
|
||||
//get number of positions
|
||||
int numPos=myDet->getPositions();
|
||||
comboPos->setMaxCount(numPos);
|
||||
|
||||
//set the number of positions in the gui
|
||||
spinNumPos->setValue(numPos);
|
||||
|
||||
positions=new double[numPos];
|
||||
//load the positions
|
||||
myDet->getPositions(positions);
|
||||
|
||||
//delete the combolist and reload it
|
||||
comboPos->setEnabled(numPos);
|
||||
lblPosList->setEnabled(numPos);
|
||||
btnDelete->setEnabled(numPos);
|
||||
lblPosList->setText("List of Positions: ");
|
||||
lblPosList->setPalette(normal);
|
||||
for(int i=0;i<comboPos->count();i++) comboPos->removeItem(i);
|
||||
for(int i=0;i<numPos;i++) comboPos->insertItem(i,QString("%1").arg(positions[i]));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user