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.
14 #include "QTexinfoDialog.h"
16 #include "qt_helpers.h"
18 #include "support/filetools.h"
20 #include <qcheckbox.h>
22 #include <qpushbutton.h>
24 using lyx::support::OnlyFilename;
31 typedef QController<ControlTexinfo, QView<QTexinfoDialog> > base_class;
33 QTexinfo::QTexinfo(Dialog & parent)
34 : base_class(parent, _("LyX: LaTeX Information")),
35 warningPosted(false), activeStyle(ControlTexinfo::cls)
40 void QTexinfo::build_dialog()
42 dialog_.reset(new QTexinfoDialog(this));
44 updateStyles(ControlTexinfo::cls);
46 bcview().setCancel(dialog_->closePB);
50 void QTexinfo::updateStyles(ControlTexinfo::texFileSuffix whichStyle)
52 ContentsType & data = texdata_[whichStyle];
53 getTexFileList(whichStyle, data);
55 bool const withFullPath = dialog_->path->isChecked();
57 dialog_->fileList->clear();
58 ContentsType::const_iterator it = data.begin();
59 ContentsType::const_iterator end = data.end();
60 for (; it != end; ++it) {
61 string const line = withFullPath ? *it : OnlyFilename(*it);
62 dialog_->fileList->insertItem(toqstr(line));
65 activeStyle = whichStyle;
69 void QTexinfo::updateStyles()
71 updateStyles(activeStyle);
74 } // namespace frontend