2001-03-05 12:04:43 +00:00
|
|
|
/**
|
2001-08-19 13:25:15 +00:00
|
|
|
* \file QCharacterDialog.C
|
2002-09-24 13:57:09 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-03-05 12:04:43 +00:00
|
|
|
*
|
2002-09-24 13:57:09 +00:00
|
|
|
* \author Edwin Leuven
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2001-03-05 12:04:43 +00:00
|
|
|
*/
|
|
|
|
|
2002-09-24 13:57:09 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
|
2001-08-19 13:25:15 +00:00
|
|
|
#include "QCharacterDialog.h"
|
2001-03-05 12:04:43 +00:00
|
|
|
|
|
|
|
#include <qpushbutton.h>
|
|
|
|
|
2002-10-20 01:48:28 +00:00
|
|
|
|
2001-08-26 17:49:42 +00:00
|
|
|
QCharacterDialog::QCharacterDialog(QCharacter * form)
|
2002-03-21 21:21:28 +00:00
|
|
|
: QCharacterDialogBase(0, 0, false, 0),
|
2001-08-26 17:49:42 +00:00
|
|
|
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
|
|
|
}
|
2002-03-21 21:21:28 +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();
|
2002-03-21 21:21:28 +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);
|
2002-03-21 21:21:28 +00:00
|
|
|
colorCO->setCurrentItem(0);
|
2001-03-05 12:04:43 +00:00
|
|
|
}
|
|
|
|
|
2002-03-21 21:21:28 +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
|
|
|
}
|