summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_handler.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
commit8362bf63dea22bbf6736609b0f49c152f975eb63 (patch)
tree0eea3928e39e50fae91d4e68b21b1e6cbae25604 /kspread/kspread_handler.h
downloadkoffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz
koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kspread/kspread_handler.h')
-rw-r--r--kspread/kspread_handler.h90
1 files changed, 90 insertions, 0 deletions
diff --git a/kspread/kspread_handler.h b/kspread/kspread_handler.h
new file mode 100644
index 00000000..b14b1212
--- /dev/null
+++ b/kspread/kspread_handler.h
@@ -0,0 +1,90 @@
+#ifndef KSPREAD_HANDLER_H
+#define KSPREAD_HANDLER_H
+
+#include <KoContainerHandler.h>
+
+#include <qpoint.h>
+
+#include <KoQueryTrader.h>
+
+class QWidget;
+
+enum HandlerType
+{
+ Part,
+ Chart,
+ Picture
+};
+
+namespace KSpread
+{
+class View;
+
+/**
+ * This event handler is used to insert a new part. The event handler
+ * takes care of selecting the rectangle at which the new
+ * part will appear.
+ */
+class InsertHandler : public KoEventHandler
+{
+ Q_OBJECT
+public:
+ InsertHandler( View* view, QWidget* widget );
+ ~InsertHandler();
+
+ virtual HandlerType getType() = 0;
+
+protected:
+ bool eventFilter( QObject*, QEvent* );
+ virtual void insertObject( QRect ) = 0;
+
+ View* m_view;
+ QPoint m_geometryStart;
+ QPoint m_geometryEnd;
+ bool m_started;
+ bool m_clicked;
+};
+
+class InsertPartHandler : public InsertHandler
+{
+ public:
+ InsertPartHandler( View* view, QWidget* widget, const KoDocumentEntry& entry );
+ virtual ~InsertPartHandler();
+ HandlerType getType() { return Part; }
+
+ private:
+ void insertObject( QRect );
+
+ KoDocumentEntry m_entry;
+};
+
+
+class InsertChartHandler : public InsertHandler
+{
+ public:
+ InsertChartHandler( View* view, QWidget* widget, const KoDocumentEntry& entry );
+ virtual ~InsertChartHandler();
+ HandlerType getType() { return Chart; }
+
+ private:
+ void insertObject( QRect );
+
+ KoDocumentEntry m_entry;
+};
+
+class InsertPictureHandler : public InsertHandler
+{
+ public:
+ InsertPictureHandler( View* view, QWidget* widget, const KURL &);
+ virtual ~InsertPictureHandler();
+ HandlerType getType() { return Picture; }
+
+ private:
+ void insertObject( QRect );
+
+ KURL m_file;
+};
+
+} // namespace KSpread
+
+#endif