Skip to content

Commit 955c174

Browse files
author
gsherman
committed
Updated sponsor display to two-column table
git-svn-id: http://svn.osgeo.org/qgis/trunk@6035 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 6ec5fc0 commit 955c174

File tree

3 files changed

+53
-21
lines changed

3 files changed

+53
-21
lines changed

SPONSORS

+9-8
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@
55
# Please note that this file is parsed by the about box
66
# for the sponsors list, so names should be strictly
77
# in the format:
8-
# name [tab] <website>
8+
# name|<website>
99
# New sponsors should be added to the *top* of the list. The
1010
# website entry is optional.
11+
Maciej Sieczka
1112
Jason Jorgenson
12-
Mateusz Loskot (mateusz.loskot.net)
13-
Tyler Mitchell (spatialguru.com)
14-
Niccolo Rigacci (www.rigacci.org)
15-
Ivan Marchesini (www.gfosservices.it)
16-
Alessandro Pasotti (www.itopen.it)
17-
Lorenzo Becchi (ominiverdi.org)
18-
Paolo Cavallini (www.faunalia.it)
13+
Mateusz Loskot|mateusz.loskot.net
14+
Tyler Mitchell|spatialguru.com
15+
Niccolo Rigacci|www.rigacci.org
16+
Ivan Marchesini|www.gfosservices.it
17+
Alessandro Pasotti|www.itopen.it
18+
Lorenzo Becchi|ominiverdi.org
19+
Paolo Cavallini|www.faunalia.it
1920
Ferdinando Urbano
2021
Yves Jacolin
2122
Tim Baggett

src/gui/qgsabout.cpp

+43-5
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,58 @@ void QgsAbout::init()
100100
".............................................\n").toLocal8Bit().data());
101101
#endif
102102
if ( sponsorFile.open( QIODevice::ReadOnly ) ) {
103-
QString sponsorHTML = "<center>"
103+
QString sponsorHTML = "<html><body><h2>"
104+
+ tr("QGIS Sponsors") + "</h2><center>"
105+
104106
+ tr("The following have sponsored QGIS by contributing money to fund development and other project costs")
105-
+ "</center>";
107+
+ "</center><hr>"
108+
+ "<table border='1' cellpadding='1' width='100%'>"
109+
+ "<tr><th>" + tr("Name") + "</th><th>" + tr("Website") + "</th>"
110+
+ "<th></th>"
111+
+ "</th><th>" + tr("Name") + "</th><th>" + tr("Website") + "</th></tr>";
112+
QString website;
106113
QTextStream sponsorStream( &sponsorFile );
107114
QString sline;
108-
int i = 1;
115+
int count = 0;
109116
while ( !sponsorStream.atEnd() )
110117
{
111118
sline = sponsorStream.readLine(); // line of text excluding '\n'
112119
//ignore the line if it starts with a hash....
113120
if (sline.left(1)=="#") continue;
114-
sponsorHTML += sline + "<br>";
121+
count++;
122+
QStringList myTokens = QStringList::split("|",sline);
123+
if(myTokens.size() > 1)
124+
{
125+
website = myTokens[1];
126+
}
127+
else
128+
{
129+
website = "&nbsp;";
130+
}
131+
if(count == 1){
132+
sponsorHTML += "<tr>";
133+
}
134+
if(count == 2)
135+
{
136+
// a spacer between donator columns
137+
sponsorHTML += "<td></td>";
138+
}
139+
sponsorHTML += "<td>" + myTokens[0] + "</td><td>" + website + "</td>";
140+
if(count == 2){
141+
// close the row
142+
sponsorHTML += "</tr>";
143+
count = 0;
144+
}
145+
115146
}
116-
txtSponsors->setText(txtSponsors->text() + sponsorHTML);
147+
sponsorHTML += "</table></body></html>";
148+
149+
txtSponsors->setAcceptRichText(true);
150+
txtSponsors->setHtml(sponsorHTML);
151+
#ifdef QGISDEBUG
152+
std::cout << "sponsorHTML:" << sponsorHTML.ascii() << std::endl;
153+
std::cout << "txtSponsors:" << txtSponsors->toHtml().ascii() << std::endl;
154+
#endif
117155
}
118156
}
119157

src/ui/qgsabout.ui

+1-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<rect>
66
<x>0</x>
77
<y>0</y>
8-
<width>514</width>
8+
<width>529</width>
99
<height>375</height>
1010
</rect>
1111
</property>
@@ -264,13 +264,6 @@ p, li { white-space: pre-wrap; }
264264
<property name="readOnly" >
265265
<bool>true</bool>
266266
</property>
267-
<property name="html" >
268-
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
269-
p, li { white-space: pre-wrap; }
270-
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:12pt; font-weight:400; font-style:normal; text-decoration:none;">
271-
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-size:16pt; font-weight:600;">Sponsors of Quantum GIS&lt;/span>&lt;/p>
272-
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:16pt; font-weight:600;">&lt;/p>&lt;/body>&lt;/html></string>
273-
</property>
274267
</widget>
275268
</item>
276269
</layout>

0 commit comments

Comments
 (0)