Commit Graph

60 Commits

Author SHA1 Message Date
Simon Edwards
0db724d40c Add more QWidget methods 2022-05-23 22:02:08 +02:00
Simon Edwards
fcdbfb07c3 Merge branch 'master' into memory 2022-05-19 20:04:52 +02:00
Jake Kerr
d450841001
Expose the QWidget::grab method to script. (#941)
Reference from qt base:
https://code.qt.io/cgit/qt/qtbase.git/tree/src/widgets/kernel/qwidget.cpp#n5247
2022-05-19 18:03:48 +02:00
Simon Edwards
6aa3f00fa3 Massive C++ wrapper update 2022-05-09 22:12:52 +02:00
Simon Edwards
83e9c09690 Remove NodeLayout, use QLayout instead 2022-04-29 19:55:13 +02:00
Simon Edwards
38b12759c6 Remove NodeWidget, just use QWidget 2022-04-29 19:36:46 +02:00
Simon Edwards
c6d30f8f9f Combine NodeObject+QObject; put native field in Component 2022-04-29 13:30:39 +02:00
Simon Edwards
e2ccec9ba3 Make it possible to set stylesheets and bypass postcss
Sometimes the extra CSS properties produced by postcss are applied to the
normal QWidgets which are not subclassed with the Yoga stuff included.
This produces nasty warnings, regardless of whether you are using Yoga/flex
or not.
2022-04-16 21:49:33 +02:00
Simon Edwards
b4c9c0d51b Add QWidget.mapTo() and QWidget.mapFrom() 2022-02-12 11:43:51 +01:00
Simon Edwards
c877a2814e Make QWindow fire QEvents as events; add "window state" methods 2022-02-08 22:19:40 +01:00
Simon Edwards
2865212937 Add QWidget.winId(), useful for forcing window creation 2022-02-06 19:09:27 +01:00
Simon Edwards
78895a002f Fix QWidget.setEnable()/setDisable() 2021-12-27 13:34:29 +01:00
Simon Edwards
9f9e61289b More QWidget methods and properties 2021-12-26 18:53:49 +01:00
Simon Edwards
1ab7d13b96 Add QWidget.setFixedHeight(), QWidget.setFixedWidth(), and QWidget.sizeHint() 2021-12-11 15:31:43 +01:00
Simon Edwards
2dc8319b50 Add some tests for the wrapper cache 2021-11-05 21:10:01 +01:00
Simon Edwards
eea4f6fe30 Merge branch 'master' into qscreen_qwindow 2021-11-04 20:47:52 +01:00
Simon Edwards
2b2d2a65b2 Make the wrapper cache generic. Apply it to QWindow and QScreen 2021-10-31 09:32:37 +01:00
Simon Edwards
8ce6dde45b Add QScreen and QWindow, remove the deprecated QDesktopWidget 2021-10-22 22:15:59 +02:00
Simon Edwards
bfd45b3a54 Add QScreen and QWindow, remove the deprecated QDesktopWidget 2021-10-22 22:13:17 +02:00
Simon Edwards
8ddc4172cd Add more QWidget methods 2021-10-16 16:43:24 +02:00
Simon Edwards
81eeaa3a20 Don't delete QObjects which have a parent
Qt's memory management is built around trees of objects where deleting the root object also deletes the whole tree. Objects with a parent are owned by that parent.
2021-10-16 14:16:34 +02:00
Simon Edwards
590385339c Add QStyle.polish(), QStyle.unpolish(), and QWidget.style() 2021-09-13 19:50:53 +02:00
Simon Edwards
44bb1e5f0e QWidget: Add TODO comments, setSizePolicy(), set max/min width/height methods 2021-09-11 12:14:43 +02:00
Simon Edwards
25f529757e Add width() and height() to QWidget 2021-08-26 22:19:03 +02:00
Simon Edwards
080bb3626d Add some missing geometry methods to QWidget 2021-08-13 15:53:00 +02:00
Simon Edwards
1bc346d22c
Add QEvent methods to all subclasses + some random methods (#848)
* Add `clearFocus()` to `QWidget`

* Add `Alignment` param to `QBoxLayout.addWidget()`

* Add `setViewportMargins()` & `viewportMargins()` to `QScrollArea`

* Add `QEvent` methods to all event related subclasses

* Tell C++ that our 0 is zero and not a null pointer
2021-07-08 22:45:41 +02:00
Simon Edwards
f4e0ca1677
More random methods and events (#847)
* Add `maximumViewportSize()`, `setHorizontalScrollBar()` & `setVerticalScrollBar()` to `QAbstractScrollArea`

* Log any JS exceptions thrown during Qt event dispatch

* Add `setData()` & `data()` to `QAction`

* Add `clear()` to `QMenu`

* Add `triggered` event support to `QMenu`

* Code style fixes

* Add `focusWindowChanged` event to `QApplication`

* Add `isActiveWindow()` to `QWidget`
2021-07-04 12:55:41 +02:00
Simon Edwards
2b26ea4ddd
Extra font and painter related methods and classes (#845)
* Add `QPaintEvent`

* Add `setStyleName()` to `QFont`

* Add `isFixedPitch()` and `styles()` to `QFontDatabase`

* Add `drawImage()` to `QPainter`

* Add `setFocusPolicy()` to `QWidget`
2021-06-26 18:37:53 +02:00
Wyatt Kirby
3fe8f17f94
Fix incorrect behavior of minimum size for yoga layout (#814) 2021-02-25 22:43:45 +01:00
Atul R
f1b9665c53 Fixes for ts v4 and lint fixes 2021-01-24 19:49:38 +01:00
Atul R
30ce474aab fix broken links 2020-09-19 20:36:39 +02:00
Ruslan Garifullin
979989e166
Added setFocus to QWidget (nodegui#661) (#669) 2020-08-17 23:47:18 +02:00
swittk
3fadf33113
Added setAcceptDrops, acceptDrops to QWidget for creating drag-drop extensions (#613)
* Added QWheelEvent

* removed x y

* Added QNativeGestureEvent

* Changed wrong type of QNativeGestureEventWrap value

* Added QTabletEvent

* Fixing build error for QTabletEvent

* adding dropaction

* fix typos

* Added more functions to QPainterPath

* Added more functions to QPainterPath

* Fixed multiple typos

* Fixed multiple typos

* Got QPainterPath additions working.

* Modified QPainterPath to use qreal instead

* Added QPointF, added a few missing methods to QPoint

* Added QRectF

* implemented QRectF

* Added acceptDrops and setAcceptDrops to QWidget, will be useful for addon implementation of Drag and Drop

Co-authored-by: Switt Kongdachalert <switt1995@yahoo.com>
2020-06-26 16:53:43 +02:00
流君酱
fa7ddaa531
added support for QWidget::maximumSize && QWidget::minimumSize (#574) 2020-05-22 16:49:38 +02:00
Atul R
1bd0a5ca10
Upgrade deps (#562)
* upgrade qode

* 0.20.0

* dep updates

* formatting and fix exports

* fix type rename
2020-05-13 09:15:46 +02:00
Mihkel
17239ae5cf
added support for QWidget::removeAction #548 (#549) 2020-05-08 08:40:00 +02:00
feng8848
527a18a1e5
fix issue #503 (#519)
* fix issue #481

* fix lint

* Add QTextEdit and QTextBrowser

* Add QGraphicsBlurEffect

* Add QGraphicsDropShadowEffect

Co-authored-by: wuxiaofeng <wuxiaofeng@erayt.com>
2020-04-14 19:10:34 +02:00
Solant
300925260e
Set cursor (#505)
* implemented QCursor setter for QWidget::setCursor method

* sorted includes, removed console.log statement from tests
2020-04-13 10:18:30 +02:00
feng8848
e09333c948
fix issue #473 (#475)
* fix issue #473

* fix ts lint

Co-authored-by: wuxiaofeng <wuxiaofeng@erayt.com>
2020-03-30 20:05:27 +02:00
Atul R
50f43d955a
adds memoization and perf fixes (#450)
* adds memoization and perf fixes

* 0.16.1
2020-03-17 00:17:15 +01:00
Atul R
863e72a256 Fix docs website 2020-03-15 12:35:48 +01:00
Atul R
22b28f8cd4
Adds pixmap support to clipboard (#445)
* adds pixmap setters and getters to qclipboard

* upgrade deps

* Adds  inlinestylesheet fix on objectname test
2020-03-14 19:29:26 +01:00
Atul R
86b8dd966e Adds repolish for setObjectName 2020-03-13 21:39:59 +01:00
gluaxspeed
34d32a1e74 Improving Menu Bars (#347)
* menu and menubar changes so far

* attempting to add a simpler way to create menubars

* menu and menubar changes so far

* attempting to add a simpler way to create menubars

* attempting to add a simpler way to create menubars

* rebased from master

* rebased from master

* Move qaction creation to qwidget macro

* removed addMenuWithName

* exec, and popup working

Co-authored-by: Atul R <atulanand94@gmail.com>
2020-01-22 22:06:12 +01:00
slidinghotdog
1ed3172f9e add setFont() and font() to QWidget and font() to QAction (#327)
* add setFont() and font() to QWidget and font() to QAction

* fix QAction constructor weight type

* Fix for native element constructor QFont

Co-authored-by: Atul R <atulanand94@gmail.com>
2020-01-05 20:01:50 +05:30
Atul R
392aa3cd4c
Adds automatic docs for now (#308)
* adds basic typedoc

* backup

* Adds all docs to source code

* Adds autogenerated docs

* Fixes doc links

* Updates docs
2019-12-29 00:42:06 +05:30
Atul R
d1e5d499fb
Inherit implemented Qt signals from base classes (#290)
* Adds abstract signals

* basic layout and filedialogs

* Adds all remaining signal heirarchies

* fix lint
2019-12-23 01:26:02 +05:30
Atul R
42e92ecbff
Adds Signals inheritance (#288)
* Inherit signals

* export signals

* Fix Qvariant build

* Adds Abstract button signals

* added more test cases
2019-12-20 23:48:53 +05:30
Atul R
01a6476f9c
Separate events and signals (#287)
* Wip

* Improve constructor typings

* Fixes types for Gui and Core

* QtGui

* Remove unnecessary imports and fix types on abstract classes

* Adds half of qwidgets

* Add all widgets

* cleans up

* fix failing test

* lint fix

* fix demo
2019-12-20 18:33:05 +05:30
Atul R
8793f172e3
Cleanup and bump version (#285)
* Cleans up and bumps version

* Change to npm blacklist

* geometry now returns QRect
2019-12-19 23:10:32 +05:30