/*! Sets the stretch factor for \a column to \a stretch. */ void QGraphicsGridLayout::setColumnStretchFactor(int column, int stretch) { Q_D(QGraphicsGridLayout); d->engine.setRowStretchFactor(column, stretch, Qt::Horizontal); invalidate(); }
void Component::setInsets(const util::Insets& i) { insets = i; invalidate(); }
void QQuickComponentsLinearLayout::componentComplete() { QQuickComponentsLayout::componentComplete(); updateLayoutItems(); invalidate(); }
void PixelToBufferProcessor::clearOutput() { values_->getEditableRepresentation<BufferRAMPrecision<double>>()->setSize(0); invalidate(INVALID_OUTPUT); }
// Set the value from xml. The chars at *offset into valueXml // should be the start of a <value> tag. Destroys any existing value. bool XmlRpcValue::fromXml(std::string const& valueXml, int* offset) { int savedOffset = *offset; invalidate(); bool emptyTag; if ( ! XmlRpcUtil::nextTagIs(VALUE_TAG, valueXml, offset, &emptyTag)) return false; // Not a value, offset not updated // No value? Pretend its an empty string... if (emptyTag) { *this = ""; return true; } // No type tag? Assume string bool result = true; int valueOffset = *offset; if (XmlRpcUtil::nextTagIsEnd(VALUE_TAG, valueXml, offset)) { return stringFromXml(valueXml, &valueOffset); } else if (XmlRpcUtil::nextTagIs(NIL_TAG, valueXml, offset, &emptyTag)) { _type = TypeNil; result = true; } else if (XmlRpcUtil::nextTagIs(BOOLEAN_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) *this = false; else result = boolFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(BOOLEAN_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(I4_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) *this = 0; else result = intFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(I4_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(INT_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) *this = 0; else result = intFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(INT_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(DOUBLE_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) *this = 0.0; else result = doubleFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(DOUBLE_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(STRING_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) *this = ""; else result = stringFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(STRING_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(DATETIME_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) result = false; else result = timeFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(DATETIME_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(BASE64_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) result = binaryFromXml("", 0); else result = binaryFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(BASE64_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(ARRAY_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) result = false; else result = arrayFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(ARRAY_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(STRUCT_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) result = false; else result = structFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(STRUCT_TAG, valueXml, offset); } // Unrecognized tag after <value> or no </value> if ( ! result || ! XmlRpcUtil::nextTagIsEnd(VALUE_TAG, valueXml, offset)) { *offset = savedOffset; return false; } return true; }
void EditorFileDialog::_cancel_pressed() { file->set_text(""); invalidate(); hide(); }
void EditorFileDialog::add_filter(const String &p_filter) { filters.push_back(p_filter); update_filters(); invalidate(); }
//----------------------------------------------------------------------------// void Editbox::onReadOnlyChanged(WindowEventArgs& e) { invalidate(); fireEvent(EventReadOnlyModeChanged, e, EventNamespace); }
//----------------------------------------------------------------------------// void Editbox::onMaskedRenderingModeChanged(WindowEventArgs& e) { invalidate(); fireEvent(EventMaskedRenderingModeChanged , e, EventNamespace); }
/*! Sets the alignment for \a column to \a alignment. */ void QGraphicsGridLayout::setColumnAlignment(int column, Qt::Alignment alignment) { Q_D(QGraphicsGridLayout); d->engine.setRowAlignment(column, alignment, Qt::Horizontal); invalidate(); }
/*! Sets the alignment for \a item to \a alignment. */ void QGraphicsGridLayout::setAlignment(QGraphicsLayoutItem *item, Qt::Alignment alignment) { Q_D(QGraphicsGridLayout); d->engine.setAlignment(item, alignment); invalidate(); }
/*! Sets the alignment of \a row to \a alignment. */ void QGraphicsGridLayout::setRowAlignment(int row, Qt::Alignment alignment) { Q_D(QGraphicsGridLayout); d->engine.setRowAlignment(row, alignment, Qt::Vertical); invalidate(); }
/*! Sets the maximum width of \a column to \a width. */ void QGraphicsGridLayout::setColumnMaximumWidth(int column, qreal width) { Q_D(QGraphicsGridLayout); d->engine.setRowSizeHint(Qt::MaximumSize, column, width, Qt::Horizontal); invalidate(); }
/*! Sets the maximum height for row, \a row, to \a height. */ void QGraphicsGridLayout::setRowMaximumHeight(int row, qreal height) { Q_D(QGraphicsGridLayout); d->engine.setRowSizeHint(Qt::MaximumSize, row, height, Qt::Vertical); invalidate(); }
void SVGFEConvolveMatrixElement::setKernelUnitLength(float x, float y) { setKernelUnitLengthXBaseValue(x); setKernelUnitLengthYBaseValue(y); invalidate(); }
//----------------------------------------------------------------------------// void Editbox::onCaretMoved(WindowEventArgs& e) { invalidate(); fireEvent(EventCaretMoved , e, EventNamespace); }
void EditorFileDialog::set_show_hidden_files(bool p_show) { show_hidden_files = p_show; invalidate(); }
//----------------------------------------------------------------------------// void Editbox::onTextSelectionChanged(WindowEventArgs& e) { invalidate(); fireEvent(EventTextSelectionChanged , e, EventNamespace); }
void EditorFileDialog::clear_filters() { filters.clear(); update_filters(); invalidate(); }
void ParGCAllocBufferWithBOT::retire(bool end_of_gc, bool retain) { assert(!retain || end_of_gc, "Can only retain at GC end."); if (_retained) { // We're about to make the retained_filler into a block. _bt.BlockOffsetArray::alloc_block(_retained_filler.start(), _retained_filler.end()); } // Reset _hard_end to _true_end (and update _end) if (retain && _hard_end != NULL) { assert(_hard_end <= _true_end, "Invariant."); _hard_end = _true_end; _end = MAX2(_top, _hard_end - AlignmentReserve); assert(_end <= _hard_end, "Invariant."); } _true_end = _hard_end; HeapWord* pre_top = _top; ParGCAllocBuffer::retire(end_of_gc, retain); // Now any old _retained_filler is cut back to size, the free part is // filled with a filler object, and top is past the header of that // object. if (retain && _top < _end) { assert(end_of_gc && retain, "Or else retain should be false."); // If the lab does not start on a card boundary, we don't want to // allocate onto that card, since that might lead to concurrent // allocation and card scanning, which we don't support. So we fill // the first card with a garbage object. size_t first_card_index = _bsa->index_for(pre_top); HeapWord* first_card_start = _bsa->address_for_index(first_card_index); if (first_card_start < pre_top) { HeapWord* second_card_start = _bsa->inc_by_region_size(first_card_start); // Ensure enough room to fill with the smallest block second_card_start = MAX2(second_card_start, pre_top + AlignmentReserve); // If the end is already in the first card, don't go beyond it! // Or if the remainder is too small for a filler object, gobble it up. if (_hard_end < second_card_start || pointer_delta(_hard_end, second_card_start) < AlignmentReserve) { second_card_start = _hard_end; } if (pre_top < second_card_start) { MemRegion first_card_suffix(pre_top, second_card_start); fill_region_with_block(first_card_suffix, true); } pre_top = second_card_start; _top = pre_top; _end = MAX2(_top, _hard_end - AlignmentReserve); } // If the lab does not end on a card boundary, we don't want to // allocate onto that card, since that might lead to concurrent // allocation and card scanning, which we don't support. So we fill // the last card with a garbage object. size_t last_card_index = _bsa->index_for(_hard_end); HeapWord* last_card_start = _bsa->address_for_index(last_card_index); if (last_card_start < _hard_end) { // Ensure enough room to fill with the smallest block last_card_start = MIN2(last_card_start, _hard_end - AlignmentReserve); // If the top is already in the last card, don't go back beyond it! // Or if the remainder is too small for a filler object, gobble it up. if (_top > last_card_start || pointer_delta(last_card_start, _top) < AlignmentReserve) { last_card_start = _top; } if (last_card_start < _hard_end) { MemRegion last_card_prefix(last_card_start, _hard_end); fill_region_with_block(last_card_prefix, false); } _hard_end = last_card_start; _end = MAX2(_top, _hard_end - AlignmentReserve); _true_end = _hard_end; assert(_end <= _hard_end, "Invariant."); } // At this point: // 1) we had a filler object from the original top to hard_end. // 2) We've filled in any partial cards at the front and back. if (pre_top < _hard_end) { // Now we can reset the _bt to do allocation in the given area. MemRegion new_filler(pre_top, _hard_end); fill_region_with_block(new_filler, false); _top = pre_top + ParGCAllocBuffer::FillerHeaderSize; // If there's no space left, don't retain. if (_top >= _end) { _retained = false; invalidate(); return; } _retained_filler = MemRegion(pre_top, _top); _bt.set_region(MemRegion(_top, _hard_end)); _bt.initialize_threshold(); assert(_bt.threshold() > _top, "initialize_threshold failed!"); // There may be other reasons for queries into the middle of the // filler object. When such queries are done in parallel with // allocation, bad things can happen, if the query involves object // iteration. So we ensure that such queries do not involve object // iteration, by putting another filler object on the boundaries of // such queries. One such is the object spanning a parallel card // chunk boundary. // "chunk_boundary" is the address of the first chunk boundary less // than "hard_end". HeapWord* chunk_boundary = (HeapWord*)align_size_down(intptr_t(_hard_end-1), ChunkSizeInBytes); assert(chunk_boundary < _hard_end, "Or else above did not work."); assert(pointer_delta(_true_end, chunk_boundary) >= AlignmentReserve, "Consequence of last card handling above."); if (_top <= chunk_boundary) { assert(_true_end == _hard_end, "Invariant."); while (_top <= chunk_boundary) { assert(pointer_delta(_hard_end, chunk_boundary) >= AlignmentReserve, "Consequence of last card handling above."); _bt.BlockOffsetArray::alloc_block(chunk_boundary, _hard_end); CollectedHeap::fill_with_object(chunk_boundary, _hard_end); _hard_end = chunk_boundary; chunk_boundary -= ChunkSizeInWords; } _end = _hard_end - AlignmentReserve; assert(_top <= _end, "Invariant."); // Now reset the initial filler chunk so it doesn't overlap with // the one(s) inserted above. MemRegion new_filler(pre_top, _hard_end); fill_region_with_block(new_filler, false); } } else { _retained = false; invalidate(); } } else { assert(!end_of_gc || (!_retained && _true_end == _hard_end), "Checking."); } assert(_end <= _hard_end, "Invariant."); assert(_top < _end || _top == _hard_end, "Invariant"); }
void EditorFileDialog::_unhandled_input(const Ref<InputEvent> &p_event) { Ref<InputEventKey> k = p_event; if (k.is_valid() && is_window_modal_on_top()) { if (k->is_pressed()) { bool handled = false; if (ED_IS_SHORTCUT("file_dialog/go_back", p_event)) { _go_back(); handled = true; } if (ED_IS_SHORTCUT("file_dialog/go_forward", p_event)) { _go_forward(); handled = true; } if (ED_IS_SHORTCUT("file_dialog/go_up", p_event)) { _go_up(); handled = true; } if (ED_IS_SHORTCUT("file_dialog/refresh", p_event)) { invalidate(); handled = true; } if (ED_IS_SHORTCUT("file_dialog/toggle_hidden_files", p_event)) { bool show = !show_hidden_files; set_show_hidden_files(show); EditorSettings::get_singleton()->set("filesystem/file_dialog/show_hidden_files", show); handled = true; } if (ED_IS_SHORTCUT("file_dialog/toggle_favorite", p_event)) { _favorite_toggled(favorite->is_pressed()); handled = true; } if (ED_IS_SHORTCUT("file_dialog/toggle_mode", p_event)) { if (mode_thumbnails->is_pressed()) { set_display_mode(DISPLAY_LIST); } else { set_display_mode(DISPLAY_THUMBNAILS); } handled = true; } if (ED_IS_SHORTCUT("file_dialog/create_folder", p_event)) { _make_dir(); handled = true; } if (ED_IS_SHORTCUT("file_dialog/focus_path", p_event)) { dir->grab_focus(); handled = true; } if (ED_IS_SHORTCUT("file_dialog/move_favorite_up", p_event)) { _favorite_move_up(); handled = true; } if (ED_IS_SHORTCUT("file_dialog/move_favorite_down", p_event)) { _favorite_move_down(); handled = true; } if (handled) { accept_event(); } } } }
bool RemotePlugin::init( const QString &pluginExecutable, bool waitForInitDoneMsg ) { lock(); if( m_failed ) { #ifdef SYNC_WITH_SHM_FIFO reset( new shmFifo(), new shmFifo() ); #endif m_failed = false; } QString exec = QFileInfo(QDir("plugins:"), pluginExecutable).absoluteFilePath(); #ifdef LMMS_BUILD_APPLE // search current directory first QString curDir = QCoreApplication::applicationDirPath() + "/" + pluginExecutable; if( QFile( curDir ).exists() ) { exec = curDir; } #endif #ifdef LMMS_BUILD_WIN32 if( ! exec.endsWith( ".exe", Qt::CaseInsensitive ) ) { exec += ".exe"; } #endif if( ! QFile( exec ).exists() ) { qWarning( "Remote plugin '%s' not found.", exec.toUtf8().constData() ); m_failed = true; invalidate(); unlock(); return failed(); } QStringList args; #ifdef SYNC_WITH_SHM_FIFO // swap in and out for bidirectional communication args << QString::number( out()->shmKey() ); args << QString::number( in()->shmKey() ); #else args << m_socketFile; #endif #ifndef DEBUG_REMOTE_PLUGIN m_process.setProcessChannelMode( QProcess::ForwardedChannels ); m_process.setWorkingDirectory( QCoreApplication::applicationDirPath() ); m_process.start( exec, args ); m_watcher.start( QThread::LowestPriority ); #else qDebug() << exec << args; #endif connect( &m_process, SIGNAL( finished( int, QProcess::ExitStatus ) ), this, SLOT( processFinished( int, QProcess::ExitStatus ) ) ); #ifndef SYNC_WITH_SHM_FIFO struct pollfd pollin; pollin.fd = m_server; pollin.events = POLLIN; switch ( poll( &pollin, 1, 30000 ) ) { case -1: qWarning( "Unexpected poll error." ); break; case 0: qWarning( "Remote plugin did not connect." ); break; default: m_socket = accept( m_server, NULL, NULL ); if ( m_socket == -1 ) { qWarning( "Unexpected socket error." ); } } #endif resizeSharedProcessingMemory(); if( waitForInitDoneMsg ) { waitForInitDone(); } unlock(); return failed(); }
void HostilReference::removeReference() { invalidate(); fireStatusChanged(ThreatRefStatusChangeEvent(UEV_THREAT_REF_REMOVE_FROM_LIST, this)); }
void ImageSequenceSource::forceReload() { forceReload_ = true; invalidate(); }
/** * Borders and Insets. */ void Component::setBorderPainted(bool enable) { borderPainted = enable; invalidate(); }
virtual void deallocate() { internal_deallocate(); invalidate(); }
void NonEmptyTagFilterProxy::onSourceCountChanged(int count, int previousCount) { if ((previousCount == 0) ^ (count == 0)) { invalidate(); } }
void SVGFEConvolveMatrixElement::setOrder(float x, float y) { setOrderXBaseValue(x); setOrderYBaseValue(y); invalidate(); }
void QQuickComponentsLinearLayout::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) { QQuickComponentsLayout::geometryChanged(newGeometry, oldGeometry); invalidate(); }
/*! Sets the stretch factor for \a row to \a stretch. */ void QGraphicsGridLayout::setRowStretchFactor(int row, int stretch) { Q_D(QGraphicsGridLayout); d->engine.setRowStretchFactor(row, stretch, Qt::Vertical); invalidate(); }