[QGIS Commit] r11009 - in trunk/qgis: . src/app src/core src/ui
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Thu Jul 2 12:54:18 EDT 2009
Author: rugginoso
Date: 2009-07-02 12:54:18 -0400 (Thu, 02 Jul 2009)
New Revision: 11009
Modified:
trunk/qgis/AUTHORS
trunk/qgis/CMakeLists.txt
trunk/qgis/DONORS
trunk/qgis/src/app/qgsabout.cpp
trunk/qgis/src/core/qgsapplication.cpp
trunk/qgis/src/core/qgsapplication.h
trunk/qgis/src/ui/qgsabout.ui
Log:
Updated the about dialog to take care of DONORS file.
Modified: trunk/qgis/AUTHORS
===================================================================
--- trunk/qgis/AUTHORS 2009-07-02 15:22:36 UTC (rev 11008)
+++ trunk/qgis/AUTHORS 2009-07-02 16:54:18 UTC (rev 11009)
@@ -37,3 +37,4 @@
Borys Jurgiel <borysiasty at aster.pl>
Paolo Cavallini <cavallini at faunalia.it>
Carson J. Q. Farmer <carson dot farmer at gmail dot com>
+Lorenzo Masini <lorenxo86 at gmail.com>
Modified: trunk/qgis/CMakeLists.txt
===================================================================
--- trunk/qgis/CMakeLists.txt 2009-07-02 15:22:36 UTC (rev 11008)
+++ trunk/qgis/CMakeLists.txt 2009-07-02 16:54:18 UTC (rev 11009)
@@ -384,7 +384,7 @@
#############################################################
# install stuff
-INSTALL (FILES AUTHORS SPONSORS TRANSLATORS INSTALL CODING
+INSTALL (FILES AUTHORS SPONSORS DONORS TRANSLATORS INSTALL CODING
DESTINATION ${QGIS_DATA_DIR}/doc)
# manual page - makes sense only on unix systems
Modified: trunk/qgis/DONORS
===================================================================
--- trunk/qgis/DONORS 2009-07-02 15:22:36 UTC (rev 11008)
+++ trunk/qgis/DONORS 2009-07-02 16:54:18 UTC (rev 11009)
@@ -12,50 +12,51 @@
#
# ALWAYS USE UTF-8 WHEN WRITING THIS FILE!
#
-Aaron Racicot, Ecotrust|www.ecotrust.org
+Aaron Racicot, Ecotrust|http://www.ecotrust.org/
Adam Lane
-Albin Blaschka|www.albinblaschka.info
-Alessandro Pasotti|www.itopen.it
+Albin Blaschka|http://www.albinblaschka.info/
+Alessandro Pasotti|http://www.itopen.it/
Alessandro Sarretta
Alexandre Leroux
Carl Nelson
-D R Arbib|Unknown
-David Enns|www.mapitout.com
-Ecotrust|www.ecotrust.org
+D R Arbib
+David Enns|http://www.mapitout.com/
+Ecotrust|http://www.ecotrust.org/
Ferdinando Urbano
Flavio Rigolon
Fred Watchorn
-Glasic S.r.l.|www.glasic.it
-Ivan Marchesini|www.gfosservices.it
+Glasic S.r.l.|http://www.glasic.it/
+Ivan Marchesini|http://www.gfosservices.it/
James Crone
Jaroslaw Kowalczyk
Jason Jorgenson
John C. Tull
-Kanton Solothurn|SOGIS
+Kanton Solothurn SOGIS
Kevin Shook
Laura Burnette
-Lorenzo Becchi|ominiverdi.org
+Lorenzo Becchi|http://ominiverdi.org/
Luca Casagrande
Maciej Sieczka
Maria Antonia Brovelli
Marc Monnerat
-Massimo Cuomo|www.acsys.it
-Mateusz Loskot|mateusz.loskot.net
+Massimo Cuomo|http://www.acsys.it/
+Mateusz Loskot|http://mateusz.loskot.net/
Matt Wilkie
-Niccolo Rigacci|www.rigacci.org
+Niccolo Rigacci|http://www.rigacci.org/
+Nikolaos Alexandris
Otto Dassau
-Paolo Cavallini|www.faunalia.it
-Paolo Cavallini|www.gfoss.it
+Paolo Cavallini|http://www.faunalia.it/
+Paolo Cavallini|http://www.gfoss.it/
Patti Giuseppe
-Planetek Italia s.r.l|www.planetek.it
-Ragnvald Larsen|www.mindland.com
+Planetek Italia s.r.l|http://www.planetek.it/
+Ragnvald Larsen|http://www.mindland.com/
Raymond Warriner
Silvio Grosso
-Stefano Menegon|www.mpasol.it
+Stefano Menegon|http://www.mpasol.it/
Stephan Holl
Sti Sas Di Meo
Thierry Gonon
Tim Baggett
Tishampati Dhar
-Tyler Mitchell|spatialguru.com
+Tyler Mitchell|http://spatialguru.com/
Yves Jacolin
Modified: trunk/qgis/src/app/qgsabout.cpp
===================================================================
--- trunk/qgis/src/app/qgsabout.cpp 2009-07-02 15:22:36 UTC (rev 11008)
+++ trunk/qgis/src/app/qgsabout.cpp 2009-07-02 16:54:18 UTC (rev 11009)
@@ -133,7 +133,7 @@
QStringList myTokens = sline.split( "|", QString::SkipEmptyParts );
if ( myTokens.size() > 1 )
{
- website = myTokens[1];
+ website = "<a href=\"" + myTokens[1].remove(' ') + "\">" + myTokens[1] + "</a>";
}
else
{
@@ -153,7 +153,55 @@
QgsDebugMsg( QString( "sponsorHTML:%1" ).arg( sponsorHTML.toAscii().constData() ) );
QgsDebugMsg( QString( "txtSponsors:%1" ).arg( txtSponsors->toHtml().toAscii().constData() ) );
}
+
+ // read the DONORS file and populate the text widget
+ QFile donorsFile( QgsApplication::donorsFilePath() );
+#ifdef QGISDEBUG
+ printf( "Reading donors file %s.............................................\n",
+ donorsFile.fileName().toLocal8Bit().constData() );
+#endif
+ if ( donorsFile.open( QIODevice::ReadOnly ) )
+ {
+ QString donorsHTML = ""
+ + tr( "<p>The following have sponsored QGIS by contributing "
+ "money to fund development and other project costs</p>" )
+ + "<hr>"
+ "<table width='100%'>"
+ "<tr><th>" + tr( "Name" ) + "</th>"
+ "<th>" + tr( "Website" ) + "</th></tr>";
+ QString website;
+ QTextStream donorsStream( &donorsFile );
+ // Always use UTF-8
+ donorsStream.setCodec( "UTF-8" );
+ QString sline;
+ while ( !donorsStream.atEnd() )
+ {
+ sline = donorsStream.readLine(); // line of text excluding '\n'
+ //ignore the line if it starts with a hash....
+ if ( sline.left( 1 ) == "#" ) continue;
+ QStringList myTokens = sline.split( "|", QString::SkipEmptyParts );
+ if ( myTokens.size() > 1 )
+ {
+ website = "<a href=\"" + myTokens[1].remove(' ') + "\">" + myTokens[1] + "</a>";
+ }
+ else
+ {
+ website = " ";
+ }
+ donorsHTML += "<tr>";
+ donorsHTML += "<td>" + myTokens[0] + "</td><td>" + website + "</td>";
+ // close the row
+ donorsHTML += "</tr>";
+ }
+ donorsHTML += "</table>";
+ QString myStyle = QgsApplication::reportStyleSheet();
+ txtDonors->clear();
+ txtDonors->document()->setDefaultStyleSheet( myStyle );
+ txtDonors->setHtml( donorsHTML );
+ QgsDebugMsg( QString( "donorsHTML:%1" ).arg( donorsHTML.toAscii().constData() ) );
+ QgsDebugMsg( QString( "txtDonors:%1" ).arg( txtDonors->toHtml().toAscii().constData() ) );
+ }
// read the TRANSLATORS file and populate the text widget
QFile translatorFile( QgsApplication::translatorsFilePath() );
Modified: trunk/qgis/src/core/qgsapplication.cpp
===================================================================
--- trunk/qgis/src/core/qgsapplication.cpp 2009-07-02 15:22:36 UTC (rev 11008)
+++ trunk/qgis/src/core/qgsapplication.cpp 2009-07-02 16:54:18 UTC (rev 11009)
@@ -168,7 +168,16 @@
{
return mPkgDataPath + QString( "/doc/SPONSORS" );
}
+
/*!
+ Returns the path to the donors file.
+*/
+const QString QgsApplication::donorsFilePath()
+{
+ return mPkgDataPath + QString( "/doc/DONORS" );
+}
+
+/*!
Returns the path to the sponsors file.
@note Added in QGIS 1.1
*/
Modified: trunk/qgis/src/core/qgsapplication.h
===================================================================
--- trunk/qgis/src/core/qgsapplication.h 2009-07-02 15:22:36 UTC (rev 11008)
+++ trunk/qgis/src/core/qgsapplication.h 2009-07-02 16:54:18 UTC (rev 11009)
@@ -57,6 +57,9 @@
//! Returns the path to the sponsors file.
static const QString sponsorsFilePath();
+ //! Returns the path to the donors file.
+ static const QString donorsFilePath();
+
/**
* Returns the path to the sponsors file.
* @note This was added in QGIS 1.1
Modified: trunk/qgis/src/ui/qgsabout.ui
===================================================================
--- trunk/qgis/src/ui/qgsabout.ui 2009-07-02 15:22:36 UTC (rev 11008)
+++ trunk/qgis/src/ui/qgsabout.ui 2009-07-02 16:54:18 UTC (rev 11009)
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>QgsAbout</class>
- <widget class="QDialog" name="QgsAbout" >
- <property name="geometry" >
+ <widget class="QDialog" name="QgsAbout">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@@ -9,75 +10,75 @@
<height>375</height>
</rect>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>About Quantum GIS</string>
</property>
- <property name="sizeGripEnabled" >
+ <property name="sizeGripEnabled">
<bool>true</bool>
</property>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="QTabWidget" name="tabWidget" >
- <property name="currentIndex" >
+ <layout class="QGridLayout">
+ <item row="0" column="0">
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="currentIndex">
<number>0</number>
</property>
- <widget class="QWidget" name="Widget2" >
- <attribute name="title" >
+ <widget class="QWidget" name="Widget2">
+ <attribute name="title">
<string>About</string>
</attribute>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <layout class="QHBoxLayout" >
+ <layout class="QGridLayout">
+ <item row="0" column="0">
+ <layout class="QHBoxLayout">
<item>
- <widget class="QLabel" name="qgisIcon" >
- <property name="maximumSize" >
+ <widget class="QLabel" name="qgisIcon">
+ <property name="maximumSize">
<size>
<width>60</width>
<height>60</height>
</size>
</property>
- <property name="pixmap" >
- <pixmap resource="../../images/images.qrc" >:/images/icons/qgis-icon-60x60.png</pixmap>
+ <property name="pixmap">
+ <pixmap resource="../../images/images.qrc">:/images/icons/qgis-icon-60x60.png</pixmap>
</property>
- <property name="scaledContents" >
+ <property name="scaledContents">
<bool>false</bool>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="TextLabel4" >
- <property name="text" >
- <string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
+ <widget class="QLabel" name="TextLabel4">
+ <property name="text">
+ <string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:x-large; font-weight:600;"><span style=" font-size:x-large;">Quantum GIS (QGIS)</span></p></body></html></string>
+</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
+<p style=" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:x-large; font-weight:600;"><span style=" font-size:x-large;">Quantum GIS (QGIS)</span></p></body></html></string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="lblVersion" >
- <property name="text" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="lblVersion">
+ <property name="text">
<string>Version</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignCenter</set>
</property>
- <property name="wordWrap" >
+ <property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
- <item row="2" column="0" >
+ <item row="2" column="0">
<spacer>
- <property name="orientation" >
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>21</height>
@@ -85,35 +86,35 @@
</property>
</spacer>
</item>
- <item row="3" column="0" >
- <widget class="QLabel" name="label" >
- <property name="text" >
+ <item row="3" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
<string>Quantum GIS is licensed under the GNU General Public License</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignCenter</set>
</property>
- <property name="wordWrap" >
+ <property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
- <item row="4" column="0" >
- <widget class="QLabel" name="label_2" >
- <property name="text" >
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
<string>http://www.gnu.org/licenses</string>
</property>
- <property name="alignment" >
+ <property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
- <item row="5" column="0" >
+ <item row="5" column="0">
<spacer>
- <property name="orientation" >
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
@@ -121,24 +122,24 @@
</property>
</spacer>
</item>
- <item row="6" column="0" >
- <layout class="QHBoxLayout" >
+ <item row="6" column="0">
+ <layout class="QHBoxLayout">
<item>
- <widget class="QPushButton" name="btnQgisHome" >
- <property name="text" >
+ <widget class="QPushButton" name="btnQgisHome">
+ <property name="text">
<string>QGIS Home Page</string>
</property>
- <property name="flat" >
+ <property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="btnQgisUser" >
- <property name="text" >
+ <widget class="QPushButton" name="btnQgisUser">
+ <property name="text">
<string>Join our user mailing list</string>
</property>
- <property name="flat" >
+ <property name="flat">
<bool>false</bool>
</property>
</widget>
@@ -147,86 +148,121 @@
</item>
</layout>
</widget>
- <widget class="QWidget" name="Widget3" >
- <attribute name="title" >
+ <widget class="QWidget" name="Widget3">
+ <attribute name="title">
<string>What's New</string>
</attribute>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="QTextEdit" name="txtWhatsNew" >
- <property name="focusPolicy" >
+ <layout class="QGridLayout">
+ <item row="0" column="0">
+ <widget class="QTextEdit" name="txtWhatsNew">
+ <property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
- <property name="acceptDrops" >
+ <property name="acceptDrops">
<bool>false</bool>
</property>
- <property name="lineWidth" >
+ <property name="lineWidth">
<number>2</number>
</property>
- <property name="readOnly" >
+ <property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
- <widget class="QWidget" name="tab" >
- <attribute name="title" >
+ <widget class="QWidget" name="tab">
+ <attribute name="title">
<string>Developers</string>
</attribute>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="QListWidget" name="listBox1" >
- <property name="alternatingRowColors" >
+ <layout class="QGridLayout">
+ <item row="0" column="0">
+ <widget class="QListWidget" name="listBox1">
+ <property name="alternatingRowColors">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
- <widget class="QWidget" name="TabPage" >
- <attribute name="title" >
+ <widget class="QWidget" name="TabPage">
+ <attribute name="title">
<string>Providers</string>
</attribute>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="QTextBrowser" name="txtBrowserPlugins" />
+ <layout class="QGridLayout">
+ <item row="0" column="0">
+ <widget class="QTextBrowser" name="txtBrowserPlugins"/>
</item>
</layout>
</widget>
- <widget class="QWidget" name="tab_2" >
- <attribute name="title" >
+ <widget class="QWidget" name="tab_2">
+ <attribute name="title">
<string>Sponsors</string>
</attribute>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="QTextBrowser" name="txtSponsors" />
+ <layout class="QGridLayout">
+ <item row="0" column="0">
+ <widget class="QGroupBox" name="sponsorsBox">
+ <property name="title">
+ <string>Sponsors</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QTextBrowser" name="txtSponsors">
+ <property name="openExternalLinks">
+ <bool>true</bool>
+ </property>
+ <property name="openLinks">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</item>
+ <item row="1" column="0">
+ <widget class="QGroupBox" name="donorsBox">
+ <property name="title">
+ <string>Donors</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QTextBrowser" name="txtDonors">
+ <property name="openExternalLinks">
+ <bool>true</bool>
+ </property>
+ <property name="openLinks">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
</layout>
</widget>
- <widget class="QWidget" name="tab_3" >
- <attribute name="title" >
+ <widget class="QWidget" name="tab_3">
+ <attribute name="title">
<string>Translators</string>
</attribute>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="QTextBrowser" name="txtTranslators" />
+ <layout class="QGridLayout">
+ <item row="0" column="0">
+ <widget class="QTextBrowser" name="txtTranslators"/>
</item>
</layout>
</widget>
</widget>
</item>
- <item row="1" column="0" >
- <layout class="QHBoxLayout" >
+ <item row="1" column="0">
+ <layout class="QHBoxLayout">
<item>
<spacer>
- <property name="orientation" >
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeType" >
+ <property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
@@ -235,14 +271,14 @@
</spacer>
</item>
<item>
- <widget class="QPushButton" name="buttonCancel" >
- <property name="text" >
+ <widget class="QPushButton" name="buttonCancel">
+ <property name="text">
<string>Ok</string>
</property>
- <property name="shortcut" >
+ <property name="shortcut">
<string/>
</property>
- <property name="autoDefault" >
+ <property name="autoDefault">
<bool>true</bool>
</property>
</widget>
@@ -251,7 +287,7 @@
</item>
</layout>
</widget>
- <layoutdefault spacing="6" margin="11" />
+ <layoutdefault spacing="6" margin="11"/>
<tabstops>
<tabstop>tabWidget</tabstop>
<tabstop>btnQgisUser</tabstop>
@@ -261,7 +297,7 @@
<tabstop>listBox1</tabstop>
</tabstops>
<resources>
- <include location="../../images/images.qrc" />
+ <include location="../../images/images.qrc"/>
</resources>
<connections/>
</ui>
More information about the QGIS-commit
mailing list