summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KTipDatabase.java
blob: 56087877aaa2b41dd9a53112ec7fc75b59afe6b7 (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
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

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

/**

 A database for tips-of-the-day.
 This class provides convenient access to a database containing
 tips of the day. The database is stored in a XML file and parsed
 when a KTipDatabase object is created.
 Once the file is read in, you can access the tips to display
 them in the tip of the day dialog.
 The state of the tipdialog is saved to the applications's config file
 in the group "TipOfDay" with a boolean entry "RunOnStart". Check this value
 if you want to allow the user to enable/disable the tipdialog in the
 application's configuration dialog.
 		@author Matthias Hoelzer-Kluepfel <mhk@kde.org>

		@short    A database for tips-of-the-day.

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

	/**	
		 This constructor reads in the tips from a file with the given name. If
		 no name is given, a file called 'application-name/tips' will be loaded.
			@param tipFile The absolute path to the tips file.
		     		@short    This constructor reads in the tips from a file with the given name.
	*/
	public KTipDatabase(String tipFile) {
		newKTipDatabase(tipFile);
	}
	private native void newKTipDatabase(String tipFile);
	public KTipDatabase() {
		newKTipDatabase();
	}
	private native void newKTipDatabase();
	/**	
		 This constructor takes a list of files that will be merged. This constructor
		 essentially behaves like the one above. It returns when tipFiles is empty.
			@param tipFiles A list of absolute paths to the tips file
		     		@short    This constructor takes a list of files that will be merged.
	*/
	public KTipDatabase(String[] tipFiles) {
		newKTipDatabase(tipFiles);
	}
	private native void newKTipDatabase(String[] tipFiles);
	/**	
		 Returns the current tip.
		     		@short    Returns the current tip.
	*/
	public native String tip();
	/**	
		 The next tip will become the current one.
		     		@short    The next tip will become the current one.
	*/
	public native void nextTip();
	/**	
		 The previous tip will become the current one.
		     		@short    The previous tip will become the current one.
	*/
	public native void prevTip();
	/** 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();
}