<commit_before>/*
    This file is part of KitchenSync.

    Copyright (c) 2003 <NAME> <<EMAIL>>

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library 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
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public License
    along with this library; see the file COPYING.LIB.  If not, write to
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
*/

#include "backup.h"

#include "konnectorview.h"
#include "backupview.h"

#include <konnector.h>
#include <configwidget.h>
#include <konnectormanager.h>
#include <konnectorinfo.h>
#include <mainwindow.h>
#include <calendarsyncee.h>
#include <engine.h>

#include <kaboutdata.h>
#include <kiconloader.h>
#include <kparts/genericfactory.h>
#include <kmessagebox.h>
#include <kdialog.h>
#include <kdialogbase.h>
#include <kstandarddirs.h>
#include <kprocess.h>

#include <qlabel.h>
#include <qlistview.h>
#include <qcombobox.h>
#include <qpushbutton.h>
#include <qtextview.h>
#include <qlayout.h>
#include <qdatetime.h>
#include <qcheckbox.h>
#include <qvbox.h>
#include <qdir.h>

using namespace KCal;
using namespace KSync;

typedef KParts::GenericFactory< Backup> BackupFactory;
K_EXPORT_COMPONENT_FACTORY( libksync_backup, BackupFactory )

class BackupItem : public QListViewItem
{
  public:
    BackupItem( QListView *parent, const QString &dirName )
      : QListViewItem( parent )
    {
      QDateTime dt = QDateTime::fromString( dirName, ISODate );
      QString txt;
      if ( dt.isValid() ) {
        txt = KGlobal::locale()->formatDateTime( dt );
        mDirName = dirName;
      } else {
        txt = i18n("Invalid (\"%1\")").arg( dirName );
      }
      setText( 0, txt );
    }
    
    QString dirName() const { return mDirName; }
    
  private:
    QString mDirName;
};

Backup::Backup( QWidget *parent, const char *name,
                    QObject *, const char *,const QStringList & )
  : ActionPart( parent, name ), m_widget( 0 ), mActive( false )
{
  m_pixmap = KGlobal::iconLoader()->loadIcon("kcmdrkonqi", KIcon::Desktop, 48 );
}

KAboutData *Backup::createAboutData()
{
  return new KAboutData("KSyncBackup", I18N_NOOP("Sync Backup Part"), "0.0" );<commit_msg>this class is unused here and clashes with the one in backupview.cpp (for final)<commit_after>/*
    This file is part of KitchenSync.

    Copyright (c) 2003 <NAME> <<EMAIL>>

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library 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
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public License
    along with this library; see the file COPYING.LIB.  If not, write to
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
*/

#include "backup.h"

#include "konnectorview.h"
#include "backupview.h"

#include <konnector.h>
#include <configwidget.h>
#include <konnectormanager.h>
#include <konnectorinfo.h>
#include <mainwindow.h>
#include <calendarsyncee.h>
#include <engine.h>

#include <kaboutdata.h>
#include <kiconloader.h>
#include <kparts/genericfactory.h>
#include <kmessagebox.h>
#include <kdialog.h>
#include <kdialogbase.h>
#include <kstandarddirs.h>
#include <kprocess.h>

#include <qlabel.h>
#include <qlistview.h>
#include <qcombobox.h>
#include <qpushbutton.h>
#include <qtextview.h>
#include <qlayout.h>
#include <qdatetime.h>
#include <qcheckbox.h>
#include <qvbox.h>
#include <qdir.h>

using namespace KCal;
using namespace KSync;

typedef KParts::GenericFactory< Backup> BackupFactory;
K_EXPORT_COMPONENT_FACTORY( libksync_backup, BackupFactory )

Backup::Backup( QWidget *parent, const char *name,
                    QObject *, const char *,const QStringList & )
  : ActionPart( parent, name ), m_widget( 0 ), mActive( false )
{
  m_pixmap = KGlobal::iconLoader()->loadIcon("kcmdrkonqi", KIcon::Desktop, 48 );
}

KAboutData *Backup::createAboutData()
{
  return new KAboutData("KSyncBackup", I18N_NOOP("Sync Backup Part"), "0.0" );
{'fraction_non_alphanumeric': 0.10776218001651527, 'fraction_numerical': 0.011560693641618497, 'mean_word_length': 4.025933609958506, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 64, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7137910', 'n_tokens_mistral': 1603, 'n_tokens_neox': 1547, 'n_words': 520}