Exemplo n.º 1
0
Dialog::Dialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Dialog)
{
    ui->setupUi(this);
    showSegmentDirectoryList();
    showFileTemplateList();

}
Exemplo n.º 2
0
void Dialog::deleteSegmentDirectory()
{
    QString sel;

    QListWidgetItem *itm = ui->lwSegmentDirectories->currentItem();
    opts.deleteSegmentDirectory( itm->text());
    showSegmentDirectoryList();

}
Exemplo n.º 3
0
void FormEphem::on_btnAddsegmentdir_clicked()
{
    QString directory = QFileDialog::getExistingDirectory(this,
                               tr("Find Files"), QDir::currentPath());

    if (!directory.isEmpty()) {
        qDebug() << QString("directory = %1").arg(directory);
        opts.segmentdirectorylist.append(directory);
        showSegmentDirectoryList();
    }

}
Exemplo n.º 4
0
void Dialog::addSegmentDirectory()
{

    QString directory = QFileDialog::getExistingDirectory(this,
                               tr("Select directory"), QDir::currentPath());

    if (!directory.isEmpty())
    {
        qDebug() << QString("directory = %1").arg(directory);
        opts.segmentdirectorylist.append(directory);
        showSegmentDirectoryList();
    }
}
Exemplo n.º 5
0
void FormEphem::on_btnDelsegmentdir_clicked()
{
    QString sel;

    QTreeWidgetItemIterator it1( ui->segmentdirectorywidget );

    while (*it1)
    {

        if ( (*it1)->isSelected() )
        {
            sel = (*it1)->text( 0 );
            break;

        }
        ++it1;
    }

    qDebug() << QString("delete segment directory : %1").arg(sel);
    opts.deleteSegmentDirectory( sel);
    showSegmentDirectoryList();

}
Exemplo n.º 6
0
FormEphem::FormEphem(QWidget *parent, SatelliteList *satlist, AVHRRSatellite *seglist):
    QWidget(parent),
    ui(new Ui::FormEphem)
{
    ui->setupUi(this);
    ui->splitter->restoreState( opts.ephemsplittersizes );

    sats = satlist;
    segs = seglist;

    resetProgressBar(1, "    ");

    ui->realminutesslider->setFocusPolicy(Qt::StrongFocus);
    ui->realminutesslider->setTickPosition(QSlider::TicksBothSides);
    ui->realminutesslider->setTickInterval(3);
    ui->realminutesslider->setSingleStep(1);
    ui->realminutesslider->setMinimum(1);
    ui->realminutesslider->setMaximum(90);
    ui->realminutesslider->setValue(opts.realminutesshown);

    ui->realminutesspinbox->setMinimum(1);
    ui->realminutesspinbox->setMaximum(90);
    ui->realminutesspinbox->setValue(opts.realminutesshown);

    ui->sliNbrOfHours->setFocusPolicy(Qt::StrongFocus);
    ui->sliNbrOfHours->setTickPosition(QSlider::TicksBothSides);
    ui->sliNbrOfHours->setTickInterval(1);
    ui->sliNbrOfHours->setSingleStep(1);
    ui->sliNbrOfHours->setMinimum(0);
    ui->sliNbrOfHours->setMaximum(24);
    ui->sliNbrOfHours->setValue(opts.nbrofhours);

    ui->spbNbrOfHours->setMinimum(0);
    ui->spbNbrOfHours->setMaximum(24);
    ui->spbNbrOfHours->setValue(opts.nbrofhours);

    ui->segmentsslider->setFocusPolicy(Qt::StrongFocus);
    ui->segmentsslider->setTickPosition(QSlider::TicksBothSides);
    ui->segmentsslider->setTickInterval(3);
    ui->segmentsslider->setSingleStep(1);
    ui->segmentsslider->setMinimum(1);
    ui->segmentsslider->setMaximum(200);
    ui->segmentsslider->setValue(opts.nbrofvisiblesegments);


    ui->segmentsspinbox->setMinimum(1);
    ui->segmentsspinbox->setMaximum(200);
    ui->segmentsspinbox->setValue(opts.nbrofvisiblesegments);

    ui->calendar->setMinimumDate(QDate(1900, 1, 1));
    ui->calendar->setMaximumDate(QDate(3000, 1, 1));
    ui->calendar->setGridVisible(true);

    ui->tletreewidget->setColumnCount(1);
    ui->tletreewidget->setHeaderLabels( QStringList() << tr("TLE Files") );

    ui->satlisttreewidget->setColumnCount(10);
    ui->satlisttreewidget->setHeaderLabels( QStringList() << tr("name") << tr("Catnbr" ) << tr("Days Old")
                                  << tr("longitude" ) << tr("latitude" ) << tr("altitude[km]" )
                                  << tr( "azimuth" ) << tr( "elevation" ) << tr( "range[km]" )
                                  << tr( "rate[km/s]" ));
    ui->satlisttreewidget->setColumnWidth( 0, 100 );

    ui->segmentoverview->setColumnCount(3);
    ui->segmentoverview->setHeaderLabels( QStringList() << tr("Directory") << tr("Segment type") << tr("Nbr.in dir."));
    ui->segmentoverview->setColumnWidth( 0, 100 );

    ui->segmentdirectorywidget->clear();
    ui->segmentdirectorywidget->setEnabled(true);
    ui->segmentdirectorywidget->setColumnCount(1);
    ui->segmentdirectorywidget->setRootIsDecorated(false);
    ui->segmentdirectorywidget->setHeaderLabels(QStringList() << tr("Segment directories"));
    ui->segmentdirectorywidget->header()->setStretchLastSection(true);
    ui->segmentdirectorywidget->setMinimumHeight(100);

    ui->selectedsegmentwidget->clear();
    ui->selectedsegmentwidget->setEnabled(true);
    ui->selectedsegmentwidget->setColumnCount(2);
    ui->selectedsegmentwidget->setRootIsDecorated(false);
    ui->selectedsegmentwidget->setHeaderLabels(QStringList() << tr("Selected Segments") << tr("#Lines"));
    ui->selectedsegmentwidget->header()->setStretchLastSection(true);
    ui->selectedsegmentwidget->setColumnWidth(0, 300);

/*    QDate now =QDate::currentDate();
    ui->calendar->setSelectedDate(now);

    QTextCharFormat format;
    format.setBackground(QBrush(Qt::blue, Qt::SolidPattern));
    ui->calendar->setDateTextFormat(ui->calendar->selectedDate(),format);
*/
    udpSocket = new QUdpSocket(this);
    udpSocket->bind(45454, QUdpSocket::ShareAddress);

    connect(udpSocket, SIGNAL(readyRead()), this, SLOT(processPendingDatagrams()));

    connect(ui->satlisttreewidget,SIGNAL(itemClicked(QTreeWidgetItem*, int)), this,SLOT(itemSelectedtreewidget(QTreeWidgetItem*)));
    connect(ui->segmentdirectorywidget,SIGNAL(itemClicked(QTreeWidgetItem*, int)), this, SLOT(itemSelectedsegmentdirectory(QTreeWidgetItem*)));

    connect( segs, SIGNAL(signalProgress(int)), this, SLOT(setProgressBar(int)));
    connect( segs, SIGNAL(signalResetProgressbar(int, QString)), this, SLOT(resetProgressBar(int,QString)));

    connect(ui->realminutesslider, SIGNAL(sliderReleased()), this, SLOT(setRealMinutesShownValue()));
    connect(ui->realminutesspinbox, SIGNAL(valueChanged(int)), this,SLOT(setRealMinutesShownValue()));
    //connect(ui->calendar, SIGNAL(selectionChanged()), this, SLOT(getSegmentsForCalendar()));
    //connect(ui->btnReload, SIGNAL(clicked()), this, SLOT(getSegmentsForCalendar()));
    connect(ui->sliNbrOfHours, SIGNAL(sliderReleased()), this, SLOT(setNbrOfHours()));
    connect(ui->spbNbrOfHours, SIGNAL(valueChanged(int)), this,SLOT(setNbrOfHours()));
    connect(ui->segmentsslider, SIGNAL(sliderReleased()), this, SLOT(setSegmentsShownValue()));
    connect(ui->segmentsspinbox, SIGNAL(valueChanged(int)), this,SLOT(setSegmentsShownValue()));

    showAvailSat();
    showSegmentDirectoryList();

}