2006-03-05 17:24:44 +00:00
|
|
|
/**
|
|
|
|
* \file QTexinfo.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 "QTexinfo.h"
|
|
|
|
#include "QTexinfoDialog.h"
|
|
|
|
#include "Qt2BC.h"
|
|
|
|
#include "qt_helpers.h"
|
|
|
|
|
|
|
|
#include "support/filetools.h"
|
|
|
|
|
2006-05-03 19:51:15 +00:00
|
|
|
#include <QCheckBox>
|
|
|
|
#include <QListWidget>
|
|
|
|
#include <QPushButton>
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
using std::string;
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
|
|
|
typedef QController<ControlTexinfo, QView<QTexinfoDialog> > base_class;
|
|
|
|
|
|
|
|
QTexinfo::QTexinfo(Dialog & parent)
|
2006-09-09 15:27:44 +00:00
|
|
|
: base_class(parent, lyx::to_utf8(_("TeX Information"))),
|
2006-03-05 17:24:44 +00:00
|
|
|
warningPosted(false), activeStyle(ControlTexinfo::cls)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void QTexinfo::build_dialog()
|
|
|
|
{
|
|
|
|
dialog_.reset(new QTexinfoDialog(this));
|
|
|
|
|
|
|
|
updateStyles(ControlTexinfo::cls);
|
|
|
|
|
|
|
|
bcview().setCancel(dialog_->closePB);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void QTexinfo::updateStyles(ControlTexinfo::texFileSuffix whichStyle)
|
|
|
|
{
|
|
|
|
ContentsType & data = texdata_[whichStyle];
|
|
|
|
bool const withFullPath = dialog_->path->isChecked();
|
|
|
|
|
|
|
|
getTexFileList(whichStyle, data, withFullPath);
|
|
|
|
|
|
|
|
dialog_->fileList->clear();
|
|
|
|
ContentsType::const_iterator it = data.begin();
|
|
|
|
ContentsType::const_iterator end = data.end();
|
|
|
|
for (; it != end; ++it)
|
2006-05-03 19:51:15 +00:00
|
|
|
dialog_->fileList->addItem(toqstr(*it));
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
activeStyle = whichStyle;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void QTexinfo::updateStyles()
|
|
|
|
{
|
|
|
|
updateStyles(activeStyle);
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|