@@ -55,53 +55,64 @@ void QgsAbout::init()
55
55
QPixmap icon ( QgsApplication::iconsPath () + " qgis-icon-60x60.png" );
56
56
qgisIcon->setPixmap ( icon );
57
57
58
- // read the authors file to populate the contributors list
58
+ // read the authors file to populate the svn committers list
59
59
QStringList lines;
60
60
61
+ //
62
+ // Load the authors (svn committers) list
63
+ //
61
64
QFile file ( QgsApplication::authorsFilePath () );
62
- #ifdef QGISDEBUG
63
- printf ( " Reading authors file %s.............................................\n " ,
64
- file.fileName ().toLocal8Bit ().constData () );
65
- #endif
66
65
if ( file.open ( QIODevice::ReadOnly ) )
67
66
{
68
67
QTextStream stream ( &file );
69
68
// Always use UTF-8
70
69
stream.setCodec ( " UTF-8" );
71
70
QString line;
72
- #ifdef QGISDEBUG
73
- int i = 1 ;
74
- #endif
75
-
76
71
while ( !stream.atEnd () )
77
72
{
78
73
line = stream.readLine (); // line of text excluding '\n'
79
74
// ignore the line if it starts with a hash....
80
75
if ( line.left ( 1 ) == " #" ) continue ;
81
- #ifdef QGISDEBUG
82
- printf ( " Contributor: %3d: %s\n " , i++, line.toLocal8Bit ().constData () );
83
- #endif
84
76
QStringList myTokens = line.split ( " \t " , QString::SkipEmptyParts );
85
- // printf ("Added contributor name to listbox: %s ",myTokens[0]);
86
77
lines += myTokens[0 ];
87
-
88
- // add the image to the map
89
- /* Uncomment this block to preload the images (takes time at initial startup)
90
- QString authorName = myTokens[0].replace(" ","_");
91
-
92
- QString myString =QString(appPath + "/images/developers/") + authorName + QString(".jpg");
93
- printf ("Loading mug: %s\n", myString.toLocal8Bit().constData());
94
- QPixmap *pixmap = new QPixmap(myString);
95
- mugs[myTokens[0]] = *pixmap;
96
- */
97
78
}
98
79
file.close ();
99
- listBox1 ->clear ();
100
- listBox1 ->insertItems ( 0 , lines );
80
+ lstDevelopers ->clear ();
81
+ lstDevelopers ->insertItems ( 0 , lines );
101
82
102
- // Load in the image for the first author
103
- if ( listBox1->count () > 0 )
104
- listBox1->setCurrentRow ( 0 );
83
+ if ( lstDevelopers->count () > 0 )
84
+ {
85
+ lstDevelopers->setCurrentRow ( 0 );
86
+ }
87
+ }
88
+
89
+ lines.clear ();
90
+ //
91
+ // Now load up the contributors list
92
+ //
93
+ QFile file2 ( QgsApplication::contributorsFilePath () );
94
+ printf ( " Reading contributors file %s.............................................\n " ,
95
+ file2.fileName ().toLocal8Bit ().constData () );
96
+ if ( file2.open ( QIODevice::ReadOnly ) )
97
+ {
98
+ QTextStream stream ( &file2 );
99
+ // Always use UTF-8
100
+ stream.setCodec ( " UTF-8" );
101
+ QString line;
102
+ while ( !stream.atEnd () )
103
+ {
104
+ line = stream.readLine (); // line of text excluding '\n'
105
+ // ignore the line if it starts with a hash....
106
+ if ( line.left ( 1 ) == " #" ) continue ;
107
+ lines += line;
108
+ }
109
+ file2.close ();
110
+ lstContributors->clear ();
111
+ lstContributors->insertItems ( 0 , lines );
112
+ if ( lstContributors->count () > 0 )
113
+ {
114
+ lstContributors->setCurrentRow ( 0 );
115
+ }
105
116
}
106
117
107
118
@@ -294,38 +305,16 @@ void QgsAbout::setPluginInfo()
294
305
myString += " </li>\n </ol>\n " ;
295
306
296
307
QString myStyle = QgsApplication::reportStyleSheet ();
297
- txtBrowserPlugins ->clear ();
298
- txtBrowserPlugins ->document ()->setDefaultStyleSheet ( myStyle );
299
- txtBrowserPlugins ->setText ( myString );
308
+ txtProviders ->clear ();
309
+ txtProviders ->document ()->setDefaultStyleSheet ( myStyle );
310
+ txtProviders ->setText ( myString );
300
311
}
301
312
302
313
void QgsAbout::on_buttonCancel_clicked ()
303
314
{
304
315
reject ();
305
316
}
306
317
307
- void QgsAbout::on_listBox1_currentItemChanged ( QListWidgetItem *theItem )
308
- {
309
- // replace spaces in author name
310
- #ifdef QGISDEBUG
311
- printf ( " Loading mug: " );
312
- #endif
313
- QString myString = listBox1->currentItem ()->text ();
314
- myString = myString.replace ( " " , " _" );
315
- myString = QgsAbout::fileSystemSafe ( myString );
316
- #ifdef QGISDEBUG
317
- printf ( " Loading mug: %s" , myString.toLocal8Bit ().constData () );
318
- #endif
319
- myString = QgsApplication::developerPath () + myString + QString ( " .jpg" );
320
- #ifdef QGISDEBUG
321
- printf ( " Loading mug: %s\n " , myString.toLocal8Bit ().constData () );
322
- #endif
323
-
324
- /* Uncomment this block to use preloaded images
325
- pixAuthorMug->setPixmap(mugs[myString]);
326
- */
327
- }
328
-
329
318
void QgsAbout::on_btnQgisUser_clicked ()
330
319
{
331
320
// find a browser
0 commit comments