2 * \file QCharacterDialog.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "QCharacterDialog.h"
15 #include "QCharacter.h"
17 #include <qcheckbox.h>
18 #include <qpushbutton.h>
19 #include <QCloseEvent>
24 QCharacterDialog::QCharacterDialog(QCharacter * form)
28 connect(okPB, SIGNAL(clicked()),
29 form_, SLOT(slotOK()));
30 connect(applyPB, SIGNAL(clicked()),
31 form_, SLOT(slotApply()));
32 connect(closePB, SIGNAL(clicked()),
33 form_, SLOT(slotClose()));
35 connect( miscCO, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) );
36 connect( sizeCO, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) );
37 connect( familyCO, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) );
38 connect( seriesCO, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) );
39 connect( shapeCO, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) );
40 connect( colorCO, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) );
41 connect( langCO, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) );
42 connect( toggleallCB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
46 void QCharacterDialog::change_adaptor()
50 if (!autoapplyCB->isChecked())
53 // to be really good here, we should set the combos to the values of
54 // the current text, and make it appear as "no change" if the values
55 // stay the same between applys. Might be difficult though wrt to a
58 familyCO->setCurrentIndex(0);
59 seriesCO->setCurrentIndex(0);
60 sizeCO->setCurrentIndex(0);
61 shapeCO->setCurrentIndex(0);
62 miscCO->setCurrentIndex(0);
63 langCO->setCurrentIndex(0);
64 colorCO->setCurrentIndex(0);
68 void QCharacterDialog::closeEvent(QCloseEvent * e)
74 } // namespace frontend
77 #include "QCharacterDialog_moc.cpp"