Added openssl-dev dependency
[froff-onlinedoc] / onlineservicesplugin.cpp
1 #include "onlineservicesplugin.h"
2 #include "loginwindow.h"
3 #include <KoDocument.h>
4
5 onlineServicesPlugin::onlineServicesPlugin()
6 {
7     name = "Online Services";
8     window = 0;
9 }
10 onlineServicesPlugin::~onlineServicesPlugin()
11 {
12     delete window;
13     window = 0;
14 }
15
16 void onlineServicesPlugin::setDocument(void *doc)
17 {
18     this->doc = (KoDocument *) doc;
19 }
20
21 QWidget *onlineServicesPlugin::view()
22 {
23     window = new LoginWindow();
24     if(doc) {
25         window->setOpenDoc(doc->url().path());
26     }
27     return window;
28 }
29
30 QString onlineServicesPlugin::pluginName()
31 {
32     return name;
33 }
34
35 QStringList onlineServicesPlugin::pluginSupportTypes()
36 {
37     QStringList types;
38     types << "All";
39     return types;
40 }
41
42 Q_EXPORT_PLUGIN2(OnlineServicesPlugin, onlineServicesPlugin)