Commit Graph

193 Commits

Author SHA1 Message Date
Atul R
86b8dd966e Adds repolish for setObjectName 2020-03-13 21:39:59 +01:00
Atul R
65da42e1f3 stylesheet performance fix 2020-03-13 20:38:04 +01:00
feng8848
2359ca8838
fix issue #439 (#440)
Co-authored-by: wuxiaofeng <wuxiaofeng@erayt.com>
2020-03-12 16:21:56 +01:00
Atul R
c742712f6f
Qwidget wrap fix (#433)
* skip setting up miniqt if customQt is on

* adds opengl context

* adds NodeWidgetWrap

* changed the mode of qode.js to make it executable

* 0.15.3
2020-03-08 16:47:56 +01:00
Atul R
86c3ef089c
Integration with Qode 2.0 (#400)
* Moves qt integration solely to the nodegui core addon

* Adds lint fixes

* moved to integration core

* cleans up export snippet

* revert package.json

* Add exit if app->exec finishes.

* lint fix

* Makes QApplication custom

* adds qobject to wrap of qapp

* Adds working qt run looper

* Adds font default

* Adds qt installer

* Updates qode integration to v2.0.1

* fix cpp lints

* Fixes lint and deps

* Adds miniqt installation

* adds setup mini qt script

* skips tests due to issues with jest

* fix config and download path for linux and windows

* Adds multiple artifact downloader

* fix qt config and compilation

* Fixes qode path for windows (now it can load dll's easily)

* Add compilation

* fix windows path setup

* use scripts directly

* enabled tests back

* fix ubuntu deps

* update to alpha release

* fix workflow

* adds more artifacts and funding field

* change to alpha v2

* update prebuild yml

* revert build action

* disabling prebuild for now

* switch to stable release 5.14.1

* version bump
2020-03-07 10:28:30 +01:00
Atul R
07d70e6321
Add more tabwidgets methods (#422)
* add qtabwidget indexOf

* Adds setTabIcon
2020-02-27 01:06:34 +01:00
Shubham Zanwar
57cf0d4836
improv: adding the ability to change the tab text (#421)
* adding the setTabText to the QTabWidgetWrap definition

* implementing the setTabText funciton in the cpp module

* implementing the setTabText in the ts module

* adding a demo for the tab text change feature

* fixing lint issues

* exporting the QSettings enums
2020-02-25 09:36:58 +01:00
feng8848
9e1e8e576c
Add QFrame and other improvements (#420) 2020-02-25 08:50:53 +01:00
feng8848
cf7d241b51
Add QTableView support (#406)
* Add QTableView support

* Fix template to move public expanded methods to private

Co-authored-by: Atul R <atulanand94@gmail.com>
2020-02-20 07:53:31 +01:00
feng8848
ab6c28166e
Add QPicture and other improvements (#399) 2020-02-17 20:45:57 +01:00
Solant
07ac11c6ab
Qsettings (#401)
* initial qsettings implementation

* fix qsettings object constructor initialization

* added sync method

* added setValue method

* implemented value method

* pass actual app name and org name

* accept any value that can be converted to QVariant in setValue method

* implemented value method with proper QVariant wrap

* added tests

* removed testing data, fixed warning

* fixed cpp linting
2020-02-17 20:44:29 +01:00
feng8848
c47f788094
Add QScrollBar and other improvements (#383)
* Add QScrollBar and other improvements

* Add Windows plugin export

* Fixes QDateEdit and QTimeEdit.

Co-authored-by: Atul R <atulanand94@gmail.com>
2020-02-07 20:22:49 +01:00
Solant
c97efce5f6
implemented QFontDatabase families method (#392)
* implemented QFontDatabase families method

* fixed linting
2020-02-07 19:20:05 +01:00
Atul R
ba088d441a
Adds Qinputdialog (#381)
* wip

* Adds qinputdialog

* fix lint

* revert package.json
2020-01-30 23:05:29 +01:00
Atul R
0f4f0c5567
fixes qmovie breaking on error. (#370)
Adds default error handler for all event listeners
2020-01-27 20:43:52 +01:00
Atul R
626045549f
Fix/windows addon lib (#369)
* Adds libs and exp to windows addon building

* fixes refex on windows prebuilt

* 0.13.1
2020-01-25 21:52:15 +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
Atul R
7dcc329cf8
Adds plugin support for windows platform (#364)
* updates cmake file for windows plugin support

* basic exports

* minor export fixes

* rename macro

* rename export macro

* fixes build error on windows

* cleanup cmakelist

* updated headers
2020-01-22 21:15:30 +01:00
robertkruis
50c55e090e QStatusBar support. Fixes #346 (#349)
* Add QStatusBar

* Add QStatusBar signals/events

* Lint fixes
2020-01-18 11:51:45 +01:00
feng8848
8d5b3ca476 Add QSlider and other improvements (#348) 2020-01-12 23:05:33 +05:30
robertkruis
3a8f405e2d Further enhancements on the QTreeWidget and QTreeWidgetItem (#340)
* Extend QTreeWidget implementation

* Added more QTreeWidget and QTreeWidgetItem APIs

Supports itemClicked and itemChanged events and several APIs to be able to edit columns of the QTreeWidgetItem

* Incorporate suggested changes

* Implemented all QTreeWidget signals

* fix currentItem

* lint fix

Co-authored-by: Atul R <atulanand94@gmail.com>
2020-01-11 12:29:46 +05:30
blncd2020
a8796c9c60 Additional documentation and code examples (#339)
* additional documentation and code examples

* Update QTabWidget.ts

* Update QTableWidget.ts

* Update QTableWidgetItem.ts

* Update QTreeWidget.ts

* Update QTreeWidgetItem.ts

* Update QTreeWidget.ts

* Fixup doc comments

* fix nodedialog

* fix abstract class docs

* lint fix

* Adds QFileDialog

* Adds QGroupBox

* Adds qmessagebox, qpainter and qgroupbox

* adds link to advanced qpainter example

* Adds qtablewidget qstackedwidget and qtoolbutton

* Adds Qtreewidget docs

Co-authored-by: Atul R <atulanand94@gmail.com>
2020-01-10 11:10:25 +05:30
mspencer92
6b92bc5676 Add QButtonGroup (#336)
* Added QButtonGroup

* Update

* Update

* Update demo.ts

* Updates

Changed buttonClicked for QButtonGroup to return the id of the button and updated the demo.

* Update QButtonGroup.ts

* Format main.cpp

* Fixes button qgroups

Co-authored-by: Atul R <atulanand94@gmail.com>
2020-01-08 21:18:27 +05:30
feng8848
5d6806fe7d Add DateTime related Class (#332) 2020-01-06 20:06:37 +05:30
mspencer92
fd270c18ac Added QMessageBox (#326)
* Added QMessageBox

* Adds Qdialog

* Fixes inheritance and adds pointer based event listener

* Cleans up Qmessagebox so that we create all buttons

* change to abstract button

* fix rawData fetching from the template

* formatting fixes

* change to Objectwrap for better type casting

* Adds Native element part in qpushbutton

* Adds NapiExternal check and use ptr for initialization

* Adds all button classes

* fix c

* fix merge conflicts

* lint fix

Co-authored-by: Atul R <atulanand94@gmail.com>
2020-01-05 15:53:49 +05:30
feng8848
f409eeb7b0 Add QListWidget Support (#320) 2019-12-31 20:42:01 +05:30
slidinghotdog
9fada0e168 Move QColor from QtCore to QtGui (#311)
* Change QColor from QtCore to QtGui

* lint
2019-12-29 10:41:43 +05:30
slidinghotdog
609e243866 Add QFont and change QAction.setFont() to accept QFont (#309)
* Add QFont and change QAction.setFont() to accept QFont

* fix constructor

* fix .fromQVariant()
2019-12-29 09:55:33 +05:30
slidinghotdog
96e7799988 add font to QAction (#307)
* add font to QAction

* lint
2019-12-29 00:04:10 +05:30
Atul R
649db6688a
Changes to QOBJECT from eventwidget (#304) 2019-12-26 19:43:26 +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
slidinghotdog
d238f4f3e8 Add insertWidget to QBoxLayout and stretch arg (#286)
* sync upstream

* Add insertWidget to QBoxLayout and stretch arg
2019-12-20 18:20:32 +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
Atul R
4f41d3b12f
Cleanup and adds QColor, QPoint methods and test cases (#284)
* add more methods to qcolor, qpoint and add test cases and lint

* fix lint
2019-12-19 22:01:50 +05:30
mspencer92
43d4ad7218 QPainter (#279)
* QPainter

* QPainter

* QPoint
drawConvexPolygon for QPainter

* QPoint
drawConvexPolygon for QPainter

* Added in QColor and expanded on the demo.

* Added some functions to QPainter and expanded on the demo.

* Expanded on the demo.

* Update package.json

* Update qcolor_wrap.h
2019-12-19 20:05:26 +05:30
Atul R
4a88933eb2
wip (#280) 2019-12-18 20:01:28 +05:30
Atul R
c90b2cb3ce
QTreeWidget PR (#277)
* Added the beginning of QTreeWidget and QTreeWidgetItem

* Fixed garbage collection

* Fixed garbage collection

* Rewrote the constructor for QTreeWidgetItem

* Code cleanup

* Fixed up the QTreeWidgetItem constructor to accept only a string list of columns. Code cleanup

* Add setHeaderHidden to QTreeWidget

* Started adding signals to QTreeWidget

* Started adding signals to QTreeWidget

* Started adding signals to QTreeWidget

* Added TreeWidget back to main.cpp

* Added more functions to QTreeWidgetItem and QPlainTextEdit

* linting and cleanup

* parenting fix

* Fixes garbage collection for treewidget items
2019-12-18 17:36:44 +05:30
Atul R
7d33f25040
Adds itemData and icon and bulk clear to combobox (#276) 2019-12-17 23:59:28 +05:30
Atul R
a593c53116
Throttle flex layout calculation calls to improve performance (#268)
* Throttling multiple calls to setGeometry

* Lint
2019-12-15 23:36:04 +05:30
feng8848
6c92f02edd Add QToolButton Mainly (#265) 2019-12-15 21:19:01 +05:30
slidinghotdog
a59e8b5e2e Qtablewidget rebase (#264)
* sync upstream

* Initial tablewidget

* methods from tableview and signals

* remove comment in CMakeLists

* inherits from QAbstractScrollArea

* revert demo
2019-12-14 09:27:34 +05:30
feng8848
19f786a0f1 Add font support (#261)
* Add font support

* Update qfontdatabase_wrap.h

* Update qfontdatabase_wrap.cpp

* Update QFontDatabase.ts

* make static method
2019-12-12 19:16:49 +05:30
Maksim Karelov
9cb47c7d8a Add stack-related methods to QWidget (#262)
- `activateWindow`
- `raise`
- `lower`
2019-12-12 14:27:21 +05:30
Maksim Karelov
16b9bc5585 Add signals to QSystemTrayIcon (#258)
* Add signals to QSystemTrayIcon

- `activated(QSystemTrayIcon::ActivationReason reason)`
- `messageClicked()`

* Fix `QSystemTrayIconActivationReason` export
2019-12-11 13:12:04 +05:30
slidinghotdog
4703dd4d27 Add QFileDialog (#256)
* Add QFileDialog

* fix missing return types
2019-12-09 20:11:00 +01:00
Atul R
f8c9557166
Feature/bug fixes (#254)
* cleanup

* Check for preventing double addition due to the way reconciler works

* set scrollarea as resizeable by default
2019-12-08 20:55:13 +01:00
slidinghotdog
a3aa6ea44a add addItems() and insertItems() to QComboBox (#253) 2019-12-08 19:25:59 +01:00
feng8848
32a1b97012 Add QGroupBox (#251) 2019-12-07 18:29:17 +01:00
slidinghotdog
ed84031fbb Add QComboBox (#250)
* Add QComboBox

* clean ts file
2019-12-07 11:37:55 +01:00
Bundyo (Kamen Bundev)
a8cc7d9441 Add style() getter in QApplication (#249)
Add minimal QStyle implementation with just pixelMetric getter
 (allow getting the scrollbars width)
2019-12-05 23:08:54 +01:00
Bundyo (Kamen Bundev)
98be88f8ae Add QStackedWidget (for page style navigation) (#245)
* Add possibility to set row, col, rowSpan, colSpan in QGridLayout's addWidget
Add QStackedWidget

* Add .idea to .gitignore

* Lint fixes

* Update Yoga configuration
2019-12-04 18:57:59 +01:00
Atul R
8cf93ec241
Add QBoxLayout (#239)
* Add QBoxLayout

* remove unused imports from demo

* add layout prop to QBoxLayout
2019-12-04 10:54:30 +01:00
Atul R
bae4776747
Fixes dynamic layout sizes after widget show (#241)
* handles most cases

* Works with every edge case
Works similar to QGridLayout

* performance fix

* Adds calculate to sizehint
2019-12-04 00:21:47 +01:00
slidinghotdog
3c36226b71 Add QBoxLayout 2019-12-03 02:02:51 -03:00
Atul R
6e6495f948
Load image from buffer, QMovie and QRect (#232)
* Adds qpixmap load from data

* Adds basic qrect and qmovie

* Adds more methods to QMovie and QLabel

* Adds QMovie, QRect and qlabel methods

* Adds custom method load from data to load from buffer easily

* Adds loading from buffer for qmovie
2019-11-29 00:39:35 +01:00
Atul R
0ed44e458e
Adds fix for Qt bug where Qt fails to recognise a default font. In that case set the default font to Sans serif (#229) 2019-11-27 09:48:16 +01:00
Atul R
0b68f8586c
remove spdlog as a dependency (#226)
* cleans up spdlog everywhere except

* removes all usage of spdlog

* removed spdlog dependency
2019-11-26 19:39:52 +01:00
Atul R
2b2d83d0a6
Mainwindow takeCentralWidget (#225)
* Adds takeCentralWidget to qmainwindow

* lint fix

* bump version to 0.6.7
2019-11-26 01:00:53 +01:00
Atul R
22c7acd74e
Methods and exports needed for Webview support (#217)
* Adds basic qurl support

* allows building with custom qt installation using the env variable

* cleans up

* cleanup
2019-11-24 23:05:53 +01:00
Atul R
6ac7303e16
Adds automatic test and linting on pull requests for nodegui (#215)
* adds test action

* make c++11 mandatory

* fix

* fix

* fix broken tests in windows

* upgrade qode to 1.0.6

* Fixes recursive hell for layouts

* adds cross env for windows

* change to pull request
2019-11-22 23:43:54 +01:00
Atul R
cce917681f
Bug fixes: Flexlayout. Fixes layout issues (#211)
* bump version

* Fixes size control for the flex layout

* Bumps version
2019-11-22 00:02:49 +01:00
Atul R
97c67219e2
Adds Abstract button - QPushbutton, checkbox and radiobutton methods and tests (#206)
* Adds QAbstract button and related methods to QPushbutton, checkbox and radiobutton
Also adds QIcon to QVariant

* Adds iconSize to abstract button
2019-11-19 01:27:26 +01:00
Atul R
11ff1be321
Fixes sizepolicies for FlexLayout. (#205)
* update package.lock

* Fixes the flexlayout to follow sizehints by yoga.

* fix lint
2019-11-19 00:07:18 +01:00
Atul R
edcdbb510e
Adds dynamic content support for flex layout. (#199)
* layout performance fix

* adjust size, webdefaults

* Add flexlayout owner to the context

* revert

* reorders setlayout and setflexnode

* add defaults

* fix mainwindow rootNode

* properties to methods

* Adds defaultsAdds flexutils  measurewidget

* introduce configure for all types of nodes.

* lint fix

* Revams flexlayout to handle dynamic content

* Adds dynamic layout support for flex layout.

* lint fix

* fix few code updates
2019-11-18 00:52:29 +01:00
Pepijn
b9ca846835 QMouseEvent() wrapper (#197)
* ADDS initial support for wrapping native events in  QMouseEvent()

only x, y and button are wrapped

* ADDS global coordinates

Cleanup
2019-11-17 08:26:46 +01:00
Atul R
9e667c7a86
Adds qobject props to all layouts (#196) 2019-11-12 20:49:35 +01:00
Atul R
68c910d107
Fixes critical memory leak (#195) 2019-11-12 00:43:45 +01:00
Atul R
e3667c0bbd
Adds QSize and few more test cases for pixmap, qsize and qvariant (#194)
* Adds qsize, qvariant adn qpixmap testcases

* lint
2019-11-11 22:51:15 +01:00
Mikko Sairio
cd7906710a Feature/key events (#188)
* Added key property to QKeyEvent

* Custom handling for KeyPress and KeyRelease events

* Added modifiers, count, isAutoRepeat to QKeyEvent

* Fixed typings

* Revereted eventwidget.cpp redundant changes
2019-11-10 21:20:35 +01:00
Atul R
ece01d3803
Add qvariant object translation (#189)
* working - translation of any wrapped object

* clang format

* Adds QVariant and Qbject property. Also adds QPixmap fromQVariant

* fixes breaking test cases

* Adds build to prepush hook aswell
2019-11-10 20:48:41 +01:00
Mikko Sairio
88cd9d430f Added echoMode to QLineEdit (#187) 2019-11-10 16:29:59 +01:00
Atul R
21e5e78876
Add qvariant object translation (#185)
* working - translation of any wrapped object

* clang format
2019-11-10 12:30:26 +01:00
Atul R
95cdcb37be
Adds QObject exports (#184)
* Adds QObject wrapper

* disable source map in the dist since its of no use

* rename to nodeobject

* Adds qobject setProperty and auto conversion of napi to qvariant (mvp version)

* fix

* moved qobject methods to qobject from qwidget

* added qobject test cases
2019-11-10 01:04:37 +01:00
Atul R
87886aeec9
fix clang-format warning (#183) 2019-11-09 00:07:55 +01:00
Atul R
382f2d7da6
Changes unique_ptr to qpointer for qobjects since they can be managed by other parent objects. This fixes double memory free. (#182) 2019-11-09 00:05:25 +01:00
Atul R
3c57b550df
Bump yoga to 1.18.0 and typescript to 3.7.2 (#181)
* Updates yoga to v1.18.0

* Testing the flex layout a bit
2019-11-08 21:10:02 +01:00
Atul R
bd65329641
Adds linters, code formatters for both js and c++ and adds prepush hook (#178) 2019-11-08 19:30:01 +01:00
Dimitar Nestorov
ca2977f3e3 Added a center method on QMainWindow (#175)
Closes #134
2019-11-03 20:11:04 +01:00
Atul R
20a23cb8ba Adds few methods to scroll area and qlabel 2019-11-03 20:06:42 +01:00
Dimitar Nestorov
0c4fabfa85 Added isSeparator and setSeparator to QAction 2019-11-01 21:59:09 +02:00
Dimitar Nestorov
576ba1ace6 Implemented QAction checkable and checked (#159) 2019-10-27 10:41:16 +01:00
Dimitar Nestorov
bd1c334722 Added QIcon isMask and setIsMask (#157) 2019-10-26 23:55:37 +02:00
Atul R
cb535e33e7
Adds support for keyboard shortcuts, systray menu and systray actions (now run nodegui apps as a service). (#156)
* Added actions and tooltips to qmenu

* Adds support for nested submenu creation

* Added supported for onclick handlers in actions

* Adds support for keyboard shortcuts

* adds enabled and shortcut context

* Adds support for shortcuts and menus

* Added support for keyboard shortcuts
2019-10-26 15:31:02 +02:00
Atul R
2541feebe7
fixes the crash on keyevent (#155) 2019-10-24 19:34:27 +02:00
Atul R
36329a44b3
Experimental menu and tests (#139)
* Adds basic tests for window and label

* Adds few test cases for QWidget

* Adds working tests setup

* Adds inital code for menus
2019-10-07 19:24:17 +02:00
Sebastián Gurin
4d617c9321 inherits (#125) 2019-09-30 21:33:30 +02:00
Sebastián Gurín
e29c0c1814 qpixmap save() 2019-09-29 02:03:48 -03:00
soonoo
c284558886 Changes QSystemTrayIcon to inherit EventWidget instead of NodeWidget 2019-09-25 12:18:57 +09:00
soonoo
22498953ba Adds basic support for QSystemTrayIcon 2019-09-25 01:09:09 +09:00
Atul R
e87485441e Adds include and linkings for plugins 2019-09-22 14:24:46 +02:00
Atul R
a287d9ca59 separates include headers and implementation 2019-09-21 22:53:25 +02:00