21 #include <QApplication> 41 connect( projectionSelector, SIGNAL( projectionDoubleClicked() ),
this, SLOT(
accept() ) );
51 QString format(
"<h1>%1</h1>%2 %3" );
52 QString header =
tr(
"Define this layer's coordinate reference system:" );
53 QString sentence1 =
tr(
"This layer appears to have no projection specification." );
54 QString sentence2 =
tr(
"By default, this layer will now have its projection set to that of the project, " 55 "but you may override this by selecting a different projection below." );
56 theMessage = format.
arg( header, sentence1, sentence2 );
60 theMessage =
"<head><style>" + myStyle +
"</style></head><body>" + theMessage +
"</body>";
61 textEdit->setHtml( theMessage );
73 projectionSelector->setSelectedCrsName( theName );
78 projectionSelector->setSelectedCrsId( theID );
83 projectionSelector->setSelectedAuthId( theID );
89 return projectionSelector->selectedCrsId();
94 return projectionSelector->selectedAuthId();
99 projectionSelector->setOgcWmsCrsFilter( crsFilter );
QByteArray toByteArray() const
void setOgcWmsCrsFilter(const QSet< QString > &crsFilter)
filters this dialog by the given CRSs
static QString reportStyleSheet()
get a standard css style sheet for reports.
QString tr(const char *sourceText, const char *disambiguation, int n)
void setValue(const QString &key, const QVariant &value)
void setMessage(QString theMessage="")
If no parameter is passed, the message will be a generic 'define the CRS for this layer'...
~QgsGenericProjectionSelector()
Destructor.
void setSelectedCrsName(const QString &theName)
QVariant value(const QString &key, const QVariant &defaultValue) const
void setSelectedCrsId(long theID)
void setSelectedAuthId(const QString &authId)
QgsGenericProjectionSelector(QWidget *parent=nullptr, const Qt::WindowFlags &fl=QgisGui::ModalDialogFlags)
Constructor.
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const