Sophie

Sophie

distrib > * > 2009.0 > i586 > by-pkgid > a6711891ce757817bba854bf3f25205a > files > 2091

qtjambi-doc-4.3.3-3mdv2008.1.i586.rpm

<class name="QItemEditorFactory" doc="/**
&lt;p&gt;The &lt;a href=&quot;QItemEditorFactory.html#QItemEditorFactory()&quot;&gt;&lt;tt&gt;QItemEditorFactory&lt;/tt&gt;&lt;/a&gt; class provides widgets for editing item data in views and delegates.&lt;/p&gt;
&lt;p&gt;When editing data in an item view, editors are created and displayed by a delegate. &lt;a href=&quot;QItemDelegate.html&quot;&gt;&lt;tt&gt;QItemDelegate&lt;/tt&gt;&lt;/a&gt;, which is the delegate by default installed on Qt's item views, uses a &lt;a href=&quot;QItemEditorFactory.html#QItemEditorFactory()&quot;&gt;&lt;tt&gt;QItemEditorFactory&lt;/tt&gt;&lt;/a&gt; to create editors for it. A default unique instance provided by &lt;a href=&quot;QItemEditorFactory.html#QItemEditorFactory()&quot;&gt;&lt;tt&gt;QItemEditorFactory&lt;/tt&gt;&lt;/a&gt; is used by all item delegates. If you set a new default factory with &lt;a href=&quot;QItemEditorFactory.html#setDefaultFactory(com.trolltech.qt.gui.QItemEditorFactory)&quot;&gt;&lt;tt&gt;setDefaultFactory&lt;/tt&gt;&lt;/a&gt;, the new factory will be used by existing and new delegates.&lt;/p&gt;
&lt;p&gt;A factory keeps a collection of &lt;a href=&quot;QItemEditorCreatorBase.html&quot;&gt;&lt;tt&gt;QItemEditorCreatorBase&lt;/tt&gt;&lt;/a&gt; instances, which are specialized editors that produce editors for one particular &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt; data type (All Qt models store their data in &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt;s).&lt;/p&gt;
&lt;a name=&quot;standard-editing-widgets&quot;&gt;&lt;/a&gt;
&lt;h3&gt;Standard Editing Widgets&lt;/h3&gt;
&lt;p&gt;The standard factory implementation provides editors for a variety of data types. These are created whenever a delegate needs to provide an editor for data supplied by a model. The following table shows the relationship between types and the standard editors provided.&lt;/p&gt;
&lt;p&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; border=&quot;0&quot;&gt;
&lt;thead&gt;&lt;tr valign=&quot;top&quot; class=&quot;qt-style&quot;&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;Editor Widget&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;bool&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QComboBox.html&quot;&gt;&lt;tt&gt;QComboBox&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;double&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QDoubleSpinBox.html&quot;&gt;&lt;tt&gt;QDoubleSpinBox&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;int&lt;/td&gt;&lt;td rowspan=&quot;2&quot;&gt;&lt;a href=&quot;QSpinBox.html&quot;&gt;&lt;tt&gt;QSpinBox&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;unsigned int&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;a href=&quot;%2E%2E/core/QDate.html&quot;&gt;&lt;tt&gt;QDate&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QDateEdit.html&quot;&gt;&lt;tt&gt;QDateEdit&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;&lt;a href=&quot;%2E%2E/core/QDateTime.html&quot;&gt;&lt;tt&gt;QDateTime&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QDateTimeEdit.html&quot;&gt;&lt;tt&gt;QDateTimeEdit&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;a href=&quot;QPixmap.html&quot;&gt;&lt;tt&gt;QPixmap&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QLabel.html&quot;&gt;&lt;tt&gt;QLabel&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;&lt;a href=&quot;%2E%2E/porting4.html#qstring&quot;&gt;&lt;tt&gt;QString&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QLineEdit.html&quot;&gt;&lt;tt&gt;QLineEdit&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;a href=&quot;%2E%2E/core/QTime.html&quot;&gt;&lt;tt&gt;QTime&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QTimeEdit.html&quot;&gt;&lt;tt&gt;QTimeEdit&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;Additional editors can be registered with the &lt;a href=&quot;QItemEditorFactory.html#registerEditor(int, com.trolltech.qt.gui.QItemEditorCreatorBase)&quot;&gt;&lt;tt&gt;registerEditor&lt;/tt&gt;&lt;/a&gt; function.&lt;/p&gt;

@see &lt;a href=&quot;QItemDelegate.html&quot;&gt;&lt;tt&gt;QItemDelegate&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;%2E%2E/model-view-programming.html&quot;&gt;Model/View Programming&lt;/tt&gt;&lt;/a&gt;
@see Color Editor Factory Example&lt;/tt&gt; */">
    <method name="public QItemEditorFactory()" doc="/**
&lt;p&gt;Constructs a new item editor factory.&lt;/p&gt;
 */"/>
    <method name="public final void registerEditor(int type, com.trolltech.qt.gui.QItemEditorCreatorBase creator)" doc="/**
&lt;p&gt;Registers an item editor creator specified by &lt;tt&gt;creator&lt;/tt&gt; for the given &lt;tt&gt;type&lt;/tt&gt; of data.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; The factory takes ownership of the item editor creator and will destroy it if a new creator for the same type is registered later.&lt;/p&gt;

@see &lt;a href=&quot;QItemEditorFactory.html#createEditor(int, com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;createEditor&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public com.trolltech.qt.gui.QWidget createEditor(int type, com.trolltech.qt.gui.QWidget parent)" doc="/**
&lt;p&gt;Creates an editor widget with the given &lt;tt&gt;parent&lt;/tt&gt; for the specified &lt;tt&gt;type&lt;/tt&gt; of data, and returns it as a &lt;a href=&quot;QWidget.html&quot;&gt;&lt;tt&gt;QWidget&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QItemEditorFactory.html#registerEditor(int, com.trolltech.qt.gui.QItemEditorCreatorBase)&quot;&gt;&lt;tt&gt;registerEditor&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public com.trolltech.qt.core.QByteArray valuePropertyName(int type)" doc="/**
&lt;p&gt;Returns the property name used to access data for the given &lt;tt&gt;type&lt;/tt&gt; of data.&lt;/p&gt;
 */"/>
    <method name="public native static com.trolltech.qt.gui.QItemEditorFactory defaultFactory()" doc="/**
&lt;p&gt;Returns the default item editor factory.&lt;/p&gt;

@see &lt;a href=&quot;QItemEditorFactory.html#setDefaultFactory(com.trolltech.qt.gui.QItemEditorFactory)&quot;&gt;&lt;tt&gt;setDefaultFactory&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public static void setDefaultFactory(com.trolltech.qt.gui.QItemEditorFactory factory)" doc="/**
&lt;p&gt;Sets the default item editor factory to the given &lt;tt&gt;factory&lt;/tt&gt;. Both new and existing delegates will use the new factory.&lt;/p&gt;

@see &lt;a href=&quot;QItemEditorFactory.html#defaultFactory()&quot;&gt;&lt;tt&gt;defaultFactory&lt;/tt&gt;&lt;/a&gt; */"/>
</class>