DockWidgetFactoryBase

Search for usage in LXR

DockWidgetFactoryBase Class Reference

#include <DockWidgetFactoryBase.h>

Public Member Functions

 DockWidgetFactoryBase (const QString &_id, DockPosition _dockPosition)
 
DockPosition defaultDockPosition () const override
 
QString id () const override
 

Detailed Description

The DockWidgetFactoryBase class is the base class for plugins that want to add a dock widget to every window.

You do not need to implement this class yourself, but create a DockWidget implementation and then add the DockWidgetFactory to the Krita instance like this:

class HelloDocker(DockWidget):
def __init__(self):
super().__init__()
label = QLabel("Hello", self)
self.setWidget(label)
self.label = label
def canvasChanged(self, canvas):
self.label.setText("Hellodocker: canvas changed");
Application.addDockWidgetFactory(DockWidgetFactory("hello", DockWidgetFactoryBase.DockRight, HelloDocker))

Definition at line 36 of file DockWidgetFactoryBase.h.

Constructor & Destructor Documentation

◆ DockWidgetFactoryBase()

DockWidgetFactoryBase::DockWidgetFactoryBase ( const QString & _id,
DockPosition _dockPosition )

Definition at line 10 of file DockWidgetFactoryBase.cpp.

◆ ~DockWidgetFactoryBase()

DockWidgetFactoryBase::~DockWidgetFactoryBase ( )
override

Definition at line 17 of file DockWidgetFactoryBase.cpp.

Member Function Documentation

◆ defaultDockPosition()

KoDockFactoryBase::DockPosition DockWidgetFactoryBase::defaultDockPosition ( ) const
override

Definition at line 21 of file DockWidgetFactoryBase.cpp.

◆ id()

QString DockWidgetFactoryBase::id ( ) const
override

Definition at line 26 of file DockWidgetFactoryBase.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:51:16 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.