亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? qsqlfield.cpp

?? QT 開發環境里面一個很重要的文件
?? CPP
字號:
/******************************************************************************** Copyright (C) 1992-2006 Trolltech ASA. All rights reserved.**** This file is part of the QtSql module of the Qt Toolkit.**** This file may be used under the terms of the GNU General Public** License version 2.0 as published by the Free Software Foundation** and appearing in the file LICENSE.GPL included in the packaging of** this file.  Please review the following information to ensure GNU** General Public Licensing requirements will be met:** http://www.trolltech.com/products/qt/opensource.html**** If you are unsure which license is appropriate for your use, please** review the following information:** http://www.trolltech.com/products/qt/licensing.html or contact the** sales department at sales@trolltech.com.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.******************************************************************************/#include "qsqlfield.h"#include "qatomic.h"#include "qdebug.h"class QSqlFieldPrivate{public:    QSqlFieldPrivate(const QString &name,              QVariant::Type type) :        ref(1), nm(name), ro(false), type(type), req(QSqlField::Unknown),        len(-1), prec(-1), tp(-1), gen(true), autoval(false)    {    }    QSqlFieldPrivate(const QSqlFieldPrivate &other)        : ref(1),          nm(other.nm),          ro(other.ro),          type(other.type),          req(other.req),          len(other.len),          prec(other.prec),          def(other.def),          tp(other.tp),          gen(other.gen),          autoval(other.autoval)    {}    bool operator==(const QSqlFieldPrivate& other) const    {        return (nm == other.nm                && ro == other.ro                && type == other.type                && req == other.req                && len == other.len                && prec == other.prec                && def == other.def                && tp == other.tp                && gen == other.gen                && autoval == other.autoval);    }    QAtomic ref;    QString nm;    uint ro: 1;    QVariant::Type type;    QSqlField::RequiredStatus req;    int len;    int prec;    QVariant def;    int tp;    uint gen: 1;    uint autoval: 1;};/*!    \class QSqlField    \brief The QSqlField class manipulates the fields in SQL database tables    and views.    \ingroup database    \ingroup shared    \module sql    QSqlField represents the characteristics of a single column in a    database table or view, such as the data type and column name. A    field also contains the value of the database column, which can be    viewed or changed.    Field data values are stored as QVariants. Using an incompatible    type is not permitted. For example:    \quotefromfile snippets/sqldatabase/sqldatabase.cpp    \skipto QSqlField_snippets    \skipto QSqlField field    \printuntil setValue    However, the field will attempt to cast certain data types to the    field data type where possible:    \skipto QSqlField field    \printuntil setValue    QSqlField objects are rarely created explicitly in application    code. They are usually accessed indirectly through \l{QSqlRecord}s    that already contain a list of fields. For example:    \skipto QSqlQuery query    \printline QSqlQuery query    \dots    \printline QSqlRecord record    \printline QSqlField field    A QSqlField object can provide some meta-data about the field, for    example, its name(), variant type(), length(), precision(),    defaultValue(), typeID(), and its requiredStatus(),    isGenerated() and isReadOnly(). The field's data can be    checked to see if it isNull(), and its value() retrieved. When    editing the data can be set with setValue() or set to NULL with    clear().    \sa QSqlRecord*//*!    \enum QSqlField::RequiredStatus    Specifies whether the field is required or optional.    \value Required  The field must be specified when inserting records.    \value Optional  The fields doesn't have to be specified when inserting records.    \value Unknown  The database driver couldn't determine whether the field is required or                    optional.    \sa requiredStatus()*//*!    Constructs an empty field called \a fieldName of variant type \a    type.    \sa setRequiredStatus() setLength() setPrecision() setDefaultValue() setGenerated() setReadOnly()*/QSqlField::QSqlField(const QString& fieldName, QVariant::Type type){    d = new QSqlFieldPrivate(fieldName, type);}/*!    Constructs a copy of \a other.*/QSqlField::QSqlField(const QSqlField& other){    d = other.d;    d->ref.ref();    val = other.val;}/*!    Sets the field equal to \a other.*/QSqlField& QSqlField::operator=(const QSqlField& other){    qAtomicAssign(d, other.d);    val = other.val;    return *this;}/*! \fn bool QSqlField::operator!=(const QSqlField &other) const    Returns true if the field is unequal to \a other; otherwise returns    false.*//*!    Returns true if the field is equal to \a other; otherwise returns    false.*/bool QSqlField::operator==(const QSqlField& other) const{    return ((d == other.d || *d == *other.d)            && val == other.val);}/*!    Destroys the object and frees any allocated resources.*/QSqlField::~QSqlField(){    if (!d->ref.deref())        delete d;}/*!    Sets the required status of this field to \a required.    \sa requiredStatus() setType() setLength() setPrecision() setDefaultValue() setGenerated() setReadOnly()*/void QSqlField::setRequiredStatus(RequiredStatus required){    detach();    d->req = required;}/*! \fn void QSqlField::setRequired(bool required)    Sets the required status of this field to \l Required if \a    required is true; otherwise sets it to \l Optional.    \sa setRequiredStatus(), requiredStatus()*//*!    Sets the field's length to \a fieldLength. For strings this is the    maximum number of characters the string can hold; the meaning    varies for other types.    \sa length() setType() setRequiredStatus() setPrecision() setDefaultValue() setGenerated() setReadOnly()*/void QSqlField::setLength(int fieldLength){    detach();    d->len = fieldLength;}/*!    Sets the field's \a precision. This only affects numeric fields.    \sa precision() setType() setRequiredStatus() setLength() setDefaultValue() setGenerated() setReadOnly()*/void QSqlField::setPrecision(int precision){    detach();    d->prec = precision;}/*!    Sets the default value used for this field to \a value.    \sa defaultValue() value() setType() setRequiredStatus() setLength() setPrecision() setGenerated() setReadOnly()*/void QSqlField::setDefaultValue(const QVariant &value){    detach();    d->def = value;}/*!    \internal*/void QSqlField::setSqlType(int type){    detach();    d->tp = type;}/*!    Sets the generated state. If \a gen is false, no SQL will    be generated for this field; otherwise, Qt classes such as    QSqlQueryModel and QSqlTableModel will generate SQL for this    field.    \sa isGenerated() setType() setRequiredStatus() setLength() setPrecision() setDefaultValue() setReadOnly()*/void QSqlField::setGenerated(bool gen){    detach();    d->gen = gen;}/*!    Sets the value of the field to \a value. If the field is read-only    (isReadOnly() returns true), nothing happens.    If the data type of \a value differs from the field's current    data type, an attempt is made to cast it to the proper type. This    preserves the data type of the field in the case of assignment,    e.g. a QString to an integer data type.    To set the value to NULL, use clear().    \sa value() isReadOnly() defaultValue()*/void QSqlField::setValue(const QVariant& value){    if (isReadOnly())        return;    val = value;}/*!    Clears the value of the field and sets it to NULL.    If the field is read-only, nothing happens.    \sa setValue() isReadOnly() requiredStatus()*/void QSqlField::clear(){    if (isReadOnly())        return;    val = QVariant(type());}/*!    Sets the name of the field to \a name.    \sa name()*/void QSqlField::setName(const QString& name){    detach();    d->nm = name;}/*!    Sets the read only flag of the field's value to \a readOnly. A    read-only field cannot have its value set with setValue() and    cannot be cleared to NULL with clear().*/void QSqlField::setReadOnly(bool readOnly){    detach();    d->ro = readOnly;}/*!    \fn QVariant QSqlField::value() const    Returns the value of the field as a QVariant.    Use isNull() to check if the field's value is NULL.*//*!    Returns the name of the field.    \sa setName()*/QString QSqlField::name() const{    return d->nm;}/*!    Returns the field's type as stored in the database.    Note that the actual value might have a different type,    Numerical values that are too large to store in a long    int or double are usually stored as strings to prevent    precision loss.    \sa setType()*/QVariant::Type QSqlField::type() const{    return d->type;}/*!    Set's the field's variant type to \a type.    \sa type() setRequiredStatus() setLength() setPrecision() setDefaultValue() setGenerated() setReadOnly()*/void QSqlField::setType(QVariant::Type type){    detach();    d->type = type;}/*!    Returns true if the field's value is read-only; otherwise returns    false.    \sa setReadOnly() type() requiredStatus() length() precision() defaultValue() isGenerated()*/bool QSqlField::isReadOnly() const{ return d->ro; }/*!    Returns true if the field's value is NULL; otherwise returns    false.    \sa value()*/bool QSqlField::isNull() const{ return val.isNull(); }/*! \internal*/void QSqlField::detach(){    qAtomicDetach(d);}/*!    Returns true if this is a required field; otherwise returns false.    An \c INSERT will fail if a required field does not have a value.    \sa setRequiredStatus() type() length() precision() defaultValue() isGenerated()*/QSqlField::RequiredStatus QSqlField::requiredStatus() const{    return d->req;}/*!    Returns the field's length.    If the returned value is negative, it means that the information    is not available from the database.    \sa setLength() type() requiredStatus() precision() defaultValue() isGenerated()*/int QSqlField::length() const{    return d->len;}/*!    Returns the field's precision; this is only meaningful for numeric    types.    If the returned value is negative, it means that the information    is not available from the database.    \sa setPrecision() type() requiredStatus() length() defaultValue() isGenerated()*/int QSqlField::precision() const{    return d->prec;}/*!    Returns the field's default value (which may be NULL).    \sa setDefaultValue() type() requiredStatus() length() precision() isGenerated()*/QVariant QSqlField::defaultValue() const{    return d->def;}/*!    \internal    Returns the type ID for the field.    If the returned value is negative, it means that the information    is not available from the database.*/int QSqlField::typeID() const{    return d->tp;}/*!    Returns true if the field is generated; otherwise returns    false.    \sa setGenerated() type() requiredStatus() length() precision() defaultValue()*/bool QSqlField::isGenerated() const{    return d->gen;}/*!    Returns true if the field's variant type is valid; otherwise    returns false.*/bool QSqlField::isValid() const{    return d->type != QVariant::Invalid;}#ifndef QT_NO_DEBUG_STREAMQDebug operator<<(QDebug dbg, const QSqlField &f){#ifndef Q_BROKEN_DEBUG_STREAM    dbg.nospace() << "QSqlField(" << f.name() << ", " << QVariant::typeToName(f.type());    if (f.length() >= 0)        dbg.nospace() << ", length: " << f.length();    if (f.precision() >= 0)        dbg.nospace() << ", precision: " << f.precision();    if (f.requiredStatus() != QSqlField::Unknown)        dbg.nospace() << ", required: "                      << (f.requiredStatus() == QSqlField::Required ? "yes" : "no");    dbg.nospace() << ", generated: " << (f.isGenerated() ? "yes" : "no");    if (f.typeID() >= 0)        dbg.nospace() << ", typeID: " << f.typeID();    if (!f.defaultValue().isNull())        dbg.nospace() << ", auto-value: \"" << f.defaultValue() << "\"";    dbg.nospace() << ")";    return dbg.space();#else    qWarning("This compiler doesn't support streaming QSqlField to QDebug");    return dbg;    Q_UNUSED(f);#endif}#endif/*!    \fn void QSqlField::setNull()    Use clear() instead.*//*!    Returns true if the value is auto-generated by the database,    for example auto-increment primary key values.    \sa setAutoValue()*/bool QSqlField::isAutoValue() const{    return d->autoval;}/*!    Marks the field as an auto-generated value if \a autoVal    is true.    \sa isAutoValue() */void QSqlField::setAutoValue(bool autoVal){    detach();    d->autoval = autoVal;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩av中文在线观看| 亚洲主播在线播放| 正在播放亚洲一区| 91香蕉视频mp4| av中文字幕在线不卡| 国产jizzjizz一区二区| 国产宾馆实践打屁股91| hitomi一区二区三区精品| 国产精品综合网| 成人免费三级在线| jizz一区二区| 欧美三级三级三级爽爽爽| 精品视频在线免费看| 欧美一区二区三级| 欧美精品一区二区三区蜜桃 | 国产一区视频网站| 国产精品综合在线视频| 国产91富婆露脸刺激对白| 大陆成人av片| 欧洲色大大久久| 欧美精品第1页| 久久亚洲欧美国产精品乐播| 国产精品第五页| 婷婷成人综合网| 国产福利视频一区二区三区| 99久久国产综合精品色伊| 欧美综合一区二区| 精品国产一区二区三区久久久蜜月| 精品久久人人做人人爱| 中文字幕一区免费在线观看| 亚洲国产视频一区| 久久国内精品视频| av不卡免费在线观看| 欧美日韩亚洲综合在线 | 91精品婷婷国产综合久久| 欧美精品一区二区不卡| 18成人在线观看| 日韩二区三区在线观看| 成人永久免费视频| 欧美色老头old∨ideo| 国产亚洲欧洲一区高清在线观看| 日韩久久一区二区| 激情文学综合网| 色噜噜偷拍精品综合在线| 精品日韩一区二区| 亚洲一卡二卡三卡四卡五卡| 国产一区二区三区在线看麻豆| 99国产欧美久久久精品| 日韩精品自拍偷拍| 亚洲成人免费观看| 91在线观看一区二区| 精品不卡在线视频| 日本美女一区二区三区视频| 色一情一伦一子一伦一区| 欧美精品一区二区三区一线天视频| 亚洲天堂a在线| 国产福利一区二区三区| 日韩欧美亚洲国产另类| 亚洲第一会所有码转帖| www.色综合.com| 国产欧美日韩久久| 在线亚洲免费视频| 国产日韩欧美一区二区三区综合| 欧美在线观看一二区| 精品国产污污免费网站入口 | 黑人精品欧美一区二区蜜桃 | 91久久精品一区二区| 日韩中文字幕91| 久久久高清一区二区三区| 99精品视频中文字幕| 日本网站在线观看一区二区三区| 久久女同精品一区二区| 在线观看免费一区| 国产精品资源网| 丝袜美腿亚洲色图| 国产精品家庭影院| 精品国产一区二区三区忘忧草| 一本到三区不卡视频| 激情六月婷婷综合| 亚洲国产成人va在线观看天堂| 久久蜜桃av一区精品变态类天堂| 欧美在线视频全部完| 国产很黄免费观看久久| 日韩中文字幕麻豆| 亚洲狠狠丁香婷婷综合久久久| 欧美r级在线观看| 欧美日韩一区二区三区免费看| 韩国视频一区二区| 午夜国产精品一区| 亚洲区小说区图片区qvod| 日韩一区二区在线播放| 欧美日免费三级在线| 不卡的电视剧免费网站有什么| 精品一区二区三区影院在线午夜 | 国产在线精品一区在线观看麻豆| 一区二区三区中文在线观看| 久久久激情视频| 精品国产乱码久久久久久图片| 欧美亚洲禁片免费| 日本道色综合久久| 99久久99久久免费精品蜜臀| 久久99国内精品| 蜜桃av一区二区在线观看| 亚洲福利视频一区二区| 《视频一区视频二区| 欧美国产欧美综合| 国产欧美日韩在线视频| 精品国产免费人成电影在线观看四季| 欧美精品777| 欧美日韩久久久久久| 欧美日韩大陆一区二区| 91.麻豆视频| 欧美一级二级三级蜜桃| 欧美一区二区三区成人| 欧美一级日韩不卡播放免费| 欧美美女视频在线观看| 欧美日韩免费电影| 欧美日本在线看| 日韩色视频在线观看| 日韩欧美123| 欧美成人精品3d动漫h| 精品日韩成人av| 久久精品夜色噜噜亚洲a∨| 久久综合久久99| 久久久久99精品国产片| 欧美国产综合一区二区| 国产精品成人免费精品自在线观看 | 亚洲成人动漫av| 奇米色777欧美一区二区| 日本午夜一本久久久综合| 韩日精品视频一区| 国产99久久久国产精品免费看| jlzzjlzz国产精品久久| 在线观看视频一区二区| 555www色欧美视频| 2017欧美狠狠色| 亚洲人成小说网站色在线| 夜夜操天天操亚洲| 奇米精品一区二区三区在线观看一| 久久99国产乱子伦精品免费| 成人国产精品视频| 欧美日韩视频一区二区| 欧美videos大乳护士334| 国产精品麻豆久久久| 一区二区三区中文字幕| 久久精品久久精品| 成人白浆超碰人人人人| 欧美乱妇15p| 久久久精品免费免费| 一区二区三区在线高清| 久久精品国产秦先生| 成人免费毛片高清视频| 欧美中文字幕一区二区三区亚洲| 日韩午夜在线播放| 国产精品久久久久桃色tv| 亚洲成a人片在线不卡一二三区| 狠狠久久亚洲欧美| 欧美日韩一区高清| 国产婷婷精品av在线| 亚洲国产综合在线| 国产伦精品一区二区三区免费迷| 色婷婷综合中文久久一本| 日韩免费观看2025年上映的电影| 欧美激情一区二区三区四区 | 一区二区成人在线视频 | 日产精品久久久久久久性色| 大桥未久av一区二区三区中文| 欧美精品第1页| 亚洲精品视频在线观看网站| 久久er精品视频| 欧美日韩精品一区二区三区 | 91美女精品福利| 精品国产伦理网| 天堂成人免费av电影一区| 99国内精品久久| 国产日韩精品一区二区三区| 亚洲福利国产精品| 成人午夜在线视频| 精品国产乱码久久久久久久| 亚洲午夜影视影院在线观看| 99久久国产免费看| 国产精品网站导航| 国产一区视频在线看| 日韩精品中文字幕一区二区三区 | 麻豆极品一区二区三区| 欧美日韩国产综合久久| 日韩理论片网站| 92国产精品观看| 欧美国产一区二区| 丁香婷婷综合色啪| 久久亚洲二区三区| 国产一区在线精品| 久久婷婷久久一区二区三区| 久久精品99国产精品| 欧美一级免费观看| 日本不卡123| 欧美一区二区在线视频| 轻轻草成人在线| 欧美白人最猛性xxxxx69交| 天堂成人免费av电影一区|