~ubuntu-branches/ubuntu/quantal/kdepim/quantal

« back to all changes in this revision

Viewing changes to mailcommon/filteractionmissingcollectiondialog.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-15 14:17:51 UTC
  • mto: This revision was merged to the branch mainline in revision 193.
  • Revision ID: package-import@ubuntu.com-20111215141751-bmhdpiwl23wd9w26
Tags: upstream-4.7.90
ImportĀ upstreamĀ versionĀ 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: C++; c-file-style: "gnu" -*-
 
2
  This file is part of KMail, the KDE mail client.
 
3
  Copyright (c) 2011 Montel Laurent <montel@kde.org>
 
4
 
 
5
  KMail is free software; you can redistribute it and/or modify it
 
6
  under the terms of the GNU General Public License, version 2, as
 
7
  published by the Free Software Foundation.
 
8
 
 
9
  KMail is distributed in the hope that it will be useful, but
 
10
  WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
  General Public License for more details.
 
13
 
 
14
  You should have received a copy of the GNU General Public License along
 
15
  with this program; if not, write to the Free Software Foundation, Inc.,
 
16
  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
17
*/
 
18
 
 
19
#ifndef FILTERACTIONMISSINGCOLLECTIONDIALOG_H
 
20
#define FILTERACTIONMISSINGCOLLECTIONDIALOG_H
 
21
 
 
22
#include <KDialog>
 
23
#include <akonadi/collection.h>
 
24
 
 
25
class QAbstractItemModel;
 
26
class QModelIndex;
 
27
class QListWidget;
 
28
 
 
29
namespace MailCommon {
 
30
  class FolderRequester;
 
31
}
 
32
 
 
33
class FilterActionMissingCollectionDialog : public KDialog
 
34
{
 
35
  Q_OBJECT
 
36
public:
 
37
  explicit FilterActionMissingCollectionDialog( const Akonadi::Collection::List& list, const QString & filtername, QWidget *parent = 0 );
 
38
  ~FilterActionMissingCollectionDialog();
 
39
 
 
40
  Akonadi::Collection selectedCollection() const;
 
41
  static Akonadi::Collection::List potentialCorrectFolders( const QString& path, bool & exactPath  );
 
42
 
 
43
private Q_SLOTS:
 
44
  void slotCurrentItemChanged();
 
45
 
 
46
 
 
47
private:
 
48
  static void getPotentialFolders(  const QAbstractItemModel *model, const QModelIndex& parentIndex, const QString& realPath, Akonadi::Collection::List& list );
 
49
  enum collectionEnum {
 
50
    IdentifyCollection = Qt::UserRole +1
 
51
  };
 
52
 
 
53
private:
 
54
  MailCommon::FolderRequester *mFolderRequester;
 
55
  QListWidget *mListwidget;
 
56
 
 
57
};
 
58
 
 
59
#endif /* FILTERACTIONMISSINGCOLLECTIONDIALOG_H */
 
60