akonadi
20 #include "collectiongeneralpropertiespage_p.h"
22 #include "collection.h"
23 #include "entitydisplayattribute.h"
24 #include "collectionstatistics.h"
25 #include "collectionutils_p.h"
29 using namespace Akonadi;
33 CollectionGeneralPropertiesPage::CollectionGeneralPropertiesPage( QWidget *parent )
36 setObjectName( QLatin1String(
"Akonadi::CollectionGeneralPropertiesPage" ) );
38 setPageTitle( i18nc(
"@title:tab general properties page",
"General" ) );
42 void CollectionGeneralPropertiesPage::load(
const Collection & collection)
51 if ( displayName.isEmpty() )
52 ui.nameEdit->setText( collection.
name() );
54 ui.nameEdit->setText( displayName );
56 #ifndef KDEPIM_MOBILE_UI
57 if ( iconName.isEmpty() )
58 ui.customIcon->setIcon( CollectionUtils::defaultIconName( collection ) );
60 ui.customIcon->setIcon( iconName );
61 ui.customIconCheckbox->setChecked( !iconName.isEmpty() );
65 ui.countLabel->setText( i18ncp(
"@label",
"One object",
"%1 objects",
67 ui.sizeLabel->setText( KGlobal::locale()->formatByteSize( collection.
statistics().
size() ) );
73 void CollectionGeneralPropertiesPage::save(
Collection & collection)
79 collection.
setName( ui.nameEdit->text() );
81 #ifndef KDEPIM_MOBILE_UI
82 if ( ui.customIconCheckbox->isChecked() )
91 #include "collectiongeneralpropertiespage_p.moc"
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Tue Dec 4 2012 14:36:03 by
doxygen 1.8.1.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.