summaryrefslogtreecommitdiffstats
path: root/tdejava/koala/org/trinitydesktop/koala/KPixmapSplitter.java
diff options
context:
space:
mode:
Diffstat (limited to 'tdejava/koala/org/trinitydesktop/koala/KPixmapSplitter.java')
-rw-r--r--tdejava/koala/org/trinitydesktop/koala/KPixmapSplitter.java100
1 files changed, 100 insertions, 0 deletions
diff --git a/tdejava/koala/org/trinitydesktop/koala/KPixmapSplitter.java b/tdejava/koala/org/trinitydesktop/koala/KPixmapSplitter.java
new file mode 100644
index 00000000..b6eb1951
--- /dev/null
+++ b/tdejava/koala/org/trinitydesktop/koala/KPixmapSplitter.java
@@ -0,0 +1,100 @@
+//Auto-generated by kalyptus. DO NOT EDIT.
+package org.trinitydesktop.koala;
+
+import org.trinitydesktop.qt.Qt;
+import org.trinitydesktop.qt.TQRect;
+import org.trinitydesktop.qt.QtSupport;
+import org.trinitydesktop.qt.TQPixmap;
+import org.trinitydesktop.qt.TQSize;
+
+/**
+
+ If you have a pixmap containing several items (icons), you can use this
+ class to get the coordinates of each item.
+ For example, if you have a pixmap with 25 items and you want to get the
+ 4th item as a pixmap (every item being 20x10 pixels):
+ <pre>
+ KPixmapSplitter splitter;
+ splitter.setPixmap( somePixmap );
+ splitter.setItemSize( TQSize( 20, 10 ));
+ TQPixmap item( 20, 10 );
+ item.fill( Qt.white );
+ TQRect rect = splitter.coordinates( 4 );
+ if ( !rect.isEmpty() )
+ bitBlt( &item, TQPoint(0,0), &somePixmap, rect, CopyROP );
+ </pre>
+ @author Carsten Pfeiffer <pfeiffer@kde.org>
+
+ @short A class to split a pixmap into several items.
+
+*/
+public class KPixmapSplitter implements QtSupport {
+ private long _qt;
+ private boolean _allocatedInJavaWorld = true;
+ protected KPixmapSplitter(Class dummy){}
+
+ /**
+ Constructor, does nothing but initialize some default-values.
+ @short Constructor, does nothing but initialize some default-values.
+ */
+ public KPixmapSplitter() {
+ newKPixmapSplitter();
+ }
+ private native void newKPixmapSplitter();
+ /**
+ Sets the pixmap to be split.
+ @short Sets the pixmap to be split.
+ */
+ public native void setPixmap(TQPixmap pixmap);
+ /**
+ @return the pixmap that has been set via setPixmap().
+
+ @short
+ */
+ public native TQPixmap pixmap();
+ /**
+ Sets the size of the items you want to get out of the given pixmap.
+ The TQRect of #coordinates(int) will have the width and height of exactly
+ this <code>size.</code>
+ @short Sets the size of the items you want to get out of the given pixmap.
+ */
+ public native void setItemSize(TQSize size);
+ /**
+ @return the set size of the items (coordinates) you want to get
+ out of the given pixmap.
+
+ @short
+ */
+ public native TQSize itemSize();
+ /**
+ If there is space between rows in the given pixmap, you have to specify
+ how many pixels there are.
+ @short If there is space between rows in the given pixmap, you have to specify how many pixels there are.
+ */
+ public native void setVSpacing(int spacing);
+ /**
+ If there is space between columns in the given pixmap, you have to
+ specify how many pixels there are.
+ @short If there is space between columns in the given pixmap, you have to specify how many pixels there are.
+ */
+ public native void setHSpacing(int spacing);
+ /**
+ @return the coordinates of the item at position pos in the given
+ pixmap.
+
+ @short
+ */
+ public native TQRect coordinates(int pos);
+ /**
+ Overloaded for convenience. Returns the item at the position of the
+ given character (when using a latin1 font-pixmap)
+ @short Overloaded for convenience.
+ */
+ public native TQRect coordinates(char ch);
+ /** Deletes the wrapped C++ instance */
+ protected native void finalize() throws InternalError;
+ /** Delete the wrapped C++ instance ahead of finalize() */
+ public native void dispose();
+ /** Has the wrapped C++ instance been deleted? */
+ public native boolean isDisposed();
+}