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/trunk@6830 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gsherman committed Mar 24, 2007
1 parent ef92d63 commit fa34897
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 26 deletions.
4 changes: 2 additions & 2 deletions src/plugins/grass/qgsgrassmodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ QStringList QgsGrassModule::execArguments ( QString module )
return arguments;
}

QgsGrassModule::QgsGrassModule ( QgsGrassTools *tools, QgisInterface *iface,
QgsGrassModule::QgsGrassModule ( QgsGrassTools *tools, QString moduleName, QgisInterface *iface,
QString path, QWidget * parent, const char * name, Qt::WFlags f )
:QgsGrassModuleBase ( ), mSuccess(false)
{
Expand All @@ -196,7 +196,7 @@ QgsGrassModule::QgsGrassModule ( QgsGrassTools *tools, QgisInterface *iface,
#endif

setupUi(this);

lblModuleName->setText(tr("Module") + ": " + moduleName);
mPath = path;
mTools = tools;
mIface = iface;
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/grass/qgsgrassmodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <QCloseEvent>
#include <Q3Frame>
/***************************************************************************
qgsgrasstools.h
qgsgrassmodule.h
-------------------
begin : March, 2005
copyright : (C) 2005 by Radim Blazek
Expand Down Expand Up @@ -64,7 +64,7 @@ class QgsGrassModule: public QDialog, private Ui::QgsGrassModuleBase

public:
//! Constructor
QgsGrassModule ( QgsGrassTools *tools, QgisInterface *iface,
QgsGrassModule ( QgsGrassTools *tools, QString moduleName, QgisInterface *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 @@ -238,7 +238,7 @@ void QgsGrassTools::moduleClicked( QTreeWidgetItem * item, int column )
}
else
{
m = dynamic_cast<QWidget *> ( new QgsGrassModule ( this,
m = dynamic_cast<QWidget *> ( new QgsGrassModule ( this, name,
mIface, path, mTabWidget ) );
}

Expand Down

0 comments on commit fa34897

Please sign in to comment.