added hooks for help viewer

git-svn-id: http://svn.osgeo.org/qgis/trunk@632 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
gsherman 2004-01-29 02:25:59 +00:00
parent c7a1722259
commit 14b85907f0
2 changed files with 16 additions and 4 deletions

View File

@ -68,6 +68,7 @@
#include "qgsdbsourceselect.h"
#endif
#include "qgsmessageviewer.h"
#include "qgshelpviewer.h"
#include "qgsrasterlayer.h"
#include "qgsrasterlayerproperties.h"
#include "qgsvectorlayer.h"
@ -270,11 +271,14 @@ QgisApp::QgisApp(QWidget * parent, const char *name, WFlags fl):QgisAppBase(pare
actionAddLayer->removeFrom(DataToolbar);
#endif
mySplash->setStatus(tr("Loading plugins..."));
// store the application dir
appDir = PREFIX;
// Get pointer to the provider registry singleton
providerRegistry = QgsProviderRegistry::instance(PLUGINS);
QString plib = PREFIX;
plib += "/lib";
providerRegistry = QgsProviderRegistry::instance(plib);
// set the provider plugin path
std::cout << "Setting plugin lib dir to " << PLUGINS << std::endl;
std::cout << "Setting plugin lib dir to " << plib << std::endl;
// connect the "cleanup" slot
connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(saveWindowState()));
restoreWindowState();
@ -282,7 +286,7 @@ QgisApp::QgisApp(QWidget * parent, const char *name, WFlags fl):QgisAppBase(pare
mapCanvas->setFocus();
mySplash->finish( this );
delete mySplash;
QString plib = PLUGINS;
std::cout << "Plugins are installed in " << plib << std::endl;
// set the dirty flag to false -- no changes yet
projectIsDirty = false;
@ -1369,6 +1373,9 @@ void QgisApp::helpContents(){
// find a browser
// find the installed location of the help files
// open index.html using browser
helpViewer = new QgsHelpViewer(this,"helpviewer",false);
helpViewer->showContent(appDir +"/share/doc","index.html");
helpViewer->show();
}
/** Get a pointer to the currently selected map layer */
QgsMapLayer *QgisApp::activeLayer(){

View File

@ -33,6 +33,7 @@ class QListViewItem;
class QgsMapLayer;
class QSocket;
class QgsProviderRegistry;
class QgsHelpViewer;
#include "qgisappbase.h"
#include "qgisiface.h"
class QgsMapCanvas;
@ -168,6 +169,10 @@ class QgisApp:public QgisAppBase
QString versionMessage;
friend class QgisIface;
QgsProviderRegistry *providerRegistry;
//! application directory
QString appDir;
//! help viewer
QgsHelpViewer *helpViewer;
/** Flag to track whether the user should be prompted to save the project
* before opening/creating a new one or exiting the application
*/