korganizer

mainwindow.h

00001 /*
00002     This file is part of the KOrganizer interfaces.
00003     Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library 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 GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 */
00020 #ifndef KORG_MAINWINDOW_H
00021 #define KORG_MAINWINDOW_H
00022 
00023 #include <kxmlguiclient.h>
00024 
00025 #include <qwidget.h>
00026 
00027 class KActionCollection;
00028 class KAction;
00029 
00030 class ActionManager;
00031 
00032 namespace KOrg {
00033 
00034 class CalendarViewBase;
00035 
00040 class MainWindow
00041 {
00042   public:
00043     MainWindow() : mDocument( true ) {}
00044     virtual ~MainWindow() {}
00045 
00046     virtual void init( bool hasDocument ) { Q_UNUSED( hasDocument ); }
00047 
00048     virtual CalendarViewBase *view() const = 0;
00049 
00051     virtual bool openURL( const KURL &url, bool merge = false ) = 0;
00053     virtual bool saveURL() = 0;
00055     virtual bool saveAsURL( const KURL &kurl ) = 0;
00056 
00058     virtual KURL getCurrentURL() const = 0;
00059 
00063     virtual KXMLGUIFactory *mainGuiFactory() = 0;
00067     virtual KXMLGUIClient *mainGuiClient() = 0;
00071     virtual QWidget *topLevelWidget() = 0;
00075     virtual ActionManager *actionManager() = 0;
00079     virtual KActionCollection *getActionCollection() const = 0;
00083     virtual void showStatusMessage( const QString &message ) = 0;
00084 
00088     virtual void setTitle() = 0;
00089 
00090     void setHasDocument( bool d ) { mDocument = d; } 
00091     bool hasDocument() const { return mDocument; }
00092 
00093   private:
00094     bool mDocument;
00095 };
00096 
00097 }
00098 
00099 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys