本文整理汇总了C++中setChanged函数的典型用法代码示例。如果您正苦于以下问题:C++ setChanged函数的具体用法?C++ setChanged怎么用?C++ setChanged使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setChanged函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeProperty
bool CSSMutableStyleDeclaration::setProperty(int propertyID, const String& value, bool important, bool notifyChanged, ExceptionCode& ec)
{
ec = 0;
// Setting the value to an empty string just removes the property in both IE and Gecko.
// Setting it to null seems to produce less consistent results, but we treat it just the same.
if (value.isEmpty()) {
removeProperty(propertyID, notifyChanged, false, ec);
return ec == 0;
}
// When replacing an existing property value, this moves the property to the end of the list.
// Firefox preserves the position, and MSIE moves the property to the beginning.
CSSParser parser(useStrictParsing());
bool success = parser.parseValue(this, propertyID, value, important);
if (!success) {
// CSS DOM requires raising SYNTAX_ERR here, but this is too dangerous for compatibility,
// see <http://bugs.webkit.org/show_bug.cgi?id=7296>.
} else if (notifyChanged)
setChanged();
ASSERT(!ec);
return success;
}
示例2: current
//_______________________________________________________
void ExceptionListWidget::edit( void )
{
// retrieve selection
QModelIndex current( m_ui.exceptionListView->selectionModel()->currentIndex() );
if( ! model().contains( current ) ) return;
InternalSettingsPtr exception( model().get( current ) );
// create dialog
QPointer<ExceptionDialog> dialog( new ExceptionDialog( this ) );
dialog->setWindowTitle( i18n( "Edit Exception - Menda Settings" ) );
dialog->setException( exception );
// map dialog
if( !dialog->exec() )
{
delete dialog;
return;
}
// check modifications
if( !dialog->isChanged() ) return;
// retrieve exception
dialog->save();
delete dialog;
// check new exception validity
checkException( exception );
resizeColumns();
setChanged( true );
return;
}
示例3: setChanged
DECLARE_EXPORT void Buffer::setMaximumCalendar(CalendarDefault *cal)
{
// Resetting the same calendar
if (max_cal == cal) return;
// Mark as changed
setChanged();
// Delete previous events.
for (flowplanlist::iterator oo=flowplans.begin(); oo!=flowplans.end(); )
if (oo->getType() == 4)
{
flowplans.erase(&(*oo));
delete &(*(oo++));
}
else ++oo;
// Null pointer passed. Change back to time independent max.
if (!cal)
{
setMaximum(max_val);
return;
}
// Create timeline structures for every bucket. A new entry is created only
// when the value changes.
max_cal = const_cast<CalendarDefault*>(cal);
double curMax = 0.0;
for (CalendarDefault::EventIterator x(max_cal); x.getDate()<Date::infiniteFuture; ++x)
if (curMax != x.getValue())
{
curMax = x.getValue();
flowplanlist::EventMaxQuantity *newBucket =
new flowplanlist::EventMaxQuantity(x.getDate(), &flowplans, curMax);
flowplans.insert(newBucket);
}
}
示例4: ExceptionDialog
//_______________________________________________________
void ExceptionListWidget::add( void )
{
QPointer<ExceptionDialog> dialog = new ExceptionDialog( this );
ConfigurationPtr exception( new Configuration() );
exception->readConfig();
dialog->setException( exception );
// run dialog and check existence
if( !dialog->exec() )
{
delete dialog;
return;
}
dialog->save();
delete dialog;
// check exceptions
if( !checkException( exception ) ) return;
// create new item
model().add( exception );
setChanged( true );
// make sure item is selected
QModelIndex index( model().index( exception ) );
if( index != ui.exceptionListView->selectionModel()->currentIndex() )
{
ui.exceptionListView->selectionModel()->select( index, QItemSelectionModel::Clear|QItemSelectionModel::Select|QItemSelectionModel::Rows );
ui.exceptionListView->selectionModel()->setCurrentIndex( index, QItemSelectionModel::Current|QItemSelectionModel::Rows );
}
resizeColumns();
return;
}
示例5: setChanged
DECLARE_EXPORT void Resource::setMaximumCalendar(CalendarDefault* c)
{
// Resetting the same calendar
if (size_max_cal == c) return;
// Mark as changed
setChanged();
// Remove the current max events.
for (loadplanlist::iterator oo=loadplans.begin(); oo!=loadplans.end(); )
if (oo->getType() == 4)
{
loadplans.erase(&(*oo));
delete &(*(oo++));
}
else ++oo;
// Null pointer passed. Change back to time independent maximum size.
if (!c)
{
setMaximum(size_max);
return;
}
// Create timeline structures for every bucket.
size_max_cal = c;
double curMax = 0.0;
for (CalendarDefault::EventIterator x(size_max_cal); x.getDate()<Date::infiniteFuture; ++x)
if (curMax != x.getValue())
{
curMax = x.getValue();
loadplanlist::EventMaxQuantity *newBucket =
new loadplanlist::EventMaxQuantity(x.getDate(), &loadplans, curMax);
loadplans.insert(newBucket);
}
}
示例6: modified
//_______________________________________________
void ConfigWidget::updateChanged( void )
{
// check configuration
if( !m_internalSettings ) return;
// track modifications
bool modified( false );
if( m_ui.titleAlignment->currentIndex() != m_internalSettings->titleAlignment() ) modified = true;
else if( m_ui.buttonSize->currentIndex() != m_internalSettings->buttonSize() ) modified = true;
else if( m_ui.drawBorderOnMaximizedWindows->isChecked() != m_internalSettings->drawBorderOnMaximizedWindows() ) modified = true;
else if( m_ui.drawSizeGrip->isChecked() != m_internalSettings->drawSizeGrip() ) modified = true;
// exceptions
else if( m_ui.exceptions->isChanged() ) modified = true;
// animations
else if( m_ui.animationsEnabled->isChecked() != m_internalSettings->animationsEnabled() ) modified = true;
else if( m_ui.animationsDuration->value() != m_internalSettings->animationsDuration() ) modified = true;
setChanged( modified );
}
示例7: modified
//_______________________________________________
void ConfigWidget::updateChanged( void )
{
// check configuration
if( !_configuration ) return;
// track modifications
bool modified( false );
if( ui.titleAlignment->currentIndex() != _configuration->titleAlignment() ) modified = true;
else if( ui.buttonSize->currentIndex() != _configuration->buttonSize() ) modified = true;
else if( ui.frameBorder->currentIndex() != _configuration->frameBorder() ) modified = true;
else if( ui.separatorMode->currentIndex() != _configuration->separatorMode() ) modified = true;
else if( ui.drawSizeGrip->isChecked() != _configuration->drawSizeGrip() ) modified = true;
else if( ui.titleOutline->isChecked() != _configuration->drawTitleOutline() ) modified = true;
else if( ui.narrowButtonSpacing->isChecked() != _configuration->useNarrowButtonSpacing() ) modified = true;
else if( ui.closeFromMenuButton->isChecked() != _configuration->closeWindowFromMenuButton() ) modified = true;
// transparency
else if( ui.opacityFromStyle->isChecked() != _configuration->opacityFromStyle() ) modified = true;
else if( ui.backgroundOpacity->value() != _configuration->backgroundOpacity() ) modified = true;
// exceptions
else if( ui.exceptions->isChanged() ) modified = true;
// shadow configurations
else if( shadowConfigurations[0]->isChanged() ) modified = true;
else if( shadowConfigurations[1]->isChanged() ) modified = true;
// animations
else if( !_expertMode && ui.animationsEnabled->isChecked() != _configuration->animationsEnabled() ) modified = true;
else if( _expertMode && _animationConfigWidget->isChanged() ) modified = true;
setChanged( modified );
}
示例8: layoutPropertyType
void LayoutPropertySheet::setChanged(int index, bool changed)
{
const LayoutPropertyType type = layoutPropertyType(propertyName(index));
switch (type) {
case LayoutPropertySpacing:
if (LayoutProperties::visibleProperties(m_layout) & LayoutProperties::HorizSpacingProperty) {
setChanged(indexOf(QLatin1String(horizontalSpacing)), changed);
setChanged(indexOf(QLatin1String(verticalSpacing)), changed);
}
break;
case LayoutPropertyMargin:
setChanged(indexOf(QLatin1String(leftMargin)), changed);
setChanged(indexOf(QLatin1String(topMargin)), changed);
setChanged(indexOf(QLatin1String(rightMargin)), changed);
setChanged(indexOf(QLatin1String(bottomMargin)), changed);
break;
default:
break;
}
QDesignerPropertySheet::setChanged(index, changed);
}
示例9: model
//__________________________________________________________
InternalSettingsList ExceptionListWidget::exceptions( void )
{
return model().get();
setChanged( false );
}
示例10: setChanged
/**
* @brief TvShowEpisode::setThumbnailImage
* @param thumbnail
*/
void TvShowEpisode::setThumbnailImage(QByteArray thumbnail)
{
m_thumbnailImage = thumbnail;
m_thumbnailImageChanged = true;
setChanged(true);
}
示例11: removeProperty
void CSSMutableStyleDeclaration::setImageProperty(int propertyId, const String& url, bool important)
{
removeProperty(propertyId);
m_values.append(CSSProperty(propertyId, CSSImageValue::create(url), important));
setChanged();
}
示例12: setChanged
void rice::p2p::multiring::MultiringNodeHandle::update(::java::util::Observable* o, ::java::lang::Object* obj)
{
setChanged();
notifyObservers(obj);
}
示例13: setChanged
void InputMethod::update()
{
setChanged(false);
}
示例14: clear
void clear() { freeLayouts(); m_blocks.clear(); setChanged(true); }
示例15: setChanged
void SharpnessFilter::somethingChanged(){
setChanged(true);
}