Initial Commit.
[onlineservices] / OfficeInterface.h
1 /*
2  * This file is part of Maemo 5 Office UI for KOffice
3  *
4  * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
5  *
6  * Contact: Lassi Nieminen <lassniem@gmail.com>
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of
11  * the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  *
23  */
24
25 #ifndef OFFICEINTERFACE_H
26 #define OFFICEINTERFACE_H
27
28 #include <QtPlugin>
29 #include <QWidget>
30 #include <QStringList>
31
32 class OfficeInterface
33 {
34 public:
35
36     virtual ~OfficeInterface() {}
37
38     // This is used to give information about the currently active doc to the plugin
39     // 0 if there is no document open
40     virtual void setDocument(void *doc) = 0;
41
42     // Asks the plugin to create it's view for the main program to use
43     virtual QWidget *view() = 0;
44
45     // Should return the name of the plugin
46     virtual QString pluginName() = 0;
47
48     // Should return list of document types in presence of which this plugin
49     // should be shown in the menubar.
50     // Possible values : All, presentation, document, spreadsheet
51     //
52     // NOTE: this is not actually used yet in the main program and may be extented
53     // in the future.
54     virtual QStringList pluginSupportTypes() = 0;
55 };
56
57 Q_DECLARE_INTERFACE(OfficeInterface, "com.office.Freoffice.OfficeInterface/1.0")
58
59 #endif