Commit graph

624 commits

Author SHA1 Message Date
Michael Lamers
0836ae783a
QQuickPaintedItem support (#219)
* First support for QQuickPaintedItem

Implements some basic drawing functionalities

* Less string passing during drawing

Colors get registered and are referenced via id
Font parameters can be set separately

* Color string to id conversion is now an implementation detail of QmlNetPaintedItem

* Adds Font metrics functionality

* Adds DrawText overload with bounding rectangle

* Dont copy the actions on each draw but lock the vector

* Optional Text support for QmlNetPaintedItem (including preedit)

* Adds Flags to the DrawText (Rect) method

* Adds an interface to interact with a QPainter

This interface can be implemented by a QPainter abstraction in the future
For now QmlNetPaintedItem implements INetQPainter

* Native submodule: Adds QMutex include

* Native submodule: Adds missing include

* Adds a lot of the QPainter interface

* Fixes Polygon point handling

Adds new QPainter API to QmlNetPaintedItem

* Renames QmlNetPaintedItem to QmlNetRecordingPaintedItem

* Deactivates painthandler reset in destructor of RecordingPaintedItem

* Registering a QuickPaintedItem

* Hide QmlNetQuickPaintedItem from QML

* First theoretically working PaintedItem implementation

* getStringSize is now static

* new native submodule version

* new native submodule (build error fix)

* Cleanup

Removes RecordingPaintedItem
Removes INetQPainter (functionality moved to NetQPainter)

* references native that fixes type registration

* Draw Image file

* Adds testing infrastructure for QmlNetQuickPaintedItem

* DrawArc test

* DrawConvexPolygon test

* Fixes GCHandle handling in QmlNetQuickPaintedItem

* Adds setWindowIcon support to QGuiApplication

* Adds DrawEllipse and DrawLine test

* Adds DrawPoint test

* Adds DrawPolygon test

* Adds DrawRoundedRect test

* Draw Pie Unit Test

* Test source formatting

* DrawPolyline Unit test

* Erase Rect Unit Test

* Unit Tests for ClipRect and Opacity

* Disables transformations

Real world use cases would want to use the QTransform functionality instead of passing the raw transformation matrix

* Unit Test for Sheer

* Adds Unit test for Translate

* Cleanup

* Link to native/origin/master

* Re-Trigger CI

Co-authored-by: Paul Knopf <pauldotknopf@gmail.com>
2020-12-01 14:03:46 -05:00
devmil
4e54f975cb Changes auto-generation to be a behavior
This allows us to specify the priority (order) and make sure that the AutoGenerateBehavior only generates signals for properties that don't get any signals by other behaviors
2020-10-21 17:26:13 -04:00
devmil
72f9b2fdc7 Reproduces the problem 2020-10-21 17:26:13 -04:00
Paul Knopf
42bbb3f17a Adding support for auto generating notify signals. 2020-10-21 10:40:00 -04:00
Paul Knopf
b4becbea92 Updating submodule 2020-08-12 23:28:13 -04:00
devmil
00713e34e5 Adds a console log when the UI thread check fails 2020-08-08 13:01:22 -04:00
Paul Knopf
0982692d9c Making methods internal instead of private, to allow .NET runtime to gen code.
Closes #208
2020-08-01 23:34:13 -04:00
Paul Knopf
f890c16808 Updating Qt. 2020-08-01 23:08:29 -04:00
Paul Knopf
3b1041eb1e
Update README.md 2020-06-28 23:59:40 -04:00
Paul Knopf
ca5857e0df Moving native lib to submodule. 2020-06-28 14:10:55 -04:00
Paul Knopf
f719dbe82f Added ability to pre-append args to hosted runtime. This allows us to have a sub command that handles the embedding. 2020-06-28 02:09:19 -04:00
Paul Knopf
78628f2c68 Fixed issue with dynamic IL not having access to internal types.
Closes #207
2020-05-31 04:34:50 -04:00
Sebastian Hartte
c534d4c1d1 Fix Windows _UNICODE build
Use charset specific variant of GetModuleHandle without relying
on _UNICODE not being defined.
2020-05-29 22:14:32 -04:00
Sebastian Hartte
f7d70aa581 Fix QAtomicInt message formatting 2020-05-28 20:50:52 -04:00
Sebastian Hartte
a62a9c7cc8 Install .NET 2.1 side-by-side 2020-05-28 20:50:52 -04:00
Paul Knopf
00f3ea00e1 Fixing build. 2020-05-28 20:50:52 -04:00
Sebastian Hartte
ac508f0ee5 Attempts to debug build failures... 2020-05-28 20:50:52 -04:00
Sebastian Hartte
3922f0e4b6 Update GitVersion.ToolThis removes the incompatibility with the netcoreapp31 runtime. 2020-05-28 20:50:52 -04:00
Sebastian Hartte
02dd83a687 NetVariant support for all QML built-in types
Added support for all QML built-in types in NetVariant:
- rect/QRectF maps to System.Drawing.RectangleF
- point/QPointF maps to System.Drawing.Point
- size/QSizeF maps to System.Drawing.SizeF
- color/QColor maps to System.Drawing.Color

The following require .NET Standard 2.1:
- vector2d/QVector2D maps to System.Numerics.Vector2
- vector3d/QVector3D maps to System.Numerics.Vector3
- vector4d/QVector4D maps to System.Numerics.Vector4
- quaternion/QQuaternion maps to System.Numerics.Quaternion
- matrix4x4/QMatrix4x4D maps to System.Numerics.Matrix4x4

Additionally, the following are supported as well for convenience:
- QRect maps to System.Drawing.Rectangle
- QPoint maps to System.Drawing.Point
- QSize maps to System.Drawing.Size
2020-05-28 20:50:52 -04:00
Sebastian Hartte
025efb275b Use QChar* instead of custom string typedefs
Qt defines QChar as a class containing a ushort, which
should be consistently 16-bit across supported platforms.
this change uses QChar* instead of custom typedefs
to intepret LPWStr arguments passed to/from .NET.
2020-05-26 12:55:21 -04:00
Paul Knopf
8077f277d2 Adding note to circle back to this test at a later point. 2020-05-26 11:55:48 -04:00
Sebastian Hartte
824767ea83 Fail Tests on QML Warnings
Runtime errors when running the QML parts of unit tests are currently ignored and not captured in test output. Warnings are now captured and if not explicitly disabled, any QML warning will fail the test and include the warning messages in the failure.
2020-05-26 11:55:48 -04:00
shartte
e03bc15f79 Outline how Unit Tests can be run 2020-05-22 13:47:10 -04:00
Jonathan David Page
a0d8a403c3 Replace usage of QString::asprintf for new Qt
Qt5 removed the instance method QString::asprintf, and later replaced
it with a static method of the same name, causing CoreHost to compile,
but pass empty strings to the managed entry point.

The static QString::number method is available in both Qt4 and Qt5,
and as a bonus the overload should resolve to the appropriate pointer
length for the target.
2020-04-24 01:33:52 -04:00
Andrey
4287317ec0 text corrections
Co-Authored-By: Vadim Peretokin <vperetokin@gmail.com>
2020-04-21 08:14:14 -04:00
EarsKilla
0b6a665895 Note about libc6-dev on Linux 2020-04-21 08:14:14 -04:00
Sebastian Hartte
7c117250f5 Allow QtWidget-Free builds 2020-04-12 04:40:58 -04:00
Andy Fillebrown
21195a2e1f Use updated versions of Qt functions deprecated in Qt 5.14 2020-02-19 10:14:04 -05:00
Paul Knopf
c2540cc343 Fixing warnings. 2019-08-12 13:25:55 -04:00
Paul Knopf
c04efb91b7 Restoring ExecutationContext on dispatched actions.
This resolves AsyncLocal not being stored across continuations.
2019-08-09 14:25:47 -04:00
Paul Knopf
0057103578 Removing invalid test. 2019-07-26 12:39:22 -04:00
Paul Knopf
801da2360f A test is failing in 5.12. It still works though, just test is wrong. 2019-07-24 06:04:03 -04:00
Paul Knopf
aa8b615529 Removed the need for TestContext. Simplified some tests. 2019-07-24 05:31:23 -04:00
Paul Knopf
1786cf989a Added support for sending events. 2019-07-24 04:53:54 -04:00
Paul Knopf
599e6194b7 Simplifying the lifetime tests. 2019-07-21 16:20:54 -04:00
Andy Fillebrown
bb5d5d35f8 Fix parameter bug in NetQObject::invokeMethod
When setting up the QObject meta method arguments in
NetQObject::invokeMethod the 1st parameter is getting overwritten by
parameters 2 to 10 and parameters 2 to 10 are getting ignored. This
change fixes the issue and get calling NetQObject::invokeMethod with
multiple parameters working as expected.
2019-07-21 07:34:08 -04:00
Paul Knopf
a9175c61dd Adding contributors. 2019-07-09 04:53:17 -04:00
allcontributors[bot]
8731b625a8 docs: update .all-contributorsrc 2019-07-09 04:15:18 -04:00
Paul Knopf
197f4f1e76 Working on contrib bot. 2019-07-09 04:12:19 -04:00
Vadim Peretokin
969c63075b Update README 2019-07-09 04:02:30 -04:00
Paul Knopf
b6c84d2534 Increasing the number of allowed registered types for unit tests. 2019-07-09 04:00:47 -04:00
Paul Knopf
9978c5def0 Support null byte arrays.
Added some unit tests.
2019-07-09 04:00:47 -04:00
tom
f94410a5a3 Remove blank lines 2019-07-09 04:00:47 -04:00
tom
fb7df8e3a0 Added QByteArray support 2019-07-09 04:00:47 -04:00
Paul Knopf
01e62e3124 Support converting .NET object to a variant list. 2019-06-26 16:15:47 -04:00
Paul Knopf
7837ab167e Support for wrapping read only lists. 2019-06-26 14:50:23 -04:00
Paul Knopf
45f4196da0 Added support for settings the default locale (QLocale.SetDefault). 2019-06-25 13:59:07 -04:00
Max
c1ae6a13ee
Merge pull request #144 from geigertom/updated_type_registration
Updated function for qml type registration.
2019-06-20 10:35:31 -04:00
tom
7c4d3ba447 Fixed indentation. 2019-06-20 07:48:01 +02:00
tom
400f174d8f Fixed indentation. 2019-06-20 07:45:55 +02:00