Changeset View
Changeset View
Standalone View
Standalone View
src/contact-editor/editor/businesseditor/businesseditorwidget.cpp
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Line(s) | |||||
128 | BusinessEditorWidget::~BusinessEditorWidget() | 128 | BusinessEditorWidget::~BusinessEditorWidget() | ||
129 | { | 129 | { | ||
130 | } | 130 | } | ||
131 | 131 | | |||
132 | void BusinessEditorWidget::loadContact(const KContacts::Addressee &contact) | 132 | void BusinessEditorWidget::loadContact(const KContacts::Addressee &contact) | ||
133 | { | 133 | { | ||
134 | mLogoWidget->loadContact(contact); | 134 | mLogoWidget->loadContact(contact); | ||
135 | mOrganizationWidget->setText(contact.organization()); | 135 | mOrganizationWidget->setText(contact.organization()); | ||
136 | mProfessionWidget->setText(ContactEditor::Utils::loadCustom(contact, QStringLiteral("X-Profession"))); | 136 | mProfessionWidget->setText(contact.profession()); | ||
137 | mTitleWidget->setText(contact.title()); | 137 | mTitleWidget->setText(contact.title()); | ||
138 | mDepartmentWidget->setText(contact.department()); | 138 | mDepartmentWidget->setText(contact.department()); | ||
139 | mOfficeWidget->setText(ContactEditor::Utils::loadCustom(contact, QStringLiteral("X-Office"))); | 139 | mOfficeWidget->setText(contact.office()); | ||
140 | mManagerWidget->setText(ContactEditor::Utils::loadCustom(contact, QStringLiteral("X-ManagersName"))); | 140 | mManagerWidget->setText(contact.managersName()); | ||
141 | mAssistantWidget->setText(ContactEditor::Utils::loadCustom(contact, QStringLiteral("X-AssistantsName"))); | 141 | mAssistantWidget->setText(contact.assistantsName()); | ||
142 | 142 | | |||
143 | // groupware group | 143 | // groupware group | ||
144 | mFreeBusyWidget->loadContact(contact); | 144 | mFreeBusyWidget->loadContact(contact); | ||
145 | } | 145 | } | ||
146 | 146 | | |||
147 | void BusinessEditorWidget::storeContact(KContacts::Addressee &contact) | 147 | void BusinessEditorWidget::storeContact(KContacts::Addressee &contact) | ||
148 | { | 148 | { | ||
149 | // general group | 149 | // general group | ||
150 | mLogoWidget->storeContact(contact); | 150 | mLogoWidget->storeContact(contact); | ||
151 | contact.setOrganization(mOrganizationWidget->text()); | 151 | contact.setOrganization(mOrganizationWidget->text()); | ||
152 | ContactEditor::Utils::storeCustom(contact, QStringLiteral("X-Profession"), mProfessionWidget->text().trimmed()); | 152 | contact.setProfession(mProfessionWidget->text().trimmed()); | ||
153 | contact.setTitle(mTitleWidget->text().trimmed()); | 153 | contact.setTitle(mTitleWidget->text().trimmed()); | ||
154 | contact.setDepartment(mDepartmentWidget->text().trimmed()); | 154 | contact.setDepartment(mDepartmentWidget->text().trimmed()); | ||
155 | ContactEditor::Utils::storeCustom(contact, QStringLiteral("X-Office"), mOfficeWidget->text().trimmed()); | 155 | contact.setOffice(mOfficeWidget->text().trimmed()); | ||
156 | ContactEditor::Utils::storeCustom(contact, QStringLiteral("X-ManagersName"), mManagerWidget->text().trimmed()); | 156 | contact.setManagersName(mManagerWidget->text().trimmed()); | ||
157 | ContactEditor::Utils::storeCustom(contact, QStringLiteral("X-AssistantsName"), mAssistantWidget->text().trimmed()); | 157 | contact.setAssistantsName(mAssistantWidget->text().trimmed()); | ||
158 | 158 | | |||
159 | // groupware group | 159 | // groupware group | ||
160 | mFreeBusyWidget->storeContact(contact); | 160 | mFreeBusyWidget->storeContact(contact); | ||
161 | } | 161 | } | ||
162 | 162 | | |||
163 | void BusinessEditorWidget::setReadOnly(bool readOnly) | 163 | void BusinessEditorWidget::setReadOnly(bool readOnly) | ||
164 | { | 164 | { | ||
165 | mLogoWidget->setReadOnly(readOnly); | 165 | mLogoWidget->setReadOnly(readOnly); | ||
Show All 11 Lines |