~ubuntu-branches/ubuntu/oneiric/kdepim/oneiric-updates

« back to all changes in this revision

Viewing changes to mobile/lib/importhandlerbase.h

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-06-28 19:33:24 UTC
  • mfrom: (0.2.13) (0.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20110628193324-8yvjs8sdv9rdoo6c
Tags: 4:4.7.0-0ubuntu1
* New upstream release
  - update install files
  - add missing kdepim-doc package to control file
  - Fix Vcs lines
  - kontact breaks/replaces korganizer << 4:4.6.80
  - tighten the dependency of kdepim-dev on libkdepim4 to fix lintian error

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (c) 2010 Tobias Koenig <tokoe@kde.org>
 
3
 
 
4
    This library is free software; you can redistribute it and/or modify it
 
5
    under the terms of the GNU Library General Public License as published by
 
6
    the Free Software Foundation; either version 2 of the License, or (at your
 
7
    option) any later version.
 
8
 
 
9
    This library is distributed in the hope that it will be useful, but WITHOUT
 
10
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
11
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
 
12
    License for more details.
 
13
 
 
14
    You should have received a copy of the GNU Library General Public License
 
15
    along with this library; see the file COPYING.LIB.  If not, write to the
 
16
    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 
17
    02110-1301, USA.
 
18
*/
 
19
 
 
20
#ifndef IMPORTHANDLERBASE_H
 
21
#define IMPORTHANDLERBASE_H
 
22
 
 
23
#include "mobileui_export.h"
 
24
 
 
25
#include <akonadi/item.h>
 
26
 
 
27
#include <QtCore/QObject>
 
28
 
 
29
class KJob;
 
30
class KProgressDialog;
 
31
class QItemSelectionModel;
 
32
 
 
33
class MOBILEUI_EXPORT ImportHandlerBase : public QObject
 
34
{
 
35
  Q_OBJECT
 
36
 
 
37
  public:
 
38
    ImportHandlerBase( QObject *parent = 0 );
 
39
    ~ImportHandlerBase();
 
40
 
 
41
    void setSelectionModel( QItemSelectionModel *model );
 
42
 
 
43
  public Q_SLOTS:
 
44
    void exec();
 
45
 
 
46
  protected:
 
47
    virtual QString fileDialogNameFilter() const = 0;
 
48
    virtual QString fileDialogTitle() const = 0;
 
49
    virtual QString collectionDialogText() const = 0;
 
50
    virtual QString collectionDialogTitle() const = 0;
 
51
    virtual QString importDialogText( int count, const QString &collectionName ) const = 0;
 
52
    virtual QString importDialogTitle() const = 0;
 
53
 
 
54
    virtual QStringList mimeTypes() const = 0;
 
55
    virtual Akonadi::Item::List createItems( const QStringList &fileNames, bool *ok ) = 0;
 
56
 
 
57
  private Q_SLOTS:
 
58
    void slotImportJobDone( KJob* );
 
59
 
 
60
  private:
 
61
    KProgressDialog *mImportProgressDialog;
 
62
    QItemSelectionModel *mSelectionModel;
 
63
};
 
64
 
 
65
#endif