예제 #1
0
DynamicArgSettingGUI::DynamicArgSettingGUI(ArgInfoGUI *argSettingGUI, const QString& name, QObject *parent) :
    QObject(parent),
    m_argSettingGUI(argSettingGUI),
    m_name(name)
{
    connect(m_argSettingGUI, SIGNAL(valueChanged()), this, SLOT(processValueChanged()));
}
void processsimthread::run()
{
    QMutex mutex;
    int counter = 0;
    this->Stop = false;
    while(!this->Stop)
    {
       mutex.lock();
       counter++;
       if (counter == 100) {
           counter = 0;
       }
       emit processValueChanged(counter);
       mutex.unlock();
       QThread::msleep(100);

    }
}
TractionLever_Controller::TractionLever_Controller(SubteStatus * subte, TractionLever * tractionLever, TractionHardware *th)
{
    m_subte = subte;
    m_tractionLever = tractionLever;
    m_tractionHardware = th;

    m_checkJ = new QTimer();
    m_checkJ->setInterval(50);

    m_checkB = new QTimer();
    m_checkB->setInterval(250);

    connect(m_checkJ,SIGNAL(timeout()),m_tractionHardware,SLOT(processValueChanged()));
    connect(m_checkB,SIGNAL(timeout()),m_tractionHardware,SLOT(processRanaChanged()));
    connect(m_checkB,SIGNAL(timeout()),m_tractionHardware,SLOT(processSetaChanged()));
    connect(m_checkB,SIGNAL(timeout()),m_tractionHardware,SLOT(processBottonChanged()));
    connect(m_tractionHardware,SIGNAL(positionChanged(int)),this,SLOT(processValue(int)));
    connect(m_tractionLever,SIGNAL(positionChanged(int)),this,SLOT(processValue(int)));
}
예제 #4
0
DynamicArgSettingGUI::~DynamicArgSettingGUI()
{
    disconnect(m_argSettingGUI, SIGNAL(valueChanged()), this, SLOT(processValueChanged()));
}