本文整理汇总了C++中sim::PropertyHubPtr::setValue方法的典型用法代码示例。如果您正苦于以下问题:C++ PropertyHubPtr::setValue方法的具体用法?C++ PropertyHubPtr::setValue怎么用?C++ PropertyHubPtr::setValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sim::PropertyHubPtr
的用法示例。
在下文中一共展示了PropertyHubPtr::setValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: apply
void MessageConfig::apply(SIM::PropertyHubPtr _data)
{
if (m_file)
m_file->apply(_data);
SIM::PropertyHubPtr data = _data;
data->setValue("OpenOnOnline", chkOnline->isChecked());
data->setValue("LogStatus", chkStatus->isChecked());
data->setValue("OpenNewMessage", NEW_MSG_NOOPEN);
if (btnMinimize->isChecked())
data->setValue("OpenNewMessage", NEW_MSG_MINIMIZE);
if (btnRaise->isChecked())
data->setValue("OpenNewMessage", NEW_MSG_RAISE);
}
示例2: userDataManipulation
void Test::userDataManipulation()
{
SIM::UserDataPtr data = SIM::UserData::create();
SIM::PropertyHubPtr hub = data->getUserData("nonexistant");
QVERIFY(hub.isNull());
hub = data->createUserData("alpha");
QVERIFY(!hub.isNull());
hub->setValue("foo", 12);
QCOMPARE(hub->value("foo").toInt(), 12);
SIM::PropertyHubPtr anotherhub = data->getUserData("alpha");
QCOMPARE(anotherhub->value("foo").toInt(), 12);
hub.clear();
anotherhub.clear();
data->destroyUserData("alpha");
hub = data->getUserData("alpha");
QVERIFY(hub.isNull());
}
示例3: apply
void FileConfig::apply(SIM::PropertyHubPtr data)
{
QString def = edtPath->text().isEmpty() ? "Incoming Files" : edtPath->text();
data->setValue("IncomingPath", def);
edtPath->setText(user_file(data->value("IncomingPath").toString()));
data->setValue("AcceptMode", 0);
if (btnAccept->isChecked())
{
data->setValue("AcceptMode", 1);
data->setValue("OverwriteFiles", chkOverwrite->isChecked());
}
if (btnDecline->isChecked())
{
data->setValue("AcceptMode", 2);
data->setValue("DeclineMessage", edtDecline->toPlainText());
}
}
示例4: apply
void OSDConfig::apply(SIM::PropertyHubPtr data)
{
data->setValue("EnableMessage", chkMessage->isChecked());
data->setValue("EnableMessageShowContent", chkMessageContent->isChecked());
data->setValue("EnableCapsLockFlash", chkCapsLockFlash->isChecked());
data->setValue("EnableAlert", chkStatus->isChecked());
data->setValue("EnableAlertOnline", chkStatusOnline->isChecked());
data->setValue("EnableAlertAway", chkStatusAway->isChecked());
data->setValue("EnableAlertNA", chkStatusNA->isChecked());
data->setValue("EnableAlertDND", chkStatusDND->isChecked());
data->setValue("EnableAlertOccupied", chkStatusOccupied->isChecked());
data->setValue("EnableAlertFFC", chkStatusFFC->isChecked());
data->setValue("EnableAlertOffline", chkStatusOffline->isChecked());
data->setValue("EnableTyping", chkTyping->isChecked());
data->setValue("ContentLines", (uint)edtLines->text().toULong());
m_iface->apply(data);
}
示例5: processEvent
//.........这里部分代码省略.........
cmd->flags |= COMMAND_DISABLED;
return true;
case CmdPaste:
if (m_edit->isReadOnly())
return false;
if (QApplication::clipboard()->text().isEmpty())
cmd->flags |= COMMAND_DISABLED;
return true;
case CmdClear:
if (m_edit->isReadOnly())
return false;
case CmdSelectAll:
if (m_edit->toPlainText().isEmpty())
cmd->flags |= COMMAND_DISABLED;
return true;
}
break;
}
case eEventCommandExec: {
EventCommandExec *ece = static_cast<EventCommandExec*>(e);
CommandDef *cmd = ece->cmd();
#if defined(USE_KDE)
#if KDE_IS_VERSION(3,2,0)
if (cmd->id == CmdEnableSpell){
m_edit->setCheckSpellingEnabled(cmd->flags & COMMAND_CHECKED);
return false;
}
else if ((cmd->id == CmdSpell) && (cmd->param == this)){
m_edit->checkSpelling();
return true;
}
else
#endif
#endif
if ((cmd->id == CmdSmile) && (cmd->param == this)){
EventCommandWidget eWidget(cmd);
eWidget.process();
QToolButton *btnSmile = qobject_cast<QToolButton*>(eWidget.widget());
if (btnSmile){
SmilePopup *popup = new SmilePopup(this);
connect(popup, SIGNAL(insert(const QString &)), this, SLOT(insertSmile(const QString &)));
QPoint p = CToolButton::popupPos(btnSmile, popup);
popup->move(p);
popup->show();
}
return true;
}
else if ((cmd->id == CmdTranslit) && (cmd->param == this)){
Contact *contact = getContacts()->contact(m_userWnd->id());
if (contact){
SIM::PropertyHubPtr data = contact->getUserData("translit", true);
data->setValue("Translit", ((cmd->flags & COMMAND_CHECKED) != 0));
}
return true;
}
else if ((cmd->id == CmdMultiply) && (cmd->param == this)){
m_userWnd->showListView((cmd->flags & COMMAND_CHECKED) != 0);
return true;
}
else if ((cmd->bar_id == ToolBarMsgEdit) && m_edit->isReadOnly() && (cmd->param == this)){
switch (cmd->id){
case CmdMsgAnswer:{
Message *msg = new Message(MessageGeneric);
msg->setContact(m_userWnd->id());
msg->setClient(m_client);
EventOpenMessage(msg).process();
delete msg;
}
case CmdNextMessage:
QTimer::singleShot(0, this, SLOT(goNext()));
break;
}
}
else if ((cmd->menu_id != MenuTextEdit) || (cmd->param != this))
return false;
switch (cmd->id){
case CmdUndo:
m_edit->undo();
return true;
case CmdRedo:
m_edit->redo();
return true;
case CmdCut:
m_edit->cut();
return true;
case CmdCopy:
m_edit->copy();
return true;
case CmdPaste:
m_edit->paste();
return true;
case CmdClear:
m_edit->clear();
return true;
case CmdSelectAll:
m_edit->selectAll();
return true;
}
break;
}