2010-01-30 11:15:05 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file InsetDialog.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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef INSET_DIALOG_H
|
|
|
|
#define INSET_DIALOG_H
|
|
|
|
|
|
|
|
#include "DialogView.h"
|
|
|
|
|
2010-01-30 15:30:49 +00:00
|
|
|
#include "qt_i18n.h"
|
|
|
|
|
2010-01-30 11:15:05 +00:00
|
|
|
namespace lyx {
|
|
|
|
|
|
|
|
class Inset;
|
|
|
|
|
|
|
|
namespace frontend {
|
|
|
|
|
2010-01-30 15:30:49 +00:00
|
|
|
|
2010-01-30 11:15:05 +00:00
|
|
|
class InsetDialog : public DialogView
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2010-01-30 15:30:49 +00:00
|
|
|
InsetDialog(GuiView & lv, InsetCode code, FuncCode creation_code,
|
|
|
|
char const * name, char const * display_name);
|
2010-01-30 11:15:05 +00:00
|
|
|
|
|
|
|
/// \name DialogView inherited methods
|
|
|
|
//@{
|
|
|
|
void applyView();
|
|
|
|
void updateView();
|
|
|
|
void dispatchParams() {}
|
|
|
|
bool isBufferDependent() const { return true; }
|
|
|
|
bool canApply() const { return true; }
|
|
|
|
//@}
|
|
|
|
|
|
|
|
protected Q_SLOTS:
|
2010-01-30 15:30:49 +00:00
|
|
|
void on_newPB_clicked();
|
2010-01-30 11:15:05 +00:00
|
|
|
void on_closePB_clicked();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
///
|
|
|
|
virtual void paramsToDialog(Inset const *) = 0;
|
|
|
|
///
|
|
|
|
virtual docstring dialogToParams() const = 0;
|
2010-01-30 15:30:49 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
InsetCode inset_code_;
|
2010-01-30 11:15:05 +00:00
|
|
|
///
|
2010-01-30 15:30:49 +00:00
|
|
|
FuncCode creation_code_;
|
2010-01-30 11:15:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
#endif // INSET_DIALOG_H
|