kmail

kmmainwin.h

Go to the documentation of this file.
00001 /*
00002  * kmail: KDE mail client
00003  * Copyright (c) 1996-1998 Stefan Taferner <taferner@kde.org>
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00018  *
00019  */
00020 #ifndef __KMMAINWIN
00021 #define __KMMAINWIN
00022 
00023 #include <kmainwindow.h>
00024 #include "kdeversion.h"
00025 #include "qstring.h"
00026 
00027 class KMMainWidget;
00028 namespace KPIM {
00029    class StatusbarProgressWidget;
00030    class ProgressDialog;
00031 }
00032 using KPIM::StatusbarProgressWidget;
00033 using KPIM::ProgressDialog;
00034 
00035 class KMMainWin : public KMainWindow
00036 {
00037   Q_OBJECT
00038 
00039 public:
00040   // the main window needs to have a name since else restoring the window
00041   // settings by kwin doesn't work
00042   KMMainWin(QWidget *parent = 0);
00043   virtual ~KMMainWin();
00044   KMMainWidget *mainKMWidget() const { return mKMMainWidget; };
00045   StatusbarProgressWidget* progressWidget() const { return mLittleProgress; }
00046   ProgressDialog* progressDialog() const { return mProgressDialog; }
00047 
00048 
00050   virtual void readConfig(void);
00051 
00053   virtual void writeConfig(void);
00054 
00055 public slots:
00056   void displayStatusMsg(const QString&);
00057   void slotEditToolbars();
00058   void slotUpdateToolbars();
00059   void setupStatusBar();
00060 
00061 protected:
00062   virtual bool queryClose ();
00063 
00064 protected slots:
00065   void slotQuit();
00066   void slotConfigChanged();
00067   void slotShowTipOnStart();
00068 
00069 private slots:
00070   void slotNewMailReader();
00071 
00072 private:
00073   KMMainWidget *mKMMainWidget;
00074   StatusbarProgressWidget *mLittleProgress;
00075   ProgressDialog *mProgressDialog;
00076   int mMessageStatusId;
00077   bool mReallyClose;
00078 };
00079 
00080 #endif