63 #if QT_VERSION > 0x050000
64 #include <QtConcurrent>
70 #include <OpenFlipper/widgets/snapshotDialog/SnapshotDialog.hh>
74 #include <ACG/Utils/VSToolsT.hh>
87 statusBar_->showMessage(tr(
"Stereo enabled"));
88 stereoButton_->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+
"stereo.png") );
90 statusBar_->showMessage(tr(
"Stereo disabled"));
91 stereoButton_->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+
"mono.png") );
96 for (
unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
103 QColor backCol((
int)bc[0], (
int)bc[1], (
int)bc[2], (
int)bc[3]);
104 QColor c = QColorDialog::getColor(backCol,
this);
106 if (c != backCol && c.isValid())
107 for ( uint i = 0 ; i < OpenFlipper::Options::examinerWidgets(); ++i )
109 ((
double) c.greenF()) ,
110 ((
double) c.blueF()) ,
120 QColor backCol((
int)bc[0], (
int)bc[1], (
int)bc[2], (
int)bc[3]);
121 QColor c = QColorDialog::getColor(backCol,
this);
123 if (c != backCol && c.isValid())
125 ((
double) c.greenF()) ,
126 ((
double) c.blueF()) ,
141 _state ? (*it)->slotShowWheels() : (*it)->slotHideWheels();
197 emit statusMessage(QString(tr(
"getCoordsysProjection(): Could not find coordsys node. Assuming default orthographic projection.")));
216 emit statusMessage(QString(tr(
"slotContextSwitchCoordsysProjection(): Could not find coordsys node, thus its projection mode will not be toggled.")));
219 for (
unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
238 int enabledCount = 0;
250 for ( uint i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
262 int enabledCount = 0;
274 for ( uint i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
287 int enabledCount = 0;
299 for ( uint i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
311 int enabledCount = 0;
323 for ( uint i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
335 int enabledCount = 0;
347 for ( uint i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
363 QString number = QString::number(counter);
364 while ( number.size() < 7 )
365 number =
"0" + number;
367 QString suggest = fi.baseName() +
"." + number +
".";
369 QString format=
"png";
371 if (fi.completeSuffix() ==
"ppm")
374 if (fi.completeSuffix() ==
"jpg")
379 QFileDialog dialog(
this);
380 dialog.setFileMode(QFileDialog::AnyFile);
381 dialog.setDefaultSuffix(
"png");
382 dialog.setNameFilter(tr(
"Images (*.png *.ppm *.jpg)"));
383 dialog.setFileMode(QFileDialog::AnyFile);
384 dialog.setConfirmOverwrite(
true);
385 dialog.setDirectory( fi.path() );
386 dialog.selectFile( suggest );
387 dialog.setAcceptMode(QFileDialog::AcceptSave);
388 dialog.setWindowTitle(tr(
"Save Snapshot"));
391 QString newName = dialog.selectedFiles()[0];
393 if (newName != fi.path() + OpenFlipper::Options::dirSeparator() + suggest)
403 static QString suggestSnapshotFilename(QString mostRecentPath) {
404 if (mostRecentPath.isEmpty()) {
405 mostRecentPath = QString(
"%1%2snap.0000000.png")
407 .arg(QDir::separator());
410 QFileInfo fi(mostRecentPath);
411 QString path = fi.path();
413 if (!fi.exists() && QFileInfo(path).isWritable()) {
415 std::cout <<
"suggestSnapshotFilename(): mostRecentPath feasible as "
416 "file name. Using it." << std::endl;
418 return mostRecentPath;
421 if (!QFileInfo(path).isWritable()) {
423 std::cout <<
"suggestSnapshotFilename(): Most recent path invalid. "
424 "Doesn't exist. Returning empty string." << std::endl;
426 return QString::null;
429 QString base_name = fi.completeBaseName();
430 QString suffix = fi.suffix();
432 if (suffix.isEmpty())
435 QRegExp base_name_re(
"(\\D*)(\\d+)?(.*)");
436 base_name_re.setPatternSyntax(QRegExp::RegExp2);
437 if (!base_name_re.exactMatch(base_name)) {
439 std::cout <<
"suggestSnapshotFilename(): Regexp didn't match. This "
440 "should be impossible." << std::endl;
442 return QString::null;
445 QString pre = base_name_re.cap(1),
446 num = base_name_re.cap(2),
447 post = base_name_re.cap(3);
450 std::cout << (QString(
"suggestSnapshotFilename(): Decomposition of "
451 "\"%1\": \"%2\", \"%3\", \"%4\"")
455 .arg(post)).toStdString() << std::endl;
458 if (pre.isEmpty() && num.isEmpty() && post.isEmpty()) {
462 size_t num_len = num.length();
464 int file_no = num.toInt(&num_is_int);
470 size_t sanity_counter = 0;
471 for (; sanity_counter < 100000; ++file_no, ++sanity_counter) {
472 QString suggested_file_name =
473 QString(
"%1%2%3%4%5.%6")
475 .arg(QDir::separator())
477 .arg(file_no, num_len, 10, QLatin1Char(
'0'))
481 QFileInfo suggested_fi(suggested_file_name);
482 if (!suggested_fi.exists()){
484 std::cout <<
"suggestSnapshotFilename(): Found a feasible file "
485 "name. Returning it." << std::endl;
487 return suggested_file_name;
492 std::cout <<
"suggestSnapshotFilename(): No luck incrementing file_no. "
493 "Aborting, returning empty string." << std::endl;
495 return QString::null;
505 connect(&dialog, SIGNAL(resizeApplication(
int,
int)),
this, SIGNAL(resizeApplication(
int,
int)) );
507 bool ok = dialog.exec();
510 QString newName = dialog.filename->text();
518 QPixmap pic = QPixmap::grabWindow( winId() );
520 QPainter painter (&pic);
529 (*iter)->snapshot(fillImage, (*iter)->glWidth() , (*iter)->glHeight());
531 QPoint localPos = QPoint((*iter)->pos().x(),(*iter)->pos().y());
532 QPointF pos =
glView_->mapTo(
this,localPos);
533 painter.drawImage(pos,fillImage);
540 emit resizeApplication(w,h);
546 QImage* pic =
new QImage(QPixmap::grabWindow( winId() ).toImage());
547 writeImageAsynchronously(pic, suggestSnapshotFilename(
snapshotName_));
551 bool comments_visible_only,
bool comments_targeted_only,
552 bool store_material_info,
int snapshot_width,
int snapshot_height,
553 bool snapshot_transparent,
bool hide_coord_sys,
554 int snapshot_multisampling,
bool store_view) {
556 if (snapshot_height < 0) {
559 snapshot_height =
static_cast<int>(round(
560 static_cast<double>(snapshot_width) / w * h));
564 if (store_comments) {
566 comments_visible_only,
567 comments_targeted_only).join(
"\n");
571 if (ACG::SceneGraph::Material::support_json_serialization() &&
573 store_material_info) {
575 comments_visible_only,
576 comments_targeted_only).join(
"\n");
582 case QtMultiViewLayout::SingleView:
587 snapshot_width, snapshot_height,
588 snapshot_transparent, hide_coord_sys,
589 snapshot_multisampling);
591 if (!comments.isEmpty())
592 finalImage.setText(
"Mesh Comments", comments);
593 if (!materials.isEmpty())
594 finalImage.setText(
"Mesh Materials", materials);
598 window_size = QSize(-width(), -height());
600 window_size = QSize (width(), height());
602 int splitter_size = 0;
610 finalImage.setText(
"View", view);
612 finalImage.save(file_name);
616 case QtMultiViewLayout::DoubleView:
618 int w = snapshot_height;
625 img[0], static_cast<int>(relSizeW * w),
626 snapshot_width, snapshot_transparent,
629 img[1], static_cast<int>(relSizeW * w),
630 snapshot_width, snapshot_transparent,
633 QImage finalImage(img[0].width() + img[1].width() +2, img[0].height(),
634 QImage::Format_ARGB32_Premultiplied);
636 QPainter painter(&finalImage);
638 painter.fillRect(0,0,finalImage.width(),
639 finalImage.height(), QBrush(Qt::gray));
641 painter.drawImage(QRectF( 0, 0, img[0].width(), img[0].height()),img[0],
642 QRectF( 0, 0, img[0].width(), img[0].height()) );
643 painter.drawImage(QRectF(img[0].width()+2, 0, img[1].width(), img[1].height()),img[1],
644 QRectF( 0, 0, img[1].width(), img[1].height()) );
646 if (!comments.isEmpty())
647 finalImage.setText(
"Mesh Comments", comments);
648 finalImage.save(file_name);
653 case QtMultiViewLayout::Grid:
659 QImage img0,img1,img2,img3;
662 (
int)((
double)snapshot_width * relSizeW),
663 (
int)((
double)snapshot_height * relSizeH),
664 snapshot_transparent, hide_coord_sys);
666 (
int)((
double)snapshot_width * (1.0 - relSizeW)),
667 (
int)((
double)snapshot_height * relSizeH),
668 snapshot_transparent, hide_coord_sys);
670 (
int)((
double)snapshot_width * relSizeW),
671 (
int)((
double)snapshot_height * (1.0 - relSizeH)),
672 snapshot_transparent, hide_coord_sys);
674 (
int)((
double)snapshot_width * (1.0 - relSizeW)),
675 (
int)((
double)snapshot_height * (1.0 - relSizeH)),
676 snapshot_transparent, hide_coord_sys);
678 QImage finalImage(img0.width() + img1.width()+2,
679 img0.height() + img2.height()+2,
680 QImage::Format_ARGB32_Premultiplied);
682 QPainter painter(&finalImage);
684 painter.fillRect(0,0,finalImage.width(), finalImage.height(), QBrush(Qt::gray));
686 painter.drawImage(QRectF( 0, 0, img0.width(), img0.height()),img0,
687 QRectF( 0, 0, img0.width(), img0.height()) );
688 painter.drawImage(QRectF(img0.width()+2, 0, img1.width(), img1.height()),img1,
689 QRectF( 0, 0, img1.width(), img1.height()) );
690 painter.drawImage(QRectF( 0,img0.height()+2, img2.width(), img2.height()),img2,
691 QRectF( 0, 0, img2.width(), img2.height()) );
692 painter.drawImage(QRectF(img0.width()+2, img0.height()+2, img3.width(), img3.height()),img3,
693 QRectF( 0, 0, img3.width(), img3.height()) );
695 if (!comments.isEmpty())
696 finalImage.setText(
"Mesh Comments", comments);
697 finalImage.save(file_name);
701 case QtMultiViewLayout::HSplit:
709 QImage img0,img1,img2,img3;
712 (
int)((
double)snapshot_width * relSizeW), snapshot_height,
713 snapshot_transparent, hide_coord_sys);
715 (
int)((
double)snapshot_width * (1.0 - relSizeW)),
716 relSizeH1 * (
double)snapshot_height,
717 snapshot_transparent, hide_coord_sys);
719 (
int)((
double)snapshot_width * (1.0 - relSizeW)),
720 relSizeH2 * (
double)snapshot_height,
721 snapshot_transparent, hide_coord_sys);
723 (
int)((
double)snapshot_width * (1.0 - relSizeW)),
724 relSizeH3 * (
double)snapshot_height,
725 snapshot_transparent, hide_coord_sys);
727 QImage finalImage(img0.width() + img1.width() +2, img0.height(), QImage::Format_ARGB32_Premultiplied);
729 QPainter painter(&finalImage);
731 painter.fillRect(0,0,finalImage.width(), finalImage.height(), QBrush(Qt::gray));
733 painter.drawImage(QRectF( 0, 0, img0.width(), img0.height()),img0,
734 QRectF( 0, 0, img0.width(), img0.height()) );
735 painter.drawImage(QRectF(img0.width()+2, 0, img1.width(), img1.height()),img1,
736 QRectF( 0, 0, img1.width(), img1.height()) );
737 painter.drawImage(QRectF(img0.width()+2, img1.height()+2, img2.width(), img2.height()),img2,
738 QRectF( 0, 0, img2.width(), img2.height()) );
739 painter.drawImage(QRectF(img0.width()+2, img1.height()+img2.height()+4, img3.width(),img3.height()),img3,
740 QRectF( 0, 0, img3.width(), img3.height()) );
742 if (!comments.isEmpty())
743 finalImage.setText(
"Mesh Comments", comments);
744 finalImage.save(file_name);
760 if (!ACG::SceneGraph::Material::support_json_serialization())
761 dialog.metaData_storeMatInfo_cb->setVisible(
false);
763 bool ok = dialog.exec();
766 QString newName = dialog.filename->text();
772 const bool storeComments = dialog.metaData_storeComments_cb->isChecked();
773 const bool comments_visible_only =
774 dialog.metaData_comments_visibleOnly_cb->isChecked();
775 const bool comments_targeted_only =
776 dialog.metaData_comments_targetedOnly_cb->isChecked();
777 const bool store_material_info =
778 dialog.metaData_storeMatInfo_cb->isChecked();
779 const int snapshot_width = dialog.snapWidth->value();
780 const int snapshot_height = dialog.snapHeight->value();
781 const bool snapshot_transparent = dialog.transparent->isChecked();
782 const bool hide_coord_sys = dialog.hideCoordsys->isChecked();
783 const int snapshot_multisampling =
784 dialog.multisampling->isChecked() ?
785 dialog.num_samples->value() : 1;
786 const bool store_view = dialog.metaData_storeView_cb->isChecked();
789 comments_targeted_only, store_material_info, snapshot_width,
790 snapshot_height, snapshot_transparent, hide_coord_sys,
791 snapshot_multisampling, store_view);
801 case QtMultiViewLayout::SingleView:
803 QImage* finalImage =
new QImage();
807 writeImageAsynchronously(finalImage, suggestSnapshotFilename(
snapshotName_));
811 case QtMultiViewLayout::DoubleView:
818 QImage* finalImage =
new QImage(img[0].width() + img[1].width() +2, img[0].height(), QImage::Format_ARGB32_Premultiplied);
820 QPainter painter(finalImage);
822 painter.fillRect(0,0,finalImage->width(), finalImage->height(), QBrush(Qt::gray));
824 painter.drawImage(QRectF( 0, 0, img[0].width(), img[0].height()),img[0],
825 QRectF( 0, 0, img[0].width(), img[0].height()) );
826 painter.drawImage(QRectF(img[0].width()+2, 0, img[1].width(), img[1].height()),img[1],
827 QRectF( 0, 0, img[1].width(), img[1].height()) );
829 writeImageAsynchronously(finalImage, suggestSnapshotFilename(
snapshotName_));
834 case QtMultiViewLayout::Grid:
836 QImage img0,img1,img2,img3;
843 QImage* finalImage =
new QImage(img0.width() + img1.width() + 2, img0.height() + img2.height() + 2, QImage::Format_ARGB32_Premultiplied);
845 QPainter painter(finalImage);
847 painter.fillRect(0,0,finalImage->width(), finalImage->height(), QBrush(Qt::gray));
849 painter.drawImage(QRectF( 0, 0, img0.width(), img0.height()),img0,
850 QRectF( 0, 0, img0.width(), img0.height()) );
851 painter.drawImage(QRectF(img0.width()+2, 0, img1.width(), img1.height()),img1,
852 QRectF( 0, 0, img1.width(), img1.height()) );
853 painter.drawImage(QRectF( 0, img0.height()+2, img2.width(), img2.height()),img2,
854 QRectF( 0, 0, img2.width(), img2.height()) );
855 painter.drawImage(QRectF(img0.width()+2, img0.height()+2, img3.width(), img3.height()),img3,
856 QRectF( 0, 0, img3.width(), img3.height()) );
858 writeImageAsynchronously(finalImage, suggestSnapshotFilename(
snapshotName_));
862 case QtMultiViewLayout::HSplit:
864 QImage img0,img1,img2,img3;
871 QImage* finalImage =
new QImage(img0.width() + img1.width() + 2, img0.height(), QImage::Format_ARGB32_Premultiplied);
873 QPainter painter(finalImage);
875 painter.fillRect(0,0,finalImage->width(), finalImage->height(), QBrush(Qt::gray));
877 painter.drawImage(QRectF( 0, 0, img0.width(), img0.height()),img0,
878 QRectF( 0, 0, img0.width(), img0.height()) );
879 painter.drawImage(QRectF(img0.width()+2, 0, img1.width(), img1.height()),img1,
880 QRectF( 0, 0, img1.width(), img1.height()) );
881 painter.drawImage(QRectF(img0.width()+2, img1.height()+2, img2.width(), img2.height()),img2,
882 QRectF( 0, 0, img2.width(), img2.height()) );
883 painter.drawImage(QRectF(img0.width()+2, img1.height()+img2.height()+4, img3.width(),img3.height()),img3,
884 QRectF( 0, 0, img3.width(), img3.height()) );
886 writeImageAsynchronously(finalImage, suggestSnapshotFilename(
snapshotName_));
900 void writeImageQImage(QImage* _image,
const QString _name) {
906 void CoreWidget::writeImageAsynchronously(QImage* _image,
const QString _name) {
908 QFuture<void>* future =
new QFuture<void>();
909 *future = QtConcurrent::run(writeImageQImage, _image, _name);
910 QFutureWatcher<void>* watcher =
new QFutureWatcher<void>();
911 watcher->setFuture(*future);
913 watcher_garbage_.insert(std::pair<QFutureWatcher<void>*,QFuture<void>*>(watcher, future));
915 connect(watcher, SIGNAL(finished()),
this, SLOT(delete_garbage()));
920 void CoreWidget::delete_garbage() {
922 QObject* obj = QObject::sender();
923 QFutureWatcher<void>* watcher =
dynamic_cast<QFutureWatcher<void>*
>(obj);
930 std::map<QFutureWatcher<void>*,QFuture<void>*>::iterator f;
931 f = watcher_garbage_.find(watcher);
932 if(f != watcher_garbage_.end()) {
935 watcher_garbage_.erase(f);
952 QSize windowSize(0, 0);
953 int splitterWidth = 0;
954 QSize viewportSize(0, 0);
956 view, &windowSize, &splitterWidth, &viewportSize);
958 if (windowSize.height() != 0 && windowSize.width() != 0) {
959 if (windowSize.width() < 0) {
970 if (splitterWidth > 0) {
972 if (splitter_sizes.size() < 2) {
973 std::cerr <<
"The tool splitter has less than two children. This "
974 "shouldn't happen." << std::endl;
977 "Core/Gui/ToolBoxes/ToolBoxOnTheRight",
true).toBool()
980 const int diff = splitterWidth - splitter_sizes[primary_idx];
981 splitter_sizes[primary_idx] += diff;
982 splitter_sizes[1-primary_idx] -= diff;
991 if (viewportSize.width() > 0 && viewportSize.height() > 0) {
996 for (
int i = 0; i < 2; ++i) {
998 if (cur_viewport_size != viewportSize) {
999 std::cout <<
"Stored viewport size is " << viewportSize.width()
1000 <<
" x " << viewportSize.height() <<
". Actual size is "
1001 << cur_viewport_size.width() <<
" x "
1002 << cur_viewport_size.height() <<
". Resizing window."
1006 QSize diff = viewportSize - cur_viewport_size;
1007 resize(size() + diff);
1008 const QSize new_viewport_size =
1010 diff = viewportSize - new_viewport_size;
1011 if (diff.width() != 0) {
1012 std::cout <<
"New viewport size is "
1013 << new_viewport_size.width()
1014 <<
" x " << new_viewport_size.height() <<
"."
1015 <<
" Moving splitter by " << diff.width() <<
"."
1019 if (splitter_sizes.size() < 2) {
1020 std::cerr <<
"The tool splitter has less than two children. This "
1021 "shouldn't happen." << std::endl;
1024 "Core/Gui/ToolBoxes/ToolBoxOnTheRight",
true).toBool()
1027 splitter_sizes[primary_idx] += diff.width();
1028 splitter_sizes[1-primary_idx] -= diff.width();
1047 if (splitterWidth != -1)
1056 sizes.push_back(size.width() - splitterWidth);
1057 sizes.push_back(splitterWidth);
1061 sizes.push_back(splitterWidth);
1062 sizes.push_back(size.width() - splitterWidth);
1071 if (size == QSize(0,0))
1078 resizeApplication(size.width(),size.height());
1088 size = QSize (width(),height());
1090 int splitter_size = 0;
1096 const bool make_c_string = (QApplication::keyboardModifiers() & Qt::ControlModifier);
1098 size, splitter_size, make_c_string);
1107 emit log(
LOGERR, tr(
"CoordSys Node not found"));
1116 for (
unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
1124 if (_action->data().toInt() != PluginFunctions::VIEW_FREE)
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
void slotContextSetHomeView()
Set the active viewers home position.
Viewer::ViewerProperties & viewerProperties(int _id)
Get the viewer properties Use this functions to get basic viewer properties such as backgroundcolor o...
void slotSetContextBackgroundColor()
Set Background Color for one viewer.
void slotLocalChangeBackFaceCulling(bool _backFaceCulling)
Set backface culling for active viewer.
void slotLocalChangeMultisampling(bool _multisampling)
Set multisampling for active viewer.
QtGLGraphicsView * glView_
graphics view that holds the gl scene
void allowRotation(bool _mode, int _viewer)
void viewerSnapshotDialog()
Create a snapshot of the whole app with fileDialog.
CursorPainter * cursorPainter_
Cursor handling.
void slotCoordSysVisibility(bool _visible)
Hide coordinate systems in all viewers.
void setProjectionMode(const ProjectionMode _mode)
set mode to either ORTHOGRAPHIC_PROJECTION or PERSPECTIVE_PROJECTION
void applicationSnapshotDialog()
Create a snapshot of the whole app with fileDialog.
void twoSidedLighting(bool _state)
set 2-sided lighting on/off
QtGLGraphicsScene * glScene_
graphics scene used to paint gl context and widgets
QSplitter * toolSplitter_
Spliter between toplevel objects and toolbox.
void slotSwitchNavigation(bool _egomode)
Switch navigation mode.
void strafeLeft()
When using first person mode strafe to the left.
ProjectionMode
projection mode
MultiViewMode mode() const
Retruns current layout modes.
void slotGlobalHomeView()
Set the viewer to home position.
void slotToggleStereoMode()
Enable or disable Stereo.
void slotGlobalChangeMipmapping(bool _multisampling)
Set mipmapping for all viewers.
QtMultiViewLayout * baseLayout_
Base layout that holds gl views.
ACG::SceneGraph::BaseNode * getSceneGraphRootNode()
get scenegraph root node
void snapshotBaseFileName(const QString &_fname)
void show()
Show node: set status to Active.
QStringList collectObjectComments(bool visibleOnly, bool targetedOnly)
void slotGlobalChangeMultisampling(bool _multisampling)
Set multisampling for all viewers.
void slotGlobalToggleMipmapping()
If mipmapping is disabled in all viewers, enable it in all viewers. Otherwise disable it...
void mipmapping(bool _state)
set mipmapping on/off
void slotSetViewingDirection(QAction *_action)
Change the viewing direction from context-menu.
QStringList collectObjectMaterials(bool visibleOnly, bool targetedOnly)
void slotExaminerSnapshot()
Create a snapshot of the last active examiner.
QString snapshotName_
Create a snapshot of the whole app with fileDialog.
void viewerSnapshot()
Create a snapshot of the whole app.
void slotContextViewAll()
Change view on active viewer to view complete scene.
void applicationSnapshot()
Create a snapshot of the whole app.
ACG::SceneGraph::CoordsysNode::ProjectionMode getCoordsysProjection()
Toggle coordsys projection mode of the active viewer.
void slotGlobalToggleMultisampling()
If multisampling is disabled in all viewers, enable it in all viewers. Otherwise disable it...
void multisampling(bool _state)
set multisampling on/off
void slotGlobalSetHomeView()
Set the home position for all viewers.
void snapshotCounter(const int _counter)
int viewers()
Get the number of viewers.
void slotGlobalToggleTwoSidedLighting()
If two-sided lighting is disabled in all viewers, enable it in all viewers. Otherwise disable it...
void slotLockRotation(bool _lock)
Lock rotation in current examiner widget.
void hide()
Hide Node: set status to HideNode.
void setFixedView(int _mode, int _viewer)
Set a fixed View for a viewer.
void moveForward()
When using first person mode move forward.
bool backFaceCulling()
Get current state of backface culling.
bool stereoActive_
The viewer with id _viewerId changed its draw Mode.
void slotGlobalViewAll()
Change view on all viewers to view complete scene.
void slotGlobalChangeAnimation(bool _animation)
Set the animation mode for all viewers.
void slotGlobalOrthographicProjection()
Toggle projection mode of all viewers to orthographic projection.
void applicationSnapshotName(QString _name)
Set the snapshot name.
void slotSetViewAndWindowGeometry(QString view)
Set the supplied serialized view.
void slotLocalChangeTwoSidedLighting(bool _lighting)
Set two-sided lighting for active viewer.
ProjectionMode getProjectionMode() const
get current projection mode
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
void animation(bool _state)
set 2-sided lighting on/off
void slotContextSwitchProjection()
Toggle projection mode of the active viewer.
void setEnabled(bool _enabled)
Enabled/Disables gl cursor painting.
void slotPasteView()
Paste the view to the last active examiner.
void slotSetGlobalBackgroundColor()
Set Background Color for all viewers at once.
void slotContextSwitchCoordsysProjection()
Toggle coordsys projection mode of the active viewer.
void moveBack()
When using first person mode move backward.
void slotSetView(QString view)
Set the supplied serialized view.
void strafeRight()
When using first person mode strafe to the right.
void setValue(const QString &key, const QVariant &value)
Wrapper function which makes it possible to enable Debugging output with -DOPENFLIPPER_SETTINGS_DEBUG...
void slotPasteViewAndWindow()
Paste the view, the window and toolbox size to the last active examiner.
void slotGlobalPerspectiveProjection()
Toggle projection mode of all viewers to perspective projection.
QToolButton * stereoButton_
Called by Plugins to add a Toolbar.
unsigned int activeExaminer()
Get the id of the examiner which got the last mouse events.
void slotContextHomeView()
Set the active viewer to home position.
void slotLocalChangeAnimation(bool _animation)
Set the animation mode for active viewer.
void slotSwitchWheels(bool _state)
Show / hide wheels.
void slotGlobalToggleAnimation()
If animation is disabled in all viewers, enable it in all viewers. Otherwise disable it...
void slotGlobalChangeBackFaceCulling(bool _backFaceCulling)
Set backface culling for all viewers.
void slotGlobalToggleBackFaceCulling()
If backface culling is disabled in all viewers, enable it in all viewers. Otherwise disable it...
void slotGlobalChangeTwoSidedLighting(bool _lighting)
Set two-sided lighting for all viewers.
ACG::Vec4f backgroundColor()
Get current background color.
ChildIter find(BaseNode *_node)
void slotLocalChangeMipmapping(bool _mipmapping)
Set mipmapping for active viewer.
std::vector< glViewer * > examiner_widgets_
Examiner Widget.
void slotCopyView()
Copy view from the last active examiner.