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

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

?? qsqlquerymodel.cpp

?? QT 開發環境里面一個很重要的文件
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
*/void QSqlQueryModel::setQuery(const QSqlQuery &query){    Q_D(QSqlQueryModel);    QSqlRecord newRec = query.record();    bool columnsChanged = (newRec != d->rec);    bool hasQuerySize = d->query.driver()->hasFeature(QSqlDriver::QuerySize);    if (d->colOffsets.size() != newRec.count() || columnsChanged) {        d->colOffsets.resize(newRec.count());        memset(d->colOffsets.data(), 0, d->colOffsets.size() * sizeof(int));    }    beginRemoveRows(QModelIndex(), 0, qMax(d->bottom.row(), 0));    d->bottom = QModelIndex();    d->error = QSqlError();    d->atEnd = false;    d->query = query;    d->rec = newRec;    endRemoveRows();    if (columnsChanged)        reset();    if (!query.isActive() || query.isForwardOnly()) {        d->atEnd = true;        d->bottom = QModelIndex();        if (query.isForwardOnly())            d->error = QSqlError(QLatin1String("Forward-only queries "                                               "cannot be used in a data model"),                                 QString(), QSqlError::ConnectionError);        else            d->error = query.lastError();        return;    }    QModelIndex newBottom;    if (hasQuerySize) {        newBottom = createIndex(d->query.size() - 1, d->rec.count() - 1);        beginInsertRows(QModelIndex(), 0, qMax(0, newBottom.row()));        d->bottom = createIndex(d->query.size() - 1, columnsChanged ? 0 : d->rec.count() - 1);        d->atEnd = true;        endInsertRows();    } else {        newBottom = createIndex(-1, d->rec.count() - 1);    }    if (columnsChanged) {        beginInsertColumns(QModelIndex(), 0, newBottom.column());        d->bottom = newBottom;        endInsertColumns();    } else {        d->bottom = newBottom;    }    queryChange();    // fetchMore does the rowsInserted stuff for incremental models    fetchMore();}/*! \overload    Executes the query \a query for the given database connection \a    db. If no database is specified, the default connection is used.    lastError() can be used to retrieve verbose information if there    was an error setting the query.    Example:    \code    QSqlQueryModel model;    model.setQuery("select * from MyTable");    if (model.lastError().isValid())        qDebug() << model.lastError();    \endcode    \sa query(), queryChange(), lastError()*/void QSqlQueryModel::setQuery(const QString &query, const QSqlDatabase &db){    setQuery(QSqlQuery(query, db));}/*!    Clears the model and releases any acquired resource.*/void QSqlQueryModel::clear(){    Q_D(QSqlQueryModel);    d->error = QSqlError();    d->atEnd = true;    d->query.clear();    d->rec.clear();    d->colOffsets.clear();    d->bottom = QModelIndex();    d->headers.clear();}/*!    Sets the caption for a horizontal header for the specified \a role to    \a value. This is useful if the model is used to    display data in a view (e.g., QTableView).    Returns true if \a orientation is Qt::Horizontal and    the \a section refers to a valid section; otherwise returns    false.    Note that this function cannot be used to modify values in the    database since the model is read-only.    \sa data() */bool QSqlQueryModel::setHeaderData(int section, Qt::Orientation orientation,                                   const QVariant &value, int role){    Q_D(QSqlQueryModel);    if (orientation != Qt::Horizontal || section < 0)        return false;    if (d->headers.size() <= section)        d->headers.resize(qMax(section + 1, 16));    d->headers[section][role] = value;    emit headerDataChanged(orientation, section, section);    return true;}/*!    Returns the QSqlQuery associated with this model.    \sa setQuery()*/QSqlQuery QSqlQueryModel::query() const{    Q_D(const QSqlQueryModel);    return d->query;}/*!    Returns information about the last error that occurred on the    database.*/QSqlError QSqlQueryModel::lastError() const{    Q_D(const QSqlQueryModel);    return d->error;}/*!   Protected function which allows derived classes to set the value of   the last error that occurred on the database to \a error.   \sa lastError()*/void QSqlQueryModel::setLastError(const QSqlError &error){    Q_D(QSqlQueryModel);    d->error = error;}/*!    Returns the record containing information about the fields of the    current query. If \a row is the index of a valid row, the record    will be populated with values from that row.    If the model is not initialized, an empty record will be    returned.    \sa QSqlRecord::isEmpty()*/QSqlRecord QSqlQueryModel::record(int row) const{    Q_D(const QSqlQueryModel);    if (row < 0)        return d->rec;    QSqlRecord rec = d->rec;    for (int i = 0; i < rec.count(); ++i)        rec.setValue(i, data(createIndex(row, i), Qt::EditRole));    return rec;}/*! \overload    Returns an empty record containing information about the fields    of the current query.    If the model is not initialized, an empty record will be    returned.    \sa QSqlRecord::isEmpty() */QSqlRecord QSqlQueryModel::record() const{    Q_D(const QSqlQueryModel);    return d->rec;}/*!    Inserts \a count columns into the model at position \a column. The    \a parent parameter must always be an invalid QModelIndex, since    the model does not support parent-child relationships.    Returns true if \a column is within bounds; otherwise returns false.    By default, inserted columns are empty. To fill them with data,    reimplement data() and handle any inserted column separately:    \quotefromfile snippets/sqldatabase/sqldatabase.cpp    \skipto QSqlQueryModel_snippets    \skipto MyModel::data(    \printuntil /^\}/    \sa removeColumns()*/bool QSqlQueryModel::insertColumns(int column, int count, const QModelIndex &parent){    Q_D(QSqlQueryModel);    if (count <= 0 || parent.isValid() || column < 0 || column > d->rec.count())        return false;    beginInsertColumns(parent, column, column + count - 1);    for (int c = 0; c < count; ++c) {        QSqlField field;        field.setReadOnly(true);        field.setGenerated(false);        d->rec.insert(column, field);        if (d->colOffsets.size() < d->rec.count()) {            int nVal = d->colOffsets.isEmpty() ? 0 : d->colOffsets[d->colOffsets.size() - 1];            d->colOffsets.append(nVal);            Q_ASSERT(d->colOffsets.size() >= d->rec.count());        }        for (int i = column + 1; i < d->colOffsets.count(); ++i)            ++d->colOffsets[i];    }    endInsertColumns();    return true;}/*!    Removes \a count columns from the model starting from position \a    column. The \a parent parameter must always be an invalid    QModelIndex, since the model does not support parent-child    relationships.    Removing columns effectively hides them. It does not affect the    underlying QSqlQuery.    Returns true if the columns were removed; otherwise returns false. */bool QSqlQueryModel::removeColumns(int column, int count, const QModelIndex &parent){    Q_D(QSqlQueryModel);    if (count <= 0 || parent.isValid() || column < 0 || column >= d->rec.count())        return false;    beginRemoveColumns(parent, column, column + count - 1);    int i;    for (i = 0; i < count; ++i)        d->rec.remove(column);    for (i = column; i < d->colOffsets.count(); ++i)        d->colOffsets[i] -= count;    endRemoveColumns();    return true;}/*!    Returns the index of the value in the database result set for the    given \a item in the model.    The return value is identical to \a item if no columns or rows    have been inserted, removed, or moved around.    Returns an invalid model index if \a item is out of bounds or if    \a item does not point to a value in the result set.    \sa QSqlTableModel::indexInQuery(), insertColumns(), removeColumns()*/QModelIndex QSqlQueryModel::indexInQuery(const QModelIndex &item) const{    Q_D(const QSqlQueryModel);    if (item.column() < 0 || item.column() >= d->rec.count()        || !d->rec.isGenerated(item.column()))        return QModelIndex();    return createIndex(item.row(), item.column() - d->colOffsets[item.column()],                       item.internalPointer());}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆成人91精品二区三区| 卡一卡二国产精品 | 91精品蜜臀在线一区尤物| www.欧美色图| 99国产精品一区| 成人国产精品免费观看视频| 国产成人啪午夜精品网站男同| 九色porny丨国产精品| 青青草国产成人av片免费| 日日夜夜精品视频天天综合网| 婷婷开心久久网| 亚洲va国产天堂va久久en| 亚洲一区二区在线免费观看视频| 亚洲午夜av在线| 免费欧美在线视频| 国产一区二区美女| 91视频观看免费| 欧美日韩一级大片网址| 日韩亚洲欧美一区二区三区| 久久你懂得1024| 尤物在线观看一区| 日本大胆欧美人术艺术动态| 激情文学综合插| 97精品久久久午夜一区二区三区| 欧美体内she精高潮| 717成人午夜免费福利电影| 久久久一区二区三区捆绑**| 中文字幕永久在线不卡| 午夜电影久久久| 国产精品一级片| 欧美视频在线观看一区| 26uuu久久天堂性欧美| 亚洲欧美中日韩| 蜜桃91丨九色丨蝌蚪91桃色| 99免费精品在线观看| 欧美日本乱大交xxxxx| 国产色产综合色产在线视频| 香蕉影视欧美成人| 国产91精品在线观看| 欧美日韩国产片| 国产精品久久久久7777按摩| 午夜精品福利视频网站| 成a人片国产精品| 精品国产99国产精品| 一区二区三区四区不卡在线 | 欧美激情资源网| 亚洲国产aⅴ成人精品无吗| 国产麻豆日韩欧美久久| 欧美日韩夫妻久久| 国产精品成人一区二区三区夜夜夜| 日韩电影免费在线观看网站| 97超碰欧美中文字幕| 久久综合九色欧美综合狠狠| 亚洲成a人在线观看| 91在线看国产| 欧美激情综合在线| 狠狠色2019综合网| 欧美日韩国产经典色站一区二区三区| 国产女人水真多18毛片18精品视频| 日韩和欧美一区二区三区| 色菇凉天天综合网| 亚洲人成亚洲人成在线观看图片| 国产一区二区三区精品欧美日韩一区二区三区| 91国偷自产一区二区开放时间| 国产精品电影院| 国产jizzjizz一区二区| wwwwww.欧美系列| 国产在线精品不卡| 欧美精品一区二区三区很污很色的| 午夜精品久久久| 在线观看91精品国产麻豆| 日日摸夜夜添夜夜添精品视频| 欧美日韩在线观看一区二区 | 久久只精品国产| 久久99久久99| 国产亚洲自拍一区| 国产成人免费在线| 中文字幕av一区二区三区高| 国产成人精品亚洲日本在线桃色| 久久久精品影视| 成人一级黄色片| 亚洲精品伦理在线| 欧美亚洲高清一区| 蜜桃视频一区二区三区在线观看| 亚洲精品一区二区三区99| 国产麻豆精品95视频| 国产精品久久免费看| 91色.com| 日本午夜一区二区| 精品少妇一区二区三区视频免付费| 精品在线观看视频| 国产精品久久久久影院色老大| 91麻豆国产自产在线观看| 一区二区三区欧美日| 欧美一卡二卡在线观看| 国产一区二区影院| 亚洲丝袜另类动漫二区| 欧美日韩国产另类一区| 国产乱一区二区| 一区二区三区日韩欧美| 精品国产伦一区二区三区观看方式 | 色婷婷综合久久久中文一区二区| 亚洲曰韩产成在线| 日韩免费高清视频| 91免费视频网| 日韩成人一区二区三区在线观看| 国产日韩欧美综合一区| 在线一区二区三区做爰视频网站| 日韩精品一二三| 国产精品伦一区二区三级视频| 欧美三级在线视频| 国产裸体歌舞团一区二区| 亚洲欧美另类久久久精品| 在线播放一区二区三区| 懂色av一区二区三区蜜臀| 一区二区久久久| 精品国产一区久久| 在线欧美小视频| 国产一区二区三区免费看| 亚洲精品免费在线| 亚洲精品一区二区三区精华液| 色哟哟精品一区| 国产一区二区三区精品欧美日韩一区二区三区| 亚洲欧洲日韩在线| 26uuu亚洲综合色欧美| 欧美熟乱第一页| 成人看片黄a免费看在线| 久热成人在线视频| 午夜精品福利一区二区蜜股av| 亚洲欧美电影一区二区| 日韩精品一区二| 99这里只有久久精品视频| 久久亚洲精精品中文字幕早川悠里| 99久久久久免费精品国产| 久久国产免费看| 日韩国产精品久久久| 亚洲国产综合91精品麻豆| 国产精品乱码久久久久久| 精品久久久网站| 日韩一卡二卡三卡| 91精品免费观看| 91精品国产综合久久精品| 欧美日韩精品欧美日韩精品一综合| 国产盗摄一区二区| 国产美女视频91| 国产精品99久久久久久久vr | 91精品视频网| 欧美亚洲国产一区二区三区 | 欧美国产日韩精品免费观看| 精品久久久久久久久久久院品网 | 亚洲国产成人一区二区三区| 久久久.com| ww亚洲ww在线观看国产| 日韩手机在线导航| 日韩一级片网站| 欧美成人欧美edvon| 欧美v日韩v国产v| 精品国产制服丝袜高跟| 久久综合资源网| 国产午夜精品一区二区三区四区| 久久亚洲私人国产精品va媚药| 亚洲精品在线免费播放| 国产亚洲综合色| 亚洲天堂a在线| 天堂久久久久va久久久久| 日韩国产欧美一区二区三区| 久久国产精品一区二区| 国产成人在线看| 91在线视频观看| 欧美三级中文字幕| 久久天堂av综合合色蜜桃网| 久久久精品tv| 亚洲另类在线一区| 日韩不卡在线观看日韩不卡视频| 六月婷婷色综合| 成人一区二区三区视频| 欧洲av一区二区嗯嗯嗯啊| 欧美一区二区三区电影| 久久久久久久免费视频了| 亚洲欧美另类小说| 毛片av中文字幕一区二区| 国产成人免费9x9x人网站视频| 色香色香欲天天天影视综合网| 欧美男生操女生| 国产精品色一区二区三区| 亚洲午夜精品17c| 福利一区福利二区| 欧美乱熟臀69xxxxxx| 国产偷v国产偷v亚洲高清 | 一本大道久久精品懂色aⅴ| 欧美视频你懂的| 中文在线免费一区三区高中清不卡| 一区二区理论电影在线观看| 韩国三级中文字幕hd久久精品| 91在线免费播放| 26uuu欧美| 日韩精品国产欧美| 99久久婷婷国产精品综合| 日韩女优av电影在线观看| 亚洲乱码国产乱码精品精小说 |