@@ -106,6 +106,11 @@ static QString getShortPath(const QString &path)
106
106
bool QgsGrassModule::mExecPathInited = 0 ;
107
107
QStringList QgsGrassModule::mExecPath ;
108
108
109
+
110
+
111
+
112
+
113
+
109
114
QString QgsGrassModule::findExec ( QString file )
110
115
{
111
116
QgsDebugMsg (" called." );
@@ -208,8 +213,6 @@ QgsGrassModule::QgsGrassModule ( QgsGrassTools *tools, QString moduleName, QgisI
208
213
mIface = iface;
209
214
mCanvas = mIface ->getMapCanvas ();
210
215
mParent = parent;
211
- // mAppDir = QgsApplication::applicationDirPath();
212
- mAppDir = mTools ->appDir ();
213
216
214
217
/* Read module description and create options */
215
218
@@ -298,7 +301,10 @@ QgsGrassModule::QgsGrassModule ( QgsGrassTools *tools, QString moduleName, QgisI
298
301
}
299
302
else
300
303
{
301
- QMessageBox::warning ( 0 , tr (" Warning" ), tr (" Cannot find man page " ) + manPath );
304
+ mManualTextBrowser ->clear ();
305
+ mManualTextBrowser ->textCursor ().insertImage ( " :/grass/error.png" );
306
+ mManualTextBrowser ->insertPlainText ( tr (" Cannot find man page " ) + manPath );
307
+ mManualTextBrowser ->insertPlainText ( tr (" Please ensure you have the GRASS documentation installed." ) );
302
308
}
303
309
304
310
connect ( &mProcess , SIGNAL (readyReadStandardOutput ()), this , SLOT (readStdout ()));
@@ -326,8 +332,6 @@ QgsGrassModuleOptions::QgsGrassModuleOptions (
326
332
mModule = module ;
327
333
mIface = iface;
328
334
mCanvas = mIface ->getMapCanvas ();
329
- // mAppDir = QgsApplication::applicationDirPath();
330
- mAppDir = mTools ->appDir ();
331
335
}
332
336
333
337
QgsGrassModuleOptions::~QgsGrassModuleOptions ()
@@ -408,8 +412,23 @@ QgsGrassModuleStandardOptions::QgsGrassModuleStandardOptions (
408
412
409
413
// Read QGIS options and create controls
410
414
QDomNode n = qDocElem.firstChild ();
411
- // QVBoxLayout *layout = new QVBoxLayout ( mTabWidget->page(0), 10 );
412
- QVBoxLayout *layout = new QVBoxLayout ( mParent , 10 );
415
+ //
416
+ // Set up dynamic inside a scroll box
417
+ //
418
+ QVBoxLayout * mypOuterLayout = new QVBoxLayout (mParent );
419
+ mypOuterLayout->setContentsMargins (0 ,0 ,0 ,0 );
420
+ // transfers layout ownership so no need to call delete
421
+ this ->setLayout (mypOuterLayout);
422
+ QScrollArea * mypScrollArea = new QScrollArea ();
423
+ // transfers scroll area ownership so no need to call delete
424
+ mypOuterLayout->addWidget (mypScrollArea);
425
+ QFrame * mypInnerFrame = new QFrame ();
426
+ mypInnerFrame->setFrameShape (QFrame::NoFrame);
427
+ mypInnerFrame->setFrameShadow (QFrame::Plain);
428
+ // transfers frame ownership so no need to call delete
429
+ mypScrollArea->setWidget (mypInnerFrame);
430
+ mypScrollArea->setWidgetResizable ( true );
431
+ QVBoxLayout *layout = new QVBoxLayout ( mypInnerFrame);
413
432
while ( !n.isNull () ) {
414
433
QDomElement e = n.toElement ();
415
434
if ( !e.isNull () ) {
@@ -1447,10 +1466,6 @@ void QgsGrassModule::readStderr()
1447
1466
1448
1467
void QgsGrassModule::close ()
1449
1468
{
1450
- QgsDebugMsg (" called." );
1451
-
1452
- QTabWidget *tw = dynamic_cast <QTabWidget *>(mParent );
1453
- tw->removePage (this );
1454
1469
delete this ;
1455
1470
}
1456
1471
0 commit comments