//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.TQPoint;
import org.trinitydesktop.qt.TQCustomEvent;
import org.trinitydesktop.qt.TQWidget;
import org.trinitydesktop.qt.TQObject;

/**

 Base class for parts.
 A "part" is a GUI component, featuring:

	<li>
	A widget embeddedable in any application.
	</li>

	<li>
	GUI elements that will be merged in the "host" user interface
	 (menubars, toolbars... ).
	</li>
	 <li><b>About the widget:</b></li>
 Note that KParts.Part does not inherit TQWidget.
 This is due to the fact that the "visual representation"
 will probably not be a mere TQWidget, but an elaborate one.
 That's why when implementing your KParts.Part (or derived)
 you should call KParts.Part.setWidget() in your constructor.
 <li><b>About the GUI elements:</b></li>
 Those elements trigger actions, defined by the part (action()).
 The layout of the actions in the GUI is defined by an XML file (setXMLFile()).
 See also ReadOnlyPart and ReadWritePart, which define the
 framework for a "viewer" part and for an "editor"-like part.
 Use Part directly only if your part doesn't fit into those.
  See {@link PartSignals} for signals emitted by Part
		@short    Base class for parts.

*/
public class Part extends TQObject implements PartBaseInterface {
	protected Part(Class dummy){super((Class) null);}
	public native TQMetaObject metaObject();
	public native String className();
	/**
		  Constructor.
			@param parent Parent object of the part.
			@param name QT-internal name of the part.
		     		@short     Constructor.
	*/
	public Part(TQObject parent, String name) {
		super((Class) null);
		newPart(parent,name);
	}
	private native void newPart(TQObject parent, String name);
	public Part(TQObject parent) {
		super((Class) null);
		newPart(parent);
	}
	private native void newPart(TQObject parent);
	public Part() {
		super((Class) null);
		newPart();
	}
	private native void newPart();
	/**
		 Embed this part into a host widget.
			 You don't need to do this if you created the widget with the
		 correct parent widget - this is just a TQWidget.reparent().
		 Note that the Part is still the holder
		 of the TQWidget, meaning that if you delete the Part,
		 then the widget gets destroyed as well, and vice-versa.
		 This method is not recommended since creating the widget with the correct
		 parent is simpler anyway.
		     		@short    Embed this part into a host widget.
	*/
	public native void embed(TQWidget parentWidget);
	/**
				@return The widget defined by this part, set by setWidget().

		@short
	*/
	public native TQWidget widget();
	/**
			 Used by the part manager.
		     		@short
	*/
	public native void setManager(PartManager manager);
	/**
		 Returns the part manager handling this part, if any (null otherwise).
		     		@short    Returns the part manager handling this part, if any (0L otherwise).
	*/
	public native PartManager manager();
	/**
		 Returns the part (this, or a child part) at the given global position.
		 This is called by the part manager to ask whether a part should be activated
		 when clicking somewhere. In most cases the default implementation is enough.
		 Reimplement this if your part has child parts in some areas (like in tdehtml or koffice)
			@param widget the part widget being clicked - usually the same as widget(), except in koffice.
			@param globalPos the mouse coordinates in global coordinates
		     		@short    Returns the part (this, or a child part) at the given global position.
	*/
	public native Part hitTest(TQWidget widget, TQPoint globalPos);
	/**
			@param selectable Indicates whether the part is selectable or not.
		     		@short
	*/
	public native void setSelectable(boolean selectable);
	/**
		  Returns whether the part is selectable or not.
		     		@short     Returns whether the part is selectable or not.
	*/
	public native boolean isSelectable();
	/**
		 Set the main widget.
			 Call this in the Part-inherited class constructor.
		     		@short    Set the main widget.
	*/
	protected native void setWidget(TQWidget widget);
	/**
			     		@short
	*/
	protected native void customEvent(TQCustomEvent event);
	/**
		 Convenience method which is called when the Part received a PartActivateEvent .
		 Reimplement this if you don't want to reimplement event and test for the event yourself
		 or even install an event filter.
		     		@short    Convenience method which is called when the Part received a PartActivateEvent .
	*/
	protected native void partActivateEvent(PartActivateEvent event);
	/**
		 Convenience method which is called when the Part received a
		 PartSelectEvent .
		 Reimplement this if you don't want to reimplement event and
		 test for the event yourself or even install an event filter.
		     		@short    Convenience method which is called when the Part received a  PartSelectEvent .
	*/
	protected native void partSelectEvent(PartSelectEvent event);
	/**
		 Convenience method which is called when the Part received a
		 GUIActivateEvent .
		 Reimplement this if you don't want to reimplement event and
		 test for the event yourself or even install an event filter.
		     		@short    Convenience method which is called when the Part received a  GUIActivateEvent .
	*/
	protected native void guiActivateEvent(GUIActivateEvent event);
	/**
		 Convenience method for KXMLGUIFactory.container.
				@return a container widget owned by the Part's GUI.

		@short    Convenience method for KXMLGUIFactory.container.
	*/
	protected native TQWidget hostContainer(String containerName);
	/**
		  Internal method. Called by KParts.Part to specify the parent object for plugin objects.
			   		@short     Internal method.
	*/
	public native void setPartObject(TQObject object);
	public native TQObject partObject();
	/**
		 Set the instance ( TDEInstance) for this part.
			 Call this first in the inherited class constructor,
		 because it loads the i18n catalogues.
		   		@short    Set the instance ( TDEInstance) for this part.
	*/
	protected native void setInstance(TDEInstanceInterface instance);
	/**
		 Set the instance ( TDEInstance) for this part.
			 Call this first in the inherited class constructor,
		 because it loads the i18n catalogues.
		   		@short    Set the instance ( TDEInstance) for this part.
	*/
	protected native void setInstance(TDEInstanceInterface instance, boolean loadPlugins);
	/**
		 Load the Plugins honoring the PluginLoadingMode.
			 If you call this method in an already constructed GUI (like when the user
		 has changed which plugins are enabled) you need to add the new plugins to
		 the KXMLGUIFactory:
		 <pre>
		 if( factory() )
		 {
		   TQPtrList<KParts.Plugin> plugins = KParts.Plugin.pluginObjects( this );
		   TQPtrListIterator<KParts.Plugin> it( plugins );
		   KParts.Plugin  plugin;
		   while( ( plugin = it.current() ) != 0 )
		   {
		     ++it;
		     factory().addClient(  plugin );
		   }
		 }
		 </pre>
		   		@short    Load the Plugins honoring the PluginLoadingMode.
	*/
	protected native void loadPlugins(TQObject parent, KXMLGUIClientInterface parentGUIClient, TDEInstanceInterface instance);
	/**
		 For a KParts.Part: call this before setInstance().
		 For a KParts.MainWindow: call this before createGUI().
		   		@short    For a KParts.Part: call this before setInstance().
	*/
	// void setPluginLoadingMode(KParts::PartBase::PluginLoadingMode arg1); >>>> NOT CONVERTED
}
