//Auto-generated by kalyptus. DO NOT EDIT. package org.trinitydesktop.koala; import org.trinitydesktop.qt.Qt; import org.trinitydesktop.qt.TQMetaObject; import org.trinitydesktop.qt.QtSupport; import org.trinitydesktop.qt.TQObject; import org.trinitydesktop.qt.TQDataStream; import org.trinitydesktop.qt.TQPoint; import java.util.ArrayList; import org.trinitydesktop.qt.TQObject; /** The Browser Extension is an extension (yes, no kidding) to KParts.ReadOnlyPart, which allows a better integration of parts with browsers (in particular Konqueror). Remember that ReadOnlyPart only has openURL(KURL), with no other settings. For full-fledged browsing, we need much more than that, including many arguments about how to open this URL (see URLArgs), allowing parts to save and restore their data into the back/forward history, allowing parts to control the location bar URL, to requests URLs to be opened by the hosting browser, etc. The part developer needs to define its own class derived from BrowserExtension, to implement the methods [and the standard-actions slots, see below]. The way to associate the BrowserExtension with the part is to simply create the BrowserExtension as a child of the part (in TQObject's terms). The hosting application will look for it automatically. Another aspect of the browser integration is that a set of standard actions are provided by the browser, but implemented by the part (for the actions it supports). The following standard actions are defined by the host of the view : [selection-dependent actions]
  • cut : Copy selected items to clipboard and store 'not cut' in clipboard.
  • copy : Copy selected items to clipboard and store 'cut' in clipboard.
  • paste : Paste clipboard into view URL.
  • pasteTo(KURL) : Paste clipboard into given URL.
  • rename : Rename item in place.
  • trash : Move selected items to trash.
  • del : Delete selected items (couldn't call it delete!).
  • shred : Shred selected items (secure deletion) - DEPRECATED.
  • properties : Show file/document properties.
  • editMimeType : show file/document's mimetype properties.
  • searchProvider : Lookup selected text at default search provider
  • [normal actions]
  • print : Print :-)
  • reparseConfiguration : Re-read configuration and apply it.
  • refreshMimeTypes : If the view uses mimetypes it should re-determine them.
  • The view defines a slot with the name of the action in order to implement the action. The browser will detect the slot automatically and connect its action to it when appropriate (i.e. when the view is active). The selection-dependent actions are disabled by default and the view should enable them when the selection changes, emitting enableAction(). The normal actions do not depend on the selection. You need to enable 'print' when printing is possible - you can even do that in the constructor. A special case is the configuration slots, not connected to any action directly, and having parameters. [configuration slot]
  • setSaveViewPropertiesLocally( boolean ): If true, view properties are saved into .directory otherwise, they are saved globally.
  • disableScrolling: no scrollbars
  • See {@link BrowserExtensionSignals} for signals emitted by BrowserExtension @short The Browser Extension is an extension (yes, no kidding) to KParts.ReadOnlyPart, which allows a better integration of parts with browsers (in particular Konqueror). */ public class BrowserExtension extends TQObject { protected BrowserExtension(Class dummy){super((Class) null);} public native TQMetaObject metaObject(); public native String className(); /** Constructor @param parent The KParts.ReadOnlyPart that this extension ... "extends" :) @param name An optional name for the extension. @short Constructor */ public BrowserExtension(ReadOnlyPart parent, String name) { super((Class) null); newBrowserExtension(parent,name); } private native void newBrowserExtension(ReadOnlyPart parent, String name); public BrowserExtension(ReadOnlyPart parent) { super((Class) null); newBrowserExtension(parent); } private native void newBrowserExtension(ReadOnlyPart parent); /** Set the parameters to use for opening the next URL. This is called by the "hosting" application, to pass parameters to the part. @short Set the parameters to use for opening the next URL. @see URLArgs */ public native void setURLArgs(URLArgs args); /** Retrieve the set of parameters to use for opening the URL (this must be called from openURL() in the part). @short Retrieve the set of parameters to use for opening the URL (this must be called from openURL() in the part). @see URLArgs */ public native URLArgs urlArgs(); /** Returns the current x offset. For a scrollview, implement this using contentsX(). @short Returns the current x offset. */ public native int xOffset(); /** Returns the current y offset. For a scrollview, implement this using contentsY(). @short Returns the current y offset. */ public native int yOffset(); /** Used by the browser to save the current state of the view (in order to restore it if going back in navigation). If you want to save additional properties, reimplement it but don't forget to call the parent method (probably first). @short Used by the browser to save the current state of the view (in order to restore it if going back in navigation). */ public native void saveState(TQDataStream stream); /** Used by the browser to restore the view in the state it was when we left it. If you saved additional properties, reimplement it but don't forget to call the parent method (probably first). @short Used by the browser to restore the view in the state it was when we left it. */ public native void restoreState(TQDataStream stream); /** Returns whether url drop handling is enabled. See setURLDropHandlingEnabled for more information about this property. @short Returns whether url drop handling is enabled. */ public native boolean isURLDropHandlingEnabled(); /** Enables or disables url drop handling. URL drop handling is a property describing whether the hosting shell component is allowed to install an event filter on the part's widget, to listen for URI drop events. Set it to true if you are exporting a BrowserExtension implementation and do not provide any special URI drop handling. If set to false you can be sure to receive all those URI drop events unfiltered. Also note that the implementation as of Konqueror installs the event filter only on the part's widget itself, not on child widgets. @short Enables or disables url drop handling. */ public native void setURLDropHandlingEnabled(boolean enable); public native void setBrowserInterface(BrowserInterface impl); public native BrowserInterface browserInterface(); /** @return the status (enabled/disabled) of an action. When the enableAction signal is emitted, the browserextension stores the status of the action internally, so that it's possible to query later for the status of the action, using this method. @short */ public native boolean isActionEnabled(String name); /** @return the text of an action, if it was set explicitely by the part. When the setActionText signal is emitted, the browserextension stores the text of the action internally, so that it's possible to query later for the text of the action, using this method. @short */ public native String actionText(String name); /** Asks the hosting browser to perform a paste (using openURLRequestDelayed) @short Asks the hosting browser to perform a paste (using openURLRequestDelayed) */ public native void pasteRequest(); /** Returns a map containing the action names as keys and corresponding TQ_SLOT()'ified method names as data entries. This is very useful for the host component, when connecting the own signals with the extension's slots. Basically you iterate over the map, check if the extension implements the slot and connect to the slot using the data value of your map iterator. Checking if the extension implements a certain slot can be done like this:
    		   extension.metaObject().slotNames().contains( actionName + "()" )
    		 
    (note that actionName is the iterator's key value if already iterating over the action slot map, returned by this method) Connecting to the slot can be done like this:
    		   connect( yourObject, TQ_SIGNAL("yourSignal()"),
    		            extension, mapIterator.data() )
    		 
    (where "mapIterator" is your TQMap iterator) @short Returns a map containing the action names as keys and corresponding TQ_SLOT()'ified method names as data entries. */ // KParts::BrowserExtension::ActionSlotMap actionSlotMap(); >>>> NOT CONVERTED /** @return a pointer to the static action-slot map. Preferred method to get it. The map is created if it doesn't exist yet @short */ // KParts::BrowserExtension::ActionSlotMap* actionSlotMapPtr(); >>>> NOT CONVERTED /** Queries obj for a child object which inherits from this BrowserExtension class. Convenience method. @short Queries obj for a child object which inherits from this BrowserExtension class. */ public static native BrowserExtension childObject(TQObject arg1); }