krop's commit fixes my problem in a better way, reverting
[kdepim.git] / kmail / kmmainwin.h
blob6229380306301d16cbf13359aa6c8a787c30285b
1 /*
2 * kmail: KDE mail client
3 * Copyright (c) 1996-1998 Stefan Taferner <taferner@kde.org>
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.
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.
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.
20 #ifndef __KMMAINWIN
21 #define __KMMAINWIN
23 #include <kxmlguiwindow.h>
24 #include "qstring.h"
26 class KMMainWidget;
27 namespace KPIM {
28 class StatusbarProgressWidget;
29 class ProgressDialog;
31 using KPIM::StatusbarProgressWidget;
32 using KPIM::ProgressDialog;
34 class KMMainWin : public KXmlGuiWindow
36 Q_OBJECT
38 public:
39 // the main window needs to have a name since else restoring the window
40 // settings by kwin doesn't work
41 KMMainWin(QWidget *parent = 0);
42 virtual ~KMMainWin();
43 KMMainWidget *mainKMWidget() const { return mKMMainWidget; }
44 StatusbarProgressWidget* progressWidget() const { return mLittleProgress; }
45 ProgressDialog* progressDialog() const { return mProgressDialog; }
47 /// Same as KMMainWin::restore(), except that it also restores the docked state,
48 /// which we have saved in saveProperties().
49 /// TODO: KDE5: Move to kdelibs, see http://reviewboard.kde.org/r/504
50 bool restoreDockedState( int number );
52 public slots:
53 void displayStatusMsg(const QString&);
54 void slotEditToolbars();
55 void slotUpdateToolbars();
56 void setupStatusBar();
58 protected:
60 /// Reimplemented to save the docked state
61 virtual void saveProperties( KConfigGroup & );
63 virtual bool queryClose ();
65 protected slots:
66 void slotQuit();
67 void slotShowTipOnStart();
69 private slots:
70 void slotNewMailReader();
72 private:
73 KMMainWidget *mKMMainWidget;
74 StatusbarProgressWidget *mLittleProgress;
75 ProgressDialog *mProgressDialog;
76 int mMessageStatusId;
77 bool mReallyClose;
80 #endif