• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

console/kabcclient

Public Member Functions | List of all members
UIDOutput Class Reference

#include <outputformatimpls.h>

Inheritance diagram for UIDOutput:
Inheritance graph
[legend]

Public Member Functions

virtual QString description () const
 
virtual bool setCodec (QTextCodec *codec)
 
virtual bool setOptions (const QByteArray &options)
 
virtual bool writeAddressee (const KABC::Addressee &addressee, std::ostream &stream)
 
virtual bool writeAddresseeList (const KABC::AddresseeList &addresseeList, std::ostream &stream)
 
- Public Member Functions inherited from OutputFormat
virtual ~OutputFormat ()
 
virtual QString optionUsage () const
 

Detailed Description

Output formatter for KABC UIDs.

Writes each contact's unique identifier, one per line

Available through FormatFactory::outputFormat(), name "uid"

Author
Kevin Krammer, kevin.nosp@m..kra.nosp@m.mmer@.nosp@m.gmx..nosp@m.at
See also
Handling of various input and output formats

Definition at line 46 of file outputformatimpls.h.

Member Function Documentation

QString UIDOutput::description ( ) const
virtual

Returns a translate description of the output format.

Returns a translated description of the formatter and its general capabilities.

Returns
a short descriptive string how addressee data will be formatted
Note
Implementations should not include the optional settings a formatter understands, this is what optionUsage() is for. As the description is displayed after the format name, it is recommended to add two tabs after each newline for aligned output

Implements OutputFormat.

Definition at line 53 of file outputformatimpls.cpp.

bool UIDOutput::setCodec ( QTextCodec *  codec)
virtual

Sets the text codec to use.

This allows to have the text recoded to a specific text encoding. Depending on the format's specifications not all technically available codecs might be valid. e.g. VCards in version 3.0 are expected to be encoded in UTF-8

Warning
Always set a codec, the output formats need it!
Parameters
codecthe text encoding handler to use
Returns
true if the output format accepts this codec. i.e. can work with it reasonably. Otherwise returns false

Implements OutputFormat.

Definition at line 68 of file outputformatimpls.cpp.

bool UIDOutput::setOptions ( const QByteArray &  options)
virtual

Configures the output format.

Sets formatter options, e.g. which parts of the addressee data to use or which markup to apply.

Parameters
optionsa string as taken from the commandline
Returns
false if the options are not valid or if the input format doesn't support options. true if the options where valid
Note
Implementations can use any format in their options string. However it is recommended to stay consistent with the other format implementations and use a comma separated list

Implements OutputFormat.

Definition at line 60 of file outputformatimpls.cpp.

bool UIDOutput::writeAddressee ( const KABC::Addressee &  addressee,
std::ostream &  stream 
)
virtual

Writes the data of a given addressee to the given output stream.

Depending on the formatter and its settings it will write all or portions of the available addressee data to the stream.

Warning
a format could require either header or footer around related addressees so use this only for single addressee output, i.e. not when iterating over a list of related addressees.
Parameters
addresseethe addressee object to take data from
streamthe standard output stream to write to
Note
Implementations that do not need to handle addressee relations can of course implement the writing in this method and just call it from writeAddresseeList() when iterating over the list
See also
writeAddresseeList()
KABC::Addressee
setCodec()
std::ostream

Implements OutputFormat.

Definition at line 79 of file outputformatimpls.cpp.

bool UIDOutput::writeAddresseeList ( const KABC::AddresseeList &  addresseeList,
std::ostream &  stream 
)
virtual

Writes the data from each addressee in the given list to the given output stream.

Depending on the formatter and its settings it will write all or portions of the available addressee data to the stream.

Parameters
addresseeLista list of addressee objects
streamthe standard output stream to write to
Note
Implementations that do not need to handle each addressee differently for example numbering them, can call the writeAddressee() method on each entry of the given list
See also
writeAddressee()
KABC::Addressee
setCodec()
std::ostream

Implements OutputFormat.

Definition at line 90 of file outputformatimpls.cpp.


The documentation for this class was generated from the following files:
  • outputformatimpls.h
  • outputformatimpls.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

console/kabcclient

Skip menu "console/kabcclient"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal