Skip to content
Permalink
Browse files
Updated sponsor display to two-column table
git-svn-id: http://svn.osgeo.org/qgis/trunk@6035 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gsherman committed Oct 30, 2006
1 parent 6ec5fc0 commit 955c174
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 21 deletions.
@@ -5,17 +5,18 @@
# Please note that this file is parsed by the about box
# for the sponsors list, so names should be strictly
# in the format:
# name [tab] <website>
# name|<website>
# New sponsors should be added to the *top* of the list. The
# website entry is optional.
Maciej Sieczka
Jason Jorgenson
Mateusz Loskot (mateusz.loskot.net)
Tyler Mitchell (spatialguru.com)
Niccolo Rigacci (www.rigacci.org)
Ivan Marchesini (www.gfosservices.it)
Alessandro Pasotti (www.itopen.it)
Lorenzo Becchi (ominiverdi.org)
Paolo Cavallini (www.faunalia.it)
Mateusz Loskot|mateusz.loskot.net
Tyler Mitchell|spatialguru.com
Niccolo Rigacci|www.rigacci.org
Ivan Marchesini|www.gfosservices.it
Alessandro Pasotti|www.itopen.it
Lorenzo Becchi|ominiverdi.org
Paolo Cavallini|www.faunalia.it
Ferdinando Urbano
Yves Jacolin
Tim Baggett
@@ -100,20 +100,58 @@ void QgsAbout::init()
".............................................\n").toLocal8Bit().data());
#endif
if ( sponsorFile.open( QIODevice::ReadOnly ) ) {
QString sponsorHTML = "<center>"
QString sponsorHTML = "<html><body><h2>"
+ tr("QGIS Sponsors") + "</h2><center>"

+ tr("The following have sponsored QGIS by contributing money to fund development and other project costs")
+ "</center>";
+ "</center><hr>"
+ "<table border='1' cellpadding='1' width='100%'>"
+ "<tr><th>" + tr("Name") + "</th><th>" + tr("Website") + "</th>"
+ "<th></th>"
+ "</th><th>" + tr("Name") + "</th><th>" + tr("Website") + "</th></tr>";
QString website;
QTextStream sponsorStream( &sponsorFile );
QString sline;
int i = 1;
int count = 0;
while ( !sponsorStream.atEnd() )
{
sline = sponsorStream.readLine(); // line of text excluding '\n'
//ignore the line if it starts with a hash....
if (sline.left(1)=="#") continue;
sponsorHTML += sline + "<br>";
count++;
QStringList myTokens = QStringList::split("|",sline);
if(myTokens.size() > 1)
{
website = myTokens[1];
}
else
{
website = "&nbsp;";
}
if(count == 1){
sponsorHTML += "<tr>";
}
if(count == 2)
{
// a spacer between donator columns
sponsorHTML += "<td></td>";
}
sponsorHTML += "<td>" + myTokens[0] + "</td><td>" + website + "</td>";
if(count == 2){
// close the row
sponsorHTML += "</tr>";
count = 0;
}

}
txtSponsors->setText(txtSponsors->text() + sponsorHTML);
sponsorHTML += "</table></body></html>";

txtSponsors->setAcceptRichText(true);
txtSponsors->setHtml(sponsorHTML);
#ifdef QGISDEBUG
std::cout << "sponsorHTML:" << sponsorHTML.ascii() << std::endl;
std::cout << "txtSponsors:" << txtSponsors->toHtml().ascii() << std::endl;
#endif
}
}

@@ -5,7 +5,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>514</width>
<width>529</width>
<height>375</height>
</rect>
</property>
@@ -264,13 +264,6 @@ p, li { white-space: pre-wrap; }
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:12pt; font-weight:400; font-style:normal; text-decoration:none;">
&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>
&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>
</property>
</widget>
</item>
</layout>

0 comments on commit 955c174

Please sign in to comment.