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 );
57 #ifndef KDEPIM_MOBILE_UI
58 if ( iconName.isEmpty() ) {
59 ui.customIcon->setIcon( CollectionUtils::defaultIconName( collection ) );
61 ui.customIcon->setIcon( iconName );
63 ui.customIconCheckbox->setChecked( !iconName.isEmpty() );
67 ui.countLabel->setText( i18ncp(
"@label",
"One object",
"%1 objects",
69 ui.sizeLabel->setText( KGlobal::locale()->formatByteSize( collection.
statistics().
size() ) );
75 void CollectionGeneralPropertiesPage::save(
Collection & collection)
81 collection.
setName( ui.nameEdit->text() );
84 #ifndef KDEPIM_MOBILE_UI
85 if ( ui.customIconCheckbox->isChecked() ) {
95 #include "moc_collectiongeneralpropertiespage_p.cpp"
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:33 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.