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

messagelist

  • MessageList
  • Core
  • OptionSet
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MessageList::Core::OptionSet Class Referenceabstract

#include <optionset.h>

Inheritance diagram for MessageList::Core::OptionSet:
Inheritance graph
[legend]

Public Member Functions

 OptionSet ()
 
 OptionSet (const OptionSet &src)
 
 OptionSet (const QString &name, const QString &description, bool readOnly=false)
 
virtual ~OptionSet ()
 
const QString & description () const
 
void generateUniqueId ()
 
const QString & id () const
 
bool loadFromString (const QString &data)
 
const QString & name () const
 
bool readOnly () const
 
QString saveToString () const
 
void setDescription (const QString &description)
 
void setName (const QString &name)
 
void setReadOnly (bool b)
 

Protected Member Functions

virtual bool load (QDataStream &s)=0
 
virtual void save (QDataStream &s) const =0
 

Protected Attributes

QString mDescription
 
QString mId
 
QString mName
 
bool mReadOnly
 

Detailed Description

A set of options that can be applied to the MessageList in one shot.

In the sources and in the user interface you can find this set of options referred also as "View Mode" or "Preset".

The option set has a name and an unique id that identifies it. The name is shown to the user in the combo box above the message list view. The set has also a description that is shown as tooltip and should explain the purpose, the best usage cases, eventually the advantages and disadvantages.

The option set can be "packed" to a string and "unpacked" from a string. This is basically for storing it in a configuration file.

Definition at line 47 of file optionset.h.

Constructor & Destructor Documentation

OptionSet::OptionSet ( )
explicit

Definition at line 36 of file optionset.cpp.

OptionSet::OptionSet ( const OptionSet &  src)
explicit

Definition at line 42 of file optionset.cpp.

OptionSet::OptionSet ( const QString &  name,
const QString &  description,
bool  readOnly = false 
)
explicit

Definition at line 47 of file optionset.cpp.

OptionSet::~OptionSet ( )
virtual

Definition at line 53 of file optionset.cpp.

Member Function Documentation

const QString& MessageList::Core::OptionSet::description ( ) const
inline

Returns a description of this option set.

Ideally it should contain its purpose and what to expect from it. But in the end we'll show whatever the user will put in here.

Definition at line 88 of file optionset.h.

void OptionSet::generateUniqueId ( )

(Re)generates a (hopefully) unique identifier for this option set.

Please note that this function is reserved to this class and to Configure*Dialog instances which need it for cloning option sets. You shouldn't need to call it.

Definition at line 57 of file optionset.cpp.

const QString& MessageList::Core::OptionSet::id ( ) const
inline

Returns the unique id of this OptionSet.

The id can't be set. It's either automatically generated or loaded from configuration.

Definition at line 66 of file optionset.h.

virtual bool MessageList::Core::OptionSet::load ( QDataStream &  s)
protectedpure virtual

Loads the inner contents of this option set from the specified data stream.

The implementation of this method MUST be provided by derived classes and must return true in case of success and false in case of load failure.

Implemented in MessageList::Core::Theme, and MessageList::Core::Aggregation.

bool OptionSet::loadFromString ( const QString &  data)

Attempts to unpack this configuration object from a string (that is likely to come out from a config file).

Returns true if the string was in a valid format and the load operation succeeded, false otherwise.

Definition at line 86 of file optionset.cpp.

const QString& MessageList::Core::OptionSet::name ( ) const
inline

Returns the name of this OptionSet.

Definition at line 72 of file optionset.h.

bool MessageList::Core::OptionSet::readOnly ( ) const
inline

Definition at line 118 of file optionset.h.

virtual void MessageList::Core::OptionSet::save ( QDataStream &  s) const
protectedpure virtual

Saves the inner contents of this option set to the specified data stream.

The implementation of this method MUST be provided by derived classes.

Implemented in MessageList::Core::Theme, and MessageList::Core::Aggregation.

QString OptionSet::saveToString ( ) const

Packs this configuration object into a string suitable for storing in a config file.

Definition at line 64 of file optionset.cpp.

void MessageList::Core::OptionSet::setDescription ( const QString &  description)
inline

Sets the description for this option set.

Definition at line 94 of file optionset.h.

void MessageList::Core::OptionSet::setName ( const QString &  name)
inline

Sets the name of this OptionSet.

You must take care of specifying an unique name in order for the Manager to store the sets properly.

Definition at line 80 of file optionset.h.

void MessageList::Core::OptionSet::setReadOnly ( bool  b)
inline

Definition at line 119 of file optionset.h.

Member Data Documentation

QString MessageList::Core::OptionSet::mDescription
protected

Definition at line 58 of file optionset.h.

QString MessageList::Core::OptionSet::mId
protected

Definition at line 56 of file optionset.h.

QString MessageList::Core::OptionSet::mName
protected

Definition at line 57 of file optionset.h.

bool MessageList::Core::OptionSet::mReadOnly
protected

Definition at line 59 of file optionset.h.


The documentation for this class was generated from the following files:
  • optionset.h
  • optionset.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:32 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messagelist

Skip menu "messagelist"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

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

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