├── .gitignore ├── README.md ├── app ├── app.pro ├── app.qrc ├── commands.cpp ├── commands.h ├── customproperty.cpp ├── customproperty.h ├── document.cpp ├── document.h ├── drawobj.cpp ├── drawobj.h ├── drawscene.cpp ├── drawscene.h ├── drawtool.cpp ├── drawtool.h ├── drawview.cpp ├── drawview.h ├── icons │ ├── align_all.png │ ├── align_bottom.png │ ├── align_hcenter.png │ ├── align_height.png │ ├── align_height.svg │ ├── align_horzeven.png │ ├── align_left.png │ ├── align_right.png │ ├── align_top.png │ ├── align_vcenter.png │ ├── align_verteven.png │ ├── align_width.png │ ├── align_width.svg │ ├── arc.png │ ├── arrow.png │ ├── bezier.png │ ├── bringtofront.png │ ├── copy.png │ ├── cut.png │ ├── ellipse.png │ ├── group.png │ ├── line.png │ ├── paste.png │ ├── polygon.png │ ├── polyline.png │ ├── rectangle.png │ ├── redo.png │ ├── rotate.png │ ├── roundrect.png │ ├── sendtoback.png │ ├── undo.png │ ├── ungroup.png │ ├── zoomin.png │ └── zoomout.png ├── main.cpp ├── mainwindow.cpp ├── mainwindow.h ├── objectcontroller.cpp ├── objectcontroller.h ├── rulebar.cpp ├── rulebar.h ├── sizehandle.cpp └── sizehandle.h ├── qdraw.pro └── qtpropertybrowser ├── INSTALL.TXT ├── README.TXT ├── buildlib └── buildlib.pro ├── common.pri ├── configure ├── configure.bat ├── doc ├── html │ ├── classic.css │ ├── images │ │ ├── canvas_typed.png │ │ ├── canvas_variant.png │ │ ├── decoration.png │ │ ├── demo.png │ │ ├── extension.png │ │ ├── object_controller.png │ │ ├── qt-logo.png │ │ ├── qtbuttonpropertybrowser.png │ │ ├── qtgroupboxpropertybrowser.png │ │ ├── qtpropertybrowser-duplicate.png │ │ ├── qtpropertybrowser.png │ │ ├── qttreepropertybrowser.png │ │ └── simple.png │ ├── index.html │ ├── qtabstracteditorfactory-members.html │ ├── qtabstracteditorfactory.html │ ├── qtabstracteditorfactorybase-members.html │ ├── qtabstracteditorfactorybase.html │ ├── qtabstractpropertybrowser-members.html │ ├── qtabstractpropertybrowser.html │ ├── qtabstractpropertymanager-members.html │ ├── qtabstractpropertymanager.html │ ├── qtboolpropertymanager-members.html │ ├── qtboolpropertymanager.html │ ├── qtbrowseritem-members.html │ ├── qtbrowseritem.html │ ├── qtbuttonpropertybrowser-members.html │ ├── qtbuttonpropertybrowser.html │ ├── qtchareditorfactory-members.html │ ├── qtchareditorfactory.html │ ├── qtcharpropertymanager-members.html │ ├── qtcharpropertymanager.html │ ├── qtcheckboxfactory-members.html │ ├── qtcheckboxfactory.html │ ├── qtcoloreditorfactory-members.html │ ├── qtcoloreditorfactory.html │ ├── qtcolorpropertymanager-members.html │ ├── qtcolorpropertymanager.html │ ├── qtcursoreditorfactory-members.html │ ├── qtcursoreditorfactory.html │ ├── qtcursorpropertymanager-members.html │ ├── qtcursorpropertymanager.html │ ├── qtdateeditfactory-members.html │ ├── qtdateeditfactory.html │ ├── qtdatepropertymanager-members.html │ ├── qtdatepropertymanager.html │ ├── qtdatetimeeditfactory-members.html │ ├── qtdatetimeeditfactory.html │ ├── qtdatetimepropertymanager-members.html │ ├── qtdatetimepropertymanager.html │ ├── qtdoublepropertymanager-members.html │ ├── qtdoublepropertymanager.html │ ├── qtdoublespinboxfactory-members.html │ ├── qtdoublespinboxfactory.html │ ├── qtenumeditorfactory-members.html │ ├── qtenumeditorfactory.html │ ├── qtenumpropertymanager-members.html │ ├── qtenumpropertymanager.html │ ├── qtflagpropertymanager-members.html │ ├── qtflagpropertymanager.html │ ├── qtfonteditorfactory-members.html │ ├── qtfonteditorfactory.html │ ├── qtfontpropertymanager-members.html │ ├── qtfontpropertymanager.html │ ├── qtgroupboxpropertybrowser-members.html │ ├── qtgroupboxpropertybrowser.html │ ├── qtgrouppropertymanager-members.html │ ├── qtgrouppropertymanager.html │ ├── qtintpropertymanager-members.html │ ├── qtintpropertymanager.html │ ├── qtkeysequenceeditorfactory-members.html │ ├── qtkeysequenceeditorfactory.html │ ├── qtkeysequencepropertymanager-members.html │ ├── qtkeysequencepropertymanager.html │ ├── qtlineeditfactory-members.html │ ├── qtlineeditfactory.html │ ├── qtlocalepropertymanager-members.html │ ├── qtlocalepropertymanager.html │ ├── qtpointfpropertymanager-members.html │ ├── qtpointfpropertymanager.html │ ├── qtpointpropertymanager-members.html │ ├── qtpointpropertymanager.html │ ├── qtproperty-members.html │ ├── qtproperty.html │ ├── qtpropertybrowser-example-canvas-typed.html │ ├── qtpropertybrowser-example-canvas-variant.html │ ├── qtpropertybrowser-example-decoration.html │ ├── qtpropertybrowser-example-demo.html │ ├── qtpropertybrowser-example-extension.html │ ├── qtpropertybrowser-example-object-controller.html │ ├── qtpropertybrowser-example-simple.html │ ├── qtpropertybrowser.dcf │ ├── qtpropertybrowser.index │ ├── qtpropertybrowser.qhp │ ├── qtrectfpropertymanager-members.html │ ├── qtrectfpropertymanager.html │ ├── qtrectpropertymanager-members.html │ ├── qtrectpropertymanager.html │ ├── qtscrollbarfactory-members.html │ ├── qtscrollbarfactory.html │ ├── qtsizefpropertymanager-members.html │ ├── qtsizefpropertymanager.html │ ├── qtsizepolicypropertymanager-members.html │ ├── qtsizepolicypropertymanager.html │ ├── qtsizepropertymanager-members.html │ ├── qtsizepropertymanager.html │ ├── qtsliderfactory-members.html │ ├── qtsliderfactory.html │ ├── qtspinboxfactory-members.html │ ├── qtspinboxfactory.html │ ├── qtstringpropertymanager-members.html │ ├── qtstringpropertymanager.html │ ├── qttimeeditfactory-members.html │ ├── qttimeeditfactory.html │ ├── qttimepropertymanager-members.html │ ├── qttimepropertymanager.html │ ├── qttreepropertybrowser-members.html │ ├── qttreepropertybrowser.html │ ├── qtvarianteditorfactory-members.html │ ├── qtvarianteditorfactory.html │ ├── qtvariantproperty-members.html │ ├── qtvariantproperty.html │ ├── qtvariantpropertymanager-members.html │ └── qtvariantpropertymanager.html ├── images │ ├── canvas_typed.png │ ├── canvas_variant.png │ ├── decoration.png │ ├── demo.png │ ├── extension.png │ ├── object_controller.png │ ├── qt-logo.png │ ├── qtbuttonpropertybrowser.png │ ├── qtgroupboxpropertybrowser.png │ ├── qtpropertybrowser-duplicate.png │ ├── qtpropertybrowser.png │ ├── qttreepropertybrowser.png │ └── simple.png └── index.qdoc ├── examples ├── canvas_typed │ ├── canvas_typed.pro │ ├── canvas_typed.qdoc │ ├── main.cpp │ ├── mainwindow.cpp │ ├── mainwindow.h │ ├── qtcanvas.cpp │ └── qtcanvas.h ├── canvas_variant │ ├── canvas_variant.pro │ ├── canvas_variant.qdoc │ ├── main.cpp │ ├── mainwindow.cpp │ ├── mainwindow.h │ ├── qtcanvas.cpp │ └── qtcanvas.h ├── decoration │ ├── decoration.pro │ ├── decoration.qdoc │ └── main.cpp ├── demo │ ├── demo.pro │ ├── demo.qdoc │ ├── demo.qrc │ ├── images │ │ ├── down.png │ │ ├── left.png │ │ ├── right.png │ │ └── up.png │ └── main.cpp ├── examples.pro ├── extension │ ├── extension.pro │ ├── extension.qdoc │ └── main.cpp ├── object_controller │ ├── main.cpp │ ├── object_controller.pro │ ├── object_controller.qdoc │ ├── objectcontroller.cpp │ └── objectcontroller.h └── simple │ ├── main.cpp │ ├── simple.pro │ └── simple.qdoc ├── qtpropertybrowser.pro ├── qtpropertybrowser.pro.user └── src ├── .DS_Store ├── QtAbstractEditorFactoryBase ├── QtAbstractPropertyBrowser ├── QtAbstractPropertyManager ├── QtBoolPropertyManager ├── QtBrowserItem ├── QtButtonPropertyBrowser ├── QtCharEditorFactory ├── QtCharPropertyManager ├── QtCheckBoxFactory ├── QtColorEditorFactory ├── QtColorPropertyManager ├── QtCursorEditorFactory ├── QtCursorPropertyManager ├── QtDateEditFactory ├── QtDatePropertyManager ├── QtDateTimeEditFactory ├── QtDateTimePropertyManager ├── QtDoublePropertyManager ├── QtDoubleSpinBoxFactory ├── QtEnumEditorFactory ├── QtEnumPropertyManager ├── QtFlagPropertyManager ├── QtFontEditorFactory ├── QtFontPropertyManager ├── QtGroupBoxPropertyBrowser ├── QtGroupPropertyManager ├── QtIntPropertyManager ├── QtKeySequenceEditorFactory ├── QtKeySequencePropertyManager ├── QtLineEditFactory ├── QtLocalePropertyManager ├── QtPointFPropertyManager ├── QtPointPropertyManager ├── QtProperty ├── QtRectFPropertyManager ├── QtRectPropertyManager ├── QtScrollBarFactory ├── QtSizeFPropertyManager ├── QtSizePolicyPropertyManager ├── QtSizePropertyManager ├── QtSliderFactory ├── QtSpinBoxFactory ├── QtStringPropertyManager ├── QtTimeEditFactory ├── QtTimePropertyManager ├── QtTreePropertyBrowser ├── QtVariantEditorFactory ├── QtVariantProperty ├── QtVariantPropertyManager ├── images ├── cursor-arrow.png ├── cursor-busy.png ├── cursor-closedhand.png ├── cursor-cross.png ├── cursor-forbidden.png ├── cursor-hand.png ├── cursor-hsplit.png ├── cursor-ibeam.png ├── cursor-openhand.png ├── cursor-sizeall.png ├── cursor-sizeb.png ├── cursor-sizef.png ├── cursor-sizeh.png ├── cursor-sizev.png ├── cursor-uparrow.png ├── cursor-vsplit.png ├── cursor-wait.png └── cursor-whatsthis.png ├── qtbuttonpropertybrowser.cpp ├── qtbuttonpropertybrowser.h ├── qteditorfactory.cpp ├── qteditorfactory.h ├── qtgroupboxpropertybrowser.cpp ├── qtgroupboxpropertybrowser.h ├── qtpropertybrowser.cpp ├── qtpropertybrowser.h ├── qtpropertybrowser.pri ├── qtpropertybrowser.qrc ├── qtpropertybrowserutils.cpp ├── qtpropertybrowserutils_p.h ├── qtpropertymanager.cpp ├── qtpropertymanager.h ├── qttreepropertybrowser.cpp ├── qttreepropertybrowser.h ├── qtvariantproperty.cpp └── qtvariantproperty.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # qdraw 2 | -------------------------------------------------------------------------------- /app/app.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2015-06-13T23:45:28 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui xml svg 8 | 9 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 10 | 11 | include(../qtpropertybrowser/src/qtpropertybrowser.pri) 12 | TARGET = qdraw 13 | TEMPLATE = app 14 | 15 | 16 | SOURCES += main.cpp\ 17 | mainwindow.cpp \ 18 | drawobj.cpp \ 19 | drawscene.cpp \ 20 | drawtool.cpp \ 21 | sizehandle.cpp \ 22 | objectcontroller.cpp \ 23 | customproperty.cpp \ 24 | rulebar.cpp \ 25 | drawview.cpp \ 26 | commands.cpp \ 27 | document.cpp 28 | 29 | HEADERS += mainwindow.h \ 30 | drawobj.h \ 31 | drawscene.h \ 32 | drawtool.h \ 33 | sizehandle.h \ 34 | objectcontroller.h \ 35 | customproperty.h \ 36 | rulebar.h \ 37 | drawview.h \ 38 | commands.h \ 39 | document.h 40 | 41 | RESOURCES += \ 42 | app.qrc 43 | -------------------------------------------------------------------------------- /app/app.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | icons/align_bottom.png 4 | icons/align_hcenter.png 5 | icons/align_left.png 6 | icons/align_right.png 7 | icons/align_vcenter.png 8 | icons/bezier.png 9 | icons/ellipse.png 10 | icons/line.png 11 | icons/polygon.png 12 | icons/polyline.png 13 | icons/rectangle.png 14 | icons/align_top.png 15 | icons/arrow.png 16 | icons/rotate.png 17 | icons/bringtofront.png 18 | icons/sendtoback.png 19 | icons/roundrect.png 20 | icons/ungroup.png 21 | icons/group.png 22 | icons/undo.png 23 | icons/redo.png 24 | icons/arc.png 25 | icons/zoomin.png 26 | icons/zoomout.png 27 | icons/align_horzeven.png 28 | icons/align_verteven.png 29 | icons/align_width.png 30 | icons/align_height.png 31 | icons/align_height.svg 32 | icons/align_width.svg 33 | icons/align_all.png 34 | icons/copy.png 35 | icons/cut.png 36 | icons/paste.png 37 | 38 | 39 | -------------------------------------------------------------------------------- /app/commands.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMANDS 2 | #define COMMANDS 3 | 4 | #include 5 | #include "drawscene.h" 6 | 7 | class MoveShapeCommand : public QUndoCommand 8 | { 9 | public: 10 | MoveShapeCommand(QGraphicsScene *graphicsScene, const QPointF & delta , 11 | QUndoCommand * parent = 0); 12 | MoveShapeCommand(QGraphicsItem * item, const QPointF & delta , QUndoCommand * parent = 0); 13 | void undo() Q_DECL_OVERRIDE; 14 | void redo() Q_DECL_OVERRIDE; 15 | private: 16 | QGraphicsScene *myGraphicsScene; 17 | QGraphicsItem *myItem; 18 | QList myItems; 19 | QPointF myDelta; 20 | bool bMoved; 21 | }; 22 | 23 | class ResizeShapeCommand : public QUndoCommand 24 | { 25 | public: 26 | enum { Id = 1234, }; 27 | ResizeShapeCommand(QGraphicsItem * item , 28 | int handle, 29 | const QPointF& scale, 30 | QUndoCommand *parent = 0 ); 31 | void undo() Q_DECL_OVERRIDE; 32 | void redo() Q_DECL_OVERRIDE; 33 | 34 | bool mergeWith(const QUndoCommand *command) Q_DECL_OVERRIDE; 35 | int id() const Q_DECL_OVERRIDE { return Id; } 36 | private: 37 | QGraphicsItem *myItem; 38 | int handle_; 39 | int opposite_; 40 | QPointF scale_; 41 | bool bResized; 42 | }; 43 | 44 | class ControlShapeCommand : public QUndoCommand 45 | { 46 | public: 47 | enum { Id = 1235, }; 48 | ControlShapeCommand(QGraphicsItem * item , 49 | int handle, 50 | const QPointF& newPos, 51 | const QPointF& lastPos, 52 | QUndoCommand *parent = 0 ); 53 | void undo() Q_DECL_OVERRIDE; 54 | void redo() Q_DECL_OVERRIDE; 55 | 56 | bool mergeWith(const QUndoCommand *command) Q_DECL_OVERRIDE; 57 | int id() const Q_DECL_OVERRIDE { return Id; } 58 | 59 | private: 60 | QGraphicsItem *myItem; 61 | int handle_; 62 | QPointF lastPos_; 63 | QPointF newPos_; 64 | bool bControled; 65 | }; 66 | 67 | 68 | class RotateShapeCommand : public QUndoCommand 69 | { 70 | public: 71 | RotateShapeCommand(QGraphicsItem *item , const qreal oldAngle , 72 | QUndoCommand * parent = 0); 73 | void undo() Q_DECL_OVERRIDE; 74 | void redo() Q_DECL_OVERRIDE; 75 | private: 76 | QGraphicsItem *myItem; 77 | qreal myOldAngle; 78 | qreal newAngle; 79 | }; 80 | 81 | class RemoveShapeCommand : public QUndoCommand 82 | { 83 | public: 84 | explicit RemoveShapeCommand(QGraphicsScene *graphicsScene, QUndoCommand *parent = 0); 85 | ~RemoveShapeCommand(); 86 | void undo() Q_DECL_OVERRIDE; 87 | void redo() Q_DECL_OVERRIDE; 88 | 89 | private: 90 | QList items; 91 | QGraphicsScene *myGraphicsScene; 92 | }; 93 | 94 | class GroupShapeCommand : public QUndoCommand 95 | { 96 | public: 97 | explicit GroupShapeCommand( QGraphicsItemGroup * group, QGraphicsScene *graphicsScene, 98 | QUndoCommand *parent = 0); 99 | void undo() Q_DECL_OVERRIDE; 100 | void redo() Q_DECL_OVERRIDE; 101 | private: 102 | QList items; 103 | QGraphicsItemGroup * myGroup; 104 | QGraphicsScene *myGraphicsScene; 105 | bool b_undo; 106 | }; 107 | 108 | class UnGroupShapeCommand : public QUndoCommand 109 | { 110 | public: 111 | explicit UnGroupShapeCommand( QGraphicsItemGroup * group, QGraphicsScene *graphicsScene, 112 | QUndoCommand *parent = 0); 113 | void undo() Q_DECL_OVERRIDE; 114 | void redo() Q_DECL_OVERRIDE; 115 | private: 116 | QList items; 117 | QGraphicsItemGroup * myGroup; 118 | QGraphicsScene *myGraphicsScene; 119 | }; 120 | 121 | class AddShapeCommand : public QUndoCommand 122 | { 123 | public: 124 | AddShapeCommand(QGraphicsItem *item , QGraphicsScene *graphicsScene, 125 | QUndoCommand *parent = 0); 126 | ~AddShapeCommand(); 127 | 128 | void undo() Q_DECL_OVERRIDE; 129 | void redo() Q_DECL_OVERRIDE; 130 | 131 | private: 132 | QGraphicsItem *myDiagramItem; 133 | QGraphicsScene *myGraphicsScene; 134 | QPointF initialPosition; 135 | }; 136 | 137 | QString createCommandString(QGraphicsItem *item, const QPointF &point); 138 | 139 | #endif // COMMANDS 140 | 141 | -------------------------------------------------------------------------------- /app/customproperty.h: -------------------------------------------------------------------------------- 1 | #ifndef CUSTOMPROPERTY 2 | #define CUSTOMPROPERTY 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | QT_BEGIN_NAMESPACE 9 | class QComboBox; 10 | class QSlider; 11 | class QStyleOptionViewItem; 12 | class QAbstractItemDelegate; 13 | class QPushButton; 14 | QT_END_NAMESPACE 15 | 16 | class ShadeWidget : public QWidget 17 | { 18 | Q_OBJECT 19 | public: 20 | ShadeWidget(QWidget *parent); 21 | public slots: 22 | void colorChanged( const QColor & begin,const QColor & middle,const QColor & end) ; 23 | void positionChanged( int position ); 24 | void typeChanged( int type ); 25 | protected: 26 | void paintEvent(QPaintEvent * event); 27 | int m_type; 28 | QColor m_colorBegin; 29 | QColor m_colorMiddle; 30 | QColor m_colorEnd; 31 | int m_midpoint; 32 | }; 33 | 34 | class ColorButton :public QPushButton 35 | { 36 | Q_OBJECT 37 | public: 38 | explicit ColorButton( QWidget * parent ); 39 | void setValue( const QColor & color ) { m_color = color; } 40 | QColor value() const { return m_color;} 41 | protected: 42 | void paintEvent(QPaintEvent *); 43 | private: 44 | QColor m_color; 45 | }; 46 | 47 | class QtGradientEditor :public QWidget 48 | { 49 | Q_OBJECT 50 | public: 51 | QtGradientEditor( QWidget * parent ); 52 | public slots: 53 | void colorChanged( int ) ; 54 | void clicked() ; 55 | signals: 56 | void colorChanged( const QColor & begin,const QColor & middle,const QColor & end) ; 57 | private: 58 | QComboBox *m_gradientMode; 59 | ColorButton *m_colorBegin; 60 | ColorButton *m_colorMiddle; 61 | ColorButton *m_colorEnd; 62 | QSlider *m_midpoint; 63 | ShadeWidget * m_shadewidget; 64 | }; 65 | 66 | class QtPenPropertyManager : public QtAbstractPropertyManager 67 | { 68 | Q_OBJECT 69 | public: 70 | QtPenPropertyManager(QObject * parent = 0); 71 | ~QtPenPropertyManager(); 72 | 73 | QtIntPropertyManager *subIntPropertyManager() const; 74 | QtEnumPropertyManager *subEnumPropertyManager() const; 75 | QPen value(const QtProperty *property) const; 76 | public Q_SLOTS: 77 | void setValue(QtProperty *property, const QPen &val); 78 | void slotIntChanged(QtProperty *, int); 79 | void slotEnumChanged(QtProperty *, int); 80 | void slotPropertyDestroyed(QtProperty *); 81 | 82 | Q_SIGNALS: 83 | void valueChanged(QtProperty *property, const QPen &val); 84 | protected: 85 | QString valueText(const QtProperty *property) const; 86 | QIcon valueIcon(const QtProperty *property) const; 87 | virtual void initializeProperty(QtProperty *property); 88 | virtual void uninitializeProperty(QtProperty *property); 89 | 90 | private: 91 | typedef QMap PropertyValueMap; 92 | PropertyValueMap m_values; 93 | 94 | QtIntPropertyManager *m_intPropertyManager; 95 | QtEnumPropertyManager *m_enumPropertyManager; 96 | 97 | QMap m_propertyToWidth; 98 | QMap m_propertyToStyle; 99 | QMap m_propertyToCapStyle; 100 | QMap m_propertyToJoinStyle; 101 | 102 | QMap m_widthToProperty; 103 | QMap m_styleToProperty; 104 | QMap m_capStyleToProperty; 105 | QMap m_joinStyleToProperty; 106 | 107 | Q_DISABLE_COPY(QtPenPropertyManager) 108 | 109 | }; 110 | 111 | #endif // CUSTOMPROPERTY 112 | 113 | -------------------------------------------------------------------------------- /app/document.cpp: -------------------------------------------------------------------------------- 1 | #include "document.h" 2 | 3 | Document::Document() 4 | { 5 | 6 | } 7 | 8 | -------------------------------------------------------------------------------- /app/document.h: -------------------------------------------------------------------------------- 1 | #ifndef DOCUMENT_H 2 | #define DOCUMENT_H 3 | 4 | 5 | class Document 6 | { 7 | public: 8 | Document(); 9 | 10 | 11 | }; 12 | 13 | #endif // DOCUMENT_H 14 | -------------------------------------------------------------------------------- /app/drawscene.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAWSCENE 2 | #define DRAWSCENE 3 | 4 | #include 5 | #include "drawtool.h" 6 | #include "drawobj.h" 7 | 8 | QT_BEGIN_NAMESPACE 9 | class QGraphicsSceneMouseEvent; 10 | class QMenu; 11 | class QPointF; 12 | class QGraphicsLineItem; 13 | class QFont; 14 | class QGraphicsTextItem; 15 | class QColor; 16 | class QKeyEvent; 17 | class QPainter; 18 | QT_END_NAMESPACE 19 | 20 | enum AlignType 21 | { 22 | UP_ALIGN=0, 23 | HORZ_ALIGN, 24 | VERT_ALIGN, 25 | DOWN_ALIGN, 26 | LEFT_ALIGN, 27 | RIGHT_ALIGN, 28 | CENTER_ALIGN, 29 | HORZEVEN_ALIGN, 30 | VERTEVEN_ALIGN, 31 | WIDTH_ALIGN, 32 | HEIGHT_ALIGN, 33 | ALL_ALIGN 34 | }; 35 | 36 | class GridTool 37 | { 38 | public: 39 | GridTool(const QSize &grid = QSize(3200,2400) , const QSize & space = QSize(20,20) ); 40 | void paintGrid(QPainter *painter,const QRect & rect ); 41 | protected: 42 | QSize m_sizeGrid; 43 | QSize m_sizeGridSpace; 44 | }; 45 | 46 | class GraphicsItemGroup; 47 | 48 | class DrawScene : public QGraphicsScene 49 | { 50 | Q_OBJECT 51 | public: 52 | explicit DrawScene(QObject *parent = 0); 53 | ~DrawScene(); 54 | void setView(QGraphicsView * view ) { m_view = view ; } 55 | QGraphicsView * view() { return m_view; } 56 | void align(AlignType alignType ); 57 | void mouseEvent(QGraphicsSceneMouseEvent *mouseEvent ); 58 | GraphicsItemGroup * createGroup(const QList &items ,bool isAdd = true); 59 | void destroyGroup(QGraphicsItemGroup *group); 60 | signals: 61 | void itemMoved( QGraphicsItem * item , const QPointF & oldPosition ); 62 | void itemRotate(QGraphicsItem * item , const qreal oldAngle ); 63 | void itemAdded(QGraphicsItem * item ); 64 | void itemResize(QGraphicsItem * item , int handle , const QPointF& scale ); 65 | void itemControl(QGraphicsItem * item , int handle , const QPointF & newPos , const QPointF& lastPos_ ); 66 | 67 | protected: 68 | void drawBackground(QPainter *painter, const QRectF &rect) Q_DECL_OVERRIDE; 69 | void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) Q_DECL_OVERRIDE; 70 | void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent) Q_DECL_OVERRIDE; 71 | void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent) Q_DECL_OVERRIDE; 72 | void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *mouseEvet) Q_DECL_OVERRIDE; 73 | void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE; 74 | void keyReleaseEvent(QKeyEvent *e) Q_DECL_OVERRIDE; 75 | QGraphicsView * m_view; 76 | 77 | qreal m_dx; 78 | qreal m_dy; 79 | bool m_moved; 80 | GridTool *m_grid; 81 | }; 82 | 83 | #endif // DRAWSCENE 84 | 85 | -------------------------------------------------------------------------------- /app/drawtool.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAWTOOL 2 | #define DRAWTOOL 3 | 4 | 5 | #include "drawobj.h" 6 | #include "drawscene.h" 7 | 8 | QT_BEGIN_NAMESPACE 9 | class QGraphicsScene; 10 | class QGraphicsSceneMouseEvent; 11 | class QMenu; 12 | class QPointF; 13 | class QGraphicsLineItem; 14 | class QFont; 15 | class QGraphicsTextItem; 16 | class QColor; 17 | class QAbstractGraphicsShapeItem; 18 | QT_END_NAMESPACE 19 | 20 | class DrawScene; 21 | class GraphicsItem; 22 | class GraphicsPolygonItem; 23 | enum DrawShape 24 | { 25 | selection , 26 | rotation , 27 | line , 28 | rectangle , 29 | roundrect , 30 | ellipse , 31 | bezier, 32 | polygon, 33 | polyline, 34 | }; 35 | 36 | class DrawTool 37 | { 38 | public: 39 | DrawTool( DrawShape shape ); 40 | virtual void mousePressEvent(QGraphicsSceneMouseEvent * event , DrawScene * scene ) ; 41 | virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * event , DrawScene * scene ) ; 42 | virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * event , DrawScene * scene ); 43 | virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent * event ,DrawScene *scene ); 44 | DrawShape m_drawShape; 45 | bool m_hoverSizer; 46 | 47 | static DrawTool * findTool( DrawShape drawShape ); 48 | static QList c_tools; 49 | static QPointF c_down; 50 | static quint32 c_nDownFlags; 51 | static QPointF c_last; 52 | static DrawShape c_drawShape; 53 | }; 54 | 55 | class SelectTool : public DrawTool 56 | { 57 | public: 58 | SelectTool(); 59 | virtual void mousePressEvent(QGraphicsSceneMouseEvent * event , DrawScene * scene ) ; 60 | virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * event , DrawScene * scene ) ; 61 | virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * event , DrawScene * scene ); 62 | QPointF initialPositions; 63 | QPointF opposite_; 64 | QGraphicsPathItem * dashRect; 65 | GraphicsItemGroup * selLayer; 66 | }; 67 | 68 | class RotationTool : public DrawTool 69 | { 70 | public: 71 | RotationTool(); 72 | virtual void mousePressEvent(QGraphicsSceneMouseEvent * event , DrawScene * scene ) ; 73 | virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * event , DrawScene * scene ) ; 74 | virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * event , DrawScene * scene ); 75 | qreal lastAngle; 76 | QGraphicsPathItem * dashRect; 77 | }; 78 | 79 | class RectTool : public DrawTool 80 | { 81 | public: 82 | RectTool(DrawShape drawShape); 83 | virtual void mousePressEvent(QGraphicsSceneMouseEvent * event , DrawScene * scene ) ; 84 | virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * event , DrawScene * scene ) ; 85 | virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * event , DrawScene * scene ); 86 | GraphicsItem * item; 87 | }; 88 | 89 | class PolygonTool : public DrawTool 90 | { 91 | public: 92 | PolygonTool(DrawShape shape ); 93 | virtual void mousePressEvent(QGraphicsSceneMouseEvent * event , DrawScene * scene ) ; 94 | virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * event , DrawScene * scene ) ; 95 | virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * event , DrawScene * scene ); 96 | virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent * event ,DrawScene *scene ); 97 | GraphicsPolygonItem * item; 98 | int m_nPoints; 99 | QPointF initialPositions; 100 | 101 | }; 102 | 103 | #endif // DRAWTOOL 104 | 105 | -------------------------------------------------------------------------------- /app/drawview.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAWVIEW_H 2 | #define DRAWVIEW_H 3 | #include 4 | 5 | #include "rulebar.h" 6 | #include "drawobj.h" 7 | 8 | class QMouseEvent; 9 | 10 | class DrawView : public QGraphicsView 11 | { 12 | Q_OBJECT 13 | public: 14 | DrawView(QGraphicsScene *scene); 15 | void zoomIn(); 16 | void zoomOut(); 17 | 18 | void newFile(); 19 | bool loadFile(const QString &fileName); 20 | bool save(); 21 | bool saveAs(); 22 | bool saveFile(const QString &fileName); 23 | QString userFriendlyCurrentFile(); 24 | 25 | QString currentFile() { return curFile; } 26 | void setModified( bool value ) { modified = value ; } 27 | bool isModified() const { return modified; } 28 | signals: 29 | void positionChanged(int x , int y ); 30 | protected: 31 | void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE; 32 | 33 | void mouseMoveEvent(QMouseEvent * event) Q_DECL_OVERRIDE; 34 | void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE; 35 | void scrollContentsBy(int dx, int dy) Q_DECL_OVERRIDE; 36 | void updateRuler(); 37 | QtRuleBar *m_hruler; 38 | QtRuleBar *m_vruler; 39 | QtCornerBox * box; 40 | 41 | private: 42 | bool maybeSave(); 43 | void setCurrentFile(const QString &fileName); 44 | QString strippedName(const QString &fullFileName); 45 | void loadCanvas( QXmlStreamReader *xml ); 46 | GraphicsItemGroup * loadGroupFromXML( QXmlStreamReader * xml ); 47 | 48 | QString curFile; 49 | bool isUntitled; 50 | bool modified; 51 | }; 52 | 53 | #endif // DRAWVIEW_H 54 | -------------------------------------------------------------------------------- /app/icons/align_all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/align_all.png -------------------------------------------------------------------------------- /app/icons/align_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/align_bottom.png -------------------------------------------------------------------------------- /app/icons/align_hcenter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/align_hcenter.png -------------------------------------------------------------------------------- /app/icons/align_height.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/align_height.png -------------------------------------------------------------------------------- /app/icons/align_height.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Produced by OmniGraffle 6.2.3 2015-07-02 03:32:35 +0000icon_24x24@2xLayer 1 4 | -------------------------------------------------------------------------------- /app/icons/align_horzeven.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/align_horzeven.png -------------------------------------------------------------------------------- /app/icons/align_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/align_left.png -------------------------------------------------------------------------------- /app/icons/align_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/align_right.png -------------------------------------------------------------------------------- /app/icons/align_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/align_top.png -------------------------------------------------------------------------------- /app/icons/align_vcenter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/align_vcenter.png -------------------------------------------------------------------------------- /app/icons/align_verteven.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/align_verteven.png -------------------------------------------------------------------------------- /app/icons/align_width.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/align_width.png -------------------------------------------------------------------------------- /app/icons/align_width.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Produced by OmniGraffle 6.2.3 2015-07-02 03:14:39 +0000icon_512x512@2xLayer 1 4 | -------------------------------------------------------------------------------- /app/icons/arc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/arc.png -------------------------------------------------------------------------------- /app/icons/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/arrow.png -------------------------------------------------------------------------------- /app/icons/bezier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/bezier.png -------------------------------------------------------------------------------- /app/icons/bringtofront.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/bringtofront.png -------------------------------------------------------------------------------- /app/icons/copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/copy.png -------------------------------------------------------------------------------- /app/icons/cut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/cut.png -------------------------------------------------------------------------------- /app/icons/ellipse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/ellipse.png -------------------------------------------------------------------------------- /app/icons/group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/group.png -------------------------------------------------------------------------------- /app/icons/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/line.png -------------------------------------------------------------------------------- /app/icons/paste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/paste.png -------------------------------------------------------------------------------- /app/icons/polygon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/polygon.png -------------------------------------------------------------------------------- /app/icons/polyline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/polyline.png -------------------------------------------------------------------------------- /app/icons/rectangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/rectangle.png -------------------------------------------------------------------------------- /app/icons/redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/redo.png -------------------------------------------------------------------------------- /app/icons/rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/rotate.png -------------------------------------------------------------------------------- /app/icons/roundrect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/roundrect.png -------------------------------------------------------------------------------- /app/icons/sendtoback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/sendtoback.png -------------------------------------------------------------------------------- /app/icons/undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/undo.png -------------------------------------------------------------------------------- /app/icons/ungroup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/ungroup.png -------------------------------------------------------------------------------- /app/icons/zoomin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/zoomin.png -------------------------------------------------------------------------------- /app/icons/zoomout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/app/icons/zoomout.png -------------------------------------------------------------------------------- /app/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | #include 4 | #include 5 | 6 | int main(int argc, char *argv[]) 7 | { 8 | 9 | Q_INIT_RESOURCE(app); 10 | QApplication a(argc, argv); 11 | 12 | QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8")); 13 | 14 | MainWindow w; 15 | w.showMaximized(); 16 | /* 17 | QSize size(QApplication::desktop()->availableGeometry().width(), 18 | QApplication::desktop()->availableGeometry().height()); 19 | w.resize(size); 20 | w.move ((QApplication::desktop()->width() - w.width())/2, 21 | (QApplication::desktop()->height() - w.height())/2); 22 | */ 23 | return a.exec(); 24 | } 25 | -------------------------------------------------------------------------------- /app/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include "drawscene.h" 10 | #include "objectcontroller.h" 11 | #include "drawview.h" 12 | 13 | QT_BEGIN_NAMESPACE 14 | class QAction; 15 | class QActionGroup; 16 | class QToolBox; 17 | class QSpinBox; 18 | class QComboBox; 19 | class QFontComboBox; 20 | class QButtonGroup; 21 | class QLineEdit; 22 | class QGraphicsTextItem; 23 | class QFont; 24 | class QToolButton; 25 | class QAbstractButton; 26 | class QGraphicsView; 27 | class QListWidget; 28 | class QStatusBar; 29 | class QMdiArea; 30 | class QMdiSubWindow; 31 | class QSignalMapper; 32 | class QUndoStack; 33 | class QUndoView; 34 | QT_END_NAMESPACE 35 | 36 | class QtVariantProperty; 37 | class QtProperty; 38 | 39 | class MainWindow : public QMainWindow 40 | { 41 | Q_OBJECT 42 | 43 | public: 44 | MainWindow(QWidget *parent = 0); 45 | ~MainWindow(); 46 | 47 | bool openFile(const QString &fileName); 48 | 49 | public slots: 50 | 51 | void newFile(); 52 | void open(); 53 | void save(); 54 | DrawView *createMdiChild(); 55 | void updateMenus(); 56 | void updateWindowMenu(); 57 | void setActiveSubWindow(QWidget *window); 58 | 59 | void addShape(); 60 | void updateActions(); 61 | void deleteItem(); 62 | void itemSelected(); 63 | void itemMoved(QGraphicsItem * item , const QPointF & oldPosition ); 64 | void itemAdded(QGraphicsItem * item ); 65 | void itemRotate(QGraphicsItem * item , const qreal oldAngle ); 66 | void itemResize(QGraphicsItem * item , int handle , const QPointF& scale ); 67 | void itemControl(QGraphicsItem * item , int handle , const QPointF & newPos , const QPointF& lastPos_ ); 68 | 69 | void on_actionBringToFront_triggered(); 70 | void on_actionSendToBack_triggered(); 71 | void on_aglin_triggered(); 72 | void zoomIn(); 73 | void zoomOut(); 74 | void on_group_triggered(); 75 | void on_unGroup_triggered(); 76 | void on_func_test_triggered(); 77 | void on_copy(); 78 | void on_paste(); 79 | void on_cut(); 80 | void dataChanged(); 81 | void positionChanged(int x, int y ); 82 | 83 | void about(); 84 | protected: 85 | void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE; 86 | 87 | private: 88 | void createActions(); 89 | void createMenus(); 90 | void createToolbars(); 91 | void createPropertyEditor(); 92 | void createToolBox(); 93 | 94 | DrawView *activeMdiChild(); 95 | QMdiSubWindow *findMdiChild(const QString &fileName); 96 | 97 | 98 | QMenu *windowMenu; 99 | 100 | QMdiArea *mdiArea; 101 | QSignalMapper *windowMapper; 102 | 103 | // update ui 104 | QTimer m_timer; 105 | // toolbox 106 | QToolBox *toolBox; 107 | // edit toolbar; 108 | QToolBar * editToolBar; 109 | // align toolbar 110 | QToolBar * alignToolBar; 111 | QAction * rightAct; 112 | QAction * leftAct; 113 | QAction * vCenterAct; 114 | QAction * hCenterAct; 115 | QAction * upAct; 116 | QAction * downAct; 117 | QAction * horzAct; 118 | QAction * vertAct; 119 | QAction * heightAct; 120 | QAction * widthAct; 121 | QAction * allAct; 122 | QAction * bringToFrontAct; 123 | QAction * sendToBackAct; 124 | 125 | QAction * funcAct; 126 | // file 127 | QAction *newAct; 128 | QAction *openAct; 129 | QAction *saveAct; 130 | QAction *exitAct; 131 | 132 | QAction * groupAct; 133 | QAction * unGroupAct; 134 | 135 | // edit action 136 | QAction * deleteAct; 137 | QAction * undoAct; 138 | QAction * redoAct; 139 | QAction * copyAct; 140 | QAction * pasteAct; 141 | QAction * cutAct; 142 | QAction * zoomInAct; 143 | QAction * zoomOutAct; 144 | 145 | // drawing toolbar 146 | QToolBar * drawToolBar; 147 | QActionGroup * drawActionGroup; 148 | QAction * selectAct; 149 | QAction * lineAct; 150 | QAction * rectAct; 151 | QAction * roundRectAct; 152 | QAction * ellipseAct; 153 | QAction * polygonAct; 154 | QAction * polylineAct; 155 | QAction * bezierAct; 156 | QAction * rotateAct; 157 | 158 | QAction *closeAct; 159 | QAction *closeAllAct; 160 | QAction *tileAct; 161 | QAction *cascadeAct; 162 | QAction *nextAct; 163 | QAction *previousAct; 164 | QAction *separatorAct; 165 | QAction *aboutAct; 166 | QAction *aboutQtAct; 167 | 168 | //property editor 169 | QDockWidget *dockProperty; 170 | ObjectController *propertyEditor; 171 | QObject *theControlledObject; 172 | 173 | QListWidget *listView; 174 | 175 | QUndoStack *undoStack; 176 | QUndoView *undoView; 177 | // statusbar label 178 | QLabel *m_posInfo; 179 | }; 180 | 181 | #endif // MAINWINDOW_H 182 | -------------------------------------------------------------------------------- /app/objectcontroller.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). 4 | ** Contact: http://www.qt-project.org/legal 5 | ** 6 | ** This file is part of the Qt Solutions component. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** You may use this file under the terms of the BSD license as follows: 10 | ** 11 | ** "Redistribution and use in source and binary forms, with or without 12 | ** modification, are permitted provided that the following conditions are 13 | ** met: 14 | ** * Redistributions of source code must retain the above copyright 15 | ** notice, this list of conditions and the following disclaimer. 16 | ** * Redistributions in binary form must reproduce the above copyright 17 | ** notice, this list of conditions and the following disclaimer in 18 | ** the documentation and/or other materials provided with the 19 | ** distribution. 20 | ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names 21 | ** of its contributors may be used to endorse or promote products derived 22 | ** from this software without specific prior written permission. 23 | ** 24 | ** 25 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 36 | ** 37 | ** $QT_END_LICENSE$ 38 | ** 39 | ****************************************************************************/ 40 | 41 | #ifndef OBJECTCONTROLLER_H 42 | #define OBJECTCONTROLLER_H 43 | 44 | #include 45 | 46 | class ObjectControllerPrivate; 47 | 48 | class ObjectController : public QWidget 49 | { 50 | Q_OBJECT 51 | public: 52 | ObjectController(QWidget *parent = 0); 53 | ~ObjectController(); 54 | 55 | void setObject(QObject *object); 56 | QObject *object() const; 57 | 58 | private: 59 | ObjectControllerPrivate *d_ptr; 60 | Q_DECLARE_PRIVATE(ObjectController) 61 | Q_DISABLE_COPY(ObjectController) 62 | Q_PRIVATE_SLOT(d_func(), void slotValueChanged(QtProperty *, const QVariant &)) 63 | }; 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /app/rulebar.h: -------------------------------------------------------------------------------- 1 | #ifndef RULEBAR 2 | #define RULEBAR 3 | 4 | #include 5 | 6 | QT_BEGIN_NAMESPACE 7 | class QFrame; 8 | class QPaintEvent; 9 | class QPainter; 10 | class QGraphicsView; 11 | QT_END_NAMESPACE 12 | 13 | #define RULER_SIZE 16 14 | 15 | class QtCornerBox : public QWidget 16 | { 17 | Q_OBJECT 18 | public: 19 | explicit QtCornerBox(QWidget * parent ); 20 | protected: 21 | void paintEvent(QPaintEvent *); 22 | }; 23 | 24 | class QtRuleBar : public QWidget 25 | { 26 | Q_OBJECT 27 | public: 28 | explicit QtRuleBar(Qt::Orientation direction, QGraphicsView * view, QWidget * parent = 0 ); 29 | void setRange( double lower , double upper , double max_size ); 30 | void updatePosition( const QPoint & pos ); 31 | protected: 32 | void paintEvent(QPaintEvent *event); 33 | void drawTicker(QPainter * painter); 34 | void drawPos(QPainter * painter) ; 35 | Qt::Orientation m_direction; 36 | QPoint m_lastPos; 37 | QColor m_faceColor; 38 | QGraphicsView * m_view; 39 | 40 | double m_lower; 41 | double m_upper; 42 | double m_maxsize; 43 | }; 44 | 45 | #endif // RULEBAR 46 | 47 | -------------------------------------------------------------------------------- /app/sizehandle.cpp: -------------------------------------------------------------------------------- 1 | #include "sizehandle.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | SizeHandleRect::SizeHandleRect(QGraphicsItem* parent , int d, bool control) 10 | :QGraphicsRectItem(-SELECTION_HANDLE_SIZE/2, 11 | -SELECTION_HANDLE_SIZE/2, 12 | SELECTION_HANDLE_SIZE, 13 | SELECTION_HANDLE_SIZE,parent) 14 | ,m_dir(d) 15 | ,m_controlPoint(control) 16 | ,m_state(SelectionHandleOff) 17 | ,borderColor("white") 18 | { 19 | this->setAcceptHoverEvents(true); 20 | setFlag(QGraphicsItem::ItemIgnoresTransformations,true); 21 | hide(); 22 | } 23 | 24 | 25 | void SizeHandleRect::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) 26 | { 27 | painter->save(); 28 | painter->setPen(Qt::SolidLine); 29 | painter->setBrush(QBrush(borderColor)); 30 | 31 | painter->setRenderHint(QPainter::Antialiasing,false); 32 | 33 | if ( m_controlPoint ) 34 | { 35 | painter->setPen(QPen(Qt::red,Qt::SolidLine)); 36 | painter->setBrush(Qt::green); 37 | painter->drawEllipse(rect().center(),3,3); 38 | }else 39 | painter->drawRect(rect()); 40 | painter->restore(); 41 | } 42 | 43 | 44 | void SizeHandleRect::setState(SelectionHandleState st) 45 | { 46 | if (st == m_state) 47 | return; 48 | switch (st) { 49 | case SelectionHandleOff: 50 | hide(); 51 | break; 52 | case SelectionHandleInactive: 53 | case SelectionHandleActive: 54 | show(); 55 | break; 56 | } 57 | borderColor = Qt::white; 58 | m_state = st; 59 | } 60 | 61 | void SizeHandleRect::move(qreal x, qreal y) 62 | { 63 | setPos(x,y); 64 | } 65 | 66 | void SizeHandleRect::hoverEnterEvent(QGraphicsSceneHoverEvent *e) 67 | { 68 | borderColor = Qt::blue; 69 | update(); 70 | QGraphicsRectItem::hoverEnterEvent(e); 71 | } 72 | 73 | void SizeHandleRect::hoverLeaveEvent(QGraphicsSceneHoverEvent *e) 74 | { 75 | borderColor = Qt::white; 76 | update(); 77 | QGraphicsRectItem::hoverLeaveEvent(e); 78 | } 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /app/sizehandle.h: -------------------------------------------------------------------------------- 1 | #ifndef SIZEHANDLE 2 | #define SIZEHANDLE 3 | 4 | #include 5 | #include 6 | 7 | QT_BEGIN_NAMESPACE 8 | class QColor; 9 | class QFocusEvent; 10 | class QGraphicsItem; 11 | class QGraphicsScene; 12 | class QGraphicsSceneMouseEvent; 13 | class QGraphicsSceneHoverEvent; 14 | QT_END_NAMESPACE 15 | 16 | 17 | enum { SELECTION_HANDLE_SIZE = 6, SELECTION_MARGIN = 10 }; 18 | enum SelectionHandleState { SelectionHandleOff, SelectionHandleInactive, SelectionHandleActive }; 19 | enum { Handle_None = 0 , LeftTop , Top, RightTop, Right, RightBottom, Bottom, LeftBottom, Left }; 20 | 21 | class SizeHandleRect :public QGraphicsRectItem 22 | { 23 | public: 24 | 25 | SizeHandleRect(QGraphicsItem* parent , int d , bool control = false ); 26 | int dir() const { return m_dir; } 27 | void setState(SelectionHandleState st); 28 | void move(qreal x, qreal y ); 29 | protected: 30 | void hoverEnterEvent(QGraphicsSceneHoverEvent *e ); 31 | void hoverLeaveEvent(QGraphicsSceneHoverEvent *e ); 32 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); 33 | 34 | private: 35 | const int m_dir; 36 | bool m_controlPoint; 37 | SelectionHandleState m_state; 38 | QColor borderColor; 39 | }; 40 | 41 | 42 | #endif // SIZEHANDLE 43 | 44 | -------------------------------------------------------------------------------- /qdraw.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | SUBDIRS += \ 3 | app \ 4 | qtpropertybrowser\ 5 | 6 | -------------------------------------------------------------------------------- /qtpropertybrowser/README.TXT: -------------------------------------------------------------------------------- 1 | Qt Solutions Component: Property Browser 2 | 3 | A property browser framework enabling the user to edit a set of 4 | properties. 5 | 6 | The framework provides a browser widget that displays the given 7 | properties with labels and corresponding editing widgets (e.g. 8 | line edits or comboboxes). The various types of editing widgets 9 | are provided by the framework's editor factories: For each 10 | property type, the framework provides a property manager (e.g. 11 | QtIntPropertyManager and QtStringPropertyManager) which can be 12 | associated with the preferred editor factory (e.g. 13 | QtSpinBoxFactory and QtLineEditFactory). The framework also 14 | provides a variant based property type with corresponding variant 15 | manager and factory. Finally, the framework provides three 16 | ready-made implementations of the browser widget: 17 | QtTreePropertyBrowser, QtButtonPropertyBrowser and 18 | QtGroupBoxPropertyBrowser. 19 | 20 | Version history: 21 | 22 | 2.1: - QtTreePropertyBrowser - tooltip of property applied to 23 | first column, while second column shows the value text of property 24 | in its tooltip 25 | - QtAbstractPropertyManager - initializeProperty() and 26 | uninitializeProperty() without const modifier now 27 | - QtTreePropertyBrowser and QtGroupBoxPropertyBrowser - internal 28 | margin set to 0 29 | - QtProperty - setEnabled() and isEnabled() methods added 30 | - QtTreePropertyBrowser - "rootIsDecorated", "indentation" and 31 | "headerVisible" properties added 32 | - QtProperty - hasValue() method added, useful for group 33 | properties 34 | 35 | 2.2: - FocusOut event now filtered out in case of 36 | Qt::ActiveWindowFocusReason reason. In that case editor is not 37 | closed when its sub dialog is executed 38 | - Removed bug in color icon generation 39 | - Decimals attribute added to "double" property type 40 | - PointF, SizeF and RectF types supported 41 | - Proper translation calls for tree property browser 42 | - QtProperty - ensure inserted subproperty is different from 43 | "this" property 44 | - QtBrowserItem class introduced, useful for identifying browser's 45 | gui elements 46 | - Possibility to control expanded state of QtTreePropertyBrowser's 47 | items from code 48 | - QtTreePropertyBrowser - "resizeMode" and "splitterPosition" 49 | properties added 50 | - QtGroupBoxPropertyBrowser - fixed crash in case of deleting the 51 | editor factory and then deleting the manager 52 | - "Decoration" example added - it shows how to add new 53 | responsibilities to the existing managers and editor factories 54 | 55 | 2.3: - Various bugfixes and improvements 56 | - QtProperty - setModified() and isModified() methods added 57 | - QtTreePropertyBrowser - disabling an item closes its editor 58 | - KeySequence, Char, Locale and Cursor types supported 59 | - Support for icons in enum type added 60 | - Kerning subproperty exposed in Font type 61 | - New property browser class added - QtButtonPropertyBrowser with 62 | drop down button as a grouping element 63 | 64 | 2.4: - Fixed memory leak of QtProperty 65 | - QtTreePropertyBrowser - group items are rendered better 66 | - QtTreePropertyBrowser - propertiesWithoutValueMarked and 67 | alternatingRowColors features added 68 | - QtTreePropertyBrowser - possibility of coloring properties added 69 | - QtTreePropertyBrowser - keyboard navigation improved 70 | - New factories providing popup dialogs added: 71 | QtColorEditorFactory and QtFontEditorFactory 72 | - Single step attribute added to: QtIntPropertyManager and 73 | QtDoublePropertyManager 74 | 75 | 2.5: - "Object Controller" example added. It implements a similar 76 | widget to the property editor in QDesigner 77 | - Compile with QT_NO_CURSOR 78 | - Expand root item with single click on the '+' icon 79 | - QtRectPropertyManager and QtRectFPropertyManager - by default 80 | constraint is null rect meaning no constraint is applied 81 | 82 | 2.6: - QtGroupPropertyBrowser - don't force the layout to show the 83 | whole labels' contents for read only properties, show tooltips for 84 | them in addition. 85 | - QtTreePropertyBrowser - fixed painting of the editor for color 86 | property type when style sheet is used (QTSOLBUG-64). 87 | - Make it possible to change the style of the checkboxes with a 88 | stylesheet (QTSOLBUG-61). 89 | - Change the minimum size of a combobox so that it can show at 90 | least one character and an icon. 91 | - Make it possible to properly style custom embedded editors (e.g. 92 | the color editor provided with the solution). 93 | 94 | -------------------------------------------------------------------------------- /qtpropertybrowser/buildlib/buildlib.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE=lib 2 | CONFIG += qt dll qtpropertybrowser-buildlib 3 | mac:CONFIG += absolute_library_soname 4 | win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release build_all 5 | include(../src/qtpropertybrowser.pri) 6 | TARGET = $$QTPROPERTYBROWSER_LIBNAME 7 | DESTDIR = $$QTPROPERTYBROWSER_LIBDIR 8 | win32 { 9 | DLLDESTDIR = $$[QT_INSTALL_BINS] 10 | QMAKE_DISTCLEAN += $$[QT_INSTALL_BINS]\\$${QTPROPERTYBROWSER_LIBNAME}.dll 11 | } 12 | target.path = $$DESTDIR 13 | INSTALLS += target 14 | -------------------------------------------------------------------------------- /qtpropertybrowser/common.pri: -------------------------------------------------------------------------------- 1 | exists(config.pri):infile(config.pri, SOLUTIONS_LIBRARY, yes): CONFIG += qtpropertybrowser-uselib 2 | TEMPLATE += fakelib 3 | QTPROPERTYBROWSER_LIBNAME = $$qtLibraryTarget(QtSolutions_PropertyBrowser-head) 4 | TEMPLATE -= fakelib 5 | QTPROPERTYBROWSER_LIBDIR = $$PWD/lib 6 | unix:qtpropertybrowser-uselib:!qtpropertybrowser-buildlib:QMAKE_RPATHDIR += $$QTPROPERTYBROWSER_LIBDIR 7 | -------------------------------------------------------------------------------- /qtpropertybrowser/configure: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x$1" != "x" -a "x$1" != "x-library" ]; then 4 | echo "Usage: $0 [-library]" 5 | echo 6 | echo "-library: Build the component as a dynamic library (DLL). Default is to" 7 | echo " include the component source code directly in the application." 8 | echo 9 | exit 0 10 | fi 11 | 12 | rm -f config.pri 13 | if [ "x$1" = "x-library" ]; then 14 | echo "Configuring to build this component as a dynamic library." 15 | echo "SOLUTIONS_LIBRARY = yes" > config.pri 16 | fi 17 | 18 | echo 19 | echo "This component is now configured." 20 | echo 21 | echo "To build the component library (if requested) and example(s)," 22 | echo "run qmake and your make command." 23 | echo 24 | echo "To remove or reconfigure, run make distclean." 25 | echo 26 | -------------------------------------------------------------------------------- /qtpropertybrowser/configure.bat: -------------------------------------------------------------------------------- 1 | ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 2 | :: 3 | :: Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). 4 | :: Contact: http://www.qt-project.org/legal 5 | :: 6 | :: This file is part of the Qt Solutions component. 7 | :: 8 | :: $QT_BEGIN_LICENSE:BSD$ 9 | :: You may use this file under the terms of the BSD license as follows: 10 | :: 11 | :: "Redistribution and use in source and binary forms, with or without 12 | :: modification, are permitted provided that the following conditions are 13 | :: met: 14 | :: * Redistributions of source code must retain the above copyright 15 | :: notice, this list of conditions and the following disclaimer. 16 | :: * Redistributions in binary form must reproduce the above copyright 17 | :: notice, this list of conditions and the following disclaimer in 18 | :: the documentation and/or other materials provided with the 19 | :: distribution. 20 | :: * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names 21 | :: of its contributors may be used to endorse or promote products derived 22 | :: from this software without specific prior written permission. 23 | :: 24 | :: 25 | :: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | :: "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | :: LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | :: A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | :: OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | :: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | :: LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | :: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | :: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | :: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | :: OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 36 | :: 37 | :: $QT_END_LICENSE$ 38 | :: 39 | ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 40 | 41 | @echo off 42 | 43 | rem 44 | rem "Main" 45 | rem 46 | 47 | if not "%1"=="" ( 48 | if not "%1"=="-library" ( 49 | call :PrintUsage 50 | goto EOF 51 | ) 52 | ) 53 | 54 | if exist config.pri. del config.pri 55 | if "%1"=="-library" ( 56 | echo Configuring to build this component as a dynamic library. 57 | echo SOLUTIONS_LIBRARY = yes > config.pri 58 | ) 59 | 60 | echo . 61 | echo This component is now configured. 62 | echo . 63 | echo To build the component library (if requested) and example(s), 64 | echo run qmake and your make or nmake command. 65 | echo . 66 | echo To remove or reconfigure, run make (nmake) distclean. 67 | echo . 68 | goto EOF 69 | 70 | :PrintUsage 71 | echo Usage: configure.bat [-library] 72 | echo . 73 | echo -library: Build the component as a dynamic library (DLL). Default is to 74 | echo include the component source directly in the application. 75 | echo A DLL may be preferable for technical or licensing (LGPL) reasons. 76 | echo . 77 | goto EOF 78 | 79 | 80 | :EOF 81 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/images/canvas_typed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/html/images/canvas_typed.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/images/canvas_variant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/html/images/canvas_variant.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/images/decoration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/html/images/decoration.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/images/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/html/images/demo.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/images/extension.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/html/images/extension.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/images/object_controller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/html/images/object_controller.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/images/qt-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/html/images/qt-logo.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/images/qtbuttonpropertybrowser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/html/images/qtbuttonpropertybrowser.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/images/qtgroupboxpropertybrowser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/html/images/qtgroupboxpropertybrowser.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/images/qtpropertybrowser-duplicate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/html/images/qtpropertybrowser-duplicate.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/images/qtpropertybrowser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/html/images/qtpropertybrowser.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/images/qttreepropertybrowser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/html/images/qttreepropertybrowser.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/images/simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/html/images/simple.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtbrowseritem-members.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | List of All Members for QtBrowserItem 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

List of All Members for QtBrowserItem

16 |

This is the complete list of members for QtBrowserItem, including inherited members.

17 |
    18 |
  • browser () const : QtAbstractPropertyBrowser *
  • 19 |
  • children () const : QList<QtBrowserItem *>
  • 20 |
  • parent () const : QtBrowserItem *
  • 21 |
  • property () const : QtProperty *
  • 22 |
23 |


24 | 25 | 26 | 27 | 28 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
29 | 30 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtchareditorfactory.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | QtCharEditorFactory Class Reference 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

QtCharEditorFactory Class Reference

16 |

The QtCharEditorFactory class provides editor widgets for properties created by QtCharPropertyManager objects. More...

17 |
 #include <QtCharEditorFactory>

Inherits QtAbstractEditorFactory<QtCharPropertyManager>.

18 | 21 |
22 | 23 |

Public Functions

24 | 25 | 26 | 27 |
QtCharEditorFactory ( QObject * parent = 0 )
~QtCharEditorFactory ()
28 | 33 |

Additional Inherited Members

34 |
    35 |
  • 1 property inherited from QObject
  • 36 |
  • 1 public slot inherited from QObject
  • 37 |
  • 1 signal inherited from QObject
  • 38 |
  • 1 public type inherited from QObject
  • 39 |
  • 4 static public members inherited from QObject
  • 40 |
  • 3 protected functions inherited from QtAbstractEditorFactory
  • 41 |
  • 7 protected functions inherited from QObject
  • 42 |
  • 2 protected variables inherited from QObject
  • 43 |
44 | 45 |
46 |

Detailed Description

47 |

The QtCharEditorFactory class provides editor widgets for properties created by QtCharPropertyManager objects.

48 |

See also QtAbstractEditorFactory.

49 |
50 |

Member Function Documentation

51 |

QtCharEditorFactory::QtCharEditorFactory ( QObject * parent = 0 )

52 |

Creates a factory with the given parent.

53 |

QtCharEditorFactory::~QtCharEditorFactory ()

54 |

Destroys this factory, and all the widgets it has created.

55 |


56 | 57 | 58 | 59 | 60 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
61 | 62 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtcheckboxfactory.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | QtCheckBoxFactory Class Reference 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

QtCheckBoxFactory Class Reference

16 |

The QtCheckBoxFactory class provides QCheckBox widgets for properties created by QtBoolPropertyManager objects. More...

17 |
 #include <QtCheckBoxFactory>

Inherits QtAbstractEditorFactory<QtBoolPropertyManager>.

18 | 21 |
22 | 23 |

Public Functions

24 | 25 | 26 | 27 |
QtCheckBoxFactory ( QObject * parent = 0 )
~QtCheckBoxFactory ()
28 | 33 |

Additional Inherited Members

34 |
    35 |
  • 1 property inherited from QObject
  • 36 |
  • 1 public slot inherited from QObject
  • 37 |
  • 1 signal inherited from QObject
  • 38 |
  • 1 public type inherited from QObject
  • 39 |
  • 4 static public members inherited from QObject
  • 40 |
  • 3 protected functions inherited from QtAbstractEditorFactory
  • 41 |
  • 7 protected functions inherited from QObject
  • 42 |
  • 2 protected variables inherited from QObject
  • 43 |
44 | 45 |
46 |

Detailed Description

47 |

The QtCheckBoxFactory class provides QCheckBox widgets for properties created by QtBoolPropertyManager objects.

48 |

See also QtAbstractEditorFactory and QtBoolPropertyManager.

49 |
50 |

Member Function Documentation

51 |

QtCheckBoxFactory::QtCheckBoxFactory ( QObject * parent = 0 )

52 |

Creates a factory with the given parent.

53 |

QtCheckBoxFactory::~QtCheckBoxFactory ()

54 |

Destroys this factory, and all the widgets it has created.

55 |


56 | 57 | 58 | 59 | 60 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
61 | 62 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtcoloreditorfactory.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | QtColorEditorFactory Class Reference 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

QtColorEditorFactory Class Reference

16 |

The QtColorEditorFactory class provides color editing for properties created by QtColorPropertyManager objects. More...

17 |
 #include <QtColorEditorFactory>

Inherits QtAbstractEditorFactory<QtColorPropertyManager>.

18 | 21 |
22 | 23 |

Public Functions

24 | 25 | 26 | 27 |
QtColorEditorFactory ( QObject * parent = 0 )
~QtColorEditorFactory ()
28 | 33 |

Additional Inherited Members

34 |
    35 |
  • 1 property inherited from QObject
  • 36 |
  • 1 public slot inherited from QObject
  • 37 |
  • 1 signal inherited from QObject
  • 38 |
  • 1 public type inherited from QObject
  • 39 |
  • 4 static public members inherited from QObject
  • 40 |
  • 3 protected functions inherited from QtAbstractEditorFactory
  • 41 |
  • 7 protected functions inherited from QObject
  • 42 |
  • 2 protected variables inherited from QObject
  • 43 |
44 | 45 |
46 |

Detailed Description

47 |

The QtColorEditorFactory class provides color editing for properties created by QtColorPropertyManager objects.

48 |

See also QtAbstractEditorFactory and QtColorPropertyManager.

49 |
50 |

Member Function Documentation

51 |

QtColorEditorFactory::QtColorEditorFactory ( QObject * parent = 0 )

52 |

Creates a factory with the given parent.

53 |

QtColorEditorFactory::~QtColorEditorFactory ()

54 |

Destroys this factory, and all the widgets it has created.

55 |


56 | 57 | 58 | 59 | 60 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
61 | 62 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtcursoreditorfactory.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | QtCursorEditorFactory Class Reference 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

QtCursorEditorFactory Class Reference

16 |

The QtCursorEditorFactory class provides QComboBox widgets for properties created by QtCursorPropertyManager objects. More...

17 |
 #include <QtCursorEditorFactory>

Inherits QtAbstractEditorFactory<QtCursorPropertyManager>.

18 | 21 |
22 | 23 |

Public Functions

24 | 25 | 26 | 27 |
QtCursorEditorFactory ( QObject * parent = 0 )
~QtCursorEditorFactory ()
28 | 33 |

Additional Inherited Members

34 |
    35 |
  • 1 property inherited from QObject
  • 36 |
  • 1 public slot inherited from QObject
  • 37 |
  • 1 signal inherited from QObject
  • 38 |
  • 1 public type inherited from QObject
  • 39 |
  • 4 static public members inherited from QObject
  • 40 |
  • 3 protected functions inherited from QtAbstractEditorFactory
  • 41 |
  • 7 protected functions inherited from QObject
  • 42 |
  • 2 protected variables inherited from QObject
  • 43 |
44 | 45 |
46 |

Detailed Description

47 |

The QtCursorEditorFactory class provides QComboBox widgets for properties created by QtCursorPropertyManager objects.

48 |

See also QtAbstractEditorFactory and QtCursorPropertyManager.

49 |
50 |

Member Function Documentation

51 |

QtCursorEditorFactory::QtCursorEditorFactory ( QObject * parent = 0 )

52 |

Creates a factory with the given parent.

53 |

QtCursorEditorFactory::~QtCursorEditorFactory ()

54 |

Destroys this factory, and all the widgets it has created.

55 |


56 | 57 | 58 | 59 | 60 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
61 | 62 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtdateeditfactory.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | QtDateEditFactory Class Reference 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

QtDateEditFactory Class Reference

16 |

The QtDateEditFactory class provides QDateEdit widgets for properties created by QtDatePropertyManager objects. More...

17 |
 #include <QtDateEditFactory>

Inherits QtAbstractEditorFactory<QtDatePropertyManager>.

18 | 21 |
22 | 23 |

Public Functions

24 | 25 | 26 | 27 |
QtDateEditFactory ( QObject * parent = 0 )
~QtDateEditFactory ()
28 | 33 |

Additional Inherited Members

34 |
    35 |
  • 1 property inherited from QObject
  • 36 |
  • 1 public slot inherited from QObject
  • 37 |
  • 1 signal inherited from QObject
  • 38 |
  • 1 public type inherited from QObject
  • 39 |
  • 4 static public members inherited from QObject
  • 40 |
  • 3 protected functions inherited from QtAbstractEditorFactory
  • 41 |
  • 7 protected functions inherited from QObject
  • 42 |
  • 2 protected variables inherited from QObject
  • 43 |
44 | 45 |
46 |

Detailed Description

47 |

The QtDateEditFactory class provides QDateEdit widgets for properties created by QtDatePropertyManager objects.

48 |

See also QtAbstractEditorFactory and QtDatePropertyManager.

49 |
50 |

Member Function Documentation

51 |

QtDateEditFactory::QtDateEditFactory ( QObject * parent = 0 )

52 |

Creates a factory with the given parent.

53 |

QtDateEditFactory::~QtDateEditFactory ()

54 |

Destroys this factory, and all the widgets it has created.

55 |


56 | 57 | 58 | 59 | 60 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
61 | 62 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtenumeditorfactory.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | QtEnumEditorFactory Class Reference 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

QtEnumEditorFactory Class Reference

16 |

The QtEnumEditorFactory class provides QComboBox widgets for properties created by QtEnumPropertyManager objects. More...

17 |
 #include <QtEnumEditorFactory>

Inherits QtAbstractEditorFactory<QtEnumPropertyManager>.

18 | 21 |
22 | 23 |

Public Functions

24 | 25 | 26 | 27 |
QtEnumEditorFactory ( QObject * parent = 0 )
~QtEnumEditorFactory ()
28 | 33 |

Additional Inherited Members

34 |
    35 |
  • 1 property inherited from QObject
  • 36 |
  • 1 public slot inherited from QObject
  • 37 |
  • 1 signal inherited from QObject
  • 38 |
  • 1 public type inherited from QObject
  • 39 |
  • 4 static public members inherited from QObject
  • 40 |
  • 3 protected functions inherited from QtAbstractEditorFactory
  • 41 |
  • 7 protected functions inherited from QObject
  • 42 |
  • 2 protected variables inherited from QObject
  • 43 |
44 | 45 |
46 |

Detailed Description

47 |

The QtEnumEditorFactory class provides QComboBox widgets for properties created by QtEnumPropertyManager objects.

48 |

See also QtAbstractEditorFactory and QtEnumPropertyManager.

49 |
50 |

Member Function Documentation

51 |

QtEnumEditorFactory::QtEnumEditorFactory ( QObject * parent = 0 )

52 |

Creates a factory with the given parent.

53 |

QtEnumEditorFactory::~QtEnumEditorFactory ()

54 |

Destroys this factory, and all the widgets it has created.

55 |


56 | 57 | 58 | 59 | 60 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
61 | 62 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtfonteditorfactory.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | QtFontEditorFactory Class Reference 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

QtFontEditorFactory Class Reference

16 |

The QtFontEditorFactory class provides font editing for properties created by QtFontPropertyManager objects. More...

17 |
 #include <QtFontEditorFactory>

Inherits QtAbstractEditorFactory<QtFontPropertyManager>.

18 | 21 |
22 | 23 |

Public Functions

24 | 25 | 26 | 27 |
QtFontEditorFactory ( QObject * parent = 0 )
~QtFontEditorFactory ()
28 | 33 |

Additional Inherited Members

34 |
    35 |
  • 1 property inherited from QObject
  • 36 |
  • 1 public slot inherited from QObject
  • 37 |
  • 1 signal inherited from QObject
  • 38 |
  • 1 public type inherited from QObject
  • 39 |
  • 4 static public members inherited from QObject
  • 40 |
  • 3 protected functions inherited from QtAbstractEditorFactory
  • 41 |
  • 7 protected functions inherited from QObject
  • 42 |
  • 2 protected variables inherited from QObject
  • 43 |
44 | 45 |
46 |

Detailed Description

47 |

The QtFontEditorFactory class provides font editing for properties created by QtFontPropertyManager objects.

48 |

See also QtAbstractEditorFactory and QtFontPropertyManager.

49 |
50 |

Member Function Documentation

51 |

QtFontEditorFactory::QtFontEditorFactory ( QObject * parent = 0 )

52 |

Creates a factory with the given parent.

53 |

QtFontEditorFactory::~QtFontEditorFactory ()

54 |

Destroys this factory, and all the widgets it has created.

55 |


56 | 57 | 58 | 59 | 60 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
61 | 62 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtkeysequenceeditorfactory.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | QtKeySequenceEditorFactory Class Reference 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

QtKeySequenceEditorFactory Class Reference

16 |

The QtKeySequenceEditorFactory class provides editor widgets for properties created by QtKeySequencePropertyManager objects. More...

17 |
 #include <QtKeySequenceEditorFactory>

Inherits QtAbstractEditorFactory<QtKeySequencePropertyManager>.

18 | 21 |
22 | 23 |

Public Functions

24 | 25 | 26 | 27 |
QtKeySequenceEditorFactory ( QObject * parent = 0 )
~QtKeySequenceEditorFactory ()
28 | 33 |

Additional Inherited Members

34 |
    35 |
  • 1 property inherited from QObject
  • 36 |
  • 1 public slot inherited from QObject
  • 37 |
  • 1 signal inherited from QObject
  • 38 |
  • 1 public type inherited from QObject
  • 39 |
  • 4 static public members inherited from QObject
  • 40 |
  • 3 protected functions inherited from QtAbstractEditorFactory
  • 41 |
  • 7 protected functions inherited from QObject
  • 42 |
  • 2 protected variables inherited from QObject
  • 43 |
44 | 45 |
46 |

Detailed Description

47 |

The QtKeySequenceEditorFactory class provides editor widgets for properties created by QtKeySequencePropertyManager objects.

48 |

See also QtAbstractEditorFactory.

49 |
50 |

Member Function Documentation

51 |

QtKeySequenceEditorFactory::QtKeySequenceEditorFactory ( QObject * parent = 0 )

52 |

Creates a factory with the given parent.

53 |

QtKeySequenceEditorFactory::~QtKeySequenceEditorFactory ()

54 |

Destroys this factory, and all the widgets it has created.

55 |


56 | 57 | 58 | 59 | 60 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
61 | 62 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtlineeditfactory.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | QtLineEditFactory Class Reference 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

QtLineEditFactory Class Reference

16 |

The QtLineEditFactory class provides QLineEdit widgets for properties created by QtStringPropertyManager objects. More...

17 |
 #include <QtLineEditFactory>

Inherits QtAbstractEditorFactory<QtStringPropertyManager>.

18 | 21 |
22 | 23 |

Public Functions

24 | 25 | 26 | 27 |
QtLineEditFactory ( QObject * parent = 0 )
~QtLineEditFactory ()
28 | 33 |

Additional Inherited Members

34 |
    35 |
  • 1 property inherited from QObject
  • 36 |
  • 1 public slot inherited from QObject
  • 37 |
  • 1 signal inherited from QObject
  • 38 |
  • 1 public type inherited from QObject
  • 39 |
  • 4 static public members inherited from QObject
  • 40 |
  • 3 protected functions inherited from QtAbstractEditorFactory
  • 41 |
  • 7 protected functions inherited from QObject
  • 42 |
  • 2 protected variables inherited from QObject
  • 43 |
44 | 45 |
46 |

Detailed Description

47 |

The QtLineEditFactory class provides QLineEdit widgets for properties created by QtStringPropertyManager objects.

48 |

See also QtAbstractEditorFactory and QtStringPropertyManager.

49 |
50 |

Member Function Documentation

51 |

QtLineEditFactory::QtLineEditFactory ( QObject * parent = 0 )

52 |

Creates a factory with the given parent.

53 |

QtLineEditFactory::~QtLineEditFactory ()

54 |

Destroys this factory, and all the widgets it has created.

55 |


56 | 57 | 58 | 59 | 60 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
61 | 62 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtproperty-members.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | List of All Members for QtProperty 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

List of All Members for QtProperty

16 |

This is the complete list of members for QtProperty, including inherited members.

17 |

18 | 44 |
43 |

45 |


46 | 47 | 48 | 49 | 50 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
51 | 52 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtpropertybrowser-example-canvas-typed.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | Type Based Canvas Example 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

Type Based Canvas Example
16 |

17 |

This example demonstrates how to use different QtAbstractPropertyManager subclasses for different property types. Using this approach, the developer interfaces with a type-safe API (since each manager has its own property-type specific API).

18 |

The example presents a canvas filled up with items of different types, and a tree property browser which displays the currently selected item's properties.

19 |

All item types has a few common properties like "Position X", "Position Y" or "Position Z", but each type also adds its own type-specific properties (e.g. the text items provide "Text" and "Font" properties, and the line items provide a "Vector" property).

20 |

The source files can be found in examples/canvas_typed directory of the package.

21 | 22 |

Third party copyright notice

23 |

The canvas class used in this example contains third party code with the following copyright notice:

24 |
 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
25 | 
26 |                          All Rights Reserved
27 | 
28 |  Permission to use, copy, modify, and distribute this software and its
29 |  documentation for any purpose and without fee is hereby granted,
30 |  provided that the above copyright notice appear in all copies and that
31 |  both that copyright notice and this permission notice appear in
32 |  supporting documentation, and that the name of Digital not be
33 |  used in advertising or publicity pertaining to distribution of the
34 |  software without specific, written prior permission.
35 | 
36 |  DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
37 |  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
38 |  DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
39 |  ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
40 |  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
41 |  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
42 |  SOFTWARE.
43 |


44 | 45 | 46 | 47 | 48 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
49 | 50 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtpropertybrowser-example-canvas-variant.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | Variant Based Canvas Example 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

Variant Based Canvas Example
16 |

17 |

This example demonstrates how to use the QtVariantPropertyManager convenience class for all property types. In this approach only one instance of the property manager class is used, and the developer interfaces with a dynamic API based on QVariant.

18 |

The example presents a canvas filled up with items of different types, and a tree property browser which displays the currently selected item's properties.

19 |

All item types has a few common properties like "Position X", "Position Y" or "Position Z", but each type also adds its own type-specific properties (e.g. the text items provide "Text" and "Font" properties, and the line items provide a "Vector" property).

20 |

The source files can be found in examples/canvas_variant directory of the package.

21 | 22 |

Third party copyright notice

23 |

The canvas class used in this example contains third party code with the following copyright notice:

24 |
 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
25 | 
26 |                          All Rights Reserved
27 | 
28 |  Permission to use, copy, modify, and distribute this software and its
29 |  documentation for any purpose and without fee is hereby granted,
30 |  provided that the above copyright notice appear in all copies and that
31 |  both that copyright notice and this permission notice appear in
32 |  supporting documentation, and that the name of Digital not be
33 |  used in advertising or publicity pertaining to distribution of the
34 |  software without specific, written prior permission.
35 | 
36 |  DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
37 |  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
38 |  DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
39 |  ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
40 |  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
41 |  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
42 |  SOFTWARE.
43 |


44 | 45 | 46 | 47 | 48 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
49 | 50 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtpropertybrowser-example-decoration.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | Decoration Example 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

Decoration Example
16 |

17 |

This example demonstrates how to decorate the existing QtDoublePropertyManager class with additional responsibilities.

18 |

It also shows how to write respective editor factory for decorated manager by delegating common responsibilities of undecorated base manager to the aggregated QtDoubleSpinBoxFactory member.

19 |

The source files can be found in examples/decoration directory of the package.

20 |


21 | 22 | 23 | 24 | 25 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
26 | 27 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtpropertybrowser-example-demo.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | Demo Example 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

Demo Example
16 |

17 |

This example shows how to customize a property browser widget's appearance and behavior.

18 |

The various property browsers presented in this example display the same set of properties, and are implementations of the QtTreePropertyBrowser class and the QtGroupBoxPropertyBrowser class, respectively.

19 |

The example shows how a property browser's appearance and behavior can be varied using the QtPropertyBrowser framework's property managers and editor factories.

20 |

The source files can be found in examples/demo directory of the package.

21 |


22 | 23 | 24 | 25 | 26 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
27 | 28 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtpropertybrowser-example-extension.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | Extension Example 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

Extension Example
16 |

17 |

This example demonstrates how to extend the QtVariantPropertyManager class to handle additional property types.

18 |

The variant manager is extended to handle the QPointF type.

19 |

The source files can be found in examples/extension directory of the package.

20 |


21 | 22 | 23 | 24 | 25 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
26 | 27 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtpropertybrowser-example-object-controller.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | The Object Controller Example. 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

The Object Controller Example.
16 |

17 |

This example implements a simple widget component which shows QObject's and its subclasses' properties. The user can modify these properies interacively and the object controller applies the changes to the controlled object. The object controller is similar to the property editor used in QDesigner application. To control the object just instantiate ObjectController, set controlled object (any QObject subclass) by calling ObjectController::setObject() and show the controller.

18 |

The source files can be found in examples/object_controller directory of the package.

19 |


20 | 21 | 22 | 23 | 24 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
25 | 26 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtpropertybrowser-example-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | Simple Tree Property Browser Example 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

Simple Tree Property Browser Example
16 |

17 |

This example shows how to present various properties using a simple tree property browser, i.e. an implementation of the QtTreePropertyBrowser class.

18 |

The source files can be found in examples/simple directory of the package.

19 |


20 | 21 | 22 | 23 | 24 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
25 | 26 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtscrollbarfactory.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | QtScrollBarFactory Class Reference 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

QtScrollBarFactory Class Reference

16 |

The QtScrollBarFactory class provides QScrollBar widgets for properties created by QtIntPropertyManager objects. More...

17 |
 #include <QtScrollBarFactory>

Inherits QtAbstractEditorFactory<QtIntPropertyManager>.

18 | 21 |
22 | 23 |

Public Functions

24 | 25 | 26 | 27 |
QtScrollBarFactory ( QObject * parent = 0 )
~QtScrollBarFactory ()
28 | 33 |

Additional Inherited Members

34 |
    35 |
  • 1 property inherited from QObject
  • 36 |
  • 1 public slot inherited from QObject
  • 37 |
  • 1 signal inherited from QObject
  • 38 |
  • 1 public type inherited from QObject
  • 39 |
  • 4 static public members inherited from QObject
  • 40 |
  • 3 protected functions inherited from QtAbstractEditorFactory
  • 41 |
  • 7 protected functions inherited from QObject
  • 42 |
  • 2 protected variables inherited from QObject
  • 43 |
44 | 45 |
46 |

Detailed Description

47 |

The QtScrollBarFactory class provides QScrollBar widgets for properties created by QtIntPropertyManager objects.

48 |

See also QtAbstractEditorFactory and QtIntPropertyManager.

49 |
50 |

Member Function Documentation

51 |

QtScrollBarFactory::QtScrollBarFactory ( QObject * parent = 0 )

52 |

Creates a factory with the given parent.

53 |

QtScrollBarFactory::~QtScrollBarFactory ()

54 |

Destroys this factory, and all the widgets it has created.

55 |


56 | 57 | 58 | 59 | 60 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
61 | 62 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtsliderfactory.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | QtSliderFactory Class Reference 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

QtSliderFactory Class Reference

16 |

The QtSliderFactory class provides QSlider widgets for properties created by QtIntPropertyManager objects. More...

17 |
 #include <QtSliderFactory>

Inherits QtAbstractEditorFactory<QtIntPropertyManager>.

18 | 21 |
22 | 23 |

Public Functions

24 | 25 | 26 | 27 |
QtSliderFactory ( QObject * parent = 0 )
~QtSliderFactory ()
28 | 33 |

Additional Inherited Members

34 |
    35 |
  • 1 property inherited from QObject
  • 36 |
  • 1 public slot inherited from QObject
  • 37 |
  • 1 signal inherited from QObject
  • 38 |
  • 1 public type inherited from QObject
  • 39 |
  • 4 static public members inherited from QObject
  • 40 |
  • 3 protected functions inherited from QtAbstractEditorFactory
  • 41 |
  • 7 protected functions inherited from QObject
  • 42 |
  • 2 protected variables inherited from QObject
  • 43 |
44 | 45 |
46 |

Detailed Description

47 |

The QtSliderFactory class provides QSlider widgets for properties created by QtIntPropertyManager objects.

48 |

See also QtAbstractEditorFactory and QtIntPropertyManager.

49 |
50 |

Member Function Documentation

51 |

QtSliderFactory::QtSliderFactory ( QObject * parent = 0 )

52 |

Creates a factory with the given parent.

53 |

QtSliderFactory::~QtSliderFactory ()

54 |

Destroys this factory, and all the widgets it has created.

55 |


56 | 57 | 58 | 59 | 60 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
61 | 62 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtspinboxfactory.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | QtSpinBoxFactory Class Reference 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

QtSpinBoxFactory Class Reference

16 |

The QtSpinBoxFactory class provides QSpinBox widgets for properties created by QtIntPropertyManager objects. More...

17 |
 #include <QtSpinBoxFactory>

Inherits QtAbstractEditorFactory<QtIntPropertyManager>.

18 | 21 |
22 | 23 |

Public Functions

24 | 25 | 26 | 27 |
QtSpinBoxFactory ( QObject * parent = 0 )
~QtSpinBoxFactory ()
28 | 33 |

Additional Inherited Members

34 |
    35 |
  • 1 property inherited from QObject
  • 36 |
  • 1 public slot inherited from QObject
  • 37 |
  • 1 signal inherited from QObject
  • 38 |
  • 1 public type inherited from QObject
  • 39 |
  • 4 static public members inherited from QObject
  • 40 |
  • 3 protected functions inherited from QtAbstractEditorFactory
  • 41 |
  • 7 protected functions inherited from QObject
  • 42 |
  • 2 protected variables inherited from QObject
  • 43 |
44 | 45 |
46 |

Detailed Description

47 |

The QtSpinBoxFactory class provides QSpinBox widgets for properties created by QtIntPropertyManager objects.

48 |

See also QtAbstractEditorFactory and QtIntPropertyManager.

49 |
50 |

Member Function Documentation

51 |

QtSpinBoxFactory::QtSpinBoxFactory ( QObject * parent = 0 )

52 |

Creates a factory with the given parent.

53 |

QtSpinBoxFactory::~QtSpinBoxFactory ()

54 |

Destroys this factory, and all the widgets it has created.

55 |


56 | 57 | 58 | 59 | 60 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
61 | 62 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qttimeeditfactory.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | QtTimeEditFactory Class Reference 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

QtTimeEditFactory Class Reference

16 |

The QtTimeEditFactory class provides QTimeEdit widgets for properties created by QtTimePropertyManager objects. More...

17 |
 #include <QtTimeEditFactory>

Inherits QtAbstractEditorFactory<QtTimePropertyManager>.

18 | 21 |
22 | 23 |

Public Functions

24 | 25 | 26 | 27 |
QtTimeEditFactory ( QObject * parent = 0 )
~QtTimeEditFactory ()
28 | 33 |

Additional Inherited Members

34 |
    35 |
  • 1 property inherited from QObject
  • 36 |
  • 1 public slot inherited from QObject
  • 37 |
  • 1 signal inherited from QObject
  • 38 |
  • 1 public type inherited from QObject
  • 39 |
  • 4 static public members inherited from QObject
  • 40 |
  • 3 protected functions inherited from QtAbstractEditorFactory
  • 41 |
  • 7 protected functions inherited from QObject
  • 42 |
  • 2 protected variables inherited from QObject
  • 43 |
44 | 45 |
46 |

Detailed Description

47 |

The QtTimeEditFactory class provides QTimeEdit widgets for properties created by QtTimePropertyManager objects.

48 |

See also QtAbstractEditorFactory and QtTimePropertyManager.

49 |
50 |

Member Function Documentation

51 |

QtTimeEditFactory::QtTimeEditFactory ( QObject * parent = 0 )

52 |

Creates a factory with the given parent.

53 |

QtTimeEditFactory::~QtTimeEditFactory ()

54 |

Destroys this factory, and all the widgets it has created.

55 |


56 | 57 | 58 | 59 | 60 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
61 | 62 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/html/qtvariantproperty-members.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | List of All Members for QtVariantProperty 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
  Home

List of All Members for QtVariantProperty

16 |

This is the complete list of members for QtVariantProperty, including inherited members.

17 |

18 | 50 |
49 |

51 |


52 | 53 | 54 | 55 | 56 |
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Solutions
57 | 58 | -------------------------------------------------------------------------------- /qtpropertybrowser/doc/images/canvas_typed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/images/canvas_typed.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/images/canvas_variant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/images/canvas_variant.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/images/decoration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/images/decoration.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/images/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/images/demo.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/images/extension.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/images/extension.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/images/object_controller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/images/object_controller.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/images/qt-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/images/qt-logo.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/images/qtbuttonpropertybrowser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/images/qtbuttonpropertybrowser.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/images/qtgroupboxpropertybrowser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/images/qtgroupboxpropertybrowser.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/images/qtpropertybrowser-duplicate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/images/qtpropertybrowser-duplicate.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/images/qtpropertybrowser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/images/qtpropertybrowser.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/images/qttreepropertybrowser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/images/qttreepropertybrowser.png -------------------------------------------------------------------------------- /qtpropertybrowser/doc/images/simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/doc/images/simple.png -------------------------------------------------------------------------------- /qtpropertybrowser/examples/canvas_typed/canvas_typed.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | DEPENDPATH += . 3 | INCLUDEPATH += . 4 | 5 | include(../../src/qtpropertybrowser.pri) 6 | # Input 7 | HEADERS += qtcanvas.h mainwindow.h 8 | SOURCES += qtcanvas.cpp mainwindow.cpp main.cpp 9 | 10 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/canvas_typed/canvas_typed.qdoc: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). 4 | ** Contact: http://www.qt-project.org/legal 5 | ** 6 | ** This file is part of the Qt Solutions component. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** You may use this file under the terms of the BSD license as follows: 10 | ** 11 | ** "Redistribution and use in source and binary forms, with or without 12 | ** modification, are permitted provided that the following conditions are 13 | ** met: 14 | ** * Redistributions of source code must retain the above copyright 15 | ** notice, this list of conditions and the following disclaimer. 16 | ** * Redistributions in binary form must reproduce the above copyright 17 | ** notice, this list of conditions and the following disclaimer in 18 | ** the documentation and/or other materials provided with the 19 | ** distribution. 20 | ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names 21 | ** of its contributors may be used to endorse or promote products derived 22 | ** from this software without specific prior written permission. 23 | ** 24 | ** 25 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 36 | ** 37 | ** $QT_END_LICENSE$ 38 | ** 39 | ****************************************************************************/ 40 | 41 | /*! 42 | \page qtpropertybrowser-example-canvas_typed.html 43 | 44 | \title Type Based Canvas Example 45 | 46 | This example demonstrates how to use different 47 | QtAbstractPropertyManager subclasses for different property 48 | types. Using this approach, the developer interfaces with a 49 | type-safe API (since each manager has its own property-type 50 | specific API). 51 | 52 | \image canvas_typed.png 53 | 54 | The example presents a canvas filled up with items of different 55 | types, and a tree property browser which displays the currently 56 | selected item's properties. 57 | 58 | All item types has a few common properties like "Position X", "Position Y" 59 | or "Position Z", but each type also adds its own type-specific 60 | properties (e.g. the text items provide "Text" and "Font" 61 | properties, and the line items provide a "Vector" property). 62 | 63 | The source files can be found in examples/canvas_typed directory 64 | of the package. 65 | 66 | \section1 Third party copyright notice 67 | 68 | The canvas class used in this example contains third party code 69 | with the following copyright notice: 70 | 71 | \legalese 72 | \code 73 | 74 | Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. 75 | 76 | All Rights Reserved 77 | 78 | Permission to use, copy, modify, and distribute this software and its 79 | documentation for any purpose and without fee is hereby granted, 80 | provided that the above copyright notice appear in all copies and that 81 | both that copyright notice and this permission notice appear in 82 | supporting documentation, and that the name of Digital not be 83 | used in advertising or publicity pertaining to distribution of the 84 | software without specific, written prior permission. 85 | 86 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 87 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 88 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 89 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 90 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 91 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 92 | SOFTWARE. 93 | 94 | \endcode 95 | \endlegalese 96 | 97 | */ 98 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/canvas_typed/main.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). 4 | ** Contact: http://www.qt-project.org/legal 5 | ** 6 | ** This file is part of the Qt Solutions component. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** You may use this file under the terms of the BSD license as follows: 10 | ** 11 | ** "Redistribution and use in source and binary forms, with or without 12 | ** modification, are permitted provided that the following conditions are 13 | ** met: 14 | ** * Redistributions of source code must retain the above copyright 15 | ** notice, this list of conditions and the following disclaimer. 16 | ** * Redistributions in binary form must reproduce the above copyright 17 | ** notice, this list of conditions and the following disclaimer in 18 | ** the documentation and/or other materials provided with the 19 | ** distribution. 20 | ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names 21 | ** of its contributors may be used to endorse or promote products derived 22 | ** from this software without specific prior written permission. 23 | ** 24 | ** 25 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 36 | ** 37 | ** $QT_END_LICENSE$ 38 | ** 39 | ****************************************************************************/ 40 | 41 | #include 42 | #include "mainwindow.h" 43 | 44 | int main(int argc, char **argv) 45 | { 46 | QApplication app(argc, argv); 47 | 48 | MainWindow mw; 49 | mw.show(); 50 | 51 | return app.exec(); 52 | } 53 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/canvas_typed/mainwindow.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). 4 | ** Contact: http://www.qt-project.org/legal 5 | ** 6 | ** This file is part of the Qt Solutions component. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** You may use this file under the terms of the BSD license as follows: 10 | ** 11 | ** "Redistribution and use in source and binary forms, with or without 12 | ** modification, are permitted provided that the following conditions are 13 | ** met: 14 | ** * Redistributions of source code must retain the above copyright 15 | ** notice, this list of conditions and the following disclaimer. 16 | ** * Redistributions in binary form must reproduce the above copyright 17 | ** notice, this list of conditions and the following disclaimer in 18 | ** the documentation and/or other materials provided with the 19 | ** distribution. 20 | ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names 21 | ** of its contributors may be used to endorse or promote products derived 22 | ** from this software without specific prior written permission. 23 | ** 24 | ** 25 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 36 | ** 37 | ** $QT_END_LICENSE$ 38 | ** 39 | ****************************************************************************/ 40 | 41 | #ifndef MAINWINDOW_H 42 | #define MAINWINDOW_H 43 | 44 | #include 45 | #include 46 | #include "qtcanvas.h" 47 | 48 | class QtProperty; 49 | 50 | class CanvasView : public QtCanvasView 51 | { 52 | Q_OBJECT 53 | public: 54 | CanvasView(QWidget *parent = 0) 55 | : QtCanvasView(parent), moving(0) { } 56 | CanvasView(QtCanvas *canvas, QWidget *parent = 0) 57 | : QtCanvasView(canvas, parent), moving(0) { } 58 | signals: 59 | void itemClicked(QtCanvasItem *item); 60 | void itemMoved(QtCanvasItem *item); 61 | protected: 62 | void contentsMousePressEvent(QMouseEvent *event); 63 | void contentsMouseDoubleClickEvent(QMouseEvent *event); 64 | void contentsMouseMoveEvent(QMouseEvent* event); 65 | private: 66 | void handleMouseClickEvent(QMouseEvent *event); 67 | QPoint moving_start; 68 | QtCanvasItem *moving; 69 | }; 70 | 71 | class MainWindow : public QMainWindow 72 | { 73 | Q_OBJECT 74 | public: 75 | MainWindow(QWidget *parent = 0); 76 | 77 | private slots: 78 | void newRectangle(); 79 | void newEllipse(); 80 | void newLine(); 81 | void newText(); 82 | void deleteObject(); 83 | void clearAll(); 84 | void fillView(); 85 | 86 | void itemClicked(QtCanvasItem *item); 87 | void itemMoved(QtCanvasItem *item); 88 | void valueChanged(QtProperty *property, double value); 89 | void valueChanged(QtProperty *property, const QString &value); 90 | void valueChanged(QtProperty *property, const QColor &value); 91 | void valueChanged(QtProperty *property, const QFont &value); 92 | void valueChanged(QtProperty *property, const QPoint &value); 93 | void valueChanged(QtProperty *property, const QSize &value); 94 | private: 95 | 96 | QtCanvasItem *addRectangle(); 97 | QtCanvasItem *addEllipse(); 98 | QtCanvasItem *addLine(); 99 | QtCanvasItem *addText(); 100 | void addProperty(QtProperty *property, const QString &id); 101 | void updateExpandState(); 102 | 103 | QAction *deleteAction; 104 | 105 | class QtDoublePropertyManager *doubleManager; 106 | class QtStringPropertyManager *stringManager; 107 | class QtColorPropertyManager *colorManager; 108 | class QtFontPropertyManager *fontManager; 109 | class QtPointPropertyManager *pointManager; 110 | class QtSizePropertyManager *sizeManager; 111 | 112 | class QtTreePropertyBrowser *propertyEditor; 113 | CanvasView *canvasView; 114 | QtCanvas *canvas; 115 | QtCanvasItem *currentItem; 116 | QMap propertyToId; 117 | QMap idToProperty; 118 | QMap idToExpanded; 119 | }; 120 | 121 | #endif 122 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/canvas_variant/canvas_variant.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | DEPENDPATH += . 3 | INCLUDEPATH += . 4 | 5 | include(../../src/qtpropertybrowser.pri) 6 | # Input 7 | HEADERS += qtcanvas.h mainwindow.h 8 | SOURCES += qtcanvas.cpp mainwindow.cpp main.cpp 9 | 10 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/canvas_variant/canvas_variant.qdoc: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). 4 | ** Contact: http://www.qt-project.org/legal 5 | ** 6 | ** This file is part of the Qt Solutions component. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** You may use this file under the terms of the BSD license as follows: 10 | ** 11 | ** "Redistribution and use in source and binary forms, with or without 12 | ** modification, are permitted provided that the following conditions are 13 | ** met: 14 | ** * Redistributions of source code must retain the above copyright 15 | ** notice, this list of conditions and the following disclaimer. 16 | ** * Redistributions in binary form must reproduce the above copyright 17 | ** notice, this list of conditions and the following disclaimer in 18 | ** the documentation and/or other materials provided with the 19 | ** distribution. 20 | ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names 21 | ** of its contributors may be used to endorse or promote products derived 22 | ** from this software without specific prior written permission. 23 | ** 24 | ** 25 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 36 | ** 37 | ** $QT_END_LICENSE$ 38 | ** 39 | ****************************************************************************/ 40 | 41 | /*! 42 | \page qtpropertybrowser-example-canvas_variant.html 43 | \title Variant Based Canvas Example 44 | 45 | This example demonstrates how to use the QtVariantPropertyManager 46 | convenience class for all property types. In this approach only 47 | one instance of the property manager class is used, and the 48 | developer interfaces with a dynamic API based on QVariant. 49 | 50 | \image canvas_variant.png 51 | 52 | The example presents a canvas filled up with items of different 53 | types, and a tree property browser which displays the currently 54 | selected item's properties. 55 | 56 | All item types has a few common properties like "Position X", "Position Y" 57 | or "Position Z", but each type also adds its own type-specific 58 | properties (e.g. the text items provide "Text" and "Font" 59 | properties, and the line items provide a "Vector" property). 60 | 61 | The source files can be found in examples/canvas_variant directory 62 | of the package. 63 | 64 | \section1 Third party copyright notice 65 | 66 | The canvas class used in this example contains third party code 67 | with the following copyright notice: 68 | 69 | \legalese 70 | \code 71 | 72 | Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. 73 | 74 | All Rights Reserved 75 | 76 | Permission to use, copy, modify, and distribute this software and its 77 | documentation for any purpose and without fee is hereby granted, 78 | provided that the above copyright notice appear in all copies and that 79 | both that copyright notice and this permission notice appear in 80 | supporting documentation, and that the name of Digital not be 81 | used in advertising or publicity pertaining to distribution of the 82 | software without specific, written prior permission. 83 | 84 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 85 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 86 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 87 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 88 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 89 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 90 | SOFTWARE. 91 | 92 | \endcode 93 | \endlegalese 94 | 95 | */ 96 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/canvas_variant/main.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). 4 | ** Contact: http://www.qt-project.org/legal 5 | ** 6 | ** This file is part of the Qt Solutions component. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** You may use this file under the terms of the BSD license as follows: 10 | ** 11 | ** "Redistribution and use in source and binary forms, with or without 12 | ** modification, are permitted provided that the following conditions are 13 | ** met: 14 | ** * Redistributions of source code must retain the above copyright 15 | ** notice, this list of conditions and the following disclaimer. 16 | ** * Redistributions in binary form must reproduce the above copyright 17 | ** notice, this list of conditions and the following disclaimer in 18 | ** the documentation and/or other materials provided with the 19 | ** distribution. 20 | ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names 21 | ** of its contributors may be used to endorse or promote products derived 22 | ** from this software without specific prior written permission. 23 | ** 24 | ** 25 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 36 | ** 37 | ** $QT_END_LICENSE$ 38 | ** 39 | ****************************************************************************/ 40 | 41 | #include 42 | #include "mainwindow.h" 43 | 44 | int main(int argc, char **argv) 45 | { 46 | QApplication app(argc, argv); 47 | 48 | MainWindow mw; 49 | mw.show(); 50 | 51 | return app.exec(); 52 | } 53 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/canvas_variant/mainwindow.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). 4 | ** Contact: http://www.qt-project.org/legal 5 | ** 6 | ** This file is part of the Qt Solutions component. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** You may use this file under the terms of the BSD license as follows: 10 | ** 11 | ** "Redistribution and use in source and binary forms, with or without 12 | ** modification, are permitted provided that the following conditions are 13 | ** met: 14 | ** * Redistributions of source code must retain the above copyright 15 | ** notice, this list of conditions and the following disclaimer. 16 | ** * Redistributions in binary form must reproduce the above copyright 17 | ** notice, this list of conditions and the following disclaimer in 18 | ** the documentation and/or other materials provided with the 19 | ** distribution. 20 | ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names 21 | ** of its contributors may be used to endorse or promote products derived 22 | ** from this software without specific prior written permission. 23 | ** 24 | ** 25 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 36 | ** 37 | ** $QT_END_LICENSE$ 38 | ** 39 | ****************************************************************************/ 40 | 41 | #ifndef MAINWINDOW_H 42 | #define MAINWINDOW_H 43 | 44 | #include 45 | #include 46 | #include "qtcanvas.h" 47 | 48 | class QtVariantProperty; 49 | class QtProperty; 50 | 51 | class QtBrowserIndex; 52 | 53 | class CanvasView : public QtCanvasView 54 | { 55 | Q_OBJECT 56 | public: 57 | CanvasView(QWidget *parent = 0) 58 | : QtCanvasView(parent), moving(0) { } 59 | CanvasView(QtCanvas *canvas, QWidget *parent = 0) 60 | : QtCanvasView(canvas, parent), moving(0) { } 61 | signals: 62 | void itemClicked(QtCanvasItem *item); 63 | void itemMoved(QtCanvasItem *item); 64 | protected: 65 | void contentsMousePressEvent(QMouseEvent *event); 66 | void contentsMouseDoubleClickEvent(QMouseEvent *event); 67 | void contentsMouseMoveEvent(QMouseEvent* event); 68 | private: 69 | void handleMouseClickEvent(QMouseEvent *event); 70 | QPoint moving_start; 71 | QtCanvasItem *moving; 72 | }; 73 | 74 | class MainWindow : public QMainWindow 75 | { 76 | Q_OBJECT 77 | public: 78 | MainWindow(QWidget *parent = 0); 79 | 80 | private slots: 81 | void newRectangle(); 82 | void newEllipse(); 83 | void newLine(); 84 | void newText(); 85 | void deleteObject(); 86 | void clearAll(); 87 | void fillView(); 88 | 89 | 90 | void itemClicked(QtCanvasItem *item); 91 | void itemMoved(QtCanvasItem *item); 92 | void valueChanged(QtProperty *property, const QVariant &value); 93 | private: 94 | 95 | QtCanvasItem *addRectangle(); 96 | QtCanvasItem *addEllipse(); 97 | QtCanvasItem *addLine(); 98 | QtCanvasItem *addText(); 99 | void addProperty(QtVariantProperty *property, const QString &id); 100 | void updateExpandState(); 101 | 102 | QAction *deleteAction; 103 | 104 | class QtVariantPropertyManager *variantManager; 105 | 106 | class QtTreePropertyBrowser *propertyEditor; 107 | CanvasView *canvasView; 108 | QtCanvas *canvas; 109 | QtCanvasItem *currentItem; 110 | QMap propertyToId; 111 | QMap idToProperty; 112 | QMap idToExpanded; 113 | }; 114 | 115 | #endif 116 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/decoration/decoration.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | DEPENDPATH += . 3 | INCLUDEPATH += . 4 | 5 | include(../../src/qtpropertybrowser.pri) 6 | # Input 7 | SOURCES += main.cpp 8 | 9 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/decoration/decoration.qdoc: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). 4 | ** Contact: http://www.qt-project.org/legal 5 | ** 6 | ** This file is part of the Qt Solutions component. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** You may use this file under the terms of the BSD license as follows: 10 | ** 11 | ** "Redistribution and use in source and binary forms, with or without 12 | ** modification, are permitted provided that the following conditions are 13 | ** met: 14 | ** * Redistributions of source code must retain the above copyright 15 | ** notice, this list of conditions and the following disclaimer. 16 | ** * Redistributions in binary form must reproduce the above copyright 17 | ** notice, this list of conditions and the following disclaimer in 18 | ** the documentation and/or other materials provided with the 19 | ** distribution. 20 | ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names 21 | ** of its contributors may be used to endorse or promote products derived 22 | ** from this software without specific prior written permission. 23 | ** 24 | ** 25 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 36 | ** 37 | ** $QT_END_LICENSE$ 38 | ** 39 | ****************************************************************************/ 40 | 41 | /*! 42 | \page qtpropertybrowser-example-decoration.html 43 | \title Decoration Example 44 | 45 | This example demonstrates how to decorate the existing 46 | QtDoublePropertyManager class with additional responsibilities. 47 | 48 | \image decoration.png 49 | 50 | It also shows how to write respective editor factory for decorated manager 51 | by delegating common responsibilities of undecorated base manager to the aggregated 52 | QtDoubleSpinBoxFactory member. 53 | 54 | The source files can be found in examples/decoration directory of the package. 55 | */ 56 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/demo/demo.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | DEPENDPATH += . 3 | INCLUDEPATH += . 4 | 5 | include(../../src/qtpropertybrowser.pri) 6 | # Input 7 | SOURCES += main.cpp 8 | RESOURCES += demo.qrc 9 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/demo/demo.qdoc: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). 4 | ** Contact: http://www.qt-project.org/legal 5 | ** 6 | ** This file is part of the Qt Solutions component. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** You may use this file under the terms of the BSD license as follows: 10 | ** 11 | ** "Redistribution and use in source and binary forms, with or without 12 | ** modification, are permitted provided that the following conditions are 13 | ** met: 14 | ** * Redistributions of source code must retain the above copyright 15 | ** notice, this list of conditions and the following disclaimer. 16 | ** * Redistributions in binary form must reproduce the above copyright 17 | ** notice, this list of conditions and the following disclaimer in 18 | ** the documentation and/or other materials provided with the 19 | ** distribution. 20 | ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names 21 | ** of its contributors may be used to endorse or promote products derived 22 | ** from this software without specific prior written permission. 23 | ** 24 | ** 25 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 36 | ** 37 | ** $QT_END_LICENSE$ 38 | ** 39 | ****************************************************************************/ 40 | 41 | /*! 42 | \page qtpropertybrowser-example-demo.html 43 | \title Demo Example 44 | 45 | This example shows how to customize a property browser widget's 46 | appearance and behavior. 47 | 48 | \image demo.png 49 | 50 | The various property browsers presented in this example display 51 | the same set of properties, and are implementations of the 52 | QtTreePropertyBrowser class and the QtGroupBoxPropertyBrowser 53 | class, respectively. 54 | 55 | The example shows how a property browser's appearance and behavior can 56 | be varied using the QtPropertyBrowser framework's property 57 | managers and editor factories. 58 | 59 | The source files can be found in examples/demo directory of the package. 60 | */ 61 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/demo/demo.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | images/up.png 4 | images/down.png 5 | images/right.png 6 | images/left.png 7 | 8 | 9 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/demo/images/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/examples/demo/images/down.png -------------------------------------------------------------------------------- /qtpropertybrowser/examples/demo/images/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/examples/demo/images/left.png -------------------------------------------------------------------------------- /qtpropertybrowser/examples/demo/images/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/examples/demo/images/right.png -------------------------------------------------------------------------------- /qtpropertybrowser/examples/demo/images/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/examples/demo/images/up.png -------------------------------------------------------------------------------- /qtpropertybrowser/examples/examples.pro: -------------------------------------------------------------------------------- 1 | ###################################################################### 2 | # Automatically generated by qmake (2.00a) Wed Jun 15 15:53:34 2005 3 | ###################################################################### 4 | 5 | TEMPLATE = subdirs 6 | SUBDIRS = simple canvas_variant canvas_typed demo decoration extension object_controller 7 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/extension/extension.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | DEPENDPATH += . 3 | INCLUDEPATH += . 4 | 5 | include(../../src/qtpropertybrowser.pri) 6 | # Input 7 | SOURCES += main.cpp 8 | 9 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/extension/extension.qdoc: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). 4 | ** Contact: http://www.qt-project.org/legal 5 | ** 6 | ** This file is part of the Qt Solutions component. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** You may use this file under the terms of the BSD license as follows: 10 | ** 11 | ** "Redistribution and use in source and binary forms, with or without 12 | ** modification, are permitted provided that the following conditions are 13 | ** met: 14 | ** * Redistributions of source code must retain the above copyright 15 | ** notice, this list of conditions and the following disclaimer. 16 | ** * Redistributions in binary form must reproduce the above copyright 17 | ** notice, this list of conditions and the following disclaimer in 18 | ** the documentation and/or other materials provided with the 19 | ** distribution. 20 | ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names 21 | ** of its contributors may be used to endorse or promote products derived 22 | ** from this software without specific prior written permission. 23 | ** 24 | ** 25 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 36 | ** 37 | ** $QT_END_LICENSE$ 38 | ** 39 | ****************************************************************************/ 40 | 41 | /*! 42 | \page qtpropertybrowser-example-extension.html 43 | \title Extension Example 44 | 45 | This example demonstrates how to extend the 46 | QtVariantPropertyManager class to handle additional property 47 | types. 48 | 49 | \image extension.png 50 | 51 | The variant manager is extended to handle the QPointF type. 52 | 53 | The source files can be found in examples/extension directory of the package. 54 | */ 55 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/object_controller/object_controller.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | DEPENDPATH += . 3 | INCLUDEPATH += . 4 | 5 | include(../../src/qtpropertybrowser.pri) 6 | # Input 7 | HEADERS += objectcontroller.h 8 | SOURCES += objectcontroller.cpp main.cpp 9 | 10 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/object_controller/object_controller.qdoc: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). 4 | ** Contact: http://www.qt-project.org/legal 5 | ** 6 | ** This file is part of the Qt Solutions component. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** You may use this file under the terms of the BSD license as follows: 10 | ** 11 | ** "Redistribution and use in source and binary forms, with or without 12 | ** modification, are permitted provided that the following conditions are 13 | ** met: 14 | ** * Redistributions of source code must retain the above copyright 15 | ** notice, this list of conditions and the following disclaimer. 16 | ** * Redistributions in binary form must reproduce the above copyright 17 | ** notice, this list of conditions and the following disclaimer in 18 | ** the documentation and/or other materials provided with the 19 | ** distribution. 20 | ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names 21 | ** of its contributors may be used to endorse or promote products derived 22 | ** from this software without specific prior written permission. 23 | ** 24 | ** 25 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 36 | ** 37 | ** $QT_END_LICENSE$ 38 | ** 39 | ****************************************************************************/ 40 | 41 | /*! 42 | \page qtpropertybrowser-example-object_controller.html 43 | \title The Object Controller Example. 44 | 45 | \image object_controller.png 46 | 47 | This example implements a simple widget component which shows 48 | QObject's and its subclasses' properties. The user can modify these properies interacively 49 | and the object controller applies the changes to the controlled object. 50 | The object controller is similar to the property editor used in QDesigner application. 51 | To control the object just instantiate ObjectController, set controlled object (any QObject subclass) by 52 | calling ObjectController::setObject() and show the controller. 53 | 54 | The source files can be found in examples/object_controller directory of the package. 55 | */ 56 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/object_controller/objectcontroller.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). 4 | ** Contact: http://www.qt-project.org/legal 5 | ** 6 | ** This file is part of the Qt Solutions component. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** You may use this file under the terms of the BSD license as follows: 10 | ** 11 | ** "Redistribution and use in source and binary forms, with or without 12 | ** modification, are permitted provided that the following conditions are 13 | ** met: 14 | ** * Redistributions of source code must retain the above copyright 15 | ** notice, this list of conditions and the following disclaimer. 16 | ** * Redistributions in binary form must reproduce the above copyright 17 | ** notice, this list of conditions and the following disclaimer in 18 | ** the documentation and/or other materials provided with the 19 | ** distribution. 20 | ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names 21 | ** of its contributors may be used to endorse or promote products derived 22 | ** from this software without specific prior written permission. 23 | ** 24 | ** 25 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 36 | ** 37 | ** $QT_END_LICENSE$ 38 | ** 39 | ****************************************************************************/ 40 | 41 | #ifndef OBJECTCONTROLLER_H 42 | #define OBJECTCONTROLLER_H 43 | 44 | #include 45 | 46 | class ObjectControllerPrivate; 47 | 48 | class ObjectController : public QWidget 49 | { 50 | Q_OBJECT 51 | public: 52 | ObjectController(QWidget *parent = 0); 53 | ~ObjectController(); 54 | 55 | void setObject(QObject *object); 56 | QObject *object() const; 57 | 58 | private: 59 | ObjectControllerPrivate *d_ptr; 60 | Q_DECLARE_PRIVATE(ObjectController) 61 | Q_DISABLE_COPY(ObjectController) 62 | Q_PRIVATE_SLOT(d_func(), void slotValueChanged(QtProperty *, const QVariant &)) 63 | }; 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/simple/simple.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | DEPENDPATH += . 3 | INCLUDEPATH += . 4 | 5 | include(../../src/qtpropertybrowser.pri) 6 | # Input 7 | SOURCES += main.cpp 8 | 9 | -------------------------------------------------------------------------------- /qtpropertybrowser/examples/simple/simple.qdoc: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). 4 | ** Contact: http://www.qt-project.org/legal 5 | ** 6 | ** This file is part of the Qt Solutions component. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** You may use this file under the terms of the BSD license as follows: 10 | ** 11 | ** "Redistribution and use in source and binary forms, with or without 12 | ** modification, are permitted provided that the following conditions are 13 | ** met: 14 | ** * Redistributions of source code must retain the above copyright 15 | ** notice, this list of conditions and the following disclaimer. 16 | ** * Redistributions in binary form must reproduce the above copyright 17 | ** notice, this list of conditions and the following disclaimer in 18 | ** the documentation and/or other materials provided with the 19 | ** distribution. 20 | ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names 21 | ** of its contributors may be used to endorse or promote products derived 22 | ** from this software without specific prior written permission. 23 | ** 24 | ** 25 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 36 | ** 37 | ** $QT_END_LICENSE$ 38 | ** 39 | ****************************************************************************/ 40 | 41 | /*! 42 | \page qtpropertybrowser-example-simple.html 43 | \title Simple Tree Property Browser Example 44 | 45 | \image simple.png 46 | 47 | This example shows how to present various properties using a 48 | simple tree property browser, i.e. an implementation of the 49 | QtTreePropertyBrowser class. 50 | 51 | The source files can be found in examples/simple directory of the package. 52 | */ 53 | -------------------------------------------------------------------------------- /qtpropertybrowser/qtpropertybrowser.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE=subdirs 2 | CONFIG += ordered 3 | include(common.pri) 4 | qtpropertybrowser-uselib:SUBDIRS=buildlib 5 | SUBDIRS+ 6 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/.DS_Store -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtAbstractEditorFactoryBase: -------------------------------------------------------------------------------- 1 | #include "qtpropertybrowser.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtAbstractPropertyBrowser: -------------------------------------------------------------------------------- 1 | #include "qtpropertybrowser.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtAbstractPropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertybrowser.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtBoolPropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtBrowserItem: -------------------------------------------------------------------------------- 1 | #include "qtpropertybrowser.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtButtonPropertyBrowser: -------------------------------------------------------------------------------- 1 | #include "qtbuttonpropertybrowser.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtCharEditorFactory: -------------------------------------------------------------------------------- 1 | #include "qteditorfactory.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtCharPropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtCheckBoxFactory: -------------------------------------------------------------------------------- 1 | #include "qteditorfactory.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtColorEditorFactory: -------------------------------------------------------------------------------- 1 | #include "qteditorfactory.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtColorPropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtCursorEditorFactory: -------------------------------------------------------------------------------- 1 | #include "qteditorfactory.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtCursorPropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtDateEditFactory: -------------------------------------------------------------------------------- 1 | #include "qteditorfactory.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtDatePropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtDateTimeEditFactory: -------------------------------------------------------------------------------- 1 | #include "qteditorfactory.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtDateTimePropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtDoublePropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtDoubleSpinBoxFactory: -------------------------------------------------------------------------------- 1 | #include "qteditorfactory.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtEnumEditorFactory: -------------------------------------------------------------------------------- 1 | #include "qteditorfactory.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtEnumPropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtFlagPropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtFontEditorFactory: -------------------------------------------------------------------------------- 1 | #include "qteditorfactory.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtFontPropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtGroupBoxPropertyBrowser: -------------------------------------------------------------------------------- 1 | #include "qtgroupboxpropertybrowser.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtGroupPropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtIntPropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtKeySequenceEditorFactory: -------------------------------------------------------------------------------- 1 | #include "qteditorfactory.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtKeySequencePropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtLineEditFactory: -------------------------------------------------------------------------------- 1 | #include "qteditorfactory.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtLocalePropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtPointFPropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtPointPropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtProperty: -------------------------------------------------------------------------------- 1 | #include "qtpropertybrowser.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtRectFPropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtRectPropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtScrollBarFactory: -------------------------------------------------------------------------------- 1 | #include "qteditorfactory.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtSizeFPropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtSizePolicyPropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtSizePropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtSliderFactory: -------------------------------------------------------------------------------- 1 | #include "qteditorfactory.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtSpinBoxFactory: -------------------------------------------------------------------------------- 1 | #include "qteditorfactory.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtStringPropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtTimeEditFactory: -------------------------------------------------------------------------------- 1 | #include "qteditorfactory.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtTimePropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtpropertymanager.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtTreePropertyBrowser: -------------------------------------------------------------------------------- 1 | #include "qttreepropertybrowser.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtVariantEditorFactory: -------------------------------------------------------------------------------- 1 | #include "qtvariantproperty.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtVariantProperty: -------------------------------------------------------------------------------- 1 | #include "qtvariantproperty.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/QtVariantPropertyManager: -------------------------------------------------------------------------------- 1 | #include "qtvariantproperty.h" 2 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/images/cursor-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/images/cursor-arrow.png -------------------------------------------------------------------------------- /qtpropertybrowser/src/images/cursor-busy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/images/cursor-busy.png -------------------------------------------------------------------------------- /qtpropertybrowser/src/images/cursor-closedhand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/images/cursor-closedhand.png -------------------------------------------------------------------------------- /qtpropertybrowser/src/images/cursor-cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/images/cursor-cross.png -------------------------------------------------------------------------------- /qtpropertybrowser/src/images/cursor-forbidden.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/images/cursor-forbidden.png -------------------------------------------------------------------------------- /qtpropertybrowser/src/images/cursor-hand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/images/cursor-hand.png -------------------------------------------------------------------------------- /qtpropertybrowser/src/images/cursor-hsplit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/images/cursor-hsplit.png -------------------------------------------------------------------------------- /qtpropertybrowser/src/images/cursor-ibeam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/images/cursor-ibeam.png -------------------------------------------------------------------------------- /qtpropertybrowser/src/images/cursor-openhand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/images/cursor-openhand.png -------------------------------------------------------------------------------- /qtpropertybrowser/src/images/cursor-sizeall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/images/cursor-sizeall.png -------------------------------------------------------------------------------- /qtpropertybrowser/src/images/cursor-sizeb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/images/cursor-sizeb.png -------------------------------------------------------------------------------- /qtpropertybrowser/src/images/cursor-sizef.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/images/cursor-sizef.png -------------------------------------------------------------------------------- /qtpropertybrowser/src/images/cursor-sizeh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/images/cursor-sizeh.png -------------------------------------------------------------------------------- /qtpropertybrowser/src/images/cursor-sizev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/images/cursor-sizev.png -------------------------------------------------------------------------------- /qtpropertybrowser/src/images/cursor-uparrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/images/cursor-uparrow.png -------------------------------------------------------------------------------- /qtpropertybrowser/src/images/cursor-vsplit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/images/cursor-vsplit.png -------------------------------------------------------------------------------- /qtpropertybrowser/src/images/cursor-wait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/images/cursor-wait.png -------------------------------------------------------------------------------- /qtpropertybrowser/src/images/cursor-whatsthis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egan2015/qdraw/9039778893908d5038440f6de4a433c3b03aaac5/qtpropertybrowser/src/images/cursor-whatsthis.png -------------------------------------------------------------------------------- /qtpropertybrowser/src/qtbuttonpropertybrowser.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). 4 | ** Contact: http://www.qt-project.org/legal 5 | ** 6 | ** This file is part of the Qt Solutions component. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** You may use this file under the terms of the BSD license as follows: 10 | ** 11 | ** "Redistribution and use in source and binary forms, with or without 12 | ** modification, are permitted provided that the following conditions are 13 | ** met: 14 | ** * Redistributions of source code must retain the above copyright 15 | ** notice, this list of conditions and the following disclaimer. 16 | ** * Redistributions in binary form must reproduce the above copyright 17 | ** notice, this list of conditions and the following disclaimer in 18 | ** the documentation and/or other materials provided with the 19 | ** distribution. 20 | ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names 21 | ** of its contributors may be used to endorse or promote products derived 22 | ** from this software without specific prior written permission. 23 | ** 24 | ** 25 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 36 | ** 37 | ** $QT_END_LICENSE$ 38 | ** 39 | ****************************************************************************/ 40 | 41 | 42 | #ifndef QTBUTTONPROPERTYBROWSER_H 43 | #define QTBUTTONPROPERTYBROWSER_H 44 | 45 | #include "qtpropertybrowser.h" 46 | 47 | #if QT_VERSION >= 0x040400 48 | QT_BEGIN_NAMESPACE 49 | #endif 50 | 51 | class QtButtonPropertyBrowserPrivate; 52 | 53 | class QT_QTPROPERTYBROWSER_EXPORT QtButtonPropertyBrowser : public QtAbstractPropertyBrowser 54 | { 55 | Q_OBJECT 56 | public: 57 | 58 | QtButtonPropertyBrowser(QWidget *parent = 0); 59 | ~QtButtonPropertyBrowser(); 60 | 61 | void setExpanded(QtBrowserItem *item, bool expanded); 62 | bool isExpanded(QtBrowserItem *item) const; 63 | 64 | Q_SIGNALS: 65 | 66 | void collapsed(QtBrowserItem *item); 67 | void expanded(QtBrowserItem *item); 68 | 69 | protected: 70 | virtual void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem); 71 | virtual void itemRemoved(QtBrowserItem *item); 72 | virtual void itemChanged(QtBrowserItem *item); 73 | 74 | private: 75 | 76 | QtButtonPropertyBrowserPrivate *d_ptr; 77 | Q_DECLARE_PRIVATE(QtButtonPropertyBrowser) 78 | Q_DISABLE_COPY(QtButtonPropertyBrowser) 79 | Q_PRIVATE_SLOT(d_func(), void slotUpdate()) 80 | Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed()) 81 | Q_PRIVATE_SLOT(d_func(), void slotToggled(bool)) 82 | 83 | }; 84 | 85 | #if QT_VERSION >= 0x040400 86 | QT_END_NAMESPACE 87 | #endif 88 | 89 | #endif 90 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/qtgroupboxpropertybrowser.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). 4 | ** Contact: http://www.qt-project.org/legal 5 | ** 6 | ** This file is part of the Qt Solutions component. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** You may use this file under the terms of the BSD license as follows: 10 | ** 11 | ** "Redistribution and use in source and binary forms, with or without 12 | ** modification, are permitted provided that the following conditions are 13 | ** met: 14 | ** * Redistributions of source code must retain the above copyright 15 | ** notice, this list of conditions and the following disclaimer. 16 | ** * Redistributions in binary form must reproduce the above copyright 17 | ** notice, this list of conditions and the following disclaimer in 18 | ** the documentation and/or other materials provided with the 19 | ** distribution. 20 | ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names 21 | ** of its contributors may be used to endorse or promote products derived 22 | ** from this software without specific prior written permission. 23 | ** 24 | ** 25 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 36 | ** 37 | ** $QT_END_LICENSE$ 38 | ** 39 | ****************************************************************************/ 40 | 41 | 42 | #ifndef QTGROUPBOXPROPERTYBROWSER_H 43 | #define QTGROUPBOXPROPERTYBROWSER_H 44 | 45 | #include "qtpropertybrowser.h" 46 | 47 | #if QT_VERSION >= 0x040400 48 | QT_BEGIN_NAMESPACE 49 | #endif 50 | 51 | class QtGroupBoxPropertyBrowserPrivate; 52 | 53 | class QT_QTPROPERTYBROWSER_EXPORT QtGroupBoxPropertyBrowser : public QtAbstractPropertyBrowser 54 | { 55 | Q_OBJECT 56 | public: 57 | 58 | QtGroupBoxPropertyBrowser(QWidget *parent = 0); 59 | ~QtGroupBoxPropertyBrowser(); 60 | 61 | protected: 62 | virtual void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem); 63 | virtual void itemRemoved(QtBrowserItem *item); 64 | virtual void itemChanged(QtBrowserItem *item); 65 | 66 | private: 67 | 68 | QtGroupBoxPropertyBrowserPrivate *d_ptr; 69 | Q_DECLARE_PRIVATE(QtGroupBoxPropertyBrowser) 70 | Q_DISABLE_COPY(QtGroupBoxPropertyBrowser) 71 | Q_PRIVATE_SLOT(d_func(), void slotUpdate()) 72 | Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed()) 73 | 74 | }; 75 | 76 | #if QT_VERSION >= 0x040400 77 | QT_END_NAMESPACE 78 | #endif 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/qtpropertybrowser.pri: -------------------------------------------------------------------------------- 1 | include(../common.pri) 2 | greaterThan(QT_MAJOR_VERSION, 4): QT *= widgets 3 | INCLUDEPATH += $$PWD 4 | DEPENDPATH += $$PWD 5 | 6 | qtpropertybrowser-uselib:!qtpropertybrowser-buildlib { 7 | LIBS += -L$$QTPROPERTYBROWSER_LIBDIR -l$$QTPROPERTYBROWSER_LIBNAME 8 | } else { 9 | DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 10 | SOURCES += $$PWD/qtpropertybrowser.cpp \ 11 | $$PWD/qtpropertymanager.cpp \ 12 | $$PWD/qteditorfactory.cpp \ 13 | $$PWD/qtvariantproperty.cpp \ 14 | $$PWD/qttreepropertybrowser.cpp \ 15 | $$PWD/qtbuttonpropertybrowser.cpp \ 16 | $$PWD/qtgroupboxpropertybrowser.cpp \ 17 | $$PWD/qtpropertybrowserutils.cpp 18 | HEADERS += $$PWD/qtpropertybrowser.h \ 19 | $$PWD/qtpropertymanager.h \ 20 | $$PWD/qteditorfactory.h \ 21 | $$PWD/qtvariantproperty.h \ 22 | $$PWD/qttreepropertybrowser.h \ 23 | $$PWD/qtbuttonpropertybrowser.h \ 24 | $$PWD/qtgroupboxpropertybrowser.h \ 25 | $$PWD/qtpropertybrowserutils_p.h 26 | RESOURCES += $$PWD/qtpropertybrowser.qrc 27 | } 28 | 29 | win32 { 30 | contains(TEMPLATE, lib):contains(CONFIG, shared):DEFINES += QT_QTPROPERTYBROWSER_EXPORT 31 | else:qtpropertybrowser-uselib:DEFINES += QT_QTPROPERTYBROWSER_IMPORT 32 | } 33 | -------------------------------------------------------------------------------- /qtpropertybrowser/src/qtpropertybrowser.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | images/cursor-arrow.png 4 | images/cursor-busy.png 5 | images/cursor-closedhand.png 6 | images/cursor-cross.png 7 | images/cursor-forbidden.png 8 | images/cursor-hand.png 9 | images/cursor-hsplit.png 10 | images/cursor-ibeam.png 11 | images/cursor-openhand.png 12 | images/cursor-sizeall.png 13 | images/cursor-sizeb.png 14 | images/cursor-sizef.png 15 | images/cursor-sizeh.png 16 | images/cursor-sizev.png 17 | images/cursor-uparrow.png 18 | images/cursor-vsplit.png 19 | images/cursor-wait.png 20 | images/cursor-whatsthis.png 21 | 22 | 23 | 24 | --------------------------------------------------------------------------------