本文整理汇总了C++中BrowserNode::allow_spaces方法的典型用法代码示例。如果您正苦于以下问题:C++ BrowserNode::allow_spaces方法的具体用法?C++ BrowserNode::allow_spaces怎么用?C++ BrowserNode::allow_spaces使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BrowserNode
的用法示例。
在下文中一共展示了BrowserNode::allow_spaces方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: accept
void BasicDialog::accept() {
if (!check_edits(edits) || !kvtable->check_unique())
return;
BrowserNode * bn = data->get_browser_node();
if (edname != 0) {
QString s = edname->text().stripWhiteSpace();
if ((s != bn->get_name()) &&
((BrowserNode *) bn->parent())->wrong_child_name(s, bn->get_type(),
bn->allow_spaces(),
bn->allow_empty())) {
msg_critical(TR("Error"), edname->text() + TR("\n\nillegal name or already used"));
return;
}
else
bn->set_name(s);
}
bool newst = data->set_stereotype(fromUnicode(edstereotype->currentText().stripWhiteSpace()));
bn->set_comment(comment->text());
UmlWindow::update_comment_if_needed(bn);
kvtable->update(bn);
ProfiledStereotypes::modified(bn, newst);
bn->package_modified();
data->modified();
Q3TabDialog::accept();
}
示例2: accept
void ActivityDialog::accept()
{
if (!check_edits(edits) || !kvtable->check_unique())
return;
BrowserNode * bn = activity->browser_node;
QString s;
s = edname->text().trimmed();
if ((s != bn->get_name()) &&
((BrowserNode *) bn->parent())->wrong_child_name(s, UmlActivity,
bn->allow_spaces(),
bn->allow_empty()))
msg_critical(tr("Error"), s + tr("\n\nillegal name or already used"));
else {
bn->set_name(s);
bool newst = activity->set_stereotype(fromUnicode(edstereotype->currentText().trimmed()));
int index = list.indexOf(edspecification->currentText().trimmed());
activity->set_specification((index != -1)
? (BrowserOperation *) opers.at(index)
: 0);
activity->read_only = readonly_cb->isChecked();
activity->single_execution = singlexec_cb->isChecked();
activity->is_active = active_cb->isChecked();
uml.accept(activity->uml_condition);
cpp.accept(activity->cpp_condition);
java.accept(activity->java_condition);
bn->set_comment(comment->text());
UmlWindow::update_comment_if_needed(bn);
activity->constraint = constraint->trimmedText();
kvtable->updateNodeFromThis(bn);
ProfiledStereotypes::modified(bn, newst);
bn->modified();
bn->package_modified();
activity->modified();
TabDialog::accept();
}
}
示例3: accept
void TransitionDialog::accept()
{
if (!check_edits(edits) || !kvtable->check_unique())
return;
BrowserNode * bn = rel->browser_node;
QString s;
s = edname->text().trimmed();
if (s.isEmpty())
s = "<transition>";
if ((s != bn->get_name()) &&
((BrowserNode *) bn->parent())->wrong_child_name(s, UmlTransition,
bn->allow_spaces(),
bn->allow_empty()))
msg_critical(tr("Error"), s + tr("\n\nillegal name or already used"));
else {
bn->set_name(s);
bool newst = rel->set_stereotype(fromUnicode(edstereotype->currentText().trimmed()));
if (internal_cb != 0)
rel->set_internal(internal_cb->isChecked());
uml.accept(rel->uml);
cpp.accept(rel->cpp);
java.accept(rel->java);
bn->set_comment(comment->text());
UmlWindow::update_comment_if_needed(bn);
kvtable->updateNodeFromThis(bn);
ProfiledStereotypes::modified(bn, newst);
bn->modified();
bn->package_modified();
rel->modified();
TabDialog::accept();
}
}
示例4: accept
void ExpansionRegionDialog::accept()
{
if (!check_edits(edits) || !kvtable->check_unique())
return;
BrowserNode * bn = data->get_browser_node();
if (edname != 0) {
QString s = edname->text().trimmed();
if ((s != bn->get_name()) &&
((BrowserNode *) bn->parent())->wrong_child_name(s, bn->get_type(),
bn->allow_spaces(),
bn->allow_empty())) {
msg_critical(TR("Error"), edname->text() + TR("\n\nillegal name or already used"));
return;
}
else
bn->set_name(s);
}
data->must_isolate = must_isolate_cb->isChecked();
data->mode = expansion_mode_kind(edmode->currentText().toLatin1().constData());
bool newst = data->set_stereotype(fromUnicode(edstereotype->currentText().trimmed()));
bn->set_comment(comment->text());
UmlWindow::update_comment_if_needed(bn);
kvtable->updateNodeFromThis(bn);
ProfiledStereotypes::modified(bn, newst);
bn->package_modified();
data->modified();
TabDialog::accept();
}
示例5: accept
void FlowDialog::accept()
{
if (!check_edits(edits) || !kvtable->check_unique())
return;
BrowserNode * bn = flow->browser_node;
QString s;
s = edname->text().stripWhiteSpace();
if ((s != bn->get_name()) &&
((BrowserNode *) bn->parent())->wrong_child_name(s, UmlFlow,
bn->allow_spaces(),
bn->allow_empty()))
msg_critical(TR("Error"), s + TR("\n\nillegal name or already used"));
else {
bn->set_name(s);
bool newst = flow->set_stereotype(fromUnicode(edstereotype->currentText().stripWhiteSpace()));
uml.accept(flow->uml);
cpp.accept(flow->cpp);
java.accept(flow->java);
bn->set_comment(comment->text());
UmlWindow::update_comment_if_needed(bn);
kvtable->updateNodeFromThis(bn);
ProfiledStereotypes::modified(bn, newst);
bn->modified();
bn->package_modified();
flow->modified();
Q3TabDialog::accept();
}
}
示例6: accept
void ParameterDialog::accept()
{
if (!check_edits(edits) || !kvtable->check_unique())
return;
BrowserNode * bn = param->browser_node;
QString s;
s = edname->text().trimmed();
if ((s != param->name()) &&
((BrowserNode *) bn->parent())->wrong_child_name(s, UmlParameter,
bn->allow_spaces(),
bn->allow_empty()))
msg_critical(tr("Error"), s + tr("\n\nillegal name or already used"));
else {
// check consistency
UmlParamDirection dir = direction(eddir->currentText());
bool exception = exception_rb->isChecked();
UmlParamEffect effect = ::effect(edeffect->currentText());
QString err;
if ((dir == UmlIn) && exception)
err = tr("An input parameter cannot be an exception.\n");
switch (effect) {
case UmlDelete:
if ((dir != UmlIn) && (dir != UmlInOut))
err += tr("Only in and inout parameter may have a delete effect.");
break;
case UmlCreate:
if ((dir != UmlOut) && (dir != UmlInOut) && (dir != UmlReturn))
err += tr("Only out, inout and return parameter may have a create effect.");
break;
default:
break;
}
if (!err.isEmpty())
msg_critical(tr("Error"), err);
else {
bn->set_name(s);
bool newst = param->set_stereotype(fromUnicode(edstereotype->currentText().trimmed()));
AType t;
s = edtype->currentText().trimmed();
if (!s.isEmpty()) {
int index = list.indexOf(s);
if (index >= 0)
t.type = (BrowserClass *) nodes.at(index);
else
t.explicit_type = s;
}
param->set_type(t);
param->dir = dir;
param->multiplicity =
edmultiplicity->currentText().trimmed();
param->ordering = ordering(edordering->currentText().toLatin1());
param->effect = effect;
param->is_control = is_control_cb->isChecked();
param->unique = unique_cb->isChecked();
param->exception = exception;
param->stream = stream_rb->isChecked();
param->in_state = edin_state->text().trimmed();
param->default_value = edinit->text();
param->uml_selection = eduml_selection->text().trimmed();
param->cpp_selection = edcpp_selection->text().trimmed();
param->java_selection = edjava_selection->text().trimmed();
bn->set_comment(comment->text());
UmlWindow::update_comment_if_needed(bn);
kvtable->updateNodeFromThis(bn);
ProfiledStereotypes::modified(bn, newst);
bn->modified();
bn->package_modified();
param->modified();
TabDialog::accept();
}
}
}