QgsGrassTools Class Reference

#include <qgsgrasstools.h>

Collaboration diagram for QgsGrassTools:

Collaboration graph
[legend]
List of all members.

Detailed Description

Interface to GRASS modules.

Definition at line 39 of file qgsgrasstools.h.

Public Slots

bool loadConfig (QString filePath)
 Load configuration from file.
void close (void)
 Close.
void closeEvent (QCloseEvent *e)
 Close event.
void restorePosition ()
 Restore window position.
void saveWindowLocation ()
 Save window position.
void moduleClicked (QTreeWidgetItem *item, int column)
 Module in list clicked.
void mapsetChanged ()
 Current mapset changed.
void emitRegionChanged ()
void closeTools ()
 Close open tabs with tools.
void on_mFilterInput_textChanged (QString theText)
 Update the regex used to filter the modules list (autoconnect to ui).
void listItemClicked (const QModelIndex &theIndex)
 Run a module when its entry is clicked in the list view.
void runModule (QString name)
 Run a module given its module name e.g. r.in.gdal.

Signals

void regionChanged ()

Public Member Functions

 QgsGrassTools (QgisInterface *iface, QWidget *parent=0, const char *name=0, Qt::WFlags f=0)
 Constructor.
 ~QgsGrassTools ()
 Destructor.
void addModules (QTreeWidgetItem *parent, QDomElement &element)
 Recursively add sections and modules to the list view.
QString appDir ()
 Returns application directory.

Private Attributes

QgisInterfacemIface
 Pointer to the QGIS interface object.
QgsMapCanvasmCanvas
 Pointer to canvas.
QgsGrassBrowsermBrowser
 Browser.
QStandardItemModel * mModelTools
QSortFilterProxyModel * mModelProxy
QListView * mListView2
QDockWidget * mDockWidget


Constructor & Destructor Documentation

QgsGrassTools::QgsGrassTools ( QgisInterface iface,
QWidget *  parent = 0,
const char *  name = 0,
Qt::WFlags  f = 0 
)

Constructor.

Definition at line 57 of file qgsgrasstools.cpp.

References closeTools(), emitRegionChanged(), QgsGrass::getDefaultLocation(), QgsGrass::getDefaultMapset(), listItemClicked(), loadConfig(), QgisInterface::mapCanvas(), mBrowser, mCanvas, mIface, mModelProxy, mModelTools, moduleClicked(), QgsApplication::pkgDataPath(), QgsDebugMsg, regionChanged(), and restorePosition().

QgsGrassTools::~QgsGrassTools (  ) 

Destructor.

Definition at line 391 of file qgsgrasstools.cpp.

References QgsDebugMsg, and saveWindowLocation().


Member Function Documentation

void QgsGrassTools::addModules ( QTreeWidgetItem *  parent,
QDomElement &  element 
)

Recursively add sections and modules to the list view.

Definition at line 296 of file qgsgrasstools.cpp.

References QgsGrassModule::label(), mModelTools, name(), QgsGrassModule::pixmap(), QgsApplication::pkgDataPath(), QgsDebugMsg, QgsDetailedItemData::setCheckable(), QgsDetailedItemData::setDetail(), QgsDetailedItemData::setIcon(), QgsDetailedItemData::setRenderAsWidget(), and QgsDetailedItemData::setTitle().

Referenced by loadConfig().

QString QgsGrassTools::appDir (  ) 

Returns application directory.

Definition at line 397 of file qgsgrasstools.cpp.

Referenced by QgsGrassShell::QgsGrassShell(), and runModule().

bool QgsGrassTools::loadConfig ( QString  filePath  )  [slot]

Load configuration from file.

Definition at line 245 of file qgsgrasstools.cpp.

References addModules(), and QgsDebugMsg.

Referenced by QgsGrassTools().

void QgsGrassTools::close ( void   )  [slot]

Close.

Definition at line 406 of file qgsgrasstools.cpp.

References saveWindowLocation().

void QgsGrassTools::closeEvent ( QCloseEvent *  e  )  [slot]

Close event.

Definition at line 412 of file qgsgrasstools.cpp.

References saveWindowLocation().

void QgsGrassTools::restorePosition (  )  [slot]

Restore window position.

Definition at line 418 of file qgsgrasstools.cpp.

Referenced by QgsGrassTools().

void QgsGrassTools::saveWindowLocation (  )  [slot]

Save window position.

Definition at line 425 of file qgsgrasstools.cpp.

Referenced by close(), closeEvent(), and ~QgsGrassTools().

void QgsGrassTools::moduleClicked ( QTreeWidgetItem *  item,
int  column 
) [slot]

Module in list clicked.

Definition at line 131 of file qgsgrasstools.cpp.

References name(), QgsDebugMsg, and runModule().

Referenced by QgsGrassTools().

void QgsGrassTools::mapsetChanged (  )  [slot]

Current mapset changed.

Definition at line 379 of file qgsgrasstools.cpp.

References closeTools(), QgsGrass::getDefaultGisdbase(), QgsGrass::getDefaultLocation(), QgsGrass::getDefaultMapset(), mBrowser, QgsDebugMsg, and QgsGrassBrowser::setLocation().

Referenced by QgsGrassPlugin::mapsetChanged().

void QgsGrassTools::emitRegionChanged (  )  [slot]

Definition at line 431 of file qgsgrasstools.cpp.

References QgsDebugMsg, and regionChanged().

Referenced by QgsGrassTools().

void QgsGrassTools::closeTools (  )  [slot]

Close open tabs with tools.

Definition at line 437 of file qgsgrasstools.cpp.

References QgsDebugMsg.

Referenced by mapsetChanged(), QgsGrassTools(), and QgsGrassPlugin::~QgsGrassPlugin().

void QgsGrassTools::on_mFilterInput_textChanged ( QString  theText  )  [slot]

Update the regex used to filter the modules list (autoconnect to ui).

Definition at line 454 of file qgsgrasstools.cpp.

References mModelProxy, and QgsDebugMsg.

void QgsGrassTools::listItemClicked ( const QModelIndex &  theIndex  )  [slot]

Run a module when its entry is clicked in the list view.

Definition at line 463 of file qgsgrasstools.cpp.

References mModelTools, and runModule().

Referenced by QgsGrassTools().

void QgsGrassTools::runModule ( QString  name  )  [slot]

Run a module given its module name e.g. r.in.gdal.

Definition at line 141 of file qgsgrasstools.cpp.

References appDir(), QgsGrass::getDefaultGisdbase(), QgsGrass::getDefaultLocation(), QgsGrass::getDefaultMapset(), mIface, QgsGrassModule::pixmap(), QgsApplication::pkgDataPath(), QgsDebugMsg, and QgsGrassShell::resizeTerminal().

Referenced by listItemClicked(), and moduleClicked().

void QgsGrassTools::regionChanged (  )  [signal]

Referenced by emitRegionChanged(), and QgsGrassTools().


Member Data Documentation

QgisInterface* QgsGrassTools::mIface [private]

Pointer to the QGIS interface object.

Definition at line 97 of file qgsgrasstools.h.

Referenced by QgsGrassTools(), and runModule().

QgsMapCanvas* QgsGrassTools::mCanvas [private]

Pointer to canvas.

Definition at line 100 of file qgsgrasstools.h.

Referenced by QgsGrassTools().

QgsGrassBrowser* QgsGrassTools::mBrowser [private]

Browser.

Definition at line 103 of file qgsgrasstools.h.

Referenced by mapsetChanged(), and QgsGrassTools().

QStandardItemModel* QgsGrassTools::mModelTools [private]

Definition at line 108 of file qgsgrasstools.h.

Referenced by addModules(), listItemClicked(), and QgsGrassTools().

QSortFilterProxyModel* QgsGrassTools::mModelProxy [private]

Definition at line 109 of file qgsgrasstools.h.

Referenced by on_mFilterInput_textChanged(), and QgsGrassTools().

QListView* QgsGrassTools::mListView2 [private]

Definition at line 110 of file qgsgrasstools.h.

QDockWidget* QgsGrassTools::mDockWidget [private]

Definition at line 111 of file qgsgrasstools.h.


The documentation for this class was generated from the following files:
Generated on Tue Oct 28 16:51:59 2008 for Quantum GIS API Documentation by  doxygen 1.5.1