Commit 91b43075 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add title

parent 3beea96e
......@@ -53,6 +53,7 @@ public:
Q_SIGNALS:
void info(const QString &);
void error(const QString &);
void title(const QString &);
protected:
void copyToDirectory(const KArchiveEntry *entry, const QString &dest);
......
......@@ -42,6 +42,7 @@ ExportAddressbookJob::~ExportAddressbookJob()
void ExportAddressbookJob::start()
{
Q_EMIT title(i18n("Start export kaddressbook settings..."));
mArchiveDirectory = archive()->directory();
if (mTypeSelected & Utils::Resources) {
backupResources();
......
......@@ -45,6 +45,7 @@ ImportAddressbookJob::~ImportAddressbookJob()
void ImportAddressbookJob::start()
{
Q_EMIT title(i18n("Start import kaddressbook settings..."));
mArchiveDirectory = archive()->directory();
searchAllFiles(mArchiveDirectory, QString());
if (mTypeSelected & Utils::Resources)
......
......@@ -43,6 +43,7 @@ ExportAlarmJob::~ExportAlarmJob()
void ExportAlarmJob::start()
{
Q_EMIT title(i18n("Start export kalarm settings..."));
mArchiveDirectory = archive()->directory();
if (mTypeSelected & Utils::Resources) {
backupResources();
......
......@@ -46,6 +46,7 @@ ImportAlarmJob::~ImportAlarmJob()
void ImportAlarmJob::start()
{
Q_EMIT title(i18n("Start import kalarm settings..."));
mArchiveDirectory = archive()->directory();
searchAllFiles(mArchiveDirectory ,QString());
if (mTypeSelected & Utils::Resources)
......
......@@ -44,6 +44,7 @@ ExportCalendarJob::~ExportCalendarJob()
void ExportCalendarJob::start()
{
Q_EMIT title(i18n("Start export korganizer settings..."));
mArchiveDirectory = archive()->directory();
createProgressDialog();
......
......@@ -43,6 +43,7 @@ ImportCalendarJob::~ImportCalendarJob()
void ImportCalendarJob::start()
{
Q_EMIT title(i18n("Start import korganizer settings..."));
mArchiveDirectory = archive()->directory();
searchAllFiles(mArchiveDirectory, QString());
if (mTypeSelected & Utils::Resources)
......
......@@ -43,6 +43,7 @@ ExportJotJob::~ExportJotJob()
void ExportJotJob::start()
{
Q_EMIT title(i18n("Start export kjots settings..."));
mArchiveDirectory = archive()->directory();
if (mTypeSelected & Utils::Resources) {
backupResources();
......
......@@ -44,6 +44,7 @@ ImportJotJob::~ImportJotJob()
void ImportJotJob::start()
{
Q_EMIT title(i18n("Start import kjots settings..."));
mArchiveDirectory = archive()->directory();
searchAllFiles(mArchiveDirectory ,QString());
if (mTypeSelected & Utils::Resources)
......
......@@ -52,7 +52,17 @@ void LogWidget::addErrorLogEntry( const QString &log )
mCustomLogWidget->addErrorLogEntry(log);
}
void LogWidget::addTitleLogEntry( const QString &log )
{
mCustomLogWidget->addTitleLogEntry(log);
}
QString LogWidget::toHtml() const
{
return mCustomLogWidget->toHtml();
}
QString LogWidget::toPlainText() const
{
return mCustomLogWidget->toPlainText();
}
......@@ -30,10 +30,12 @@ public:
explicit LogWidget(QWidget *parent);
~LogWidget();
void addInfoLogEntry( const QString& log );
void addErrorLogEntry( const QString& log );
void addInfoLogEntry( const QString &log );
void addErrorLogEntry( const QString &log );
void addTitleLogEntry( const QString &log );
void clear();
QString toHtml() const;
QString toPlainText() const;
private:
KPIM::CustomLogWidget *mCustomLogWidget;
......
......@@ -65,6 +65,7 @@ void ExportMailJob::start()
if (!checkProgram())
return;
Q_EMIT title(i18n("Start export knotes settings..."));
createProgressDialog();
if (mTypeSelected & Utils::Identity) {
......
......@@ -66,6 +66,7 @@ ImportMailJob::~ImportMailJob()
void ImportMailJob::start()
{
Q_EMIT title(i18n("Start import kmail settings..."));
mArchiveDirectory = archive()->directory();
searchAllFiles(mArchiveDirectory,QString());
if (!mFileList.isEmpty()|| !mHashMailArchive.isEmpty()) {
......
......@@ -43,6 +43,7 @@ ExportNotesJob::~ExportNotesJob()
void ExportNotesJob::start()
{
Q_EMIT title(i18n("Start export knotes settings..."));
mArchiveDirectory = archive()->directory();
if (mTypeSelected & Utils::Config) {
backupConfig();
......
......@@ -42,6 +42,7 @@ ImportNotesJob::~ImportNotesJob()
void ImportNotesJob::start()
{
Q_EMIT title(i18n("Start import knotes settings..."));
mArchiveDirectory = archive()->directory();
if (mTypeSelected & Utils::Config)
restoreConfig();
......
......@@ -198,6 +198,11 @@ void PimSettingExporterWindow::slotAddError(const QString& info)
mLogWidget->addErrorLogEntry(info);
}
void PimSettingExporterWindow::slotAddTitle(const QString &info)
{
mLogWidget->addTitleLogEntry(info);
}
void PimSettingExporterWindow::slotRestoreData()
{
if (KMessageBox::warningYesNo(this,i18n("Before to restore data, close all kdepim applications. Do you want to continue?"),i18n("Backup"))== KMessageBox::No)
......@@ -274,6 +279,7 @@ void PimSettingExporterWindow::executeJob()
{
connect(mImportExportData, SIGNAL(info(QString)), SLOT(slotAddInfo(QString)));
connect(mImportExportData, SIGNAL(error(QString)), SLOT(slotAddError(QString)));
connect(mImportExportData, SIGNAL(title(QString)), SLOT(slotAddTitle(QString)));
mImportExportData->start();
delete mImportExportData;
mImportExportData = 0;
......
......@@ -33,8 +33,9 @@ public:
private Q_SLOTS:
void slotBackupData();
void slotRestoreData();
void slotAddInfo(const QString& info);
void slotAddError(const QString& info);
void slotAddInfo(const QString &info);
void slotAddError(const QString &info);
void slotAddTitle(const QString &info);
void slotSaveLog();
private:
......
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