mainwindow.h
1 /*
2  This file is part of the KOrganizer interfaces.
3  Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library 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 GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 #ifndef KORG_MAINWINDOW_H
21 #define KORG_MAINWINDOW_H
22 
23 #include <kxmlguiclient.h>
24 
25 #include <tqwidget.h>
26 
27 class TDEActionCollection;
28 class TDEAction;
29 
30 class ActionManager;
31 
32 namespace KOrg {
33 
34 class CalendarViewBase;
35 
41 {
42  public:
43  MainWindow() : mDocument( true ) {}
44  virtual ~MainWindow() {}
45 
46  virtual void init( bool hasDocument ) { Q_UNUSED( hasDocument ); }
47 
48  virtual CalendarViewBase *view() const = 0;
49 
51  virtual bool openURL( const KURL &url, bool merge = false ) = 0;
53  virtual bool saveURL() = 0;
55  virtual bool saveAsURL( const KURL &kurl ) = 0;
56 
58  virtual KURL getCurrentURL() const = 0;
59 
63  virtual KXMLGUIFactory *mainGuiFactory() = 0;
67  virtual KXMLGUIClient *mainGuiClient() = 0;
71  virtual TQWidget *topLevelWidget() = 0;
75  virtual ActionManager *actionManager() = 0;
79  virtual TDEActionCollection *getActionCollection() const = 0;
83  virtual void showStatusMessage( const TQString &message ) = 0;
84 
88  virtual void setTitle() = 0;
89 
90  void setHasDocument( bool d ) { mDocument = d; }
91  bool hasDocument() const { return mDocument; }
92 
93  virtual bool isCurrentlyActivePart() = 0;
94 
95  private:
96  bool mDocument;
97 };
98 
99 }
100 
101 #endif
The ActionManager creates all the actions in KOrganizer.
Definition: actionmanager.h:74
interface for main calendar view widget
interface for korganizer main window
Definition: mainwindow.h:41
virtual bool openURL(const KURL &url, bool merge=false)=0
Load calendar file from URL.
virtual KXMLGUIClient * mainGuiClient()=0
Return XML GUI client of this main window.
virtual TDEActionCollection * getActionCollection() const =0
Return actionCollection of this main window.
virtual bool saveURL()=0
Save calendar file to URL of current calendar.
virtual ActionManager * actionManager()=0
Return ActionManager of this main window.
virtual bool saveAsURL(const KURL &kurl)=0
Save calendar file to URL.
virtual KURL getCurrentURL() const =0
Get current URL.
virtual void showStatusMessage(const TQString &message)=0
Show status mesage in status bar.
virtual TQWidget * topLevelWidget()=0
Return widget whcih represents this main window.
virtual KXMLGUIFactory * mainGuiFactory()=0
Return XML GUI factory of this main window.
virtual void setTitle()=0
Set window title.