kmmainwin.h
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 "tqstring.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 TQ_OBJECT 00039 00040 public: 00041 // the main window needs to have a name since else restoring the window 00042 // settings by kwin doesn't work 00043 KMMainWin(TQWidget *parent = 0); 00044 virtual ~KMMainWin(); 00045 KMMainWidget *mainKMWidget() const { return mKMMainWidget; }; 00046 StatusbarProgressWidget* progressWidget() const { return mLittleProgress; } 00047 ProgressDialog* progressDialog() const { return mProgressDialog; } 00048 00049 00051 virtual void readConfig(void); 00052 00054 virtual void writeConfig(void); 00055 00056 public slots: 00057 void displayStatusMsg(const TQString&); 00058 void slotEditToolbars(); 00059 void slotUpdateToolbars(); 00060 void setupStatusBar(); 00061 00062 protected: 00063 virtual bool queryClose (); 00064 00065 protected slots: 00066 void slotQuit(); 00067 void slotConfigChanged(); 00068 void slotShowTipOnStart(); 00069 00070 private slots: 00071 void slotNewMailReader(); 00072 00073 private: 00074 KMMainWidget *mKMMainWidget; 00075 StatusbarProgressWidget *mLittleProgress; 00076 ProgressDialog *mProgressDialog; 00077 int mMessageStatusId; 00078 bool mReallyClose; 00079 }; 00080 00081 #endif