本文整理汇总了C++中resetView函数的典型用法代码示例。如果您正苦于以下问题:C++ resetView函数的具体用法?C++ resetView怎么用?C++ resetView使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了resetView函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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()));
}
示例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();
}
示例3: QToolButton
QCustomButton::QCustomButton(QWidget *parent) : QToolButton(parent)
{
setMouseTracking(true);
setAttribute(Qt::WA_Hover);
this->setCursor(Qt::ArrowCursor);
resetView();
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
}
}
示例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);
}
}
示例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();
}
示例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();
}
示例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);
}
示例12: glClear
void InfoScreen::draw()
{
glClear(GL_COLOR_BUFFER_BIT);
resetView(INFO_FRAME_SIZE[X], INFO_FRAME_SIZE[Y]);
//----- DRAW SCREEN -----//
draw(true);
}
示例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();
}
示例14: resetView
void LogViewWidget::setSearchCaseSensitive() {
caseSensitive = !caseSensitive;
if (caseSensitive) {
highlighter->reg_exp.setCaseSensitivity(Qt::CaseSensitive);
} else {
highlighter->reg_exp.setCaseSensitivity(Qt::CaseInsensitive);
}
resetView();
}
示例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();
}