void GnuPGViewer::setProcess( Kleo::GnuPGProcessBase * process ) { if ( !process ) return; mProcess = process; connect( mProcess, SIGNAL(finished(int,QProcess::ExitStatus)), SLOT(slotProcessExited(int,QProcess::ExitStatus)) ); connect( mProcess, SIGNAL(readyReadStandardOutput()), SLOT(slotStdout()) ); connect( mProcess, SIGNAL(readyReadStandardError()), SLOT(slotStderr()) ); connect( mProcess, SIGNAL(status(Kleo::GnuPGProcessBase*,QString,QStringList)), SLOT(slotStatus(Kleo::GnuPGProcessBase*,QString,QStringList)) ); }
// -------------------------------------------------------------------------------------------- CMapQMAPExport::CMapQMAPExport(const CMapSelectionRaster& mapsel, QWidget * parent) : QDialog(parent) , mapsel(mapsel) , tainted(false) , has_map2jnx(false) , totalNumberOfStates(0) { setupUi(this); connect(toolPath, SIGNAL(clicked()), this, SLOT(slotOutputPath())); connect(pushExport, SIGNAL(clicked()), this, SLOT(slotStart())); connect(pushCancel, SIGNAL(clicked()), this, SLOT(slotCancel())); connect(pushDetails, SIGNAL(clicked()), this, SLOT(slotDetails())); connect(radioQLM, SIGNAL(toggled(bool)), this, SLOT(slotQLMToggled(bool))); connect(radioJNX, SIGNAL(toggled(bool)), this, SLOT(slotBirdsEyeToggled(bool))); connect(radioGCM, SIGNAL(toggled(bool)), this, SLOT(slotGCMToggled(bool))); connect(radioRMAP, SIGNAL(toggled(bool)), this, SLOT(slotRMAPToggled(bool))); connect(radioRMP, SIGNAL(toggled(bool)), this, SLOT(slotRMPToggled(bool))); connect(&cmd, SIGNAL(readyReadStandardError()), this, SLOT(slotStderr())); connect(&cmd, SIGNAL(readyReadStandardOutput()), this, SLOT(slotStdout())); connect(&cmd, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(slotFinished(int,QProcess::ExitStatus))); connect(toolGeoTiffProjWizard, SIGNAL(clicked()), this, SLOT(slotSetupProj())); connect(toolGeoTiffFromMap, SIGNAL(clicked()), this, SLOT(slotSetupProjFromMap())); connect(toolMagellanCopyright, SIGNAL(clicked()), this, SLOT(slotSelectCopyright())); SETTINGS; labelPath->setText(cfg.value("path/export","./").toString()); CMapDB::map_t mapData = CMapDB::self().getMapData(mapsel.mapkey); linePrefix->setText(QString("%1_%2_%3").arg(mapData.description).arg(mapsel.lon1 * RAD_TO_DEG).arg(mapsel.lat1 * RAD_TO_DEG)); linePrefix->setCursorPosition(0); lineDescription->setText(mapData.description); lineDescription->setCursorPosition(0); radioRMAP->show(); radioRMAP->setEnabled(true); comboRmapProjection->addItem("Mercator(WGS 84)", "+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs"); comboRmapProjection->addItem("EPSG:4326, LongLat(WGS 84)", "+init=epsg:4326"); comboRmapProjection->addItem("EPSG:31467, GK3 (DHDN)", "+init=epsg:31467"); comboRmapProjection->addItem("EPSG:31468, GK4 (DHDN)", "+init=epsg:31468"); #ifdef WIN32 path_map2jnx = QCoreApplication::applicationDirPath()+QDir::separator()+"map2jnx.exe"; QFile file_map2jnx(path_map2jnx); has_map2jnx = file_map2jnx.exists(); path_map2gcm = QCoreApplication::applicationDirPath()+QDir::separator()+"map2gcm.exe"; path_cache2gtiff = QCoreApplication::applicationDirPath()+QDir::separator()+"cache2gtiff.exe"; path_map2rmap = QCoreApplication::applicationDirPath()+QDir::separator()+"map2rmap.exe"; path_map2rmp = QCoreApplication::applicationDirPath()+QDir::separator()+"map2rmp.exe"; #else #if defined(Q_OS_MAC) // MacOS X: applications are stored in the bundle folder path_map2gcm = QString("%1/Resources/map2gcm").arg(QCoreApplication::applicationDirPath().replace(QRegExp("MacOS$"), "")); path_map2jnx = QString("%1/Resources/map2jnx").arg(QCoreApplication::applicationDirPath().replace(QRegExp("MacOS$"), "")); path_cache2gtiff = QString("%1/Resources/cache2gtiff").arg(QCoreApplication::applicationDirPath().replace(QRegExp("MacOS$"), "")); path_map2rmap = QString("%1/Resources/map2rmap").arg(QCoreApplication::applicationDirPath().replace(QRegExp("MacOS$"), "")); path_map2rmp = QString("%1/Resources/map2rmp").arg(QCoreApplication::applicationDirPath().replace(QRegExp("MacOS$"), "")); #else path_map2gcm = "map2gcm"; path_map2jnx = MAP2JNX; path_cache2gtiff = "cache2gtiff"; path_map2rmap = "map2rmap"; path_map2rmp = "map2rmp"; #endif QProcess proc1; proc1.start(path_map2jnx, QStringList()); proc1.waitForFinished(); has_map2jnx = proc1.error() == QProcess::UnknownError; #endif groupBirdsEye->hide(); groupJPEG->hide(); groupDevice->hide(); groupRMAP->hide(); groupMagellanRmp->hide(); spinJpegQuality->setValue(cfg.value("map/export/jnx/quality",75).toInt()); comboJpegSubsampling->setCurrentIndex(comboJpegSubsampling->findText(cfg.value("map/export/jnx/subsampling","411").toString())); spinProductId->setValue(cfg.value("map/export/jnx/productid",0).toInt()); lineProductName->setText(cfg.value("map/export/jnx/productname","BirdsEye").toString()); lineCopyright->setText(cfg.value("map/export/jnx/copyright","None").toString()); lineMagellanProvider->setText(cfg.value("map/export/rmp/provider", tr("Please enter a string")).toString()); lineMagellanProduct->setText(cfg.value("map/export/rmp/product", tr("Please enter a string")).toString()); copyright = cfg.value("map/export/rmp/copyright", tr("")).toString(); labelMagellanCopyright->setText(QFileInfo(copyright).fileName()); radioQLM->setChecked(cfg.value("map/export/qlm", true).toBool()); radioGCM->setChecked(cfg.value("map/export/gcm", false).toBool()); radioRMAP->setChecked(cfg.value("map/export/rmap", false).toBool()); radioRMP->setChecked(cfg.value("map/export/rmp", false).toBool()); if (has_map2jnx) { radioJNX->setChecked(cfg.value("map/export/jnx", false).toBool()); } else { radioJNX->hide(); } checkOverview2x->setChecked(cfg.value("map/export/over2x", true).toBool()); checkOverview4x->setChecked(cfg.value("map/export/over4x", true).toBool()); checkOverview8x->setChecked(cfg.value("map/export/over8x", true).toBool()); checkOverview16x->setChecked(cfg.value("map/export/over16x", true).toBool()); lineStreamingLevels->setText(cfg.value("map/export/stream/levels", "1 ").toString()); if(lineStreamingLevels->text().isEmpty()) { lineStreamingLevels->setText("1 "); } lineGeoTiffProjection->setText(cfg.value("map/export/qlm/proj","+proj=longlat +a=6378137.0000 +b=6356752.3142 +towgs84=0,0,0,0,0,0,0,0 +units=m +no_defs").toString()); lineGeoTiffProjection->setCursorPosition(0); checkProjection->setChecked(cfg.value("map/export/qlm/proj_enable").toBool()); progressBar->setMinimum(0); progressBar->setMaximum(100); progressBar->setValue(0); progressBar->resize(300, progressBar->height()); if(cfg.value("map/export/hidedetails", true).toBool()) { textBrowser->hide(); } else { textBrowser->show(); } if(mapsel.subtype == IMapSelection::eGDAL) { labelWarnStream->hide(); groupStreaming->hide(); } else { labelWarnStream->show(); groupStreaming->show(); } QFont f = font(); f.setFamily("Mono"); textBrowser->setFont(f); adjustSize(); }