summaryrefslogtreecommitdiffstats
path: root/src/kbfxplasmacanvasabstractitem.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-17 00:43:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-17 00:43:50 +0000
commitceea23677c61f20759ae986bd77b0d5c4d673edb (patch)
tree3fcec1702eaf9c14d1dd736e594f5df08dab4001 /src/kbfxplasmacanvasabstractitem.h
downloadkbfx-ceea23677c61f20759ae986bd77b0d5c4d673edb.tar.gz
kbfx-ceea23677c61f20759ae986bd77b0d5c4d673edb.zip
Added old KDE3 version of kbfx
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kbfx@1091549 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kbfxplasmacanvasabstractitem.h')
-rw-r--r--src/kbfxplasmacanvasabstractitem.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/src/kbfxplasmacanvasabstractitem.h b/src/kbfxplasmacanvasabstractitem.h
new file mode 100644
index 0000000..7110486
--- /dev/null
+++ b/src/kbfxplasmacanvasabstractitem.h
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2006
+ * Siraj Razick <siraj@kdemail.net>
+ * PhobosK <phobosk@mail.kbfx.org>
+ * see Also AUTHORS
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library General Public License version 2 as
+ * published by the Free Software Foundation
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef KBFX_PLASMA_CANVAS_ABSTRACT_ITEM_H
+#define KBFX_PLASMA_CANVAS_ABSTRACT_ITEM_H
+
+#include <qcanvas.h>
+#include <qpainter.h>
+#include "kbfxplasmacanvasrtti.h"
+#include <qtimer.h>
+#include <kdesktopfile.h>
+#include <kstandarddirs.h>
+#include <kiconloader.h>
+#include "kbfxdatasource.h"
+#include <krun.h>
+
+class KbfxPlasmaCanvasAbstractItem:public QObject,public QCanvasSprite
+{
+
+ Q_OBJECT
+
+ public:
+ typedef enum {EXECUTABLE=0,SEPARATOR,INDEX,OTHER} Type;
+// typedef enum {RASTER=0,VECTOR,NATIVE} SkinMode;
+
+ KbfxPlasmaCanvasAbstractItem ( QCanvasPixmapArray * a, QCanvas * canvas );
+ virtual ~KbfxPlasmaCanvasAbstractItem ();
+
+ void setCurrent ( bool );
+ virtual Type type() { return m_type; }
+ virtual void setType ( Type t ) { m_type = t;}
+
+ QString name() { if ( m_source != 0 ) return m_source->name(); else return QString ( "Not Set" );};
+
+ void setSource ( KbfxDataSource src );
+ bool isCurrent();
+ virtual int height() { return m_height;}
+
+ virtual int width() { return m_width;}
+
+ virtual bool lookup ( QString str ) {str = str ; return false;}
+
+ virtual int rtti() const { return CANVASITEM;}
+
+ virtual void draw ( QPainter & pe );
+
+ virtual void drawContent ( QPainter * pe );
+
+ virtual QPixmap dragPixmap();
+
+
+//Event Handling
+ virtual void mousePressEvent ( QMouseEvent * e );
+ virtual void mouseMoveEvent ( QMouseEvent * e );
+ virtual void enterEvent ( QEvent * e );
+ virtual void mouseReleaseEvent ( QMouseEvent * e );
+
+
+ virtual void setLabelText ( QString s );
+
+ public slots:
+ virtual void hideit();
+ virtual void exec();
+ signals:
+ void clicked();
+ void leave();
+ void selected ( KbfxPlasmaCanvasAbstractItem* );
+
+ private:
+
+// KbfxPlasmaCanvasAbstractItem (const KbfxPlasmaCanvasItem &t);
+ KbfxDataSource * m_source;
+ Type m_type;
+ int m_height;
+ int m_width;
+ bool m_current;
+
+
+
+
+}
+;//C.G
+
+#endif //M.I.G
+