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

kopete/kopete

  • sources
  • kde-4.12
  • kdenetwork
  • kopete
  • kopete
  • contactlist
contactlistlayoutitemconfig.h
Go to the documentation of this file.
1 /***************************************************************************
2 * Copyright (c) 2008 Nikolaj Hald Nielsen <nhnFreespirit@gmail.com> *
3 * Copyright (c) 2009 Roman Jarosz <kedgedev@gmail.com> *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19 ***************************************************************************/
20 
21 #ifndef CONTACTLISTLAYOUTITEMCONFIG_H
22 #define CONTACTLISTLAYOUTITEMCONFIG_H
23 
24 #include <QList>
25 #include <QString>
26 
27 #include <kopete_export.h>
28 
29 namespace ContactList {
30 
31 class KOPETE_CONTACT_LIST_EXPORT LayoutItemConfigRowElement
32 {
33 public:
34  LayoutItemConfigRowElement( int value, qreal size, bool bold, bool italic, bool small, bool optimalSize,
35  Qt::Alignment alignment, const QString &prefix = QString(),
36  const QString &suffix = QString() );
37 
38  inline int value() const { return m_value; }
39  inline qreal size() const { return m_size; }
40  inline bool bold() const { return m_bold; }
41  inline bool italic() const { return m_italic; }
42  inline Qt::Alignment alignment() const { return m_alignment; }
43  inline QString prefix() const { return m_prefix; }
44  inline QString suffix() const { return m_suffix; }
45  inline bool small() const { return m_small; }
46  inline bool optimalSize() const { return m_optimalSize; }
47 
48 private:
49  int m_value;
50  qreal m_size;
51  bool m_bold;
52  bool m_italic;
53  bool m_small;
54  bool m_optimalSize;
55  Qt::Alignment m_alignment;
56  QString m_prefix, m_suffix;
57 };
58 
59 class KOPETE_CONTACT_LIST_EXPORT LayoutItemConfigRow
60 {
61  public:
62  void addElement( LayoutItemConfigRowElement element );
63  int count() const;
64  LayoutItemConfigRowElement element( int at ) const;
65  private:
66  QList<LayoutItemConfigRowElement> m_elements;
67 };
68 
73 class KOPETE_CONTACT_LIST_EXPORT LayoutItemConfig
74 {
75  public:
76  LayoutItemConfig();
77  ~LayoutItemConfig();
78 
79  int rows() const;
80  LayoutItemConfigRow row( int at ) const;
81  bool showIcon() const;
82 
83  void addRow( LayoutItemConfigRow row );
84  void setShowIcon( bool showIcon );
85 
86  private:
87  QList<LayoutItemConfigRow> m_rows;
88  bool m_showIcon;
89 };
90 
91 
92 class KOPETE_CONTACT_LIST_EXPORT ContactListLayout
93 {
94  public:
95  LayoutItemConfig layout() const;
96  bool isEditable() const;
97 
98  void setLayout( LayoutItemConfig layout );
99  void setIsEditable( bool editable );
100 
101  private:
102  LayoutItemConfig m_layout;
103  bool m_isEditable;
104 };
105 
106 }
107 
108 #endif
ContactList::LayoutItemConfigRowElement::suffix
QString suffix() const
Definition: contactlistlayoutitemconfig.h:44
ContactList::LayoutItemConfigRowElement::alignment
Qt::Alignment alignment() const
Definition: contactlistlayoutitemconfig.h:42
ContactList::LayoutItemConfigRowElement::small
bool small() const
Definition: contactlistlayoutitemconfig.h:45
ContactList::LayoutItemConfigRowElement::optimalSize
bool optimalSize() const
Definition: contactlistlayoutitemconfig.h:46
ContactList::LayoutItemConfigRowElement::size
qreal size() const
Definition: contactlistlayoutitemconfig.h:39
ContactList::LayoutItemConfigRowElement::prefix
QString prefix() const
Definition: contactlistlayoutitemconfig.h:43
ContactList::LayoutItemConfig
This class wraps the data needed to paint a LayoutItemDelegate.
Definition: contactlistlayoutitemconfig.h:73
ContactList::LayoutItemConfigRow
Definition: contactlistlayoutitemconfig.h:59
ContactList::ContactListLayout
Definition: contactlistlayoutitemconfig.h:92
ContactList::LayoutItemConfigRowElement::bold
bool bold() const
Definition: contactlistlayoutitemconfig.h:40
ContactList::LayoutItemConfigRowElement::italic
bool italic() const
Definition: contactlistlayoutitemconfig.h:41
ContactList::LayoutItemConfigRowElement
Definition: contactlistlayoutitemconfig.h:31
ContactList::LayoutItemConfigRowElement::value
int value() const
Definition: contactlistlayoutitemconfig.h:38
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/kopete

Skip menu "kopete/kopete"
  • 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