mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-16 07:55:41 +00:00
c466baaa5b
The current spelling is not strictly wrong, but flagged as unusual or historical by some authorities. It is also found fault with many spell checkers. Thus we decided to move to the more standard "-ible" form once and for all. See #10678 for discussion This part covers the most tricky part: the internal naming. Translations and layouts will follow. This will all also all be backported to 2.3.x, for the sake of backwards compatibility (cherry-picking).
73 lines
1.6 KiB
C++
73 lines
1.6 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 "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
|
|
{
|
|
InsetCollapsible::CollapseStatus const status = openRB->isChecked()
|
|
? InsetCollapsible::Open : InsetCollapsible::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();
|
|
InsetCollapsible::CollapseStatus status = ert->status(*bv);
|
|
switch (status) {
|
|
case InsetCollapsible::Open: openRB->setChecked(true); break;
|
|
case InsetCollapsible::Collapsed: collapsedRB->setChecked(true); break;
|
|
}
|
|
}
|
|
|
|
|
|
bool GuiERT::checkWidgets(bool readonly) const
|
|
{
|
|
ertBG->setEnabled(!readonly);
|
|
return InsetParamsWidget::checkWidgets();
|
|
}
|
|
|
|
|
|
} // namespace frontend
|
|
} // namespace lyx
|
|
|
|
#include "moc_GuiERT.cpp"
|