@@ -106,6 +106,11 @@ static QString getShortPath(const QString &path)
106106bool QgsGrassModule::mExecPathInited = 0 ;
107107QStringList QgsGrassModule::mExecPath ;
108108
109+
110+
111+
112+
113+
109114QString QgsGrassModule::findExec ( QString file )
110115{
111116 QgsDebugMsg (" called." );
@@ -208,8 +213,6 @@ QgsGrassModule::QgsGrassModule ( QgsGrassTools *tools, QString moduleName, QgisI
208213 mIface = iface;
209214 mCanvas = mIface ->getMapCanvas ();
210215 mParent = parent;
211- // mAppDir = QgsApplication::applicationDirPath();
212- mAppDir = mTools ->appDir ();
213216
214217 /* Read module description and create options */
215218
@@ -298,7 +301,10 @@ QgsGrassModule::QgsGrassModule ( QgsGrassTools *tools, QString moduleName, QgisI
298301 }
299302 else
300303 {
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." ) );
302308 }
303309
304310 connect ( &mProcess , SIGNAL (readyReadStandardOutput ()), this , SLOT (readStdout ()));
@@ -326,8 +332,6 @@ QgsGrassModuleOptions::QgsGrassModuleOptions (
326332 mModule = module ;
327333 mIface = iface;
328334 mCanvas = mIface ->getMapCanvas ();
329- // mAppDir = QgsApplication::applicationDirPath();
330- mAppDir = mTools ->appDir ();
331335}
332336
333337QgsGrassModuleOptions::~QgsGrassModuleOptions ()
@@ -408,8 +412,23 @@ QgsGrassModuleStandardOptions::QgsGrassModuleStandardOptions (
408412
409413 // Read QGIS options and create controls
410414 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);
413432 while ( !n.isNull () ) {
414433 QDomElement e = n.toElement ();
415434 if ( !e.isNull () ) {
@@ -1447,10 +1466,6 @@ void QgsGrassModule::readStderr()
14471466
14481467void QgsGrassModule::close ()
14491468{
1450- QgsDebugMsg (" called." );
1451-
1452- QTabWidget *tw = dynamic_cast <QTabWidget *>(mParent );
1453- tw->removePage (this );
14541469 delete this ;
14551470}
14561471
0 commit comments