21 #include <QApplication>
48 QString format(
"<h1>%1</h1>%2 %3" );
49 QString header =
tr(
"Define this layer's coordinate reference system:" );
50 QString sentence1 =
tr(
"This layer appears to have no projection specification." );
51 QString sentence2 =
tr(
"By default, this layer will now have its projection set to that of the project, "
52 "but you may override this by selecting a different projection below." );
53 theMessage = format.
arg( header ).
arg( sentence1 ).
arg( sentence2 );
57 theMessage =
"<head><style>" + myStyle +
"</style></head><body>" + theMessage +
"</body>";
58 textEdit->setHtml( theMessage );
70 projectionSelector->setSelectedCrsName( theName );
75 projectionSelector->setSelectedCrsId( theID );
80 projectionSelector->setSelectedAuthId( theID );
86 return projectionSelector->selectedCrsId();
91 return projectionSelector->selectedAuthId();
96 projectionSelector->setOgcWmsCrsFilter( crsFilter );
QByteArray toByteArray() const
void setSelectedCrsName(QString theName)
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(QWidget *parent=0, Qt::WindowFlags fl=QgisGui::ModalDialogFlags)
Constructor.
~QgsGenericProjectionSelector()
Destructor.
QVariant value(const QString &key, const QVariant &defaultValue) const
void setSelectedCrsId(long theID)
void setOgcWmsCrsFilter(QSet< QString > crsFilter)
filters this dialog by the given CRSs
void setSelectedAuthId(QString authId)
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const