您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ zoomOut函数代码示例

51自学网 2021-06-03 12:02:04
  C++
这篇教程C++ zoomOut函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中zoomOut函数的典型用法代码示例。如果您正苦于以下问题:C++ zoomOut函数的具体用法?C++ zoomOut怎么用?C++ zoomOut使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了zoomOut函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: QgsDebugMsg

void QgsMapCanvas::wheelEvent( QWheelEvent *e ){  // Zoom the map canvas in response to a mouse wheel event. Moving the  // wheel forward (away) from the user zooms in  QgsDebugMsg( "Wheel event delta " + QString::number( e->delta() ) );  if ( mMapTool )  {    mMapTool->wheelEvent( e );  }  if ( QgsApplication::keyboardModifiers() )  {    // leave the wheel for map tools if any modifier pressed    return;  }  switch ( mWheelAction )  {    case WheelZoom:      // zoom without changing extent      if ( e->delta() > 0 )        zoomIn();      else        zoomOut();      break;    case WheelZoomAndRecenter:      // zoom and don't change extent      zoomWithCenter( e->x(), e->y(), e->delta() > 0 );      break;    case WheelZoomToMouseCursor:    {      // zoom map to mouse cursor      double scaleFactor = e->delta() > 0 ? 1 / mWheelZoomFactor : mWheelZoomFactor;      QgsPoint oldCenter = center();      QgsPoint mousePos( getCoordinateTransform()->toMapPoint( e->x(), e->y() ) );      QgsPoint newCenter( mousePos.x() + (( oldCenter.x() - mousePos.x() ) * scaleFactor ),                          mousePos.y() + (( oldCenter.y() - mousePos.y() ) * scaleFactor ) );      zoomByFactor( scaleFactor, &newCenter );      break;    }    case WheelNothing:      // well, nothing!      break;  }}
开发者ID:stevenmizuno,项目名称:QGIS,代码行数:52,


示例2: zoomIn

void FlickableMap::wheelEvent(QWheelEvent *event){    if (event->orientation() == Qt::Horizontal) {        event->ignore();    } else {        if (event->delta() > 0) {            zoomIn();        } else {            zoomOut();        }        event->accept();    }}
开发者ID:evopedia,项目名称:evopedia_qt,代码行数:13,


示例3: zoomIn

/** Ctrl + Rotating the mouse wheel will increase/decrease the font size * */void ScriptEditor::wheelEvent(QWheelEvent *e) {    if (e->modifiers() == Qt::ControlModifier) {        if (e->delta() > 0) {            zoomIn();            emit textZoomedIn(); // allows tracking        } else {            zoomOut();            emit textZoomedOut(); // allows tracking        }    } else {        QsciScintilla::wheelEvent(e);    }}
开发者ID:tyronerees,项目名称:mantid,代码行数:16,


示例4: zoomIn

void HelpViewer::wheelEvent(QWheelEvent *e){    if (e->modifiers() & Qt::ControlModifier) {        const int delta = e->delta();        if (delta > 0)            zoomIn(delta / 120);        else if (delta < 0)            zoomOut(-delta / 120);        e->accept();        return;    }    QWebView::wheelEvent(e);}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:13,


示例5: qDebug

void MapTilesFrame::zoomOut(){    qDebug() << "zooming OUT . . . viewport coordinate: " << getViewportCoordinate();    qDebug() << "viewport size: " << size();//    ZoomEffect *ze = createZoomEffect(QPoint(width() / 2, height() / 2));//    ze->zoomOutEffect();    //以视口中心点为视点缩放(服务器坐标系)    QPoint viewportCenterPoint(getViewportCoordinate().x() + getViewportWidth() / 2,                               getViewportCoordinate().y() - getViewportHeight() / 2);    zoomOut(viewportCenterPoint);}
开发者ID:ryfx,项目名称:EasyGIS,代码行数:13,


示例6: zoomOut

void CodeEditer::wheelEvent(QWheelEvent *e){	//d->clearVisibleCollapsedBlock();	if (e->modifiers() & Qt::ControlModifier) {		const int delta = e->delta();		if (delta < 0)			zoomOut();		else if (delta > 0)			zoomIn();		return;	}	QPlainTextEdit::wheelEvent(e);}
开发者ID:rccoder,项目名称:codeview,代码行数:13,


示例7: zoomTerminate

static BoolzoomTerminate(CompDisplay *d,              CompAction *action,              CompActionState state,              CompOption *option,              int nOption){   CompScreen *s;   Window xid;   xid = getIntOptionNamed(option, nOption, "root", 0);   for (s = d->screens; s; s = s->next)     {        ZOOM_SCREEN(s);        if (xid && s->root != xid)          continue;        if (zs->grab)          {             int output;             output = outputDeviceForPoint(s, zs->x1, zs->y1);             if (zs->x2 > s->outputDev[output].region.extents.x2)               zs->x2 = s->outputDev[output].region.extents.x2;             if (zs->y2 > s->outputDev[output].region.extents.y2)               zs->y2 = s->outputDev[output].region.extents.y2;             zoomInitiateForSelection(s, output);             zs->grab = FALSE;          }        else          {             CompOption o;             o.type = CompOptionTypeInt;             o.name = "root";             o.value.i = s->root;             zoomOut(d, action, state, &o, 1);          }     }   action->state &= ~(CompActionStateTermKey | CompActionStateTermButton);   return FALSE;}
开发者ID:zmike,项目名称:compiz,代码行数:51,


示例8: zoomIn

void MapWidget::wheelEvent(QWheelEvent* event){    int numDegrees=event->delta()/8;    int numSteps=numDegrees/15;    if (numSteps>=0) {        zoomIn(numSteps*1.35);    }    else {        zoomOut(-numSteps*1.35);    }    event->accept();}
开发者ID:kolosov,项目名称:libosmscout,代码行数:14,


示例9: QWidget

Topology::Topology(QWidget *parent) :    QWidget(parent),    ui(new Ui::Topology){    ui->setupUi(this);    ui->flushBtn->setEnabled(false);    flushClass = NULL;    timerId = 0;    seq = 0;    scene = new QGraphicsScene(this);    scene->setItemIndexMethod(QGraphicsScene::NoIndex);    scene->setSceneRect(-960, -540, 1920, 1080);    ui->graphicsView->setScene(scene);    ui->graphicsView->setAcceptDrops(true);    ui->graphicsView->setCacheMode(QGraphicsView::CacheBackground);    ui->graphicsView->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);    ui->graphicsView->setRenderHint(QPainter::Antialiasing);    ui->graphicsView->setTransformationAnchor(QGraphicsView::AnchorUnderMouse);    ui->graphicsView->scale(qreal(0.8), qreal(0.8));    centerNode = NULL;    connect(ui->zoomOutBtn, SIGNAL(clicked()), this, SLOT(zoomOut()));    connect(ui->zoomInBtn, SIGNAL(clicked()), this, SLOT(zoomIn()));    configFile = new QFile("config.dat");    if(!configFile->open(QIODevice::ReadWrite))    {        std::cerr << "Cannot open file:"                  << qPrintable(configFile->errorString())                  << endl;        return;    }    QDataStream in(configFile);    in.setVersion(QDataStream::Qt_4_3);    QStringList argList;    in >> argList;    if(argList.count() == 3)    {        comName = argList[0];        comStatue = argList[1];        netStatue = argList[2];        in >> panid >> chanel;    }
开发者ID:LuckJC,项目名称:qt_project,代码行数:50,


示例10: connect

void Navigation::setMap( MarbleWidget* widget ){    d->m_marbleWidget = widget;    if ( d->m_marbleWidget ) {        // Avoid the QWidget based warning        d->m_marbleWidget->model()->routingManager()->setShowGuidanceModeStartupWarning( false );        connect( d->m_marbleWidget->model()->routingManager()->routingModel(),                SIGNAL(positionChanged()), this, SLOT(update()) );        delete d->m_autoNavigation;        d->m_autoNavigation = new Marble::AutoNavigation( d->m_marbleWidget->model(), d->m_marbleWidget->viewport(), this );        connect( d->m_autoNavigation, SIGNAL(zoomIn(FlyToMode)),                 d->m_marbleWidget, SLOT(zoomIn()) );        connect( d->m_autoNavigation, SIGNAL(zoomOut(FlyToMode)),                 d->m_marbleWidget, SLOT(zoomOut()) );        connect( d->m_autoNavigation, SIGNAL(centerOn(GeoDataCoordinates,bool)),                 d->m_marbleWidget, SLOT(centerOn(GeoDataCoordinates)) );        connect( d->m_marbleWidget, SIGNAL(visibleLatLonAltBoxChanged()),                 d->m_autoNavigation, SLOT(inhibitAutoAdjustments()) );        connect( d->m_marbleWidget->model()->positionTracking(), SIGNAL(statusChanged(PositionProviderStatus)),                 &d->m_voiceNavigation, SLOT(handleTrackingStatusChange(PositionProviderStatus)) );    }
开发者ID:PayalPradhan,项目名称:marble,代码行数:23,


示例11: switch

void MapWidget::keyPressEvent(QKeyEvent* e) {	if ( _canvas.filterKeyPressEvent(e) ) {		e->accept();		return;	}	e->accept();	int key = e->key();	switch ( key ) {		case Qt::Key_Plus:		case Qt::Key_I:			if ( e->modifiers() == Qt::NoModifier )				zoomIn();			break;		case Qt::Key_Minus:		case Qt::Key_O:			if ( e->modifiers() == Qt::NoModifier )				zoomOut();			break;		case Qt::Key_Left:			_canvas.translate(QPointF(-1.0,0.0));			update();			break;		case Qt::Key_Right:			_canvas.translate(QPointF(1.0,0.0));			update();			break;		case Qt::Key_Up:			_canvas.translate(QPointF(0.0,1.0));			update();			break;		case Qt::Key_Down:			_canvas.translate(QPointF(0.0,-1.0));			update();			break;		case Qt::Key_G:			_canvas.setDrawGrid(!_canvas.isDrawGridEnabled());			break;		case Qt::Key_C:			_canvas.setDrawCities(!_canvas.isDrawCitiesEnabled());			break;		default:			e->ignore();			emit keyPressed(e);			break;	};}
开发者ID:marcelobianchi,项目名称:seiscomp3,代码行数:49,


示例12: qPow

    void QmlMapControl::touchEvent(QTouchEvent *evnt)    {        const QList<QTouchEvent::TouchPoint> & touchs = evnt->touchPoints();        if( touchs.count() != 2 )        {            QQuickPaintedItem::touchEvent(evnt);        }        else        {            evnt->accept();            const QTouchEvent::TouchPoint & t0 = touchs.first();            const QTouchEvent::TouchPoint & t1 = touchs.last();            if( last_t0_startPos.isNull() )                last_t0_startPos = t0.startPos();            if( last_t1_startPos.isNull() )                last_t1_startPos = t1.startPos();            qreal startW = qPow( qPow(last_t0_startPos.x()-last_t1_startPos.x(),2)+qPow(last_t0_startPos.y()-last_t1_startPos.y(),2), 0.5 );            qreal endW = qPow( qPow(t0.pos().x()-t1.pos().x(),2)+qPow(t0.pos().y()-t1.pos().y(),2), 0.5 );            if( startW*4/3<endW )            {                QPoint pnt( last_t0_startPos.x()/2+last_t1_startPos.x()/2, last_t0_startPos.y()/2+last_t1_startPos.y()/2 );                QPoint newPoint( width()-pnt.x(), height()-pnt.y() );                setView(clickToWorldCoordinate(pnt));                zoomIn(pnt);                setView(clickToWorldCoordinate(newPoint));                last_t0_startPos = t0.pos();                last_t1_startPos = t1.pos();            }            else            if( startW*3/4>endW )            {                QPoint pnt( t0.pos().x()/2+t1.pos().x()/2, t0.pos().y()/2+t1.pos().y()/2 );                QPoint newPoint( width()-pnt.x(), height()-pnt.y() );                setView(clickToWorldCoordinate(pnt));                zoomOut(pnt);                setView(clickToWorldCoordinate(newPoint));                last_t0_startPos = t0.pos();                last_t1_startPos = t1.pos();            }        }    }
开发者ID:sialan-labs,项目名称:kaqaz,代码行数:49,


示例13: zoomIn

void VMdEditor::zoomPage(bool p_zoomIn, int p_range){    int delta;    const int minSize = 2;    if (p_zoomIn) {        delta = p_range;        zoomIn(p_range);    } else {        delta = -p_range;        zoomOut(p_range);    }    m_zoomDelta += delta;    QVector<HighlightingStyle> &styles = m_mdHighlighter->getHighlightingStyles();    for (auto & it : styles) {        int size = it.format.fontPointSize();        if (size == 0) {            // It contains no font size format.            continue;        }        size += delta;        if (size < minSize) {            size = minSize;        }        it.format.setFontPointSize(size);    }    QHash<QString, QTextCharFormat> &cbStyles = m_mdHighlighter->getCodeBlockStyles();    for (auto it = cbStyles.begin(); it != cbStyles.end(); ++it) {        int size = it.value().fontPointSize();        if (size == 0) {            // It contains no font size format.            continue;        }        size += delta;        if (size < minSize) {            size = minSize;        }        it.value().setFontPointSize(size);    }    m_mdHighlighter->rehighlight();}
开发者ID:vscanf,项目名称:vnote,代码行数:49,


示例14: switch

int FreqView::qt_metacall(QMetaObject::Call _c, int _id, void **_a){    _id = ViewWidget::qt_metacall(_c, _id, _a);    if (_id < 0)        return _id;    if (_c == QMetaObject::InvokeMetaMethod) {        switch (_id) {        case 0: zoomIn(); break;        case 1: zoomOut(); break;        case 2: setAmplitudeZoom((*reinterpret_cast< double(*)>(_a[1]))); break;        }        _id -= 3;    }    return _id;}
开发者ID:Guildenstern,项目名称:Tartini,代码行数:15,


示例15: connect

void ImageView::makeConnection(){	connect(tBtn_menu, SIGNAL(triggered(QAction*)), this, SLOT(goBack(QAction*)));	connect(btn_oriMode, SIGNAL(clicked()), this, SLOT(enterOriginalMode()));	connect(btn_proMode, SIGNAL(clicked()), this, SLOT(enterProcessedMode()));	connect(btn_editMode, SIGNAL(clicked()), this, SLOT(enterEditableMode()));	connect(btn_save, SIGNAL(clicked()), this, SLOT(saveImage()));	connect(btn_process, SIGNAL(clicked()), this, SLOT(processImage()));	connect(btn_zoomIn, SIGNAL(clicked()), this, SLOT(zoomIn()));	connect(btn_zoomOut, SIGNAL(clicked()), this, SLOT(zoomOut()));	connect(com_zoom, SIGNAL(currentIndexChanged(int)), this, SLOT(zoomTo(int)));		}
开发者ID:iceonepiece,项目名称:LIA_ME_TO_THE_MOON,代码行数:15,


示例16: connect

void MainWindow::connectUiToFunction(){    connect(ui->actionOpen, SIGNAL(triggered()), this, SLOT(open()));    connect(ui->actionExit, SIGNAL(triggered()), this, SLOT(close()));    connect(ui->actionSave, SIGNAL(triggered()), this, SLOT(save()));    connect(ui->actionSaveAs, SIGNAL(triggered()), this, SLOT(saveAs()));    connect(ui->actionZoom_In_25, SIGNAL(triggered()), this, SLOT(zoomIn()));    connect(ui->actionZoom_Out_25, SIGNAL(triggered()), this, SLOT(zoomOut()));    connect(ui->actionNormal_Size, SIGNAL(triggered()), this, SLOT(normlSize()));    connect(ui->actionPrint, SIGNAL(triggered()), this, SLOT(print()));    connect(ui->actionHelp, SIGNAL(triggered()), this, SLOT(about()));    connect(ui->actionFit_to_Window, SIGNAL(triggered()), this, SLOT(fitToWindow()));    connect(ui->actionLevel_Set_Segmentation, SIGNAL(triggered()), this, SLOT(level_set()));}
开发者ID:yajunyang,项目名称:MainWindow,代码行数:15,


示例17: connect

void NavigationBarWidget::initialize()	{	// Connecting necessary Signals to Slots	connect(iSlidingTimer, SIGNAL(timeout()), this, SLOT(slideTick()));	connect(ui.SlidePushButton, SIGNAL(clicked()), this, SLOT(propagateSlideClicked()));	connect(ui.SlidePushButton, SIGNAL(clicked()), this, SLOT(slide()));	// Attaching Signals and Slots for Zooming	connect(ui.ZoomInPushButton, SIGNAL(clicked()), this, SLOT(zoomIn()));	connect(ui.ZoomOutPushButton, SIGNAL(clicked()), this, SLOT(zoomOut()));	// Connecting internal Signals with external ones, for encapsulation	connect(ui.BackPushButton, SIGNAL(clicked()), this, SIGNAL(backClicked()));	connect(ui.ForwardPushButton, SIGNAL(clicked()), this, SIGNAL(forwardClicked()));	connect(ui.HomePushButton, SIGNAL(clicked()), this, SIGNAL(homeClicked()));	connect(ui.ZoomSlider, SIGNAL(valueChanged(int)), this, SIGNAL(zoomLevelChanged(int)));	}
开发者ID:detro,项目名称:QDetroBro,代码行数:15,


示例18: switch

/* * Name:        keyPressEvent * Purpose:     user can zoom in or out based on user's use of the keyboard * Arguments:   QKeyEvent * Output:      none * Modifies:    none * Returns:     none * Assumptions: none * Bugs:        none...so far * Notes:       none */void PreView::keyPressEvent(QKeyEvent *event){    switch (event->key()) {    case Qt::Key_Plus:        zoomIn();        break;    case Qt::Key_Minus:        zoomOut();        break;    case Qt::Key_Delete:        break;    default:        QGraphicsView::keyPressEvent(event);    }}
开发者ID:Razmataz88,项目名称:Graphic,代码行数:26,


示例19: QDialog

/** * @brief ImageDialog::ImageDialog * @param parent */ImageDialog::ImageDialog(QWidget *parent) :    QDialog(parent),    ui(new Ui::ImageDialog){    ui->setupUi(this);#ifdef Q_WS_MAC    setWindowFlags((windowFlags() & ~Qt::WindowType_Mask) | Qt::Sheet);    setStyleSheet(styleSheet() + " #ImageDialog { border: 1px solid rgba(0, 0, 0, 100); border-top: none; }");#else    setWindowFlags((windowFlags() & ~Qt::WindowType_Mask) | Qt::Dialog);#endif    QSettings settings;    resize(settings.value("ImageDialog/Size").toSize());    connect(ui->table, SIGNAL(cellClicked(int,int)), this, SLOT(imageClicked(int, int)));    connect(ui->table, SIGNAL(sigDroppedImage(QUrl)), this, SLOT(onImageDropped(QUrl)));    connect(ui->buttonClose, SIGNAL(clicked()), this, SLOT(reject()));    connect(ui->buttonChoose, SIGNAL(clicked()), this, SLOT(chooseLocalImage()));    connect(ui->previewSizeSlider, SIGNAL(valueChanged(int)), this, SLOT(onPreviewSizeChange(int)));    connect(ui->buttonZoomIn, SIGNAL(clicked()), this, SLOT(onZoomIn()));    connect(ui->buttonZoomOut, SIGNAL(clicked()), this, SLOT(onZoomOut()));    QMovie *movie = new QMovie(":/img/spinner.gif");    movie->start();    ui->labelSpinner->setMovie(movie);    clear();    setImageType(TypePoster);    m_currentDownloadReply = 0;    QPixmap zoomOut(":/img/zoom_out.png");    QPixmap zoomIn(":/img/zoom_in.png");    QPainter p;    p.begin(&zoomOut);    p.setCompositionMode(QPainter::CompositionMode_SourceIn);    p.fillRect(zoomOut.rect(), QColor(0, 0, 0, 150));    p.end();    p.begin(&zoomIn);    p.setCompositionMode(QPainter::CompositionMode_SourceIn);    p.fillRect(zoomIn.rect(), QColor(0, 0, 0, 150));    p.end();    ui->buttonZoomOut->setIcon(QIcon(zoomOut));    ui->buttonZoomIn->setIcon(QIcon(zoomIn));    m_noElementsLabel = new QLabel(tr("No images found"), ui->table);    m_noElementsLabel->setMargin(10);    m_noElementsLabel->hide();}
开发者ID:titan04,项目名称:MediaElch,代码行数:52,


示例20: connect

void MainWindow::createConnections(){    connect(fileNewAction, SIGNAL(triggered()),            this, SLOT(fileNew()));    connect(fileOpenAction, SIGNAL(triggered()),            this, SLOT(fileOpen()));    connect(fileSaveAction, SIGNAL(triggered()),            this, SLOT(fileSave()));    connect(fileSaveAsAction, SIGNAL(triggered()),            this, SLOT(fileSaveAs()));    connect(fileExportAction, SIGNAL(triggered()),            this, SLOT(fileExport()));    connect(filePrintAction, SIGNAL(triggered()),            this, SLOT(filePrint()));    connect(fileQuitAction, SIGNAL(triggered()),            this, SLOT(close()));    connect(editSelectedItemAction, SIGNAL(triggered()),            this, SLOT(editSelectedItem()));    connect(editAddTextAction, SIGNAL(triggered()),            this, SLOT(editAddItem()));    connect(editAddBoxAction, SIGNAL(triggered()),            this, SLOT(editAddItem()));    connect(editAddSmileyAction, SIGNAL(triggered()),            this, SLOT(editAddItem()));    connect(editCopyAction, SIGNAL(triggered()),            this, SLOT(editCopy()));    connect(editCutAction, SIGNAL(triggered()),            this, SLOT(editCut()));    connect(editPasteAction, SIGNAL(triggered()),            this, SLOT(editPaste()));    connect(QApplication::clipboard(), SIGNAL(dataChanged()),            this, SLOT(updateUi()));    foreach (QAction *action, QList<QAction*>()             << editAlignmentAction << editAlignLeftAction             << editAlignRightAction << editAlignTopAction             << editAlignBottomAction)        connect(action, SIGNAL(triggered()), this, SLOT(editAlign()));    connect(editClearTransformsAction, SIGNAL(triggered()),            this, SLOT(editClearTransforms()));    connect(scene, SIGNAL(selectionChanged()),            this, SLOT(selectionChanged()));    connect(viewShowGridAction, SIGNAL(toggled(bool)),            this, SLOT(viewShowGrid(bool)));    connect(viewZoomInAction, SIGNAL(triggered()),            view, SLOT(zoomIn()));    connect(viewZoomOutAction, SIGNAL(triggered()),            view, SLOT(zoomOut()));}
开发者ID:gebilaowang,项目名称:pagedesigner,代码行数:48,


示例21: FindPokedRenderer

void cv::viz::InteractorStyle::OnChar(){    // Make sure we ignore the same events we handle in OnKeyDown to avoid calling things twice    FindPokedRenderer(Interactor->GetEventPosition()[0], Interactor->GetEventPosition()[1]);    if (Interactor->GetKeyCode() >= '0' && Interactor->GetKeyCode() <= '9')        return;    String key(Interactor->GetKeySym());    if (key.find("XF86ZoomIn") != String::npos)        zoomIn();    else if (key.find("XF86ZoomOut") != String::npos)        zoomOut();    int keymod = Interactor->GetAltKey();    switch (Interactor->GetKeyCode())    {    // All of the options below simply exit    case 'h': case 'H':    case 'l': case 'L':    case 'p': case 'P':    case 'j': case 'J':    case 'c': case 'C':    case 43:        // KEY_PLUS    case 45:        // KEY_MINUS    case 'f': case 'F':    case 'g': case 'G':    case 'o': case 'O':    case 'u': case 'U':    case 'q': case 'Q':    {        break;    }        // S and R have a special !ALT case    case 'r': case 'R':    case 's': case 'S':    {        if (!keymod)            Superclass::OnChar();        break;    }    default:    {        Superclass::OnChar();        break;    }    }}
开发者ID:93sam,项目名称:opencv,代码行数:48,


示例22: zoomOut

void MainWindow::zoomChanged(int newValue){    int res =  m_lastZoomValue - newValue;    m_lastZoomValue = newValue;    if(res>0)    {        for(int i=0; i<res; i++)            zoomOut();    }    else{        for(int i=0; i<-res; i++)            zoomIn();    }}
开发者ID:asvitenkov,项目名称:GIIS,代码行数:16,


示例23: switch

int QmlJSDebugger::ZoomTool::qt_metacall(QMetaObject::Call _c, int _id, void **_a){    _id = AbstractLiveEditTool::qt_metacall(_c, _id, _a);    if (_id < 0)        return _id;    if (_c == QMetaObject::InvokeMetaMethod) {        switch (_id) {        case 0: zoomTo100(); break;        case 1: zoomIn(); break;        case 2: zoomOut(); break;        default: ;        }        _id -= 3;    }    return _id;}
开发者ID:changbindu,项目名称:ok6410-rootfs,代码行数:16,


示例24: while

    void LayerManager::setViewAndZoomIn(const QList<QPointF> coordinates)    {        while (containsAll(coordinates))        {            setMiddle(coordinates);            zoomIn();        }        if (!containsAll(coordinates))        {            zoomOut();        }        mapcontrol->update();    }
开发者ID:albinpoignot,项目名称:QtProject,代码行数:16,


示例25: zoomIn

void ImageWidget::wheelEvent(QWheelEvent *e){    if(e->modifiers() == Qt::ControlModifier && m_imageLabel->pixmap()!= NULL)    {        if(e->delta() > 0)        {            zoomIn();        }        else  if(e->delta() < 0 )        {            zoomOut();        }        e->accept();    }}
开发者ID:zhming0,项目名称:Modernization-Traffic-Monitoring-System,代码行数:16,


示例26: QWidget

MapWidget::MapWidget(QWidget *parent) :    QWidget(parent),    m_center(55.755831, 37.617673),    m_zoom(10),    m_online(true),    m_lockWheel(false){    m_tiles = new TilesMap(m_center, m_zoom, m_online, this);    connect(m_tiles, SIGNAL(updated(QRect)), SLOT(updateMap(QRect)));    connect(m_tiles, SIGNAL(tilesLoading(int)), SIGNAL(tilesLoading(int)));    connect(m_tiles, SIGNAL(zoomChanged(int)), SIGNAL(zoomChanged(int)));    m_overlays = new Overlays(m_center, m_zoom, this);    m_pointDialog = new PointDialog(this);    connect(m_pointDialog, SIGNAL(accepted()), SLOT(pointDialogAccepted()));    QShortcut *sc;    sc = new QShortcut(QKeySequence("Left"), this);    connect(sc, SIGNAL(activated()), SLOT(panLeft()));    sc = new QShortcut(QKeySequence("Right"), this);    connect(sc, SIGNAL(activated()), SLOT(panRight()));    sc = new QShortcut(QKeySequence("Down"), this);    connect(sc, SIGNAL(activated()), SLOT(panDown()));    sc = new QShortcut(QKeySequence("Up"), this);    connect(sc, SIGNAL(activated()), SLOT(panUp()));    sc = new QShortcut(QKeySequence("PgUp"), this);    connect(sc, SIGNAL(activated()), SLOT(zoomIn()));    sc = new QShortcut(QKeySequence("PgDown"), this);    connect(sc, SIGNAL(activated()), SLOT(zoomOut()));    sc = new QShortcut(QKeySequence("Escape"), this);    connect(sc, SIGNAL(activated()), SLOT(hideAll()));    sc = new QShortcut(QKeySequence("Shift+Insert"), this);    connect(sc, SIGNAL(activated()), SLOT(openAddPointDialog()));    sc = new QShortcut(QKeySequence("E"), this);    connect(sc, SIGNAL(activated()), SLOT(openEditPointDialog()));    sc = new QShortcut(QKeySequence("Delete"), this);    connect(sc, SIGNAL(activated()), SLOT(openDeletePointDialog()));    sc = new QShortcut(QKeySequence("Alt+I"), this);    connect(sc, SIGNAL(activated()), SLOT(switchOnline()));    sc = new QShortcut(QKeySequence("Alt+O, Alt+O"), this);    connect(sc, SIGNAL(activated()), SLOT(openInOSM()));    sc = new QShortcut(QKeySequence("Alt+O, Alt+G"), this);    connect(sc, SIGNAL(activated()), SLOT(openInGoogleMaps()));    sc = new QShortcut(QKeySequence("Alt+O, Alt+Y"), this);    connect(sc, SIGNAL(activated()), SLOT(openInYandexMaps()));}
开发者ID:striker2000,项目名称:xtrip,代码行数:47,


示例27: zoomIn

bool TreeView::eventFilter(QObject *watched, QEvent *event) {    if (watched == treeView()->viewport()) {        if (event->type() == QEvent::Wheel) {            auto wheelEvent = static_cast<QWheelEvent *>(event);            if (wheelEvent->orientation() == Qt::Vertical && wheelEvent->modifiers() & Qt::ControlModifier) {                if (wheelEvent->delta() > 0) {                    zoomIn(1 + wheelEvent->delta() / 360);                } else {                    zoomOut(1 - wheelEvent->delta() / 360);                }                return true;            }        }    }    return QDockWidget::eventFilter(watched, event);}
开发者ID:asdlei00,项目名称:snowman,代码行数:17,


示例28: connect

void BrowserWindow::createConnections(){    connect(webView, SIGNAL(loadProgress(int)),            progressBar, SLOT(setValue(int)));    connect(webView, SIGNAL(urlChanged(const QUrl&)),            this, SLOT(urlChange(const QUrl&)));    connect(webView, SIGNAL(loadFinished(bool)),            this, SLOT(loadFinish(bool)));    connect(setUrlAction, SIGNAL(triggered()), this, SLOT(setUrl()));    connect(historyAction, SIGNAL(triggered()),            this, SLOT(popUpHistoryMenu()));    connect(zoomOutAction, SIGNAL(triggered()),            this, SLOT(zoomOut()));    connect(zoomInAction, SIGNAL(triggered()), this, SLOT(zoomIn()));    connect(zoomSpinBox, SIGNAL(valueChanged(int)),            this, SLOT(setZoomFactor(int)));}
开发者ID:bullda,项目名称:ShanbayDict,代码行数:17,


示例29: QAction

void MainWindow::createActions(){    enterRefPointAct = new QAction(tr("Enter Reference Point"), this);    enterRefPointAct->setShortcut(tr("Ctrl+P"));    connect(enterRefPointAct, SIGNAL(triggered()), this, SLOT(enterRefPoint()));    exitAct = new QAction(tr("Exit"), this);    exitAct->setShortcut(tr("Esc, Alt+F12"));    connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));    normalSizeAct = new QAction(tr("&Normal Size"), this);    normalSizeAct->setShortcut(tr("Ctrl+S"));    normalSizeAct->setEnabled(false);    connect(normalSizeAct, SIGNAL(triggered()), this, SLOT(normalSize()));    openAct = new QAction(tr("&Open..."), this);    openAct->setShortcut(tr("Ctrl+O"));    connect(openAct, SIGNAL(triggered()), this, SLOT(open()));    saveTransfImgAct = new QAction(tr("Save Transformed Image"), this);    saveTransfImgAct->setShortcut(tr("Ctrl+S"));    saveTransfImgAct->setEnabled(false);    connect(saveTransfImgAct, SIGNAL(triggered()), this, SLOT(saveTransfImg()));    showMatrixAct = new QAction(tr("Show Matrix"), this);    showMatrixAct->setShortcut(tr("Ctrl+M"));    connect(showMatrixAct, SIGNAL(triggered()), this, SLOT(showMatrix()));    transformAct = new QAction(tr("&Tranform"), this);    transformAct->setShortcut(tr("Ctrl+T"));    connect(transformAct, SIGNAL(triggered()), this, SLOT(transform()));    testMatrixAct = new QAction(tr("Set Test Matrix"), this);    testMatrixAct->setShortcut(tr("Ctrl+E"));    connect(testMatrixAct, SIGNAL(triggered()), this, SLOT(setTestMatrix()));    zoomInAct = new QAction(tr("Zoom &In (25%)"), this);    zoomInAct->setShortcut(tr("Ctrl++"));    zoomInAct->setEnabled(false);    connect(zoomInAct, SIGNAL(triggered()), this, SLOT(zoomIn()));    zoomOutAct = new QAction(tr("Zoom &Out (25%)"), this);    zoomOutAct->setShortcut(tr("Ctrl+-"));    zoomOutAct->setEnabled(false);    connect(zoomOutAct, SIGNAL(triggered()), this, SLOT(zoomOut()));}
开发者ID:StrixSeloputo,项目名称:Transformation,代码行数:46,


示例30: ChartGraphicsObject

void QtRenderer::ConnectPlugin( UpWindSceneInterface* scene, QWidget* frame, CoreChartProvider* model ){    CoreViewRenderer::ConnectPlugin(scene, frame, model);    QGraphicsScene *graphicsScene = new QGraphicsScene;    QRectF chartBoundaries = model->getChartBoundaries();    n_chartGraphicsObject = new ChartGraphicsObject(frame->size());    routeWidget = new RouteWidget(frame->size(),scene,chartBoundaries);    boatWidget = new BoatWidget(frame->size(), scene, chartBoundaries);    // Make sure the view gets mouse events for dragging    n_chartGraphicsObject->setAcceptedMouseButtons(Qt::NoButton);    // Set routepoints with right mouse buttons    routeWidget->setAcceptedMouseButtons(Qt::RightButton);    graphicsScene->addItem(n_chartGraphicsObject);    graphicsScene->addItem(routeWidget);    Boat *boat = new Boat(frame->size(), chartBoundaries);    scene->setBoat(boat);    graphicsScene->addItem(scene->getBoat()->getBoatImage());    // put boat image on screen.    graphicsScene->addItem(scene->getBoat()->getBoatCompass());    //graphicsScene->addItem(scene->getBoat()->getBoatGPS());    graphicsScene->addItem(scene->getBoat()->getPortLayline());    graphicsScene->addItem(scene->getBoat()->getStarBoardLayline());    connect(scene->getBoat(), SIGNAL(boatPositionChanged()), this, SLOT(handleBoatPositionChanged()));    boatWidget->setBoat(scene->getBoat());    boatWidget->updateBoatPosition();    view = new ChartView(graphicsScene, frame);    connect(view, SIGNAL(wheelUp()), this, SLOT(zoomOut()));    connect(view, SIGNAL(wheelDown()), this, SLOT(zoomIn()));    view->setResizeAnchor(QGraphicsView::AnchorViewCenter);    view->setGeometry(0, 0, frame->size().width(), frame->size().height());    n_chartGraphicsObject->setModel(model);    view->lower();    view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);    view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);    view->setDragMode(QGraphicsView::ScrollHandDrag);    view->setInteractive(true);    view->setScene(graphicsScene);    QPixmapCache::setCacheLimit(1024 * 320);}
开发者ID:emoratac,项目名称:devel,代码行数:46,



注:本文中的zoomOut函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ zpoller_destroy函数代码示例
C++ zoomIn函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。