• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ qxt_p函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中qxt_p函数的典型用法代码示例。如果您正苦于以下问题:C++ qxt_p函数的具体用法?C++ qxt_p怎么用?C++ qxt_p使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: qxt_p

void QxtSmtpPrivate::authenticate()
{
    if (!extensions.contains("AUTH") || username.isEmpty() || password.isEmpty())
    {
        state = Authenticated;
        emit qxt_p().authenticated();
    }
    else
    {
        QStringList auth = extensions["AUTH"].toUpper().split(' ', QString::SkipEmptyParts);
        if (auth.contains("CRAM-MD5"))
        {
            authCramMD5();
        }
        else if (auth.contains("PLAIN"))
        {
            authPlain();
        }
        else if (auth.contains("LOGIN"))
        {
            authLogin();
        }
        else
        {
            state = Authenticated;
            emit qxt_p().authenticated();
        }
    }
}
开发者ID:01iv3r,项目名称:OpenPilot,代码行数:29,代码来源:qxtsmtp.cpp


示例2: switch

bool QxtCheckComboBoxPrivate::eventFilter(QObject* receiver, QEvent* event)
{
    switch (event->type())
    {
    case QEvent::KeyPress:
    case QEvent::KeyRelease:
    {
        QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
        if (receiver == &qxt_p() && (keyEvent->key() == Qt::Key_Up || keyEvent->key() == Qt::Key_Down))
        {
            qxt_p().showPopup();
            return true;
        }
        else if (keyEvent->key() == Qt::Key_Enter ||
                 keyEvent->key() == Qt::Key_Return ||
                 keyEvent->key() == Qt::Key_Escape)
        {
            // it is important to call QComboBox implementation
            qxt_p().QComboBox::hidePopup();
            if (keyEvent->key() != Qt::Key_Escape)
                return true;
        }
    }
    case QEvent::MouseButtonPress:
        containerMousePress = (receiver == qxt_p().view()->window());
        break;
    case QEvent::MouseButtonRelease:
        containerMousePress = false;;
        break;
    default:
        break;
    }
    return false;
}
开发者ID:MorS25,项目名称:OpenPilot,代码行数:34,代码来源:qxtcheckcombobox.cpp


示例3: qxt_p

void QxtCountryComboBoxPrivate::setCurrentCountry(QLocale::Country country)
{
    // column 3 is QLocale::Country
    QModelIndex start = qxt_p().model()->index(0, 3);
    QModelIndexList result = qxt_p().model()->match(start, Qt::DisplayRole, country, 1, Qt::MatchExactly);
    if (!result.isEmpty())
        qxt_p().setCurrentIndex(result.first().row());
}
开发者ID:01iv3r,项目名称:OpenPilot,代码行数:8,代码来源:qxtcountrycombobox.cpp


示例4: qxt_p

void QxtCheckComboBoxPrivate::toggleCheckState(int index)
{
    QVariant value = qxt_p().itemData(index, Qt::CheckStateRole);
    if (value.isValid())
    {
        Qt::CheckState state = static_cast<Qt::CheckState>(value.toInt());
        qxt_p().setItemData(index, (state == Qt::Unchecked ? Qt::Checked : Qt::Unchecked), Qt::CheckStateRole);
    }
}
开发者ID:MorS25,项目名称:OpenPilot,代码行数:9,代码来源:qxtcheckcombobox.cpp


示例5: qCritical

/**
 * This function is used internally to handle pinging the server and detecting timeouts. Timeouts are enabled and disabled server side.
 */
void ClientProtocolTcpPrivate::ping()
{
	if (lastPing.secsTo(QDateTime::currentDateTime()) > timeout)
	{
		qCritical() << "Remove host has timed out.";
		qxt_p().protocolDisconnect();
		return;
	}
	qxt_p().callProtocolFunction(Signature("ping()"), Arguments());
}
开发者ID:balashovartem,项目名称:QtRpc2,代码行数:13,代码来源:clientprotocoltcp.cpp


示例6: qxt_p

QString QxtConfirmationMessagePrivate::key() const
{
    QString value = overrideKey;
    if (value.isEmpty())
    {
        const QString all = qxt_p().windowTitle() + qxt_p().text() + qxt_p().informativeText();
        const QByteArray data = all.toLocal8Bit();
        value = QString::number(qChecksum(data.constData(), data.length()));
    }
    return value;
}
开发者ID:mcu786,项目名称:OpenPilot-1,代码行数:11,代码来源:qxtconfirmationmessage.cpp


示例7: qxt_p

void QxtConfigWidgetPrivate::setCurrentIndex(int index)
{
    int previousIndex = stack->currentIndex();
    if (previousIndex != -1 && previousIndex != index)
        qxt_p().cleanupPage(previousIndex);

    stack->setCurrentIndex(index);
    table->setCurrentItem(item(index));

    if (index != -1)
        qxt_p().initializePage(index);
}
开发者ID:npsm,项目名称:libqxt,代码行数:12,代码来源:qxtconfigwidget.cpp


示例8: qxt_p

void QxtRPCServicePrivate::clientDisconnected(QIODevice* dev, quint64 id)
{
    // When a device is disconnected, disconnect all signals connected to the object...
    QObject::disconnect(dev, 0, this, 0);
    QObject::disconnect(dev, 0, &qxt_p(), 0);

    // ... remove its buffer object...
    buffers.remove(id);

    // ... and inform other objects that the disconnection has happened.
    emit qxt_p().clientDisconnected(id);
}
开发者ID:MorS25,项目名称:OpenPilot,代码行数:12,代码来源:qxtrpcservice.cpp


示例9: getchar

void QxtStdioPrivate::activated(int)
{
    char c = getchar();
    if (c == EOF)
    {
#if QT_VERSION >= 0x040400
        emit qxt_p().readChannelFinished();
#endif
        hadeof = true;
        return;
    }
    QByteArray b(1, c);
    qxt_p().enqueData(b);
    qxt_p().sendData(b);
}
开发者ID:develnk,项目名称:qxtweb-qt5,代码行数:15,代码来源:qxtstdio.cpp


示例10: while

void QxtRPCServicePrivate::serverData()
{
    // This function does the same thing as clientData() except there's only one server connection instead of
    // multiple client connections.

    // Read all available data on the device.
    serverBuffer.append(device->readAll());

    while(serializer->canDeserialize(serverBuffer)) {
        // Extract one deserialized signal from the buffer.
        QxtAbstractSignalSerializer::DeserializedData data = serializer->deserialize(serverBuffer);

        // Check to see if it's a blank command.
        if(serializer->isNoOp(data))
            continue;

        // Check for protocol errors.
        if(serializer->isProtocolError(data)) {
            qWarning() << "QxtRPCService: Invalid data received; disconnecting";
            qxt_p().disconnectServer();
            return;
        }

        // Pad the arguments to 8, because that's what dispatchFromServer() expects.
        while(data.second.count() < 8)
            data.second << QVariant();

        // And finally, invoke the dispatcher.
        dispatchFromServer(data.first, data.second[0], data.second[1], data.second[2], data.second[3], data.second[4],
                data.second[5], data.second[6], data.second[7]);
    }
}
开发者ID:MorS25,项目名称:OpenPilot,代码行数:32,代码来源:qxtrpcservice.cpp


示例11: Q_UNUSED

void QxtSpanSliderPrivate::updateRange(int min, int max)
{
    Q_UNUSED(min);
    Q_UNUSED(max);
    // setSpan() takes care of keeping span in range
    qxt_p().setSpan(lower, upper);
}
开发者ID:dshean,项目名称:trunk,代码行数:7,代码来源:qxtspanslider.cpp


示例12: initStyleOption

void QxtSpanSliderPrivate::initStyleOption(QStyleOptionSlider* option, QxtSpanSlider::SpanHandle handle) const
{
    const QxtSpanSlider* p = &qxt_p();
    p->initStyleOption(option);
    option->sliderPosition = (handle == QxtSpanSlider::LowerHandle ? lowerPos : upperPos);
    option->sliderValue = (handle == QxtSpanSlider::LowerHandle ? lower : upper);
}
开发者ID:dshean,项目名称:trunk,代码行数:7,代码来源:qxtspanslider.cpp


示例13: iter

void QxtScheduleViewPrivate::itemGeometryChanged(QxtScheduleInternalItem * item, QVector< QRect > oldGeometry)
{
    QRegion oldRegion;

    if (item->geometry() == oldGeometry)
        return;

    QVectorIterator<QRect> iter(oldGeometry);
    QRect currRect;
    while (iter.hasNext())
    {
        currRect = iter.next();
        currRect.adjust(-1, -1, 2, 2);
        oldRegion += currRect;
    }
    //viewport()->update(oldRegion);


    QRegion newRegion;
    QVectorIterator<QRect> newIter(item->geometry());
    while (newIter.hasNext())
    {
        currRect = newIter.next();
        currRect.adjust(-1, -1, 2, 2);
        newRegion += currRect;
    }
    //viewport()->update(newRegion);
    qxt_p().viewport()->update();
}
开发者ID:01iv3r,项目名称:OpenPilot,代码行数:29,代码来源:qxtscheduleview_p.cpp


示例14: setCurrentEditor

void QxtItemDelegatePrivate::closeEditor(QWidget* editor)
{
    if (currentEdited.isValid() && editor == currentEditor)
    {
        setCurrentEditor(0, QModelIndex());
        emit qxt_p().editingFinished(currentEdited);
    }
}
开发者ID:MiniMonster,项目名称:Mini-Monster_PC_control,代码行数:8,代码来源:qxtitemdelegate.cpp


示例15: qxt_p

void QxtScheduleViewPrivate::init()
{
    if (qxt_p().model())
    {
        qxt_p().viewport()->setMouseTracking(true);

        if (!m_vHeader)
        {
            m_vHeader = new QxtScheduleHeaderWidget(Qt::Vertical, &qxt_p());
            connect(m_vHeader, SIGNAL(geometriesChanged()), &qxt_p(), SLOT(updateGeometries()));
        }
        m_vHeader->show();

        if (!m_hHeader)
        {
            m_hHeader = new QxtScheduleHeaderWidget(Qt::Horizontal, &qxt_p());
            connect(m_hHeader, SIGNAL(geometriesChanged()), &qxt_p(), SLOT(updateGeometries()));
        }
        m_hHeader->show();

        /*here we also initialize the items*/
        m_vHeader->setDefaultSectionSize(20);
        m_vHeader->setResizeMode(QHeaderView::Fixed);
        reloadItemsFromModel();
    }
    qxt_p().updateGeometries();
}
开发者ID:01iv3r,项目名称:OpenPilot,代码行数:27,代码来源:qxtscheduleview_p.cpp


示例16: qDeleteAll

void QxtScheduleViewPrivate::reloadItemsFromModel()
{
    qDeleteAll(m_Items.begin(), m_Items.end());
    m_Items.clear();
    m_selectedItem = NULL;

    int iNumItems = qxt_p().model()->rowCount();
    //delete all old stuff here
    QxtScheduleInternalItem *currentItem;
    for (int iLoop = 0; iLoop < iNumItems; iLoop++)
    {
        currentItem = new QxtScheduleInternalItem(&qxt_p(), qxt_p().model()->index(iLoop, 0));
        m_Items.append(currentItem);
        connect(currentItem, SIGNAL(geometryChanged(QxtScheduleInternalItem*, QVector<QRect>)), this, SLOT(itemGeometryChanged(QxtScheduleInternalItem * , QVector< QRect >)));
    }

    handleItemConcurrency(0, (qxt_p().rows()*qxt_p().cols()) - 1);
}
开发者ID:01iv3r,项目名称:OpenPilot,代码行数:18,代码来源:qxtscheduleview_p.cpp


示例17: QTextDocument

bool QxtPushButtonPrivate::isRichText() const
{
    bool rich = (format == Qt::RichText) || (format == Qt::AutoText && Qt::mightBeRichText(qxt_p().text()));
    if (rich && !doc)
    {
        doc = new QTextDocument(const_cast<QxtPushButton*>(&qxt_p()));
        doc->setUndoRedoEnabled(false);
    }
    return rich;
}
开发者ID:develnk,项目名称:qxtweb-qt5,代码行数:10,代码来源:qxtpushbutton.cpp


示例18: qxt_p

QSize QxtStarsPrivate::getStarSize() const
{
    QSize size = starSize;
    if (!size.isValid() || size.isNull())
    {
        const int width = qxt_p().style()->pixelMetric(QStyle::PM_SmallIconSize);
        size = QSize(width, width);
    }
    return size;
}
开发者ID:develnk,项目名称:qxtweb-qt5,代码行数:10,代码来源:qxtstars.cpp


示例19: init

void QxtConfigDialogPrivate::init( QxtConfigWidget::IconPosition pos )
{
    QxtConfigDialog* p = &qxt_p();
    configWidget = new QxtConfigWidget(pos);
    buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, p);
    QObject::connect(buttons, SIGNAL(accepted()), p, SLOT(accept()));
    QObject::connect(buttons, SIGNAL(rejected()), p, SLOT(reject()));
    layout = new QVBoxLayout(p);
    layout->addWidget(configWidget);
    layout->addWidget(buttons);
}
开发者ID:MorS25,项目名称:OpenPilot,代码行数:11,代码来源:qxtconfigdialog.cpp


示例20: QCheckBox

void QxtConfirmationMessagePrivate::init(const QString& message)
{
    remember = false;
    confirm = new QCheckBox(&qxt_p());
    if (!message.isNull())
        confirm->setText(message);
    else
        confirm->setText(QxtConfirmationMessage::tr("Do not show again."));

    QGridLayout* grid = qobject_cast<QGridLayout*>(qxt_p().layout());
    QDialogButtonBox* buttons = qFindChild<QDialogButtonBox*>(&qxt_p());
    if (grid && buttons)
    {
        const int idx = grid->indexOf(buttons);
        int row, column, rowSpan, columnSpan = 0;
        grid->getItemPosition(idx, &row, &column, &rowSpan, &columnSpan);
        QLayoutItem* buttonsItem = grid->takeAt(idx);
        grid->addWidget(confirm, row, column, rowSpan, columnSpan, Qt::AlignLeft | Qt::AlignTop);
        grid->addItem(buttonsItem, ++row, column, rowSpan, columnSpan);
    }
}
开发者ID:mcu786,项目名称:OpenPilot-1,代码行数:21,代码来源:qxtconfirmationmessage.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ r函数代码示例发布时间:2022-05-30
下一篇:
C++ qxt_d函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap