mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-13 14:32:04 +00:00
bbda43a400
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
67 lines
1.5 KiB
C++
67 lines
1.5 KiB
C++
/**
|
|
* \file GuiERT.cpp
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Jürgen Vigna
|
|
* \author Angus Leeming
|
|
* \author John Levon
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
#include "GuiERT.h"
|
|
|
|
#include "GuiApplication.h"
|
|
#include "GuiView.h"
|
|
|
|
#include "insets/InsetERT.h"
|
|
|
|
#include "FuncRequest.h"
|
|
|
|
#include "support/gettext.h"
|
|
|
|
#include <QRadioButton>
|
|
#include <QPushButton>
|
|
|
|
using namespace std;
|
|
|
|
namespace lyx {
|
|
namespace frontend {
|
|
|
|
GuiERT::GuiERT(QWidget * parent) : InsetParamsWidget(parent)
|
|
{
|
|
setupUi(this);
|
|
|
|
connect(collapsedRB, SIGNAL(clicked()), this, SIGNAL(changed()));
|
|
connect(openRB, SIGNAL(clicked()), this, SIGNAL(changed()));
|
|
}
|
|
|
|
|
|
docstring GuiERT::dialogToParams() const
|
|
{
|
|
InsetCollapsable::CollapseStatus const status = openRB->isChecked()
|
|
? InsetCollapsable::Open : InsetCollapsable::Collapsed;
|
|
return from_ascii(InsetERT::params2string(status));
|
|
}
|
|
|
|
|
|
void GuiERT::paramsToDialog(Inset const * inset)
|
|
{
|
|
InsetERT const * ert = static_cast<InsetERT const *>(inset);
|
|
// FIXME: This dialog has absolutely no value...
|
|
BufferView const * bv = guiApp->currentView()->currentBufferView();
|
|
InsetCollapsable::CollapseStatus status = ert->status(*bv);
|
|
switch (status) {
|
|
case InsetCollapsable::Open: openRB->setChecked(true); break;
|
|
case InsetCollapsable::Collapsed: collapsedRB->setChecked(true); break;
|
|
}
|
|
}
|
|
|
|
} // namespace frontend
|
|
} // namespace lyx
|
|
|
|
#include "moc_GuiERT.cpp"
|