lyx_mirror/src/frontends/qt4/QFloat.cpp
Bo Peng 8c5f097b5d Rename .C ==> .cpp for files in src/frontends/qt4, part two
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18015 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 03:53:51 +00:00

64 lines
1.2 KiB
C++

/**
* \file QFloat.cpp
* 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"
#include "FloatPlacement.h"
#include "controllers/ControlFloat.h"
#include "insets/InsetFloat.h"
#include <QPushButton>
namespace lyx {
namespace frontend {
typedef QController<ControlFloat, QView<QFloatDialog> > float_base_class;
QFloat::QFloat(Dialog & parent)
: float_base_class(parent, _("Float Settings"))
{
}
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