2006-06-20 08:39:16 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file GuiImplementation.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author John Levon
|
|
|
|
* \author Abdelrazak Younes
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2006-06-26 16:55:35 +00:00
|
|
|
#ifndef GUI_H
|
|
|
|
#define GUI_H
|
2006-06-20 08:39:16 +00:00
|
|
|
|
|
|
|
#include "frontends/Gui.h"
|
|
|
|
|
2006-10-23 16:29:24 +00:00
|
|
|
#include <QObject>
|
2006-06-20 08:39:16 +00:00
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2006-06-20 09:33:01 +00:00
|
|
|
class GuiView;
|
2007-08-14 09:54:59 +00:00
|
|
|
class LyXView;
|
2006-06-20 08:39:16 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The GuiImplementation class is the interface to all Qt4 components.
|
|
|
|
*/
|
2006-10-23 16:29:24 +00:00
|
|
|
class GuiImplementation: public QObject, public Gui
|
2006-06-20 08:39:16 +00:00
|
|
|
{
|
2006-10-23 16:29:24 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
2006-06-20 08:39:16 +00:00
|
|
|
public:
|
2006-06-26 16:55:35 +00:00
|
|
|
GuiImplementation();
|
2006-06-20 08:39:16 +00:00
|
|
|
virtual ~GuiImplementation() {}
|
|
|
|
|
2006-12-02 17:39:31 +00:00
|
|
|
|
|
|
|
virtual LyXView& createRegisteredView();
|
|
|
|
virtual bool closeAllViews();
|
|
|
|
virtual bool unregisterView(int id);
|
|
|
|
|
|
|
|
virtual LyXView& view(int id) const;
|
|
|
|
|
2006-06-20 08:39:16 +00:00
|
|
|
private:
|
2006-10-23 16:29:24 +00:00
|
|
|
|
|
|
|
/// Multiple views container.
|
|
|
|
/**
|
|
|
|
* Warning: This must not be a smart pointer as the destruction of the
|
2007-05-28 22:27:45 +00:00
|
|
|
* object is handled by Qt when the view is closed
|
2006-10-23 16:29:24 +00:00
|
|
|
* \sa Qt::WA_DeleteOnClose attribute.
|
|
|
|
*/
|
|
|
|
std::map<int, GuiView *> views_;
|
2006-06-20 08:39:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2006-06-26 16:55:35 +00:00
|
|
|
#endif // GUI_H
|