CalendarSupport::PrintPlugin

Search for usage in LXR

CalendarSupport::PrintPlugin Class Referenceabstract

#include <printplugin.h>

Inheritance diagram for CalendarSupport::PrintPlugin:

Public Types

using List = QList<PrintPlugin *>
 

Public Member Functions

QWidgetconfigWidget (QWidget *w)
 
virtual QWidgetcreateConfigWidget (QWidget *)=0
 
virtual QPageLayout::Orientation defaultOrientation () const
 
virtual QString description () const =0
 
virtual void doLoadConfig ()
 
virtual void doPrint (QPrinter *printer)=0
 
virtual void doSaveConfig ()
 
virtual bool enabled () const
 
virtual QString groupName () const =0
 
virtual QString info () const =0
 
virtual void readSettingsWidget ()
 
virtual KCalendarCore::Incidence::List selectedIncidences () const
 
virtual void setCalendar (const KCalendarCore::Calendar::Ptr &cal)
 
virtual void setConfig (KConfig *cfg)
 
virtual void setDateRange (const QDate &from, const QDate &to)
 
virtual void setSelectedIncidences (const KCalendarCore::Incidence::List &inc)
 
virtual void setSettingsWidget ()
 
virtual int sortID () const
 

Protected Attributes

KCalendarCore::Calendar::Ptr mCalendar
 
KConfigmConfig = nullptr
 
QPointer< QWidgetmConfigWidget
 
QDate mFromDate
 
QPrintermPrinter = nullptr
 
KCalendarCore::Incidence::List mSelectedIncidences
 
QDate mToDate
 

Detailed Description

Base class for Calendar printing classes.

Each sub class represents one calendar print format.

Definition at line 42 of file printplugin.h.

Member Typedef Documentation

◆ List

Definition at line 52 of file printplugin.h.

Constructor & Destructor Documentation

◆ PrintPlugin()

CalendarSupport::PrintPlugin::PrintPlugin ( )
inline

Definition at line 45 of file printplugin.h.

Member Function Documentation

◆ configWidget()

QWidget * CalendarSupport::PrintPlugin::configWidget ( QWidget * w)
inline

Definition at line 108 of file printplugin.h.

◆ createConfigWidget()

virtual QWidget * CalendarSupport::PrintPlugin::createConfigWidget ( QWidget * )
pure virtual

◆ defaultOrientation()

virtual QPageLayout::Orientation CalendarSupport::PrintPlugin::defaultOrientation ( ) const
inlinevirtual

Orientation of printout.

Default is Portrait. If your plugin wants to use some other orientation as default (e.g. depending on some config settings), implement this function in your subclass and return the desired orientation.

Definition at line 132 of file printplugin.h.

◆ description()

virtual QString CalendarSupport::PrintPlugin::description ( ) const
nodiscardpure virtual

Returns short description of print format.

◆ doLoadConfig()

virtual void CalendarSupport::PrintPlugin::doLoadConfig ( )
inlinevirtual

Load complete configuration.

Each implementation calls its parent's implementation to load parent configuration options, then loads its own.

Reimplemented in CalendarSupport::CalPrintPluginBase.

Definition at line 141 of file printplugin.h.

◆ doPrint()

virtual void CalendarSupport::PrintPlugin::doPrint ( QPrinter * printer)
pure virtual

Actually do the printing.

Implemented in CalendarSupport::CalPrintPluginBase.

◆ doSaveConfig()

virtual void CalendarSupport::PrintPlugin::doSaveConfig ( )
inlinevirtual

Save complete configuration.

Each implementation saves its own configuration options, then calls its parent's implementation to save parent options.

Reimplemented in CalendarSupport::CalPrintPluginBase.

Definition at line 150 of file printplugin.h.

◆ enabled()

virtual bool CalendarSupport::PrintPlugin::enabled ( ) const
inlinenodiscardvirtual

Returns true if the plugin should be enabled; false otherwise.

Definition at line 103 of file printplugin.h.

◆ groupName()

virtual QString CalendarSupport::PrintPlugin::groupName ( ) const
nodiscardpure virtual

Returns KConfig group name where store settings.

◆ info()

virtual QString CalendarSupport::PrintPlugin::info ( ) const
nodiscardpure virtual

Returns long description of print format.

◆ readSettingsWidget()

virtual void CalendarSupport::PrintPlugin::readSettingsWidget ( )
inlinevirtual

Read settings from configuration widget and apply them to current object.

Definition at line 158 of file printplugin.h.

◆ selectedIncidences()

virtual KCalendarCore::Incidence::List CalendarSupport::PrintPlugin::selectedIncidences ( ) const
inlinenodiscardvirtual

Definition at line 69 of file printplugin.h.

◆ setCalendar()

virtual void CalendarSupport::PrintPlugin::setCalendar ( const KCalendarCore::Calendar::Ptr & cal)
inlinevirtual

Definition at line 59 of file printplugin.h.

◆ setConfig()

virtual void CalendarSupport::PrintPlugin::setConfig ( KConfig * cfg)
inlinevirtual

Definition at line 54 of file printplugin.h.

◆ setDateRange()

virtual void CalendarSupport::PrintPlugin::setDateRange ( const QDate & from,
const QDate & to )
inlinevirtual

Set date range which should be printed.

Definition at line 172 of file printplugin.h.

◆ setSelectedIncidences()

virtual void CalendarSupport::PrintPlugin::setSelectedIncidences ( const KCalendarCore::Incidence::List & inc)
inlinevirtual

Definition at line 64 of file printplugin.h.

◆ setSettingsWidget()

virtual void CalendarSupport::PrintPlugin::setSettingsWidget ( )
inlinevirtual

Set configuration widget to reflect settings of current object.

Definition at line 165 of file printplugin.h.

◆ sortID()

virtual int CalendarSupport::PrintPlugin::sortID ( ) const
inlinevirtual

Returns the sort ID of the plugin.

This value will be used to identify the config widget in the widget stack, and to sort the plugin name in the print style selection list. If another plugin uses the same ID or a value of -1 is returned, a unique (negative) ID will be automatically generated and thus the position of the plugin in the selection list is undefined.

Definition at line 95 of file printplugin.h.

Member Data Documentation

◆ mCalendar

KCalendarCore::Calendar::Ptr CalendarSupport::PrintPlugin::mCalendar
protected

Definition at line 187 of file printplugin.h.

◆ mConfig

KConfig* CalendarSupport::PrintPlugin::mConfig = nullptr
protected

Definition at line 189 of file printplugin.h.

◆ mConfigWidget

QPointer<QWidget> CalendarSupport::PrintPlugin::mConfigWidget
protected

Definition at line 183 of file printplugin.h.

◆ mFromDate

QDate CalendarSupport::PrintPlugin::mFromDate
protected

Definition at line 179 of file printplugin.h.

◆ mPrinter

QPrinter* CalendarSupport::PrintPlugin::mPrinter = nullptr
protected

The printer object.

This will only be available in the doPrint method of the selected plugin

Definition at line 186 of file printplugin.h.

◆ mSelectedIncidences

KCalendarCore::Incidence::List CalendarSupport::PrintPlugin::mSelectedIncidences
protected

Definition at line 188 of file printplugin.h.

◆ mToDate

QDate CalendarSupport::PrintPlugin::mToDate
protected

Definition at line 180 of file printplugin.h.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:13:02 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.