首页下载资源后端QtTreePropertyBrowser -Qt5

ZIPQtTreePropertyBrowser -Qt5

m0_7444487496.36KB需要积分:1

资源文件列表:

qtpropertybrowser.zip 大约有43个文件
  1. images/
  2. images/cursor-arrow.png 171B
  3. images/cursor-busy.png 201B
  4. images/cursor-closedhand.png 147B
  5. images/cursor-cross.png 130B
  6. images/cursor-forbidden.png 199B
  7. images/cursor-hand.png 159B
  8. images/cursor-hsplit.png 155B
  9. images/cursor-ibeam.png 124B
  10. images/cursor-openhand.png 160B
  11. images/cursor-sizeall.png 174B
  12. images/cursor-sizeb.png 161B
  13. images/cursor-sizef.png 161B
  14. images/cursor-sizeh.png 145B
  15. images/cursor-sizev.png 141B
  16. images/cursor-uparrow.png 132B
  17. images/cursor-vsplit.png 161B
  18. images/cursor-wait.png 172B
  19. images/cursor-whatsthis.png 191B
  20. qtbuttonpropertybrowser.cpp 18.01KB
  21. qtbuttonpropertybrowser.h 1.08KB
  22. qtbuttonpropertybrowser_p.h 1.28KB
  23. qteditorfactory.cpp 75.84KB
  24. qteditorfactory.h 10.22KB
  25. qteditorfactory_p.h 10.17KB
  26. qtgroupboxpropertybrowser.cpp 14.92KB
  27. qtgroupboxpropertybrowser.h 914B
  28. qtgroupboxpropertybrowser_p.h 1.1KB
  29. qtpropertybrowser.cpp 60.86KB
  30. qtpropertybrowser.h 8.3KB
  31. qtpropertybrowser.pri 1.19KB
  32. qtpropertybrowser_p.h 8.28KB
  33. qtpropertybrowserutils.cpp 9.99KB
  34. qtpropertybrowserutils_p.h 2.43KB
  35. qtpropertymanager.cpp 206.28KB
  36. qtpropertymanager.h 23.2KB
  37. qtpropertymanager_p.h 22.63KB
  38. qttreepropertybrowser.cpp 33.18KB
  39. qttreepropertybrowser.h 2.74KB
  40. qttreepropertybrowser_p.h 2.89KB
  41. qtvariantproperty.cpp 95.78KB
  42. qtvariantproperty.h 3.51KB
  43. qtvariantproperty_p.h 3.66KB

资源介绍:

qtpropertybrowser Qt5 sources
// Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qtpropertymanager.h" #include "qtpropertybrowserutils_p.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined(Q_CC_MSVC) # pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */ #endif QT_BEGIN_NAMESPACE template static void setSimpleMinimumData(PrivateData *data, const Value &minVal) { data->minVal = minVal; if (data->maxVal < data->minVal) data->maxVal = data->minVal; if (data->val < data->minVal) data->val = data->minVal; } template static void setSimpleMaximumData(PrivateData *data, const Value &maxVal) { data->maxVal = maxVal; if (data->minVal > data->maxVal) data->minVal = data->maxVal; if (data->val > data->maxVal) data->val = data->maxVal; } template static void setSizeMinimumData(PrivateData *data, const Value &newMinVal) { data->minVal = newMinVal; if (data->maxVal.width() < data->minVal.width()) data->maxVal.setWidth(data->minVal.width()); if (data->maxVal.height() < data->minVal.height()) data->maxVal.setHeight(data->minVal.height()); if (data->val.width() < data->minVal.width()) data->val.setWidth(data->minVal.width()); if (data->val.height() < data->minVal.height()) data->val.setHeight(data->minVal.height()); } template static void setSizeMaximumData(PrivateData *data, const Value &newMaxVal) { data->maxVal = newMaxVal; if (data->minVal.width() > data->maxVal.width()) data->minVal.setWidth(data->maxVal.width()); if (data->minVal.height() > data->maxVal.height()) data->minVal.setHeight(data->maxVal.height()); if (data->val.width() > data->maxVal.width()) data->val.setWidth(data->maxVal.width()); if (data->val.height() > data->maxVal.height()) data->val.setHeight(data->maxVal.height()); } template static SizeValue qBoundSize(const SizeValue &minVal, const SizeValue &val, const SizeValue &maxVal) { SizeValue croppedVal = val; if (minVal.width() > val.width()) croppedVal.setWidth(minVal.width()); else if (maxVal.width() < val.width()) croppedVal.setWidth(maxVal.width()); if (minVal.height() > val.height()) croppedVal.setHeight(minVal.height()); else if (maxVal.height() < val.height()) croppedVal.setHeight(maxVal.height()); return croppedVal; } // Match the exact signature of qBound for VS 6. QSize qBound(QSize minVal, QSize val, QSize maxVal) { return qBoundSize(minVal, val, maxVal); } QSizeF qBound(QSizeF minVal, QSizeF val, QSizeF maxVal) { return qBoundSize(minVal, val, maxVal); } namespace { namespace { template void orderBorders(Value &minVal, Value &maxVal) { if (minVal > maxVal) qSwap(minVal, maxVal); } template static void orderSizeBorders(Value &minVal, Value &maxVal) { Value fromSize = minVal; Value toSize = maxVal; if (fromSize.width() > toSize.width()) { fromSize.setWidth(maxVal.width()); toSize.setWidth(minVal.width()); } if (fromSize.height() > toSize.height()) { fromSize.setHeight(maxVal.height()); toSize.setHeight(minVal.height()); } minVal = fromSize; maxVal = toSize; } void orderBorders(QSize &minVal, QSize &maxVal) { orderSizeBorders(minVal, maxVal); } void orderBorders(QSizeF &minVal, QSizeF &maxVal) { orderSizeBorders(minVal, maxVal); } } } //////// template static Value getData(const QHash &propertyMap, Value PrivateData::*data, const QtProperty *property, const Value &defaultValue = Value()) { const auto it = propertyMap.constFind(property); if (it == propertyMap.constEnd()) return defaultValue; return it.value().*data; } template static Value getValue(const QHash &propertyMap, const QtProperty *property, const Value &defaultValue = Value()) { return getData(propertyMap, &PrivateData::val, property, defaultValue); } template static Value getMinimum(const QHash &propertyMap, const QtProperty *property, const Value &defaultValue = Value()) { return getData(propertyMap, &PrivateData::minVal, property, defaultValue); } template static Value getMaximum(const QHash &propertyMap, const QtProperty *property, const Value &defaultValue = Value()) { return getData(propertyMap, &PrivateData::maxVal, property, defaultValue); } template static void setSimpleValue(QHash &propertyMap, PropertyManager *manager, void (PropertyManager::*propertyChangedSignal)(QtProperty *), void (PropertyManager::*valueChangedSignal)(QtProperty *, ValueChangeParameter), QtProperty *property, const Value &val) { const auto it = propertyMap.find(property); if (it == propertyMap.end()) return; if (it.value() == val) return; it.value() = val; emit (manager->*propertyChangedSignal)(property); emit (manager->*valueChangedSignal)(property, val); } template static void setValueInRange(PropertyManager *manager, PropertyManagerPrivate *managerPrivate, void (PropertyManager::*propertyChangedSignal)(QtProperty *), void (PropertyManager::*valueChangedSignal)(QtProperty *, ValueChangeParameter), QtProperty *property, const Value &val, void (PropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, ValueChangeParameter)) { const auto it = managerPrivate->m_values.find(property); if (it == managerPrivate->m_values.end()) return; auto &data = it.value(); if (data.val == val) return; const Value oldVal = data.val; data.val = qBound(data.minVal, val, data.maxVal); if (data.val == oldVal) return; if (setSubPropertyValue) (managerPrivate->*setSubPropertyValue)(property, data.val); emit (manager->*propertyChangedSignal)(property); emit (manager->*valueChangedSignal)(property, data.val); } template static void setBorderValues(PropertyManager *manager, PropertyManagerPrivate *managerPrivate, void (PropertyManager::*propertyChangedSignal)(QtProperty *), void (PropertyManager::*valueChangedSignal)(QtProperty *, ValueChangeParameter), void (PropertyManager::*rangeChangedSignal)(QtProperty *, ValueChangeParameter, ValueChangeParameter), QtProperty *property, ValueChangeParameter minVal, ValueChangeParameter maxVal, void (Prop
100+评论
captcha