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 c3322cd3 authored by Laurent Montel's avatar Laurent Montel 😁

Create a console indicator

parent 43c99c21
......@@ -133,3 +133,4 @@ install(FILES backup-structure.txt DESTINATION ${DATA_INSTALL_DIR}/pimsettingexp
kde4_install_icons( ${ICON_INSTALL_DIR} )
add_subdirectory(tests)
add_subdirectory(gui)
add_subdirectory(console)
include_directories(${AKONADI_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/libkdepim
${CMAKE_SOURCE_DIR}/mailcommon
${CMAKE_SOURCE_DIR}/messageviewer
${CMAKE_SOURCE_DIR}/pimcommon
${CMAKE_SOURCE_DIR}/messagecomposer/
${CMAKE_SOURCE_DIR}/pimsettingexporter/
)
set(pimsettingexporterconsole_SRCS
importexportprogressindicatorconsole.cpp
main.cpp)
kde4_add_executable(pimsettingexporterconsole ${pimsettingexporterconsole_SRCS})
target_link_libraries(pimsettingexporterconsole
${KDE4_KFILE_LIBS}
${KDE4_KIO_LIBS}
${KDEPIMLIBS_AKONADI_LIBS}
${KDEPIMLIBS_AKONADI_KMIME_LIBS}
${KDEPIMLIBS_KMIME_LIBS}
${KDEPIMLIBS_KPIMUTILS_LIBS}
${KDEPIMLIBS_MAILTRANSPORT_LIBS}
${AKONADI_COMMON_LIBRARIES}
${KDEPIMLIBS_KALARMCAL_LIBS}
${QT_QTXML_LIBRARY}
mailimporter
mailcommon
pimcommon
kdepim
messagecomposer
pimsettingexporterprivate
)
install(TARGETS pimsettingexporterconsole ${INSTALL_TARGETS_DEFAULT_ARGS} )
/*
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 "importexportprogressindicatorconsole.h"
#include <QDebug>
ImportExportProgressIndicatorConsole::ImportExportProgressIndicatorConsole(QObject *parent)
: ImportExportProgressIndicatorBase(parent)
{
}
ImportExportProgressIndicatorConsole::~ImportExportProgressIndicatorConsole()
{
}
void ImportExportProgressIndicatorConsole::showInfo(const QString &text)
{
Q_EMIT info(text);
}
void ImportExportProgressIndicatorConsole::showErrorMessage(const QString &message, const QString &title)
{
qDebug()<<" message "<< message << " title "<<title;
}
/*
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 IMPORTEXPORTPROGRESSINDICATORCONSOLE_H
#define IMPORTEXPORTPROGRESSINDICATORCONSOLE_H
#include "importexportprogressindicatorbase.h"
class ImportExportProgressIndicatorConsole : public ImportExportProgressIndicatorBase
{
Q_OBJECT
public:
explicit ImportExportProgressIndicatorConsole(QObject *parent = 0);
~ImportExportProgressIndicatorConsole();
private:
void showInfo(const QString &text);
void showErrorMessage(const QString &message, const QString &title);
};
#endif // IMPORTEXPORTPROGRESSINDICATORCONSOLE_H
/*
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 "pimsettingexporter_options.h"
#include <kcmdlineargs.h>
#include <kaboutdata.h>
#include "kdepim-version.h"
int main(int argc, char *argv[])
{
#if 0
KLocale::setMainCatalog("pimsettingexporter");
KAboutData aboutData( "pimsettingexporter", 0, ki18n("PIM Setting Exporter"),
KDEPIM_VERSION, ki18n("PIM Setting Exporter"), KAboutData::License_GPL_V2,
ki18n("Copyright © 2012-2014 pimsettingexporter authors"));
aboutData.addAuthor(ki18n("Laurent Montel"), ki18n("Maintainer"), "montel@kde.org");
aboutData.setProgramIconName(QLatin1String("kontact"));
KCmdLineArgs::init( argc, argv, &aboutData );
KCmdLineArgs::addCmdLineOptions( pimsettingexporter_options() ); // Add our own options.
KUniqueApplication::addCmdLineOptions();
if (!KUniqueApplication::start())
{
kDebug() << "pimsettingexporter is already running!";
return (0);
}
KUniqueApplication a;
PimSettingExporterWindow *backupMailWin = new PimSettingExporterWindow();
a.setTopWidget(backupMailWin);
backupMailWin->show();
backupMailWin->handleCommandLine();
return a.exec();
#endif
return 0;
}
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