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"
21 #include <QListWidget>
22 #include <QPushButton>
29 typedef QController<ControlTexinfo, QView<QTexinfoDialog> > base_class;
31 QTexinfo::QTexinfo(Dialog & parent)
32 : base_class(parent, _("TeX Information")),
33 warningPosted(false), activeStyle(ControlTexinfo::cls)
38 void QTexinfo::build_dialog()
40 dialog_.reset(new QTexinfoDialog(this));
42 updateStyles(ControlTexinfo::cls);
44 bcview().setCancel(dialog_->closePB);
48 void QTexinfo::updateStyles(ControlTexinfo::texFileSuffix whichStyle)
50 ContentsType & data = texdata_[whichStyle];
51 bool const withFullPath = dialog_->path->isChecked();
53 getTexFileList(whichStyle, data, withFullPath);
55 dialog_->fileList->clear();
56 ContentsType::const_iterator it = data.begin();
57 ContentsType::const_iterator end = data.end();
58 for (; it != end; ++it)
59 dialog_->fileList->addItem(toqstr(*it));
61 activeStyle = whichStyle;
65 void QTexinfo::updateStyles()
67 updateStyles(activeStyle);
70 } // namespace frontend