2006-03-05 17:24:44 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file QVSpaceDialog.C
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author John Levon
|
|
|
|
|
* \author Edwin Leuven
|
|
|
|
|
* \author J<EFBFBD>rgen Spitzm<EFBFBD>ller
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
|
|
#include "QVSpaceDialog.h"
|
|
|
|
|
#include "QVSpace.h"
|
|
|
|
|
//Added by qt3to4:
|
|
|
|
|
#include <QCloseEvent>
|
|
|
|
|
|
|
|
|
|
#include "lengthcombo.h"
|
|
|
|
|
#include "validators.h"
|
|
|
|
|
#include "qt_helpers.h"
|
|
|
|
|
|
|
|
|
|
#include <QLineEdit>
|
|
|
|
|
#include <QPushButton>
|
|
|
|
|
#include <QValidator>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
namespace frontend {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QVSpaceDialog::QVSpaceDialog(QVSpace * form)
|
|
|
|
|
: form_(form)
|
|
|
|
|
{
|
|
|
|
|
setupUi(this);
|
|
|
|
|
|
2006-12-30 10:23:06 +00:00
|
|
|
|
Q_CONNECT_1(QPushButton, okPB, clicked, bool,
|
|
|
|
|
QVSpace, form_, slotOK, void);
|
|
|
|
|
Q_CONNECT_1(QPushButton, applyPB, clicked, bool,
|
|
|
|
|
QVSpace, form_, slotApply, void);
|
|
|
|
|
Q_CONNECT_1(QPushButton, closePB, clicked, bool,
|
|
|
|
|
QVSpace, form_, slotClose, void);
|
|
|
|
|
|
|
|
|
|
Q_CONNECT_1(QComboBox, spacingCO, highlighted, const QString&,
|
|
|
|
|
QVSpaceDialog, this, change_adaptor, void);
|
|
|
|
|
Q_CONNECT_1(QLineEdit, valueLE, textChanged, const QString&,
|
|
|
|
|
QVSpaceDialog, this, change_adaptor, void);
|
|
|
|
|
Q_CONNECT_1(QComboBox, spacingCO, activated, int,
|
|
|
|
|
QVSpaceDialog, this, enableCustom, int);
|
|
|
|
|
Q_CONNECT_1(QCheckBox, keepCB, clicked, bool,
|
|
|
|
|
QVSpaceDialog, this, change_adaptor, void);
|
|
|
|
|
Q_CONNECT_1(LengthCombo, unitCO, selectionChanged, lyx::LyXLength::UNIT,
|
|
|
|
|
QVSpaceDialog, this, change_adaptor, void);
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
|
|
valueLE->setValidator(unsignedLengthValidator(valueLE));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void QVSpaceDialog::closeEvent(QCloseEvent * e)
|
|
|
|
|
{
|
|
|
|
|
form_->slotWMHide();
|
|
|
|
|
e->accept();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void QVSpaceDialog::change_adaptor()
|
|
|
|
|
{
|
|
|
|
|
form_->changed();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-04-11 10:51:59 +00:00
|
|
|
|
void QVSpaceDialog::enableCustom(int selection)
|
2006-03-05 17:24:44 +00:00
|
|
|
|
{
|
2006-04-11 10:51:59 +00:00
|
|
|
|
bool const enable = selection == 5;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
valueLE->setEnabled(enable);
|
|
|
|
|
unitCO->setEnabled(enable);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
|
} // namespace lyx
|
2006-05-18 08:51:12 +00:00
|
|
|
|
|
|
|
|
|
#include "QVSpaceDialog_moc.cpp"
|