mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
55eae1a7f8
* qt4/Alert_pimpl.C: make sure the proper Qt attributes are set. * GuiApplication::quitLyx(): add the "force" argument to the funcRequest. * GuiImplementation: - GuiImplementation(): remove the signal connection. This was triggered after the LastWindowClosed signal so was not useful. - cleanupViews(): renamed to unregisterView() and handle the WorkAreas as well. - closeAll(): new method (from LyXView). * GuiView.C - clean up the includes order. - closeEvent(): make sure that theBufferList().quitWriteAll() is called if last window closed. * lyx_main.C / LyX::quit(): - remove noAsk argument - delete bufferList::quitWriteAll() call (this is handled in the frontend). - delete Session stuff (ditto) * LyXFunc::dispatch() - LFUN_LYX_EXIT: close all window before exiting from user command (as opposed to last window closed). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15535 a592a061-630c-0410-9148-cb99ea01b6c8
79 lines
1.5 KiB
C++
79 lines
1.5 KiB
C++
// -*- 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.
|
|
*/
|
|
|
|
#ifndef GUI_H
|
|
#define GUI_H
|
|
|
|
#include "frontends/Gui.h"
|
|
|
|
#include <QObject>
|
|
|
|
#include <map>
|
|
|
|
class LyXView;
|
|
|
|
namespace lyx {
|
|
namespace frontend {
|
|
|
|
class GuiWorkArea;
|
|
class GuiView;
|
|
|
|
/**
|
|
* The GuiImplementation class is the interface to all Qt4 components.
|
|
*/
|
|
class GuiImplementation: public QObject, public Gui
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
GuiImplementation();
|
|
virtual ~GuiImplementation() {}
|
|
|
|
virtual int newView();
|
|
virtual LyXView& view(int id);
|
|
virtual int newWorkArea(unsigned int width, unsigned int height, int view_id);
|
|
virtual WorkArea& workArea(int id);
|
|
virtual bool closeAll();
|
|
|
|
public Q_SLOTS:
|
|
///
|
|
void unregisterView(GuiView * view);
|
|
|
|
private:
|
|
///
|
|
void buildViewIds();
|
|
|
|
/// Multiple views container.
|
|
/**
|
|
* Warning: This must not be a smart pointer as the destruction of the
|
|
* object is handled by Qt when the view is closed
|
|
* \sa Qt::WA_DeleteOnClose attribute.
|
|
*/
|
|
std::map<int, GuiView *> views_;
|
|
|
|
/// Multiple workareas container.
|
|
/**
|
|
* Warning: This must not be a smart pointer as the destruction of the
|
|
* object is handled by Qt when its parent view is closed.
|
|
*/
|
|
std::map<int, GuiWorkArea *> work_areas_;
|
|
///
|
|
size_t max_view_id_;
|
|
///
|
|
size_t max_wa_id_;
|
|
};
|
|
|
|
} // namespace frontend
|
|
} // namespace lyx
|
|
|
|
#endif // GUI_H
|