Skip to content

Commit

Permalink
Added module name to the module tab in the GRASS toolbox (Ticket #596)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0_8_0@6808 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gsherman committed Mar 17, 2007
1 parent e47ba53 commit 501eded
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 24 deletions.
4 changes: 3 additions & 1 deletion src/plugins/grass/qgsgrassmodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ QStringList QgsGrassModule::execArguments ( QString module )
return arguments;
}

QgsGrassModule::QgsGrassModule ( QgsGrassTools *tools, QgisApp *qgisApp, QgisIface *iface,
QgsGrassModule::QgsGrassModule ( QgsGrassTools *tools, QString moduleName, QgisApp *qgisApp, QgisIface *iface,
QString path, QWidget * parent, const char * name, Qt::WFlags f )
:QgsGrassModuleBase ( ), mSuccess(false)
{
Expand All @@ -194,6 +194,8 @@ QgsGrassModule::QgsGrassModule ( QgsGrassTools *tools, QgisApp *qgisApp, QgisIfa
#endif

setupUi(this);
// set the module name
lblModuleName->setText(tr("Module") + ": " + moduleName);

mPath = path;
mTools = tools;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/grass/qgsgrassmodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class QgsGrassModule: public QDialog, private Ui::QgsGrassModuleBase

public:
//! Constructor
QgsGrassModule ( QgsGrassTools *tools, QgisApp *qgisApp, QgisIface *iface,
QgsGrassModule ( QgsGrassTools *tools, QString moduleName, QgisApp *qgisApp, QgisIface *iface,
QString path, QWidget * parent = 0, const char * name = 0, Qt::WFlags f = 0 );

//! Destructor
Expand Down
44 changes: 23 additions & 21 deletions src/plugins/grass/qgsgrassmodulebase.ui
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>QgsGrassModuleBase</class>
<widget class="QWidget" name="QgsGrassModuleBase" >
<property name="geometry" >
Expand All @@ -15,14 +12,14 @@
<property name="windowTitle" >
<string>GRASS Module</string>
</property>
<layout class="QVBoxLayout" >
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<item row="1" column="0" >
<widget class="QTabWidget" name="mTabWidget" >
<widget class="QWidget" name="options" >
<attribute name="title" >
Expand Down Expand Up @@ -63,10 +60,22 @@
</widget>
</widget>
</item>
<item>
<widget class="Q3ProgressBar" name="mProgressBar" />
<item row="0" column="0" >
<widget class="QLabel" name="lblModuleName" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<item row="3" column="0" >
<widget class="Q3Frame" name="frame4" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
Expand Down Expand Up @@ -172,31 +181,24 @@
</layout>
</widget>
</item>
<item row="2" column="0" >
<widget class="Q3ProgressBar" name="mProgressBar" />
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11" />
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
<customwidgets>
<customwidget>
<class>Q3TextBrowser</class>
<extends>QWidget</extends>
<header>q3textbrowser.h</header>
<container>1</container>
<pixmap></pixmap>
</customwidget>
<customwidget>
<class>Q3ProgressBar</class>
<extends>QWidget</extends>
<header>q3progressbar.h</header>
<container>1</container>
<pixmap></pixmap>
<extends>QFrame</extends>
<header>Qt3Support/Q3ProgressBar</header>
</customwidget>
<customwidget>
<class>Q3Frame</class>
<extends></extends>
<extends>QFrame</extends>
<header>Qt3Support/Q3Frame</header>
<container>1</container>
<pixmap></pixmap>
</customwidget>
</customwidgets>
<resources/>
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/grass/qgsgrasstools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ void QgsGrassTools::moduleClicked( Q3ListViewItem * item )
}
else
{
m = dynamic_cast<QWidget *> ( new QgsGrassModule ( this,
m = dynamic_cast<QWidget *> ( new QgsGrassModule ( this, name,
mQgisApp, mIface, path, mTabWidget ) );
}

Expand Down

0 comments on commit 501eded

Please sign in to comment.