Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 57c89f5e authored by Laurent Montel's avatar Laurent Montel 😁

Add new widget for update gravatar

parent 52a1bb22
......@@ -112,6 +112,8 @@ set(kaddressbook_gravatar_SRCS
gravatar/job/gravatarupdatejob.cpp
gravatar/widgets/gravatarcreatedialog.cpp
gravatar/widgets/gravatarcreatewidget.cpp
gravatar/widgets/gravatarupdatedialog.cpp
gravatar/widgets/gravatarcreatewidget.cpp
)
set(kaddressbook_LIB_SRCS
......
......@@ -18,6 +18,7 @@
#include "gravatarcreatedialogtest.h"
#include "../widgets/gravatarcreatedialog.h"
#include "../widgets/gravatarcreatewidget.h"
#include <QDialogButtonBox>
#include <qtest_kde.h>
GravatarCreateDialogTest::GravatarCreateDialogTest(QObject *parent)
......@@ -36,6 +37,10 @@ void GravatarCreateDialogTest::shouldHaveDefaultValue()
KABGravatar::GravatarCreateDialog dlg;
KABGravatar::GravatarCreateWidget *w = dlg.findChild<KABGravatar::GravatarCreateWidget *>(QLatin1String("gravatarcreatewidget"));
QVERIFY(w);
QDialogButtonBox *buttonBox = dlg.findChild<QDialogButtonBox *>(QLatin1String("buttonbox"));
QVERIFY(buttonBox);
}
QTEST_KDEMAIN(GravatarCreateDialogTest, GUI)
......@@ -19,7 +19,8 @@
#include "gravatarcreatewidget.h"
#include <QVBoxLayout>
#include <KLocalizedString>
#include <QDialogButtonBox>
#include <QPushButton>
using namespace KABGravatar;
GravatarCreateDialog::GravatarCreateDialog(QWidget *parent)
: QDialog(parent)
......@@ -29,6 +30,11 @@ GravatarCreateDialog::GravatarCreateDialog(QWidget *parent)
mCreateWidget = new GravatarCreateWidget(this);
mCreateWidget->setObjectName(QLatin1String("gravatarcreatewidget"));
mainLayout->addWidget(mCreateWidget);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel);
buttonBox->setObjectName(QLatin1String("buttonbox"));
mainLayout->addWidget(buttonBox);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
}
GravatarCreateDialog::~GravatarCreateDialog()
......
/*
Copyright (c) 2015 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "gravatarupdatedialog.h"
#include <QVBoxLayout>
#include <KLocalizedString>
using namespace KABGravatar;
GravatarUpdateDialog::GravatarUpdateDialog(QWidget *parent)
: QDialog(parent)
{
}
GravatarUpdateDialog::~GravatarUpdateDialog()
{
}
/*
Copyright (c) 2015 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef GRAVATARUPDATEDIALOG_H
#define GRAVATARUPDATEDIALOG_H
#include <QDialog>
namespace KABGravatar {
class GravatarUpdateDialog : public QDialog
{
Q_OBJECT
public:
explicit GravatarUpdateDialog(QWidget *parent=0);
~GravatarUpdateDialog();
};
}
#endif // GRAVATARUPDATEDIALOG_H
/*
This file is part of KAddressBook.
Copyright (c) 2015 Laurent Montel <montel@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "gravatarupdatewidget.h"
using namespace KABGravatar;
GravatarUpdateWidget::GravatarUpdateWidget(QWidget *parent)
: QWidget(parent)
{
}
GravatarUpdateWidget::~GravatarUpdateWidget()
{
}
/*
This file is part of KAddressBook.
Copyright (c) 2015 Laurent Montel <montel@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef GRAVATARUPDATEWIDGET_H
#define GRAVATARUPDATEWIDGET_H
#include <QWidget>
namespace KABGravatar {
class GravatarUpdateWidget : public QWidget
{
Q_OBJECT
public:
explicit GravatarUpdateWidget(QWidget *parent = 0);
~GravatarUpdateWidget();
};
}
#endif // GRAVATARUPDATEWIDGET_H
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