Commit 5c7ba327 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use QSplitter

parent 1d7bd383
...@@ -24,25 +24,19 @@ ...@@ -24,25 +24,19 @@
#include "addresseslocationwidget.h" #include "addresseslocationwidget.h"
#include "addresseslocationviewer.h" #include "addresseslocationviewer.h"
#include "addresslocationwidget.h" #include "addresslocationwidget.h"
#include <QHBoxLayout>
AddressesLocationWidget::AddressesLocationWidget(QWidget *parent) AddressesLocationWidget::AddressesLocationWidget(QWidget *parent)
: QWidget(parent) : QSplitter(parent)
{ {
QHBoxLayout *topLayout = new QHBoxLayout;
topLayout->setMargin(0);
AddressLocationWidget *addressLocationWidget = new AddressLocationWidget(this); AddressLocationWidget *addressLocationWidget = new AddressLocationWidget(this);
addWidget(addressLocationWidget);
addressLocationWidget->setObjectName(QStringLiteral("addresslocationwidget")); addressLocationWidget->setObjectName(QStringLiteral("addresslocationwidget"));
topLayout->addWidget(addressLocationWidget);
mAddressesLocationViewer = new AddressesLocationViewer(this); mAddressesLocationViewer = new AddressesLocationViewer(this);
mAddressesLocationViewer->setObjectName(QStringLiteral("addresseslocationviewer")); mAddressesLocationViewer->setObjectName(QStringLiteral("addresseslocationviewer"));
topLayout->addWidget(mAddressesLocationViewer); addWidget(mAddressesLocationViewer);
connect(mAddressesLocationViewer, &AddressesLocationViewer::modifyAddress, addressLocationWidget, &AddressLocationWidget::slotModifyAddress); connect(mAddressesLocationViewer, &AddressesLocationViewer::modifyAddress, addressLocationWidget, &AddressLocationWidget::slotModifyAddress);
connect(addressLocationWidget, &AddressLocationWidget::addNewAddress, mAddressesLocationViewer, &AddressesLocationViewer::addAddress); connect(addressLocationWidget, &AddressLocationWidget::addNewAddress, mAddressesLocationViewer, &AddressesLocationViewer::addAddress);
setLayout(topLayout);
} }
AddressesLocationWidget::~AddressesLocationWidget() AddressesLocationWidget::~AddressesLocationWidget()
......
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
#ifndef ADDRESSESLOCATIONWIDGET_H #ifndef ADDRESSESLOCATIONWIDGET_H
#define ADDRESSESLOCATIONWIDGET_H #define ADDRESSESLOCATIONWIDGET_H
#include <QWidget> #include <QSplitter>
#include <KContacts/Address> #include <KContacts/Address>
class AddressesLocationViewer; class AddressesLocationViewer;
class AddressesLocationWidget : public QWidget class AddressesLocationWidget : public QSplitter
{ {
Q_OBJECT Q_OBJECT
public: public:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment