本文整理汇总了C++中QTextStream函数的典型用法代码示例。如果您正苦于以下问题:C++ QTextStream函数的具体用法?C++ QTextStream怎么用?C++ QTextStream使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了QTextStream函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: regex
void SearchWidget::accept()
{
if(ui->checkBox_regex->isChecked()) {
QRegExp regex(ui->comboBox_search->currentText(),
ui->checkBox_caseSensitive->isChecked() ? Qt::CaseSensitive: Qt::CaseInsensitive,
QRegExp::RegExp2);
if(!regex.isValid()) {
QString message;
QTextStream(&message)
<< tr("The pattern \"")
<< ui->comboBox_search->currentText()
<< tr("\" is invalid.");
QMessageBox::critical(this, YApplication::displayAppName(), message);
ui->comboBox_search->setFocus();
return;
}
}
SearchCriteria sc(
ui->comboBox_search->currentText(),
ui->checkBox_caseSensitive->isChecked(),
ui->checkBox_regex->isChecked());
SearchInfo::instance().acceptNewSearch(sc);
QDialog::accept();
}
示例2: processAnswer
void HardwareHiqsdr :: processAnswer (QStringList list)
{
if (list[0] == "*getserial?") {
// try to set the serial
qDebug() << Q_FUNC_INFO<<list[2];
// change the title bar
QString x;
x.clear();
QTextStream(&x) << windowTitle() << " - SN: " << list[2];
setWindowTitle(x) ;
}
if (list[0] == "*getpreselector?") {
// try to set the serial
qDebug() << Q_FUNC_INFO << list [1] << list[2] << list[3] ;
// change the preselector buttons
int x = list[1].toInt() ;
if (x >= 0 && x < 16) {
psel[x]->setText(list[3]);
}
}
if (list[0] == "getpreampstatus?") {
// try to set the serial
qDebug() << Q_FUNC_INFO << list [1] << list[2] << list[3] ;
// change the preamp button
int x = list[1].toInt() ;
if (x >= 0 && x <= 1) {
preampVal = x;
preamp->setChecked((preampVal == 1) ? true : false);
}
}
}
示例3: QDir
// search local database for discID
bool Dbase::Search(Cddb::Matches& res, const Cddb::discid_t discID)
{
res.matches.empty();
if (CacheGet(res, discID))
return true;
QFileInfoList list = QDir(GetDB()).entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
for (QFileInfoList::const_iterator it = list.begin(); it != list.end(); ++it)
{
QString genre = it->baseName();
QFileInfoList ids = QDir(it->canonicalFilePath()).entryInfoList(QDir::Files);
for (QFileInfoList::const_iterator it2 = ids.begin(); it2 != ids.end(); ++it2)
{
if (it2->baseName().toUInt(0,16) == discID)
{
QFile file(it2->canonicalFilePath());
if (file.open(QIODevice::ReadOnly | QIODevice::Text))
{
Cddb::Album a = QTextStream(&file).readAll();
a.discGenre = genre;
a.discID = discID;
LOG(VB_MEDIA, LOG_INFO, QString("LocalCDDB found %1 in ").
arg(discID,0,16) + genre + " : " +
a.artist + " / " + a.title);
CachePut(a);
res.matches.push_back(Cddb::Match(genre,discID,a.artist,a.title));
}
}
}
}
return res.matches.size() > 0;
}
示例4: luaCoreFile
luabind::object LuaEngine::loadClassAPI(const QString &path)
{
if(loadedFiles.contains(path))
{
return loadedFiles[path];
}
QFile luaCoreFile(path);
if(!luaCoreFile.open(QIODevice::ReadOnly)){
qWarning() << "Failed to load up \"" << path << "\"! Wrong path or insufficient access?";
shutdown();
return luabind::object();
}
//Now read our code.
QString luaCoreCode = QTextStream(&luaCoreFile).readAll();
//Now load our code by lua and check for common compile errors
int errorCode = luautil_loadclass(L, luaCoreCode.toLocal8Bit().data(), luaCoreCode.length(), m_coreFile.section('/', -1).section('\\', -1).toLocal8Bit().data());
//If we get an error, then handle it
if(errorCode){
qWarning() << "Got lua error, reporting...";
m_errorReporterFunc(QString(lua_tostring(L, -1)), QString(""));
m_lateShutdown = true;
return luabind::object();
}
luabind::object tReturn(luabind::from_stack(L, -1));
if(luabind::type(tReturn) != LUA_TUSERDATA){
qWarning() << "Invalid return type of loading class";
return luabind::object();
}
loadedFiles[path]=tReturn;
return tReturn;
}
示例5: switch
void UI::actionMedium() {
QString command;
// reset the current selection
switch(agc) {
case AGC_LONG:
widget.actionLong->setChecked(FALSE);
break;
case AGC_SLOW:
widget.actionSlow->setChecked(FALSE);
break;
case AGC_MEDIUM:
widget.actionMedium->setChecked(FALSE);
break;
case AGC_FAST:
widget.actionFast->setChecked(FALSE);
break;
}
agc=AGC_MEDIUM;
command.clear(); QTextStream(&command) << "SetAGC " << agc;
connection.sendCommand(command);
}
示例6: QTextStream
void Pt_MSlider::cleanup()
{
// save a shot (for debugging)
#define SCREENSHOT
#ifdef SCREENSHOT
QString kuva;
QTextStream(&kuva)
<< "view_"
<< ".png";
if (!written.contains(kuva)) {
this->pixmap->save(kuva, "png", -1);
this->written.append(kuva);
}
#endif
delete this->m_subject;
this->m_subject = 0;
delete this->painter;
this->painter = 0;
delete this->pixmap;
this->pixmap = 0;
}
示例7: QGraphicsScene
PixelScene::PixelScene(QObject *parent) :
QGraphicsScene(parent)
{
for(int i = 0; i < windowYNumber*windowXNumber*windowHeight*windowWidth; i++)
pixels.append(new Pixel());
for(int i = 0; i < windowYNumber; i++)
{
for(int j = 0; j < windowXNumber; j++)
{
Window* w = new Window();
for(int k = 0; k < windowHeight; k++)
{
for(int l = 0; l < windowWidth; l++)
{
int x1 = j*windowWidth*pixelSize + j*gapWidth + l*pixelSize;
int x2 = j*windowWidth*pixelSize + j*gapWidth + (l+1)*pixelSize;
int y1 = i*windowHeight*pixelSize + i*gapHeight + k*pixelSize;
int y2 = i*windowHeight*pixelSize + i*gapHeight + (k+1)*pixelSize;
int index = i*windowWidth*windowHeight*windowXNumber + j*windowWidth + k*windowWidth*windowXNumber + l;
pixels[index]->rect.adjust(x1,y1,x2,y2);
pixels[index]->window = w;
pixels[index]->index = index;
w->indexes.append(index);
addItem(pixels[index]);
}
}
windows.append(w);
}
}
onlypixelswidth = pixelSize * windowWidth * windowXNumber;
onlypixelsheight = pixelSize * windowHeight * windowYNumber;
width = onlypixelswidth + gapWidth * (windowXNumber-1);
height = onlypixelsheight + gapHeight * (windowYNumber-1);
QTextStream(stdout) << "Onlypixels:" << endl;
QTextStream(stdout) << onlypixelswidth << endl;
QTextStream(stdout) << onlypixelsheight << endl;
QTextStream(stdout) << "Whole image:" << endl;
QTextStream(stdout) << width << endl;
QTextStream(stdout) << height << endl;
}
示例8: qDebug
bool Database::addAlbum(Album *newAlbum)
{
int new_id;
QString text;
// obter indice a adicionar
QSqlQuery last_id;
last_id.prepare("select ID_Album from Album order by ID_Album DESC Limit 1;");
if(last_id.exec())
{
last_id.next();
new_id = last_id.value(0).toInt();
qDebug() << "Ultimo ID=" << new_id;
new_id++; // ID do proximo elemento a adicionar
newAlbum->setIdBD(new_id);
}else{
return false;
}
// Adicionar Info à DB
QSqlQuery add_album;
text = "";
QTextStream(&text) << "insert into Album (Nome,Ano,Genero,Diretoria,Descricao) values ('";
QTextStream(&text) << newAlbum->getNome() << "','";
QTextStream(&text) << newAlbum->getAno() << "','";
QTextStream(&text) << newAlbum->getGenero() << "','";
QTextStream(&text) << newAlbum->getDiretoria() << "','";
QTextStream(&text) << newAlbum->getDescricao() << "') ;";
add_album.prepare(text);
if(!add_album.exec())
{
qDebug() << "Album Nao Adicionado";
return false;
}
return true;
}
示例9: doMagicIn
void doMagicIn(QString path, QString q, QString OPath)
{
QRegExp isMask = QRegExp("*m.gif");
isMask.setPatternSyntax(QRegExp::Wildcard);
QRegExp isBackupDir = QRegExp("*/_backup/");
isBackupDir.setPatternSyntax(QRegExp::Wildcard);
if(isBackupDir.exactMatch(path))
return; //Skip backup directories
if(isMask.exactMatch(q))
return;
QImage target;
QString imgFileM;
QStringList tmp = q.split(".", QString::SkipEmptyParts);
if(tmp.size()==2)
imgFileM = tmp[0] + "m." + tmp[1];
else
return;
//skip unexists pairs
if(!QFile(path+q).exists())
return;
if(!QFile(path+imgFileM).exists())
{
QString saveTo;
QImage image = loadQImage(path+q);
if(image.isNull()) return;
QTextStream(stdout) << QString(path+q+"\n").toUtf8().data();
saveTo = QString(OPath+(tmp[0].toLower())+".gif");
//overwrite source image (convert BMP to GIF)
if(toGif( image, saveTo ) ) //Write gif
{
QTextStream(stdout) <<"GIF-1 only\n";
}
else
{
QTextStream(stdout) <<"BMP-1 only\n";
image.save(saveTo, "BMP"); //If failed, write BMP
}
return;
}
if(!noBackUp)
{
//create backup dir
QDir backup(path+"_backup/");
if(!backup.exists())
{
QTextStream(stdout) << QString("Create backup with path %1\n").arg(path+"_backup");
if(!backup.mkdir("."))
QTextStream(stderr) << QString("WARNING! Can't create backup directory %1\n").arg(path+"_backup");
}
//create Back UP of source images
if(!QFile(path+"_backup/"+q).exists())
QFile::copy(path+q, path+"_backup/"+q);
if(!QFile(path+"_backup/"+imgFileM).exists())
QFile::copy(path+imgFileM, path+"_backup/"+imgFileM);
}
QImage image = loadQImage(path+q);
QImage mask = loadQImage(path+imgFileM);
if(mask.isNull()) //Skip null masks
return;
target = setAlphaMask(image, mask);
if(!target.isNull())
{
//Save before fix
//target.save(OPath+tmp[0]+"_before.png");
//mask.save(OPath+tmp[0]+"_mask_before.png");
QTextStream(stdout) << QString(path+q+"\n").toUtf8().data();
//fix
if(image.size()!= mask.size())
mask = mask.copy(0,0, image.width(), image.height());
mask = target.alphaChannel();
mask.invertPixels();
//Save after fix
//target.save(OPath+tmp[0]+"_after.bmp", "BMP");
QString saveTo;
saveTo = QString(OPath+(tmp[0].toLower())+".gif");
//overwrite source image (convert BMP to GIF)
if(toGif(image, saveTo ) ) //Write gif
{
//.........这里部分代码省略.........
示例10: dataFile
//.........这里部分代码省略.........
m_nLoadingTrack=0;
for( int i=0,n=tclist.count(); i<n; ++i )
{
QDomNode nd=tclist.at(i).firstChild();
while(!nd.isNull())
{
if( nd.isElement() && nd.nodeName() == "track" )
{
++m_nLoadingTrack;
if( nd.toElement().attribute("type").toInt() == Track::BBTrack )
{
n += nd.toElement().elementsByTagName("bbtrack").at(0)
.toElement().firstChildElement().childNodes().count();
}
nd=nd.nextSibling();
}
}
}
while( !node.isNull() )
{
if( node.isElement() )
{
if( node.nodeName() == "trackcontainer" )
{
( (JournallingObject *)( this ) )->restoreState( node.toElement() );
}
else if( node.nodeName() == "controllers" )
{
restoreControllerStates( node.toElement() );
}
else if( gui )
{
if( node.nodeName() == gui->getControllerRackView()->nodeName() )
{
gui->getControllerRackView()->restoreState( node.toElement() );
}
else if( node.nodeName() == gui->pianoRoll()->nodeName() )
{
gui->pianoRoll()->restoreState( node.toElement() );
}
else if( node.nodeName() == gui->automationEditor()->m_editor->nodeName() )
{
gui->automationEditor()->m_editor->restoreState( node.toElement() );
}
else if( node.nodeName() == gui->getProjectNotes()->nodeName() )
{
gui->getProjectNotes()->SerializingObject::restoreState( node.toElement() );
}
else if( node.nodeName() == m_playPos[Mode_PlaySong].m_timeLine->nodeName() )
{
m_playPos[Mode_PlaySong].m_timeLine->restoreState( node.toElement() );
}
}
}
node = node.nextSibling();
}
// quirk for fixing projects with broken positions of TCOs inside
// BB-tracks
Engine::getBBTrackContainer()->fixIncorrectPositions();
// Connect controller links to their controllers
// now that everything is loaded
ControllerConnection::finalizeConnections();
// resolve all IDs so that autoModels are automated
AutomationPattern::resolveAllIDs();
Engine::mixer()->doneChangeInModel();
ConfigManager::inst()->addRecentlyOpenedProject( fileName );
Engine::projectJournal()->setJournalling( true );
emit projectLoaded();
if ( hasErrors())
{
if ( gui )
{
QMessageBox::warning( NULL, tr("LMMS Error report"), errorSummary(),
QMessageBox::Ok );
}
else
{
QTextStream(stderr) << Engine::getSong()->errorSummary() << endl;
}
}
m_loadingProject = false;
m_modified = false;
m_loadOnLaunch = false;
if( gui && gui->mainWindow() )
{
gui->mainWindow()->resetWindowTitle();
}
}
示例11: toGif
bool toGif(QImage& img, QString& path)
{
int errcode;
if(QFile(path).exists()) // Remove old file
QFile::remove(path);
GifFileType* t = EGifOpenFileName(path.toLocal8Bit().data(),true, &errcode);
if(!t){
EGifCloseFile(t, &errcode);
QTextStream(stdout) << "Can't open\n";
return false;
}
EGifSetGifVersion(t, true);
GifColorType* colorArr = new GifColorType[256];
ColorMapObject* cmo = GifMakeMapObject(256, colorArr);
bool unfinished = false;
QImage tarQImg(img.width(), img.height(), QImage::Format_Indexed8);
QVector<QRgb> table;
for(int y = 0; y < img.height(); y++){
for(int x = 0; x < img.width(); x++){
if(table.size() >= 256){
unfinished = true;
break;
}
QRgb pix;
if(!table.contains(pix = img.pixel(x,y))){
table.push_back(pix);
tarQImg.setColor(tarQImg.colorCount(), pix);
}
tarQImg.setPixel(x,y,table.indexOf(pix));
}
if(table.size() >= 256){
unfinished = true;
break;
}
}
if(unfinished){
EGifCloseFile(t, &errcode);
QTextStream(stdout) << "Unfinished\n";
return false;
}
for(int l = tarQImg.colorCount(); l < 256; l++){
tarQImg.setColor(l,0);
}
if(tarQImg.colorTable().size() != 256){
EGifCloseFile(t, &errcode);
QTextStream(stdout) << "A lot of colors\n";
return false;
}
QVector<QRgb> clTab = tarQImg.colorTable();
for(int i = 0; i < 255; i++){
QRgb rgb = clTab[i];
colorArr[i].Red = qRed(rgb);
colorArr[i].Green = qGreen(rgb);
colorArr[i].Blue = qBlue(rgb);
}
cmo->Colors = colorArr;
errcode = EGifPutScreenDesc(t, img.width(), img.height(), 256, 0, cmo);
if(errcode != GIF_OK){
EGifCloseFile(t, &errcode);
QTextStream(stdout) << "EGifPutScreenDesc error 1\n";
return false;
}
errcode = EGifPutImageDesc(t, 0, 0, img.width(), img.height(), false, 0);
if(errcode != GIF_OK){
EGifCloseFile(t, &errcode);
QTextStream(stdout) << "EGifPutImageDesc error 2\n";
return false;
}
//gen byte array
GifByteType* byteArr = tarQImg.bits();
for(int h = 0; h < tarQImg.height(); h++){
errcode = EGifPutLine(t, byteArr, tarQImg.width());
if(errcode != GIF_OK){
EGifCloseFile(t, &errcode);
QTextStream(stdout) << "EGifPutLine error 3\n";
return false;
}
byteArr += tarQImg.width();
byteArr += ((tarQImg.width() % 4)!=0 ? 4 - (tarQImg.width() % 4) : 0);
}
if(errcode != GIF_OK){
QTextStream(stdout) << "GIF error 4\n";
return false;
//.........这里部分代码省略.........
示例12: ReplaceIconResource
//.........这里部分代码省略.........
lpInitGrpIconDir->idEntries[i].nID=(WORD)*test1;
test1=test1+sizeof(WORD);
}
// memcpy( lpInitGrpIconDir->idEntries, test, cbRes-3*sizeof(WORD) );
UnlockResource((HGLOBAL)test1);
LPMEMICONDIR lpGrpIconDir=new MEMICONDIR;
lpGrpIconDir->idReserved=pIconDir->idReserved;
lpGrpIconDir->idType=pIconDir->idType;
lpGrpIconDir->idCount=pIconDir->idCount;
cbRes=3*sizeof(WORD)+lpGrpIconDir->idCount*sizeof(MEMICONDIRENTRY);
test=new BYTE[cbRes];
temp=test;
CopyMemory(test,&lpGrpIconDir->idReserved,sizeof(WORD));
test=test+sizeof(WORD);
CopyMemory(test,&lpGrpIconDir->idType,sizeof(WORD));
test=test+sizeof(WORD);
CopyMemory(test,&lpGrpIconDir->idCount,sizeof(WORD));
test=test+sizeof(WORD);
lpGrpIconDir->idEntries=new MEMICONDIRENTRY[lpGrpIconDir->idCount];
for(i=0;i<lpGrpIconDir->idCount;i++)
{
lpGrpIconDir->idEntries[i].bWidth=pIconDir->idEntries[i].bWidth;
CopyMemory(test,&lpGrpIconDir->idEntries[i].bWidth,sizeof(BYTE));
test=test+sizeof(BYTE);
lpGrpIconDir->idEntries[i].bHeight=pIconDir->idEntries[i].bHeight;
CopyMemory(test,&lpGrpIconDir->idEntries[i].bHeight,sizeof(BYTE));
test=test+sizeof(BYTE);
lpGrpIconDir->idEntries[i].bColorCount=pIconDir->idEntries[i].bColorCount;
CopyMemory(test,&lpGrpIconDir->idEntries[i].bColorCount,sizeof(BYTE));
test=test+sizeof(BYTE);
lpGrpIconDir->idEntries[i].bReserved=pIconDir->idEntries[i].bReserved;
CopyMemory(test,&lpGrpIconDir->idEntries[i].bReserved,sizeof(BYTE));
test=test+sizeof(BYTE);
lpGrpIconDir->idEntries[i].wPlanes=pIconDir->idEntries[i].wPlanes;
CopyMemory(test,&lpGrpIconDir->idEntries[i].wPlanes,sizeof(WORD));
test=test+sizeof(WORD);
lpGrpIconDir->idEntries[i].wBitCount=pIconDir->idEntries[i].wBitCount;
CopyMemory(test,&lpGrpIconDir->idEntries[i].wBitCount,sizeof(WORD));
test=test+sizeof(WORD);
lpGrpIconDir->idEntries[i].dwBytesInRes=pIconDir->idEntries[i].dwBytesInRes;
CopyMemory(test,&lpGrpIconDir->idEntries[i].dwBytesInRes,sizeof(DWORD));
test=test+sizeof(DWORD);
if(i<lpInitGrpIconDir->idCount) //nu am depasit numarul initial de RT_ICON
lpGrpIconDir->idEntries[i].nID=lpInitGrpIconDir->idEntries[i].nID;
else
{
nMaxID++;
lpGrpIconDir->idEntries[i].nID=i+1; //adaug noile ICO la sfarsitul RT_ICON-urilor
}
CopyMemory(test,&lpGrpIconDir->idEntries[i].nID,sizeof(WORD));
test=test+sizeof(WORD);
}
//offsetul de unde incep structurile ICONIMAGE
cbInitOffset=3*sizeof(WORD)+lpGrpIconDir->idCount*sizeof(ICONDIRENTRY);
cbOffset=cbInitOffset; //cbOffset=118
FreeLibrary(hUi);
HANDLE hUpdate;
// _chmod((char*)lpFileName,_S_IWRITE);
hUpdate = BeginUpdateResourceA(lpFileName, FALSE); //false sa nu stearga resursele neupdated
if(hUpdate==NULL)
{
QTextStream(stdout, QIODevice::WriteOnly) << "erreur BeginUpdateResource " << lpFileName << "\n";
res=false;
}
//aici e cu lang NEUTRAL
//res=UpdateResource(hUpdate,RT_GROUP_ICON,MAKEINTRESOURCE(6000),langId,lpGrpIconDir,cbRes);
res=UpdateResource(hUpdate,RT_GROUP_ICON,lpName,langId,temp,cbRes);
if(res==false)
QTextStream(stdout, QIODevice::WriteOnly) << "erreur UpdateResource RT_GROUP_ICON " << lpFileName << "\n";
for(i=0;i<lpGrpIconDir->idCount;i++)
{
res=UpdateResource(hUpdate,RT_ICON,MAKEINTRESOURCE(lpGrpIconDir->idEntries[i].nID),langId,pIconImage[i],lpGrpIconDir->idEntries[i].dwBytesInRes);
if(res==false)
QTextStream(stdout, QIODevice::WriteOnly) << "erreur UpdateResource RT_ICON " << lpFileName << "\n";
}
for(i=lpGrpIconDir->idCount;i<lpInitGrpIconDir->idCount;++i)
{
res=UpdateResource(hUpdate,RT_ICON,MAKEINTRESOURCE(lpInitGrpIconDir->idEntries[i].nID),langId,NULL,0);
if(res==false)
QTextStream(stdout, QIODevice::WriteOnly) << "erreur to delete resource " << lpFileName << "\n";
}
if(!EndUpdateResource(hUpdate,FALSE)) //false ->resource updates will take effect.
QTextStream(stdout, QIODevice::WriteOnly) << "eroare EndUpdateResource" << lpFileName << "\n";
// FreeResource(hGlobal);
delete[] lpGrpIconDir->idEntries;
delete lpGrpIconDir;
delete[] temp;
return res;
}
示例13: QTextStream
void GroundStation::print_info_packet(Protocol::InfoPacket &packet){
QTextStream(stdout) << "Type: InfoPacket" << endl;
QTextStream(stdout) << "Points Storable: " << packet.GetStorable() << endl;
QTextStream(stdout) << "Battery State: " << packet.GetBattery() << endl;
QTextStream(stdout) << "Other : " << QString::fromStdString(packet.GetOther()) << endl;
}
示例14: QTextStream
void Database::moveAchievement(int level, int id){
QString cmd;
QTextStream(&cmd)<<"delete from achievement where level = "<<level*100+id;
query.exec(cmd);
}
示例15: QTextStream
void HuboInitWidget::handleJointStateButton(int id)
{
QString lineStatus;
QString toolStatus;
QTextStream(&lineStatus) << QString::fromLocal8Bit(h_param.joint[id].name) << " ";
QTextStream(&lineStatus) << QString::number(h_state.joint[id].pos) << " -- ";
QTextStream(&toolStatus) << QString::fromLocal8Bit(h_param.joint[id].name) << ":";
if(h_state.status[id].homeFlag != 6)
{
QTextStream(&lineStatus) << "H:" << h_state.status[id].homeFlag << " ";
QTextStream(&toolStatus) << "\nNot Homed";
}
else
QTextStream(&toolStatus) << "\nHomed";
if(h_state.joint[id].zeroed==1)
{
QTextStream(&lineStatus) << "Z ";
QTextStream(&toolStatus) << "\nZeroed";
}
if(h_state.status[id].jam == 1)
{
QTextStream(&lineStatus) << "JAM ";
QTextStream(&toolStatus) << "\nMechanical Jam";
}
if(h_state.status[id].pwmSaturated == 1)
{
QTextStream(&lineStatus) << "PWM ";
QTextStream(&toolStatus) << "\nPWM Saturated";
}
if(h_state.status[id].bigError == 1)
{
QTextStream(&lineStatus) << "BigE ";
QTextStream(&toolStatus) << "\nBig Error (Needs to be Reset)";
}
if(h_state.status[id].encError == 1)
{
QTextStream(&lineStatus) << "ENC ";
QTextStream(&toolStatus) << "\nEncoder Error";
}
if(h_state.status[id].driverFault == 1)
{
QTextStream(&lineStatus) << "DF ";
QTextStream(&toolStatus) << "\nDrive Fault";
}
if(h_state.status[id].posMinError == 1)
{
QTextStream(&lineStatus) << "POS< ";
QTextStream(&toolStatus) << "\nMinimum Position Error";
}
if(h_state.status[id].posMaxError == 1)
{
QTextStream(&lineStatus) << "POS> ";
QTextStream(&toolStatus) << "\nMaximum Position Error";
}
if(h_state.status[id].velError == 1)
{
QTextStream(&lineStatus) << "VEL ";
QTextStream(&toolStatus) << "\nVelocity Error";
}
if(h_state.status[id].accError == 1)
{
QTextStream(&lineStatus) << "ACC ";
QTextStream(&toolStatus) << "\nAcceleration Error";
}
if(h_state.status[id].tempError == 1)
{
QTextStream(&lineStatus) << "TMP ";
QTextStream(&toolStatus) << "\nTemperature Error";
}
stateFlags->setText(lineStatus);
stateFlags->setToolTip(toolStatus);
}