Skip to content
Permalink
Browse files
Show sponsors in a tab in the about box
git-svn-id: http://svn.osgeo.org/qgis/trunk@6024 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gsherman committed Oct 28, 2006
1 parent f924f9e commit 8b08df10629923abd71ec09d5ab65ce0393e00ab
Showing with 65 additions and 7 deletions.
  1. +7 −1 src/core/qgsapplication.cpp
  2. +3 −0 src/core/qgsapplication.h
  3. +22 −0 src/gui/qgsabout.cpp
  4. +33 −6 src/ui/qgsabout.ui
@@ -69,7 +69,13 @@ const QString QgsApplication::authorsFilePath()
{
return mPkgDataPath + QString("/doc/AUTHORS");
}

/*!
Returns the path to the sponsors file.
*/
const QString QgsApplication::sponsorsFilePath()
{
return mPkgDataPath + QString("/doc/SPONSORS");
}
/*!
Returns the path to the developer image directory.
*/
@@ -30,6 +30,9 @@ class QgsApplication: public QApplication
//! Returns the path to the authors file.
static const QString authorsFilePath();

//! Returns the path to the sponsors file.
static const QString sponsorsFilePath();

//! Returns the path to the developer image directory.
static const QString developerPath();

@@ -93,6 +93,28 @@ void QgsAbout::init()
listBox1->setCurrentRow(0);
}

// read the SPONSORS file and populate the text widget
QFile sponsorFile(QgsApplication::sponsorsFilePath());
#ifdef QGISDEBUG
printf (("Reading sponsors file " + sponsorFile.name() +
".............................................\n").toLocal8Bit().data());
#endif
if ( sponsorFile.open( QIODevice::ReadOnly ) ) {
QString sponsorHTML = "<center>"
+ tr("The following have sponsored QGIS by contributing money to fund development and other project costs")
+ "</center>";
QTextStream sponsorStream( &sponsorFile );
QString sline;
int i = 1;
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>";
}
txtSponsors->setText(txtSponsors->text() + sponsorHTML);
}
}

void QgsAbout::setVersion(QString v)
@@ -1,7 +1,4 @@
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>QgsAbout</class>
<widget class="QDialog" name="QgsAbout" >
<property name="geometry" >
@@ -28,7 +25,7 @@
<item row="0" column="0" >
<widget class="QTabWidget" name="tabWidget" >
<property name="currentIndex" >
<number>0</number>
<number>4</number>
</property>
<widget class="QWidget" name="Widget2" >
<attribute name="title" >
@@ -100,7 +97,11 @@
<item row="3" column="0" >
<widget class="QTextEdit" name="lblUrls" >
<property name="html" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:Arial; font-size:12pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p align='center' style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Sans Serif; font-size:9pt;">Quantum GIS is licensed under the GNU General Public License&lt;/p>&lt;p align='center' style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Sans Serif; font-size:9pt;">http://www.gnu.org/licenses&lt;/p>&lt;/body>&lt;/html></string>
<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 align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;">Quantum GIS is licensed under the GNU General Public License&lt;/p>
&lt;p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;">http://www.gnu.org/licenses&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
@@ -247,6 +248,33 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2" >
<attribute name="title" >
<string>Sponsors</string>
</attribute>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QTextEdit" name="txtSponsors" >
<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>
</widget>
</widget>
</item>
<item row="1" column="0" >
@@ -291,7 +319,6 @@
</layout>
</widget>
<layoutdefault spacing="6" margin="11" />
<pixmapfunction></pixmapfunction>
<tabstops>
<tabstop>tabWidget</tabstop>
<tabstop>btnQgisUser</tabstop>

0 comments on commit 8b08df1

Please sign in to comment.