Commit 28b4dca4 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove unused class (can't work as not finished)

parent 4ce63005
......@@ -105,7 +105,6 @@ target_sources(KF5AkonadiContact PRIVATE
contactgroupeditordialog.cpp
contactgroupmodel.cpp
contactgroupviewer.cpp
contactgroupviewerdialog.cpp
contactmetadataakonadi.cpp
contactparts.cpp
contactsfilterproxymodel.cpp
......@@ -236,7 +235,6 @@ ecm_generate_headers(AkonadiContact_CamelCase_HEADERS
ContactGroupEditor
ContactGroupEditorDialog
ContactGroupViewer
ContactGroupViewerDialog
ContactsFilterProxyModel
ContactsTreeModel
ContactParts
......
/*
This file is part of Akonadi Contact.
SPDX-FileCopyrightText: 2009 Tobias Koenig <tokoe@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "contactgroupviewerdialog.h"
#include "contactgroupviewer.h"
#include <Akonadi/Item>
#include <KLocalizedString>
#include <QDialogButtonBox>
#include <QPushButton>
#include <QVBoxLayout>
using namespace Akonadi;
class Akonadi::ContactGroupViewerDialogPrivate
{
public:
ContactGroupViewer *mViewer = nullptr;
};
ContactGroupViewerDialog::ContactGroupViewerDialog(QWidget *parent)
: QDialog(parent)
, d(new ContactGroupViewerDialogPrivate)
{
setWindowTitle(i18nc("@title:window", "Show Contact Group"));
auto mainLayout = new QVBoxLayout(this);
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok, this);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, &QDialogButtonBox::accepted, this, &ContactGroupViewerDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &ContactGroupViewerDialog::reject);
mainLayout->addWidget(d->mViewer);
mainLayout->addWidget(buttonBox);
resize(QSize(500, 600));
}
ContactGroupViewerDialog::~ContactGroupViewerDialog() = default;
Akonadi::Item ContactGroupViewerDialog::contactGroup() const
{
return d->mViewer->contactGroup();
}
ContactGroupViewer *ContactGroupViewerDialog::viewer() const
{
return d->mViewer;
}
void ContactGroupViewerDialog::setContactGroup(const Akonadi::Item &group)
{
d->mViewer->setContactGroup(group);
}
/*
This file is part of Akonadi Contact.
SPDX-FileCopyrightText: 2009 Tobias Koenig <tokoe@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#pragma once
#include "akonadi-contact_export.h"
#include <QDialog>
#include <memory>
namespace Akonadi
{
class Item;
class ContactGroupViewer;
class ContactGroupViewerDialogPrivate;
/**
* @short A dialog for displaying a contact group in Akonadi.
*
* This dialog provides a way to show a contact group from the
* Akonadi storage.
*
* Example:
*
* @code
*
* using namespace Akonadi;
*
* const Item group = ...
*
* ContactGroupViewerDialog *dlg = new ContactGroupViewerDialog( this );
* dlg->setContactGroup( group );
* dlg->show();
*
* @endcode
*
* @author Tobias Koenig <tokoe@kde.org>
* @since 4.4
*/
class AKONADI_CONTACT_EXPORT ContactGroupViewerDialog : public QDialog
{
Q_OBJECT
public:
/**
* Creates a new contact group viewer dialog.
*
* @param parent The parent widget of the dialog.
*/
explicit ContactGroupViewerDialog(QWidget *parent = nullptr);
/**
* Destroys the contact group viewer dialog.
*/
~ContactGroupViewerDialog() override;
/**
* Returns the contact group that is currently displayed.
*/
Q_REQUIRED_RESULT Akonadi::Item contactGroup() const;
/**
* Returns the ContactGroupViewer that is used by this dialog.
*/
ContactGroupViewer *viewer() const;
public Q_SLOTS:
/**
* Sets the contact @p group that shall be displayed in the dialog.
*/
void setContactGroup(const Akonadi::Item &group);
private:
//@cond PRIVATE
std::unique_ptr<ContactGroupViewerDialogPrivate> const d;
//@endcond
};
}
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