Subversion Repositories Projects

Rev

Rev 361 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 361 Rev 395
Line 24... Line 24...
24
{
24
{
25
    setupUi(this);
25
    setupUi(this);
Line 26... Line 26...
26
 
26
 
27
    cb_Maps->removeItem(5);
27
    cb_Maps->removeItem(5);
28
    cb_Maps->removeItem(4);
28
    cb_Maps->removeItem(4);
29
    cb_Maps->removeItem(3);
29
//    cb_Maps->removeItem(3);
Line 30... Line 30...
30
    cb_Maps->removeItem(2);
30
//    cb_Maps->removeItem(2);
31
 
31
 
32
    pb_Add->setEnabled(false);
32
    pb_Add->setEnabled(false);
Line 44... Line 44...
44
    connect(sl_Zoom,   SIGNAL(valueChanged(int)), this, SLOT(slot_Zoom(int)));
44
    connect(sl_Zoom,   SIGNAL(valueChanged(int)), this, SLOT(slot_Zoom(int)));
45
    connect(pb_Add,    SIGNAL(clicked()), this, SLOT(slot_AddWayPoint()));
45
    connect(pb_Add,    SIGNAL(clicked()), this, SLOT(slot_AddWayPoint()));
46
    connect(pb_Delete, SIGNAL(clicked()), this, SLOT(slot_DeleteWayPoints()));
46
    connect(pb_Delete, SIGNAL(clicked()), this, SLOT(slot_DeleteWayPoints()));
47
    connect(pb_Goto,   SIGNAL(clicked()), this, SLOT(slot_GotoTarget()));
47
    connect(pb_Goto,   SIGNAL(clicked()), this, SLOT(slot_GotoTarget()));
48
    connect(pb_SendWaypoints, SIGNAL(clicked()), this, SLOT(slot_SendWayPoints()));
48
    connect(pb_SendWaypoints, SIGNAL(clicked()), this, SLOT(slot_SendWayPoints()));
-
 
49
    connect(pb_LoadPic,   SIGNAL(clicked()), this, SLOT(slot_LoadMapPic()));
Line 49... Line 50...
49
 
50
 
50
    connect(pb_Load,   SIGNAL(clicked()), this, SLOT(slot_LoadWayPoints()));
51
    connect(pb_Load,   SIGNAL(clicked()), this, SLOT(slot_LoadWayPoints()));
Line 51... Line 52...
51
    connect(pb_Save,   SIGNAL(clicked()), this, SLOT(slot_SaveWayPoints()));
52
    connect(pb_Save,   SIGNAL(clicked()), this, SLOT(slot_SaveWayPoints()));
Line 420... Line 421...
420
            o_Click->addGeometry(ClickPoint);
421
            o_Click->addGeometry(ClickPoint);
421
        }
422
        }
422
    }
423
    }
Line 423... Line 424...
423
 
424
 
-
 
425
    o_Map->updateRequestNew();
424
    o_Map->updateRequestNew();
426
 
425
//    qDebug(QString("%1").arg(Coord.x()).toLatin1().data());
427
//    qDebug(QString("%1").arg(Coord.x()).toLatin1().data());
426
//    qDebug(QString("%1").arg(Coord.y()).toLatin1().data());
428
//    qDebug(QString("%1").arg(Coord.y()).toLatin1().data());
Line -... Line 429...
-
 
429
}
-
 
430
 
-
 
431
 
-
 
432
void dlg_Map::slot_LoadMapPic()
-
 
433
{
-
 
434
    QString Filename = QFileDialog::getOpenFileName(this, "Bild als Karte",  o_Settings->DIR.Logging, "Bilddatei(*.jpg *.png *.gif);;Alle Dateien (*)");
-
 
435
 
-
 
436
    if (!Filename.isEmpty())
-
 
437
    {
-
 
438
        QFile f_Points(Filename + ".pos");
-
 
439
 
-
 
440
        if (f_Points.exists())
-
 
441
        {
-
 
442
            f_Points.open(QIODevice::ReadOnly | QIODevice::Text);
-
 
443
 
-
 
444
            QString s_Points;
-
 
445
 
-
 
446
            while (!f_Points.atEnd())
-
 
447
            {
-
 
448
                s_Points.append(f_Points.readLine());
-
 
449
            }
-
 
450
 
-
 
451
            f_Points.close();
-
 
452
 
-
 
453
            QStringList s_Pos = s_Points.split(",");
-
 
454
 
-
 
455
            FixedImageOverlay* fip = new FixedImageOverlay(s_Pos[0].toDouble(), s_Pos[1].toDouble(), s_Pos[2].toDouble(), s_Pos[3].toDouble(), Filename);
-
 
456
 
-
 
457
            o_Layer->addGeometry(fip);
-
 
458
            o_Map->updateRequestNew();
-
 
459
        }
-
 
460
    }
427
}
461
}
428
 
462
 
429
// auf Veränderung der Fenstergröße reagieren
463
// auf Veränderung der Fenstergröße reagieren
430
void dlg_Map::resizeEvent ( QResizeEvent * event )
464
void dlg_Map::resizeEvent ( QResizeEvent * event )
431
{
465
{