Exemplo n.º 1
0
Alarms::Alarms( Config cfg, WeatherData *_wd ):
   WeatherSink( cfg, _wd, "Alarms" )

{
   pthread_mutex_init( &notify, NULL );
   pthread_mutex_lock( &notify );
   startMain();
}
Exemplo n.º 2
0
CWOP::CWOP( Config cfg, WeatherData *_wd ):
   WeatherSink( cfg, _wd, "CWOP" )
{
   latitude = DecimalLatitudeToLORAN(cfg.getDouble("latitude"));
   longitude = DecimalLongitudeToLORAN(cfg.getDouble("longitude"));
   snprintf(login, CWOP_PACKET_SIZE, "user %s pass %s ver %s\n\r",
         cfg.getString("cwop_user").c_str(), 
         cfg.getString("cwop_password").c_str(),
         cfg.getString("sw_vers").c_str() );
   pthread_mutex_init( &notify, NULL );
   pthread_mutex_lock( &notify );


   startMain();
}
Exemplo n.º 3
0
StartView::StartView(QWidget *parent, MainWindow* mw) :
    QDialog(parent),
    ui(new Ui::StartView)
{
    ui->setupUi(this);
    ui->helpText->setText("This program is brought to you by Feli, Domi and Tibby\n\nIf you don't have a partner to play with just leave the Partner IP-address field empty.\n\n\nObjective of the game: using your left and right hand (or probably any other body part, your friend, your cat, your potato, your microwave, the bus you ride to get to work etc.) control your car through the horrible roads of Hungary and avoid the potholes to keep your car and your passengers safe.");
    m = mw;
    QList<QHostAddress> list=QNetworkInterface::allAddresses();
    QString str;
    for (int i = 0; i < list.size(); ++i) {
        if (!(list.at(i).toString().contains(":")) && !(list.at(i).toString().contains("169.254"))){
            ui->myIPlist->addItem(list.at(i).toString());
        }
    }
    connect(this, SIGNAL(accepted()), SLOT(startMain()));
}