JointMotionData::JointMotionData()
 {
     // create our buffer arrays for this joint data, each of size BUFFER_SIZE defined in JointMotionData.h
     position = new Vector3[BUFFER_SIZE];
     velocity = new Vector3[BUFFER_SIZE];
     acceleration = new Vector3[BUFFER_SIZE];
     // set the buffer values and index to 0
     clearAndReset();
 }
Esempio n. 2
0
/// 功能介绍
// 显示历史log的地方
QJDHistoryBrowser::QJDHistoryBrowser(QWidget *parent) :
        QTableWidget(parent)
{
    setContextMenuPolicy(Qt::CustomContextMenu);
    setFocusPolicy(Qt::NoFocus);
    this->setObjectName(QString::fromUtf8("processWidget"));
    this->setMinimumSize(QSize(0, 0));

    this->setFrameShape(QFrame::WinPanel);
    this->setFrameShadow(QFrame::Raised);
    this->setAutoScroll(false);
    this->setEditTriggers(QAbstractItemView::NoEditTriggers);
    this->setAlternatingRowColors(true);
    this->setSelectionMode(QAbstractItemView::SingleSelection);
    this->setSelectionBehavior(QAbstractItemView::SelectRows);
    this->setTextElideMode(Qt::ElideRight);
    this->setShowGrid(true);
    this->setGridStyle(Qt::SolidLine);
    this->setSortingEnabled(false);
    this->setWordWrap(true);
    this->setCornerButtonEnabled(true);

    // --------------------------------------------------------------- //
    _hasLog=false;
    saveSelect=0;

    setRowCount(4);
    setColumnCount(4);

    setLogFile();
    connect(this,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(emitShowLog(QModelIndex)));

    QJDArgu *argu=new QJDArgu;
    QTimer *timer=new QTimer(this);
    connect(timer,SIGNAL(timeout()),this,SLOT(clearAndReset()));
    timer->start(argu->HistoryLogRefreshInterval);   //每隔10秒钟才刷新一次

}