2006-03-05 17:24:44 +00:00
|
|
|
/**
|
|
|
|
* \file QFloat.C
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Edwin Leuven
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "QFloat.h"
|
|
|
|
#include "QFloatDialog.h"
|
|
|
|
#include "Qt2BC.h"
|
2006-08-25 13:40:01 +00:00
|
|
|
#include "FloatPlacement.h"
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
#include "controllers/ControlFloat.h"
|
|
|
|
|
|
|
|
#include "insets/insetfloat.h"
|
|
|
|
|
2006-08-25 13:40:01 +00:00
|
|
|
#include <QPushButton>
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
|
|
|
typedef QController<ControlFloat, QView<QFloatDialog> > base_class;
|
|
|
|
|
|
|
|
|
|
|
|
QFloat::QFloat(Dialog & parent)
|
2006-10-09 10:35:14 +00:00
|
|
|
: base_class(parent, _("Float Settings"))
|
2006-03-05 17:24:44 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void QFloat::build_dialog()
|
|
|
|
{
|
|
|
|
dialog_.reset(new QFloatDialog(this));
|
|
|
|
|
|
|
|
bcview().setCancel(dialog_->closePB);
|
|
|
|
bcview().setApply(dialog_->applyPB);
|
|
|
|
bcview().setOK(dialog_->okPB);
|
|
|
|
bcview().setRestore(dialog_->restorePB);
|
|
|
|
|
|
|
|
bcview().addReadOnly(dialog_->floatFP);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void QFloat::update_contents()
|
|
|
|
{
|
|
|
|
dialog_->floatFP->set(controller().params());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void QFloat::apply()
|
|
|
|
{
|
|
|
|
InsetFloatParams & params = controller().params();
|
|
|
|
|
|
|
|
params.placement = dialog_->floatFP->get(params.wide, params.sideways);
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|