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

Added contributors list to qgsabout as requested by Germán Carrillo - and implemented attendant changes needed to support this. Also cleanups for the QgsAbout dialog to remove deprecated / unused code.

git-svn-id: http://svn.osgeo.org/qgis/trunk@11628 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
timlinux 2009-09-11 22:53:47 +00:00
parent 7a87b13824
commit cbca8093ba
7 changed files with 232 additions and 227 deletions

@ -395,7 +395,7 @@ ENDIF (ENABLE_TESTS)
############################################################# #############################################################
# install stuff # install stuff
INSTALL (FILES AUTHORS SPONSORS DONORS TRANSLATORS INSTALL CODING INSTALL (FILES AUTHORS CONTRIBUTORS 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

@ -1,7 +1,9 @@
The following people have submitted code, patches, graphics, comments, # This file will be used to populate the contributors tab in the about dialog
feedback, reviews and/or many other things that have aided the development of # Lines prefixed with # will be ignored
QGIS: # The following people have submitted code, patches, graphics, comments,
# feedback, reviews and/or many other things that have aided the development of
# QGIS:
#
Arthur Nanni Arthur Nanni
Baba Yoshihiko Baba Yoshihiko
Brent Wood Brent Wood
@ -17,12 +19,10 @@ Hyao (IRC nickname)
Ivan Lucena Ivan Lucena
Jean-Denis Giguere Jean-Denis Giguere
Jerrit Collord Jerrit Collord
Jürgen E. Fischer
Magnus Homann Magnus Homann
Markus Neteler Markus Neteler
Maurizio Napolitano Maurizio Napolitano
Paul Ramsey Paul Ramsey
Peter Ersts
Richard Kostecky Richard Kostecky
Stefanie Tellex Stefanie Tellex
Tom Russo Tom Russo

@ -55,53 +55,64 @@ void QgsAbout::init()
QPixmap icon( QgsApplication::iconsPath() + "qgis-icon-60x60.png" ); QPixmap icon( QgsApplication::iconsPath() + "qgis-icon-60x60.png" );
qgisIcon->setPixmap( icon ); qgisIcon->setPixmap( icon );
//read the authors file to populate the contributors list //read the authors file to populate the svn committers list
QStringList lines; QStringList lines;
//
// Load the authors (svn committers) list
//
QFile file( QgsApplication::authorsFilePath() ); QFile file( QgsApplication::authorsFilePath() );
#ifdef QGISDEBUG
printf( "Reading authors file %s.............................................\n",
file.fileName().toLocal8Bit().constData() );
#endif
if ( file.open( QIODevice::ReadOnly ) ) if ( file.open( QIODevice::ReadOnly ) )
{ {
QTextStream stream( &file ); QTextStream stream( &file );
// Always use UTF-8 // Always use UTF-8
stream.setCodec( "UTF-8" ); stream.setCodec( "UTF-8" );
QString line; QString line;
#ifdef QGISDEBUG
int i = 1;
#endif
while ( !stream.atEnd() ) while ( !stream.atEnd() )
{ {
line = stream.readLine(); // line of text excluding '\n' line = stream.readLine(); // line of text excluding '\n'
//ignore the line if it starts with a hash.... //ignore the line if it starts with a hash....
if ( line.left( 1 ) == "#" ) continue; if ( line.left( 1 ) == "#" ) continue;
#ifdef QGISDEBUG
printf( "Contributor: %3d: %s\n", i++, line.toLocal8Bit().constData() );
#endif
QStringList myTokens = line.split( "\t", QString::SkipEmptyParts ); QStringList myTokens = line.split( "\t", QString::SkipEmptyParts );
//printf ("Added contributor name to listbox: %s ",myTokens[0]);
lines += myTokens[0]; lines += myTokens[0];
// add the image to the map
/* Uncomment this block to preload the images (takes time at initial startup)
QString authorName = myTokens[0].replace(" ","_");
QString myString =QString(appPath + "/images/developers/") + authorName + QString(".jpg");
printf ("Loading mug: %s\n", myString.toLocal8Bit().constData());
QPixmap *pixmap = new QPixmap(myString);
mugs[myTokens[0]] = *pixmap;
*/
} }
file.close(); file.close();
listBox1->clear(); lstDevelopers->clear();
listBox1->insertItems( 0, lines ); lstDevelopers->insertItems( 0, lines );
// Load in the image for the first author if ( lstDevelopers->count() > 0 )
if ( listBox1->count() > 0 ) {
listBox1->setCurrentRow( 0 ); lstDevelopers->setCurrentRow( 0 );
}
}
lines.clear();
//
// Now load up the contributors list
//
QFile file2( QgsApplication::contributorsFilePath() );
printf( "Reading contributors file %s.............................................\n",
file2.fileName().toLocal8Bit().constData() );
if ( file2.open( QIODevice::ReadOnly ) )
{
QTextStream stream( &file2 );
// Always use UTF-8
stream.setCodec( "UTF-8" );
QString line;
while ( !stream.atEnd() )
{
line = stream.readLine(); // line of text excluding '\n'
//ignore the line if it starts with a hash....
if ( line.left( 1 ) == "#" ) continue;
lines += line;
}
file2.close();
lstContributors->clear();
lstContributors->insertItems( 0, lines );
if ( lstContributors->count() > 0 )
{
lstContributors->setCurrentRow( 0 );
}
} }
@ -294,9 +305,9 @@ void QgsAbout::setPluginInfo()
myString += "</li>\n</ol>\n"; myString += "</li>\n</ol>\n";
QString myStyle = QgsApplication::reportStyleSheet(); QString myStyle = QgsApplication::reportStyleSheet();
txtBrowserPlugins->clear(); txtProviders->clear();
txtBrowserPlugins->document()->setDefaultStyleSheet( myStyle ); txtProviders->document()->setDefaultStyleSheet( myStyle );
txtBrowserPlugins->setText( myString ); txtProviders->setText( myString );
} }
void QgsAbout::on_buttonCancel_clicked() void QgsAbout::on_buttonCancel_clicked()
@ -304,28 +315,6 @@ void QgsAbout::on_buttonCancel_clicked()
reject(); reject();
} }
void QgsAbout::on_listBox1_currentItemChanged( QListWidgetItem *theItem )
{
//replace spaces in author name
#ifdef QGISDEBUG
printf( "Loading mug: " );
#endif
QString myString = listBox1->currentItem()->text();
myString = myString.replace( " ", "_" );
myString = QgsAbout::fileSystemSafe( myString );
#ifdef QGISDEBUG
printf( "Loading mug: %s", myString.toLocal8Bit().constData() );
#endif
myString = QgsApplication::developerPath() + myString + QString( ".jpg" );
#ifdef QGISDEBUG
printf( "Loading mug: %s\n", myString.toLocal8Bit().constData() );
#endif
/* Uncomment this block to use preloaded images
pixAuthorMug->setPixmap(mugs[myString]);
*/
}
void QgsAbout::on_btnQgisUser_clicked() void QgsAbout::on_btnQgisUser_clicked()
{ {
// find a browser // find a browser

@ -37,7 +37,6 @@ class QgsAbout : public QDialog, private Ui::QgsAbout
private slots: private slots:
void on_buttonCancel_clicked(); void on_buttonCancel_clicked();
void on_listBox1_currentItemChanged( QListWidgetItem *theItem );
void on_btnQgisUser_clicked(); void on_btnQgisUser_clicked();
void on_btnQgisHome_clicked(); void on_btnQgisHome_clicked();
}; };

@ -161,6 +161,13 @@ const QString QgsApplication::authorsFilePath()
{ {
return mPkgDataPath + QString( "/doc/AUTHORS" ); return mPkgDataPath + QString( "/doc/AUTHORS" );
} }
/*!
Returns the path to the contributors file.
*/
const QString QgsApplication::contributorsFilePath()
{
return mPkgDataPath + QString( "/doc/CONTRIBUTORS" );
}
/*! /*!
Returns the path to the sponsors file. Returns the path to the sponsors file.
*/ */

@ -54,6 +54,12 @@ class CORE_EXPORT QgsApplication: public QApplication
//! Returns the path to the authors file. //! Returns the path to the authors file.
static const QString authorsFilePath(); static const QString authorsFilePath();
/** Returns the path to the contributors file.
* Contributors are people who have submitted patches
* but dont have svn write access.
* @note this function was added in version 1.3 */
static const QString contributorsFilePath();
/**Returns the path to the sponsors file. /**Returns the path to the sponsors file.
@note this function was added in version 1.2*/ @note this function was added in version 1.2*/
static const QString sponsorsFilePath(); static const QString sponsorsFilePath();

@ -1,84 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?> <ui version="4.0" >
<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>
<width>529</width> <width>753</width>
<height>375</height> <height>416</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&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&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;/style>&lt;/head>&lt;body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
&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> &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>
</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" stdset="0"> <property name="sizeHint" >
<size> <size>
<width>20</width> <width>20</width>
<height>21</height> <height>21</height>
@ -86,35 +85,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" stdset="0"> <property name="sizeHint" >
<size> <size>
<width>20</width> <width>20</width>
<height>40</height> <height>40</height>
@ -122,24 +121,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>
@ -148,156 +147,161 @@ 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="TabPage" >
<attribute name="title"> <attribute name="title" >
<string>Developers</string>
</attribute>
<layout class="QGridLayout">
<item row="0" column="0">
<widget class="QListWidget" name="listBox1">
<property name="alternatingRowColors">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="TabPage">
<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="txtProviders" />
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_2"> <widget class="QWidget" name="tab" >
<attribute name="title"> <attribute name="title" >
<string>Sponsors</string> <string>Developers</string>
</attribute> </attribute>
<layout class="QGridLayout"> <layout class="QGridLayout" >
<item row="0" column="0"> <item row="0" column="0" >
<widget class="QGroupBox" name="sponsorsBox"> <widget class="QListWidget" name="lstDevelopers" >
<property name="title"> <property name="alternatingRowColors" >
<string>Sponsors</string> <bool>true</bool>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <property name="isWrapping" stdset="0" >
<item> <bool>true</bool>
<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> </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> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_3"> <widget class="QWidget" name="tab_5" >
<attribute name="title"> <attribute name="title" >
<string>Contributors</string>
</attribute>
<widget class="QListWidget" name="lstContributors" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>713</width>
<height>314</height>
</rect>
</property>
<property name="alternatingRowColors" >
<bool>true</bool>
</property>
</widget>
</widget>
<widget class="QWidget" name="tab_3" >
<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>
</layout>
</widget>
<widget class="QWidget" name="tab_2" >
<attribute name="title" >
<string>Sponsors</string>
</attribute>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QTextBrowser" name="txtSponsors" >
<property name="openExternalLinks" >
<bool>true</bool>
</property>
<property name="openLinks" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_4" >
<attribute name="title" >
<string>Donors</string>
</attribute>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QTextBrowser" name="txtDonors" >
<property name="openExternalLinks" >
<bool>true</bool>
</property>
<property name="openLinks" >
<bool>true</bool>
</property>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0" >
<layout class="QHBoxLayout"> <widget class="QDialogButtonBox" name="buttonBox" >
<item> <property name="standardButtons" >
<spacer> <set>QDialogButtonBox::Close</set>
<property name="orientation"> </property>
<enum>Qt::Horizontal</enum> </widget>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="buttonCancel">
<property name="text">
<string>Ok</string>
</property>
<property name="shortcut">
<string/>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</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>btnQgisHome</tabstop> <tabstop>btnQgisHome</tabstop>
<tabstop>buttonCancel</tabstop> <tabstop>btnQgisUser</tabstop>
<tabstop>txtBrowserPlugins</tabstop> <tabstop>txtProviders</tabstop>
<tabstop>listBox1</tabstop> <tabstop>lstDevelopers</tabstop>
<tabstop>txtSponsors</tabstop>
<tabstop>txtTranslators</tabstop>
<tabstop>buttonBox</tabstop>
<tabstop>txtDonors</tabstop>
<tabstop>lstContributors</tabstop>
</tabstops> </tabstops>
<resources> <resources>
<include location="../../images/images.qrc"/> <include location="../../images/images.qrc" />
</resources> </resources>
<connections/> <connections>
<connection>
<sender>buttonBox</sender>
<signal>clicked(QAbstractButton*)</signal>
<receiver>QgsAbout</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<x>719</x>
<y>386</y>
</hint>
<hint type="destinationlabel" >
<x>674</x>
<y>414</y>
</hint>
</hints>
</connection>
</connections>
</ui> </ui>