void QDeclarativeGeoPlace::setViewport(QDeclarativeGeoBoundingBox* box) { if (m_declarativeBox.box() == box->box()) return; m_declarativeBox.setBox(box->box()); emit viewportChanged(); }
void Viewport::setBackgroundColor(const QColor &value) { if (d->backgroundColor != value) { d->backgroundColor = value; emit viewportChanged(); } }
void AbstractScrollArea::setViewport(QGraphicsWidget *viewport) { if (m_viewport) { m_viewport->setParentItem(0); QList<QGraphicsItem*> children = m_viewport->childItems(); foreach (QGraphicsItem *child, children) child->setParentItem(0); delete m_viewport; } m_viewport = viewport; if (viewport) { m_viewport->setParentItem(this); m_viewport->setContentsMargins(0, 0, 0, 0); adjustScrollBars(); } emit viewportChanged(viewport); }
bool LayerRendererChromium::initialize() { m_context->makeContextCurrent(); if (settings().acceleratePainting) m_capabilities.usingAcceleratedPainting = true; WebCore::Extensions3D* extensions = m_context->getExtensions(); m_capabilities.usingMapSub = extensions->supports("GL_CHROMIUM_map_sub"); if (m_capabilities.usingMapSub) extensions->ensureEnabled("GL_CHROMIUM_map_sub"); // Use the swapBuffers callback only with the threaded proxy. if (settings().enableCompositorThread) m_capabilities.usingSwapCompleteCallback = extensions->supports("GL_CHROMIUM_swapbuffers_complete_callback"); if (m_capabilities.usingSwapCompleteCallback) { extensions->ensureEnabled("GL_CHROMIUM_swapbuffers_complete_callback"); Extensions3DChromium* extensions3DChromium = static_cast<Extensions3DChromium*>(extensions); extensions3DChromium->setSwapBuffersCompleteCallbackCHROMIUM(LayerRendererSwapBuffersCompleteCallbackAdapter::create(this)); } if (extensions->supports("GL_EXT_texture_format_BGRA8888")) extensions->ensureEnabled("GL_EXT_texture_format_BGRA8888"); GLC(m_context.get(), m_context->getIntegerv(GraphicsContext3D::MAX_TEXTURE_SIZE, &m_capabilities.maxTextureSize)); m_capabilities.bestTextureFormat = PlatformColor::bestTextureFormat(m_context.get()); if (!initializeSharedObjects()) return false; m_headsUpDisplay = CCHeadsUpDisplay::create(this); // Make sure the viewport and context gets initialized, even if it is to zero. viewportChanged(); return true; }
void DataSetView::reloadColumnHeaders() { //Store all current items for(int col=_previousViewportColMin; col< _previousViewportColMax; col++) storeColumnHeader(col); viewportChanged(); //rerun to get new items }
void DataSetView::reloadRowNumbers() { //Store all current items for(int row=_previousViewportRowMin; row<_previousViewportRowMax; row++) storeRowNumber(row); viewportChanged(); //rerun to get new items }
void QgsCameraController::setViewport( QRect viewport ) { if ( mViewport == viewport ) return; mViewport = viewport; emit viewportChanged(); }
void DataSetView::reloadTextItems() { //Store all current items for(int col=_previousViewportColMin; col< _previousViewportColMax; col++) for(int row=_previousViewportRowMin; row<_previousViewportRowMax; row++) storeTextItem(row, col); viewportChanged(); //rerun to get new items }
ViewWrapper2D::ViewWrapper2D(ViewPtr view, VisServicesPtr backend) : ViewWrapper(backend), mOrientationActionGroup(new QActionGroup(view.get())) { qRegisterMetaType<Vector3D>("Vector3D"); mView = view; this->connectContextMenu(mView); // disable vtk interactor: this wrapper IS an interactor mView->getRenderWindow()->GetInteractor()->Disable(); mView->getRenderer()->GetActiveCamera()->SetParallelProjection(true); double clipDepth = 1.0; // 1mm depth, i.e. all 3D props rendered outside this range is not shown. double length = clipDepth*10; mView->getRenderer()->GetActiveCamera()->SetPosition(0,0,length); mView->getRenderer()->GetActiveCamera()->SetClippingRange(length-clipDepth, length+0.1); connect(settings(), SIGNAL(valueChangedFor(QString)), this, SLOT(settingsChangedSlot(QString))); // slice proxy mSliceProxy = SliceProxy::create(mServices->patient()); mDataRepContainer.reset(new DataRepContainer()); mDataRepContainer->setSliceProxy(mSliceProxy); mDataRepContainer->setView(mView); mViewFollower = ViewFollower::create(mServices->patient()); mViewFollower->setSliceProxy(mSliceProxy); addReps(); mZoom2D.reset(new Zoom2DHandler()); connect(mZoom2D.get(), SIGNAL(zoomChanged()), this, SLOT(viewportChanged())); connect(mServices->tracking().get(), SIGNAL(activeToolChanged(const QString&)), this, SLOT(activeToolChangedSlot())); connect(mView.get(), SIGNAL(resized(QSize)), this, SLOT(viewportChanged())); connect(mView.get(), SIGNAL(shown()), this, SLOT(showSlot())); connect(mView.get(), SIGNAL(mousePress(int, int, Qt::MouseButtons)), this, SLOT(mousePressSlot(int, int, Qt::MouseButtons))); connect(mView.get(), SIGNAL(mouseMove(int, int, Qt::MouseButtons)), this, SLOT(mouseMoveSlot(int, int, Qt::MouseButtons))); connect(mView.get(), SIGNAL(mouseWheel(int, int, int, int, Qt::MouseButtons)), this, SLOT(mouseWheelSlot(int, int, int, int, Qt::MouseButtons))); connect(mServices->patient().get(), &PatientModelService::videoAddedToTrackedStream, this, &ViewWrapper2D::videoSourcesChangedSlot); this->activeToolChangedSlot(); this->updateView(); }
/*! Construct the class and assign it a \a parent QDeclarativeItem. */ Viewport::Viewport(QDeclarativeItem *parent) : QDeclarativeItem(parent) { d = new ViewportPrivate(); setFlag(QGraphicsItem::ItemHasNoContents, false); qt_gl_set_qml_viewport(this); connect(this, SIGNAL(viewportChanged()), this, SLOT(update3d())); setCamera(new QGLCamera(this)); }
/** * @brief cwScreenCaptureManager::setViewport * @param viewport * * This is the capturing viewport in opengl. This is the area that will be captured * and saved by the manager. The rectangle should be in pixels. */ void cwCaptureViewport::setViewport(QRect viewport) { if(Viewport != viewport) { Viewport = viewport; emit viewportChanged(); if(!View.isNull()) { cwCamera* camera = View->camera(); CaptureCamera->setProjection(camera->projection()); CaptureCamera->setViewport(camera->viewport()); CaptureCamera->setViewMatrix(camera->viewMatrix()); } } }
void Viewport::setLightModel(QGLLightModel *value) { if (d->lightModel != value) { if (d->lightModel) { disconnect(d->lightModel, SIGNAL(lightModelChanged()), this, SIGNAL(update3d())); } d->lightModel = value; if (d->lightModel) { connect(d->lightModel, SIGNAL(lightModelChanged()), this, SIGNAL(update3d())); } emit viewportChanged(); } }
void Viewport::setBackdrop(Effect *value) { if (d->backdrop != value) { if (d->backdrop) { disconnect(d->backdrop, SIGNAL(effectChanged()), this, SLOT(update3d())); } d->backdrop = value; if (d->backdrop) { connect(d->backdrop, SIGNAL(effectChanged()), this, SLOT(update3d())); d->backdrop->setUseLighting(false); } emit viewportChanged(); } }
void CanvasOverviewDialog::changeCanvasView(CanvasView *canvasview) { if (m_canvasview) { disconnect(m_canvasview, 0, this, 0); disconnect(this, 0, m_canvasview, 0); } m_canvasview = canvasview; m_canvasoverview->setCanavasView(m_canvasview); // Trigger redraw when the viewport is scrolled or changes size. connect(m_canvasview, SIGNAL(viewportChanged(QRectF)), this, SLOT(canvasViewportChanged(QRectF))); // Trigger redraw when the diagram layout changes. connect(m_canvasview->canvas(), SIGNAL(changed(QList<QRectF>)), this, SLOT(canvasSceneChanged(QList<QRectF>))); }
void BaseViewer::centerOnAtZoom(int zoomLevel, const QPointF &scenePoint) { if (zoomLevel != _zoomLevel) { _zoomLevel=zoomLevel; double scale = qPow(2.0, zoomLevel); _ui->_view->setTransform(QTransform::fromScale(scale,scale)); } if (!scenePoint.isNull()) { _ui->_view->centerOn(scenePoint); } #ifdef _DEBUG viewportInfo(); #endif emit viewportChanged(zoomLevel, getVisibleSceneRect()); }
void RGraphicsViewQt::viewportChangeEvent() { RGraphicsViewImage::viewportChangeEvent(); emit viewportChanged(); }
void Viewport::setShowPicking(bool value) { d->showPicking = value; emit viewportChanged(); }
void ViewWrapper2D::showSlot() { activeToolChangedSlot(); viewportChanged(); }
void DataSetView::reloadLeftTopCorner() { delete _leftTopItem; _leftTopItem = NULL; viewportChanged(); }
void InspectorEmulationAgent::didCommitLoadForLocalFrame(LocalFrame* frame) { if (frame == m_webViewImpl->mainFrameImpl()->frame()) viewportChanged(); }
void Viewport::setNavigation(bool value) { d->navigation = value; emit viewportChanged(); }
void Viewport::setBlending(bool value) { d->blending = value; emit viewportChanged(); }