#include "editorfactory.h" #include #include #include #include #include #include #include #include #include #include #include "widgets/limitedspinbox.h" #include "widgets/stringlistwidget.h" #include "widgets/urlwidget.h" #include "widgets/matrix4x4widget.h" #include "widgets/vector2dwidget.h" #include "widgets/vector3dwidget.h" #include "widgets/vector4dwidget.h" #include "widgets/quaternionwidget.h" EditorFactory::EditorFactory() : QItemEditorFactory() { registerEditor(QVariant::Bool, new QStandardItemEditorCreator()); registerEditor(QVariant::Int, new QStandardItemEditorCreator::min(), std::numeric_limits::max()> >()); //registerEditor(QVariant::UInt, new QStandardItemEditorCreator::min(), std::numeric_limits::max()> >()); //registerEditor(QVariant::LongLong, new QStandardItemEditorCreator::min(), std::numeric_limits::max()> >()); //TODO: implement 64 bit //registerEditor(QVariant::ULongLong, new QStandardItemEditorCreator::min(), std::numeric_limits::max()> >()); //TODO: implement 64 bit registerEditor(QVariant::Double, new QStandardItemEditorCreator()); registerEditor(QMetaType::Float, new QStandardItemEditorCreator()); //TODO: Make this a real QFloatSpinBox registerEditor(QVariant::ULongLong, new QStandardItemEditorCreator::min(), std::numeric_limits::max()> >()); //registerEditor(QVariant::Map, Q_NULLPTR); //TODO //registerEditor(QVariant::List, Q_NULLPTR); //TODO registerEditor(QVariant::String, new QStandardItemEditorCreator()); registerEditor(QVariant::StringList, new QStandardItemEditorCreator()); //registerEditor(QVariant::ByteArray, Q_NULLPTR); //TODO //registerEditor(QVariant::BitArray, Q_NULLPTR); //TODO registerEditor(QVariant::Date, new QStandardItemEditorCreator()); registerEditor(QVariant::Time, new QStandardItemEditorCreator()); registerEditor(QVariant::DateTime, new QStandardItemEditorCreator()); registerEditor(QVariant::Url, new QStandardItemEditorCreator()); //TODO //registerEditor(QVariant::Locale, Q_NULLPTR); //TODO //registerEditor(QVariant::Rect, Q_NULLPTR); //TODO //registerEditor(QVariant::RectF, Q_NULLPTR); //TODO //registerEditor(QVariant::Size, Q_NULLPTR); //TODO //registerEditor(QVariant::SizeF, Q_NULLPTR); //TODO //registerEditor(QVariant::Line, Q_NULLPTR); //TODO //registerEditor(QVariant::LineF, Q_NULLPTR); //TODO //registerEditor(QVariant::Point, Q_NULLPTR); //TODO //registerEditor(QVariant::PointF, Q_NULLPTR); //TODO //registerEditor(QVariant::RegExp, Q_NULLPTR); //TODO //registerEditor(QVariant::RegularExpression, Q_NULLPTR); //TODO //registerEditor(QVariant::Hash, Q_NULLPTR); //TODO //registerEditor(QVariant::EasingCurve, Q_NULLPTR); //TODO //registerEditor(QVariant::Uuid, Q_NULLPTR); //TODO //registerEditor(QVariant::ModelIndex, Q_NULLPTR); //TODO //registerEditor(QVariant::PersistentModelIndex, Q_NULLPTR); //TODO //registerEditor(QVariant::Font, Q_NULLPTR); //TODO //registerEditor(QVariant::Pixmap, Q_NULLPTR); //TODO //registerEditor(QVariant::Brush, Q_NULLPTR); //TODO //registerEditor(QVariant::Color, Q_NULLPTR); //TODO //registerEditor(QVariant::Palette, Q_NULLPTR); //TODO //registerEditor(QVariant::Image, Q_NULLPTR); //TODO //registerEditor(QVariant::Polygon, Q_NULLPTR); //TODO //registerEditor(QVariant::Region, Q_NULLPTR); //TODO //registerEditor(QVariant::Bitmap, Q_NULLPTR); //TODO //registerEditor(QVariant::Cursor, Q_NULLPTR); //TODO registerEditor(QVariant::KeySequence, new QStandardItemEditorCreator()); //TODO //registerEditor(QVariant::Pen, Q_NULLPTR); //TODO //registerEditor(QVariant::TextLength, Q_NULLPTR); //TODO //registerEditor(QVariant::TextFormat, Q_NULLPTR); //TODO //registerEditor(QVariant::Matrix, Q_NULLPTR); //TODO //registerEditor(QVariant::Transform, Q_NULLPTR); //TODO registerEditor(QVariant::Matrix4x4, new QStandardItemEditorCreator()); registerEditor(QVariant::Vector2D, new QStandardItemEditorCreator()); registerEditor(QVariant::Vector3D, new QStandardItemEditorCreator()); registerEditor(QVariant::Vector4D, new QStandardItemEditorCreator()); registerEditor(QVariant::Quaternion, new QStandardItemEditorCreator()); //registerEditor(QVariant::PolygonF, Q_NULLPTR); //TODO //registerEditor(QVariant::Icon, Q_NULLPTR); //TODO //registerEditor(QVariant::SizePolicy, Q_NULLPTR); //TODO }