Example #1
0
void MainWindow::onConnected(const QString uri)
{
    ui->actionConnect->setEnabled(false);
    ui->actionDisconnect->setEnabled(true);

    loadSensors();
    ui->statusBar->setStyleSheet("background-color: green");
    m_statusBarLabel->setText("Connected to "+uri);
    m_statusBarLabel->setStyleSheet("color: white");

}
Example #2
0
Explorer::Explorer(QWidget *parent)
    : QMainWindow(parent)
    , m_sensor(0)
    , ignoreItemChanged(false)
{
    ui.setupUi(this);
    // Clear out example data from the .ui file
    ui.sensors->clear();
    clearSensorProperties();
    clearReading();

    // Force types to be registered
    (void)QSensor::sensorTypes();
    // Listen for changes to the registered types
    QSensor *sensor = new QSensor(QByteArray(), this);
    connect(sensor, SIGNAL(availableSensorsChanged()), this, SLOT(loadSensors()));
}
/*public*/ bool RfidSensorManagerXml::load(QDomElement sensors) throw (JmriConfigureXmlException)
{
    // load individual sensors
    return loadSensors(sensors);
}