lyx_mirror/src/frontends/qt3/QTexinfoDialog.C
Bo Peng 0ba726bb7a Add #include "xxx_moc.cpp" to xxx.C files, and stop compiling _moc.cpp individually.
* src/frontends/qt3/[all mocable files].C: add #include _moc.cpp at the end.
	* development/scons/SConstruct: do not compile _moc files individually.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14714 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-16 22:10:20 +00:00

100 lines
1.7 KiB
C

/**
* \file QTexinfoDialog.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 "QTexinfoDialog.h"
#include "QTexinfo.h"
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qlistbox.h>
#include <qpushbutton.h>
using std::vector;
using std::string;
namespace lyx {
namespace frontend {
QTexinfoDialog::QTexinfoDialog(QTexinfo * form)
: QTexinfoDialogBase(0, 0, false, 0),
form_(form)
{
connect(closePB, SIGNAL(clicked()),
form, SLOT(slotClose()));
}
void QTexinfoDialog::change_adaptor()
{
form_->changed();
}
void QTexinfoDialog::closeEvent(QCloseEvent * e)
{
form_->slotWMHide();
e->accept();
}
void QTexinfoDialog::rescanClicked()
{
// build new *Files.lst
rescanTexStyles();
form_->updateStyles();
enableViewPB();
}
void QTexinfoDialog::viewClicked()
{
vector<string>::size_type const fitem = fileList->currentItem();
vector<string> const & data = form_->texdata_[form_->activeStyle];
string file = data[fitem];
if (!path->isChecked())
file = getTexFileFromList(data[fitem],
form_->controller().getFileType(form_->activeStyle));
form_->controller().viewFile(file);
}
void QTexinfoDialog::update()
{
switch (whatStyle->currentItem()) {
case 0:
form_->updateStyles(ControlTexinfo::cls);
break;
case 1:
form_->updateStyles(ControlTexinfo::sty);
break;
case 2:
form_->updateStyles(ControlTexinfo::bst);
break;
default:
break;
}
enableViewPB();
}
void QTexinfoDialog::enableViewPB()
{
viewPB->setEnabled(fileList->currentItem() > -1);
}
} // namespace frontend
} // namespace lyx
#include "QTexinfoDialog_moc.cpp"