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.
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.
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.
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.
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.
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 |
--------------------------------------------------------------------------------