本文整理汇总了C++中qxt_p函数的典型用法代码示例。如果您正苦于以下问题:C++ qxt_p函数的具体用法?C++ qxt_p怎么用?C++ qxt_p使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了qxt_p函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
}
}
示例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;
}
示例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());
}
示例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);
}
}
示例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());
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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]);
}
}
示例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);
}
示例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);
}
示例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();
}
示例14: setCurrentEditor
void QxtItemDelegatePrivate::closeEditor(QWidget* editor)
{
if (currentEdited.isValid() && editor == currentEditor)
{
setCurrentEditor(0, QModelIndex());
emit qxt_p().editingFinished(currentEdited);
}
}
示例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();
}