Show invite menu in wlm chat window immediately
[kdenetwork.git] / kopete / plugins / urlpicpreview / urlpicpreviewplugin.h
blobc48a2b30716126065b8afb9757fdfe8c0c8b9298
1 /*
2 urlpicpreviewplugin.h
4 Copyright (c) 2005 by Heiko Schaefer <heiko@rangun.de>
6 Kopete (c) 2002-2007 by the Kopete developers <kopete-devel@kde.org>
8 ************************************************************************ *
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; version 2, or (at your option) version 3 *
13 * of the License. *
14 * *
15 **************************************************************************
18 #ifndef URLPICPREVIEWPLUGIN_H
19 #define URLPICPREVIEWPLUGIN_H
21 #include <kurl.h>
23 //Kopete
24 #include "kopeteplugin.h"
25 namespace Kopete { class Message; }
27 class QImage;
29 /**
30 @author Heiko Sch&auml;fer <heiko@rangun.de>
32 class URLPicPreviewPlugin : public Kopete::Plugin {
33 Q_OBJECT
35 URLPicPreviewPlugin(const URLPicPreviewPlugin&);
36 URLPicPreviewPlugin& operator=(const URLPicPreviewPlugin&);
38 signals:
39 void abortAllOperations();
41 public:
42 URLPicPreviewPlugin(QObject* parent, const QVariantList& args);
43 virtual ~URLPicPreviewPlugin();
45 private:
46 QString prepareBody(const QString& parsedBody, uint previewCount = 0);
47 QString createPreviewPicture(const KUrl& url);
49 protected slots:
50 void aboutToDisplay(Kopete::Message& message);
51 void readyForUnload();
53 private:
54 QStringList m_tmpFileRegistry;
55 QImage * m_pic;
56 bool m_abortMessageCheck;
59 #endif /* URLPICPREVIEWPLUGIN_H */