Skip to content

Commit 8ca2898

Browse files
committedJul 15, 2011
fix #4081
1 parent e576c9a commit 8ca2898

File tree

3 files changed

+47
-28
lines changed

3 files changed

+47
-28
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,36 +1926,52 @@ void QgisApp::about()
19261926
{
19271927
QApplication::setOverrideCursor( Qt::WaitCursor );
19281928
abt = new QgsAbout();
1929-
QString versionString = tr( "You are using QGIS version %1 built against code revision %2." )
1930-
.arg( QGis::QGIS_VERSION )
1931-
.arg( QGis::QGIS_DEV_VERSION );
1929+
QString versionString = "<html><body><div align='center'><table width='100%'>";
19321930

1933-
versionString += tr( "\nGDAL/OGR Version: %1." ).arg( GDAL_RELEASE_NAME );
1931+
versionString += "<tr>";
1932+
versionString += "<td>" + tr( "QGIS version" ) + "</td><td>" + QGis::QGIS_VERSION + "</td>";
1933+
versionString += "<td>" + tr( "QGIS code revision" ) + "</td><td>" + QGis::QGIS_DEV_VERSION + "</td>";
19341934

1935+
versionString += "</tr><tr>";
1936+
1937+
versionString += "<td>" + tr( "Compiled against Qt" ) + "</td><td>" + QT_VERSION_STR + "</td>";
1938+
versionString += "<td>" + tr( "Running against Qt" ) + "</td><td>" + qVersion() + "</td>";
1939+
1940+
versionString += "</tr><tr>";
1941+
1942+
versionString += "<td>" + tr( "GDAL/OGR Version" ) + "</td><td>" + GDAL_RELEASE_NAME + "</td>";
1943+
versionString += "<td>" + tr( "GEOS Version" ) + "</td><td>" + GEOS_VERSION + "</td>";
1944+
1945+
versionString += "</tr><tr>";
1946+
1947+
versionString += "<td>" + tr( "PostgreSQL Client Version" ) + "</td><td>";
19351948
#ifdef HAVE_POSTGRESQL
1936-
versionString += tr( "\nPostgreSQL Client Version: %1." ).arg( PG_VERSION );
1949+
versionString += PG_VERSION;
19371950
#else
1938-
versionString += tr( "\nNo PostgreSQL support." );
1951+
versionString += tr( "No support." );
19391952
#endif
1953+
versionString += "</td>";
19401954

1955+
versionString += "<td>" + tr( "SpatiaLite Version" ) + "</td><td>";
19411956
#ifdef HAVE_SPATIALITE
1942-
versionString += tr( "\nSpatiaLite Version: %1." ).arg( spatialite_version() );
1957+
versionString += spatialite_version();
19431958
#else
1944-
versionString += tr( "\nNo SpatiaLite support." );
1959+
versionString += tr( "No support." );
19451960
#endif
1961+
versionString += "</td>";
1962+
1963+
versionString += "</tr><tr>";
19461964

1947-
versionString += tr( "\nQWT Version: %1." ).arg( QWT_VERSION_STR );
1965+
versionString += "<td>" + tr( "QWT Version" ) + "</td><td>" + QWT_VERSION_STR + "</td>";
19481966

19491967
#ifdef QGISDEBUG
1950-
versionString += tr( "\nThis copy of QGIS writes debugging output." );
1968+
versionString += "<td colspan=2>" + tr( "This copy of QGIS writes debugging output." ) + "</td>";
19511969
#endif
19521970

1953-
versionString += tr( "\nThis binary was compiled against Qt %1,"
1954-
"and is currently running against Qt %2" )
1955-
.arg( QT_VERSION_STR )
1956-
.arg( qVersion() );
1971+
versionString += "</tr></table></div></body></html>";
19571972

19581973
abt->setVersion( versionString );
1974+
19591975
QString whatsNew = "<html><body>" ;
19601976
whatsNew += "<h3>" + tr( "Version" ) + " " + QString( QGis::QGIS_VERSION ) + "</h3>";
19611977
whatsNew += "<h2>" + trUtf8( "What's new in Version 1.7.0 'Wrocław'?" ) + "</h2>";

‎src/app/qgsabout.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ void QgsAbout::init()
220220

221221
void QgsAbout::setVersion( QString v )
222222
{
223-
lblVersion->setText( v );
223+
txtVersion->setBackgroundRole( QPalette::NoRole );
224+
txtVersion->setAutoFillBackground( true );
225+
txtVersion->setHtml( v );
224226
}
225227

226228
void QgsAbout::setWhatsNew( QString txt )

‎src/ui/qgsabout.ui

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,6 @@ p, li { white-space: pre-wrap; }
6767
</item>
6868
</layout>
6969
</item>
70-
<item row="1" column="0">
71-
<widget class="QLabel" name="lblVersion">
72-
<property name="text">
73-
<string>Version</string>
74-
</property>
75-
<property name="alignment">
76-
<set>Qt::AlignCenter</set>
77-
</property>
78-
<property name="wordWrap">
79-
<bool>true</bool>
80-
</property>
81-
</widget>
82-
</item>
8370
<item row="2" column="0">
8471
<spacer>
8572
<property name="orientation">
@@ -153,6 +140,19 @@ p, li { white-space: pre-wrap; }
153140
</item>
154141
</layout>
155142
</item>
143+
<item row="1" column="0">
144+
<widget class="QTextEdit" name="txtVersion">
145+
<property name="frameShape">
146+
<enum>QFrame::NoFrame</enum>
147+
</property>
148+
<property name="frameShadow">
149+
<enum>QFrame::Plain</enum>
150+
</property>
151+
<property name="readOnly">
152+
<bool>true</bool>
153+
</property>
154+
</widget>
155+
</item>
156156
</layout>
157157
</widget>
158158
<widget class="QWidget" name="Widget3">
@@ -264,6 +264,7 @@ p, li { white-space: pre-wrap; }
264264
</tabstops>
265265
<resources>
266266
<include location="../../images/images.qrc"/>
267+
<include location="../../images/images.qrc"/>
267268
</resources>
268269
<connections>
269270
<connection>

0 commit comments

Comments
 (0)
Please sign in to comment.