[QGIS Commit] r11628 - in trunk/qgis: . src/app src/core src/ui
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Sep 11 18:53:47 EDT 2009
Author: timlinux
Date: 2009-09-11 18:53:47 -0400 (Fri, 11 Sep 2009)
New Revision: 11628
Modified:
trunk/qgis/CMakeLists.txt
trunk/qgis/CONTRIBUTORS
trunk/qgis/src/app/qgsabout.cpp
trunk/qgis/src/app/qgsabout.h
trunk/qgis/src/core/qgsapplication.cpp
trunk/qgis/src/core/qgsapplication.h
trunk/qgis/src/ui/qgsabout.ui
Log:
Added contributors list to qgsabout as requested by Germ?\195?\161n Carrillo - and implemented attendant changes needed to support this. Also cleanups for the QgsAbout dialog to remove deprecated / unused code.
Modified: trunk/qgis/CMakeLists.txt
===================================================================
--- trunk/qgis/CMakeLists.txt 2009-09-11 22:49:25 UTC (rev 11627)
+++ trunk/qgis/CMakeLists.txt 2009-09-11 22:53:47 UTC (rev 11628)
@@ -395,7 +395,7 @@
#############################################################
# install stuff
-INSTALL (FILES AUTHORS SPONSORS DONORS TRANSLATORS INSTALL CODING
+INSTALL (FILES AUTHORS CONTRIBUTORS SPONSORS DONORS TRANSLATORS INSTALL CODING
DESTINATION ${QGIS_DATA_DIR}/doc)
# manual page - makes sense only on unix systems
Modified: trunk/qgis/CONTRIBUTORS
===================================================================
--- trunk/qgis/CONTRIBUTORS 2009-09-11 22:49:25 UTC (rev 11627)
+++ trunk/qgis/CONTRIBUTORS 2009-09-11 22:53:47 UTC (rev 11628)
@@ -1,7 +1,9 @@
-The following people have submitted code, patches, graphics, comments,
-feedback, reviews and/or many other things that have aided the development of
-QGIS:
-
+# This file will be used to populate the contributors tab in the about dialog
+# Lines prefixed with # will be ignored
+# 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
Baba Yoshihiko
Brent Wood
@@ -17,12 +19,10 @@
Ivan Lucena
Jean-Denis Giguere
Jerrit Collord
-Jürgen E. Fischer
Magnus Homann
Markus Neteler
Maurizio Napolitano
Paul Ramsey
-Peter Ersts
Richard Kostecky
Stefanie Tellex
Tom Russo
Modified: trunk/qgis/src/app/qgsabout.cpp
===================================================================
--- trunk/qgis/src/app/qgsabout.cpp 2009-09-11 22:49:25 UTC (rev 11627)
+++ trunk/qgis/src/app/qgsabout.cpp 2009-09-11 22:53:47 UTC (rev 11628)
@@ -55,56 +55,67 @@
QPixmap icon( QgsApplication::iconsPath() + "qgis-icon-60x60.png" );
qgisIcon->setPixmap( icon );
- //read the authors file to populate the contributors list
+ //read the authors file to populate the svn committers list
QStringList lines;
+ //
+ // Load the authors (svn committers) list
+ //
QFile file( QgsApplication::authorsFilePath() );
-#ifdef QGISDEBUG
- printf( "Reading authors file %s.............................................\n",
- file.fileName().toLocal8Bit().constData() );
-#endif
if ( file.open( QIODevice::ReadOnly ) )
{
QTextStream stream( &file );
// Always use UTF-8
stream.setCodec( "UTF-8" );
QString line;
-#ifdef QGISDEBUG
- int i = 1;
-#endif
-
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;
-#ifdef QGISDEBUG
- printf( "Contributor: %3d: %s\n", i++, line.toLocal8Bit().constData() );
-#endif
QStringList myTokens = line.split( "\t", QString::SkipEmptyParts );
- //printf ("Added contributor name to listbox: %s ",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();
- listBox1->clear();
- listBox1->insertItems( 0, lines );
+ lstDevelopers->clear();
+ lstDevelopers->insertItems( 0, lines );
- // Load in the image for the first author
- if ( listBox1->count() > 0 )
- listBox1->setCurrentRow( 0 );
+ if ( lstDevelopers->count() > 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 );
+ }
+ }
+
// read the SPONSORS file and populate the text widget
QFile sponsorFile( QgsApplication::sponsorsFilePath() );
#ifdef QGISDEBUG
@@ -294,9 +305,9 @@
myString += "</li>\n</ol>\n";
QString myStyle = QgsApplication::reportStyleSheet();
- txtBrowserPlugins->clear();
- txtBrowserPlugins->document()->setDefaultStyleSheet( myStyle );
- txtBrowserPlugins->setText( myString );
+ txtProviders->clear();
+ txtProviders->document()->setDefaultStyleSheet( myStyle );
+ txtProviders->setText( myString );
}
void QgsAbout::on_buttonCancel_clicked()
@@ -304,28 +315,6 @@
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()
{
// find a browser
Modified: trunk/qgis/src/app/qgsabout.h
===================================================================
--- trunk/qgis/src/app/qgsabout.h 2009-09-11 22:49:25 UTC (rev 11627)
+++ trunk/qgis/src/app/qgsabout.h 2009-09-11 22:53:47 UTC (rev 11628)
@@ -37,7 +37,6 @@
private slots:
void on_buttonCancel_clicked();
- void on_listBox1_currentItemChanged( QListWidgetItem *theItem );
void on_btnQgisUser_clicked();
void on_btnQgisHome_clicked();
};
Modified: trunk/qgis/src/core/qgsapplication.cpp
===================================================================
--- trunk/qgis/src/core/qgsapplication.cpp 2009-09-11 22:49:25 UTC (rev 11627)
+++ trunk/qgis/src/core/qgsapplication.cpp 2009-09-11 22:53:47 UTC (rev 11628)
@@ -162,6 +162,13 @@
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.
*/
const QString QgsApplication::sponsorsFilePath()
Modified: trunk/qgis/src/core/qgsapplication.h
===================================================================
--- trunk/qgis/src/core/qgsapplication.h 2009-09-11 22:49:25 UTC (rev 11627)
+++ trunk/qgis/src/core/qgsapplication.h 2009-09-11 22:53:47 UTC (rev 11628)
@@ -54,6 +54,12 @@
//! Returns the path to the authors file.
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.
@note this function was added in version 1.2*/
static const QString sponsorsFilePath();
Modified: trunk/qgis/src/ui/qgsabout.ui
===================================================================
--- trunk/qgis/src/ui/qgsabout.ui 2009-09-11 22:49:25 UTC (rev 11627)
+++ trunk/qgis/src/ui/qgsabout.ui 2009-09-11 22:53:47 UTC (rev 11628)
@@ -1,84 +1,83 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
+<ui version="4.0" >
<class>QgsAbout</class>
- <widget class="QDialog" name="QgsAbout">
- <property name="geometry">
+ <widget class="QDialog" name="QgsAbout" >
+ <property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
- <width>529</width>
- <height>375</height>
+ <width>753</width>
+ <height>416</height>
</rect>
</property>
- <property name="windowTitle">
+ <property name="windowTitle" >
<string>About Quantum GIS</string>
</property>
- <property name="sizeGripEnabled">
+ <property name="sizeGripEnabled" >
<bool>true</bool>
</property>
- <layout class="QGridLayout">
- <item row="0" column="0">
- <widget class="QTabWidget" name="tabWidget">
- <property name="currentIndex">
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QTabWidget" name="tabWidget" >
+ <property name="currentIndex" >
<number>0</number>
</property>
- <widget class="QWidget" name="Widget2">
- <attribute name="title">
+ <widget class="QWidget" name="Widget2" >
+ <attribute name="title" >
<string>About</string>
</attribute>
- <layout class="QGridLayout">
- <item row="0" column="0">
- <layout class="QHBoxLayout">
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <layout class="QHBoxLayout" >
<item>
- <widget class="QLabel" name="qgisIcon">
- <property name="maximumSize">
+ <widget class="QLabel" name="qgisIcon" >
+ <property name="maximumSize" >
<size>
<width>60</width>
<height>60</height>
</size>
</property>
- <property name="pixmap">
- <pixmap resource="../../images/images.qrc">:/images/icons/qgis-icon-60x60.png</pixmap>
+ <property name="pixmap" >
+ <pixmap resource="../../images/images.qrc" >:/images/icons/qgis-icon-60x60.png</pixmap>
</property>
- <property name="scaledContents">
+ <property name="scaledContents" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="TextLabel4">
- <property name="text">
- <string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
+ <widget class="QLabel" name="TextLabel4" >
+ <property name="text" >
+ <string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
-<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;"><span style=" font-size:x-large;">Quantum GIS (QGIS)</span></p></body></html></string>
+</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
+<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;"><span style=" font-size:x-large;">Quantum GIS (QGIS)</span></p></body></html></string>
</property>
- <property name="alignment">
+ <property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="lblVersion">
- <property name="text">
+ <item row="1" column="0" >
+ <widget class="QLabel" name="lblVersion" >
+ <property name="text" >
<string>Version</string>
</property>
- <property name="alignment">
+ <property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
- <property name="wordWrap">
+ <property name="wordWrap" >
<bool>true</bool>
</property>
</widget>
</item>
- <item row="2" column="0">
+ <item row="2" column="0" >
<spacer>
- <property name="orientation">
+ <property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" stdset="0">
+ <property name="sizeHint" >
<size>
<width>20</width>
<height>21</height>
@@ -86,35 +85,35 @@
</property>
</spacer>
</item>
- <item row="3" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
+ <item row="3" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
<string>Quantum GIS is licensed under the GNU General Public License</string>
</property>
- <property name="alignment">
+ <property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
- <property name="wordWrap">
+ <property name="wordWrap" >
<bool>true</bool>
</property>
</widget>
</item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
+ <item row="4" column="0" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
<string>http://www.gnu.org/licenses</string>
</property>
- <property name="alignment">
+ <property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
- <item row="5" column="0">
+ <item row="5" column="0" >
<spacer>
- <property name="orientation">
+ <property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" stdset="0">
+ <property name="sizeHint" >
<size>
<width>20</width>
<height>40</height>
@@ -122,24 +121,24 @@
</property>
</spacer>
</item>
- <item row="6" column="0">
- <layout class="QHBoxLayout">
+ <item row="6" column="0" >
+ <layout class="QHBoxLayout" >
<item>
- <widget class="QPushButton" name="btnQgisHome">
- <property name="text">
+ <widget class="QPushButton" name="btnQgisHome" >
+ <property name="text" >
<string>QGIS Home Page</string>
</property>
- <property name="flat">
+ <property name="flat" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="btnQgisUser">
- <property name="text">
+ <widget class="QPushButton" name="btnQgisUser" >
+ <property name="text" >
<string>Join our user mailing list</string>
</property>
- <property name="flat">
+ <property name="flat" >
<bool>false</bool>
</property>
</widget>
@@ -148,156 +147,161 @@
</item>
</layout>
</widget>
- <widget class="QWidget" name="Widget3">
- <attribute name="title">
+ <widget class="QWidget" name="Widget3" >
+ <attribute name="title" >
<string>What's New</string>
</attribute>
- <layout class="QGridLayout">
- <item row="0" column="0">
- <widget class="QTextEdit" name="txtWhatsNew">
- <property name="focusPolicy">
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QTextEdit" name="txtWhatsNew" >
+ <property name="focusPolicy" >
<enum>Qt::NoFocus</enum>
</property>
- <property name="acceptDrops">
+ <property name="acceptDrops" >
<bool>false</bool>
</property>
- <property name="lineWidth">
+ <property name="lineWidth" >
<number>2</number>
</property>
- <property name="readOnly">
+ <property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
- <widget class="QWidget" name="tab">
- <attribute name="title">
+ <widget class="QWidget" name="TabPage" >
+ <attribute name="title" >
+ <string>Providers</string>
+ </attribute>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QTextBrowser" name="txtProviders" />
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tab" >
+ <attribute name="title" >
<string>Developers</string>
</attribute>
- <layout class="QGridLayout">
- <item row="0" column="0">
- <widget class="QListWidget" name="listBox1">
- <property name="alternatingRowColors">
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QListWidget" name="lstDevelopers" >
+ <property name="alternatingRowColors" >
<bool>true</bool>
</property>
+ <property name="isWrapping" stdset="0" >
+ <bool>true</bool>
+ </property>
</widget>
</item>
</layout>
</widget>
- <widget class="QWidget" name="TabPage">
- <attribute name="title">
- <string>Providers</string>
+ <widget class="QWidget" name="tab_5" >
+ <attribute name="title" >
+ <string>Contributors</string>
</attribute>
- <layout class="QGridLayout">
- <item row="0" column="0">
- <widget class="QTextBrowser" name="txtBrowserPlugins"/>
+ <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>
+ </attribute>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QTextBrowser" name="txtTranslators" />
</item>
</layout>
</widget>
- <widget class="QWidget" name="tab_2">
- <attribute name="title">
+ <widget class="QWidget" name="tab_2" >
+ <attribute name="title" >
<string>Sponsors</string>
</attribute>
- <layout class="QGridLayout">
- <item row="0" column="0">
- <widget class="QGroupBox" name="sponsorsBox">
- <property name="title">
- <string>Sponsors</string>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QTextBrowser" name="txtSponsors" >
+ <property name="openExternalLinks" >
+ <bool>true</bool>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <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 name="openLinks" >
+ <bool>true</bool>
</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>
</item>
</layout>
</widget>
- <widget class="QWidget" name="tab_3">
- <attribute name="title">
- <string>Translators</string>
+ <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="txtTranslators"/>
+ <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>
</layout>
</widget>
</widget>
</item>
- <item row="1" column="0">
- <layout class="QHBoxLayout">
- <item>
- <spacer>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </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 row="1" column="0" >
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Close</set>
+ </property>
+ </widget>
</item>
</layout>
</widget>
- <layoutdefault spacing="6" margin="11"/>
+ <layoutdefault spacing="6" margin="11" />
<tabstops>
<tabstop>tabWidget</tabstop>
+ <tabstop>btnQgisHome</tabstop>
<tabstop>btnQgisUser</tabstop>
- <tabstop>btnQgisHome</tabstop>
- <tabstop>buttonCancel</tabstop>
- <tabstop>txtBrowserPlugins</tabstop>
- <tabstop>listBox1</tabstop>
+ <tabstop>txtProviders</tabstop>
+ <tabstop>lstDevelopers</tabstop>
+ <tabstop>txtSponsors</tabstop>
+ <tabstop>txtTranslators</tabstop>
+ <tabstop>buttonBox</tabstop>
+ <tabstop>txtDonors</tabstop>
+ <tabstop>lstContributors</tabstop>
</tabstops>
<resources>
- <include location="../../images/images.qrc"/>
+ <include location="../../images/images.qrc" />
</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>
More information about the QGIS-commit
mailing list