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
46fbcfb3
Commit
46fbcfb3
authored
Feb 01, 2016
by
Laurent Montel
😁
Browse files
Add placeholder
parent
e599148f
Changes
3
Hide whitespace changes
Inline
Side-by-side
akonadi-contact/src/editor/addresseditor/addresseslocationviewer.cpp
View file @
46fbcfb3
...
...
@@ -32,3 +32,13 @@ AddressesLocationViewer::~AddressesLocationViewer()
{
}
KContacts
::
Address
::
List
AddressesLocationViewer
::
addresses
()
const
{
return
mAddresses
;
}
void
AddressesLocationViewer
::
setAddresses
(
const
KContacts
::
Address
::
List
&
addresses
)
{
mAddresses
=
addresses
;
}
akonadi-contact/src/editor/addresseditor/addresseslocationviewer.h
View file @
46fbcfb3
...
...
@@ -25,6 +25,7 @@
#define ADDRESSESLOCATIONVIEWER_H
#include <QWidget>
#include <KContacts/Address>
class
AddressesLocationViewer
:
public
QWidget
{
...
...
@@ -32,6 +33,13 @@ class AddressesLocationViewer : public QWidget
public:
explicit
AddressesLocationViewer
(
QWidget
*
parent
=
Q_NULLPTR
);
~
AddressesLocationViewer
();
KContacts
::
Address
::
List
addresses
()
const
;
void
setAddresses
(
const
KContacts
::
Address
::
List
&
addresses
);
private:
KContacts
::
Address
::
List
mAddresses
;
};
#endif // ADDRESSESLOCATIONVIEWER_H
akonadi-contact/src/editor/addresseditor/addresslocationwidget.cpp
View file @
46fbcfb3
...
...
@@ -30,6 +30,7 @@
#include <QVBoxLayout>
#include <QLabel>
#include <QCheckBox>
#include <QPushButton>
AddressLocationWidget
::
AddressLocationWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
...
...
@@ -37,12 +38,16 @@ AddressLocationWidget::AddressLocationWidget(QWidget *parent)
QGridLayout
*
topLayout
=
new
QGridLayout
;
setLayout
(
topLayout
);
QLabel
*
label
=
new
QLabel
(
KContacts
::
Address
::
streetLabel
(),
this
);
label
->
setObjectName
(
QStringLiteral
(
"streetlabel"
));
QLabel
*
label
=
new
QLabel
(
KContacts
::
Address
::
postOfficeBoxLabel
(),
this
);
label
=
new
QLabel
(
KContacts
::
Address
::
postOfficeBoxLabel
(),
this
);
label
->
setObjectName
(
QStringLiteral
(
"postofficeboxlabel"
));
mPOBoxEdit
=
new
KLineEdit
(
this
);
mPOBoxEdit
->
setPlaceholderText
(
i18n
(
"Add Post Office Box"
));
mPOBoxEdit
->
setObjectName
(
QStringLiteral
(
"postofficeboxlineedit"
));
mPOBoxEdit
->
setTrapReturnKey
(
true
);
...
...
@@ -50,18 +55,21 @@ AddressLocationWidget::AddressLocationWidget(QWidget *parent)
label
=
new
QLabel
(
KContacts
::
Address
::
localityLabel
(),
this
);
label
->
setObjectName
(
QStringLiteral
(
"localitylabel"
));
mLocalityEdit
=
new
KLineEdit
(
this
);
mLocalityEdit
->
setPlaceholderText
(
i18n
(
"Add Locality"
));
mLocalityEdit
->
setObjectName
(
QStringLiteral
(
"localitylineedit"
));
mLocalityEdit
->
setTrapReturnKey
(
true
);
label
=
new
QLabel
(
KContacts
::
Address
::
regionLabel
(),
this
);
label
->
setObjectName
(
QStringLiteral
(
"regionlabel"
));
mRegionEdit
=
new
KLineEdit
(
this
);
mRegionEdit
->
setPlaceholderText
(
i18n
(
"Add Region"
));
mRegionEdit
->
setObjectName
(
QStringLiteral
(
"regionlineedit"
));
mRegionEdit
->
setTrapReturnKey
(
true
);
label
=
new
QLabel
(
KContacts
::
Address
::
postalCodeLabel
(),
this
);
label
->
setObjectName
(
QStringLiteral
(
"postalcodelabel"
));
mPostalCodeEdit
=
new
KLineEdit
(
this
);
mPostalCodeEdit
->
setPlaceholderText
(
i18n
(
"Add Postal Code"
));
mPostalCodeEdit
->
setObjectName
(
QStringLiteral
(
"postalcodelineedit"
));
mPostalCodeEdit
->
setTrapReturnKey
(
true
);
...
...
@@ -70,11 +78,15 @@ AddressLocationWidget::AddressLocationWidget(QWidget *parent)
mCountryCombo
=
new
KComboBox
(
this
);
mCountryCombo
->
setObjectName
(
QStringLiteral
(
"countrycombobox"
));
mCountryCombo
->
setEditable
(
true
);
mCountryCombo
->
lineEdit
()
->
setPlaceholderText
(
i18n
(
"Add a Country"
));
mCountryCombo
->
setDuplicatesEnabled
(
false
);
mPreferredCheckBox
=
new
QCheckBox
(
i18nc
(
"street/postal"
,
"This is the preferred address"
),
this
);
mPreferredCheckBox
->
setObjectName
(
QStringLiteral
(
"preferredcheckbox"
));
mAddAddress
=
new
QPushButton
(
i18n
(
"Add Address"
),
this
);
mAddAddress
->
setObjectName
(
QStringLiteral
(
"addbuttonaddress"
));
}
AddressLocationWidget
::~
AddressLocationWidget
()
...
...
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