当前位置: 首页>>代码示例>>C++>>正文


C++ QLinkedList::push_back方法代码示例

本文整理汇总了C++中QLinkedList::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ QLinkedList::push_back方法的具体用法?C++ QLinkedList::push_back怎么用?C++ QLinkedList::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QLinkedList的用法示例。


在下文中一共展示了QLinkedList::push_back方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: process

bool VaApiPostProcessor::process(const VideoFrame &in, QLinkedList<VideoFrame> &queue) {
	if (!d->pipeline)
		return false;
	auto surface = VaApiSurfacePool::getSurface(in.mpi());
	if (!surface)
		return false;
	mp_image *out1 = nullptr, *out2 = nullptr;
	out1 = d->pipeline->render(in, d->setupDeint(in.mpi()->fields, true));
	if (d->deint.doubler && d->deint.method != DeintMethod::None)
		out2 = d->pipeline->render(in, d->setupDeint(in.mpi()->fields, false));
	if (out1)
		queue.push_back(VideoFrame(true, out1, nextPTS(), in.field() & ~VideoFrame::Interlaced));
	if (out2)
		queue.push_back(VideoFrame(true, out2, nextPTS(), in.field() & ~VideoFrame::Interlaced));
	return out1 || out2;
}
开发者ID:akhilo,项目名称:cmplayer,代码行数:16,代码来源:vaapipostprocessor.cpp

示例2: select

void BaseSqlTableModel::select() {
    if (!m_bInitialized) {
        return;
    }
    // We should be able to detect when a select() would be a no-op. The DAO's
    // do not currently broadcast signals for when common things happen. In the
    // future, we can turn this check on and avoid a lot of needless
    // select()'s. rryan 9/2011
    // if (!m_bDirty) {
    //     if (sDebug) {
    //         qDebug() << this << "Skipping non-dirty select()";
    //     }
    //     return;
    // }

    if (sDebug) {
        qDebug() << this << "select()";
    }

    QTime time;
    time.start();

    QString columns = m_tableColumnsJoined;
    QString orderBy = orderByClause();
    QString queryString = QString("SELECT %1 FROM %2 %3")
            .arg(columns, m_tableName, orderBy);

    if (sDebug) {
        qDebug() << this << "select() executing:" << queryString;
    }

    QSqlQuery query(m_database);
    // This causes a memory savings since QSqlCachedResult (what QtSQLite uses)
    // won't allocate a giant in-memory table that we won't use at all.
    query.setForwardOnly(true);
    query.prepare(queryString);

    if (!query.exec()) {
        LOG_FAILED_QUERY(query);
        return;
    }

    // Remove all the rows from the table. We wait to do this until after the
    // table query has succeeded. See Bug #1090888.
    // TODO(rryan) we could edit the table in place instead of clearing it?
    if (m_rowInfo.size() > 0) {
        beginRemoveRows(QModelIndex(), 0, m_rowInfo.size()-1);
        m_rowInfo.clear();
        m_trackIdToRows.clear();
        endRemoveRows();
    }

    QSqlRecord record = query.record();
    int idColumn = record.indexOf(m_idColumn);

    QLinkedList<int> tableColumnIndices;
    foreach (QString column, m_tableColumns) {
        Q_ASSERT(record.indexOf(column) == m_tableColumnIndex[column]);
        tableColumnIndices.push_back(record.indexOf(column));
    }
开发者ID:YoungLeeNENU,项目名称:mixxx,代码行数:60,代码来源:basesqltablemodel.cpp

示例3: paint

void PageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
    if (!m_documentItem || !m_page) {
        QDeclarativeItem::paint(painter, option, widget);
        return;
    }

    const bool setAA = m_smooth && !(painter->renderHints() & QPainter::Antialiasing);
    if (setAA) {
        painter->save();
        painter->setRenderHint(QPainter::Antialiasing, true);
    }

    Observer *observer = m_isThumbnail ? m_documentItem.data()->thumbnailObserver() : m_documentItem.data()->pageviewObserver();
    const int priority = m_isThumbnail ? THUMBNAILS_PRIO : PAGEVIEW_PRIO;

    if (m_intentionalDraw) {
        QLinkedList<Okular::PixmapRequest *> requestedPixmaps;
        requestedPixmaps.push_back(new Okular::PixmapRequest(observer, m_viewPort.pageNumber, width(), height(), priority, Okular::PixmapRequest::Asynchronous));
        const Okular::Document::PixmapRequestFlag prf = m_isThumbnail ? Okular::Document::NoOption : Okular::Document::RemoveAllPrevious;
        m_documentItem.data()->document()->requestPixmaps(requestedPixmaps, prf);
        m_intentionalDraw = false;
    }
    const int flags = PagePainter::Accessibility | PagePainter::Highlights | PagePainter::Annotations;
    PagePainter::paintPageOnPainter(painter, m_page, observer, flags, width(), height(), option->exposedRect.toRect());

    if (setAA) {
        painter->restore();
    }
}
开发者ID:swatilodha,项目名称:okular,代码行数:30,代码来源:pageitem.cpp

示例4: requestPixmap

void MagnifierView::requestPixmap()
{
  const int full_width = m_page->width() * SCALE;
  const int full_height = m_page->height() * SCALE;

  Okular::NormalizedRect nrect = normalizedView();

  if (m_page && !m_page->hasPixmap( this, full_width, full_height, nrect ))
  {
    QLinkedList< Okular::PixmapRequest * > requestedPixmaps;

    Okular::PixmapRequest *p = new Okular::PixmapRequest( this, m_current, full_width, full_height, PAGEVIEW_PRIO, Okular::PixmapRequest::Asynchronous );

    if ( m_page->hasTilesManager( this ) ) {
      p->setTile( true );
    }

    // request a little bit bigger rectangle then currently viewed, but not the full scale page
    const double rect_width = (nrect.right - nrect.left) * 0.5,
                 rect_height = (nrect.bottom - nrect.top) * 0.5;

    const double top = qMax(nrect.top - rect_height, 0.0);
    const double bottom = qMin(nrect.bottom + rect_height, 1.0);
    const double left = qMax(nrect.left - rect_width, 0.0);
    const double right = qMin(nrect.right + rect_width, 1.0);

    p->setNormalizedRect( Okular::NormalizedRect(left, top, right, bottom) );
    requestedPixmaps.push_back( p );

    m_document->requestPixmaps( requestedPixmaps );
  }
}
开发者ID:KDE,项目名称:okular,代码行数:32,代码来源:magnifierview.cpp

示例5: push

	void push(mp_image *mpi) {
		mpi->colorspace = in->format().colorspace();
		mpi->levels = in->format().range();
		mpi->display_w = in->format().displaySize().width();
		mpi->display_h = in->format().displaySize().height();
		mpi->pts = p->nextPTS();
		queue->push_back(VideoFrame(true, mpi, in->field()));
		++pushed;
	}
开发者ID:akhilo,项目名称:cmplayer,代码行数:9,代码来源:softwaredeinterlacer.cpp

示例6:

QLinkedList<QED2KHandle> QED2KSession::getTransfers() const {
    std::vector<libed2k::transfer_handle> handles = m_session->get_transfers();
    QLinkedList<QED2KHandle> transfers;

    for (std::vector<libed2k::transfer_handle>::iterator i = handles.begin();
         i != handles.end(); ++i)
        transfers.push_back(QED2KHandle(*i));

    return transfers;
}
开发者ID:nesterov,项目名称:qDonkey,代码行数:10,代码来源:qed2ksession.cpp

示例7: main

int main ()
{
  QLinkedList<int> myQLinkedList;
  int sum (0);
  myQLinkedList.push_back (100);
  myQLinkedList.push_back (200);
  myQLinkedList.push_back (300);
  assert(myQLinkedList.back() == 300);
  int n = 3;
  while (!myQLinkedList.empty())
  {
    assert(myQLinkedList.back() == n*100);
    sum+=myQLinkedList.back();
    myQLinkedList.pop_back();
    n--;
  }

  cout << "The elements of myQLinkedList summed " << sum << endl;

  return 0;
}
开发者ID:xsery,项目名称:benchmarks-esbmc-qt,代码行数:21,代码来源:main.cpp

示例8: write_grid_occupant_order

void write_grid_occupant_order(World* g, std::ostream& s)
{
    QLinkedList<int> order;
    for (int i = 0; i < g->rows * g->cols; i++)
    {
        Occupant* occ = g->occupant_grid[i];
        while (occ)
        {
            order.push_back(occ->id);
            occ = occ->next;
        }
    }
    s << order;
}
开发者ID:drewbuschhorn,项目名称:floatworld,代码行数:14,代码来源:world.cpp

示例9: testQLinkedList

void testQLinkedList()
{
#if 1
    QLinkedList<int> li;
    QLinkedList<uint> lu;

    for (int i = 0; i != 3; ++i)
        li.append(i);
    li.append(102);


    lu.append(102);
    lu.append(102);
    lu.append(102);

    QLinkedList<Foo *> lpi;
    lpi.append(new Foo(1));
    lpi.append(0);
    lpi.append(new Foo(3));

    QLinkedList<qulonglong> l;
    l.append(42);
    l.append(43);
    l.append(44);
    l.append(45);

    QLinkedList<Foo> f;
    f.append(Foo(1));
    f.append(Foo(2));
#endif
    QLinkedList<std::string> v;
    v.push_back("aa");
    v.push_back("bb");
    v.push_back("cc");
    v.push_back("dd");
 }
开发者ID:TheProjecter,项目名称:project-qtcreator,代码行数:36,代码来源:app.cpp

示例10: bubbleLine

void MainWindow::bubbleLine()
{
    QLinkedList<QVector3D> ap;

        QVector<QVector3D> mp;

        linebs.setPoint(pt);
        linebs.toleranceFitting(15.0);

        linebs.bubbleCurves(mp);

        for(int k=0; k<mp.size(); k++)
            ap.push_back(mp[k]);

     this->glf->setPoint(ap);
}
开发者ID:linyuanxx,项目名称:splineproject,代码行数:16,代码来源:mainwindow.cpp

示例11: ordinaryLine

void MainWindow::ordinaryLine()
{
    QLinkedList<QVector3D> ap;
//    qDebug()<<"contour.size:"<<contour.size();
//    for(int i=0; i<contour.size(); i++)
//    {
        QVector<QVector3D> mp;
       // qDebug()<<"contour size: "<<i<<contour[i].size();
        linebs.setPoint(pt);
        linebs.toleranceFitting(15.0);
        qDebug()<<"contour size: "<<contour.size();
        linebs.ordinaryCurves(mp);
        qDebug()<<"contour size: "<<mp.size();
        for(int k=0; k<mp.size(); k++)
            ap.push_back(mp[k]);
    //}
     this->glf->setPoint(ap);
}
开发者ID:linyuanxx,项目名称:splineproject,代码行数:18,代码来源:mainwindow.cpp

示例12: rootDividing

QLinkedList<Interval> rootDividing(double start, double end, double eps) {
	QLinkedList<Interval> result;
	
	if (start >= end) {
		return result;
	}

	double x1 = start;
	double x2 = start + eps < end ? start + eps : end;

	while (x2 <= end) {
		if (FuncClass::func(x1) * FuncClass::func(x2) < 0)
			result.push_back(Interval(x1, x2));
		x1 = x2;
		x2 += eps;
	}

	return result;
}
开发者ID:anlunHW,项目名称:calcMethods,代码行数:19,代码来源:main.cpp

示例13: compile

void compile(QString path,QStringList& import,QFile &out){
    QFile fp(path);
    if(fp.open(QFile::ReadOnly)){
        QDir dir(QFileInfo(fp).absoluteDir());
        QString modName = QFileInfo(fp).baseName();
        if(readLine(fp).trimmed()!=FILE_HEAD){
            qDebug("Indicated file is not a algorithm file of Uranus2");
            exit(0);
        }
        int pIndent,cIndent=0,functionIndent=0;
        Function* function=0;
        QRegExp keyWord("(\\s*)(\\w+)\\s",Qt::CaseInsensitive);
        QRegExp argHook("(<.+>)?(.+)?");
        QLinkedList<StackItem*> stack;
        while(!fp.atEnd()){
            QString line=QString::fromUtf8(fp.readLine());
            keyWord.indexIn(line);
            QString key=keyWord.cap(2).toLower();
            line=line.mid(keyWord.cap().length()).trimmed();
            pIndent = cIndent;
            cIndent=keyWord.cap(1).length();
            if(cIndent<functionIndent){
                if(function!=0){
                    function->write(out);
                    function=0;
                }
            }else if(cIndent<=pIndent){
                while(pIndent>=cIndent){
                    pIndent--;
                    if(!stack.isEmpty()){
                        stack.pop_back();
                    }
                }
            }
            StackItem* parent = (stack.isEmpty())?0:stack.back(),
                    *self=new StackItem(key,line,cIndent);
            stack.push_back(self);

            if(key=="import"){
                import.append(dir.absoluteFilePath(line));
            }else if(key=="function"){
                function=new Function(modName,line);
                functionIndent=cIndent+1;
            }else if(key=="hint"){
                if(function!=0){
                    if(parent->key=="function")
                        self->indent++;
                    self->outBegin="#"+line;
                    function->append(self);
                }
            }else if(key=="arg"){
                if(parent->key=="function"&&function){
                    function->args()<<line;
                }
            }else if(key=="assign"){
                self->outBegin=line+"=";
                function->append(self);
            }else if(key=="value"){
                if(parent->key=="assign"){
                    argHook.indexIn(line);
                    if(argHook.cap(1)=="<list>"){
                    }else if(argHook.cap(1)=="<function>"){
                    }else if(argHook.cap(1)=="<variable>"){
                        self->outBegin=argHook.cap(2).trimmed();
                    }else{
                        self->outBegin=line.trimmed();
                    }
                    parent->addChild(self);
                }
            }else if(key=="branch"){
                self->outBegin="if True:";
                function->append(self);
            }else if(key=="call"){
                QString fname;
                if(line.left(3)=="://"){
                    fname=Function::conv(modName,line.mid(3));
                }else{
                    QStringList f = line.split("/");
                    if(f.count()==2){
                        fname=Function::conv(f.at(0),f.at(1));
                    }
                }
                self->outBegin=fname+"(";
                self->outSep=",";
                self->outEnd=")";
                if(parent->key=="do"){
                    function->append(self);
                }else{
                    parent->addChild(self);
                }
            }else if(key=="conditional"){
                self->outBegin="if True:";
                function->append(self);
            }else if(key=="do"){
            }else if(key=="list"){
                self->outBegin="[";
                self->outSep=",";
                self->outEnd="]";
                parent->addChild(self);
            }else if(key=="item"){
//.........这里部分代码省略.........
开发者ID:davidaq,项目名称:Uranus2,代码行数:101,代码来源:main.cpp

示例14: sendData

void SendDataThread::sendData(const QByteArray &data)
{
	QMutexLocker locker(&m_DataMutex);
	m_DataList.push_back(data);
	m_DataCondition.wakeAll();
}
开发者ID:dalinhuang,项目名称:networkprogram,代码行数:6,代码来源:commandchannel.cpp


注:本文中的QLinkedList::push_back方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。