insertfileplugin.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#ifndef _INSERT_FILE_PLUGIN_H_
00023
#define _INSERT_FILE_PLUGIN_H_
00024
00025
#include <ktexteditor/plugin.h>
00026
#include <ktexteditor/view.h>
00027
00028
#include <kxmlguiclient.h>
00029
#include <qobject.h>
00030
#include <jobclasses.h>
00031
#include <kurl.h>
00032
00033
class InsertFilePlugin :
public KTextEditor::Plugin,
public KTextEditor::PluginViewInterface
00034 {
00035 Q_OBJECT
00036
00037
public:
00038 InsertFilePlugin(
QObject *parent = 0,
00039
const char* name = 0,
00040
const QStringList &args =
QStringList() );
00041
virtual ~InsertFilePlugin();
00042
00043
void addView (KTextEditor::View *view);
00044
void removeView (KTextEditor::View *view);
00045
00046
00047
private:
00048
QPtrList<class InsertFilePluginView> m_views;
00049 };
00050
00051
class InsertFilePluginView :
public QObject,
public KXMLGUIClient
00052 {
00053 Q_OBJECT
00054
public:
00055 InsertFilePluginView( KTextEditor::View *view,
const char *name=0 );
00056 ~InsertFilePluginView() {};
00057
public slots:
00058
00059
void slotInsertFile();
00060
private slots:
00061
void slotFinished(
KIO::Job *job );
00062
00063
private:
00064
void insertFile();
00065
KURL _file;
00066
QString _tmpfile;
00067
KIO::FileCopyJob *_job;
00068 };
00069
00070
#endif // _INSERT_FILE_PLUGIN_H_
This file is part of the documentation for kate Library Version 3.4.0.