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

C++ resetView函数代码示例

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

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



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

示例1: CurvesSettings

void CurvesManagerView::createCurvesSettings()
{
    curvesSettings = new CurvesSettings(this);
    ui->curvesSettingsLayout->addWidget(curvesSettings);
    connect(curvesFiller, SIGNAL(dataWasSetted()), curvesSettings, SLOT(resetView()));
    connect(curvesSettings, SIGNAL(visibilityCurveChanged()), curvesFiller, SLOT(resetModel()));
}
开发者ID:rasmadeus,项目名称:Rragraph,代码行数:7,代码来源:CurvesManagerView.cpp


示例2: vec3f

StackGraph::StackGraph() {

    vertical = false;

    in_transition = 0.0;

    border_colour = vec3f(0.5, 0.5, 0.5);

    debug = false;

    // todo.. need a resource dir variable.. and put fonts under data/fonts/
    titlefont = fontmanager.grab("FreeSans.ttf", 18);
    titlefont.dropShadow(true);
    titlefont.shadowStrength(gFontShadow);

    timefont  = fontmanager.grab("FreeSans.ttf", 14);
    timefont.dropShadow(true);
    timefont.shadowStrength(gFontShadow);

    keyfont  = fontmanager.grab("FreeSans.ttf", 14);
    keyfont.dropShadow(true);
    keyfont.shadowStrength(gFontShadow);

    theme_black = true;

    activeNode = 0;

    resetView();
}
开发者ID:acaudwell,项目名称:ConfHUD,代码行数:29,代码来源:graph.cpp


示例3: QToolButton

QCustomButton::QCustomButton(QWidget *parent) : QToolButton(parent)
{
    setMouseTracking(true);
    setAttribute(Qt::WA_Hover);
    this->setCursor(Qt::ArrowCursor);
    resetView();
}
开发者ID:kimphg,项目名称:Jupiter,代码行数:7,代码来源:qcustombutton.cpp


示例4: array

//handle resize events by modifying the area rectangle accordingly
void MandelbrotViewer::resizeWindow(int new_x, int new_y) {

    //save the old center and resolution
    double center_x = area.left + area.width/2.0;
    double center_y = area.top + area.height/2.0;

    res_width = new_x;
    res_height = new_y;

    //calculate the new area
    area.width = area_inc * res_width;
    area.height = area_inc * res_height;
    area.left = center_x - area.width/2.0;
    area.top = center_y - area.height/2.0;
    area_inc = area.width/res_width;

    //resize the image, texture, and sprite
    image.create(res_width, res_height, sf::Color::Black);
    texture.create(res_width, res_height);
    sprite.setTextureRect(sf::IntRect(0, 0, res_width, res_height));
    sprite.setTexture(texture);

    //resize the image_array
    size_t sizeX = res_width;
    size_t sizeY = res_height;
    std::vector< std::vector<int> > array(sizeY, std::vector<int>(sizeX));
    image_array = array;

    resetView();
}
开发者ID:darsor,项目名称:mandelbrot,代码行数:31,代码来源:mandelbrotViewer.cpp


示例5: resetView

void Camera::resetTarget(const ego_mesh_t *mesh)
{
    // Save some values.
    CameraTurnMode turnModeSave = _turnMode;
    CameraMovementMode moveModeSave = _moveMode;

    // Get back to the default view matrix.
    resetView();

    // Specify the modes that will make the camera point at the players.
    _turnMode = CameraTurnMode::Auto;
    _moveMode = CameraMovementMode::Reset;

    // If you use Camera::MoveMode::Reset,
    // Camera::update() automatically restores _moveMode to its default setting.
    update(mesh);

    // Fix the center position.
    _center[kX] = _trackPos[kX];
    _center[kY] = _trackPos[kY];

    // Restore the modes.
    _turnMode = turnModeSave;
    _moveMode = moveModeSave;

    // reset the turn time
    _turnTime = 0;
}
开发者ID:italoalesil,项目名称:egoboo,代码行数:28,代码来源:Camera.cpp


示例6: resetView

void Controller::changeAppState()
{
    resetView();

    switch(mAppStateType)
    {
        case AppState::StateType::Menu:
        {
            mCurrentAppState = std::unique_ptr<GameState>(new GameState(*this
                                                                        , mWindow
//                                                                        , mHighScoreTable.get()
                                                                        , mUserName));
            mAppStateType = AppState::StateType::Game;
            break;

        }
        case AppState::StateType::Game:
        {
            mCurrentAppState = std::unique_ptr<MenuState>(new MenuState(*this
                                                                        , mWindow));
            mAppStateType = AppState::StateType::Menu;
            break;
        }
        default: break;
    }

    mChangeState = false;
}
开发者ID:RichardSlade,项目名称:Flocky-Sheep,代码行数:28,代码来源:controller.cpp


示例7: resetView

void StackGraph::keyPress(SDL_KeyboardEvent *e) {
    if (e->type == SDL_KEYUP) return;

    if (e->type == SDL_KEYDOWN) {
        if (e->keysym.sym == SDLK_ESCAPE) {
            appFinished=true;
        }

        if (e->keysym.sym == SDLK_SPACE) {
            paused = !paused;
        }

        if (e->keysym.sym == SDLK_c) {
            theme_black = !theme_black;
            resetView();
        }

        if (e->keysym.sym == SDLK_v) {
            toggleVertical();
        }

        if (e->keysym.sym == SDLK_q) {
            debug = !debug;
        }
    }
}
开发者ID:acaudwell,项目名称:ConfHUD,代码行数:26,代码来源:graph.cpp


示例8: if

void AppWindow::keyPressEvent(QKeyEvent *event) {
    if (event->key() == Qt::Key_Escape) {
        QCoreApplication::instance()->quit();
    } else if (event->key() == Qt::Key_O) {
     viewRotate();
     viewRotateAct->setChecked(true);
 } else if (event->key() == Qt::Key_N) {
    viewTranslate();
    viewTranslateAct->setChecked(true);
} else if (event->key() == Qt::Key_P) {
    viewPerspective();
    viewPerspectiveAct->setChecked(true);
} else if (event->key() == Qt::Key_R) {
    modelRotate();
    modelRotateAct->setChecked(true);
} else if (event->key() == Qt::Key_T) {
    modelTranslate();
    modelTranslateAct->setChecked(true);
} else if (event->key() == Qt::Key_S) {
    modelScale();
    modelScaleAct->setChecked(true);
} else if (event->key() == Qt::Key_A) {
    resetView();
} else if (event->key() == Qt::Key_V) {
    viewPortMode();
    viewPortModeAct->setChecked(true);
}
}
开发者ID:tejkoorapati,项目名称:graphics,代码行数:28,代码来源:AppWindow.cpp


示例9: re

void LogViewWidget::sl_onTextEdited(const QString & text) {
    QRegExp re(text);
    if (highlighter->reg_exp.patternSyntax() == QRegExp::RegExp && !re.isValid())
        return;

    highlighter->reg_exp.setPattern(text);
    resetView();
}
开发者ID:ggrekhov,项目名称:ugene,代码行数:8,代码来源:LogView.cpp


示例10: QTabWidget

QCustomTabWidget::QCustomTabWidget(QWidget *parent) : QTabWidget(parent)
{
    setMouseTracking(true);
    //this->setStyleSheet("background-color: rgb(30, 50, 70);color:rgb(255, 255, 255);font: 12pt \"MS Shell Dlg 2\";");
    setAttribute(Qt::WA_Hover);
    this->setCursor(Qt::ArrowCursor);
    resetView();
}
开发者ID:kimphg,项目名称:Jupiter,代码行数:8,代码来源:qcustomtabwidget.cpp


示例11: resetView

//similar to changePos, but it's an absolute zoom and it only changes the view
//instead of setting new parameters to regenerate the mandelbrot
void MandelbrotViewer::changePosView(sf::Vector2f new_center, double zoom_factor) {
    //reset the view so that we can apply an absolute zoom, instead of relative
    resetView();

    //set new center and zoom
    view->setCenter(new_center);
    view->zoom(zoom_factor);
}
开发者ID:darsor,项目名称:mandelbrot,代码行数:10,代码来源:mandelbrotViewer.cpp


示例12: glClear

void InfoScreen::draw()
{
	glClear(GL_COLOR_BUFFER_BIT);
	resetView(INFO_FRAME_SIZE[X], INFO_FRAME_SIZE[Y]);
	
	//----- DRAW SCREEN -----//
	draw(true);
}
开发者ID:Kartonschachtel,项目名称:public,代码行数:8,代码来源:InfoScreen.cpp


示例13: setColumnsWidth

void Matrix::restore(const QStringList &lst)
{
	QStringList l;
	QStringList::const_iterator i = lst.begin();

	l = (*i++).split("\t");
	setColumnsWidth(l[1].toInt());

	l = (*i++).split("\t");
	if (l[0] == "Formula")
		formula_str = l[1];
	else if (l[0] == "<formula>"){
		for(formula_str=""; i != lst.end() && *i != "</formula>"; i++)
			formula_str += *i + "\n";
		formula_str.truncate(formula_str.length()-1);
		i++;
	}

	l = (*i++).split("\t");
	if (l[1] == "f")
		setTextFormat('f', l[2].toInt());
	else
		setTextFormat('e', l[2].toInt());

	l = (*i++).split("\t");
	x_start = l[1].toDouble();
	x_end = l[2].toDouble();
	y_start = l[3].toDouble();
	y_end = l[4].toDouble();

	l = (*i++).split("\t");
	d_view_type = (Matrix::ViewType)l[1].toInt();
	l = (*i++).split("\t");
	d_header_view_type = (Matrix::HeaderViewType)l[1].toInt();
	l = (*i++).split("\t");
	d_color_map_type = (Matrix::ColorMapType)l[1].toInt();

    if (lst.contains ("<ColorMap>")){
        QStringList aux;
        while (*i != "</ColorMap>"){
            aux << *i;
            i++;
        }
        setColorMap(aux);
    }

    if (d_view_type == ImageView){
	    if (d_table_view)
            delete d_table_view;
        if (d_select_all_shortcut)
            delete d_select_all_shortcut;
	    initImageView();
		d_stack->setCurrentWidget(imageLabel);
		if (d_color_map_type == Rainbow)
            setRainbowColorMap();
	}
    resetView();
}
开发者ID:BackupTheBerlios,项目名称:qtiplot-svn,代码行数:58,代码来源:Matrix.cpp


示例14: resetView

void LogViewWidget::setSearchCaseSensitive() {
    caseSensitive = !caseSensitive;
    if (caseSensitive) {
        highlighter->reg_exp.setCaseSensitivity(Qt::CaseSensitive);
    } else {
        highlighter->reg_exp.setCaseSensitivity(Qt::CaseInsensitive);
    }
    resetView();
}
开发者ID:ggrekhov,项目名称:ugene,代码行数:9,代码来源:LogView.cpp


示例15: if

//sets the rotation and regenerates the mandelbrot
void MandelbrotViewer::setRotation(double radians) {
    rotation = radians;
    if (rotation >= 2 * PI) rotation -= 2 * PI;
    else if (rotation < 0) rotation += 2 * PI;
    generate();
    resetView();
    updateMandelbrot();
    refreshWindow();
}
开发者ID:darsor,项目名称:mandelbrot,代码行数:10,代码来源:mandelbrotViewer.cpp


示例16: init

int init( void )
{
    // general settings
    srand( time( NULL ) );
    glClearColor( skyColor.x, skyColor.y, skyColor.z, 1.0 );
    glEnable( GL_DEPTH_TEST );
    glEnable( GL_TEXTURE_3D );
    glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
    glPixelStorei( GL_PACK_ALIGNMENT, 1 );
    glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
    
    // set up data and shaders
    for( int y = 0; y < 3; ++y )
    {
        for( int x = 0; x < 3; ++x )
        {
            newMesh( x, y, LEFT | DOWN );
        }
    }
    for( int y = 0; y < 3; ++y )  // normals must be calculated AFTER all vertices are set
    {
        for( int x = 0; x < 3; ++x )
        {
            createMeshNormals( x, y );
        }
    }
    resetView();
    shaderProgram = InitShader( "vert.glsl", "frag.glsl" );
    
    // buffer vertex and index data
    glGenBuffers( 9, (GLuint*)pointBuffer );
    glGenBuffers( 9, (GLuint*)indexBuffer );
    for( int x = 0; x < 3; ++x )
    {
        for( int y = 0; y < 3; ++y )
        {
            bufferData( x, y );
        }
    }
    
    // create ground texture
    createAndBufferTexture();
    
    // connect vertex attributes
    vPositionLoc = glGetAttribLocation( shaderProgram, "a_vPosition" );
    glEnableVertexAttribArray( vPositionLoc );
    vNormalLoc = glGetAttribLocation( shaderProgram, "a_vNormal" );
    glEnableVertexAttribArray( vNormalLoc );
    
    // get location of uniforms
    maxHeightLoc = glGetUniformLocation( shaderProgram, "u_fMaxHeight" );
    mvMatrixLoc = glGetUniformLocation( shaderProgram, "u_mv_Matrix" );
    
    glUniform1f( maxHeightLoc, maxHeight );
    
    return 1;
}
开发者ID:blaws,项目名称:InfiniteWorld,代码行数:57,代码来源:terrain.cpp


示例17: Q_UNUSED

void LogViewWidget::showEvent(QShowEvent *e) {
    Q_UNUSED(e);
    if (!connected) {
        updateViewTimer.start(100);
        LogServer::getInstance()->addListener(this);
        connected = !connected;
    }

    resetView();
}
开发者ID:ggrekhov,项目名称:ugene,代码行数:10,代码来源:LogView.cpp


示例18: setupPane

void PropertyEditorView::setupPanes()
{
    if (isAttached()) {
        QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
        setupPane("QtQuick.Item");
        resetView();
        m_setupCompleted = true;
        QApplication::restoreOverrideCursor();
    }
}
开发者ID:KeeganRen,项目名称:qt-creator,代码行数:10,代码来源:propertyeditorview.cpp


示例19: resetView

void Matrix::setHeaderViewType(HeaderViewType type)
{
    if (d_header_view_type == type)
        return;

    d_header_view_type = type;

    if (d_view_type == TableView)
        resetView();
	emit modifiedWindow(this);
}
开发者ID:BackupTheBerlios,项目名称:qtiplot-svn,代码行数:11,代码来源:Matrix.cpp


示例20: refreshDirection

Camera::Camera(float init_angle){
	i = new float[3];
	i[0] = 0;
	i[1] = 0;
	i[2] = 0;
	d = new float[3];
	d[1] = 0;
	angle = init_angle;
	refreshDirection();
	resetView(800, 600);
}
开发者ID:ramonsaraiva,项目名称:objeditor,代码行数:11,代码来源:camera.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ reset_buf函数代码示例发布时间:2022-05-30
下一篇:
C++ resetTransform函数代码示例发布时间: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