akregator/src

mainwindow.h

00001 /*
00002     This file is part of Akregator.
00003 
00004     Copyright (C) 2004 Stanislav Karchebny <Stanislav.Karchebny@kdemail.net>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019 
00020     As a special exception, permission is given to link this program
00021     with any edition of Qt, and distribute the resulting executable,
00022     without including the source code for Qt in the source distribution.
00023 */
00024 
00025 #ifndef _AKREGATOR_H_
00026 #define _AKREGATOR_H_
00027 
00028 #ifdef HAVE_CONFIG_H
00029 #include <config.h>
00030 #endif
00031 
00032 #include <kapplication.h>
00033 #include <kparts/mainwindow.h>
00034 #include <kparts/browserinterface.h>
00035 #include <kparts/browserextension.h>
00036 #include <kio/job.h>
00037 
00038 class KActionCollection;
00039 class KToggleAction;
00040 class KSqueezedTextLabel;
00041 class KProgress;
00042 class KParts::BrowserExtension;
00043 class KParts::PartManager;
00044 
00045 namespace KPIM
00046 {
00047     class StatusbarProgressWidget;
00048 }
00049 
00050 namespace Akregator
00051 {
00052 
00053 class Part;
00054 class MainWindow;
00055 
00056 class BrowserInterface : public KParts::BrowserInterface
00057 {
00058     Q_OBJECT
00059     
00060 public:
00061     BrowserInterface(Akregator::MainWindow *shell, const char *name );
00062 
00063 private:
00064     Akregator::MainWindow *m_shell;
00065 };
00066 
00067 
00074 class MainWindow : public KParts::MainWindow
00075 {
00076     Q_OBJECT
00077 public:
00078 
00079     MainWindow();
00080     virtual ~MainWindow();
00081     
00086     void setupProgressWidgets();
00087 
00088     virtual void setCaption(const QString &);
00089 
00094     bool loadPart();
00095     
00096 public slots:
00097     void slotClearStatusText();
00098     void slotSetStatusBarText(const QString &c);
00099 
00100 protected:
00105     void saveProperties(KConfig *);
00106 
00112     void readProperties(KConfig *);
00116     virtual bool queryExit();
00117       
00121     virtual bool queryClose(); 
00122 
00123 protected slots:
00124 
00125     void slotQuit();
00126     
00127 private:
00128 
00129     void setupActions();
00130     void connectActionCollection(KActionCollection *coll);
00131     
00132     KParts::BrowserExtension *browserExtension(KParts::ReadOnlyPart *p);
00133 
00134 private slots:
00135   
00136     void optionsConfigureKeys();
00137     void optionsConfigureToolbars();
00138     
00139     void applyNewToolbarConfig();
00140 
00141 private:
00142     BrowserInterface *m_browserIface;
00143   
00144     Akregator::Part *m_part;
00145     KPIM::StatusbarProgressWidget *m_progressBar;
00146     KSqueezedTextLabel *m_statusLabel;
00147 };
00148 
00149 } // namespace Akregator
00150 
00151 #endif // _AKREGATOR_H_
KDE Home | KDE Accessibility Home | Description of Access Keys