Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Akonadi Contacts
Commits
da0b1447
Commit
da0b1447
authored
Jan 29, 2016
by
Laurent Montel
😁
Browse files
Redesign personal page
parent
59f97263
Changes
1
Hide whitespace changes
Inline
Side-by-side
akonadi-contact/src/editor/contacteditorwidget.cpp
View file @
da0b1447
...
...
@@ -421,50 +421,37 @@ void ContactEditorWidget::Private::initGuiBusinessTab()
void
ContactEditorWidget
::
Private
::
initGuiPersonalTab
()
{
QWidget
*
widget
=
new
QWidget
;
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
widget
);
m
TabWidget
->
addTab
(
widget
,
i18nc
(
"@title:tab Personal properties of a contact"
,
"Personal"
)
);
Q
GroupBox
*
datesGroupBox
=
new
QGroupBox
(
i18nc
(
"@
title:group Date related properties
of a contact"
,
"
Dates"
)
);
QGroupBox
*
familyGroupBox
=
new
QGroupBox
(
i18nc
(
"@title:group Family related properties of a contact"
,
"Family"
)
);
mTabWidget
->
addTab
(
widget
,
i18nc
(
"@title:tab Personal properties of a contact"
,
"Personal"
)
);
QGridLayout
*
mainLayout
=
new
QGridLayout
(
widget
);
m
ainLayout
->
setMargin
(
10
);
mainLayout
->
setSpacing
(
20
);
Q
Label
*
label
=
new
QLabel
(
i18nc
(
"@
label The birthdate
of a contact"
,
"
Birthdate:"
)
);
mainLayout
->
addWidget
(
label
,
0
,
0
);
layout
->
addWidget
(
datesGroupBox
);
layout
->
addWidget
(
familyGroupBox
);
mBirthdateWidget
=
new
DateEditWidget
(
DateEditWidget
::
Birthday
);
label
->
setBuddy
(
mBirthdateWidget
);
mainLayout
->
addWidget
(
mBirthdateWidget
,
1
,
0
);
QGridLayout
*
datesLayout
=
new
QGridLayout
(
datesGroupBox
);
QGrid
Layout
*
familyLayout
=
new
QGridLayout
(
familyGroupBox
);
label
=
new
QLabel
(
i18nc
(
"@label The wedding anniversary of a contact"
,
"Anniversary:"
)
);
main
Layout
->
addWidget
(
label
,
0
,
1
);
// setup dates group box
QLabel
*
label
=
new
QLabel
(
i18nc
(
"@label The birthdate of a contact"
,
"Birthdate:"
));
label
->
setAlignment
(
Qt
::
AlignRight
|
Qt
::
AlignVCenter
);
datesLayout
->
addWidget
(
label
,
0
,
0
);
mBirthdateWidget
=
new
DateEditWidget
(
DateEditWidget
::
Birthday
);
label
->
setBuddy
(
mBirthdateWidget
);
datesLayout
->
addWidget
(
mBirthdateWidget
,
0
,
1
);
mAnniversaryWidget
=
new
DateEditWidget
(
DateEditWidget
::
Anniversary
);
label
->
setBuddy
(
mAnniversaryWidget
);
mainLayout
->
addWidget
(
mAnniversaryWidget
,
1
,
1
);
label
=
new
QLabel
(
i18nc
(
"@label The wedding anniversary of a contact"
,
"Anniversary:"
));
label
->
setAlignment
(
Qt
::
AlignRight
|
Qt
::
AlignVCenter
);
datesLayout
->
addWidget
(
label
,
1
,
0
);
mAnniversaryWidget
=
new
DateEditWidget
(
DateEditWidget
::
Anniversary
);
label
->
setBuddy
(
mAnniversaryWidget
);
datesLayout
->
addWidget
(
mAnniversaryWidget
,
1
,
1
);
datesLayout
->
setRowStretch
(
2
,
1
);
datesLayout
->
setColumnStretch
(
1
,
1
);
// widgets from family group
label
=
new
QLabel
(
i18nc
(
"@label The partner's name of a contact"
,
"Partner's name:"
));
label
->
setAlignment
(
Qt
::
AlignRight
|
Qt
::
AlignVCenter
);
familyLayout
->
addWidget
(
label
,
0
,
0
);
label
=
new
QLabel
(
i18nc
(
"@label The partner's name of a contact"
,
"Partner's name:"
)
);
mainLayout
->
addWidget
(
label
,
0
,
2
);
mPartnerWidget
=
new
KLineEdit
;
mPartnerWidget
->
setPlaceholderText
(
i18n
(
"Add name"
));
mPartnerWidget
->
setTrapReturnKey
(
true
);
label
->
setBuddy
(
mPartnerWidget
);
familyLayout
->
addWidget
(
mPartnerWidget
,
0
,
1
);
label
->
setBuddy
(
mPartnerWidget
);
mainLayout
->
addWidget
(
mPartnerWidget
,
1
,
2
);
mainLayout
->
setColumnStretch
(
1
,
1
);
mainLayout
->
setColumnStretch
(
0
,
1
);
mainLayout
->
setColumnStretch
(
2
,
1
);
family
Layout
->
setRowStretch
(
1
,
1
);
main
Layout
->
setRowStretch
(
2
,
1
);
}
void
ContactEditorWidget
::
Private
::
initGuiNotesTab
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment