1
0
mirror of https://github.com/qgis/QGIS.git synced 2025-04-29 00:03:59 -04:00

Updated the about dialog to take care of DONORS file.

git-svn-id: http://svn.osgeo.org/qgis/trunk@11009 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
rugginoso 2009-07-02 16:54:18 +00:00
parent ed439f5f9c
commit cfd6c68cc5
7 changed files with 213 additions and 115 deletions

@ -37,3 +37,4 @@ Peter Ersts <ersts at amnh.org>
Borys Jurgiel <borysiasty at aster.pl> Borys Jurgiel <borysiasty at aster.pl>
Paolo Cavallini <cavallini at faunalia.it> Paolo Cavallini <cavallini at faunalia.it>
Carson J. Q. Farmer <carson dot farmer at gmail dot com> Carson J. Q. Farmer <carson dot farmer at gmail dot com>
Lorenzo Masini <lorenxo86@gmail.com>

@ -384,7 +384,7 @@ ENDIF (ENABLE_TESTS)
############################################################# #############################################################
# install stuff # install stuff
INSTALL (FILES AUTHORS SPONSORS TRANSLATORS INSTALL CODING INSTALL (FILES AUTHORS SPONSORS DONORS TRANSLATORS INSTALL CODING
DESTINATION ${QGIS_DATA_DIR}/doc) DESTINATION ${QGIS_DATA_DIR}/doc)
# manual page - makes sense only on unix systems # manual page - makes sense only on unix systems

39
DONORS

@ -12,50 +12,51 @@
# #
# ALWAYS USE UTF-8 WHEN WRITING THIS FILE! # ALWAYS USE UTF-8 WHEN WRITING THIS FILE!
# #
Aaron Racicot, Ecotrust|www.ecotrust.org Aaron Racicot, Ecotrust|http://www.ecotrust.org/
Adam Lane Adam Lane
Albin Blaschka|www.albinblaschka.info Albin Blaschka|http://www.albinblaschka.info/
Alessandro Pasotti|www.itopen.it Alessandro Pasotti|http://www.itopen.it/
Alessandro Sarretta Alessandro Sarretta
Alexandre Leroux Alexandre Leroux
Carl Nelson Carl Nelson
D R Arbib|Unknown D R Arbib
David Enns|www.mapitout.com David Enns|http://www.mapitout.com/
Ecotrust|www.ecotrust.org Ecotrust|http://www.ecotrust.org/
Ferdinando Urbano Ferdinando Urbano
Flavio Rigolon Flavio Rigolon
Fred Watchorn Fred Watchorn
Glasic S.r.l.|www.glasic.it Glasic S.r.l.|http://www.glasic.it/
Ivan Marchesini|www.gfosservices.it Ivan Marchesini|http://www.gfosservices.it/
James Crone James Crone
Jaroslaw Kowalczyk Jaroslaw Kowalczyk
Jason Jorgenson Jason Jorgenson
John C. Tull John C. Tull
Kanton Solothurn|SOGIS Kanton Solothurn SOGIS
Kevin Shook Kevin Shook
Laura Burnette Laura Burnette
Lorenzo Becchi|ominiverdi.org Lorenzo Becchi|http://ominiverdi.org/
Luca Casagrande Luca Casagrande
Maciej Sieczka Maciej Sieczka
Maria Antonia Brovelli Maria Antonia Brovelli
Marc Monnerat Marc Monnerat
Massimo Cuomo|www.acsys.it Massimo Cuomo|http://www.acsys.it/
Mateusz Loskot|mateusz.loskot.net Mateusz Loskot|http://mateusz.loskot.net/
Matt Wilkie Matt Wilkie
Niccolo Rigacci|www.rigacci.org Niccolo Rigacci|http://www.rigacci.org/
Nikolaos Alexandris
Otto Dassau Otto Dassau
Paolo Cavallini|www.faunalia.it Paolo Cavallini|http://www.faunalia.it/
Paolo Cavallini|www.gfoss.it Paolo Cavallini|http://www.gfoss.it/
Patti Giuseppe Patti Giuseppe
Planetek Italia s.r.l|www.planetek.it Planetek Italia s.r.l|http://www.planetek.it/
Ragnvald Larsen|www.mindland.com Ragnvald Larsen|http://www.mindland.com/
Raymond Warriner Raymond Warriner
Silvio Grosso Silvio Grosso
Stefano Menegon|www.mpasol.it Stefano Menegon|http://www.mpasol.it/
Stephan Holl Stephan Holl
Sti Sas Di Meo Sti Sas Di Meo
Thierry Gonon Thierry Gonon
Tim Baggett Tim Baggett
Tishampati Dhar Tishampati Dhar
Tyler Mitchell|spatialguru.com Tyler Mitchell|http://spatialguru.com/
Yves Jacolin Yves Jacolin

@ -133,7 +133,7 @@ void QgsAbout::init()
QStringList myTokens = sline.split( "|", QString::SkipEmptyParts ); QStringList myTokens = sline.split( "|", QString::SkipEmptyParts );
if ( myTokens.size() > 1 ) if ( myTokens.size() > 1 )
{ {
website = myTokens[1]; website = "<a href=\"" + myTokens[1].remove(' ') + "\">" + myTokens[1] + "</a>";
} }
else else
{ {
@ -153,7 +153,55 @@ void QgsAbout::init()
QgsDebugMsg( QString( "sponsorHTML:%1" ).arg( sponsorHTML.toAscii().constData() ) ); QgsDebugMsg( QString( "sponsorHTML:%1" ).arg( sponsorHTML.toAscii().constData() ) );
QgsDebugMsg( QString( "txtSponsors:%1" ).arg( txtSponsors->toHtml().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 = "&nbsp;";
}
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 // read the TRANSLATORS file and populate the text widget
QFile translatorFile( QgsApplication::translatorsFilePath() ); QFile translatorFile( QgsApplication::translatorsFilePath() );

@ -168,6 +168,15 @@ const QString QgsApplication::sponsorsFilePath()
{ {
return mPkgDataPath + QString( "/doc/SPONSORS" ); 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. Returns the path to the sponsors file.
@note Added in QGIS 1.1 @note Added in QGIS 1.1

@ -57,6 +57,9 @@ class CORE_EXPORT QgsApplication: public QApplication
//! Returns the path to the sponsors file. //! Returns the path to the sponsors file.
static const QString sponsorsFilePath(); static const QString sponsorsFilePath();
//! Returns the path to the donors file.
static const QString donorsFilePath();
/** /**
* Returns the path to the sponsors file. * Returns the path to the sponsors file.
* @note This was added in QGIS 1.1 * @note This was added in QGIS 1.1

@ -1,7 +1,8 @@
<ui version="4.0" > <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QgsAbout</class> <class>QgsAbout</class>
<widget class="QDialog" name="QgsAbout" > <widget class="QDialog" name="QgsAbout">
<property name="geometry" > <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
@ -9,75 +10,75 @@
<height>375</height> <height>375</height>
</rect> </rect>
</property> </property>
<property name="windowTitle" > <property name="windowTitle">
<string>About Quantum GIS</string> <string>About Quantum GIS</string>
</property> </property>
<property name="sizeGripEnabled" > <property name="sizeGripEnabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<layout class="QGridLayout" > <layout class="QGridLayout">
<item row="0" column="0" > <item row="0" column="0">
<widget class="QTabWidget" name="tabWidget" > <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex" > <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="Widget2" > <widget class="QWidget" name="Widget2">
<attribute name="title" > <attribute name="title">
<string>About</string> <string>About</string>
</attribute> </attribute>
<layout class="QGridLayout" > <layout class="QGridLayout">
<item row="0" column="0" > <item row="0" column="0">
<layout class="QHBoxLayout" > <layout class="QHBoxLayout">
<item> <item>
<widget class="QLabel" name="qgisIcon" > <widget class="QLabel" name="qgisIcon">
<property name="maximumSize" > <property name="maximumSize">
<size> <size>
<width>60</width> <width>60</width>
<height>60</height> <height>60</height>
</size> </size>
</property> </property>
<property name="pixmap" > <property name="pixmap">
<pixmap resource="../../images/images.qrc" >:/images/icons/qgis-icon-60x60.png</pixmap> <pixmap resource="../../images/images.qrc">:/images/icons/qgis-icon-60x60.png</pixmap>
</property> </property>
<property name="scaledContents" > <property name="scaledContents">
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="TextLabel4" > <widget class="QLabel" name="TextLabel4">
<property name="text" > <property name="text">
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> <string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;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;">&lt;span style=" font-size:x-large;">Quantum GIS (QGIS)&lt;/span>&lt;/p>&lt;/body>&lt;/html></string> &lt;p style=&quot; 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;&quot;&gt;&lt;span style=&quot; font-size:x-large;&quot;&gt;Quantum GIS (QGIS)&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="alignment" > <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="0" > <item row="1" column="0">
<widget class="QLabel" name="lblVersion" > <widget class="QLabel" name="lblVersion">
<property name="text" > <property name="text">
<string>Version</string> <string>Version</string>
</property> </property>
<property name="alignment" > <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
</property> </property>
<property name="wordWrap" > <property name="wordWrap">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0" > <item row="2" column="0">
<spacer> <spacer>
<property name="orientation" > <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeHint" > <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>21</height> <height>21</height>
@ -85,35 +86,35 @@ p, li { white-space: pre-wrap; }
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="3" column="0" > <item row="3" column="0">
<widget class="QLabel" name="label" > <widget class="QLabel" name="label">
<property name="text" > <property name="text">
<string>Quantum GIS is licensed under the GNU General Public License</string> <string>Quantum GIS is licensed under the GNU General Public License</string>
</property> </property>
<property name="alignment" > <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
</property> </property>
<property name="wordWrap" > <property name="wordWrap">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0" > <item row="4" column="0">
<widget class="QLabel" name="label_2" > <widget class="QLabel" name="label_2">
<property name="text" > <property name="text">
<string>http://www.gnu.org/licenses</string> <string>http://www.gnu.org/licenses</string>
</property> </property>
<property name="alignment" > <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="0" > <item row="5" column="0">
<spacer> <spacer>
<property name="orientation" > <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeHint" > <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>40</height> <height>40</height>
@ -121,24 +122,24 @@ p, li { white-space: pre-wrap; }
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="6" column="0" > <item row="6" column="0">
<layout class="QHBoxLayout" > <layout class="QHBoxLayout">
<item> <item>
<widget class="QPushButton" name="btnQgisHome" > <widget class="QPushButton" name="btnQgisHome">
<property name="text" > <property name="text">
<string>QGIS Home Page</string> <string>QGIS Home Page</string>
</property> </property>
<property name="flat" > <property name="flat">
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="btnQgisUser" > <widget class="QPushButton" name="btnQgisUser">
<property name="text" > <property name="text">
<string>Join our user mailing list</string> <string>Join our user mailing list</string>
</property> </property>
<property name="flat" > <property name="flat">
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
@ -147,86 +148,121 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="Widget3" > <widget class="QWidget" name="Widget3">
<attribute name="title" > <attribute name="title">
<string>What's New</string> <string>What's New</string>
</attribute> </attribute>
<layout class="QGridLayout" > <layout class="QGridLayout">
<item row="0" column="0" > <item row="0" column="0">
<widget class="QTextEdit" name="txtWhatsNew" > <widget class="QTextEdit" name="txtWhatsNew">
<property name="focusPolicy" > <property name="focusPolicy">
<enum>Qt::NoFocus</enum> <enum>Qt::NoFocus</enum>
</property> </property>
<property name="acceptDrops" > <property name="acceptDrops">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="lineWidth" > <property name="lineWidth">
<number>2</number> <number>2</number>
</property> </property>
<property name="readOnly" > <property name="readOnly">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab" > <widget class="QWidget" name="tab">
<attribute name="title" > <attribute name="title">
<string>Developers</string> <string>Developers</string>
</attribute> </attribute>
<layout class="QGridLayout" > <layout class="QGridLayout">
<item row="0" column="0" > <item row="0" column="0">
<widget class="QListWidget" name="listBox1" > <widget class="QListWidget" name="listBox1">
<property name="alternatingRowColors" > <property name="alternatingRowColors">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="TabPage" > <widget class="QWidget" name="TabPage">
<attribute name="title" > <attribute name="title">
<string>Providers</string> <string>Providers</string>
</attribute> </attribute>
<layout class="QGridLayout" > <layout class="QGridLayout">
<item row="0" column="0" > <item row="0" column="0">
<widget class="QTextBrowser" name="txtBrowserPlugins" /> <widget class="QTextBrowser" name="txtBrowserPlugins"/>
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_2" > <widget class="QWidget" name="tab_2">
<attribute name="title" > <attribute name="title">
<string>Sponsors</string> <string>Sponsors</string>
</attribute> </attribute>
<layout class="QGridLayout" > <layout class="QGridLayout">
<item row="0" column="0" > <item row="0" column="0">
<widget class="QTextBrowser" name="txtSponsors" /> <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> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_3" > <widget class="QWidget" name="tab_3">
<attribute name="title" > <attribute name="title">
<string>Translators</string> <string>Translators</string>
</attribute> </attribute>
<layout class="QGridLayout" > <layout class="QGridLayout">
<item row="0" column="0" > <item row="0" column="0">
<widget class="QTextBrowser" name="txtTranslators" /> <widget class="QTextBrowser" name="txtTranslators"/>
</item> </item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
</item> </item>
<item row="1" column="0" > <item row="1" column="0">
<layout class="QHBoxLayout" > <layout class="QHBoxLayout">
<item> <item>
<spacer> <spacer>
<property name="orientation" > <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType" > <property name="sizeType">
<enum>QSizePolicy::Expanding</enum> <enum>QSizePolicy::Expanding</enum>
</property> </property>
<property name="sizeHint" > <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>0</height> <height>0</height>
@ -235,14 +271,14 @@ p, li { white-space: pre-wrap; }
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QPushButton" name="buttonCancel" > <widget class="QPushButton" name="buttonCancel">
<property name="text" > <property name="text">
<string>Ok</string> <string>Ok</string>
</property> </property>
<property name="shortcut" > <property name="shortcut">
<string/> <string/>
</property> </property>
<property name="autoDefault" > <property name="autoDefault">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
@ -251,7 +287,7 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
</widget> </widget>
<layoutdefault spacing="6" margin="11" /> <layoutdefault spacing="6" margin="11"/>
<tabstops> <tabstops>
<tabstop>tabWidget</tabstop> <tabstop>tabWidget</tabstop>
<tabstop>btnQgisUser</tabstop> <tabstop>btnQgisUser</tabstop>
@ -261,7 +297,7 @@ p, li { white-space: pre-wrap; }
<tabstop>listBox1</tabstop> <tabstop>listBox1</tabstop>
</tabstops> </tabstops>
<resources> <resources>
<include location="../../images/images.qrc" /> <include location="../../images/images.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>