Changeset 57608e for src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp
- Timestamp:
- Dec 19, 2025, 10:33:07 PM (13 days ago)
- Branches:
- Candidate_v1.7.1, stable
- Children:
- 37d1c3
- Parents:
- 4e124d
- git-author:
- Frederik Heber <frederik.heber@…> (11/06/25 21:05:00)
- git-committer:
- Frederik Heber <frederik.heber@…> (12/19/25 22:33:07)
- File:
-
- 1 edited
-
src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp
r4e124d r57608e 71 71 Observer("GLWorldView"), 72 72 worldscene(NULL), 73 changesPresent(false), 74 needsRedraw(false) 73 changesPresent(false) 75 74 { 76 75 worldscene = new GLWorldScene(_board, this); … … 91 90 connect(this, SIGNAL(ShapeAdded(const std::string &)), worldscene, SLOT(addShape(const std::string &))); 92 91 connect(this, SIGNAL(ShapeRemoved(const std::string &)), worldscene, SLOT(removeShape(const std::string &))); 93 // connect(this, SIGNAL(TimeChanged()), worldscene, SIGNAL(updated()));94 connect(worldscene, SIGNAL(changeOccured()), this, SLOT(changeSignalled()));95 connect(this, SIGNAL(changed()), this, SLOT(changeSignalled()));96 92 connect(worldscene, SIGNAL(hoverChanged(const atomId_t)), this, SLOT(sceneHoverSignalled(const atomId_t))); 97 93 connect(worldscene, SIGNAL(hoverChanged(const moleculeId_t, int)), this, SLOT(sceneHoverSignalled(const moleculeId_t, int))); 98 connect(worldscene, SIGNAL(hoverEnd()), this, SLOT(sceneHoverEndSignalled())); 99 //connect(this, SIGNAL(changed()), this, SLOT(updateGL())); 100 connect(worldscene, SIGNAL(changed()), this, SLOT(sceneChangeSignalled())); 94 connect(worldscene, SIGNAL(hoverEnd()), this, SLOT(triggerUpdateGL())); 95 connect(worldscene, SIGNAL(updated()), this, SLOT(triggerUpdateGL())); 96 connect(this, SIGNAL(updated()), this, SLOT(triggerUpdateGL())); 97 connect(worldscene, SIGNAL(sceneChanged()), this, SLOT(sceneChangeSignalled())); 101 98 connect(this, SIGNAL(moleculesVisibilityChanged(ObservedValue_Index_t,bool)), 102 99 worldscene, SLOT(moleculesVisibilityChanged(ObservedValue_Index_t,bool))); … … 325 322 void GLWorldView::update(Observable *publisher) 326 323 { 327 // emit changed();324 // emit updated(); 328 325 } 329 326 … … 351 348 #endif 352 349 needsRedraw = false; 353 emit changed();350 emit updated(); 354 351 emit TimeChanged(); 355 352 break; … … 386 383 } 387 384 388 void GLWorldView::checkChanges()389 {390 needsRedraw = false;391 updateGL();392 }393 394 385 void GLWorldView::changeDreiBein() 395 386 { … … 399 390 // realize 400 391 needsRedraw = true; 401 emit changed();392 emit updated(); 402 393 } 403 394 … … 417 408 // realize 418 409 needsRedraw = true; 419 emit changed();410 emit updated(); 420 411 } 421 412 … … 428 419 } 429 420 430 void GLWorldView::sceneChangeSignalled() 431 { 432 if (needsRedraw){ 433 redrawTimer->singleShot(0, this, SLOT(checkChanges())); 434 needsRedraw = true; 435 redrawTimer->start(); 436 } 421 void GLWorldView::triggerUpdateGL() 422 { 423 redrawTimer->singleShot(0, this, SLOT(updateGL())); 424 redrawTimer->start(); 437 425 } 438 426 … … 461 449 // Domain box has to be last because of its transparency. 462 450 drawDomainBox(painter); 451 } 452 453 void GLWorldView::sceneChangeSignalled() 454 { 455 boost::recursive_mutex::scoped_lock lock(changed_mutex); 456 changesPresent = true; 463 457 } 464 458 … … 504 498 } 505 499 506 void GLWorldView::changeSignalled()507 {508 boost::recursive_mutex::scoped_lock lock(changed_mutex);509 changesPresent = true;510 updateGL();511 }512 513 514 500 /** 515 501 * Set the current camera control mode. … … 565 551 setStereoType(QGLView::Hardware); 566 552 camera()->setEyeSeparation(0.0); 567 emit changed();553 emit updated(); 568 554 } 569 555 … … 572 558 setStereoType(QGLView::Hardware); 573 559 camera()->setEyeSeparation(defaultEyeSeparation); 574 emit changed();560 emit updated(); 575 561 } 576 562 … … 579 565 setStereoType(QGLView::LeftRight); 580 566 camera()->setEyeSeparation(defaultEyeSeparation); 581 emit changed();567 emit updated(); 582 568 } 583 569 … … 586 572 setStereoType(QGLView::RightLeft); 587 573 camera()->setEyeSeparation(defaultEyeSeparation); 588 emit changed();574 emit updated(); 589 575 } 590 576 … … 593 579 setStereoType(QGLView::TopBottom); 594 580 camera()->setEyeSeparation(defaultEyeSeparation); 595 emit changed();581 emit updated(); 596 582 } 597 583 … … 600 586 setStereoType(QGLView::BottomTop); 601 587 camera()->setEyeSeparation(defaultEyeSeparation); 602 emit changed();588 emit updated(); 603 589 } 604 590 … … 607 593 setStereoType(QGLView::RedCyanAnaglyph); 608 594 camera()->setEyeSeparation(defaultEyeSeparation); 609 emit changed();595 emit updated(); 610 596 } 611 597 … … 739 725 void GLWorldView::sceneHoverSignalled(const atomId_t _id) 740 726 { 741 needsRedraw = true;742 727 emit hoverChanged(_id); 743 emit changed();728 emit updated(); 744 729 } 745 730 746 731 void GLWorldView::sceneHoverSignalled(const moleculeId_t _id, int _i) 747 732 { 748 needsRedraw = true;749 733 emit hoverChanged(_id, _i); 750 emit changed(); 751 } 752 753 void GLWorldView::sceneHoverEndSignalled() 754 { 755 LOG(1, "GLWorldView::sceneHoverEndSignalled()"); 756 needsRedraw = true; 757 emit changed(); 758 } 734 emit updated(); 735 }
Note:
See TracChangeset
for help on using the changeset viewer.
