//Auto-generated by kalyptus. DO NOT EDIT. package org.kde.koala; import org.kde.qt.Qt; import org.kde.qt.TQColor; import org.kde.qt.TQRect; import org.kde.qt.TQListViewItem; import org.kde.qt.TQMetaObject; import org.kde.qt.QtSupport; import org.kde.qt.TQPaintEvent; import org.kde.qt.TQPoint; import org.kde.qt.TQDragEnterEvent; import org.kde.qt.TQDragMoveEvent; import org.kde.qt.TQPainter; import org.kde.qt.TQDragLeaveEvent; import org.kde.qt.TQFocusEvent; import org.kde.qt.TQKeyEvent; import org.kde.qt.TQMouseEvent; import org.kde.qt.TQDropEvent; import org.kde.qt.TQEvent; import org.kde.qt.TQIconSet; import org.kde.qt.TQWidget; import org.kde.qt.TQResizeEvent; import org.kde.qt.TQDragObject; import org.kde.qt.TQListView; /** This Widget extends the functionality of TQListView to honor the system wide settings for Single Click/Double Click mode, AutoSelection and ChangeCursorOverLink (TM). There is a new signal executed(). It gets connected to either TQListView.clicked() or TQListView.doubleClicked() depending on the KDE wide Single Click/Double Click settings. It is strongly recommended that you use this signal instead of the above mentioned. This way you don't need to care about the current settings. If you want to get informed when the user selects something connect to the TQListView.selectionChanged() signal. Drag-and-Drop is supported with the signal dropped(), just setAcceptDrops(true) and connect it to a suitable slot. To see where you are dropping, setDropVisualizer(true). And also you'll need acceptDrag(TQDropEvent) KListView is drag-enabled, too: to benefit from that you have to derive from it. Reimplement dragObject() and (possibly) startDrag(), and setDragEnabled(true). See {@link KListViewSignals} for signals emitted by KListView @short This Widget extends the functionality of TQListView to honor the system wide settings for Single Click/Double Click mode, AutoSelection and ChangeCursorOverLink (TM). */ public class KListView extends TQListView { protected KListView(Class dummy){super((Class) null);} /** Possible selection modes. The first four correspond directly to TQListView.SelectionMode, while the FileManager selection mode is defined as follows:
  • home: move to the first
  • end: move to the last
  • PgUp/PgDn: move one page up/down
  • up/down: move one item up/down
  • insert: toggle selection of current and move to the next
  • space: toggle selection of the current
  • CTRL+up: move to the previous item and toggle selection of this one
  • CTRL+down: toggle selection of the current item and move to the next
  • CTRL+end: toggle selection from (including) the current item to (including) the last item
  • CTRL+home: toggle selection from (including) the current item to the (including) the first item
  • CTRL+PgDn: toggle selection from (including) the current item to (excluding) the item one page down
  • CTRL+PgUp: toggle selection from (excluding) the current item to (including) the item one page up
  • The combinations work the same with SHIFT instead of CTRL, except that if you start selecting something using SHIFT everything selected before will be deselected first. Additionally the current item is always selected automatically when navigating using the keyboard, except other items were selected explicitly. This way e.g. SHIFT+up/PgUp then SHIFT+down/PgDn leaves no item selected @short Possible selection modes. */ public static final int Single = TQListView.Single; public static final int Multi = TQListView.Multi; public static final int Extended = TQListView.Extended; public static final int NoSelection = TQListView.NoSelection; public static final int FileManager = 0; public native TQMetaObject metaObject(); public native String className(); /** Constructor. The parameters parent and name are handled by TQListView, as usual. @short Constructor. */ public KListView(TQWidget parent, String name) { super((Class) null); newKListView(parent,name); } private native void newKListView(TQWidget parent, String name); public KListView(TQWidget parent) { super((Class) null); newKListView(parent); } private native void newKListView(TQWidget parent); public KListView() { super((Class) null); newKListView(); } private native void newKListView(); /** Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. @short Reimplemented for internal reasons. */ public native void setAcceptDrops(boolean arg1); /** This function determines whether the given coordinates are within the execute area. The execute area is the part of a TQListViewItem where mouse clicks or double clicks respectively generate a executed() signal. Depending on TQListView.allColumnsShowFocus() this is either the whole item or only the first column. @return true if point is inside execute area of an item, false in all other cases including the case that it is over the viewport. @short This function determines whether the given coordinates are within the execute area. */ public native boolean isExecuteArea(TQPoint point); /** Same thing, but from an x coordinate only. This only checks if x is in the first column (if all columns don't show focus), without testing if the y coordinate is over an item or not. @short Same thing, but from an x coordinate only. */ public native boolean isExecuteArea(int x); /** @param includeHiddenItems Set to true to return all items regardless of visibility. Set to false to only return items that are isVisible(). @return a list of all selected listview items @short */ // TQPtrList selectedItems(bool arg1); >>>> NOT CONVERTED /** Arbitrarily move item to parent, positioned immediately after item after. If after is 0, item is made the first child of parent. (Un-deprecated in kde-3.4) @short Arbitrarily move item to parent, positioned immediately after item after. */ public native void moveItem(TQListViewItem item, TQListViewItem parent, TQListViewItem after); /** @return the last item (not child!) of this listview. @short @see #lastChild */ public native TQListViewItem lastItem(); /** @return the last child of this listview. @short @see #lastItem */ public native TQListViewItem lastChild(); /** @return the lineedit used for inline renaming. Use that to setup a KCompletion or TQValidator for the lineedit @short */ public native KLineEdit renameLineEdit(); /** @return if it is legal to move items in the list view. True by default. @short @see #setDragEnabled @see #setItemsMovable */ public native boolean itemsMovable(); /** @return whether inplace-renaming has been enabled. False by default. @short @see #setItemsRenameable */ public native boolean itemsRenameable(); /** @return whether dragging is enabled. False by default. @short @see #setDragEnabled */ public native boolean dragEnabled(); /** @return true if AutoOpen is enabled (not implemented currently). @short @see #setAutoOpen */ public native boolean autoOpen(); /** @return true if column is renamable. @short @see #setRenameable */ public native boolean isRenameable(int column); /** @return true if drawing of the drop-visualizer has been enabled. True by default. @short @see #setDropVisualizer */ public native boolean dropVisualizer(); /** @return the column for which tooltips are displayed (or -1 if none set). @short @see #setTooltipColumn */ public native int tooltipColumn(); /** @return true if drawing of the drop-highlighter has been enabled. False by default. @short @see #setDropHighlighter */ public native boolean dropHighlighter(); /** The dropVisualizerWidth defaults to 4. @return the current width of the drop-visualizer. @short The dropVisualizerWidth defaults to 4. @see #setDropVisualizerWidth */ public native int dropVisualizerWidth(); /** @return the "extended" selection mode of this listview. @short @see SelectionModeExt @see #setSelectionModeExt */ public native int selectionModeExt(); /** Returns the index of item within the item tree or -1 if item doesn't exist in this list view. This function takes all items into account not only the visible ones. @short Returns the index of item within the item tree or -1 if item doesn't exist in this list view. */ public native int itemIndex(TQListViewItem item); /** Returns the item of index within the item tree or 0 if index doesn't exist in this list view. This function takes all items into account not only the visible ones. @short Returns the item of index within the item tree or 0 if index doesn't exist in this list view. */ public native TQListViewItem itemAtIndex(int index); /** Let the last column fit exactly all the available width. @short Let the last column fit exactly all the available width. @see #fullWidth */ public native void setFullWidth(boolean fullWidth); /** Returns whether the last column is set to fit the available width. @short Returns whether the last column is set to fit the available width. @see #setFullWidth */ public native boolean fullWidth(); /** Reimplemented for full width support @short Reimplemented for full width support @see #removeColumn */ public native int addColumn(String label, int width); public native int addColumn(String label); /** Reimplemented for full width support @short Reimplemented for full width support */ public native int addColumn(TQIconSet iconset, String label, int width); public native int addColumn(TQIconSet iconset, String label); /** Reimplemented for full width support @short Reimplemented for full width support @see #addColumn */ public native void removeColumn(int index); /** sets the alternate background background color. This only has an effect if the items are KListViewItems @param c the color to use for every other item. Set to an invalid color to disable alternate colors. @short sets the alternate background background color. @see #alternateBackground */ public native void setAlternateBackground(TQColor c); /** @return the alternate background color @short @see #setAlternateBackground */ public native TQColor alternateBackground(); /** Saves the list view's layout (column widtsh, column order, sort column) to a TDEConfig group @param config the TDEConfig object to write to @param group the config group to use @short Saves the list view's layout (column widtsh, column order, sort column) to a TDEConfig group */ public native void saveLayout(TDEConfig config, String group); /** Reads the list view's layout from a TDEConfig group as stored with saveLayout @param config the TDEConfig object to read from @param group the config group to use @short Reads the list view's layout from a TDEConfig group as stored with saveLayout */ public native void restoreLayout(TDEConfig config, String group); /** Reimplemented to remember the current sort column and order. @param column is the column to be sorted, or -1 to sort in order of insertion @param ascending whether to sort ascending (or descending) @short Reimplemented to remember the current sort column and order. */ public native void setSorting(int column, boolean ascending); public native void setSorting(int column); /** @return the currently sorted column, or -1 if none is sorted @short */ public native int columnSorted(); /** @return whether the current sort is ascending (or descending) @short */ public native boolean ascendingSort(); /** Reimplemented for internal reasons. @short Reimplemented for internal reasons. */ public native void takeItem(TQListViewItem i); /** Set to true if the currently sorted column should be drawn shaded. Defaults to true @param shadeSortColumn True if sort column should be shaded. @short Set to true if the currently sorted column should be drawn shaded. */ public native void setShadeSortColumn(boolean shadeSortColumn); /** See if the sort column should be drawn shaded @return true if the sort column should be shaded @short See if the sort column should be drawn shaded */ public native boolean shadeSortColumn(); /** Rename column c of item. @short Rename column c of item. */ public native void rename(TQListViewItem item, int c); /** By default, if you called setItemsRenameable(true), only the first column is renameable. Use this function to enable the feature on other columns. If you want more intelligent (dynamic) selection, you'll have to derive from KListView, and override rename() and call only call it if you want the item to be renamed. @short By default, if you called setItemsRenameable(true), only the first column is renameable. */ public native void setRenameable(int column, boolean yesno); public native void setRenameable(int column); /** Set whether items in the list view can be moved. It is enabled by default. @short Set whether items in the list view can be moved. @see #itemsMovable */ public native void setItemsMovable(boolean b); /** Enables inplace-renaming of items. It is disabled by default. @short Enables inplace-renaming of items. @see #itemsRenameable @see #setRenameable */ public native void setItemsRenameable(boolean b); /** Enable/Disable the dragging of items. It is disabled by default. @short Enable/Disable the dragging of items. */ public native void setDragEnabled(boolean b); /** Enable/Disable AutoOpen (not implemented currently). @short Enable/Disable AutoOpen (not implemented currently). */ public native void setAutoOpen(boolean b); /** Enable/Disable the drawing of a drop-visualizer (a bar that shows where a dropped item would be inserted). It is enabled by default, if dragging is enabled @short Enable/Disable the drawing of a drop-visualizer (a bar that shows where a dropped item would be inserted). */ public native void setDropVisualizer(boolean b); /** Set the width of the (default) drop-visualizer. If you don't call this method, the width is set to 4. @short Set the width of the (default) drop-visualizer. */ public native void setDropVisualizerWidth(int w); /** Set which column should be used for automatic tooltips. @param column is the column for which tooltips will be shown. Set -1 to disable this feature. @short Set which column should be used for automatic tooltips. */ public native void setTooltipColumn(int column); /** Enable/Disable the drawing of a drop-highlighter (a rectangle around the item under the mouse cursor). It is disabled by default. @short Enable/Disable the drawing of a drop-highlighter (a rectangle around the item under the mouse cursor). */ public native void setDropHighlighter(boolean b); /** Set the selection mode. A different name was chosen to avoid API-clashes with TQListView.setSelectionMode(). @short Set the selection mode. */ public native void setSelectionModeExt(int mode); /** Enable/disable tabbing between editable cells @short Enable/disable tabbing between editable cells */ public native void setTabOrderedRenaming(boolean b); /** Returns whether tab ordered renaming is enabled @short Returns whether tab ordered renaming is enabled */ public native boolean tabOrderedRenaming(); /** Determine whether a drop on position p would count as being above or below the TQRect rect. @param rect is the rectangle we examine. @param p is the point located in the rectangle, p is assumed to be in viewport coordinates. @short Determine whether a drop on position p would count as being above or below the TQRect rect. */ protected native boolean below(TQRect rect, TQPoint p); /** An overloaded version of below(TQRect, TQPoint). It differs from the above only in what arguments it takes. @param i the item whose rect() is passed to the above function. @param p is translated from contents coordinates to viewport coordinates before being passed to the above function. @short An overloaded version of below(TQRect, TQPoint). */ protected native boolean below(TQListViewItem i, TQPoint p); /** Reimplemented to reload the alternate background in palette changes. @short Reimplemented to reload the alternate background in palette changes. */ public native boolean event(TQEvent arg1); /** Emit signal executed. @short Emit signal executed. */ protected native void emitExecute(TQListViewItem item, TQPoint pos, int c); /** Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. @short Reimplemented for internal reasons. */ protected native void focusInEvent(TQFocusEvent fe); /** Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. @short Reimplemented for internal reasons. */ protected native void focusOutEvent(TQFocusEvent fe); /** Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. @short Reimplemented for internal reasons. */ protected native void leaveEvent(TQEvent e); /** @return the tooltip for column of item. @short */ protected native String tooltip(TQListViewItem item, int column); /** @return whether the tooltip for column of item shall be shown at point pos. @short */ protected native boolean showTooltip(TQListViewItem item, TQPoint pos, int column); /** Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. @short Reimplemented for internal reasons. */ protected native void contentsDragMoveEvent(TQDragMoveEvent event); /** Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. @short Reimplemented for internal reasons. */ protected native void contentsMousePressEvent(TQMouseEvent e); /** Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. @short Reimplemented for internal reasons. */ protected native void contentsMouseMoveEvent(TQMouseEvent e); /** Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. @short Reimplemented for internal reasons. */ protected native void contentsMouseDoubleClickEvent(TQMouseEvent e); /** Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. @short Reimplemented for internal reasons. */ protected native void contentsDragLeaveEvent(TQDragLeaveEvent event); /** Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. @short Reimplemented for internal reasons. */ protected native void contentsMouseReleaseEvent(TQMouseEvent arg1); /** Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. @short Reimplemented for internal reasons. */ protected native void contentsDropEvent(TQDropEvent arg1); /** Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. @short Reimplemented for internal reasons. */ protected native void contentsDragEnterEvent(TQDragEnterEvent arg1); /** @return a dragobject encoding the current selection. @short @see #setDragEnabled */ protected native TQDragObject dragObject(); /** @return true if the event provides some acceptable format. A common mistake is to forget the "const" in your reimplementation @short */ protected native boolean acceptDrag(TQDropEvent event); /** Paint the drag line. If painter is null, don't try to :) If after == 0 then the marker should be drawn at the top. @return the rectangle that you painted to. @short Paint the drag line. */ protected native TQRect drawDropVisualizer(TQPainter p, TQListViewItem parent, TQListViewItem after); /** Paint the drag rectangle. If painter is null, don't try to :) @return the rectangle that you painted to. @short Paint the drag rectangle. */ protected native TQRect drawItemHighlighter(TQPainter painter, TQListViewItem item); /** This method calls dragObject() and starts the drag. Reimplement it to do fancy stuff like setting a pixmap or using a non-default DragMode @short This method calls dragObject() and starts the drag. */ protected native void startDrag(); /** Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. @short Reimplemented for internal reasons. */ protected native void keyPressEvent(TQKeyEvent arg1); /** Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. @short Reimplemented for internal reasons. */ protected native void viewportPaintEvent(TQPaintEvent arg1); /** In FileManager selection mode: explicitly activate the mode in which the current item is automatically selected. @short In FileManager selection mode: explicitly activate the mode in which the current item is automatically selected. */ protected native void activateAutomaticSelection(); /** In FileManager selection mode: explicitly deactivate the mode in which the current item is automatically selected. @short In FileManager selection mode: explicitly deactivate the mode in which the current item is automatically selected. */ protected native void deactivateAutomaticSelection(); /** In FileManager selection mode: return whether it is currently in the mode where the current item is selected automatically. Returns false if items were selected explicitly, e.g. using the mouse. @short In FileManager selection mode: return whether it is currently in the mode where the current item is selected automatically. */ protected native boolean automaticSelection(); /** Reimplemented for setFullWidth() @short Reimplemented for setFullWidth() */ protected native void viewportResizeEvent(TQResizeEvent e); /** Disable AutoSelection. This overrides the system wide setting for AutoSelection. Please don't call this unless you have good reasons to override the system wide setting for AutoSelection. @short Disable AutoSelection. @see #resetAutoSelection */ protected native void disableAutoSelection(); /** Reset AutoSelection to the system wide setting. @short Reset AutoSelection to the system wide setting. @see #disableAutoSelection */ protected native void resetAutoSelection(); /** Handle dropEvent when itemsMovable() is set to true. @short Handle dropEvent when itemsMovable() is set to true. */ protected native void movableDropEvent(TQListViewItem parent, TQListViewItem afterme); /** Where is the nearest TQListViewItem that I'm going to drop? FIXME KDE 4.0: Make this method const so it can be called from an acceptDrag method without ugly casts @short Where is the nearest TQListViewItem that I'm going to drop? */ protected native void findDrop(TQPoint pos, TQListViewItem parent, TQListViewItem after); /** A special keyPressEvent (for FileManager selection mode). @short A special keyPressEvent (for FileManager selection mode). */ protected native void fileManagerKeyPressEvent(TQKeyEvent arg1); /** Convert the depth of an item into its indentation in pixels @short Convert the depth of an item into its indentation in pixels */ protected native int depthToPixels(int depth); /** Update internal settings whenever the global ones change. @short Update internal settings whenever the global ones change. */ protected native void slotSettingsChanged(int arg1); protected native void slotMouseButtonClicked(int btn, TQListViewItem item, TQPoint pos, int c); protected native void doneEditing(TQListViewItem item, int row); /** Repaint the rect where I was drawing the drop line. @short Repaint the rect where I was drawing the drop line. */ protected native void cleanDropVisualizer(); /** Repaint the rect where I was drawing the drop rectangle. @short Repaint the rect where I was drawing the drop rectangle. */ protected native void cleanItemHighlighter(); /** Emit the contextMenu signal. This slot is for mouse actions. @short Emit the contextMenu signal. */ protected native void emitContextMenu(TQListViewItem arg1, TQPoint arg2, int arg3); /** Emit the contextMenu signal. This slot is for key presses. @short Emit the contextMenu signal. */ protected native void emitContextMenu(KListView arg1, TQListViewItem arg2); /** Accessory slot for AutoSelect @short Accessory slot for AutoSelect */ protected native void slotOnItem(TQListViewItem item); /** Accessory slot for AutoSelect/ChangeCursorOverItem @short Accessory slot for AutoSelect/ChangeCursorOverItem */ protected native void slotOnViewport(); /** Process AutoSelection. @short Process AutoSelection. */ protected native void slotAutoSelect(); protected native void slotDragExpand(); /** Reacts to header changes in full width mode @short Reacts to header changes in full width mode */ protected native void slotHeaderChanged(); /** 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(); }