KDDockWidgets API Documentation 2.0
|
#include <View.h>
Public Member Functions | |
View_qt (Core::Controller *controller, Core::ViewType type, QObject *thisObj) | |
~View_qt () override | |
Core::HANDLE | handle () const override |
Returns a handle for the GUI element This value only makes sense to the frontend. For example, for QtQuick it might be a QQuickItem, while for QtWidgets it's a QWidget. Can be whatever the frontend developer wants, as long as it uniquely identifies the GUI element. KDDW backend only uses it for comparison purposes. | |
void | setViewName (const QString &name) override |
Equivalent to Qt's QObject::objectProperty() | |
QObject * | thisObject () const |
virtual QVariant | viewProperty (const char *name) const |
Equivalent to Qt's QObject::property() | |
Public Member Functions inherited from KDDockWidgets::Core::View | |
View (Controller *controller, ViewType) | |
virtual | ~View () |
virtual void | activateWindow ()=0 |
template<typename T > | |
T * | asController () |
Returns the View's controller, casted as T. | |
Core::DockWidget * | asDockWidgetController () const |
Core::DropArea * | asDropAreaController () const |
Core::FloatingWindow * | asFloatingWindowController () const |
asFooController() are deprecated. Use asController<T>() instead | |
Core::Group * | asGroupController () const |
Core::Layout * | asLayout () const |
Core::MainWindow * | asMainWindowController () const |
Core::MDILayout * | asMDILayoutController () const |
Core::Stack * | asStackController () const |
Core::TabBar * | asTabBarController () const |
Core::TitleBar * | asTitleBarController () const |
virtual std::shared_ptr< View > | asWrapper ()=0 |
Returns this view, but as a wrapper. | |
virtual std::shared_ptr< View > | childViewAt (Point localPos) const =0 |
virtual Vector< std::shared_ptr< View > > | childViews () const =0 |
@Returns a list of child views | |
virtual bool | close ()=0 |
Controller * | controller () const |
Returns this view's controller. | |
virtual void | createPlatformWindow () |
bool | deliverViewEventToFilters (Event *e) |
Delivers mouse events and such to event filters. | |
void | dumpDebug () |
Prints some debug to stderr. | |
virtual void | enableAttribute (Qt::WidgetAttribute, bool enable=true)=0 |
bool | equals (const std::shared_ptr< View > &) const |
bool | equals (const View *other) const |
Returns whether this view represents the same GUI element as the other. | |
virtual Qt::WindowFlags | flags () const =0 |
virtual Qt::FocusPolicy | focusPolicy () const =0 |
virtual Rect | geometry () const =0 |
virtual void | grabMouse ()=0 |
virtual bool | hasAttribute (Qt::WidgetAttribute) const =0 |
virtual bool | hasFocus () const =0 |
int | height () const |
virtual void | hide ()=0 |
bool | inDtor () const |
Returns whether the DTOR is currently running. freed() might be true while inDtor false, as the implementation of free() is free to delay it (with deleteLater() for example) | |
virtual void | init () |
void | installViewEventFilter (EventFilterInterface *) |
Installs an event filter in this view to intercept the event it receives Analogue to QObject::installEventFilter() in the Qt world. | |
virtual bool | is (ViewType) const |
Returns whether the view is of the specified type Virtual so it can be overridden by ViewWrapper. When we're wrapping an existing GUI element only the specific frontend can know what's the actual type. | |
virtual bool | isActiveWindow () const =0 |
virtual bool | isExplicitlyHidden () const =0 |
virtual bool | isMaximized () const =0 |
virtual bool | isMinimized () const =0 |
virtual bool | isNull () const |
Returns whether the gui item represented by this view was already deleted Usually false, as KDDW internal gui elements inherit View, and nobody will access them after destruction. However, ViewWrapper derived classes, wrap an existing gui element, which might get deleted. Override isNull() in our ViewWrapper subclasses and return true if the wrapped gui element was already deleted. | |
virtual bool | isRootView () const =0 |
virtual bool | isVisible () const =0 |
virtual Point | mapFromGlobal (Point) const =0 |
virtual Point | mapTo (View *, Point) const =0 |
virtual Point | mapToGlobal (Point) const =0 |
virtual Size | maxSizeHint () const =0 |
int | minimumHeight () const |
int | minimumWidth () const |
virtual Size | minSize () const =0 |
virtual void | move (int x, int y)=0 |
void | move (Point) |
virtual Rect | normalGeometry () const =0 |
virtual bool | onFocusInEvent (FocusEvent *) |
virtual bool | onResize (int h, int w) |
bool | onResize (Size) |
virtual std::shared_ptr< View > | parentView () const =0 |
Returns the gui element's parent. Like QWidget::parentWidget() | |
Point | pos () const |
virtual void | raise ()=0 |
virtual void | raiseAndActivate ()=0 |
Rect | rect () const |
virtual void | releaseKeyboard ()=0 |
virtual void | releaseMouse ()=0 |
void | removeViewEventFilter (EventFilterInterface *) |
Removes the event filter. | |
virtual void | render (QPainter *)=0 |
void | resize (int w, int h) |
void | resize (Size) |
virtual std::shared_ptr< View > | rootView () const =0 |
Returns the top-level gui element which this view is inside It's the root view of the window. | |
Size | screenSize () const |
Returns the size of the screen that this view belongs to. | |
virtual void | setCursor (Qt::CursorShape)=0 |
virtual void | setFixedHeight (int)=0 |
virtual void | setFixedWidth (int)=0 |
virtual void | setFlag (Qt::WindowType, bool=true)=0 |
virtual void | setFocus (Qt::FocusReason)=0 |
virtual void | setFocusPolicy (Qt::FocusPolicy)=0 |
virtual void | setGeometry (Rect)=0 |
virtual void | setHeight (int height)=0 |
virtual void | setMaximumSize (Size sz)=0 |
virtual void | setMinimumSize (Size)=0 |
virtual void | setMouseTracking (bool)=0 |
virtual void | setParent (View *)=0 |
virtual void | setSize (int width, int height)=0 |
void | setSize (Size) |
virtual void | setVisible (bool)=0 |
virtual void | setWidth (int width)=0 |
virtual void | setWindowIcon (const Icon &)=0 |
virtual void | setWindowOpacity (double)=0 |
virtual void | setWindowTitle (const QString &title)=0 |
virtual void | setZOrder (int) |
Sets the z order Not supported on all platforms. | |
virtual void | show ()=0 |
virtual void | showMaximized ()=0 |
virtual void | showMinimized ()=0 |
virtual void | showNormal ()=0 |
Size | size () const |
virtual void | update ()=0 |
virtual QString | viewName () const =0 |
int | width () const |
virtual std::shared_ptr< Core::Window > | window () const =0 |
Returns the window this view is inside For the Qt frontend, this wraps a QWindow. Like QWidget::window() | |
int | x () const |
int | y () const |
Static Public Member Functions | |
static QObject * | asQObject (View *) |
Static Public Member Functions inherited from KDDockWidgets::Core::View | |
static bool | equals (const View *one, const View *two) |
static Controller * | firstParentOfType (View *view, ViewType) |
Returns the controller of the first parent view of the specified type Goes up the view hierarchy chain until it finds it. Returns nullptr otherwise. | |
static Size | hardcodedMinimumSize () |
The minimum minimum size a dock widget can have. | |
Protected Attributes | |
EventFilter *const | m_eventFilter |
QObject *const | m_thisObj |
Protected Attributes inherited from KDDockWidgets::Core::View | |
Controller *const | m_controller |
bool | m_inDtor = false |
Additional Inherited Members | |
Public Attributes inherited from KDDockWidgets::Core::View | |
Private *const | d |
Protected Member Functions inherited from KDDockWidgets::Core::View | |
View (const View &)=delete | |
View & | operator= (const View &)=delete |
Definition at line 27 of file qtcommon/View.h.
|
explicit |
Definition at line 54 of file qtcommon/View.cpp.
|
override |
Definition at line 61 of file qtcommon/View.cpp.
References m_eventFilter.
Definition at line 86 of file qtcommon/View.cpp.
Referenced by KDDockWidgets::QtQuick::asQQuickItem(), KDDockWidgets::QtQuick::Platform::screenNumberFor(), KDDockWidgets::QtQuick::Platform::screenSizeFor(), and KDDockWidgets::QtCommon::Platform_qt::sendEvent().
|
overridevirtual |
Returns a handle for the GUI element This value only makes sense to the frontend. For example, for QtQuick it might be a QQuickItem, while for QtWidgets it's a QWidget. Can be whatever the frontend developer wants, as long as it uniquely identifies the GUI element. KDDW backend only uses it for comparison purposes.
Implements KDDockWidgets::Core::View.
Definition at line 73 of file qtcommon/View.cpp.
References m_thisObj.
|
overridevirtual |
Equivalent to Qt's QObject::objectProperty()
Implements KDDockWidgets::Core::View.
Definition at line 78 of file qtcommon/View.cpp.
References m_thisObj, and QObject::setObjectName().
QObject * View_qt::thisObject | ( | ) | const |
Definition at line 68 of file qtcommon/View.cpp.
References m_thisObj.
|
inlinevirtual |
Equivalent to Qt's QObject::property()
Definition at line 50 of file qtcommon/View.h.
|
protected |
Definition at line 61 of file qtcommon/View.h.
Referenced by ~View_qt().
|
protected |
Definition at line 62 of file qtcommon/View.h.
Referenced by handle(), setViewName(), and thisObject().