summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KRegExpEditorInterface.java
blob: d120e2a89b1fc9bdfa839450cf53e3c5df9ad982 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.QtSupport;

/**

  A graphical editor for regular expressions.
 The actual editor is located in tdeutils, with an interface in
 tdelibs. This means that it is a bit more complicated to create an
 instance of the editor, but only a little bit more complicated.
 To check if kregexpeditor in tdeutils is installed and available use this line:
 <pre>
 boolean installed=!TDETrader.self().query("KRegExpEditor/KRegExpEditor").isEmpty();
 </pre>
 The following is a template for what you need to do to create an instance of the
 regular expression dialog:
 <pre>
 TQDialog editorDialog = KParts.ComponentFactory.createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" );
 if ( editorDialog ) {
   // tdeutils was installed, so the dialog was found fetch the editor interface
   KRegExpEditorInterface editor = (KRegExpEditorInterface)( editorDialog.tqt_cast( "KRegExpEditorInterface" ) );
   Q_ASSERT( editor ); // This should not fail!
   // now use the editor.
   editor.setRegExp("^kde$");
   // Finally exec the dialog
   editorDialog.exec();
 }
 else {
   // Don't offer the dialog.
 }
 </pre>
 Note: signals and slots must be connected to the editorDialog object, not to the editor object:
 <pre>
 connect( editorDialog, SIGNAL("canUndo( boolean )"), undoBut, SLOT("setEnabled( boolean )") );
 </pre>
 If you want to create an instance of the editor widget, i.e. not the
 dialog, then you must do it in the following way:
 <pre>
 TQWidget editorWidget =
 KParts.ComponentFactory.createInstanceFromQuery<TQWidget>( 
     "KRegExpEditor/KRegExpEditor", null, parent );
 if ( editorWidget ) {
   // tdeutils was installed, so the widget was found fetch the editor interface
   KRegExpEditorInterface editor = (KRegExpEditorInterface)( editorWidget.tqt_cast( "KRegExpEditorInterface" ) );
   Q_ASSERT( editor ); // This should not fail!
   // now use the editor.
   editor.setRegExp("^kde$");
   // Finally insert the widget into the layout of its parent
   layout.addWidget( editorWidget );
 }
 else {
   // Don't offer the editor widget.
 }
 </pre>
 		@author Jesper K. Pedersen blackie@kde.org

		@short     A graphical editor for regular expressions.

*/
public class KRegExpEditorInterface implements QtSupport {
	private long _qt;
	private boolean _allocatedInJavaWorld = true;
	protected KRegExpEditorInterface(Class dummy){}

	/**	
		 returns the regular expression of the editor in Qt3 TQRegExp
		 syntax. Note, there is also a 'regexp' Qt property available.
		   		@short    returns the regular expression of the editor in Qt3 TQRegExp  syntax.
	*/
	public native String regExp();
	/**	
		 Set the regular expression for the editor. The syntax must be Qt3
		 TQRegExp syntax.
		  		@short    Set the regular expression for the editor.
	*/
	public native void setRegExp(String regexp);
	public native void redo();
	public native void undo();
	/**	
		 Set text to use when showing matches. NOT IMPLEMENTED YET!
			 This method is not yet implemented. In later version of the widget
		 this method will be used to give the widget a text to show matches of
		 the regular expression on.
		   		@short    Set text to use when showing matches.
	*/
	public native void setMatchText(String arg1);
	/**	
		 This method allows for future changes that will not break binary
		 compatibility. DONT USE!
			 KDE has a policy of keeping binary compatibility for all major
		 version of KDE. This means that new methods can not be added to this
		 API before KDE version 4.0.
			 This method is an escape door for that.
			 Conclusion: You should not use this method in this version of KDE!
		   		@short    This method allows for future changes that will not break binary  compatibility.
	*/
	// void doSomething(TQString arg1,void* arg2); >>>> NOT CONVERTED
}