+ fix more Quarter port issues
This commit is contained in:
parent
5912342e3f
commit
ab66d0a45f
|
@ -28,6 +28,7 @@
|
|||
# include <QLabel>
|
||||
# include <QMenu>
|
||||
# include <QMessageBox>
|
||||
# include <QGLWidget>
|
||||
# include <QPainter>
|
||||
# include <QSplitter>
|
||||
# include <QStatusBar>
|
||||
|
@ -60,6 +61,7 @@
|
|||
#include <Gui/MainWindow.h>
|
||||
#include <Gui/Selection.h>
|
||||
#include <Gui/SplitView3DInventor.h>
|
||||
#include <Gui/View3DInventor.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
#include <Gui/ViewProviderGeometryObject.h>
|
||||
#include <Gui/WaitCursor.h>
|
||||
|
@ -330,14 +332,14 @@ class AlignmentView : public Gui::AbstractSplitView
|
|||
public:
|
||||
QLabel* myLabel;
|
||||
|
||||
AlignmentView(Gui::Document* pcDocument, QWidget* parent, Qt::WFlags wflags=0)
|
||||
AlignmentView(Gui::Document* pcDocument, QWidget* parent, QGLWidget* shareWidget=0, Qt::WFlags wflags=0)
|
||||
: AbstractSplitView(pcDocument, parent, wflags)
|
||||
{
|
||||
QSplitter* mainSplitter=0;
|
||||
mainSplitter = new QSplitter(Qt::Horizontal, this);
|
||||
_viewer.push_back(new View3DInventorViewer(mainSplitter));
|
||||
_viewer.push_back(new View3DInventorViewer(mainSplitter, shareWidget));
|
||||
_viewer.back()->setDocument(pcDocument);
|
||||
_viewer.push_back(new View3DInventorViewer(mainSplitter));
|
||||
_viewer.push_back(new View3DInventorViewer(mainSplitter, shareWidget));
|
||||
_viewer.back()->setDocument(pcDocument);
|
||||
|
||||
QFrame* vbox = new QFrame(this);
|
||||
|
@ -367,9 +369,9 @@ public:
|
|||
// apply the user settings
|
||||
setupSettings();
|
||||
|
||||
static_cast<SoGroup*>(getViewer(0)->getSceneGraph())->
|
||||
static_cast<SoGroup*>(getViewer(0)->getSoRenderManager()->getSceneGraph())->
|
||||
addChild(setupHeadUpDisplay(tr("Movable object")));
|
||||
static_cast<SoGroup*>(getViewer(1)->getSceneGraph())->
|
||||
static_cast<SoGroup*>(getViewer(1)->getSoRenderManager()->getSceneGraph())->
|
||||
addChild(setupHeadUpDisplay(tr("Fixed object")));
|
||||
}
|
||||
~AlignmentView()
|
||||
|
@ -722,8 +724,15 @@ void ManualAlignment::startAlignment(Base::Type mousemodel)
|
|||
if (myAlignModel.isEmpty())
|
||||
return;
|
||||
|
||||
QGLWidget* shareWidget = 0;
|
||||
std::list<MDIView*> theViews = myDocument->getMDIViewsOfType(View3DInventor::getClassTypeId());
|
||||
if (!theViews.empty()) {
|
||||
shareWidget = qobject_cast<QGLWidget*>(static_cast<View3DInventor*>
|
||||
(theViews.front())->getViewer()->getGLWidget());
|
||||
}
|
||||
|
||||
// create a splitted window for picking the points
|
||||
myViewer = new AlignmentView(myDocument,Gui::getMainWindow());
|
||||
myViewer = new AlignmentView(myDocument,Gui::getMainWindow(),shareWidget);
|
||||
myViewer->setWindowTitle(tr("Alignment[*]"));
|
||||
myViewer->setWindowIcon(QApplication::windowIcon());
|
||||
myViewer->resize(400, 300);
|
||||
|
|
|
@ -774,11 +774,9 @@ void View3DInventorViewer::setSceneGraph(SoNode* root)
|
|||
//we want the rendered scene with all lights and cameras, viewer->getSceneGraph would return
|
||||
//the geometry scene only
|
||||
SoNode* scene = this->getSoRenderManager()->getSceneGraph();
|
||||
|
||||
if(scene && scene->getTypeId().isDerivedFrom(SoSeparator::getClassTypeId())) {
|
||||
if (scene && scene->getTypeId().isDerivedFrom(SoSeparator::getClassTypeId())) {
|
||||
sa.apply(scene);
|
||||
|
||||
if(!sa.getPath())
|
||||
if (!sa.getPath())
|
||||
static_cast<SoSeparator*>(scene)->insertChild(this->backlight, 0);
|
||||
}
|
||||
}
|
||||
|
@ -895,7 +893,7 @@ void View3DInventorViewer::saveGraphic(int pagesize, int eBackgroundType, SoVect
|
|||
SbVec2s vpsize = this->getSoRenderManager()->getViewportRegion().getViewportSizePixels();
|
||||
float vpratio = ((float)vpsize[0]) / ((float)vpsize[1]);
|
||||
|
||||
if(vpratio > 1.0f) {
|
||||
if (vpratio > 1.0f) {
|
||||
va->setOrientation(SoVectorizeAction::LANDSCAPE);
|
||||
vpratio = 1.0f / vpratio;
|
||||
}
|
||||
|
@ -911,7 +909,7 @@ void View3DInventorViewer::saveGraphic(int pagesize, int eBackgroundType, SoVect
|
|||
float pageratio = size[0] / size[1];
|
||||
float xsize, ysize;
|
||||
|
||||
if(pageratio < vpratio) {
|
||||
if (pageratio < vpratio) {
|
||||
xsize = size[0];
|
||||
ysize = xsize / vpratio;
|
||||
}
|
||||
|
@ -1230,7 +1228,7 @@ void View3DInventorViewer::renderToFramebuffer(QGLFramebufferObject* fbo)
|
|||
gl.apply(this->getSoRenderManager()->getSceneGraph());
|
||||
gl.apply(this->foregroundroot);
|
||||
|
||||
if(this->axiscrossEnabled) {
|
||||
if (this->axiscrossEnabled) {
|
||||
this->drawAxisCross();
|
||||
}
|
||||
|
||||
|
@ -1699,7 +1697,7 @@ bool View3DInventorViewer::pickPoint(const SbVec2s& pos,SbVec3f& point,SbVec3f&
|
|||
rp.apply(getSoRenderManager()->getSceneGraph());
|
||||
SoPickedPoint* Point = rp.getPickedPoint();
|
||||
|
||||
if(Point) {
|
||||
if (Point) {
|
||||
point = Point->getObjectPoint();
|
||||
norm = Point->getObjectNormal();
|
||||
return true;
|
||||
|
@ -1728,7 +1726,7 @@ SoPickedPoint* View3DInventorViewer::pickPoint(const SbVec2s& pos) const
|
|||
|
||||
const SoPickedPoint* View3DInventorViewer::getPickedPoint(SoEventCallback* n) const
|
||||
{
|
||||
if(selectionRoot)
|
||||
if (selectionRoot)
|
||||
return selectionRoot->getPickedPoint(n->getAction());
|
||||
else
|
||||
return n->getPickedPoint();
|
||||
|
|
Loading…
Reference in New Issue
Block a user