Commit 1b7fd0e1 authored by Laurent Montel's avatar Laurent Montel 😁

Remove unused files

parent 11c70782
......@@ -2,6 +2,5 @@
add_subdirectory(apps)
add_subdirectory(customtoolsplugins)
add_subdirectory(messageviewerplugins)
add_subdirectory(kmail)
add_subdirectory(messageviewergrantleetheme)
add_subdirectory(etm_usage)
add_subdirectory(kabc)
add_subdirectory(mailreader)
add_subdirectory(coisceim)
set(kabcviewer_bin_SRCS
kabcviewer.cpp
)
# todo: more appropriate icon?
#file(GLOB ICONS_SRCS "${KDE4_ICON_DIR}/oxygen/*/apps/office-address-book.png")
#ecm_add_app_icon(kabcviewer_bin_SRCS ICONS ${ICONS_SRCS})
add_executable(kabcviewer_bin ${kabcviewer_bin_SRCS})
set_target_properties(kabcviewer_bin PROPERTIES OUTPUT_NAME kabcviewer)
target_link_libraries( kabcviewer_bin KF5::AkonadiCore KF5::AkonadiContact KF5::I18n KF5::ConfigCore)
#install(TARGETS kabcviewer_bin ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
########## next target #######################
set(kabceditor_bin_SRCS
kabceditor.cpp
)
# todo: more appropriate icon?
#file(GLOB ICONS_SRCS "${KDE4_ICON_DIR}/oxygen/*/apps/office-address-book.png")
#ecm_add_app_icon(kabceditor_bin_SRCS ICONS ${ICONS_SRCS})
add_executable(kabceditor_bin ${kabceditor_bin_SRCS})
set_target_properties(kabceditor_bin PROPERTIES OUTPUT_NAME kabceditor)
target_link_libraries( kabceditor_bin KF5::AkonadiCore KF5::AkonadiContact KF5::I18n KF5::ConfigCore)
#install(TARGETS kabceditor_bin ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
/*
This file is part of Akonadi.
Copyright (c) 2007 Tobias Koenig <tokoe@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 "kabceditor.h"
#include <QGridLayout>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <Akonadi/Contact/ContactEditor>
#include <AkonadiCore/item.h>
#include <QApplication>
#include <KAboutData>
#include <KLocalizedString>
#include <QCommandLineParser>
#include <QDialogButtonBox>
#include <QVBoxLayout>
Dialog::Dialog(QWidget *parent)
: QDialog(parent)
{
setWindowTitle(i18n("Contact Editor"));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
connect(buttonBox, &QDialogButtonBox::accepted, this, &Dialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &Dialog::reject);
QWidget *wdg = new QWidget(this);
mainLayout->addWidget(wdg);
mainLayout->addWidget(buttonBox);
QGridLayout *layout = new QGridLayout(wdg);
mEditor = new Akonadi::AkonadiContactEditor(Akonadi::AkonadiContactEditor::EditMode, wdg);
layout->addWidget(mEditor, 0, 0, 1, 3);
QLabel *label = new QLabel(i18n("Item Id:"), wdg);
layout->addWidget(label, 1, 0);
mId = new QLineEdit(wdg);
layout->addWidget(mId, 1, 1);
QPushButton *button = new QPushButton(i18n("Load"), wdg);
layout->addWidget(button, 1, 2);
connect(button, &QPushButton::clicked, this, &Dialog::load);
button = new QPushButton(i18n("Save"), wdg);
layout->addWidget(button, 2, 2);
connect(button, &QPushButton::clicked, this, &Dialog::save);
}
Dialog::~Dialog()
{
}
void Dialog::load()
{
mEditor->loadContact(Akonadi::Item(mId->text().toLongLong()));
}
void Dialog::save()
{
mEditor->saveContactInAddressBook();
}
int main(int argc, char **argv)
{
KAboutData aboutData(QStringLiteral("kabceditor"), i18n("KABC Editor"), QStringLiteral("1.0"));
aboutData.setShortDescription(i18n("A contact editor for Akonadi"));
QApplication app(argc, argv);
QCommandLineParser parser;
KAboutData::setApplicationData(aboutData);
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
Dialog dlg;
dlg.exec();
return 0;
}
/*
This file is part of Akonadi.
Copyright (c) 2007 Tobias Koenig <tokoe@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 KABCEDITOR_H
#define KABCEDITOR_H
#include <QDialog>
class QLineEdit;
namespace Akonadi {
class AkonadiContactEditor;
}
class Dialog : public QDialog
{
Q_OBJECT
public:
explicit Dialog(QWidget *parent = nullptr);
~Dialog();
private Q_SLOTS:
void load();
void save();
private:
Akonadi::AkonadiContactEditor *mEditor;
QLineEdit *mId;
};
#endif
/*
This file is part of Akonadi.
Copyright (c) 2007 Tobias Koenig <tokoe@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 "kabcviewer.h"
#include <QVBoxLayout>
#include <KLocalizedString>
#include <Akonadi/Contact/ContactViewer>
#include <QDialogButtonBox>
#include <QPushButton>
#include <QApplication>
#include <KAboutData>
#include <QCommandLineParser>
#include <QCommandLineOption>
Dialog::Dialog(QWidget *parent)
: QDialog(parent)
{
setWindowTitle(i18n("Contact Viewer"));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
connect(buttonBox, &QDialogButtonBox::accepted, this, &Dialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &Dialog::reject);
mBrowser = new Akonadi::ContactViewer(this);
mainLayout->addWidget(mBrowser);
mainLayout->addWidget(buttonBox);
resize(520, 580);
}
Dialog::~Dialog()
{
}
void Dialog::loadUid(Akonadi::Item::Id uid)
{
mBrowser->setContact(Akonadi::Item(uid));
}
int main(int argc, char **argv)
{
KAboutData aboutData(QStringLiteral("kabcviewer"), i18n("KABC Viewer"), QStringLiteral("1.0"));
aboutData.setShortDescription(i18n("A contact viewer for Akonadi"));
QApplication app(argc, argv);
QCommandLineParser parser;
KAboutData::setApplicationData(aboutData);
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("uid"), i18n("Uid of the Akonadi contact"), QStringLiteral("uid")));
Dialog dlg;
if (!parser.isSet(QStringLiteral("uid"))) {
parser.showHelp();
return 1;
}
dlg.loadUid(parser.value(QStringLiteral("uid")).toLongLong());
dlg.exec();
return 0;
}
/*
This file is part of Akonadi.
Copyright (c) 2007 Tobias Koenig <tokoe@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 KABCVIEWER_H
#define KABCVIEWER_H
#include <AkonadiCore/item.h>
#include <QDialog>
namespace Akonadi {
class ContactViewer;
}
class Dialog : public QDialog
{
Q_OBJECT
public:
explicit Dialog(QWidget *parent = nullptr);
~Dialog();
void loadUid(Akonadi::Item::Id uid);
private:
Akonadi::ContactViewer *mBrowser;
};
#endif
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