kmail

kmmainwin.h
1/*
2 * kmail: KDE mail client
3 * Copyright (c) 1996-1998 Stefan Taferner <taferner@kde.org>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 *
19 */
20#ifndef __KMMAINWIN
21#define __KMMAINWIN
22
23#include <tdemainwindow.h>
24#include "tqstring.h"
25
26class KMMainWidget;
27namespace KPIM {
28 class StatusbarProgressWidget;
29 class ProgressDialog;
30}
31using KPIM::StatusbarProgressWidget;
32using KPIM::ProgressDialog;
33
34class KMMainWin : public TDEMainWindow
35{
36 TQ_OBJECT
37
38
39public:
40 // the main window needs to have a name since else restoring the window
41 // settings by twin doesn't work
42 KMMainWin(TQWidget *parent = 0);
43 virtual ~KMMainWin();
44 KMMainWidget *mainKMWidget() const { return mKMMainWidget; };
45 StatusbarProgressWidget* progressWidget() const { return mLittleProgress; }
46 ProgressDialog* progressDialog() const { return mProgressDialog; }
47
48
50 virtual void readConfig(void);
51
53 virtual void writeConfig(void);
54
55public slots:
56 void displayStatusMsg(const TQString&);
57 void slotEditToolbars();
58 void slotUpdateToolbars();
59 void setupStatusBar();
60
61protected:
62 virtual bool queryClose ();
63
64protected slots:
65 void slotQuit();
66 void slotConfigChanged();
67 void slotShowTipOnStart();
68
69private slots:
70 void slotNewMailReader();
71
72private:
73 KMMainWidget *mKMMainWidget;
74 StatusbarProgressWidget *mLittleProgress;
75 ProgressDialog *mProgressDialog;
76 int mMessageStatusId;
77 bool mReallyClose;
78};
79
80#endif