2003-11-29 09:39:35 +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"
|
|
|
|
|
|
2004-05-20 09:36:28 +00:00
|
|
|
|
#include "lengthcombo.h"
|
|
|
|
|
#include "qt_helpers.h"
|
|
|
|
|
|
2003-11-29 09:39:35 +00:00
|
|
|
|
#include <qcombobox.h>
|
2004-05-20 09:36:28 +00:00
|
|
|
|
#include <qlineedit.h>
|
2003-11-29 09:39:35 +00:00
|
|
|
|
#include <qpushbutton.h>
|
|
|
|
|
#include <qvalidator.h>
|
|
|
|
|
|
|
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
|
namespace lyx {
|
|
|
|
|
namespace frontend {
|
2003-11-29 09:39:35 +00:00
|
|
|
|
|
|
|
|
|
QVSpaceDialog::QVSpaceDialog(QVSpace * form)
|
2004-06-01 22:16:28 +00:00
|
|
|
|
: QVSpaceDialogBase(qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget(), 0, false, 0),
|
2003-11-29 09:39:35 +00:00
|
|
|
|
form_(form)
|
|
|
|
|
{
|
|
|
|
|
connect(okPB, SIGNAL(clicked()),
|
|
|
|
|
form_, SLOT(slotOK()));
|
|
|
|
|
connect(applyPB, SIGNAL(clicked()),
|
|
|
|
|
form_, SLOT(slotApply()));
|
|
|
|
|
connect(closePB, SIGNAL(clicked()),
|
|
|
|
|
form_, SLOT(slotClose()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void QVSpaceDialog::closeEvent(QCloseEvent * e)
|
|
|
|
|
{
|
|
|
|
|
form_->slotWMHide();
|
|
|
|
|
e->accept();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void QVSpaceDialog::change_adaptor()
|
|
|
|
|
{
|
|
|
|
|
form_->changed();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void QVSpaceDialog::enableCustom(int)
|
|
|
|
|
{
|
2003-12-01 14:16:27 +00:00
|
|
|
|
bool const enable = spacingCO->currentItem()==5;
|
2003-11-29 09:39:35 +00:00
|
|
|
|
valueLE->setEnabled(enable);
|
|
|
|
|
unitCO->setEnabled(enable);
|
|
|
|
|
}
|
2004-05-19 15:11:37 +00:00
|
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
|
} // namespace lyx
|