kmail Library API Documentation

kmfldsearch.h

00001 /* kmfldsearch
00002  * (c) 1999 Stefan Taferner, (c) 2001 Aaron J. Seigo
00003  * This code is under GPL
00004  */
00005 #ifndef kmfldsearch_h
00006 #define kmfldsearch_h
00007 
00008 #include <qvaluelist.h>
00009 #include <qptrlist.h>
00010 #include <qstringlist.h>
00011 #include <qguardedptr.h>
00012 
00013 #include <kdialogbase.h>
00014 #include <kxmlguiclient.h>
00015 #include <mimelib/string.h>
00016 
00017 class QCheckBox;
00018 class QComboBox;
00019 class QGridLayout;
00020 class QLabel;
00021 class QLineEdit;
00022 class KListView;
00023 class QListViewItem;
00024 class QPushButton;
00025 class QRadioButton;
00026 class KAction;
00027 class KActionMenu;
00028 class KMFolder;
00029 class KMFolderSearch;
00030 class KMFolderComboBox;
00031 class KMFolderImap;
00032 class KMFolderMgr;
00033 class KMMainWidget;
00034 class KMMessage;
00035 class KMSearchPattern;
00036 class KMSearchPatternEdit;
00037 class KStatusBar;
00038 class DwBoyerMoore;
00039 
00040 typedef QPtrList<KMMsgBase> KMMessageList;
00041 
00042 class KMFldSearch: public KDialogBase, virtual public KXMLGUIClient
00043 {
00044   Q_OBJECT
00045 
00046 public:
00047   KMFldSearch(KMMainWidget* parent, const char* name=0,
00048               KMFolder *curFolder=0, bool modal=FALSE);
00049   virtual ~KMFldSearch();
00050 
00051   void activateFolder(KMFolder* curFolder);
00052   KMMessageList selectedMessages();
00053   KMMessage* message();
00054 
00055 protected slots:
00057   virtual void updStatus(void);
00058 
00059   virtual void slotClose();
00060   virtual void slotSearch();
00061   virtual void slotStop();
00062   void updateCreateButton( const QString &);
00063   void renameSearchFolder();
00064   void openSearchFolder();
00065   void folderInvalidated(KMFolder *);
00066   virtual bool slotShowMsg(QListViewItem *);
00067   virtual void updateContextMenuActions();
00068   virtual void slotContextMenuRequested( QListViewItem*, const QPoint &, int );
00069   virtual void copySelectedToFolder( int menuId );
00070   virtual void moveSelectedToFolder( int menuId );
00071   virtual void slotFolderActivated(int nr);
00072   void slotClearSelection();
00073   void slotReplyToMsg();
00074   void slotReplyAllToMsg();
00075   void slotReplyListToMsg();
00076   void slotForwardMsg();
00077   void slotForwardAttachedMsg();
00078   void slotSaveMsg();
00079   void slotSaveAttachments();
00080   void slotPrintMsg();
00081 
00083   virtual void searchDone();
00084   virtual void slotAddMsg(int idx);
00085   virtual void slotRemoveMsg(KMFolder *, Q_UINT32 serNum);
00086   void enableGUI();
00087 
00088 protected:
00089 
00091   virtual void keyPressEvent(QKeyEvent*);
00092 
00094   virtual void closeEvent(QCloseEvent*);
00095 
00096 protected:
00097   bool mStopped;
00098   bool mCloseRequested;
00099   int mFetchingInProgress;
00100   int mSortColumn;
00101 #if QT_VERSION >= 0x030200
00102   SortOrder mSortOrder;
00103 #endif
00104   QGuardedPtr<KMFolderSearch> mFolder;
00105   QTimer *mTimer;
00106 
00107   // GC'd by Qt
00108   QRadioButton *mChkbxAllFolders;
00109   QRadioButton *mChkbxSpecificFolders;
00110   KMFolderComboBox *mCbxFolders;
00111   QPushButton *mBtnSearch;
00112   QPushButton *mBtnStop;
00113   QCheckBox *mChkSubFolders;
00114   KListView* mLbxMatches;
00115   QLabel *mSearchFolderLbl;
00116   QLineEdit *mSearchFolderEdt;
00117   QPushButton *mSearchFolderBtn;
00118   QPushButton *mSearchFolderOpenBtn;
00119   KStatusBar* mStatusBar;
00120   QWidget* mLastFocus; // to remember the position of the focus
00121   QMap<int,KMFolder*> mMenuToFolder;
00122   KAction *mReplyAction, *mReplyAllAction, *mReplyListAction, *mSaveAsAction,
00123     *mForwardAction, *mForwardAttachedAction, *mPrintAction, *mClearAction,
00124     *mSaveAtchAction;
00125   KActionMenu *mForwardActionMenu;
00126   QValueList<QGuardedPtr<KMFolder> > mFolders;
00127 
00128   // not owned by us
00129   KMMainWidget* mKMMainWidget;
00130   KMSearchPatternEdit *mPatternEdit;
00131   KMSearchPattern *mSearchPattern;
00132 
00133   static const int MSGID_COLUMN;
00134 };
00135 #endif /*kmfldsearch_h*/
KDE Logo
This file is part of the documentation for kmail Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:37:26 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003