• 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
NameInput Class Reference

#include <inputformatimpls.h>

Inheritance diagram for NameInput:
Inheritance graph
[legend]

Public Member Functions

virtual QString description () const
 
virtual KABC::Addressee readAddressee (std::istream &stream)
 
virtual bool setCodec (QTextCodec *codec)
 
virtual bool setOptions (const QByteArray &options)
 
- Public Member Functions inherited from InputFormat
virtual ~InputFormat ()
 
virtual QString optionUsage () const
 

Detailed Description

Input parser for people's names.

Treats a single input line as a person's name. See KABC::Addressee::setNameFromString()

Available through FormatFactory::inputFormat(), name "name"

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 197 of file inputformatimpls.h.

Member Function Documentation

QString NameInput::description ( ) const
virtual

Returns a translate description of the input format.

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

Returns
a short descriptive string what kind of input format it can handle
Note
Implementations should not include the optional settings a parser 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 InputFormat.

Definition at line 315 of file inputformatimpls.cpp.

KABC::Addressee NameInput::readAddressee ( std::istream &  stream)
virtual

Reads one addressee from the input stream.

Creates a single KABC::Addressee object from the data available in the given input stream according to the parsers formatting rules.

Parameters
streamthe standard input stream to read text from
Returns
a KABC::Addressee object containing the read data
See also
KABC::Addressee
setCodec()
std::ios_base
Note
This method is called until the stream is either at its end or gone bad, so if an implementation has more than one addressee to return it has to make sure neither of this conditions is met. If the data available in the stream is not sufficient to create an addressee according to the implementations format rules, it should return an empty object, i.e. the one creates by the Addressee class' default constructor.

Implements InputFormat.

Definition at line 342 of file inputformatimpls.cpp.

bool NameInput::setCodec ( QTextCodec *  codec)
virtual

Sets the text codec to use.

This allows to have the text read from the input stream interpreted according to a specific text encoding. Depending on the format's specifications not all technically available codecs might be valid

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

Implements InputFormat.

Definition at line 331 of file inputformatimpls.cpp.

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

Configures the input format.

Sets parser options, i.e. format specific settings that change how the input format treats the input text.

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 InputFormat.

Definition at line 323 of file inputformatimpls.cpp.


The documentation for this class was generated from the following files:
  • inputformatimpls.h
  • inputformatimpls.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