本文整理汇总了C++中SignalSlotConnection::setSlot方法的典型用法代码示例。如果您正苦于以下问题:C++ SignalSlotConnection::setSlot方法的具体用法?C++ SignalSlotConnection::setSlot怎么用?C++ SignalSlotConnection::setSlot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SignalSlotConnection
的用法示例。
在下文中一共展示了SignalSlotConnection::setSlot方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: undo
void SetMemberCommand::undo()
{
m_con->update();
if (m_type == EndPoint::Source)
m_con->setSignal(m_old_member);
else
m_con->setSlot(m_old_member);
m_con->update();
emit m_editor->connectionChanged(m_con);
}
示例2: dialog
Connection *SignalSlotEditor::createConnection(QWidget *source, QWidget *destination)
{
SignalSlotConnection *con = 0;
Q_ASSERT(source != 0);
Q_ASSERT(destination != 0);
ConnectDialog dialog(m_form_window, source, destination, m_form_window->core()->topLevel());
dialog.setShowAllSignalsSlots(m_showAllSignalsSlots);
if (dialog.exec() == QDialog::Accepted) {
con = new SignalSlotConnection(this, source, destination);
con->setSignal(dialog.signal());
con->setSlot(dialog.slot());
}
m_showAllSignalsSlots = dialog.showAllSignalsSlots();
return con;
}
示例3: redo
void ModifyConnectionCommand::redo()
{
m_conn->setSignal(m_newSignal);
m_conn->setSlot(m_newSlot);
}