summaryrefslogtreecommitdiffstats
path: root/kimagemapeditor/imageslistview.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
commite9ae80694875f869892f13f4fcaf1170a00dea41 (patch)
treeaa2f8d8a217e2d376224c8d46b7397b68d35de2d /kimagemapeditor/imageslistview.h
downloadtdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.tar.gz
tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.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/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kimagemapeditor/imageslistview.h')
-rw-r--r--kimagemapeditor/imageslistview.h111
1 files changed, 111 insertions, 0 deletions
diff --git a/kimagemapeditor/imageslistview.h b/kimagemapeditor/imageslistview.h
new file mode 100644
index 00000000..55680405
--- /dev/null
+++ b/kimagemapeditor/imageslistview.h
@@ -0,0 +1,111 @@
+/***************************************************************************
+ imageslistview.h - description
+ -------------------
+ begin : Weg Feb 26 2003
+ copyright : (C) 2003 by Jan Sch�fer
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef _IMAGESLISTVIEW_H_
+#define _IMAGESLISTVIEW_H_
+
+#include <klistview.h>
+#include <kurl.h>
+
+#include "kimagemapeditor.h"
+
+class ImagesListView;
+
+class ImagesListViewItem : public QListViewItem
+{
+ public:
+ ImagesListViewItem(ImagesListView*, ImageTag*);
+ ImageTag* imageTag();
+
+ /**
+ * Re-reads the contents of the ImageTag and updates
+ * itself accordingly
+ */
+ void update();
+ protected:
+ ImageTag* _imageTag;
+};
+
+/**
+ * Simple class that shows a list of imagenames with a preview
+ * Jan Schaefer
+ **/
+class ImagesListView : public KListView
+{
+ Q_OBJECT
+
+public:
+ ImagesListView(QWidget *parent, const char *name);
+ virtual ~ImagesListView();
+
+ /**
+ * Adds an image
+ */
+ void addImage(ImageTag*);
+
+ /**
+ * Adds images
+ */
+ void addImages(QPtrList<ImageTag> *);
+
+ /**
+ * Removes the given image from the list
+ */
+ void removeImage(ImageTag*);
+
+ /**
+ * Updates the listview item with the given ImageTag
+ */
+ void updateImage(ImageTag*);
+
+ /**
+ * Removes all images
+ */
+ void clear();
+
+ /**
+ * Returns the filename of the current selected Image
+ */
+ ImageTag* selectedImage();
+
+ /**
+ * Selects the given image
+ */
+ void selectImage(ImageTag*);
+
+ /**
+ * Sets the base URL of all images
+ */
+ void setBaseUrl(const KURL & url) { _baseUrl = url; };
+
+protected slots:
+ void slotSelectionChanged(QListViewItem*);
+
+signals:
+ void imageSelected(const KURL &);
+
+protected:
+ KURL _baseUrl;
+
+ /**
+ * Finds the first ImageListViewItem with the given ImageTag
+ * Returns 0L if no item was found
+ */
+ ImagesListViewItem* findListViewItem(ImageTag*);
+};
+
+#endif