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
34class TDEInstance;
35class TDEAboutData;
36class TDEProcess;
37
38class CalendarView;
39class ActionManager;
40
41namespace KCal {
43 class Calendar;
44 class Incidence;
45}
46using namespace KCal;
47namespace KParts {
48class StatusBarExtension;
49}
50namespace KOrg {
51class CalendarViewBase;
52}
53
54class TQDate;
55
56class 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();
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
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 bool saveURL()=0
Save calendar file to URL of current calendar.
virtual bool saveAsURL(const KURL &kurl)=0
Save calendar file to URL.
virtual TDEActionCollection * getActionCollection() const =0
Return actionCollection of this main window.
virtual ActionManager * actionManager()=0
Return ActionManager of this main window.
virtual KXMLGUIFactory * mainGuiFactory()=0
Return XML GUI factory of this main window.
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 void setTitle()=0
Set window title.
bool view(TQWidget *parent, Attachment *attachment)