// _interp->run(""); IS_FIRST_STUDY = 0;
// }
// bool found = false;
- for ( QAD_StudyFrame* studyframe = myStudyFrames.first(); studyframe; studyframe = myStudyFrames.next() ) {
- if ( studyframe == activeStudyFrame) { /* one of my study frames */
+ for ( QPtrListIterator<QAD_StudyFrame> it( myStudyFrames ); it.current(); ++it ) {
+ if ( it.current() == activeStudyFrame) { /* one of my study frames */
// found = true;
// if ( !myActiveStudyFrame || myActiveStudyFrame != activeStudyFrame ) {
myActiveStudyFrame = activeStudyFrame;
for ( QAD_StudyFrame* sf = myStudyFrames.first(); sf; sf = myStudyFrames.first() ) {
sf->disconnect();
sf->close();
- qApp->processEvents();
- qApp->processEvents();
+ // SAL2200
+ QApplication::sendPostedEvents();
removeStudyFrame(sf);
}
}
}
- for (myStudyFrames.first(); myStudyFrames.current(); myStudyFrames.next()) {
- myStudyFrames.current()->setCaption(myStudyFrames.current()->title() + appendix);
+ for ( QPtrListIterator<QAD_StudyFrame> it( myStudyFrames ); it.current(); ++it ) {
+ it.current()->setCaption(it.current()->title() + appendix);
}
}
*/
void QAD_Study::show()
{
- for (myStudyFrames.first(); myStudyFrames.current(); myStudyFrames.next()) {
- myStudyFrames.current()->show();
+ for ( QPtrListIterator<QAD_StudyFrame> it( myStudyFrames ); it.current(); ++it ) {
+ it.current()->show();
}
}
/* Update Object Browser */
updateObjBrowser( true );
- for ( QAD_StudyFrame* sf = myStudyFrames.first(); sf; sf = myStudyFrames.next() ) {
+ for ( QPtrListIterator<QAD_StudyFrame> it( myStudyFrames ); it.current(); ++it ) {
/* Update Viewer */
- sf->getRightFrame()->getViewFrame()->undo( this, sf->entry() );
+ it.current()->getRightFrame()->getViewFrame()->undo( this, it.current()->entry() );
}
updateCaptions();
updateObjBrowser( true );
/* Update Viewer */
- for ( QAD_StudyFrame* sf = myStudyFrames.first(); sf; sf = myStudyFrames.next() ) {
- sf->getRightFrame()->getViewFrame()->redo( this, sf->entry() );
+ for ( QPtrListIterator<QAD_StudyFrame> it( myStudyFrames ); it.current(); ++it ) {
+ it.current()->getRightFrame()->getViewFrame()->redo( this, it.current()->entry() );
}
updateCaptions();
*/
void QAD_Study::setMessage(const char* message)
{
- for ( QAD_StudyFrame* sf = myStudyFrames.first(); sf; sf = myStudyFrames.next() ) {
- sf->getRightFrame()->getMessage()->setMessage(message);
+ for ( QPtrListIterator<QAD_StudyFrame> it( myStudyFrames ); it.current(); ++it ) {
+ it.current()->getRightFrame()->getMessage()->setMessage(message);
}
}
QString ActiveComp = parent->getActiveComponent();
- for ( QAD_StudyFrame* sf = myStudyFrames.first(); sf; sf = myStudyFrames.next() ) {
- sf->getLeftFrame()->getObjectBrowser()->Update();
+ for ( QPtrListIterator<QAD_StudyFrame> it( myStudyFrames ); it.current(); ++it ) {
+ it.current()->getLeftFrame()->getObjectBrowser()->Update();
}
/* update selection */
*/
void QAD_Study::updateUseCaseBrowser( bool updateSelection )
{
- for ( QAD_StudyFrame* sf = myStudyFrames.first(); sf; sf = myStudyFrames.next() ) {
- sf->getLeftFrame()->getObjectBrowser()->UpdateUseCaseBrowser();
+ for ( QPtrListIterator<QAD_StudyFrame> it( myStudyFrames ); it.current(); ++it ) {
+ it.current()->getLeftFrame()->getObjectBrowser()->UpdateUseCaseBrowser();
}
/* update selection */
if ( updateSelection && (myStudyFrames.count() > 0) ) {
*/
void QAD_Study::unHighlightAll()
{
- for ( QAD_StudyFrame* sf = myStudyFrames.first(); sf; sf = myStudyFrames.next() ) {
+ for ( QPtrListIterator<QAD_StudyFrame> it( myStudyFrames ); it.current(); ++it ) {
/* Device = Viewers */
- sf->getRightFrame()->getViewFrame()->unHighlightAll();
+ it.current()->getRightFrame()->getViewFrame()->unHighlightAll();
/* Device = ObjectBrowser */
- sf->getLeftFrame()->getObjectBrowser()->unHighlightAll();
+ it.current()->getLeftFrame()->getObjectBrowser()->unHighlightAll();
}
}
// MESSAGE ( " QAD_Study::highlight : " << highlight )
int typeIO = typeIObject( IObject );
- for ( QAD_StudyFrame* sf = myStudyFrames.first(); sf; sf = myStudyFrames.next() ) {
+ for ( QPtrListIterator<QAD_StudyFrame> it( myStudyFrames ); it.current(); ++it ) {
switch ( typeIO ) {
case 1:
{
/* Device = Viewer */
- if (sf->getTypeView() >= 0 ) { /* Device = Viewers */
- sf->getRightFrame()->getViewFrame()->highlight(IObject, highlight, immediatly);
+ if (it.current()->getTypeView() >= 0 ) { /* Device = Viewers */
+ it.current()->getRightFrame()->getViewFrame()->highlight(IObject, highlight, immediatly);
}
/* Device = ObjectBrowser */
- sf->getLeftFrame()->getObjectBrowser()->highlight(IObject, highlight);
+ it.current()->getLeftFrame()->getObjectBrowser()->highlight(IObject, highlight);
break;
}
case 2:
{
/* Device = ObjectBrowser */
- sf->getLeftFrame()->getObjectBrowser()->highlight(IObject, highlight);
+ it.current()->getLeftFrame()->getObjectBrowser()->highlight(IObject, highlight);
break;
}
case 3:
{
/* Device = Viewer */
- if (sf->getTypeView() >= 0) { /* Device = Viewers */
- sf->getRightFrame()->getViewFrame()->highlight(IObject, highlight, immediatly);
+ if (it.current()->getTypeView() >= 0) { /* Device = Viewers */
+ it.current()->getRightFrame()->getViewFrame()->highlight(IObject, highlight, immediatly);
}
break;
}
{
QString ActiveComp = QAD_Application::getDesktop()->getActiveComponent();
if ( !ActiveComp.isEmpty() ) {
- sf->getLeftFrame()->getObjectBrowser()->highlight(IObject,highlight);
+ it.current()->getLeftFrame()->getObjectBrowser()->highlight(IObject,highlight);
}
break;
}
bool QAD_Study::isInViewer( const Handle(SALOME_InteractiveObject)& IObject )
{
bool found = false;
- for ( QAD_StudyFrame* sf = myStudyFrames.first(); sf; sf = myStudyFrames.next() ) {
- found = sf->getRightFrame()->getViewFrame()->isInViewer(IObject);
+ for ( QPtrListIterator<QAD_StudyFrame> it( myStudyFrames ); it.current(); ++it ) {
+ found = it.current()->getRightFrame()->getViewFrame()->isInViewer(IObject);
if ( found )
return true;
}
void QAD_Study::update3dViewers()
{
- for ( QAD_StudyFrame* sf = myStudyFrames.first(); sf; sf = myStudyFrames.next() ) {
- sf->getRightFrame()->getViewFrame()->Repaint();
+ for ( QPtrListIterator<QAD_StudyFrame> it( myStudyFrames ); it.current(); ++it ) {
+ it.current()->getRightFrame()->getViewFrame()->Repaint();
}
}