Skip to content

Commit cfd6c68

Browse files
author
rugginoso
committedJul 2, 2009
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
1 parent ed439f5 commit cfd6c68

File tree

7 files changed

+213
-115
lines changed

7 files changed

+213
-115
lines changed
 

‎AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ Peter Ersts <ersts at amnh.org>
3737
Borys Jurgiel <borysiasty at aster.pl>
3838
Paolo Cavallini <cavallini at faunalia.it>
3939
Carson J. Q. Farmer <carson dot farmer at gmail dot com>
40+
Lorenzo Masini <lorenxo86@gmail.com>

‎CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ ENDIF (ENABLE_TESTS)
384384
#############################################################
385385
# install stuff
386386

387-
INSTALL (FILES AUTHORS SPONSORS TRANSLATORS INSTALL CODING
387+
INSTALL (FILES AUTHORS SPONSORS DONORS TRANSLATORS INSTALL CODING
388388
DESTINATION ${QGIS_DATA_DIR}/doc)
389389

390390
# manual page - makes sense only on unix systems

‎DONORS

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,50 +12,51 @@
1212
#
1313
# ALWAYS USE UTF-8 WHEN WRITING THIS FILE!
1414
#
15-
Aaron Racicot, Ecotrust|www.ecotrust.org
15+
Aaron Racicot, Ecotrust|http://www.ecotrust.org/
1616
Adam Lane
17-
Albin Blaschka|www.albinblaschka.info
18-
Alessandro Pasotti|www.itopen.it
17+
Albin Blaschka|http://www.albinblaschka.info/
18+
Alessandro Pasotti|http://www.itopen.it/
1919
Alessandro Sarretta
2020
Alexandre Leroux
2121
Carl Nelson
22-
D R Arbib|Unknown
23-
David Enns|www.mapitout.com
24-
Ecotrust|www.ecotrust.org
22+
D R Arbib
23+
David Enns|http://www.mapitout.com/
24+
Ecotrust|http://www.ecotrust.org/
2525
Ferdinando Urbano
2626
Flavio Rigolon
2727
Fred Watchorn
28-
Glasic S.r.l.|www.glasic.it
29-
Ivan Marchesini|www.gfosservices.it
28+
Glasic S.r.l.|http://www.glasic.it/
29+
Ivan Marchesini|http://www.gfosservices.it/
3030
James Crone
3131
Jaroslaw Kowalczyk
3232
Jason Jorgenson
3333
John C. Tull
34-
Kanton Solothurn|SOGIS
34+
Kanton Solothurn SOGIS
3535
Kevin Shook
3636
Laura Burnette
37-
Lorenzo Becchi|ominiverdi.org
37+
Lorenzo Becchi|http://ominiverdi.org/
3838
Luca Casagrande
3939
Maciej Sieczka
4040
Maria Antonia Brovelli
4141
Marc Monnerat
42-
Massimo Cuomo|www.acsys.it
43-
Mateusz Loskot|mateusz.loskot.net
42+
Massimo Cuomo|http://www.acsys.it/
43+
Mateusz Loskot|http://mateusz.loskot.net/
4444
Matt Wilkie
45-
Niccolo Rigacci|www.rigacci.org
45+
Niccolo Rigacci|http://www.rigacci.org/
46+
Nikolaos Alexandris
4647
Otto Dassau
47-
Paolo Cavallini|www.faunalia.it
48-
Paolo Cavallini|www.gfoss.it
48+
Paolo Cavallini|http://www.faunalia.it/
49+
Paolo Cavallini|http://www.gfoss.it/
4950
Patti Giuseppe
50-
Planetek Italia s.r.l|www.planetek.it
51-
Ragnvald Larsen|www.mindland.com
51+
Planetek Italia s.r.l|http://www.planetek.it/
52+
Ragnvald Larsen|http://www.mindland.com/
5253
Raymond Warriner
5354
Silvio Grosso
54-
Stefano Menegon|www.mpasol.it
55+
Stefano Menegon|http://www.mpasol.it/
5556
Stephan Holl
5657
Sti Sas Di Meo
5758
Thierry Gonon
5859
Tim Baggett
5960
Tishampati Dhar
60-
Tyler Mitchell|spatialguru.com
61+
Tyler Mitchell|http://spatialguru.com/
6162
Yves Jacolin

‎src/app/qgsabout.cpp

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ void QgsAbout::init()
133133
QStringList myTokens = sline.split( "|", QString::SkipEmptyParts );
134134
if ( myTokens.size() > 1 )
135135
{
136-
website = myTokens[1];
136+
website = "<a href=\"" + myTokens[1].remove(' ') + "\">" + myTokens[1] + "</a>";
137137
}
138138
else
139139
{
@@ -153,7 +153,55 @@ void QgsAbout::init()
153153
QgsDebugMsg( QString( "sponsorHTML:%1" ).arg( sponsorHTML.toAscii().constData() ) );
154154
QgsDebugMsg( QString( "txtSponsors:%1" ).arg( txtSponsors->toHtml().toAscii().constData() ) );
155155
}
156+
157+
// read the DONORS file and populate the text widget
158+
QFile donorsFile( QgsApplication::donorsFilePath() );
159+
#ifdef QGISDEBUG
160+
printf( "Reading donors file %s.............................................\n",
161+
donorsFile.fileName().toLocal8Bit().constData() );
162+
#endif
163+
if ( donorsFile.open( QIODevice::ReadOnly ) )
164+
{
165+
QString donorsHTML = ""
166+
+ tr( "<p>The following have sponsored QGIS by contributing "
167+
"money to fund development and other project costs</p>" )
168+
+ "<hr>"
169+
"<table width='100%'>"
170+
"<tr><th>" + tr( "Name" ) + "</th>"
171+
"<th>" + tr( "Website" ) + "</th></tr>";
172+
QString website;
173+
QTextStream donorsStream( &donorsFile );
174+
// Always use UTF-8
175+
donorsStream.setCodec( "UTF-8" );
176+
QString sline;
177+
while ( !donorsStream.atEnd() )
178+
{
179+
sline = donorsStream.readLine(); // line of text excluding '\n'
180+
//ignore the line if it starts with a hash....
181+
if ( sline.left( 1 ) == "#" ) continue;
182+
QStringList myTokens = sline.split( "|", QString::SkipEmptyParts );
183+
if ( myTokens.size() > 1 )
184+
{
185+
website = "<a href=\"" + myTokens[1].remove(' ') + "\">" + myTokens[1] + "</a>";
186+
}
187+
else
188+
{
189+
website = "&nbsp;";
190+
}
191+
donorsHTML += "<tr>";
192+
donorsHTML += "<td>" + myTokens[0] + "</td><td>" + website + "</td>";
193+
// close the row
194+
donorsHTML += "</tr>";
195+
}
196+
donorsHTML += "</table>";
156197

198+
QString myStyle = QgsApplication::reportStyleSheet();
199+
txtDonors->clear();
200+
txtDonors->document()->setDefaultStyleSheet( myStyle );
201+
txtDonors->setHtml( donorsHTML );
202+
QgsDebugMsg( QString( "donorsHTML:%1" ).arg( donorsHTML.toAscii().constData() ) );
203+
QgsDebugMsg( QString( "txtDonors:%1" ).arg( txtDonors->toHtml().toAscii().constData() ) );
204+
}
157205

158206
// read the TRANSLATORS file and populate the text widget
159207
QFile translatorFile( QgsApplication::translatorsFilePath() );

‎src/core/qgsapplication.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,15 @@ const QString QgsApplication::sponsorsFilePath()
168168
{
169169
return mPkgDataPath + QString( "/doc/SPONSORS" );
170170
}
171+
172+
/*!
173+
Returns the path to the donors file.
174+
*/
175+
const QString QgsApplication::donorsFilePath()
176+
{
177+
return mPkgDataPath + QString( "/doc/DONORS" );
178+
}
179+
171180
/*!
172181
Returns the path to the sponsors file.
173182
@note Added in QGIS 1.1

‎src/core/qgsapplication.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ class CORE_EXPORT QgsApplication: public QApplication
5757
//! Returns the path to the sponsors file.
5858
static const QString sponsorsFilePath();
5959

60+
//! Returns the path to the donors file.
61+
static const QString donorsFilePath();
62+
6063
/**
6164
* Returns the path to the sponsors file.
6265
* @note This was added in QGIS 1.1

‎src/ui/qgsabout.ui

Lines changed: 130 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,145 @@
1-
<ui version="4.0" >
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
23
<class>QgsAbout</class>
3-
<widget class="QDialog" name="QgsAbout" >
4-
<property name="geometry" >
4+
<widget class="QDialog" name="QgsAbout">
5+
<property name="geometry">
56
<rect>
67
<x>0</x>
78
<y>0</y>
89
<width>529</width>
910
<height>375</height>
1011
</rect>
1112
</property>
12-
<property name="windowTitle" >
13+
<property name="windowTitle">
1314
<string>About Quantum GIS</string>
1415
</property>
15-
<property name="sizeGripEnabled" >
16+
<property name="sizeGripEnabled">
1617
<bool>true</bool>
1718
</property>
18-
<layout class="QGridLayout" >
19-
<item row="0" column="0" >
20-
<widget class="QTabWidget" name="tabWidget" >
21-
<property name="currentIndex" >
19+
<layout class="QGridLayout">
20+
<item row="0" column="0">
21+
<widget class="QTabWidget" name="tabWidget">
22+
<property name="currentIndex">
2223
<number>0</number>
2324
</property>
24-
<widget class="QWidget" name="Widget2" >
25-
<attribute name="title" >
25+
<widget class="QWidget" name="Widget2">
26+
<attribute name="title">
2627
<string>About</string>
2728
</attribute>
28-
<layout class="QGridLayout" >
29-
<item row="0" column="0" >
30-
<layout class="QHBoxLayout" >
29+
<layout class="QGridLayout">
30+
<item row="0" column="0">
31+
<layout class="QHBoxLayout">
3132
<item>
32-
<widget class="QLabel" name="qgisIcon" >
33-
<property name="maximumSize" >
33+
<widget class="QLabel" name="qgisIcon">
34+
<property name="maximumSize">
3435
<size>
3536
<width>60</width>
3637
<height>60</height>
3738
</size>
3839
</property>
39-
<property name="pixmap" >
40-
<pixmap resource="../../images/images.qrc" >:/images/icons/qgis-icon-60x60.png</pixmap>
40+
<property name="pixmap">
41+
<pixmap resource="../../images/images.qrc">:/images/icons/qgis-icon-60x60.png</pixmap>
4142
</property>
42-
<property name="scaledContents" >
43+
<property name="scaledContents">
4344
<bool>false</bool>
4445
</property>
4546
</widget>
4647
</item>
4748
<item>
48-
<widget class="QLabel" name="TextLabel4" >
49-
<property name="text" >
50-
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
49+
<widget class="QLabel" name="TextLabel4">
50+
<property name="text">
51+
<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;
5152
p, li { white-space: pre-wrap; }
52-
&lt;/style>&lt;/head>&lt;body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
53-
&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>
53+
&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;
54+
&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>
5455
</property>
55-
<property name="alignment" >
56+
<property name="alignment">
5657
<set>Qt::AlignCenter</set>
5758
</property>
5859
</widget>
5960
</item>
6061
</layout>
6162
</item>
62-
<item row="1" column="0" >
63-
<widget class="QLabel" name="lblVersion" >
64-
<property name="text" >
63+
<item row="1" column="0">
64+
<widget class="QLabel" name="lblVersion">
65+
<property name="text">
6566
<string>Version</string>
6667
</property>
67-
<property name="alignment" >
68+
<property name="alignment">
6869
<set>Qt::AlignCenter</set>
6970
</property>
70-
<property name="wordWrap" >
71+
<property name="wordWrap">
7172
<bool>true</bool>
7273
</property>
7374
</widget>
7475
</item>
75-
<item row="2" column="0" >
76+
<item row="2" column="0">
7677
<spacer>
77-
<property name="orientation" >
78+
<property name="orientation">
7879
<enum>Qt::Vertical</enum>
7980
</property>
80-
<property name="sizeHint" >
81+
<property name="sizeHint" stdset="0">
8182
<size>
8283
<width>20</width>
8384
<height>21</height>
8485
</size>
8586
</property>
8687
</spacer>
8788
</item>
88-
<item row="3" column="0" >
89-
<widget class="QLabel" name="label" >
90-
<property name="text" >
89+
<item row="3" column="0">
90+
<widget class="QLabel" name="label">
91+
<property name="text">
9192
<string>Quantum GIS is licensed under the GNU General Public License</string>
9293
</property>
93-
<property name="alignment" >
94+
<property name="alignment">
9495
<set>Qt::AlignCenter</set>
9596
</property>
96-
<property name="wordWrap" >
97+
<property name="wordWrap">
9798
<bool>true</bool>
9899
</property>
99100
</widget>
100101
</item>
101-
<item row="4" column="0" >
102-
<widget class="QLabel" name="label_2" >
103-
<property name="text" >
102+
<item row="4" column="0">
103+
<widget class="QLabel" name="label_2">
104+
<property name="text">
104105
<string>http://www.gnu.org/licenses</string>
105106
</property>
106-
<property name="alignment" >
107+
<property name="alignment">
107108
<set>Qt::AlignCenter</set>
108109
</property>
109110
</widget>
110111
</item>
111-
<item row="5" column="0" >
112+
<item row="5" column="0">
112113
<spacer>
113-
<property name="orientation" >
114+
<property name="orientation">
114115
<enum>Qt::Vertical</enum>
115116
</property>
116-
<property name="sizeHint" >
117+
<property name="sizeHint" stdset="0">
117118
<size>
118119
<width>20</width>
119120
<height>40</height>
120121
</size>
121122
</property>
122123
</spacer>
123124
</item>
124-
<item row="6" column="0" >
125-
<layout class="QHBoxLayout" >
125+
<item row="6" column="0">
126+
<layout class="QHBoxLayout">
126127
<item>
127-
<widget class="QPushButton" name="btnQgisHome" >
128-
<property name="text" >
128+
<widget class="QPushButton" name="btnQgisHome">
129+
<property name="text">
129130
<string>QGIS Home Page</string>
130131
</property>
131-
<property name="flat" >
132+
<property name="flat">
132133
<bool>false</bool>
133134
</property>
134135
</widget>
135136
</item>
136137
<item>
137-
<widget class="QPushButton" name="btnQgisUser" >
138-
<property name="text" >
138+
<widget class="QPushButton" name="btnQgisUser">
139+
<property name="text">
139140
<string>Join our user mailing list</string>
140141
</property>
141-
<property name="flat" >
142+
<property name="flat">
142143
<bool>false</bool>
143144
</property>
144145
</widget>
@@ -147,86 +148,121 @@ p, li { white-space: pre-wrap; }
147148
</item>
148149
</layout>
149150
</widget>
150-
<widget class="QWidget" name="Widget3" >
151-
<attribute name="title" >
151+
<widget class="QWidget" name="Widget3">
152+
<attribute name="title">
152153
<string>What's New</string>
153154
</attribute>
154-
<layout class="QGridLayout" >
155-
<item row="0" column="0" >
156-
<widget class="QTextEdit" name="txtWhatsNew" >
157-
<property name="focusPolicy" >
155+
<layout class="QGridLayout">
156+
<item row="0" column="0">
157+
<widget class="QTextEdit" name="txtWhatsNew">
158+
<property name="focusPolicy">
158159
<enum>Qt::NoFocus</enum>
159160
</property>
160-
<property name="acceptDrops" >
161+
<property name="acceptDrops">
161162
<bool>false</bool>
162163
</property>
163-
<property name="lineWidth" >
164+
<property name="lineWidth">
164165
<number>2</number>
165166
</property>
166-
<property name="readOnly" >
167+
<property name="readOnly">
167168
<bool>true</bool>
168169
</property>
169170
</widget>
170171
</item>
171172
</layout>
172173
</widget>
173-
<widget class="QWidget" name="tab" >
174-
<attribute name="title" >
174+
<widget class="QWidget" name="tab">
175+
<attribute name="title">
175176
<string>Developers</string>
176177
</attribute>
177-
<layout class="QGridLayout" >
178-
<item row="0" column="0" >
179-
<widget class="QListWidget" name="listBox1" >
180-
<property name="alternatingRowColors" >
178+
<layout class="QGridLayout">
179+
<item row="0" column="0">
180+
<widget class="QListWidget" name="listBox1">
181+
<property name="alternatingRowColors">
181182
<bool>true</bool>
182183
</property>
183184
</widget>
184185
</item>
185186
</layout>
186187
</widget>
187-
<widget class="QWidget" name="TabPage" >
188-
<attribute name="title" >
188+
<widget class="QWidget" name="TabPage">
189+
<attribute name="title">
189190
<string>Providers</string>
190191
</attribute>
191-
<layout class="QGridLayout" >
192-
<item row="0" column="0" >
193-
<widget class="QTextBrowser" name="txtBrowserPlugins" />
192+
<layout class="QGridLayout">
193+
<item row="0" column="0">
194+
<widget class="QTextBrowser" name="txtBrowserPlugins"/>
194195
</item>
195196
</layout>
196197
</widget>
197-
<widget class="QWidget" name="tab_2" >
198-
<attribute name="title" >
198+
<widget class="QWidget" name="tab_2">
199+
<attribute name="title">
199200
<string>Sponsors</string>
200201
</attribute>
201-
<layout class="QGridLayout" >
202-
<item row="0" column="0" >
203-
<widget class="QTextBrowser" name="txtSponsors" />
202+
<layout class="QGridLayout">
203+
<item row="0" column="0">
204+
<widget class="QGroupBox" name="sponsorsBox">
205+
<property name="title">
206+
<string>Sponsors</string>
207+
</property>
208+
<layout class="QVBoxLayout" name="verticalLayout_2">
209+
<item>
210+
<widget class="QTextBrowser" name="txtSponsors">
211+
<property name="openExternalLinks">
212+
<bool>true</bool>
213+
</property>
214+
<property name="openLinks">
215+
<bool>true</bool>
216+
</property>
217+
</widget>
218+
</item>
219+
</layout>
220+
</widget>
221+
</item>
222+
<item row="1" column="0">
223+
<widget class="QGroupBox" name="donorsBox">
224+
<property name="title">
225+
<string>Donors</string>
226+
</property>
227+
<layout class="QVBoxLayout" name="verticalLayout">
228+
<item>
229+
<widget class="QTextBrowser" name="txtDonors">
230+
<property name="openExternalLinks">
231+
<bool>true</bool>
232+
</property>
233+
<property name="openLinks">
234+
<bool>true</bool>
235+
</property>
236+
</widget>
237+
</item>
238+
</layout>
239+
</widget>
204240
</item>
205241
</layout>
206242
</widget>
207-
<widget class="QWidget" name="tab_3" >
208-
<attribute name="title" >
243+
<widget class="QWidget" name="tab_3">
244+
<attribute name="title">
209245
<string>Translators</string>
210246
</attribute>
211-
<layout class="QGridLayout" >
212-
<item row="0" column="0" >
213-
<widget class="QTextBrowser" name="txtTranslators" />
247+
<layout class="QGridLayout">
248+
<item row="0" column="0">
249+
<widget class="QTextBrowser" name="txtTranslators"/>
214250
</item>
215251
</layout>
216252
</widget>
217253
</widget>
218254
</item>
219-
<item row="1" column="0" >
220-
<layout class="QHBoxLayout" >
255+
<item row="1" column="0">
256+
<layout class="QHBoxLayout">
221257
<item>
222258
<spacer>
223-
<property name="orientation" >
259+
<property name="orientation">
224260
<enum>Qt::Horizontal</enum>
225261
</property>
226-
<property name="sizeType" >
262+
<property name="sizeType">
227263
<enum>QSizePolicy::Expanding</enum>
228264
</property>
229-
<property name="sizeHint" >
265+
<property name="sizeHint" stdset="0">
230266
<size>
231267
<width>20</width>
232268
<height>0</height>
@@ -235,14 +271,14 @@ p, li { white-space: pre-wrap; }
235271
</spacer>
236272
</item>
237273
<item>
238-
<widget class="QPushButton" name="buttonCancel" >
239-
<property name="text" >
274+
<widget class="QPushButton" name="buttonCancel">
275+
<property name="text">
240276
<string>Ok</string>
241277
</property>
242-
<property name="shortcut" >
278+
<property name="shortcut">
243279
<string/>
244280
</property>
245-
<property name="autoDefault" >
281+
<property name="autoDefault">
246282
<bool>true</bool>
247283
</property>
248284
</widget>
@@ -251,7 +287,7 @@ p, li { white-space: pre-wrap; }
251287
</item>
252288
</layout>
253289
</widget>
254-
<layoutdefault spacing="6" margin="11" />
290+
<layoutdefault spacing="6" margin="11"/>
255291
<tabstops>
256292
<tabstop>tabWidget</tabstop>
257293
<tabstop>btnQgisUser</tabstop>
@@ -261,7 +297,7 @@ p, li { white-space: pre-wrap; }
261297
<tabstop>listBox1</tabstop>
262298
</tabstops>
263299
<resources>
264-
<include location="../../images/images.qrc" />
300+
<include location="../../images/images.qrc"/>
265301
</resources>
266302
<connections/>
267303
</ui>

0 commit comments

Comments
 (0)
Please sign in to comment.