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

mailcommon

  • sources
  • kde-4.14
  • kdepim
  • mailcommon
  • collectionpage
collectiongeneralpage.cpp
Go to the documentation of this file.
1 /* -*- mode: C++; c-file-style: "gnu" -*-
2  Copyright (c) 2009-2015 Montel Laurent <montel@kde.org>
3 
4  This program is free software; you can redistribute it and/or modify it
5  under the terms of the GNU General Public License, version 2, as
6  published by the Free Software Foundation.
7 
8  This program is distributed in the hope that it will be useful, but
9  WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License along
14  with this program; if not, write to the Free Software Foundation, Inc.,
15  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #include "collectiongeneralpage.h"
19 #include "collectiontypeutil.h"
20 
21 #include "incidencesforwidget.h"
22 #include "contenttypewidget.h"
23 #include "attributes/collectionannotationsattribute.h"
24 #include "attributes/newmailnotifierattribute.h"
25 #include "foldercollection.h"
26 #include "kernel/mailkernel.h"
27 #include "util/mailutil.h"
28 
29 #include "pimcommon/util/pimutil.h"
30 #include "pimcommon/util/imapresourcecapabilitiesmanager.h"
31 #include <Akonadi/AgentManager>
32 #include <Akonadi/AttributeFactory>
33 #include <Akonadi/Collection>
34 #include <Akonadi/CollectionModifyJob>
35 #include <Akonadi/EntityDisplayAttribute>
36 
37 #include <KPIMIdentities/IdentityCombo>
38 
39 #include <KColorScheme>
40 #include <KComboBox>
41 #include <KDialog>
42 #include <KLineEdit>
43 #include <KLocale>
44 #include <KMessageBox>
45 
46 #include <QCheckBox>
47 #include <QHBoxLayout>
48 #include <QLabel>
49 #include <QVBoxLayout>
50 
51 using namespace Akonadi;
52 using namespace MailCommon;
53 
54 CollectionGeneralPage::CollectionGeneralPage( QWidget *parent )
55  : CollectionPropertiesPage( parent ),
56  mContentsComboBox(0),
57  mIncidencesForComboBox(0),
58  mSharedSeenFlagsCheckBox(0),
59  mNameEdit( 0 ),
60  mFolderCollection( 0 )
61 {
62  setObjectName( QLatin1String( "MailCommon::CollectionGeneralPage" ) );
63  setPageTitle( i18nc( "@title:tab General settings for a folder.", "General" ) );
64 }
65 
66 CollectionGeneralPage::~CollectionGeneralPage()
67 {
68 }
69 
70 void CollectionGeneralPage::addLine( QWidget *parent, QVBoxLayout *layout )
71 {
72  QFrame *line = new QFrame( parent );
73  line->setGeometry( QRect( 80, 150, 250, 20 ) );
74  line->setFrameShape( QFrame::HLine );
75  line->setFrameShadow( QFrame::Sunken );
76  line->setFrameShape( QFrame::HLine );
77  layout->addWidget( line );
78 }
79 
80 void CollectionGeneralPage::init( const Akonadi::Collection &collection )
81 {
82  mIsLocalSystemFolder = CommonKernel->isSystemFolderCollection( collection ) ||
83  Kernel::folderIsInbox( collection, true );
84 
85  mIsResourceFolder = ( collection.parentCollection() == Akonadi::Collection::root() );
86  QLabel *label;
87 
88  QVBoxLayout *topLayout = new QVBoxLayout( this );
89  topLayout->setSpacing( KDialog::spacingHint() );
90  topLayout->setMargin( 0 );
91 
92  // Musn't be able to edit details for a non-resource, system folder.
93  if ( ( !mIsLocalSystemFolder || mIsResourceFolder ) &&
94  !mFolderCollection->isReadOnly() ) {
95 
96  QHBoxLayout *hl = new QHBoxLayout();
97  topLayout->addItem( hl );
98  hl->setSpacing( KDialog::spacingHint() );
99  hl->setMargin( KDialog::marginHint() );
100  label = new QLabel( i18nc( "@label:textbox Name of the folder.", "&Name:" ), this );
101  hl->addWidget( label );
102 
103  mNameEdit = new KLineEdit( this );
104  connect( mNameEdit, SIGNAL(textChanged(QString)), SLOT(slotNameChanged(QString)) );
105  label->setBuddy( mNameEdit );
106  hl->addWidget( mNameEdit );
107  }
108 
109  // should new mail in this folder be ignored?
110  QHBoxLayout *hbl = new QHBoxLayout();
111  topLayout->addItem( hbl );
112  hbl->setSpacing( KDialog::spacingHint() );
113  hbl->setMargin( KDialog::marginHint() );
114  mNotifyOnNewMailCheckBox =
115  new QCheckBox( i18n( "Act on new/unread mail in this folder" ), this );
116  mNotifyOnNewMailCheckBox->setWhatsThis(
117  i18n( "<qt><p>If this option is enabled then you will be notified about "
118  "new/unread mail in this folder. Moreover, going to the "
119  "next/previous folder with unread messages will stop at this "
120  "folder.</p>"
121  "<p>Uncheck this option if you do not want to be notified about "
122  "new/unread mail in this folder and if you want this folder to "
123  "be skipped when going to the next/previous folder with unread "
124  "messages. This is useful for ignoring any new/unread mail in "
125  "your trash and spam folder.</p></qt>" ) );
126  hbl->addWidget( mNotifyOnNewMailCheckBox );
127  // should replies to mails in this folder be kept in this same folder?
128  hbl = new QHBoxLayout();
129  topLayout->addItem( hbl );
130  hbl->setSpacing( KDialog::spacingHint() );
131  hbl->setMargin( KDialog::marginHint() );
132  mKeepRepliesInSameFolderCheckBox =
133  new QCheckBox( i18n( "Keep replies in this folder" ), this );
134  mKeepRepliesInSameFolderCheckBox->setWhatsThis(
135  i18n( "Check this option if you want replies you write "
136  "to mails in this folder to be put in this same folder "
137  "after sending, instead of in the configured sent-mail folder." ) );
138  hbl->addWidget( mKeepRepliesInSameFolderCheckBox );
139  hbl->addStretch( 1 );
140  // should this folder be shown in the folder selection dialog?
141  hbl = new QHBoxLayout();
142  topLayout->addItem( hbl );
143  hbl->setSpacing( KDialog::spacingHint() );
144  hbl->setMargin( KDialog::marginHint() );
145  mHideInSelectionDialogCheckBox =
146  new QCheckBox( i18n( "Hide this folder in the folder selection dialog" ), this );
147  mHideInSelectionDialogCheckBox->setWhatsThis(
148  i18nc( "@info:whatsthis",
149  "Check this option if you do not want this folder "
150  "to be shown in folder selection dialogs, such as the <interface>"
151  "Jump to Folder</interface> dialog." ) );
152  hbl->addWidget( mHideInSelectionDialogCheckBox );
153  hbl->addStretch( 1 );
154 
155  addLine( this, topLayout );
156  // use grid layout for the following combobox settings
157  QGridLayout *gl = new QGridLayout();
158  gl->setMargin( KDialog::marginHint() );
159  topLayout->addItem( gl );
160  gl->setSpacing( KDialog::spacingHint() );
161  gl->setColumnStretch( 1, 100 ); // make the second column use all available space
162  int row = -1;
163 
164  // sender identity
165  ++row;
166  mUseDefaultIdentityCheckBox = new QCheckBox( i18n( "Use &default identity" ), this );
167  gl->addWidget( mUseDefaultIdentityCheckBox );
168  connect( mUseDefaultIdentityCheckBox, SIGNAL(stateChanged(int)),
169  this, SLOT(slotIdentityCheckboxChanged()) );
170  ++row;
171  label = new QLabel( i18n( "&Sender identity:" ), this );
172  gl->addWidget( label, row, 0 );
173  mIdentityComboBox = new KPIMIdentities::IdentityCombo( KernelIf->identityManager(), this );
174  label->setBuddy( mIdentityComboBox );
175  gl->addWidget( mIdentityComboBox, row, 1 );
176  mIdentityComboBox->setWhatsThis(
177  i18n( "Select the sender identity to be used when writing new mail "
178  "or replying to mail in this folder. This means that if you are in "
179  "one of your work folders, you can make KMail use the corresponding "
180  "sender email address, signature and signing or encryption keys "
181  "automatically. Identities can be set up in the main configuration "
182  "dialog. (Settings -> Configure KMail)" ) );
183 
184 
185  // Only do make this settable, if the IMAP resource is enabled
186  // and it's not the personal folders (those must not be changed)
187  const QString collectionResource = collection.resource();
188  if ( CommonKernel->imapResourceManager()->hasAnnotationSupport(collectionResource) ) {
189  CollectionTypeUtil::FolderContentsType contentsType = CollectionTypeUtil::ContentsTypeMail;
190 
191  const CollectionAnnotationsAttribute *annotationAttribute =
192  collection.attribute<CollectionAnnotationsAttribute>();
193 
194  const QMap<QByteArray, QByteArray> annotations =
195  ( annotationAttribute ?
196  annotationAttribute->annotations() :
197  QMap<QByteArray, QByteArray>() );
198 
199  const bool sharedSeen = ( annotations.value( CollectionTypeUtil::kolabSharedSeen() ) == "true" );
200 
201  CollectionTypeUtil collectionUtil;
202  const CollectionTypeUtil::IncidencesFor incidencesFor =
203  collectionUtil.incidencesForFromString( QLatin1String(annotations.value( CollectionTypeUtil::kolabIncidencesFor() )) );
204 
205  const CollectionTypeUtil::FolderContentsType folderType = collectionUtil.typeFromKolabName( annotations.value( CollectionTypeUtil::kolabFolderType() ) );
206 
207  ++row;
208  mContentsComboBox = new ContentTypeWidget(this);
209  gl->addWidget(mContentsComboBox, row, 0, 1, 2);
210  mContentsComboBox->setCurrentIndex( contentsType );
211 
212  connect( mContentsComboBox, SIGNAL(activated(int)),
213  this, SLOT(slotFolderContentsSelectionChanged(int)) );
214 
215  if ( mFolderCollection->isReadOnly() || mIsResourceFolder ) {
216  mContentsComboBox->setEnabled( false );
217  }
218 
219  // Kolab incidences-for annotation.
220  // Show incidences-for combobox if the contents type can be changed (new folder),
221  // or if it's set to calendar or task (existing folder)
222  const bool folderTypeComboboxEnabled = ( folderType == CollectionTypeUtil::ContentsTypeCalendar || folderType == CollectionTypeUtil::ContentsTypeTask );
223  ++row;
224  mIncidencesForComboBox = new IncidencesForWidget(this);
225  gl->addWidget(mIncidencesForComboBox, row, 0, 1, 2);
226 
227  mIncidencesForComboBox->setCurrentIndex( incidencesFor );
228  mIncidencesForComboBox->setEnabled(folderTypeComboboxEnabled);
229 
230  mSharedSeenFlagsCheckBox = new QCheckBox( this );
231  mSharedSeenFlagsCheckBox->setText( i18n( "Share unread state with all users" ) );
232  mSharedSeenFlagsCheckBox->setChecked( sharedSeen );
233  ++row;
234  gl->addWidget( mSharedSeenFlagsCheckBox, row, 0, 1, 1 );
235  mSharedSeenFlagsCheckBox->setWhatsThis(
236  i18n( "If enabled, the unread state of messages in this folder will be "
237  "the same for all users having access to this folder. If disabled "
238  "(the default), every user with access to this folder has their "
239  "own unread state." ) );
240  }
241 
242  topLayout->addStretch( 100 ); // eat all superfluous space
243 }
244 
245 void CollectionGeneralPage::load( const Akonadi::Collection &collection )
246 {
247  mFolderCollection = FolderCollection::forCollection( collection );
248  init( collection );
249 
250  if ( mNameEdit ) {
251  const QString displayName = collection.displayName();
252 
253  if ( !mIsLocalSystemFolder || mIsResourceFolder ) {
254  mNameEdit->setText( displayName );
255  }
256  }
257 
258  // folder identity
259  mIdentityComboBox->setCurrentIdentity( mFolderCollection->identity() );
260  mUseDefaultIdentityCheckBox->setChecked( mFolderCollection->useDefaultIdentity() );
261 
262  // ignore new mail
263  mNotifyOnNewMailCheckBox->setChecked( !Util::ignoreNewMailInFolder(collection) );
264 
265  const bool keepInFolder = ( mFolderCollection->canCreateMessages() &&
266  mFolderCollection->putRepliesInSameFolder() );
267 
268  mKeepRepliesInSameFolderCheckBox->setChecked( keepInFolder );
269  mKeepRepliesInSameFolderCheckBox->setEnabled( mFolderCollection->canCreateMessages() );
270  mHideInSelectionDialogCheckBox->setChecked( mFolderCollection->hideInSelectionDialog() );
271 
272  if ( mContentsComboBox ) {
273  const CollectionAnnotationsAttribute *annotationsAttribute =
274  collection.attribute<CollectionAnnotationsAttribute>();
275 
276  if ( annotationsAttribute ) {
277  const QMap<QByteArray, QByteArray> annotations = annotationsAttribute->annotations();
278  if ( annotations.contains( CollectionTypeUtil::kolabFolderType() ) ) {
279  CollectionTypeUtil collectionUtil;
280  mContentsComboBox->setCurrentItem(
281  collectionUtil.typeNameFromKolabType( annotations[ CollectionTypeUtil::kolabFolderType() ] ) );
282  }
283  }
284  }
285 }
286 
287 void CollectionGeneralPage::save( Collection &collection )
288 {
289  if ( mNameEdit ) {
290  if ( !mIsLocalSystemFolder ) {
291  const QString nameFolder(mNameEdit->text().trimmed());
292  bool canRenameFolder = !(nameFolder.startsWith( QLatin1Char('.') ) ||
293  nameFolder.endsWith( QLatin1Char('.') ) ||
294  nameFolder.contains( QLatin1Char( '/' ) ) ||
295  nameFolder.isEmpty());
296 
297  if ( mIsResourceFolder && (PimCommon::Util::isImapResource(collection.resource()))) {
298  collection.setName( nameFolder );
299  Akonadi::AgentInstance instance =
300  Akonadi::AgentManager::self()->instance( collection.resource() );
301  instance.setName( nameFolder );
302  } else if (canRenameFolder) {
303  if ( collection.hasAttribute<Akonadi::EntityDisplayAttribute>() &&
304  !collection.attribute<Akonadi::EntityDisplayAttribute>()->displayName().isEmpty() ) {
305  collection.attribute<Akonadi::EntityDisplayAttribute>()->setDisplayName(
306  nameFolder );
307  } else if ( !nameFolder.isEmpty() ) {
308  collection.setName( nameFolder );
309  }
310  }
311  }
312  }
313 
314  if (!mNotifyOnNewMailCheckBox->isChecked()) {
315  MailCommon::NewMailNotifierAttribute *newMailNotifierAttr = collection.attribute<MailCommon::NewMailNotifierAttribute>( Akonadi::Entity::AddIfMissing );
316  newMailNotifierAttr->setIgnoreNewMail(true);
317  } else {
318  collection.removeAttribute<MailCommon::NewMailNotifierAttribute>();
319  }
320 
321  CollectionAnnotationsAttribute *annotationsAttribute =
322  collection.attribute<CollectionAnnotationsAttribute>( Entity::AddIfMissing );
323 
324  QMap<QByteArray, QByteArray> annotations = annotationsAttribute->annotations();
325  if ( mSharedSeenFlagsCheckBox && mSharedSeenFlagsCheckBox->isEnabled() ) {
326  annotations[ CollectionTypeUtil::kolabSharedSeen() ] = mSharedSeenFlagsCheckBox->isChecked() ? "true" : "false";
327  }
328 
329  CollectionTypeUtil collectionUtil;
330  if ( mIncidencesForComboBox && mIncidencesForComboBox->isEnabled() ) {
331  annotations[ CollectionTypeUtil::kolabIncidencesFor() ] =
332  collectionUtil.incidencesForToString(
333  static_cast<CollectionTypeUtil::IncidencesFor>( mIncidencesForComboBox->currentIndex() ) ).toLatin1();
334  }
335 
336  if ( mContentsComboBox ) {
337  const CollectionTypeUtil::FolderContentsType type =
338  collectionUtil.contentsTypeFromString( mContentsComboBox->currentText() );
339 
340  const QByteArray kolabName = collectionUtil.kolabNameFromType( type ) ;
341  if ( !kolabName.isEmpty() ) {
342  const QString iconName = collectionUtil.iconNameFromContentsType(type);
343  Akonadi::EntityDisplayAttribute *attribute =
344  collection.attribute<Akonadi::EntityDisplayAttribute>( Akonadi::Entity::AddIfMissing );
345  attribute->setIconName( iconName );
346  new Akonadi::CollectionModifyJob( collection );
347  annotations[ CollectionTypeUtil::kolabFolderType() ] = kolabName;
348  }
349  }
350  if ( annotations.isEmpty() ) {
351  collection.removeAttribute<CollectionAnnotationsAttribute>();
352  } else {
353  annotationsAttribute->setAnnotations( annotations );
354  }
355 
356  if ( mFolderCollection ) {
357  mFolderCollection->setIdentity( mIdentityComboBox->currentIdentity() );
358  mFolderCollection->setUseDefaultIdentity( mUseDefaultIdentityCheckBox->isChecked() );
359 
360  mFolderCollection->setPutRepliesInSameFolder( mKeepRepliesInSameFolderCheckBox->isChecked() );
361  mFolderCollection->setHideInSelectionDialog( mHideInSelectionDialogCheckBox->isChecked() );
362  mFolderCollection->writeConfig();
363  }
364 }
365 
366 void CollectionGeneralPage::slotIdentityCheckboxChanged()
367 {
368  mIdentityComboBox->setEnabled( !mUseDefaultIdentityCheckBox->isChecked() );
369 }
370 
371 void CollectionGeneralPage::slotFolderContentsSelectionChanged( int )
372 {
373  CollectionTypeUtil collectionUtil;
374  const CollectionTypeUtil::FolderContentsType type =
375  collectionUtil.contentsTypeFromString( mContentsComboBox->currentText() );
376 
377  if ( type != CollectionTypeUtil::ContentsTypeMail ) {
378  const QString message =
379  i18n( "You have configured this folder to contain groupware information. "
380  "That means that this folder will disappear once the configuration "
381  "dialog is closed." );
382 
383  KMessageBox::information( this, message );
384  }
385 
386  const bool enable = ( type == CollectionTypeUtil::ContentsTypeCalendar ||
387  type == CollectionTypeUtil::ContentsTypeTask );
388 
389  if ( mIncidencesForComboBox ) {
390  mIncidencesForComboBox->setEnabled( enable );
391  }
392 }
393 
394 void CollectionGeneralPage::slotNameChanged( const QString &name )
395 {
396 #ifndef QT_NO_STYLE_STYLESHEET
397  QString styleSheet;
398  if ( name.startsWith( QLatin1Char('.') ) ||
399  name.endsWith( QLatin1Char('.') ) ||
400  name.contains( QLatin1Char( '/' ) ) ||
401  name.isEmpty() ) {
402  if (mColorName.isEmpty()) {
403  const KColorScheme::BackgroundRole bgColorScheme( KColorScheme::NegativeBackground );
404  KStatefulBrush bgBrush( KColorScheme::View, bgColorScheme );
405  mColorName = bgBrush.brush( this ).color().name();
406  }
407  styleSheet = QString::fromLatin1( "QLineEdit{ background-color:%1 }" ).
408  arg( mColorName );
409  }
410  setStyleSheet(styleSheet);
411 #endif
412 }
413 
MailCommon::Util::ignoreNewMailInFolder
MAILCOMMON_EXPORT bool ignoreNewMailInFolder(const Akonadi::Collection &collection)
Definition: mailutil.cpp:365
MailCommon::CollectionTypeUtil::kolabFolderType
static QByteArray kolabFolderType()
Definition: collectiontypeutil.cpp:35
QWidget
MailCommon::CollectionTypeUtil::incidencesForToString
QString incidencesForToString(CollectionTypeUtil::IncidencesFor type)
Definition: collectiontypeutil.cpp:78
foldercollection.h
KernelIf
#define KernelIf
Definition: mailkernel.h:191
QMap::contains
bool contains(const Key &key) const
QGridLayout::addWidget
void addWidget(QWidget *widget, int row, int column, QFlags< Qt::AlignmentFlag > alignment)
QByteArray
QFrame::setFrameShape
void setFrameShape(Shape)
contenttypewidget.h
QMap< QByteArray, QByteArray >
QByteArray::isEmpty
bool isEmpty() const
MailCommon::ContentTypeWidget
Definition: contenttypewidget.h:28
QHBoxLayout
MailCommon::CollectionTypeUtil::typeFromKolabName
CollectionTypeUtil::FolderContentsType typeFromKolabName(const QByteArray &name)
Definition: collectiontypeutil.cpp:107
QGridLayout
MailCommon::Kernel::folderIsInbox
static bool folderIsInbox(const Akonadi::Collection &, bool withoutPop3InboxSetting=false)
Definition: mailkernel.cpp:342
MailCommon::CollectionTypeUtil::typeNameFromKolabType
QString typeNameFromKolabType(const QByteArray &type)
Definition: collectiontypeutil.cpp:194
MailCommon::CollectionGeneralPage::~CollectionGeneralPage
~CollectionGeneralPage()
Definition: collectiongeneralpage.cpp:66
QGridLayout::setSpacing
void setSpacing(int spacing)
QWidget::setGeometry
void setGeometry(int x, int y, int w, int h)
MailCommon::CollectionGeneralPage::load
void load(const Akonadi::Collection &collection)
Definition: collectiongeneralpage.cpp:245
QLabel::setBuddy
void setBuddy(QWidget *buddy)
MailCommon::ContentTypeWidget::setCurrentItem
void setCurrentItem(const QString &name)
Definition: contenttypewidget.cpp:72
newmailnotifierattribute.h
QRect
MailCommon::IncidencesForWidget
Definition: incidencesforwidget.h:29
QWidget::setEnabled
void setEnabled(bool)
QBoxLayout::addWidget
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
collectiontypeutil.h
collectiongeneralpage.h
MailCommon::IncidencesForWidget::setCurrentIndex
void setCurrentIndex(int index)
Definition: incidencesforwidget.cpp:76
QCheckBox
collectionannotationsattribute.h
MailCommon::CollectionTypeUtil::kolabIncidencesFor
static QByteArray kolabIncidencesFor()
Definition: collectiontypeutil.cpp:40
QBoxLayout::addItem
virtual void addItem(QLayoutItem *item)
QString::isEmpty
bool isEmpty() const
QString::startsWith
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
MailCommon::CollectionTypeUtil::kolabNameFromType
QByteArray kolabNameFromType(CollectionTypeUtil::FolderContentsType type)
Definition: collectiontypeutil.cpp:137
QVBoxLayout
QString::endsWith
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
MailCommon::CollectionTypeUtil::incidencesForFromString
CollectionTypeUtil::IncidencesFor incidencesForFromString(const QString &string)
Definition: collectiontypeutil.cpp:92
QString
QLayout::setMargin
void setMargin(int margin)
MailCommon::IncidencesForWidget::currentIndex
int currentIndex() const
Definition: incidencesforwidget.cpp:71
displayName
const char * displayName
Definition: searchpatternedit.cpp:55
MailCommon::CollectionTypeUtil::kolabSharedSeen
static QByteArray kolabSharedSeen()
Definition: collectiontypeutil.cpp:45
QString::contains
bool contains(QChar ch, Qt::CaseSensitivity cs) const
QLatin1Char
QFrame
MailCommon::CollectionAnnotationsAttribute
Definition: collectionannotationsattribute.h:30
QFrame::setFrameShadow
void setFrameShadow(Shadow)
CommonKernel
#define CommonKernel
Definition: mailkernel.h:194
QAbstractButton::setChecked
void setChecked(bool)
MailCommon::CollectionAnnotationsAttribute::setAnnotations
void setAnnotations(const QMap< QByteArray, QByteArray > &annotations)
Definition: collectionannotationsattribute.cpp:36
incidencesforwidget.h
MailCommon::FolderCollection::forCollection
static QSharedPointer< FolderCollection > forCollection(const Akonadi::Collection &coll, bool writeConfig=true)
Definition: foldercollection.cpp:46
MailCommon::CollectionTypeUtil::ContentsTypeTask
Definition: collectiontypeutil.h:45
QWidget::setWhatsThis
void setWhatsThis(const QString &)
QString::toLatin1
QByteArray toLatin1() const
MailCommon::CollectionGeneralPage::save
void save(Akonadi::Collection &collection)
Definition: collectiongeneralpage.cpp:287
MailCommon::CollectionTypeUtil
Definition: collectiontypeutil.h:29
MailCommon::NewMailNotifierAttribute
Definition: newmailnotifierattribute.h:27
QLatin1String
mailkernel.h
QBoxLayout::addStretch
void addStretch(int stretch)
QGridLayout::setColumnStretch
void setColumnStretch(int column, int stretch)
MailCommon::ContentTypeWidget::currentText
QString currentText() const
Definition: contenttypewidget.cpp:77
QAbstractButton::setText
void setText(const QString &text)
QString::fromLatin1
QString fromLatin1(const char *str, int size)
MailCommon::CollectionTypeUtil::iconNameFromContentsType
QString iconNameFromContentsType(CollectionTypeUtil::FolderContentsType type)
Definition: collectiontypeutil.cpp:224
MailCommon::NewMailNotifierAttribute::setIgnoreNewMail
void setIgnoreNewMail(bool b)
Definition: newmailnotifierattribute.cpp:79
QLabel
MailCommon::CollectionTypeUtil::FolderContentsType
FolderContentsType
Definition: collectiontypeutil.h:40
MailCommon::CollectionGeneralPage::init
void init(const Akonadi::Collection &)
Definition: collectiongeneralpage.cpp:80
MailCommon::CollectionTypeUtil::ContentsTypeCalendar
Definition: collectiontypeutil.h:42
MailCommon::CollectionTypeUtil::IncidencesFor
IncidencesFor
Definition: collectiontypeutil.h:53
mailutil.h
MailCommon::CollectionAnnotationsAttribute::annotations
QMap< QByteArray, QByteArray > annotations() const
Definition: collectionannotationsattribute.cpp:42
MailCommon::ContentTypeWidget::setCurrentIndex
void setCurrentIndex(int index)
Definition: contenttypewidget.cpp:67
QBoxLayout::setSpacing
void setSpacing(int spacing)
MailCommon::CollectionTypeUtil::contentsTypeFromString
CollectionTypeUtil::FolderContentsType contentsTypeFromString(const QString &type)
Definition: collectiontypeutil.cpp:161
MailCommon::CollectionTypeUtil::ContentsTypeMail
Definition: collectiontypeutil.h:41
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

mailcommon

Skip menu "mailcommon"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • 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