lyx_mirror/src/frontends/qt4/GuiBox.h
Abdelrazak Younes bbda43a400 Attempt to simplify as much as possible Inset parameter dialog creation. We now just need an ui file and a class that inherits InsetParamsWidget and implement 4 methods. Then InsetParamsDialog will take care of the rest. InsetParamsDialog has 2 running mode: "immediate apply" and "Restore/OK/Close" which is the default; I hope this is enough to satisfy all users. The checkbox status might be saved later in session settings.
This new attempt replace the previous attempt with InsetDialog which was still too tight with the older framework.
Status:
float, ert, box, info: migrated
vspace: migrated but buggy. To be fixed later.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33480 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-15 23:17:45 +00:00

64 lines
1.3 KiB
C++

// -*- C++ -*-
/**
* \file GuiBox.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Jürgen Spitzmüller
* \author Martin Vermeer (with useful hints from Angus Leeming)
*
* Full author contact details are available in file CREDITS.
*/
#ifndef GUIBOX_H
#define GUIBOX_H
#include "InsetParamsWidget.h"
#include "ui_BoxUi.h"
namespace lyx {
namespace frontend {
class GuiBox : public InsetParamsWidget, public Ui::BoxUi
{
Q_OBJECT
public:
GuiBox(QWidget * parent = 0);
private Q_SLOTS:
void on_innerBoxCO_activated(QString const &);
void on_typeCO_activated(int);
void initDialog();
void on_heightCB_stateChanged(int state);
void on_pagebreakCB_stateChanged();
private:
/// \name DialogView inherited methods
//@{
InsetCode insetCode() { return BOX_CODE; }
FuncCode creationCode() { return LFUN_BOX_INSERT; }
void paramsToDialog(Inset const *);
docstring dialogToParams() const;
//@}
/// add and remove special lengths
void setSpecial(bool ibox);
/// only show valid inner box items
void setInnerType(bool frameless, int i);
QStringList ids_;
///
QStringList gui_names_;
///
QStringList ids_spec_;
///
QStringList gui_names_spec_;
};
} // namespace frontend
} // namespace lyx
#endif // GUIBOX_H