korganizer

korganizer_part.h
1 /*
2  This file is part of KOrganizer.
3 
4  Copyright (c) 2000,2003 Cornelius Schumacher <schumacher@kde.org>
5  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 
21  As a special exception, permission is given to link this program
22  with any edition of TQt, and distribute the resulting executable,
23  without including the source code for TQt in the source distribution.
24 */
25 #ifndef KORGANIZER_PART_H
26 #define KORGANIZER_PART_H
27 
28 #include <kurl.h>
29 #include <tdeparts/part.h>
30 
31 #include <korganizer/mainwindow.h>
32 
33 
34 class TDEInstance;
35 class TDEAboutData;
36 class TDEProcess;
37 
38 class CalendarView;
39 class ActionManager;
40 
41 namespace KCal {
42  class CalendarResources;
43  class Calendar;
44  class Incidence;
45 }
46 using namespace KCal;
47 namespace KParts {
48 class StatusBarExtension;
49 }
50 namespace KOrg {
51 class CalendarViewBase;
52 }
53 
54 class TQDate;
55 
56 class KOrganizerPart: public KParts::ReadOnlyPart,
57  public KOrg::MainWindow
58 {
59  TQ_OBJECT
60 
61  public:
62  KOrganizerPart( TQWidget *parentWidget, const char *widgetName,
63  TQObject *parent, const char *name, const TQStringList & );
64  virtual ~KOrganizerPart();
65 
66  static TDEAboutData *createAboutData();
67 
68  virtual KOrg::CalendarViewBase *view() const;
69 
71  virtual bool openURL( const KURL &url, bool merge = false );
73  virtual bool saveURL();
75  virtual bool saveAsURL( const KURL &kurl );
76 
78  virtual KURL getCurrentURL() const;
79 
80  virtual KXMLGUIFactory *mainGuiFactory() { return factory(); }
81  virtual KXMLGUIClient *mainGuiClient() { return this; }
82  virtual TQWidget *topLevelWidget();
83  virtual ActionManager *actionManager();
84  virtual TDEActionCollection *getActionCollection() const { return actionCollection(); }
85  virtual void showStatusMessage( const TQString &message );
86 
87  virtual bool isCurrentlyActivePart();
88 
89  void setTitle();
90 
91  public slots:
92  void slotChangeInfo( Incidence *incidence, const TQDate & );
93 
94  protected:
95  virtual bool openFile();
96 
97  protected slots:
98  void startCompleted( TDEProcess * );
99 
100  private:
101  CalendarView *mView;
102  ActionManager *mActionManager;
103  KParts::StatusBarExtension *mStatusBarExtension;
104  TQWidget *mTopLevelWidget;
105 
106  signals:
107  void textChanged( const TQString & );
108 };
109 
110 #endif
The ActionManager creates all the actions in KOrganizer.
Definition: actionmanager.h:74
This is the main calendar widget.
Definition: calendarview.h:82
interface for main calendar view widget
interface for korganizer main window
Definition: mainwindow.h:41
bool view(TQWidget *parent, Attachment *attachment)