summaryrefslogtreecommitdiffstats
path: root/kate/snippets/plugin_katesnippets.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit84da08d7b7fcda12c85caeb5a10b4903770a6f69 (patch)
tree2a6aea76f2dfffb4cc04bb907c4725af94f70e72 /kate/snippets/plugin_katesnippets.h
downloadtdeaddons-84da08d7b7fcda12c85caeb5a10b4903770a6f69.tar.gz
tdeaddons-84da08d7b7fcda12c85caeb5a10b4903770a6f69.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/snippets/plugin_katesnippets.h')
-rw-r--r--kate/snippets/plugin_katesnippets.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/kate/snippets/plugin_katesnippets.h b/kate/snippets/plugin_katesnippets.h
new file mode 100644
index 0000000..9a940e5
--- /dev/null
+++ b/kate/snippets/plugin_katesnippets.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2004 Stephan Möres <Erdling@gmx.net>
+ */
+
+#ifndef _PLUGIN_KATESNIPPETS_H_
+#define _PLUGIN_KATESNIPPETS_H_
+
+#include <kate/application.h>
+#include <kate/documentmanager.h>
+#include <kate/document.h>
+#include <kate/mainwindow.h>
+#include <kate/plugin.h>
+#include <kate/view.h>
+#include <kate/viewmanager.h>
+#include <klibloader.h>
+#include <klocale.h>
+
+#include <kate/toolviewmanager.h>
+
+#include <qlistview.h>
+#include <qregexp.h>
+#include <kconfig.h>
+#include <qptrlist.h>
+#include <qtoolbutton.h>
+#include <qtextedit.h>
+#include <kiconloader.h>
+
+#include "csnippet.h"
+#include "cwidgetsnippets.h"
+
+class KatePluginSnippetsView : public CWidgetSnippets, public KXMLGUIClient {
+
+ Q_OBJECT
+
+ friend class KatePluginSnippets;
+
+public:
+ KatePluginSnippetsView (Kate::MainWindow *w, QWidget *dock);
+ virtual ~KatePluginSnippetsView ();
+ CSnippet* findSnippetByListViewItem(QListViewItem *item);
+
+public slots:
+ void slot_lvSnippetsSelectionChanged(QListViewItem * item);
+ void slot_lvSnippetsClicked (QListViewItem * item);
+ void slot_lvSnippetsItemRenamed(QListViewItem *lvi,int col, const QString& text);
+ void slot_btnNewClicked();
+ void slot_btnSaveClicked();
+ void slot_btnDeleteClicked();
+
+protected:
+ void readConfig();
+ void writeConfig();
+
+private:
+ KConfig *config;
+ QPtrList<CSnippet> lSnippets;
+
+public:
+ Kate::MainWindow *win;
+ QWidget *dock;
+};
+
+class KatePluginSnippets : public Kate::Plugin, Kate::PluginViewInterface {
+ Q_OBJECT
+
+public:
+ KatePluginSnippets( QObject* parent = 0, const char* name = 0, const QStringList& = QStringList() );
+ virtual ~KatePluginSnippets();
+
+ void addView (Kate::MainWindow *win);
+ void removeView (Kate::MainWindow *win);
+
+private:
+ QPtrList<class KatePluginSnippetsView> m_views;
+
+};
+
+#endif // _PLUGIN_KATESNIPPETS_H_