本文整理汇总了C++中endEdit函数的典型用法代码示例。如果您正苦于以下问题:C++ endEdit函数的具体用法?C++ endEdit怎么用?C++ endEdit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了endEdit函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: beginEdit
//------------------------------------------------------------------------
int32_t CTextButton::onKeyDown (VstKeyCode& keyCode)
{
if (keyCode.modifier == 0 && keyCode.virt == VKEY_RETURN)
{
if (style == kKickStyle)
{
if (value != getMax ())
{
beginEdit ();
value = getMax ();
invalid ();
valueChanged ();
value = getMin ();
invalid ();
valueChanged ();
endEdit ();
}
}
else
{
beginEdit ();
if (value == getMin ())
value = getMax ();
else
value = getMin ();
invalid ();
valueChanged ();
endEdit ();
}
return 1;
}
return -1;
}
示例2: guard
//------------------------------------------------------------------------
int32_t COptionMenu::onKeyDown (VstKeyCode& keyCode)
{
if (keyCode.modifier == 0 && keyCode.character == 0)
{
if (keyCode.virt == VKEY_RETURN)
{
CBaseObjectGuard guard (this);
if (bgWhenClick)
invalid ();
popup ();
if (bgWhenClick)
invalid ();
return 1;
}
if (!(style & (kMultipleCheckStyle & ~kCheckStyle)))
{
if (keyCode.virt == VKEY_UP)
{
int32_t value = (int32_t)getValue ()-1;
if (value >= 0)
{
CMenuItem* entry = getEntry (value);
while (entry && (entry->isSeparator () || entry->isTitle () || !entry->isEnabled () || entry->getSubmenu ()))
entry = getEntry (--value);
if (entry)
{
beginEdit ();
setValue ((float)value);
lastResult = (int32_t)getValue ();
valueChanged ();
endEdit ();
invalid ();
}
}
return 1;
}
if (keyCode.virt == VKEY_DOWN)
{
int32_t value = (int32_t)getValue ()+1;
if (value < getNbEntries ())
{
CMenuItem* entry = getEntry (value);
while (entry && (entry->isSeparator () || entry->isTitle () || !entry->isEnabled () || entry->getSubmenu ()))
entry = getEntry (++value);
if (entry)
{
beginEdit ();
setValue ((float)value);
lastResult = (int32_t)getValue ();
valueChanged ();
endEdit ();
invalid ();
}
}
return 1;
}
}
}
return CParamDisplay::onKeyDown (keyCode);
}
示例3: endEdit
//------------------------------------------------------------------------
void cBitmapFontEditable::looseFocus(CDrawContext *pContext) {
// Call this yet to avoid recursive call
endEdit();
if(getFrame()->getFocusView() == this) {
getFrame()->setFocusView(0);
}
#if WINDOWS
// char newText[255];
// GetWindowText((HWND)platformControl, newText, 255);
// strcpy (text, newText);
DestroyWindow ((HWND)platformControl);
#elif MAC
if(gEventHandler) {
RemoveEventHandler(gEventHandler);
}
gEventHandler = 0;
#endif
m_editing = false;
setDirty(true);
if(listener) {
listener->valueChanged(pContext, this);
}
CControl::looseFocus(pContext);
}
示例4: switch
int GLArea::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QGLWidget::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
switch (_id) {
case 0: updateMainWindowMenus(); break;
case 1: transmitViewDir((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< vcg::Point3f(*)>(_a[2]))); break;
case 2: transmitViewPos((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< vcg::Point3f(*)>(_a[2]))); break;
case 3: transmitSurfacePos((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< vcg::Point3f(*)>(_a[2]))); break;
case 4: transmitCameraPos((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< vcg::Point3f(*)>(_a[2]))); break;
case 5: updateTexture(); break;
case 6: setDrawMode((*reinterpret_cast< vcg::GLW::DrawMode(*)>(_a[1]))); break;
case 7: setColorMode((*reinterpret_cast< vcg::GLW::ColorMode(*)>(_a[1]))); break;
case 8: setTextureMode((*reinterpret_cast< vcg::GLW::TextureMode(*)>(_a[1]))); break;
case 9: endEdit(); break;
case 10: setSelectionRendering((*reinterpret_cast< bool(*)>(_a[1]))); break;
case 11: suspendEditToggle(); break;
case 12: setCurrentlyActiveLayer((*reinterpret_cast< int(*)>(_a[1]))); break;
case 13: sendViewPos((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 14: sendSurfacePos((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 15: sendViewDir((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 16: sendCameraPos((*reinterpret_cast< QString(*)>(_a[1]))); break;
default: ;
}
_id -= 17;
}
return _id;
}
示例5: getSegmentIndex
//-----------------------------------------------------------------------------
CMouseEventResult CSegmentButton::onMouseDown (CPoint& where, const CButtonState& buttons)
{
if (buttons.isLeftButton ())
{
float newValue = 0;
float valueOffset = 1.f / (segments.size () - 1);
uint32_t currentIndex = getSegmentIndex (getValueNormalized ());
for (Segments::const_iterator it = segments.begin (), end = segments.end (); it != end; ++it, newValue += valueOffset)
{
if ((*it).rect.pointInside (where))
{
uint32_t newIndex = getSegmentIndex (newValue);
if (newIndex != currentIndex)
{
beginEdit ();
setSelectedSegment (newIndex);
valueChanged ();
endEdit ();
invalid ();
}
break;
}
}
}
return kMouseDownEventHandledButDontNeedMovedOrUpEvents;
}
示例6: currentColumn
void MTable::stopEditing()
{
int cCol = currentColumn();
int cRow = currentRow();
endEdit( cRow, cCol, TRUE, TRUE );
}
示例7: disconnect
void Morphology::disable(){
enable_->setChecked(false);
disconnect(core_, SIGNAL(endEdit()), this, SLOT(disable()));
glwidget_->removeEventFilter(this);
flatview_->removeEventFilter(this);
is_enabled_ = false;
}
示例8: setModeCursor
void CanvasMode_EditWeldPoint::activate(bool fromGesture)
{
m_canvas->m_viewMode.m_MouseButtonPressed = false;
m_canvas->resetRenderMode();
m_doc->DragP = false;
m_doc->leaveDrag = false;
m_canvas->m_viewMode.operItemMoving = false;
m_canvas->m_viewMode.operItemResizing = false;
m_view->MidButt = false;
m_keyRepeat = false;
m_currItem = m_doc->m_Selection->itemAt(0);
m_weldToList = m_currItem->itemsWeldedTo();
m_weldToList.append(m_currItem);
m_Mxp = m_Myp = -1;
m_selectedPoint = -1;
setModeCursor();
if (fromGesture)
{
m_view->update();
}
m_ModeDialog = new WeldEditDialog(m_ScMW);
m_ModeDialog->show();
connect(m_ModeDialog, SIGNAL(endEdit()), this, SLOT(endEditing()));
connect(m_ModeDialog, SIGNAL(paletteShown(bool)), this, SLOT(endEditing(bool)));
connect(m_ModeDialog, SIGNAL(modeMoveWeld()), this, SLOT(setWeldMode()));
connect(m_ModeDialog, SIGNAL(modeMoveObject()), this, SLOT(setObjectMode()));
}
示例9: SpiralVectorDialog
void CanvasMode_EditSpiral::activate(bool fromGesture)
{
m_VectorDialog = new SpiralVectorDialog(m_ScMW);
m_canvas->m_viewMode.m_MouseButtonPressed = false;
m_canvas->resetRenderMode();
m_doc->DragP = false;
m_doc->leaveDrag = false;
m_canvas->m_viewMode.operItemMoving = false;
m_canvas->m_viewMode.operItemResizing = false;
m_view->MidButt = false;
m_Mxp = m_Myp = -1;
PageItem *currItem = m_doc->m_Selection->itemAt(0);
PageItem_Spiral* item = currItem->asSpiral();
m_startPoint = currItem->PoLine.pointQF(0);
m_endPoint = currItem->PoLine.pointQF(currItem->PoLine.size() - 2);
m_startAngle = item->spiralStartAngle;
m_endAngle = item->spiralEndAngle;
m_VectorDialog->setValues(computeRealAngle(m_startAngle, false), computeRealAngle(m_endAngle, false), item->spiralFactor);
m_VectorDialog->show();
setModeCursor();
if (fromGesture)
{
m_view->update();
}
connect(m_VectorDialog, SIGNAL(NewVectors(double, double, double)), this, SLOT(applyValues(double, double, double)));
connect(m_VectorDialog, SIGNAL(endEdit()), this, SLOT(endEditing()));
connect(m_VectorDialog, SIGNAL(paletteShown(bool)), this, SLOT(endEditing(bool)));
connect(m_doc, SIGNAL(docChanged()), this, SLOT(updateFromItem()));
}
示例10: endEdit
void IPlugVST3::EndInformHostOfParamChange(int idx)
{
if (GetParam(idx)->GetCanAutomate())
{
endEdit(idx);
}
}
示例11: ArcVectorDialog
void CanvasMode_EditArc::activate(bool fromGesture)
{
VectorDialog = new ArcVectorDialog(m_ScMW);
m_canvas->m_viewMode.m_MouseButtonPressed = false;
m_canvas->resetRenderMode();
m_doc->DragP = false;
m_doc->leaveDrag = false;
m_canvas->m_viewMode.operItemMoving = false;
m_canvas->m_viewMode.operItemResizing = false;
m_view->MidButt = false;
Mxp = Myp = -1;
PageItem *currItem = m_doc->m_Selection->itemAt(0);
PageItem_Arc* item = currItem->asArc();
centerPoint = currItem->PoLine.pointQF(0);
startPoint = currItem->PoLine.pointQF(3);
endPoint = currItem->PoLine.pointQF(currItem->PoLine.size() - 4);
widthPoint = QPointF(centerPoint.x() - item->arcWidth / 2.0, centerPoint.y());
heightPoint = QPointF(centerPoint.x(), centerPoint.y() - item->arcHeight / 2.0);
startAngle = item->arcStartAngle;
endAngle = startAngle + item->arcSweepAngle;
QLineF res = QLineF(centerPoint, startPoint);
QLineF swe = QLineF(centerPoint, endPoint);
VectorDialog->setValues(res.angle(), swe.angle(), item->arcHeight, item->arcWidth);
VectorDialog->show();
setModeCursor();
if (fromGesture)
{
m_view->update();
}
connect(VectorDialog, SIGNAL(NewVectors(double, double, double, double)), this, SLOT(applyValues(double, double, double, double)));
connect(VectorDialog, SIGNAL(endEdit()), this, SLOT(endEditing()));
connect(VectorDialog, SIGNAL(paletteShown(bool)), this, SLOT(endEditing(bool)));
connect(m_doc, SIGNAL(docChanged()), this, SLOT(updateFromItem()));
}
示例12: endEdit
QSFieldView::~QSFieldView(void)
{
endEdit();
delete _pLabel;
delete _pEditor;
}
示例13: setTitle
void MaterialGeneratorNode::init()
{
setTitle(getType().c_str());
endEdit();
evaluate();
}
示例14: getValueNormalized
//------------------------------------------------------------------------
bool CSlider::onWheel (const CPoint& where, const float &distance, const CButtonState &buttons)
{
if (!getMouseEnabled ())
return false;
float _distance = distance;
if (styleIsInverseStyle (style))
_distance *= -1.f;
float normValue = getValueNormalized ();
if (buttons & kZoomModifier)
normValue += 0.1f * _distance * wheelInc;
else
normValue += _distance * wheelInc;
setValueNormalized (normValue);
if (isDirty ())
{
invalid ();
// begin of edit parameter
beginEdit ();
valueChanged ();
// end of edit parameter
endEdit ();
}
return true;
}
示例15: endEdit
void ScoreView::lyricsReturn()
{
Lyrics* lyrics = (Lyrics*)editObject;
Segment* segment = lyrics->segment();
endEdit();
_score->startCmd();
Lyrics* oldLyrics = lyrics;
lyrics = static_cast<Lyrics*>(Element::create(lyrics->type(), _score));
lyrics->setTrack(oldLyrics->track());
lyrics->setParent(segment->element(oldLyrics->track()));
lyrics->setNo(oldLyrics->no() + 1);
_score->undoAddElement(lyrics);
_score->select(lyrics, SELECT_SINGLE, 0);
startEdit(lyrics, -1);
mscore->changeState(mscoreState());
adjustCanvasPosition(lyrics, false);
_score->setLayoutAll(true);
_score->end2();
_score->end1();
}