Indeed configure ldap is more useful in kmail as in kaddressbook

wilder
Laurent Montel 7 years ago
parent 620857be6c
commit 8549b46193
  1. 2
      CMakeLists.txt
  2. 40
      src/configuredialog/configureaccountpage.cpp
  3. 24
      src/configuredialog/configureaccountpage.h

@ -69,7 +69,7 @@ set(KDEPIM_APPS_LIB_VERSION_LIB "5.10.40")
set(MESSAGELIB_LIB_VERSION_LIB "5.10.45")
set(LIBKLEO_LIB_VERSION_LIB "5.10.40")
set(PIMCOMMON_LIB_VERSION_LIB "5.10.41")
set(LIBKDEPIM_LIB_VERSION_LIB "5.10.40")
set(LIBKDEPIM_LIB_VERSION_LIB "5.10.41")
set(LIBKSIEVE_LIB_VERSION_LIB "5.10.40")
find_package(KF5WebEngineViewer ${MESSAGELIB_LIB_VERSION_LIB} CONFIG REQUIRED)

@ -37,7 +37,7 @@ using MailTransport::TransportManagementWidget;
#include <AkonadiWidgets/agenttypedialog.h>
#include <AkonadiCore/agentinstancecreatejob.h>
#include <identity/identitypage.h>
#include <Libkdepim/LdapConfigureWidget>
#include <KComboBox>
#include <KConfigGroup>
#include <KLocalizedString>
@ -76,6 +76,12 @@ AccountsPage::AccountsPage(QWidget *parent)
//
SendingTab *sendingTab = new SendingTab();
addTab(sendingTab, i18nc("@title:tab Tab page where the user configures accounts to send mail", "Sending"));
//
// "Sending" tab:
//
LdapCompetionTab *ldapCompletionTab = new LdapCompetionTab();
addTab(ldapCompletionTab, i18nc("@title:tab Tab page where the user configures ldap server", "LDAP server"));
}
AccountsPageSendingTab::~AccountsPageSendingTab()
@ -379,3 +385,35 @@ void AccountsPage::ReceivingTab::save()
delete conf;
}
}
LdapCompetionTab::LdapCompetionTab(QWidget *parent)
: ConfigModuleTab(parent)
{
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setMargin(0);
mLdapConfigureWidget = new KLDAP::LdapConfigureWidget(this);
layout->addWidget(mLdapConfigureWidget);
connect(mLdapConfigureWidget, &KLDAP::LdapConfigureWidget::changed, this, QOverload<bool>::of(&LdapCompetionTab::changed));
}
LdapCompetionTab::~LdapCompetionTab()
{
}
QString LdapCompetionTab::helpAnchor() const
{
return {};
}
void LdapCompetionTab::save()
{
mLdapConfigureWidget->save();
}
void LdapCompetionTab::doLoadOther()
{
mLdapConfigureWidget->load();
}

@ -25,7 +25,10 @@
class QCheckBox;
class KComboBox;
class OrgFreedesktopAkonadiNewMailNotifierInterface;
namespace KLDAP
{
class LdapConfigureWidget;
}
// subclasses: one class per tab:
class AccountsPageSendingTab : public ConfigModuleTab
{
@ -47,12 +50,29 @@ private:
KComboBox *mSendMethodCombo = nullptr;
};
// subclasses: one class per tab:
class LdapCompetionTab : public ConfigModuleTab
{
Q_OBJECT
public:
explicit LdapCompetionTab(QWidget *parent = nullptr);
~LdapCompetionTab() override;
QString helpAnchor() const;
void save() override;
private:
void doLoadOther() override;
private:
KLDAP::LdapConfigureWidget *mLdapConfigureWidget = nullptr;
};
class AccountsPageReceivingTab : public ConfigModuleTab
{
Q_OBJECT
public:
explicit AccountsPageReceivingTab(QWidget *parent = nullptr);
~AccountsPageReceivingTab();
~AccountsPageReceivingTab() override;
QString helpAnchor() const;
void save() override;

Loading…
Cancel
Save