//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.QMetaObject;
import org.kde.qt.QtSupport;
import org.kde.qt.QObject;
import org.kde.qt.QPoint;
import org.kde.qt.QCustomEvent;
import org.kde.qt.QWidget;
import org.kde.qt.QObject;

/**

 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 QWidget.
 This is due to the fact that the "visual representation"
 will probably not be a mere QWidget, 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 QObject implements PartBaseInterface {
	protected Part(Class dummy){super((Class) null);}
	public native QMetaObject 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(QObject parent, String name) {
		super((Class) null);
		newPart(parent,name);
	}
	private native void newPart(QObject parent, String name);
	public Part(QObject parent) {
		super((Class) null);
		newPart(parent);
	}
	private native void newPart(QObject 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 QWidget.reparent().
		 Note that the Part is still the holder
		 of the QWidget, 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(QWidget parentWidget);
	/**	
				@return The widget defined by this part, set by setWidget().
     
		@short
	*/
	public native QWidget 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 khtml 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(QWidget widget, QPoint 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(QWidget widget);
	/**	
			     		@short
	*/
	protected native void customEvent(QCustomEvent 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 QWidget hostContainer(String containerName);
	/**	
		  Internal method. Called by KParts.Part to specify the parent object for plugin objects.
			   		@short     Internal method.
	*/
	public native void setPartObject(QObject object);
	public native QObject partObject();
	/**	
		 Set the instance ( KInstance) for this part.
			 Call this first in the inherited class constructor,
		 because it loads the i18n catalogues.
		   		@short    Set the instance ( KInstance) for this part.
	*/
	protected native void setInstance(KInstanceInterface instance);
	/**	
		 Set the instance ( KInstance) for this part.
			 Call this first in the inherited class constructor,
		 because it loads the i18n catalogues.
		   		@short    Set the instance ( KInstance) for this part.
	*/
	protected native void setInstance(KInstanceInterface 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() )
		 {
		   QPtrList<KParts.Plugin> plugins = KParts.Plugin.pluginObjects( this );
		   QPtrListIterator<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(QObject parent, KXMLGUIClientInterface parentGUIClient, KInstanceInterface 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
}
