mirror of
http://172.16.0.230/r/SIF/TowerOptoSifAndSpectral.git
synced 2025-10-19 19:49:42 +08:00
添加了位置定标程序 及位置移动相关程序源码
This commit is contained in:
63
othersoft/shuttercali/source_rlx/sensor/logout.cpp
Normal file
63
othersoft/shuttercali/source_rlx/sensor/logout.cpp
Normal file
@ -0,0 +1,63 @@
|
||||
#include "logout.h"
|
||||
#include "QDebug"
|
||||
#include "QTextCodec"
|
||||
QString colorcode = "\033[";
|
||||
int outputlevel = 4;
|
||||
logout::logout(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
logout::~logout()
|
||||
{
|
||||
}
|
||||
|
||||
void logout::out(QString str,int level)
|
||||
{
|
||||
if (level>outputlevel)
|
||||
{
|
||||
return;
|
||||
}
|
||||
QTextCodec *codec = QTextCodec::codecForName("GBK");//<2F><EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
int colorint;
|
||||
switch (level)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
|
||||
qDebug() << "\033[32m";//<2F><>ɫ
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
|
||||
qDebug() << "\033[35m";//<2F><>ɫ
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
|
||||
qDebug() << "\033[31m";//<2F><>ɫ
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
//str=codec->toUnicode(str.toStdString().c_str());
|
||||
qDebug() <<str;
|
||||
qDebug() << "\033[0m";
|
||||
}
|
||||
|
||||
void logout::setoutlevel(int level /*= 4*/)
|
||||
{
|
||||
outputlevel = level;
|
||||
|
||||
}
|
Reference in New Issue
Block a user