kmail

kmpopfiltercnfrmdlg.h
1 /***************************************************************************
2  kmpopheadersdlg.h - description
3  -------------------
4  begin : Sat Nov 3 2001
5  copyright : (C) 2001 by Heiko Hund
6  email : heiko@ist.eigentlich.net
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef KMPOPHEADERSDLG_H
19 #define KMPOPHEADERSDLG_H
20 
21 #include "kmpopheaders.h"
22 
23 #include <kdialogbase.h>
24 #include <tdelistview.h>
25 
26 #include <tqptrlist.h>
27 #include <tqmap.h>
28 
29 class TQWidget;
30 class TQString;
31 
32 class KMPopFilterCnfrmDlg;
36 class KMPopHeadersView : public TDEListView
37 {
38  TQ_OBJECT
39 
40 
41 public:
42  KMPopHeadersView(TQWidget *aParent=0, KMPopFilterCnfrmDlg *aDialog=0);
44  static const KMPopFilterAction mapToAction(int aColumn) { return (KMPopFilterAction)aColumn;};
45  static const int mapToColumn(KMPopFilterAction aAction) { return (int)aAction;};
46  static const char *mUnchecked[26];
47  static const char *mChecked[26];
48 protected:
49  static const char *mLater[25];
50  static const char *mDown[20];
51  static const char *mDel[19];
52  void keyPressEvent( TQKeyEvent *k);
53 
54 protected slots: // Protected slots
55  void slotPressed(TQListViewItem* aItem, const TQPoint& aPoint, int aColumn);
56 
57 private:
58  KMPopFilterCnfrmDlg *mDialog;
59 };
60 
61 
62 
63 class KMPopHeadersViewItem : public TDEListViewItem
64 {
65 public:
66  KMPopHeadersViewItem(KMPopHeadersView *aParent, KMPopFilterAction aAction);
67  ~KMPopHeadersViewItem();
68  void setAction(KMPopFilterAction aAction);
69  KMPopFilterAction action() { return mAction; };
70  virtual void paintFocus(TQPainter *, const TQColorGroup & cg, const TQRect &r);
71  virtual TQString key(int col, bool ascending) const;
72 protected:
73  KMPopHeadersView *mParent;
74  KMPopFilterAction mAction;
75 };
76 
77 
78 class KMPopFilterCnfrmDlg : public KDialogBase
79 {
80  friend class ::KMPopHeadersView;
81  TQ_OBJECT
82 
83 protected:
84  KMPopFilterCnfrmDlg() { };
85  TQMap<TQListViewItem*, KMPopHeaders*> mItemMap;
86  TQPtrList<KMPopHeadersViewItem> mDelList;
87  TQPtrList<KMPopHeaders> mDDLList;
88  KMPopHeadersView *mFilteredHeaders;
89  bool mLowerBoxVisible;
90  bool mShowLaterMsgs;
91  void setupLVI(KMPopHeadersViewItem *lvi, KMMessage *msg);
92 
93 
94 public:
95  KMPopFilterCnfrmDlg(TQPtrList<KMPopHeaders> *aHeaders, const TQString &aAccount, bool aShowLaterMsgs = false, TQWidget *aParent=0, const char *aName=0);
96  ~KMPopFilterCnfrmDlg();
97 
98 public:
99  void setAction(TQListViewItem *aItem, KMPopFilterAction aAction);
100 
101 protected slots: // Protected slots
108  void slotPressed(TQListViewItem *aItem, const TQPoint &aPnt, int aColumn);
109  void slotToggled(bool aOn);
110  void slotUpdateMinimumSize();
111 };
112 
113 #endif
This is a Mime Message.
Definition: kmmessage.h:68
KMPopHeadersView(TQWidget *aParent=0, KMPopFilterCnfrmDlg *aDialog=0)
view