2001-03-05 12:04:43 +00:00
|
|
|
/**
|
2001-08-19 13:25:15 +00:00
|
|
|
* \file QCharacterDialog.C
|
|
|
|
* Copyright 2001 the LyX Team
|
2001-03-05 12:04:43 +00:00
|
|
|
* See the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Edwin Leuven, leuven@fee.uva.nl
|
|
|
|
*/
|
|
|
|
|
2001-08-19 13:25:15 +00:00
|
|
|
#include "QCharacterDialog.h"
|
2001-03-05 12:04:43 +00:00
|
|
|
|
|
|
|
#include <qcombobox.h>
|
|
|
|
#include <qcheckbox.h>
|
|
|
|
#include <qpushbutton.h>
|
|
|
|
#include <qgroupbox.h>
|
|
|
|
|
2001-08-26 17:49:42 +00:00
|
|
|
QCharacterDialog::QCharacterDialog(QCharacter * form)
|
|
|
|
: QCharacterDialogBase(0, 0, false, 0),
|
|
|
|
form_(form)
|
2001-03-05 12:04:43 +00:00
|
|
|
{
|
2001-08-26 17:49:42 +00:00
|
|
|
connect(okPB, SIGNAL(clicked()),
|
|
|
|
form_, SLOT(slotOK()));
|
|
|
|
connect(applyPB, SIGNAL(clicked()),
|
|
|
|
form_, SLOT(slotApply()));
|
|
|
|
connect(closePB, SIGNAL(clicked()),
|
|
|
|
form_, SLOT(slotClose()));
|
2001-03-05 12:04:43 +00:00
|
|
|
}
|
2001-08-19 13:25:15 +00:00
|
|
|
|
2001-03-05 12:04:43 +00:00
|
|
|
|
2001-08-26 17:49:42 +00:00
|
|
|
void QCharacterDialog::change_adaptor()
|
2001-03-05 12:04:43 +00:00
|
|
|
{
|
2001-08-26 17:49:42 +00:00
|
|
|
form_->changed();
|
2001-08-19 13:25:15 +00:00
|
|
|
|
2001-08-26 17:49:42 +00:00
|
|
|
if (!autoapplyCB->isChecked())
|
|
|
|
return;
|
|
|
|
|
|
|
|
// to be really good here, we should set the combos to the values of
|
|
|
|
// the current text, and make it appear as "no change" if the values
|
|
|
|
// stay the same between applys. Might be difficult though wrt to a
|
|
|
|
// moved cursor - jbl
|
|
|
|
form_->slotApply();
|
|
|
|
familyCO->setCurrentItem(0);
|
|
|
|
seriesCO->setCurrentItem(0);
|
|
|
|
sizeCO->setCurrentItem(0);
|
|
|
|
shapeCO->setCurrentItem(0);
|
|
|
|
miscCO->setCurrentItem(0);
|
|
|
|
langCO->setCurrentItem(0);
|
|
|
|
colorCO->setCurrentItem(0);
|
2001-03-05 12:04:43 +00:00
|
|
|
}
|
|
|
|
|
2001-08-19 13:25:15 +00:00
|
|
|
|
|
|
|
void QCharacterDialog::closeEvent(QCloseEvent * e)
|
2001-03-05 12:04:43 +00:00
|
|
|
{
|
2001-08-26 17:49:42 +00:00
|
|
|
form_->slotWMHide();
|
2001-06-05 17:05:51 +00:00
|
|
|
e->accept();
|
2001-03-05 12:04:43 +00:00
|
|
|
}
|