42 #include <qplatformdefs.h> 46 #ifndef QT_NO_ITEMVIEWS 61 #ifndef QT_NO_COMBOBOX 74 #endif // QT_NO_COMBOBOX 144 return dfactory ==
this ? 0 : dfactory->
createEditor(type, parent);
184 if (it != creatorMap.end()) {
187 creatorMap.erase(it);
188 if (!creatorMap.values().contains(oldCreator))
192 creatorMap[
type] = creator;
206 #ifndef QT_NO_COMBOBOX 212 #ifndef QT_NO_SPINBOX 225 #ifndef QT_NO_DATETIMEEDIT 240 return new QLabel(parent);
241 #ifndef QT_NO_SPINBOX 249 #ifndef QT_NO_LINEEDIT 269 #ifndef QT_NO_COMBOBOX 271 return "currentIndex";
273 #ifndef QT_NO_SPINBOX 279 #ifndef QT_NO_DATETIMEEDIT 309 if (q_default_factory)
324 q_default_factory = factory;
504 #ifndef QT_NO_LINEEDIT 507 :
QLineEdit(parent), originalWidth(-1), widgetOwnsGeometry(false)
533 int width = left + right + 4 ;
535 width += left +
right;
547 int oldWidth =
width();
553 int parentWidth =
parent->width();
554 int maxWidth =
isRightToLeft() ? position.
x() + oldWidth : parentWidth - position.
x();
559 move(position.
x() - newWidth + oldWidth, position.
y());
564 #endif // QT_NO_LINEEDIT 566 #ifndef QT_NO_COMBOBOX 585 #endif // QT_NO_COMBOBOX 589 #if !defined(QT_NO_LINEEDIT) || !defined(QT_NO_COMBOBOX) 590 #include "qitemeditorfactory.moc" 593 #endif // QT_NO_ITEMVIEWS
~QDefaultFactoryCleaner()
void setWidgetOwnsGeometry(bool value)
int width(const QString &, int len=-1) const
Returns the width in pixels of the first len characters of text.
void changeEvent(QEvent *)
Reimplemented Function
void updateMinimumWidth()
The QItemEditorFactory class provides widgets for editing item data in views and delegates.
#define QT_END_NAMESPACE
This macro expands to.
The QItemEditorCreatorBase class provides an abstract base class that must be subclassed when impleme...
QWidget * createEditor(QVariant::Type type, QWidget *parent) const
Creates an editor widget with the given parent for the specified type of data, and returns it as a QW...
#define it(className, varName)
void changeEvent(QEvent *e)
This event handler can be reimplemented to handle state changes.
The QTimeEdit class provides a widget for editing times based on the QDateTimeEdit widget...
static QSize globalStrut()
The QByteArray class provides an array of bytes.
The QDateEdit class provides a widget for editing dates based on the QDateTimeEdit widget...
virtual QByteArray valuePropertyName(QVariant::Type type) const
Returns the property name used to access data for the given type of data.
static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
virtual int styleHint(StyleHint stylehint, const QStyleOption *opt=0, const QWidget *widget=0, QStyleHintReturn *returnData=0) const =0
Returns an integer representing the specified style hint for the given widget described by the provid...
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
void setCurrentIndex(int index)
T & value() const
Returns a modifiable reference to the current item's value.
The QString class provides a Unicode character string.
void addItem(const QString &text, const QVariant &userData=QVariant())
Adds an item to the combobox with the given text, and containing the specified userData (stored in th...
Q_CORE_EXPORT QTextStream & right(QTextStream &s)
The QDateTimeEdit class provides a widget for editing dates and times.
int width() const
Returns the width.
static QItemEditorFactory * q_default_factory
QString displayText() const
#define QT_BEGIN_NAMESPACE
This macro expands to.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
The QComboBox widget is a combined button and popup list.
Type
This enum type defines the types of variable that a QVariant can contain.
QByteArray valuePropertyName(QVariant::Type) const
Returns the property name used to access data for the given type of data.
void setMinimum(double min)
QDefaultItemEditorFactory()
virtual QWidget * createWidget(QWidget *parent) const =0
Returns an editor widget with the given parent.
virtual QSize sizeFromContents(ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *w=0) const =0
Returns the size of the element described by the specified option and type, based on the provided con...
virtual QByteArray valuePropertyName() const =0
Returns the name of the property used to get and set values in the creator's editor widgets...
QBooleanComboBox(QWidget *parent)
QExpandingLineEdit(QWidget *parent)
The QDoubleSpinBox class provides a spin box widget that takes doubles.
void registerEditor(QVariant::Type type, QItemEditorCreatorBase *creator)
Registers an item editor creator specified by creator for the given type of data. ...
QObject * parent() const
Returns a pointer to the parent object.
The QPoint class defines a point in the plane using integer precision.
virtual ~QItemEditorFactory()
Destroys the item editor factory.
Q_DECL_CONSTEXPR const T & qBound(const T &min, const T &val, const T &max)
static void setDefaultFactory(QItemEditorFactory *factory)
Sets the default item editor factory to the given factory.
The QHash::iterator class provides an STL-style non-const iterator for QHash and QMultiHash.
The QSpinBox class provides a spin box widget.
The QLabel widget provides a text or image display.
void initStyleOption(QStyleOptionFrame *option) const
Initialize option with the values from this QLineEdit.
The QStyleOptionFrameV2 class is used to describe the parameters necessary for drawing a frame in Qt ...
int y() const
Returns the y coordinate of this point.
The QLineEdit widget is a one-line text editor.
static const QItemEditorFactory * defaultFactory()
Returns the default item editor factory.
The QSize class defines the size of a two-dimensional object using integer point precision.
int x() const
Returns the x coordinate of this point.
QList< T > values() const
void setMaximum(double max)
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
Q_CORE_EXPORT QTextStream & left(QTextStream &s)
Q_OUTOFLINE_TEMPLATE void qDeleteAll(ForwardIterator begin, ForwardIterator end)
void getTextMargins(int *left, int *top, int *right, int *bottom) const
Returns the widget's text margins for left, top, right, and bottom.
virtual QWidget * createEditor(QVariant::Type type, QWidget *parent) const
Creates an editor widget with the given parent for the specified type of data, and returns it as a QW...
void textChanged(const QString &)
This signal is emitted whenever the text changes.