• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ refreshPixmap函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: switch

void plotter::keyPressEvent(QKeyEvent *event)
{
    switch (event->key()) {
    case Qt::Key_Plus:
        zoomIn();
        break;
    case Qt::Key_Minus:
        zoomOut();
        break;
    case Qt::Key_Left:
        zoomStack[curZoom].scroll(-1, 0);
        refreshPixmap();
        break;
    case Qt::Key_Right:
        zoomStack[curZoom].scroll(+1, 0);
        refreshPixmap();
        break;
    case Qt::Key_Down:
        zoomStack[curZoom].scroll(0, -1);
        refreshPixmap();
        break;
    case Qt::Key_Up:
        zoomStack[curZoom].scroll(0, +1);
        refreshPixmap();
        break;
    default:
        QWidget::keyPressEvent(event);
    }
}
开发者ID:nbermudezs,项目名称:data-structure-class,代码行数:29,代码来源:plotter.cpp


示例2: refreshPixmap

void plotter::setPlotSettings(const PlotSettings &settings)
{
    zoomStack.clear();
    zoomStack.append(settings);
    curZoom = 0;
    refreshPixmap();
}
开发者ID:nbermudezs,项目名称:data-structure-class,代码行数:7,代码来源:plotter.cpp


示例3: width

void Plotter::resizeEvent(QResizeEvent * /* event */)
{
    int x = width() - (zoomInButton->width() + zoomOutButton->width() + 10);
    zoomInButton->move(x, 5);
    zoomOutButton->move(x + zoomInButton->width() + 5, 5);
    refreshPixmap();
}
开发者ID:kernelhcy,项目名称:hcyprojects,代码行数:7,代码来源:plotter.cpp


示例4: QWidget

LayerItem::LayerItem(Qt::BrushStyle brushStyle, qreal heightRatio, qreal lengthRatio, QWidget *parent)
        : QWidget(parent), _brushStyle(brushStyle), _heightRatio(heightRatio), _lengthRatio(lengthRatio)
{
    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
    setAttribute(Qt::WA_DeleteOnClose);
    refreshPixmap();
}
开发者ID:BackupTheBerlios,项目名称:qtfin-svn,代码行数:7,代码来源:layeritem.cpp


示例5: LinearSynthesis

void
WaveformPlot::setMode(int _mode) {
    mode = _mode;
    delete waveForm;
    waveForm = new LinearSynthesis(mode);

    refreshPixmap();
}
开发者ID:vsr83,项目名称:miniSynth,代码行数:8,代码来源:waveformPlot.cpp


示例6: setRubberBandRect

void Plotter::updateZoom(QRect pRect,PlotSettings pSettings)
{
    setRubberBandRect(&pRect);
    m_ZoomSettings = new PlotSettings();
    m_ZoomSettings = &pSettings;
    m_moveFlag = true;
    refreshPixmap();
}
开发者ID:Qmax,项目名称:PT6,代码行数:8,代码来源:plotter.cpp


示例7: refreshPixmap

void plotter::setPlotSettings(const PlotSettings &settings)
{
    zoomStack.clear();
    zoomStack.append(settings);
    curZoom = 0;
    zoomInButton->hide();
    zoomOutButton->hide();
    refreshPixmap();
}
开发者ID:TiKunze,项目名称:mne-cpp,代码行数:9,代码来源:plotter.cpp


示例8: refreshPixmap

void Plotter::wheelEvent(QWheelEvent *event)
{
    int numDegrees = event->delta() /8;
    int numTicks = numDegrees / 15;
    if(event->orientation() == Qt::Horizontal)
        zoomStack[curZoom].scroll(numTicks,0);
    else
        zoomStack[curZoom].scroll(0,numTicks);
   refreshPixmap();
}
开发者ID:Qmax,项目名称:PT6,代码行数:10,代码来源:plotter.cpp


示例9: refreshPixmap

void Graph::curveMapper()
{
    static int i = 0;

    pointStorage_0.append(QPoint(axsTime_0, axsValue_0));
    pointStorage_1.append(QPoint(axsTime_1, axsValue_1));

    axsTime_0++;
    axsTime_1++;
    axsValue_0 += 2;
    axsValue_1 += 1;

    i++;

    refreshPixmap();
}
开发者ID:jiick,项目名称:Amp,代码行数:16,代码来源:graph.cpp


示例10: refreshPixmap

void Plotter::wheelEvent(QWheelEvent *event)
{
    //the distance the wheel was rotated in eighths of a degree
    int numDegrees = event->delta() / 8;
    int numTicks = numDegrees / 15;

    if (event->orientation() == Qt::Horizontal)
    {
        zoomStack[curZoom].scroll(numTicks, 0);
    }
    else
    {
        zoomStack[curZoom].scroll(0, numTicks);
    }
    refreshPixmap();
}
开发者ID:kernelhcy,项目名称:hcyprojects,代码行数:16,代码来源:plotter.cpp


示例11: QWidget

Graph::Graph(QWidget *parent)
    : QWidget(parent), axsTime_0(0), axsTime_1(0), axsValue_0(0), axsValue_1(0)
{
    setBackgroundRole(QPalette::Dark);
    setAutoFillBackground(true);
    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    setFocusPolicy(Qt::StrongFocus);

    rubberBandIsShown = false;

    refreshPixmap();

    timer = new QTimer();
    connect(timer, SIGNAL(timeout()), this, SLOT(curveMapper()));

    //QTimer::singleShot(5000, this, SLOT(startCount()));
}
开发者ID:jiick,项目名称:Amp,代码行数:17,代码来源:graph.cpp


示例12: Q_ASSERT

void
FFTPlot::fftUpdate(fftw_complex *out, unsigned int size, unsigned int ind_dataset) {
    Q_ASSERT(ind_dataset < numPlots);

    if (fftSizes[ind_dataset] != size) {
        if (fftSizes[ind_dataset] > 0) {
            delete [] fftAmpls[ind_dataset];
        }
        fftSizes[ind_dataset] = size;
        fftAmpls[ind_dataset] = new qreal[size];
    }
    qreal *fftAmpl = fftAmpls[ind_dataset];
    for (unsigned int ind=0; ind < fftSizes[ind_dataset]; ind++) {
        qreal re = out[ind][0], im = out[ind][1];

        fftAmpl[ind] = 0.5*qSqrt(re*re + im*im)/fftSizes[ind_dataset];
        if (fftAmpl[ind] == 0) {
            fftAmpl[ind] = minampl;
        }
    }
    refreshPixmap();
}
开发者ID:vsr83,项目名称:miniSynth,代码行数:22,代码来源:fftplot.cpp


示例13: refreshPixmap

void
WaveformPlot::resizeEvent(QResizeEvent *event) {
    refreshPixmap();
    Q_UNUSED(event);
}
开发者ID:vsr83,项目名称:miniSynth,代码行数:5,代码来源:waveformPlot.cpp


示例14: switch

void Plotter::keyPressEvent(QKeyEvent *event)
{
    switch(event->key())
    {
    case Qt::Key_Right:
        if(rubberBandRect.x() < this->width()-(rubberBandRect.width()-10))
        {
        rubberBandRect.setLeft(rubberBandRect.x() + 10);
        rubberBandRect.setWidth(rubberBandRect.width()+10);
        updateRubberBandRegion();
        }
        break;
    case Qt::Key_Left:
        if(rubberBandRect.x() > 10){
        rubberBandRect.setLeft(rubberBandRect.x() - 10);
        rubberBandRect.setWidth(rubberBandRect.width()-10);
        updateRubberBandRegion();

    }
        break;
    case Qt::Key_Down:
        if(rubberBandRect.y() < this->height()-rubberBandRect.height()){
        rubberBandRect.setTop(rubberBandRect.y() + 10);
        rubberBandRect.setHeight(rubberBandRect.height()+10);
        updateRubberBandRegion();

    }
        break;
    case Qt::Key_Up:
        if(rubberBandRect.y() >0){
        rubberBandRect.setTop(rubberBandRect.y() - 10);
        rubberBandRect.setHeight(rubberBandRect.height()-10);
        updateRubberBandRegion();

    }
        break;
     default: QWidget::keyPressEvent(event);
    }
    QRect rect = rubberBandRect.normalized();
    if(rect.width() < 4 || rect.height() < 4 )
    {
        return;
    }
    rect.translate(-Margin,-Margin);
    PlotSettings prevSettings = zoomStack[curZoom];
    PlotSettings settings;
    settings.m_nOffset = prevSettings.m_nOffset;
    double dx = prevSettings.spanX() / (width()-2*Margin);
    double dy = prevSettings.spanY() / (height()-2*Margin);
    settings.minX = prevSettings.minX + dx * rect.left();
    settings.maxX = prevSettings.minX + dx * rect.right();
    settings.minY = prevSettings.maxY - dy * rect.bottom();
    settings.maxY = prevSettings.maxY - dy * rect.top();
    settings.adjust();
    PlotSettings *pTemp = new PlotSettings();
    pTemp = &settings;
    zoomStack.resize(curZoom + 1);
    zoomStack.append(settings);
    refreshPixmap();
    emit moveWindow(rubberBandRect,settings);
}
开发者ID:Qmax,项目名称:PT6,代码行数:61,代码来源:plotter.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ refreshUI函数代码示例发布时间:2022-05-30
下一篇:
C++ refreshList函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap