本文整理汇总了C++中endEdit函数的典型用法代码示例。如果您正苦于以下问题:C++ endEdit函数的具体用法?C++ endEdit怎么用?C++ endEdit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了endEdit函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:DaniM,项目名称:lyngo,代码行数:34,代码来源:cbuttons.cpp
示例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);
}
开发者ID:EQ4,项目名称:vstgui,代码行数:61,代码来源:coptionmenu.cpp
示例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);
}
开发者ID:Epitek,项目名称:KickMaker,代码行数:29,代码来源:cBitmapFontEditable.cpp
示例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;
}
开发者ID:BunnyWei,项目名称:Anthropometric-Data-Analysis-Software,代码行数:30,代码来源:moc_glarea.cpp
示例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;
}
开发者ID:UIKit0,项目名称:vstgui,代码行数:27,代码来源:csegmentbutton.cpp
示例6: currentColumn
void MTable::stopEditing()
{
int cCol = currentColumn();
int cRow = currentRow();
endEdit( cRow, cCol, TRUE, TRUE );
}
开发者ID:Klunkerball,项目名称:EGSnrc,代码行数:7,代码来源:mtable.cpp
示例7: disconnect
void Morphology::disable(){
enable_->setChecked(false);
disconnect(core_, SIGNAL(endEdit()), this, SLOT(disable()));
glwidget_->removeEventFilter(this);
flatview_->removeEventFilter(this);
is_enabled_ = false;
}
开发者ID:circlingthesun,项目名称:Masters,代码行数:7,代码来源:morphology.cpp
示例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()));
}
开发者ID:nitramr,项目名称:scribus,代码行数:27,代码来源:canvasmode_editweldpoint.cpp
示例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()));
}
开发者ID:gyuris,项目名称:scribus,代码行数:29,代码来源:canvasmode_editspiral.cpp
示例10: endEdit
void IPlugVST3::EndInformHostOfParamChange(int idx)
{
if (GetParam(idx)->GetCanAutomate())
{
endEdit(idx);
}
}
开发者ID:b-vesco,项目名称:wdl-ol,代码行数:7,代码来源:IPlugVST3.cpp
示例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()));
}
开发者ID:pvanek,项目名称:scribus-cuba-trunk,代码行数:34,代码来源:canvasmode_editarc.cpp
示例12: endEdit
QSFieldView::~QSFieldView(void)
{
endEdit();
delete _pLabel;
delete _pEditor;
}
开发者ID:mlimper,项目名称:OpenSG1x,代码行数:7,代码来源:OSGQFieldView_qt.cpp
示例13: setTitle
void MaterialGeneratorNode::init()
{
setTitle(getType().c_str());
endEdit();
evaluate();
}
开发者ID:EvilInteractive,项目名称:happy-engine,代码行数:7,代码来源:MaterialGeneratorNode.cpp
示例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;
}
开发者ID:Piticfericit,项目名称:vstgui,代码行数:32,代码来源:cslider.cpp
示例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();
}
开发者ID:amitjamadagni,项目名称:MuseScore,代码行数:25,代码来源:editlyrics.cpp
示例16: getMin
//------------------------------------------------------------------------
CMouseEventResult CKickButton::onMouseCancel ()
{
value = getMin ();
if (isDirty ())
invalid ();
endEdit ();
return kMouseEventHandled;
}
开发者ID:DaniM,项目名称:lyngo,代码行数:9,代码来源:cbuttons.cpp
示例17: startEdit
void
TextBuffer::insertChar( char c, TextLoc& loc ) {
startEdit( loc,loc);
TextLoc p = loc;
loc.chr = _lines[loc.line].addChar(c, loc.chr);
endEdit( p, loc );
}
开发者ID:ccrma,项目名称:audicle,代码行数:8,代码来源:audicle_text_buffer.cpp
示例18: invalid
//------------------------------------------------------------------------
CMouseEventResult CTextButton::onMouseCancel ()
{
value = fEntryState;
if (isDirty ())
invalid ();
endEdit ();
return kMouseEventHandled;
}
开发者ID:DaniM,项目名称:lyngo,代码行数:9,代码来源:cbuttons.cpp
示例19: setText
bool setText(const QString& text) {
startEdit();
bool ret = m_document->setText(text);
endEdit();
ModificationRevision::clearModificationCache(m_url);
return ret;
}
开发者ID:caidongyun,项目名称:kdevplatform,代码行数:8,代码来源:coderepresentation.cpp
示例20: horizontalHeader
void ConnectionTable::sortColumn( int col, bool ascending, bool )
{
horizontalHeader()->setSortIndicator( col, ascending );
if ( isEditing() )
endEdit( currEditRow(), currEditCol(), FALSE, FALSE );
QTable::sortColumn( col, ascending, TRUE );
setCurrentCell( 0, 0 );
emit resorted();
}
开发者ID:app,项目名称:ananas-labs,代码行数:9,代码来源:connectiontable.cpp
注:本文中的endEdit函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论