static PyObject *meth_QDesignerPropertySheetExtension_reset(PyObject *sipSelf, PyObject *sipArgs) { PyObject *sipParseErr = NULL; PyObject *sipOrigSelf = sipSelf; { int a0; QDesignerPropertySheetExtension *sipCpp; if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QDesignerPropertySheetExtension, &sipCpp, &a0)) { bool sipRes; if (!sipOrigSelf) { sipAbstractMethod(sipName_QDesignerPropertySheetExtension, sipName_reset); return NULL; } sipRes = sipCpp->reset(a0); return PyBool_FromLong(sipRes); } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_QDesignerPropertySheetExtension, sipName_reset, doc_QDesignerPropertySheetExtension_reset); return NULL; }
bool ItemViewPropertySheet::reset(int index) { const FakePropertyMap::iterator it = d->m_propertyIdMap.find(index); if (it != d->m_propertyIdMap.end()) { QDesignerPropertySheetExtension *headerSheet = it.value().m_sheet; const int headerIndex = it.value().m_id; const bool resetRC = headerSheet->reset(headerIndex); // Resetting for "visible" might fail and the stored default // of the Widget database is "false" due to the widget not being // visible at the time it was determined. Reset to "true" manually. if (!resetRC && headerSheet->propertyName(headerIndex) == QLatin1String(visibleProperty)) { headerSheet->setProperty(headerIndex, QVariant(true)); headerSheet->setChanged(headerIndex, false); return true; } return resetRC; } else { return QDesignerPropertySheet::reset(index); } }