2007-09-27 11:27:52 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file DialogView.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Abdelrazak Younes
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2007-12-09 22:35:04 +00:00
|
|
|
#ifndef DIALOGVIEW_H
|
|
|
|
#define DIALOGVIEW_H
|
2007-09-27 11:27:52 +00:00
|
|
|
|
2007-10-07 08:55:20 +00:00
|
|
|
#include "Dialog.h"
|
2007-09-27 11:27:52 +00:00
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2007-10-09 22:13:51 +00:00
|
|
|
class DialogView : public QDialog, public Dialog
|
2007-09-27 11:27:52 +00:00
|
|
|
{
|
2016-09-28 21:33:44 +02:00
|
|
|
Q_OBJECT
|
|
|
|
|
2007-09-27 11:27:52 +00:00
|
|
|
public:
|
2007-12-09 22:35:04 +00:00
|
|
|
/// \param lv is the access point for the dialog to the LyX kernel.
|
|
|
|
/// \param name is the identifier given to the dialog by its parent
|
|
|
|
/// container.
|
2008-02-05 12:43:19 +00:00
|
|
|
/// \param title is the window title used for decoration.
|
2016-09-28 21:33:44 +02:00
|
|
|
DialogView(GuiView & lv, QString const & name, QString const & title);
|
2007-09-27 11:27:52 +00:00
|
|
|
|
2020-10-01 10:42:11 +03:00
|
|
|
QWidget * asQWidget() override { return this; }
|
|
|
|
QWidget const * asQWidget() const override { return this; }
|
2007-09-27 14:05:05 +00:00
|
|
|
|
2007-12-10 13:05:00 +00:00
|
|
|
protected:
|
2010-01-27 18:10:33 +00:00
|
|
|
/// \name Dialog inherited methods
|
2008-02-04 17:06:34 +00:00
|
|
|
//@{
|
2020-10-01 10:42:11 +03:00
|
|
|
void applyView() override {}
|
|
|
|
bool initialiseParams(std::string const & /*data*/) override { return true; }
|
|
|
|
void clearParams() override {}
|
|
|
|
bool needBufferOpen() const override { return isBufferDependent(); }
|
2008-02-04 17:06:34 +00:00
|
|
|
//@}
|
2008-06-06 15:53:02 +00:00
|
|
|
/// Any dialog that overrides this method should make sure to call it.
|
2020-10-03 15:42:14 +03:00
|
|
|
void closeEvent(QCloseEvent * ev) override;
|
2008-08-13 14:32:30 +00:00
|
|
|
/// Any dialog that overrides this method should make sure to call it.
|
2020-10-03 15:42:14 +03:00
|
|
|
void hideEvent(QHideEvent * ev) override;
|
2016-09-28 21:33:44 +02:00
|
|
|
|
|
|
|
protected Q_SLOTS:
|
2021-09-28 11:21:45 +03:00
|
|
|
void onBufferViewChanged() override {}
|
2007-09-27 11:27:52 +00:00
|
|
|
};
|
|
|
|
|
2007-12-09 22:35:04 +00:00
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
2007-09-27 11:27:52 +00:00
|
|
|
|
2007-12-09 22:35:04 +00:00
|
|
|
#endif // DIALOGVIEW_H
|