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

kopete/libkopete

  • sources
  • kde-4.14
  • kdenetwork
  • kopete
  • libkopete
kopeteproperty.h
Go to the documentation of this file.
1 /*
2  kopeteproperty.h
3 
4  Kopete::Property class
5 
6  Copyright (c) 2007 by Gustavo Pichorim Boiko <gustavo.boiko@kdemail.net>
7  Copyright (c) 2004 by Stefan Gehn <metz AT gehn.net>
8  Copyright (c) 2006 by MichaĆ«l Larouche <larouche@kde.org>
9 
10  Kopete (c) 2004-2007 by the Kopete developers <kopete-devel@kde.org>
11 
12  *************************************************************************
13  * *
14  * This library is free software; you can redistribute it and/or *
15  * modify it under the terms of the GNU Lesser General Public *
16  * License as published by the Free Software Foundation; either *
17  * version 2 of the License, or (at your option) any later version. *
18  * *
19  *************************************************************************
20 */
21 
22 #ifndef _KOPETEPROPERTY_H_
23 #define _KOPETEPROPERTY_H_
24 
25 #include <QtCore/QVariant>
26 #include <QtCore/QFlags>
27 
28 #include "kopete_export.h"
29 
30 namespace Kopete
31 {
32 
41 class KOPETE_EXPORT PropertyTmpl
42 {
43  public:
44  enum PropertyOption
45  {
46  NoProperty = 0x0,
47  PersistentProperty = 0x1,
48  RichTextProperty = 0x2,
49  PrivateProperty = 0x4
50  };
51  Q_DECLARE_FLAGS(PropertyOptions, PropertyOption)
52 
53 
58  PropertyTmpl();
59 
67  PropertyTmpl( const QString &key,
68  const QString &label,
69  const QString &icon = QString(),
70  PropertyOptions options = NoProperty);
71 
75  PropertyTmpl(const PropertyTmpl &other);
76 
78  ~PropertyTmpl();
79 
80  PropertyTmpl &operator=(const PropertyTmpl &other);
81 
82  bool operator==(const PropertyTmpl &other) const;
83  bool operator!=(const PropertyTmpl &other) const;
84 
89  const QString &key() const;
90 
94  const QString &label() const;
95 
99  const QString &icon() const;
100 
104  PropertyOptions options() const;
105 
110  bool persistent() const;
111 
115  bool isRichText() const;
116 
120  bool isPrivate() const;
121 
125  static PropertyTmpl null;
126 
130  bool isNull() const;
131 
135  typedef QMap<QString, PropertyTmpl> Map;
136 
137  private:
138  class Private;
139  Private *d;
140 };
141 
142 Q_DECLARE_OPERATORS_FOR_FLAGS(PropertyTmpl::PropertyOptions)
143 
150 class KOPETE_EXPORT Property
151 {
152  public:
158  Property();
159 
164  Property(const PropertyTmpl &tmpl, const QVariant &value);
165 
169  Property(const Property &other);
170 
172  ~Property();
173 
174  Property &operator=(const Property &other);
175 
179  const PropertyTmpl &tmpl() const;
180 
184  const QVariant &value() const;
185 
189  static Property null;
190 
195  bool isNull() const;
196 
200  bool isRichText() const;
201 
205  typedef QMap<QString, Property> Map;
206 
207  private:
208  class Private;
209  Private * const d;
210 };
211 
212 } // END namespace Kopete
213 
214 #endif //_KOPETEPROPERTY_H_
KOPETE_EXPORT
#define KOPETE_EXPORT
Definition: kopete_export.h:27
Kopete::PropertyTmpl::PropertyOption
PropertyOption
Definition: kopeteproperty.h:44
QMap
Kopete::Property::Map
QMap< QString, Property > Map
A map of key,Property items.
Definition: kopeteproperty.h:205
Kopete::PropertyTmpl
Definition: kopeteproperty.h:41
kopete_export.h
QString
Kopete::Property
Definition: kopeteproperty.h:150
Kopete::Property::null
static Property null
The null, i.e.
Definition: kopeteproperty.h:189
QVariant
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

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