summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KFileTreeView.java
blob: a0a8002c500c58d662f87edf585b4b42cc377c6c (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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.TQListViewItem;
import org.kde.qt.TQMetaObject;
import org.kde.qt.QtSupport;
import org.kde.qt.TQPixmap;
import org.kde.qt.TQDragMoveEvent;
import org.kde.qt.TQDragEnterEvent;
import org.kde.qt.TQDragLeaveEvent;
import java.util.ArrayList;
import org.kde.qt.TQDropEvent;
import org.kde.qt.TQWidget;
import org.kde.qt.TQDragObject;

/**

 The filetreeview offers a treeview on the file system which behaves like
 a TQTreeView showing files and/or directories in the file system.
 KFileTreeView is able to handle more than one URL, represented by
 KFileTreeBranch.
 Typical usage:
 1. create a KFileTreeView fitting in your layout and add columns to it
 2. call addBranch to create one or more branches
 3. retrieve the root item with KFileTreeBranch.root() and set it open
    if desired. That starts the listing.
  See {@link KFileTreeViewSignals} for signals emitted by KFileTreeView
		@short    The filetreeview offers a treeview on the file system which behaves like  a TQTreeView showing files and/or directories in the file system.

*/
public class KFileTreeView extends KListView  {
	protected KFileTreeView(Class dummy){super((Class) null);}
	public native TQMetaObject metaObject();
	public native String className();
	public KFileTreeView(TQWidget parent, String name) {
		super((Class) null);
		newKFileTreeView(parent,name);
	}
	private native void newKFileTreeView(TQWidget parent, String name);
	public KFileTreeView(TQWidget parent) {
		super((Class) null);
		newKFileTreeView(parent);
	}
	private native void newKFileTreeView(TQWidget parent);
	/**	
				@return the current (i.e. selected) item
     
		@short
	*/
	public native KFileTreeViewItem currentKFileTreeViewItem();
	/**	
				@return the URL of the current selected item.
    
		@short
	*/
	public native KURL currentURL();
	/**	
		  Adds a branch to the treeview item.
			  This high-level function creates the branch, adds it to the treeview and
		  connects some signals. Note that directory listing does not start until
		  a branch is expanded either by opening the root item by user or by setOpen
		  on the root item.
			@param path is the base url of the branch
			@param name is the name of the branch, which will be the text for column 0
			@param showHidden says if hidden files and directories should be visible
		    		@return a pointer to the new branch or zero

		@short     Adds a branch to the treeview item.
	*/
	public native KFileTreeBranch addBranch(KURL path, String name, boolean showHidden);
	public native KFileTreeBranch addBranch(KURL path, String name);
	/**	
		  same as the function above but with a pixmap to set for the branch.
		    		@short     same as the function above but with a pixmap to set for the branch.
	*/
	public native KFileTreeBranch addBranch(KURL path, String name, TQPixmap pix, boolean showHidden);
	public native KFileTreeBranch addBranch(KURL path, String name, TQPixmap pix);
	/**	
		  same as the function above but letting the user create the branch.
		    		@short     same as the function above but letting the user create the branch.
	*/
	public native KFileTreeBranch addBranch(KFileTreeBranch arg1);
	/**	
		  removes the branch from the treeview.
			@param branch is a pointer to the branch
				@return true on success.
    
		@short     removes the branch from the treeview.
	*/
	public native boolean removeBranch(KFileTreeBranch branch);
	/**	
			@param searchName is the name of a branch
		    		@return a pointer to the KFileTreeBranch in the KFileTreeView or zero on failure.

		@short
	*/
	public native KFileTreeBranch branch(String searchName);
	/**	
				@return a list of pointers to all existing branches in the treeview.

		@short
	*/
	// KFileTreeBranchList& branches(); >>>> NOT CONVERTED
	/**	
		  set the directory mode for branches. If true is passed, only directories will be loaded.
			@param branch is a pointer to a KFileTreeBranch
		    		@short     set the directory mode for branches.
	*/
	public native void setDirOnlyMode(KFileTreeBranch branch, boolean arg2);
	/**	
		 searches a branch for a KFileTreeViewItem identified by the relative url given as
		 second parameter. The method adds the branches base url to the relative path and finds
		 the item.
			@param brnch is a pointer to the branch to search in
			@param relUrl is the branch relativ url
		    		@return a pointer to the item or zero if the item does not exist.

		@short    searches a branch for a KFileTreeViewItem identified by the relative url given as  second parameter.
	*/
	public native KFileTreeViewItem findItem(KFileTreeBranch brnch, String relUrl);
	/**	
		 see method above, differs only in the first parameter. Finds the branch by its name.
		    		@short    see method above, differs only in the first parameter.
	*/
	public native KFileTreeViewItem findItem(String branchName, String relUrl);
	/**	
				@return a flag indicating if extended folder pixmaps are displayed or not.
    
		@short
	*/
	public native boolean showFolderOpenPixmap();
	/**	
		 set the flag to show 'extended' folder icons on or off. If switched on, folders will
		 have an open folder pixmap displayed if their children are visible, and the standard
		 closed folder pixmap (from mimetype folder) if they are closed.
		 If switched off, the plain mime pixmap is displayed.
			@param showIt = false displays mime type pixmap only
		    		@short    set the flag to show 'extended' folder icons on or off.
	*/
	public native void setShowFolderOpenPixmap(boolean showIt);
	public native void setShowFolderOpenPixmap();
	/**	
				@return true if we can decode the drag and support the action
    
		@short
	*/
	protected native boolean acceptDrag(TQDropEvent event);
	protected native TQDragObject dragObject();
	protected native void startAnimation(KFileTreeViewItem item, String iconBaseName, int iconCount);
	protected native void startAnimation(KFileTreeViewItem item, String iconBaseName);
	protected native void startAnimation(KFileTreeViewItem item);
	protected native void stopAnimation(KFileTreeViewItem item);
	protected native void contentsDragEnterEvent(TQDragEnterEvent e);
	protected native void contentsDragMoveEvent(TQDragMoveEvent e);
	protected native void contentsDragLeaveEvent(TQDragLeaveEvent e);
	protected native void contentsDropEvent(TQDropEvent ev);
	// void slotNewTreeViewItems(KFileTreeBranch* arg1,const KFileTreeViewItemList& arg2); >>>> NOT CONVERTED
	protected native void slotSetNextUrlToSelect(KURL url);
	protected native TQPixmap itemIcon(KFileTreeViewItem arg1, int gap);
	protected native TQPixmap itemIcon(KFileTreeViewItem 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();
}