void ProgressDialog::setCurrent( int subCurrent, bool bRedrawUpdate ) { if ( m_progressStack.empty() ) return; ProgressLevelData& pld = m_progressStack.back(); pld.m_current = subCurrent; recalc( bRedrawUpdate ); }
void spinner(void) { read(); recalc(); upload(); compute_histogram(); update(); }
void ProgressDialog::step( bool bRedrawUpdate ) { if ( m_progressStack.empty() ) return; ProgressLevelData& pld = m_progressStack.back(); pld.m_current.fetchAndAddRelaxed(1); recalc(bRedrawUpdate); }
void UIPopupBox::setTitleIcon(const QIcon &icon) { /* Remember new title-icon: */ m_titleIcon = icon; /* Update title-icon: */ updateTitleIcon(); /* Recalculate title-size: */ recalc(); }
bool QSplitter::event( QEvent *e ) { if ( e->type() == QEvent::LayoutHint || ( e->type() == QEvent::Show && data->firstShow ) ) { recalc( isVisible() ); if ( e->type() == QEvent::Show ) data->firstShow = FALSE; } return QWidget::event( e ); }
void UIPopupBox::setTitle(const QString &strTitle) { /* Remember new title: */ m_strTitle = strTitle; /* Update title: */ updateTitle(); /* Recalculate title-size: */ recalc(); }
void GuiTextbox::set_caret_position(int pos) { int sz = static_cast<int>(text.length()); caret_position = pos; if (caret_position > sz) { caret_position = sz; } recalc(); }
void PictureFlowPrivate::setZoomFactor(int z) { if(z <= 0) return; zoom = z; recalc(buffer.width(), buffer.height()); triggerRender(); }
void UIPopupBox::setWarningIcon(const QIcon &icon) { /* Remember new warning-icon: */ m_warningIcon = icon; /* Update warning-icon: */ updateWarningIcon(); /* Recalculate title-size: */ recalc(); }
void FOX16_HtmlLabel::setText(const FXString& text) { m_haveDefaultDims=false; m_text=text; updateHtml(); flags|=FLAG_DIRTY; layout(); recalc(); update(); }
void DetunerPlugin::setParameter (int index, float newValue) { if (Pars->getParameter(index) != newValue) {Pars->setParameter(index,newValue);} //calcs here recalc(); }
Camera::Camera() //startwerte der perspective camera { proj = glm::perspective(45.0f, 1.0f, 0.1f, 100.0f); eye = vec3(0,2,-5); lookAt = vec3(2.5,0,0); up = vec3(0,1,0); recalc(); }
void collision_avoided(double direction, struct timeval time){ running = 0; current.timer = time; free(route.path); compare_tile(); current.current_destination.angle = direction; update_position(¤t); compare_tile(); recalc(); }
//----------------------------------------------------------------------------- // name: next() // desc: move step towards dest //----------------------------------------------------------------------------- void ViewRegionInterp::next() { // do nothing if( m_alpha >= 1.0 ) return; // compute the alpha m_alpha = (AudicleWindow::main()->get_current_time() - m_start) / m_dur; // alpha recalc(); }
void GuiScroll::set_value(int value) { int old_value = current_value; current_value = value; recalc(); if (current_value != old_value) { if (on_value_changed) { on_value_changed(this, on_value_changed_data, current_value); } } }
void filter_rc_device::filter_rc_set_RC(int type, double R1, double R2, double R3, double C) { m_stream->update(); m_type = type; m_R1 = R1; m_R2 = R2; m_R3 = R3; m_C = C; recalc(); }
void obrasslamp(int i) { spelknow[i]++; Printf("Spell: %s -- %s<br/>", spelname[i], speldescript[i]); Print("The genie prefers not to be disturbed again."); forget(); recalc(); UpdateStatus(); }
void ScrollContainerWidget::init() { setFlags(WIDGET_ENABLED); _type = kScrollContainerWidget; _verticalScroll = new ScrollBarWidget(this, _w-16, 0, 16, _h); _verticalScroll->setTarget(this); _scrolledX = 0; _scrolledY = 0; _limitH = 140; recalc(); }
inline void chooser::right_rotale(pitem p) { assert(p->L); pitem q = p->L; if (p->parent) { if (is_left_child(p)) { p->parent->L = q; } else { p->parent->R = q; } } p->L = q->R; q->R = p; recalc(p->L); recalc(p); make_parent(p->parent, q); make_parent(q, p); recalc(q); recalc(q->parent); }
uint8_t graph_threshold_edges( graph_t *gin, graph_t *gout, uint32_t nedges, uint32_t flags, void *opt, uint8_t (*init)(graph_t *g), uint8_t (*remove)( graph_t *g, double *space, array_t *edges, graph_edge_t *edge), uint8_t (*recalc)( graph_t *g, graph_edge_t *edge) ) { uint64_t i; uint32_t nnodes; double *space; array_t edges; graph_edge_t edge; edges.data = NULL; space = NULL; nnodes = graph_num_nodes(gin); if (array_create(&edges, sizeof(graph_edge_t), 10)) goto fail; if (graph_copy(gin, gout)) goto fail; if (stats_cache_init(gout)) goto fail; space = calloc(nnodes,sizeof(double)); if (space == NULL) goto fail; init(gout); for (i = 0; i < nedges; i++) { array_clear(&edges); if (remove(gout, space, &edges, &edge)) goto fail; if (i == nedges -1) break; if (recalc(gout, &edge)) goto fail; } array_free(&edges); free(space); return 0; fail: if (edges.data != NULL) array_free(&edges); if (space != NULL) free(space); return 1; }
mouse_grid_t::mouse_grid_t( int cols, int rows, int offset_x, int offset_y, int cell_width, int cell_height) : cols(cols), rows(rows), gx(offset_x), gy(offset_y), cw(cell_width), ch(cell_height) { recalc(); }
// Change the font void TextLabel::setFont(FXFont* fnt) { if (!fnt) fxerror("%s::setFont: NULL font specified.\n",getClassName()); if (font!=fnt) { font=fnt; recalc(); update(); } }
void GuiListbox::setup(const std::string& title) { sb = gui.create_vscroll(this, get_width() - GuiScroll::Size, 0, get_height(), 0, 0, 0, static_scroll_changed, this); title_bar = new GuiListboxEntry(gui, this, title); title_bar_visible = false; start_index = 0; selected_index = -1; mouse_is_down = false; recalc(); }
void ScrollBarWidget::checkBounds(int old_pos) { if (_numEntries <= _entriesPerPage || _currentPos < 0) _currentPos = 0; else if (_currentPos > _numEntries - _entriesPerPage) _currentPos = _numEntries - _entriesPerPage; if (old_pos != _currentPos) { recalc(); draw(); sendCommand(kSetPositionCmd, _currentPos); } }
GuiScroll::GuiScroll(Gui& gui, GuiObject *parent, int x, int y, int width, int height, int min_value, int max_value, int initial_value, ValueChanged on_value_changed, void *on_value_changed_data) : GuiObject(gui, parent, x, y, width, height), on_value_changed(on_value_changed), on_value_changed_data(on_value_changed_data), min_value(min_value), max_value(max_value), current_value(initial_value) { if (min_value > max_value) { std::swap(min_value, max_value); } recalc(); }
void QSmoothedAnimation::init() { if (velocity == 0) { stop(); return; } if (delayedStopTimer.isActive()) delayedStopTimer.stop(); initialValue = target.read().toReal(); lastTime = this->currentTime(); if (to == initialValue) { stop(); return; } bool hasReversed = trackVelocity != qreal(0.) && ((!invert) == ((initialValue - to) > 0)); if (hasReversed) { switch (reversingMode) { default: case QDeclarativeSmoothedAnimation::Eased: initialVelocity = -trackVelocity; break; case QDeclarativeSmoothedAnimation::Sync: QDeclarativePropertyPrivate::write(target, to, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); trackVelocity = 0; stop(); return; case QDeclarativeSmoothedAnimation::Immediate: initialVelocity = 0; break; } } trackVelocity = initialVelocity; invert = (to < initialValue); if (!recalc()) { QDeclarativePropertyPrivate::write(target, to, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); stop(); return; } }
/*! \internal */ void QSplitterPrivate::insertWidget_helper(int index, QWidget *widget, bool show) { Q_Q(QSplitter); QBoolBlocker b(blockChildAdd); bool needShow = show && q->isVisible() && !(widget->isHidden() && widget->testAttribute(Qt::WA_WState_ExplicitShowHide)); if (widget->parentWidget() != q) widget->setParent(q); if (needShow) widget->show(); insertWidget(index, widget); recalc(q->isVisible()); }
void refresh(blockmap *block) { for (int y = torch.buf.scroll.y; y < torch.buf.scroll.y + 24; y++) for (int x = torch.buf.scroll.x; x < torch.buf.scroll.x + 32; x++) { int32 v = torch.buf.luxat(x, y)->lval; mapel *m = torch.buf.at(x, y); if (isforgettable(x,y)) m->recall = 0; else m->recall = min(1<<12, max(v, m->recall)); recalc(block, x, y); } }
void filter_rc_device::device_start() { m_stream = stream_alloc(1, 1, machine().sample_rate()); recalc(); save_item(NAME(m_k)); save_item(NAME(m_memory)); save_item(NAME(m_type)); save_item(NAME(m_R1)); save_item(NAME(m_R2)); save_item(NAME(m_R3)); save_item(NAME(m_C)); }
void UIPopupBox::setContentWidget(QWidget *pWidget) { if (m_pContentWidget) { layout()->removeWidget(m_pContentWidget); // m_pContentWidget->removeEventFilter(this); } m_pContentWidget = pWidget; // m_pContentWidget->installEventFilter(this); // m_pContentWidget->setMouseTracking(true); layout()->addWidget(pWidget); recalc(); }