/* -*- mode: c++; indent-tabs-mode: nil; -*-
 *
 * This file is part of the Mango recipe management distribution.
 * Copyright (c) 2000-2003, Roland Jesse
 * All rights reserved.
 *
 * For license and copyright information see the file COPYRIGHT or 
 * <http://www.opensource.org/licenses/bsd-license.html>.
 *
 * $Id: DocManager.h,v 1.5 2003/10/27 14:14:43 rjesse Exp $
 */
 
#ifndef DOC_MANAGER_H
#define DOC_MANAGER_H

#include <qobject.h>
#include <qdir.h>

class QAssistantClient;

/*!
  Singleton class for accessing the online documentation.
*/
class DocManager : public QObject {
      Q_OBJECT
      typedef QObject inherited;

   public:
      static DocManager* getInstance();
      static void deleteInstance();

      QString getRootDirName() const;
      
   public slots:
      void slotOpen( const QString&);
      void slotSetRootDir( const QString&);

   protected:
      DocManager();
      ~DocManager();
      
   private:
      static DocManager* m_instance;
      void initAssistant();

      QDir m_docRoot;
      bool m_docRootSet;
      QAssistantClient* m_assistantClient;
      bool m_assistantOk;
      bool m_assistantIsRunning;

   private slots:
      void slotAssistantExited();
};
#endif // DOC_MANAGER_H
