void ofxGenericBarGraphView::setCurrentTextVisible( bool visible ) { if ( visible ) { if ( !_currentText ) { _currentText = ofxGenericTextView::create( getFrame( ofPoint( 0, 0 ) ) ); if ( _currentText ) { //_currentText->setAutosizeFontToFitText( ofxGenericViewAutoresizingFull ); switch( _expand ) { case ofxGenericBarGraphViewExpandHorizontalRight: _currentText->setTextAlignment( ofxGenericTextHorizontalAlignmentLeft ); break; default: _currentText->setTextAlignment( ofxGenericTextHorizontalAlignmentRight ); break; } addChildView( _currentText ); _currentText->setText( ofToString( getCurrent() ) ); } } updateCurrentText(); } else { if ( _currentText ) { _currentText->removeFromParent(); _currentText = ofPtr< ofxGenericTextView >(); } } }
void CmdPromptInput::checkEditedText(const QString& txt) { updateCurrentText(txt); if(rapidFireEnabled) processInput(); }
void ofxGenericBarGraphView::setCurrent( float value ) { _current = value; updateCurrentText(); recalculateBar(); }
void CmdPromptInput::checkChangedText(const QString& txt) { updateCurrentText(txt); }
void CmdPromptInput::processInput(const QChar& rapidChar) { qDebug("CmdPromptInput::processInput"); updateCurrentText(curText); QString cmdtxt(curText); cmdtxt.replace(0, prefix.length(), ""); if(!rapidFireEnabled) cmdtxt = cmdtxt.toLower(); if(cmdActive) { if(rapidFireEnabled) { if(rapidChar == Qt::Key_Enter || rapidChar == Qt::Key_Return) { emit appendHistory(curText); emit runCommand(curCmd, "RAPID_ENTER"); curText.clear(); clear(); return; } else if(rapidChar == Qt::Key_Space) { updateCurrentText(curText + " "); emit runCommand(curCmd, cmdtxt + " "); return; } else { emit runCommand(curCmd, cmdtxt); return; } } else { emit appendHistory(curText); emit runCommand(curCmd, cmdtxt); } } else { if(aliasHash->contains(cmdtxt)) { cmdActive = true; lastCmd = curCmd; curCmd = aliasHash->value(cmdtxt); emit appendHistory(curText); emit startCommand(curCmd); } else if(cmdtxt.isEmpty()) { cmdActive = true; emit appendHistory(curText); //Rerun the last successful command emit startCommand(lastCmd); } else { emit appendHistory(curText + " Unknown command \"" + cmdtxt + "\". Press F1 for help."); } } if(!rapidFireEnabled) clear(); }
//VOXOX CHANGE by Rolando - 2009.10.13 void VoxOxToolTipLineEdit::resizeEvent ( QResizeEvent * event ){ _maximumWidthPixels = width(); updateCurrentText(); QLineEdit::resizeEvent(event); }