mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-28 20:45:47 +00:00
684299d107
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8801 a592a061-630c-0410-9148-cb99ea01b6c8
65 lines
1.4 KiB
C
65 lines
1.4 KiB
C
/**
|
|
* \file QCharacterDialog.C
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Edwin Leuven
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
#include "QCharacterDialog.h"
|
|
|
|
#include <qcheckbox.h>
|
|
#include <qcombobox.h>
|
|
#include <qpushbutton.h>
|
|
|
|
namespace lyx {
|
|
namespace frontend {
|
|
|
|
QCharacterDialog::QCharacterDialog(QCharacter * form)
|
|
: QCharacterDialogBase(0, 0, false, 0),
|
|
form_(form)
|
|
{
|
|
connect(okPB, SIGNAL(clicked()),
|
|
form_, SLOT(slotOK()));
|
|
connect(applyPB, SIGNAL(clicked()),
|
|
form_, SLOT(slotApply()));
|
|
connect(closePB, SIGNAL(clicked()),
|
|
form_, SLOT(slotClose()));
|
|
}
|
|
|
|
|
|
void QCharacterDialog::change_adaptor()
|
|
{
|
|
form_->changed();
|
|
|
|
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);
|
|
}
|
|
|
|
|
|
void QCharacterDialog::closeEvent(QCloseEvent * e)
|
|
{
|
|
form_->slotWMHide();
|
|
e->accept();
|
|
}
|
|
|
|
} // namespace frontend
|
|
} // namespace lyx
|