@nodegui/nodegui
Advanced tools
Comparing version 0.0.13 to 0.1.0
@@ -5,40 +5,40 @@ "use strict"; | ||
const win = new index_1.QMainWindow(); | ||
//------------------------------- | ||
const centralWidget = new index_1.QWidget(); | ||
centralWidget.setObjectName("myroot"); | ||
const rootLayout = new index_1.FlexLayout(); | ||
centralWidget.setLayout(rootLayout); | ||
const view = new index_1.QWidget(); | ||
const viewLayout = new index_1.FlexLayout(); | ||
view.setInlineStyle(`margin-top:20px; background: url(${"/Users/atulr/Downloads/photo.jpeg"});`); | ||
view.setLayout(viewLayout); | ||
//-------------------------------------- | ||
const label = new index_1.QLabel(); | ||
label.setObjectName("mylabel"); | ||
label.setText("Hello World"); | ||
const btn = new index_1.QPushButton(); | ||
btn.setText("Yo button"); | ||
btn.setObjectName("btn"); | ||
//-------------------------------------- | ||
viewLayout.addWidget(label); | ||
viewLayout.addWidget(btn); | ||
rootLayout.addWidget(view); | ||
win.setCentralWidget(centralWidget); | ||
const winStyleSheet = ` | ||
#mylabel { | ||
font-size: 16px; | ||
font-weight: bold; | ||
margin-top: 40px; | ||
label.setText("Hello world 🧙"); | ||
label.setInlineStyle("font-size: 20px;"); | ||
const checkbox = new index_1.QCheckBox(); | ||
checkbox.setText("Check me out?"); | ||
checkbox.setObjectName("check"); | ||
const lineEdit = new index_1.QLineEdit(); | ||
lineEdit.setPlaceholderText("Enter your thoughts here"); | ||
lineEdit.setObjectName("editable"); | ||
const button = new index_1.QPushButton(); | ||
button.setText("Push Push Push!"); | ||
button.setObjectName("btn"); | ||
const progressbar = new index_1.QProgressBar(); | ||
const radioButton = new index_1.QRadioButton(); | ||
radioButton.setText("Roger that!"); | ||
const rootView = new index_1.QWidget(); | ||
rootView.setObjectName("root"); | ||
rootView.setLayout(new index_1.FlexLayout()); | ||
if (rootView.layout) { | ||
rootView.layout.addWidget(label); | ||
rootView.layout.addWidget(checkbox); | ||
rootView.layout.addWidget(radioButton); | ||
rootView.layout.addWidget(lineEdit); | ||
rootView.layout.addWidget(button); | ||
rootView.layout.addWidget(progressbar); | ||
} | ||
win.setCentralWidget(rootView); | ||
win.setStyleSheet(` | ||
#root { | ||
flex: 1; | ||
height: '100%'; | ||
align-items: 'center'; | ||
justify-content: 'space-around'; | ||
} | ||
#btn { | ||
margin-top: 30px; | ||
} | ||
`; | ||
win.setStyleSheet(winStyleSheet); | ||
`); | ||
win.resize(400, 400); | ||
win.show(); | ||
win.resize(400, 500); | ||
setTimeout(() => { | ||
index_1.QApplication.instance().quit(); | ||
}, 5000); | ||
global.win = win; // To prevent win from being garbage collected. | ||
//# sourceMappingURL=demo.js.map |
# Logo | ||
<img alt="logo" src="https://github.com/master-atul/nodegui/raw/master/extras/logo/logo.png" height="400" /> | ||
<img alt="logo" src="https://github.com/nodegui/nodegui/raw/master/extras/logo/logo.png" height="400" /> | ||
@@ -8,2 +8,3 @@ Special thanks to the Noun Project for the logo. | ||
The logo used for NodeGui project is a modified version of art: | ||
``` | ||
@@ -14,2 +15,1 @@ Siberian Husky by Vishwas Shetty from the Noun Project. | ||
The original can be found here: https://thenounproject.com/term/husky/214148/ | ||
{ | ||
"name": "@nodegui/nodegui", | ||
"version": "0.0.13", | ||
"version": "0.1.0", | ||
"description": "A cross platform library to build native desktop apps.", | ||
@@ -29,3 +29,3 @@ "main": "dist/src/lib/index.js", | ||
"dependencies": { | ||
"@nodegui/test": "^0.0.10", | ||
"@nodegui/qode": "^1.0.0", | ||
"bindings": "^1.5.0", | ||
@@ -39,3 +39,2 @@ "cuid": "^2.1.6", | ||
"@types/bindings": "^1.3.0", | ||
"@types/lodash": "^4.14.130", | ||
"@types/node": "^12.0.2", | ||
@@ -42,0 +41,0 @@ "prettier": "^1.17.1", |
@@ -1,38 +0,56 @@ | ||
# nodegui | ||
# NodeGUI | ||
A cross platform library to build native desktop apps. Based on Qt5. | ||
Build **performant**, **native** and **cross-platform** desktop applications with **JavaScript** + powerful **CSS like styling**.🚀 | ||
<img alt="logo" src="https://github.com/master-atul/nodegui/raw/master/extras/logo/nodegui.png" height="200" /> | ||
NodeGUI is powered by **Qt5** 💚 which makes it CPU and memory efficient as compared to other chromium based solutions like electron. | ||
If you are looking for React based version, check out: [NodeGUI React Desktop](https://github.com/nodegui/react-desktop). | ||
Visit: https://nodegui.github.io/nodegui for docs. | ||
<img alt="logo" src="https://github.com/nodegui/nodegui/raw/master/extras/logo/nodegui.png" height="200" /> | ||
## How does it look? | ||
<div style="display:inline; margin: 0 auto;"> | ||
<img alt="demo_linux" src="https://github.com/master-atul/nodegui/raw/master/examples/calculator/calculator_linux.png" height="300" /> | ||
<img alt="demo_win" src="https://github.com/master-atul/nodegui/raw/master/examples/calculator/calculator_win.jpg" height="300" /> | ||
<img alt="demo_mac" src="https://github.com/master-atul/nodegui/raw/master/examples/calculator/calculator_mac.png" height="300" /> | ||
<img alt="demo_linux" src="https://github.com/nodegui/nodegui/raw/master/examples/calculator/calculator_linux.png" height="280" /> | ||
<img alt="demo_win" src="https://github.com/nodegui/nodegui/raw/master/examples/calculator/calculator_win.jpg" height="280" /> | ||
<img alt="demo_mac" src="https://github.com/nodegui/nodegui/raw/master/examples/calculator/calculator_mac.png" height="280" /> | ||
</div> | ||
<div style="display:inline; margin: 0 auto;"><img alt="kitchen" src="https://github.com/nodegui/nodegui/raw/master/extras/assets/kitchen.png" height="280" /><img alt="demo_mac" src="https://github.com/master-atul/react-desktop/raw/master/examples/weather-app-widget/weather_widget_mac.png" height="280" /><img alt="demo_win" src="https://github.com/master-atul/react-desktop/raw/master/examples/image-view/image_view_win.jpg" height="280" /> | ||
</div> | ||
**More screenshots?** | ||
[See examples](https://github.com/master-atul/nodegui/tree/master/examples/) | ||
[See examples](https://github.com/nodegui/nodegui/tree/master/examples/) | ||
[See React based examples](https://github.com/nodegui/react-desktop/tree/master/examples/) | ||
## Features | ||
- [x] Cross platform. Should work on major Linux flavours, Windows and MacOS | ||
- [x] Low CPU and memory footprint. Current CPU stays at 0% on idle and memory usage is under 20mb for a hello world program. | ||
- 🧬 Cross platform. Should work on major Linux flavours, Windows and MacOS | ||
- 📉 Low CPU and memory footprint. Current CPU stays at 0% on idle and memory usage is under 20mb for a hello world program. | ||
- 💅 Styling with CSS (includes actual cascading). Also has full support for Flexbox layout (thanks to Yoga). | ||
- ✅ Complete Nodejs api support (Currently runs on Node v12.x - and is easily upgradable). Hence has access to all nodejs compatible npm modules. | ||
- 🎪 Native widget event listener support. supports all event available from Qt / NodeJs. | ||
- 💸 Can be used for Commercial applications. | ||
- 🕵️♂️ Good Devtools support. | ||
- 📚 Good documentation and website. | ||
- 🧙♂️ Good documentation for contributors. | ||
- 🦹🏻♀️ Good support for dark mode (Thanks to QT). | ||
- 🏅First class Typescript support. (Works on regular JS projects too 😉). | ||
## Current focus: | ||
- [ ] (Partial support is present) Easily exstensible for creating custom native widgets (like react native). | ||
- [x] Support for flex box layouting using Yoga. | ||
- [x] Supports styling using css (includes actual cascading) or atleast useful subset of css properties. | ||
- [x] Complete Nodejs api support (Currently runs on Node v12 - and is easily upgradable). | ||
- [x] Can use all node compatible npm modules. | ||
- [x] Native widget event listener support. | ||
- [x] Should be usable for commercial applications aswell. | ||
- [ ] (Partial) Should have a decent list of stylable native widgets. | ||
- [ ] Easy build and packaging process. | ||
- [ ] Good Devtools support (hot reload, live reload, debugging etc). | ||
- [x] Good documentation and website. | ||
- [x] Good documentation for contributors. | ||
- [x] Good support for dark mode (Thanks to QT). | ||
- [x] Typescript support | ||
## Getting Started | ||
- Check out [nodegui-starter](https://github.com/nodegui/nodegui-starter) to get up and running with your own React Desktop app! | ||
- Read through the [docs](https://nodegui.github.io/nodegui) | ||
## Docs for contributing | ||
@@ -44,20 +62,16 @@ | ||
https://github.com/master-atul/nodegui/tree/master/docs/development | ||
https://github.com/nodegui/nodegui/tree/master/docs/development | ||
## Building | ||
`yarn rebuild:addon [--qt_home_dir=/path/to/qt]` | ||
`npm run build [--qt_home_dir=/path/to/qt]` | ||
### LICENSE | ||
``` | ||
Since we do not in any way modify the code of Qt and only link to it dynamically, I beleive we are in compliance with the LGPL license requirements of QT. And hence this library can be licensed under its own License (for which we have chosen MIT License). | ||
The links to QT source code and appropriate license notices are attached. We try our best to abide by the software licenses and any non compliance is not by will. If there is some discrepancy please let us know in the issues and we will try and fix it up. | ||
If you follow the recommended build steps and do not statically link QT libraries on your own you are safe to use this library for commerical puropses (provided you abide by MIT License). | ||
``` | ||
MIT | ||
# TODO | ||
## Note | ||
- Make https://github.com/nodegui/nodegui-starter | ||
> Since we do not in any way modify the code of Qt and only link to it dynamically, I beleive we are in compliance with the LGPL license requirements of QT. And hence this library can be licensed under its own License (for which we have chosen MIT License). | ||
> The links to QT source code and appropriate license notices are attached. We try our best to abide by the software licenses and any non compliance is not by will. If there is some discrepancy please let us know in the issues and we will try and fix it up. | ||
> If you follow the recommended build steps and do not statically link QT libraries on your own you are safe to use this library for commerical puropses (provided you abide by MIT License). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
5
77
1
1175869
254
3839
+ Added@nodegui/qode@^1.0.0
+ Added@nodegui/qode@1.0.6(transitive)
- Removed@nodegui/test@^0.0.10
- Removed@nodegui/test@0.0.10(transitive)