diff options
Diffstat (limited to 'kdejava/koala/org/kde/koala/KAnimWidget.java')
-rw-r--r-- | kdejava/koala/org/kde/koala/KAnimWidget.java | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/kdejava/koala/org/kde/koala/KAnimWidget.java b/kdejava/koala/org/kde/koala/KAnimWidget.java new file mode 100644 index 00000000..fd966ba5 --- /dev/null +++ b/kdejava/koala/org/kde/koala/KAnimWidget.java @@ -0,0 +1,126 @@ +//Auto-generated by kalyptus. DO NOT EDIT. +package org.kde.koala; + +import org.kde.qt.Qt; +import org.kde.qt.QHideEvent; +import org.kde.qt.QMetaObject; +import org.kde.qt.QtSupport; +import org.kde.qt.QPainter; +import org.kde.qt.QMouseEvent; +import org.kde.qt.QShowEvent; +import org.kde.qt.QEvent; +import org.kde.qt.QWidget; +import org.kde.qt.QFrame; + +/** + + This is a widget used to display animation using multiple + individual pixmaps. This widget allows you to deal with variable + size icons (e.g., ones that will change based on a global setting) + as it loads the icons internally. All you need to do is pass along + a list of icon names and their size and everything else is taken + care of. + This widget also emits a 'clicked()' signal when it received a + mouse press event. + A quick example: + <pre> + KAnimWidget anim = new KAnimWidget("kde", 0, this); + anim.start(); + </pre> + That example will search for the pixmaps "one.png", "two.png", and + "three.png" in the share/icons/small/ directories as well as the + app's pics directory. + See {@link KAnimWidgetSignals} for signals emitted by KAnimWidget + @author Kurt Granroth <granroth@kde.org> + + @short Standard "About KDE" dialog box. + +*/ +public class KAnimWidget extends QFrame { + protected KAnimWidget(Class dummy){super((Class) null);} + public native QMetaObject metaObject(); + public native String className(); + /** + This is the most common constructor. Pass along the name of the + animated icons to use (e.g., "kde") for the animation and an + optional size to load and you're set. If you omit the size, the + default size will be used. + @param icons The icons name (e.g., "kde") to use for the animation + @param size The size to load + You don't have to set it if the parent is a + KToolBar; in this case it will use the toolbar's + size. + @param parent The standard parent + @param name The standard internal name + @short This is the most common constructor. + */ + public KAnimWidget(String icons, int size, QWidget parent, String name) { + super((Class) null); + newKAnimWidget(icons,size,parent,name); + } + private native void newKAnimWidget(String icons, int size, QWidget parent, String name); + public KAnimWidget(String icons, int size, QWidget parent) { + super((Class) null); + newKAnimWidget(icons,size,parent); + } + private native void newKAnimWidget(String icons, int size, QWidget parent); + public KAnimWidget(String icons, int size) { + super((Class) null); + newKAnimWidget(icons,size); + } + private native void newKAnimWidget(String icons, int size); + public KAnimWidget(String icons) { + super((Class) null); + newKAnimWidget(icons); + } + private native void newKAnimWidget(String icons); + /** + Sets the size of the icons. + @param size The size of the icons + @short Sets the size of the icons. + */ + public native void setSize(int size); + /** + Returns the current size. + @short Returns the current size. + */ + public native int iconSize(); + /** + Returns the current icons + since 3.4 + @short Returns the current icons since 3. + */ + public native String icons(); + /** + Sets the name of the animated icons to load. This will use the + KIconLoader.loadAnimated method for the actual loading. + @param icons The name of the icons to use for the animation + @short Sets the name of the animated icons to load. + */ + public native void setIcons(String icons); + /** + Starts the animation from frame 1 + @short Starts the animation from frame 1 + */ + public native void start(); + /** + Stops the animation. This will also reset the widget to frame 1. + @short Stops the animation. + */ + public native void stop(); + protected native void drawContents(QPainter p); + protected native void leaveEvent(QEvent e); + protected native void enterEvent(QEvent e); + protected native void hideEvent(QHideEvent e); + public native void showEvent(QShowEvent e); + protected native void mousePressEvent(QMouseEvent e); + protected native void mouseReleaseEvent(QMouseEvent e); + protected native void slotTimerUpdate(); + protected native void updateIcons(); + /** 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(); +} |