Fix typos
[kdepim.git] / kmail / kmmainwin.h
blob2997d439f9664f132ded760a8bd12e4a7016a67b
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 class KToggleAction;
28 namespace KPIM {
29 class StatusbarProgressWidget;
30 class ProgressDialog;
32 using KPIM::StatusbarProgressWidget;
33 using KPIM::ProgressDialog;
35 class KMMainWin : public KXmlGuiWindow
37 Q_OBJECT
39 public:
40 // the main window needs to have a name since else restoring the window
41 // settings by kwin doesn't work
42 explicit KMMainWin(QWidget *parent = 0);
43 virtual ~KMMainWin();
44 KMMainWidget *mainKMWidget() const { return mKMMainWidget; }
45 StatusbarProgressWidget* progressWidget() const { return mLittleProgress; }
46 ProgressDialog* progressDialog() const { return mProgressDialog; }
48 /// Same as KMMainWin::restore(), except that it also restores the docked state,
49 /// which we have saved in saveProperties().
50 /// TODO: KDE5: Move to kdelibs, see http://reviewboard.kde.org/r/504
51 bool restoreDockedState( int number );
53 public slots:
54 void displayStatusMsg(const QString&);
55 void slotEditToolbars();
56 void slotUpdateGui();
57 void setupStatusBar();
59 protected:
61 /// Reimplemented to save the docked state
62 void saveProperties( KConfigGroup & );
64 bool queryClose ();
66 protected slots:
67 void slotQuit();
68 void slotShowTipOnStart();
70 private slots:
71 void slotNewMailReader();
72 void slotToggleMenubar(bool dontShowWarning = false);
74 private:
75 KMMainWidget *mKMMainWidget;
76 StatusbarProgressWidget *mLittleProgress;
77 ProgressDialog *mProgressDialog;
78 KToggleAction *mHideMenuBarAction;
79 bool mReallyClose;
82 #endif