nodeguy/website/docs/api/generated/classes/component.md
swittk 3cb3424250
Added QMimeData, additional methods to QUrl, and Dropping should now be supported (#614)
* 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

* Added more methods to QUrl

* Added QMimeData, additional methods to QUrl, and Dropping should now be supported

* refactored

* Fixed more merge conflicts

* Is this my final merge conflict??

* All merge conflicts resolved

* All merge conflicts resolved

* Adds guide for drag and drop

* lint fix

Co-authored-by: Switt Kongdachalert <switt1995@yahoo.com>
Co-authored-by: Atul R <atulanand94@gmail.com>
2020-06-27 17:35:31 +02:00

141 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: "component"
title: "Component"
sidebar_label: "Component"
---
> Abstract class that is root most base class for all widgets and layouts in the NodeGui World.
*This class is used to add core properties to all widgets, layouts etc in NodeGui world.
Currently it helps us maintain references to the native C++ instance of the widget or layout.
It also helps in preventing gc of child elements of a layout or widget**
`Component` is an abstract class and hence no instances of the same should be created.
It exists so that we can add core functionalities to all widgets and layouts easily. This is an internal class.
Its the root base class in NodeGui world.
## Hierarchy
* **Component**
↳ [QVariant](qvariant.md)
↳ [QPixmap](qpixmap.md)
↳ [QClipboard](qclipboard.md)
↳ [QStyle](qstyle.md)
↳ [EventWidget](eventwidget.md)
↳ [QColor](qcolor.md)
↳ [QBrush](qbrush.md)
↳ [QPen](qpen.md)
↳ [QKeySequence](qkeysequence.md)
↳ [QRect](qrect.md)
↳ [QPicture](qpicture.md)
↳ [QIcon](qicon.md)
↳ [QFont](qfont.md)
↳ [QSize](qsize.md)
↳ [QCursor](qcursor.md)
↳ [QFontDatabase](qfontdatabase.md)
↳ [QUrl](qurl.md)
↳ [QMimeData](qmimedata.md)
↳ [QPoint](qpoint.md)
↳ [QModelIndex](qmodelindex.md)
↳ [QDate](qdate.md)
↳ [QTime](qtime.md)
↳ [QDateTime](qdatetime.md)
↳ [QStandardItem](qstandarditem.md)
↳ [QListWidgetItem](qlistwidgetitem.md)
↳ [QTableWidgetItem](qtablewidgetitem.md)
↳ [QTreeWidgetItem](qtreewidgetitem.md)
↳ [QPainterPath](qpainterpath.md)
↳ [QPainter](qpainter.md)
↳ [QPointF](qpointf.md)
↳ [QRectF](qrectf.md)
↳ [QSettings](qsettings.md)
## Index
### Constructors
* [constructor](component.md#constructor)
### Properties
* [native](component.md#abstract-native)
* [nodeChildren](component.md#nodechildren)
* [nodeParent](component.md#optional-nodeparent)
### Methods
* [setNodeParent](component.md#setnodeparent)
## Constructors
### constructor
\+ **new Component**(): *[Component](component.md)*
**Returns:** *[Component](component.md)*
## Properties
### `Abstract` native
**native**: *[NativeElement](../globals.md#nativeelement)*
___
### nodeChildren
**nodeChildren**: *Set[Component](component.md)*
___
### `Optional` nodeParent
**nodeParent**? : *[Component](component.md)*
## Methods
### setNodeParent
**setNodeParent**(`parent?`: [Component](component.md)): *void*
**Parameters:**
Name | Type |
------ | ------ |
`parent?` | [Component](component.md) |
**Returns:** *void*