kmail

messagecopyhelper.h
1 /*
2  Copyright (c) 2007 Volker Krause <vkrause@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 KMAIL_MESSAGECOPYHELPER_H
21 #define KMAIL_MESSAGECOPYHELPER_H
22 
23 #include <tqguardedptr.h>
24 #include <tqobject.h>
25 #include <tqptrlist.h>
26 
27 #include <maillistdrag.h>
28 
29 class KMCommand;
30 class KMFolder;
31 class KMMsgBase;
32 
33 namespace KMail {
34 
39 class MessageCopyHelper : public TQObject
40 {
41  TQ_OBJECT
42 
43 
44  public:
53  MessageCopyHelper( const TQValueList<TQ_UINT32> &msgs, KMFolder *dest,
54  bool move, TQObject *parent = 0 );
55 
59  static TQValueList<TQ_UINT32> serNumListFromMailList( const KPIM::MailList &list );
60 
64  static TQValueList<TQ_UINT32> serNumListFromMsgList( TQPtrList<KMMsgBase> list );
65 
69  static bool inReadOnlyFolder( const TQValueList<TQ_UINT32> &sernums );
70 
71  private slots:
72  void copyCompleted( KMCommand *cmd );
73 
74  private:
75  TQMap<TQGuardedPtr<KMFolder>, int> mOpenFolders;
76 };
77 
78 }
79 
80 #endif
Mail folder.
Definition: kmfolder.h:69
Helper class to copy/move a set of messages defined by their serial numbers from arbitrary folders in...
static bool inReadOnlyFolder(const TQValueList< TQ_UINT32 > &sernums)
Checks of any of the given messages comes from a read-only source.
MessageCopyHelper(const TQValueList< TQ_UINT32 > &msgs, KMFolder *dest, bool move, TQObject *parent=0)
Creates new MessageCopyHelper object to copy the given messages to the specified destination folder.
static TQValueList< TQ_UINT32 > serNumListFromMsgList(TQPtrList< KMMsgBase > list)
Converts a KMMsgsBase* list into a serial number list.
static TQValueList< TQ_UINT32 > serNumListFromMailList(const KPIM::MailList &list)
Converts a MailList into a serial number list.
folderdiaquotatab.h
Definition: aboutdata.cpp:40