• 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.14
  • kdenetwork
  • kopete
  • kopete
  • contactlist
contactlistlayoutitemconfig.cpp
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 #include "contactlistlayoutitemconfig.h"
22 
23 namespace ContactList {
24 
25 LayoutItemConfigRowElement::LayoutItemConfigRowElement( int value, qreal size, bool bold, bool italic, bool small, bool optimalSize,
26  Qt::Alignment alignment, const QString &prefix, const QString &suffix )
27  : m_value( value )
28  , m_size( size )
29  , m_bold( bold )
30  , m_italic( italic )
31  , m_small( small )
32  , m_optimalSize( optimalSize )
33  , m_alignment( alignment )
34  , m_prefix( prefix )
35  , m_suffix( suffix )
36 {
37 }
38 
40 
41 void LayoutItemConfigRow::addElement( LayoutItemConfigRowElement element )
42 {
43  m_elements.append( element );
44 }
45 
46 int LayoutItemConfigRow::count() const
47 {
48  return m_elements.count();
49 }
50 
51 LayoutItemConfigRowElement LayoutItemConfigRow::element( int at ) const
52 {
53  return m_elements.at( at );
54 }
55 
56 
58 
59 LayoutItemConfig::LayoutItemConfig()
60  : m_showIcon( false )
61 {
62 }
63 
64 LayoutItemConfig::~LayoutItemConfig()
65 {
66 }
67 
68 int LayoutItemConfig::rows() const
69 {
70  return m_rows.size();
71 }
72 
73 
74 LayoutItemConfigRow ContactList::LayoutItemConfig::row( int at ) const
75 {
76  return m_rows.at( at );
77 }
78 
79 void ContactList::LayoutItemConfig::addRow( LayoutItemConfigRow row )
80 {
81  m_rows.append( row );
82 }
83 
84 bool LayoutItemConfig::showIcon() const
85 {
86  return m_showIcon;
87 }
88 
89 void ContactList::LayoutItemConfig::setShowIcon( bool showIcon )
90 {
91  m_showIcon = showIcon;
92 }
93 
95 
96 
97 LayoutItemConfig ContactListLayout::layout() const
98 {
99  return m_layout;
100 }
101 
102 void ContactListLayout::setLayout( LayoutItemConfig layout )
103 {
104  m_layout = layout;
105 }
106 
107 bool ContactListLayout::isEditable() const
108 {
109  return m_isEditable;
110 }
111 
112 void ContactListLayout::setIsEditable( bool editable )
113 {
114  m_isEditable = editable;
115 }
116 
117 }
ContactList::LayoutItemConfig::row
LayoutItemConfigRow row(int at) const
Definition: contactlistlayoutitemconfig.cpp:74
ContactList::ContactListLayout::setIsEditable
void setIsEditable(bool editable)
Definition: contactlistlayoutitemconfig.cpp:112
ContactList::LayoutItemConfig::setShowIcon
void setShowIcon(bool showIcon)
Definition: contactlistlayoutitemconfig.cpp:89
ContactList::LayoutItemConfig::rows
int rows() const
Definition: contactlistlayoutitemconfig.cpp:68
Qt::Alignment
typedef Alignment
ContactList::ContactListLayout::isEditable
bool isEditable() const
Definition: contactlistlayoutitemconfig.cpp:107
ContactList::LayoutItemConfig
This class wraps the data needed to paint a LayoutItemDelegate.
Definition: contactlistlayoutitemconfig.h:73
ContactList::LayoutItemConfigRow
Definition: contactlistlayoutitemconfig.h:59
ContactList::LayoutItemConfig::showIcon
bool showIcon() const
Definition: contactlistlayoutitemconfig.cpp:84
ContactList::LayoutItemConfigRowElement::LayoutItemConfigRowElement
LayoutItemConfigRowElement(int value, qreal size, bool bold, bool italic, bool small, bool optimalSize, Qt::Alignment alignment, const QString &prefix=QString(), const QString &suffix=QString())
Definition: contactlistlayoutitemconfig.cpp:25
ContactList::LayoutItemConfigRow::count
int count() const
Definition: contactlistlayoutitemconfig.cpp:46
QString
ContactList::LayoutItemConfig::LayoutItemConfig
LayoutItemConfig()
Definition: contactlistlayoutitemconfig.cpp:59
ContactList::LayoutItemConfigRow::addElement
void addElement(LayoutItemConfigRowElement element)
Definition: contactlistlayoutitemconfig.cpp:41
contactlistlayoutitemconfig.h
ContactList::ContactListLayout::setLayout
void setLayout(LayoutItemConfig layout)
Definition: contactlistlayoutitemconfig.cpp:102
ContactList::ContactListLayout::layout
LayoutItemConfig layout() const
Definition: contactlistlayoutitemconfig.cpp:97
ContactList::LayoutItemConfigRow::element
LayoutItemConfigRowElement element(int at) const
Definition: contactlistlayoutitemconfig.cpp:51
ContactList::LayoutItemConfigRowElement
Definition: contactlistlayoutitemconfig.h:31
ContactList::LayoutItemConfig::addRow
void addRow(LayoutItemConfigRow row)
Definition: contactlistlayoutitemconfig.cpp:79
ContactList::LayoutItemConfig::~LayoutItemConfig
~LayoutItemConfig()
Definition: contactlistlayoutitemconfig.cpp:64
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:08 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