diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 90825e2392b2d70e43c7a25b8a3752299a933894 (patch) | |
tree | e33aa27f02b74604afbfd0ea4f1cfca8833d882a /kdejava/koala/org/kde/koala/KFindDialog.java | |
download | tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.tar.gz tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.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/kdebindings@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdejava/koala/org/kde/koala/KFindDialog.java')
-rw-r--r-- | kdejava/koala/org/kde/koala/KFindDialog.java | 241 |
1 files changed, 241 insertions, 0 deletions
diff --git a/kdejava/koala/org/kde/koala/KFindDialog.java b/kdejava/koala/org/kde/koala/KFindDialog.java new file mode 100644 index 00000000..f84e6a04 --- /dev/null +++ b/kdejava/koala/org/kde/koala/KFindDialog.java @@ -0,0 +1,241 @@ +//Auto-generated by kalyptus. DO NOT EDIT. +package org.kde.koala; + +import org.kde.qt.Qt; +import org.kde.qt.QMetaObject; +import org.kde.qt.QtSupport; +import java.util.ArrayList; +import org.kde.qt.QShowEvent; +import org.kde.qt.QWidget; + +/** + + @brief A generic "find" dialog. + <b></b>etail: + This widget inherits from KDialogBase and implements + the following additional functionalities: a find string + object and an area for a user-defined widget to extend the dialog. + <b></b>xample: + To use the basic modal find dialog, and then run the search: + <pre> + KFindDialog dlg(....) + if ( dlg.exec() != QDialog.Accepted ) + return; + // proceed with KFind from here + </pre> + To create a non-modal find dialog: + <pre> + if ( m_findDia ) + KWin.setActiveWindow( m_findDia.winId() ); + else + { + m_findDia = new KFindDialog(false,...); + connect( m_findDia, SIGNAL("okClicked()"), this, SLOT("findTextNext()") ); + } + </pre> + Don't forget to delete and reset m_findDia when closed. + (But do NOT delete your KFind object at that point, it's needed for "Find Next") + To use your own extensions: see findExtension(). + @author S.R.Haque <srhaque@iee.org> + + @short @brief A generic "find" dialog. + +*/ +public class KFindDialog extends KDialogBase { + protected KFindDialog(Class dummy){super((Class) null);} + public static final int WholeWordsOnly = 1; + public static final int FromCursor = 2; + public static final int SelectedText = 4; + public static final int CaseSensitive = 8; + public static final int FindBackwards = 16; + public static final int RegularExpression = 32; + public static final int FindIncremental = 64; + public static final int MinimumUserOption = 65536; + + public native QMetaObject metaObject(); + public native String className(); + /** + Construct a modal find dialog + @param parent The parent object of this widget. + @param name The name of this widget. + @param options A bitfield of the Options to be checked. + @param findStrings The find history, see findHistory() + @param hasSelection Whether a selection exists + @short Construct a modal find dialog + */ + public KFindDialog(QWidget parent, String name, long options, String[] findStrings, boolean hasSelection) { + super((Class) null); + newKFindDialog(parent,name,options,findStrings,hasSelection); + } + private native void newKFindDialog(QWidget parent, String name, long options, String[] findStrings, boolean hasSelection); + public KFindDialog(QWidget parent, String name, long options, String[] findStrings) { + super((Class) null); + newKFindDialog(parent,name,options,findStrings); + } + private native void newKFindDialog(QWidget parent, String name, long options, String[] findStrings); + public KFindDialog(QWidget parent, String name, long options) { + super((Class) null); + newKFindDialog(parent,name,options); + } + private native void newKFindDialog(QWidget parent, String name, long options); + public KFindDialog(QWidget parent, String name) { + super((Class) null); + newKFindDialog(parent,name); + } + private native void newKFindDialog(QWidget parent, String name); + public KFindDialog(QWidget parent) { + super((Class) null); + newKFindDialog(parent); + } + private native void newKFindDialog(QWidget parent); + public KFindDialog() { + super((Class) null); + newKFindDialog(); + } + private native void newKFindDialog(); + /** + Construct a non-modal find dialog + @param modal set to false to get a non-modal dialog + @param parent The parent object of this widget. + @param name The name of this widget. + @param options A bitfield of the Options to be checked. + @param findStrings The find history, see findHistory() + @param hasSelection Whether a selection exists + @short Construct a non-modal find dialog + */ + public KFindDialog(boolean modal, QWidget parent, String name, long options, String[] findStrings, boolean hasSelection) { + super((Class) null); + newKFindDialog(modal,parent,name,options,findStrings,hasSelection); + } + private native void newKFindDialog(boolean modal, QWidget parent, String name, long options, String[] findStrings, boolean hasSelection); + public KFindDialog(boolean modal, QWidget parent, String name, long options, String[] findStrings) { + super((Class) null); + newKFindDialog(modal,parent,name,options,findStrings); + } + private native void newKFindDialog(boolean modal, QWidget parent, String name, long options, String[] findStrings); + public KFindDialog(boolean modal, QWidget parent, String name, long options) { + super((Class) null); + newKFindDialog(modal,parent,name,options); + } + private native void newKFindDialog(boolean modal, QWidget parent, String name, long options); + public KFindDialog(boolean modal, QWidget parent, String name) { + super((Class) null); + newKFindDialog(modal,parent,name); + } + private native void newKFindDialog(boolean modal, QWidget parent, String name); + public KFindDialog(boolean modal, QWidget parent) { + super((Class) null); + newKFindDialog(modal,parent); + } + private native void newKFindDialog(boolean modal, QWidget parent); + public KFindDialog(boolean modal) { + super((Class) null); + newKFindDialog(modal); + } + private native void newKFindDialog(boolean modal); + /** + Provide the list of <code>strings</code> to be displayed as the history + of find strings. <code>strings</code> might get truncated if it is + too long. + @param history The find history. + @short Provide the list of <code>strings</code> to be displayed as the history of find strings. + @see #findHistory + */ + public native void setFindHistory(String[] history); + /** + Returns the list of history items. + @short Returns the list of history items. + @see #setFindHistory + */ + public native ArrayList findHistory(); + /** + Enable/disable the 'search in selection' option, depending + on whether there actually is a selection. + @param hasSelection true if a selection exists + @short Enable/disable the 'search in selection' option, depending on whether there actually is a selection. + */ + public native void setHasSelection(boolean hasSelection); + /** + Hide/show the 'from cursor' option, depending + on whether the application implements a cursor. + @param hasCursor true if the application features a cursor + This is assumed to be the case by default. + @short Hide/show the 'from cursor' option, depending on whether the application implements a cursor. + */ + public native void setHasCursor(boolean hasCursor); + /** + Enable/disable the 'Find backwards' option, depending + on whether the application supports it. + @param supports true if the application supports backwards find + This is assumed to be the case by default. + @short Enable/disable the 'Find backwards' option, depending on whether the application supports it. + */ + public native void setSupportsBackwardsFind(boolean supports); + /** + Enable/disable the 'Case sensitive' option, depending + on whether the application supports it. + @param supports true if the application supports case sensitive find + This is assumed to be the case by default. + @short Enable/disable the 'Case sensitive' option, depending on whether the application supports it. + */ + public native void setSupportsCaseSensitiveFind(boolean supports); + /** + Enable/disable the 'Whole words only' option, depending + on whether the application supports it. + @param supports true if the application supports whole words only find + This is assumed to be the case by default. + @short Enable/disable the 'Whole words only' option, depending on whether the application supports it. + */ + public native void setSupportsWholeWordsFind(boolean supports); + /** + Enable/disable the 'Regular expression' option, depending + on whether the application supports it. + @param supports true if the application supports regular expression find + This is assumed to be the case by default. + @short Enable/disable the 'Regular expression' option, depending on whether the application supports it. + */ + public native void setSupportsRegularExpressionFind(boolean supports); + /** + Set the options which are checked. + @param options The setting of the Options. + @short Set the options which are checked. + */ + public native void setOptions(long options); + /** + Returns the state of the options. Disabled options may be returned in + an indeterminate state. + @short Returns the state of the options. + @see #setOptions + */ + public native long options(); + /** + Returns the pattern to find. + @short Returns the pattern to find. + */ + public native String pattern(); + /** + Sets the pattern to find + @short Sets the pattern to find + */ + public native void setPattern(String pattern); + /** + Returns an empty widget which the user may fill with additional UI + elements as required. The widget occupies the width of the dialog, + and is positioned immediately below the regular expression support + widgets for the pattern string. + @short Returns an empty widget which the user may fill with additional UI elements as required. + */ + public native QWidget findExtension(); + public native void showEvent(QShowEvent arg1); + protected native void slotOk(); + protected native void slotSelectedTextToggled(boolean arg1); + protected native void showPatterns(); + protected native void showPlaceholders(); + protected native void textSearchChanged(String arg1); + /** 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(); +} |