void ViewCameraGL::lockDim(bool b) { if(__lockdim != b){ __lockdim = b; emit lockDimChanged(__lockdim); if(!__lockdim)reDim(); } }
PGL_USING_NAMESPACE TOOLS_USING_NAMESPACE /* ----------------------------------------------------------------------- */ ViewCameraMenu::ViewCameraMenu(ViewCameraGL * camera,QWidget * parent, const char * name): QMenu(parent) { if(name)setObjectName(name); QPixmap home(ViewerIcon::getPixmap(ViewerIcon::home)); QPixmap read(ViewerIcon::getPixmap(ViewerIcon::fileopen)); QPixmap save(ViewerIcon::getPixmap(ViewerIcon::filefloppy)); QPixmap persp(ViewerIcon::getPixmap(ViewerIcon::perspective)); QPixmap ortho(ViewerIcon::getPixmap(ViewerIcon::orthographic)); QPixmap linked(ViewerIcon::getPixmap(ViewerIcon::linked)); QPixmap eyef(ViewerIcon::getPixmap(ViewerIcon::eyef)); QAction * action = addAction(home,tr("Home"), camera,SLOT(home()), Qt::CTRL+Qt::Key_I); addAction(tr("&Front View (YZ)"),camera,SLOT(YZView())); addAction(tr("&Right View (XZ)"),camera,SLOT(XZView())); addAction(tr("&Top View (XY)"), camera,SLOT(XYView())); addSeparator(); QMenu * __coordMenu = new QMenu(this); idGEOMcoord = __coordMenu->addAction(tr("GEOM System"), camera,SLOT(setGEOMCoordSys())); idGLcoord = __coordMenu->addAction(tr("GL System"), camera,SLOT(setGLCoordSys())); __coordMenu->addSeparator(); __coordMenu->addAction(tr("&Change"), camera,SLOT(changeCoordSys())); idGEOMcoord->setCheckable(true); idGLcoord->setCheckable(true); setCoordSys(camera->getCoordSys()); __coordMenu->setTitle(tr("Coordinates System")); addMenu(__coordMenu); addSeparator(); QMenu * __projectionMenu = new QMenu(this); idPerspective = __projectionMenu->addAction(persp,tr("&Perspective"), camera,SLOT(setPerspectiveMode())); idOrtho = __projectionMenu->addAction(ortho,tr("Ort&hographic"), camera,SLOT(setOrthographicMode())); __projectionMenu->addSeparator(); __projectionMenu->addAction(tr("&Change"), camera,SLOT(changeCameraMode()),Qt::CTRL+Qt::Key_D); idPerspective->setCheckable(true); idOrtho->setCheckable(true); __projectionMenu->setTitle(tr("Projection")); addMenu(__projectionMenu); setProjectionMode(camera->getProjectionMode()); QObject::connect(camera,SIGNAL(projectionChanged(bool)),this,SLOT(setProjectionMode(bool))); QObject::connect(camera,SIGNAL(coordSysChanged(int)),this,SLOT(setCoordSys(int))); addSeparator(); addAction(save,tr("&Save"), camera,SLOT(save())); addAction(read,tr("&Read"), camera,SLOT(read())); addSeparator(); QAction * idLock = addAction(linked,tr("&Auto Fit to Window"), camera,SLOT(lockDim())); if(camera)idLock->setChecked(camera->isDimLock()); QObject::connect(camera,SIGNAL(lockDimChanged(bool)),idLock,SLOT(setChecked(bool))); addAction(eyef,tr("&Fit to Window"), camera,SLOT(reDim())); }
void SPxSolver::loadLP(const SPxLP& lp) { METHOD( "SPxSolver::loadLP()" ); clear(); unInit(); unLoad(); if (thepricer) thepricer->clear(); if (theratiotester) theratiotester->clear(); SPxLP::operator=(lp); reDim(); SPxBasis::load(this); }
void ViewCameraGL::fillToolBar(QToolBar * toolBar) { QPixmap home(ViewerIcon::getPixmap(ViewerIcon::home)); QPixmap persp(ViewerIcon::getPixmap(ViewerIcon::perspective)); QPixmap eye(ViewerIcon::getPixmap(ViewerIcon::eye)); QPixmap eyef(ViewerIcon::getPixmap(ViewerIcon::eyef)); drawArrow(&eye,2); QBitmap mask=eye.mask(); drawArrow(&mask,2); QAction * bt = toolBar->addAction(home,tr("Home Position"),this, SLOT(home())); bt->setWhatsThis(tr("<b>Home Position</b><br><br>" "Set the view to the Initial Position.<br>" "You can also use Menu <br><b>Tools > Camera > Home</b><br>")); bt = toolBar->addAction(eye,tr("Camera Position")); QMenu * selctmenu = new QMenu(toolBar); selctmenu->addAction(tr("Front View (YZ)"),this,SLOT(YZView())); selctmenu->addAction(tr("Right View (XZ)"),this,SLOT(XZView())); selctmenu->addAction(tr("Top View (XY)"),this,SLOT(XYView())); bt->setMenu(selctmenu); // bt2->setPopupDelay(0); bt = toolBar->addAction(eyef,tr("Fit to Window"),this, SLOT(reDim())); bt->setWhatsThis(tr("<b>Fit to Window</b><br><br>" "Set the view to fit the scene.<br>" "You can also use Menu <br><b>Tools > Camera > Fit to Window</b><br>")); bt = toolBar->addAction(persp,tr("Perspective Camera"), this, SLOT(changeCameraMode())); bt->setWhatsThis(tr("<b>Projection</b><br><br>" "Camera can be <b>Perspective</b> or <b>Orthographic</b>.<br><br>" "Setting this button <i>On</i> make the camera in Perspective mode, " "<i>Off</i> in Orthographic mode<br><br>" "You can also use Menu <br><b>Tools > Camera > Projection</b><br>" )); bt->setCheckable(true) ; bt->setChecked(__projectionmode); QObject::connect(this,SIGNAL(projectionChanged(bool)),bt,SLOT(setChecked(bool))); toolBar->addSeparator(); }
void ViewCameraGL::lockDim() { __lockdim = ! __lockdim; emit lockDimChanged(__lockdim); if(!__lockdim)reDim(); }
DVector& operator=(const Vector& vec) { reDim(vec.dim()); Vector::operator=(vec); }