mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-13 14:32:04 +00:00
0be0fcfd59
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7598 a592a061-630c-0410-9148-cb99ea01b6c8
75 lines
1.5 KiB
C
75 lines
1.5 KiB
C
/**
|
|
* \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 "ControlTexinfo.h"
|
|
#include "QTexinfoDialog.h"
|
|
#include "QTexinfo.h"
|
|
#include "Qt2BC.h"
|
|
#include "qt_helpers.h"
|
|
#include "helper_funcs.h"
|
|
|
|
#include "support/filetools.h"
|
|
#include "support/lstrings.h"
|
|
|
|
#include <qlistbox.h>
|
|
#include <qpushbutton.h>
|
|
#include <qcheckbox.h>
|
|
|
|
using namespace lyx::support;
|
|
|
|
using std::vector;
|
|
|
|
typedef QController<ControlTexinfo, QView<QTexinfoDialog> > base_class;
|
|
|
|
|
|
QTexinfo::QTexinfo(Dialog & parent)
|
|
: base_class(parent, _("LyX: LaTeX Information")),
|
|
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];
|
|
getTexFileList(whichStyle, data);
|
|
|
|
bool const withFullPath = dialog_->path->isChecked();
|
|
|
|
dialog_->fileList->clear();
|
|
ContentsType::const_iterator it = data.begin();
|
|
ContentsType::const_iterator end = data.end();
|
|
for (; it != end; ++it) {
|
|
string const line = withFullPath ? *it : OnlyFilename(*it);
|
|
dialog_->fileList->insertItem(toqstr(line));
|
|
}
|
|
|
|
activeStyle = whichStyle;
|
|
}
|
|
|
|
|
|
void QTexinfo::updateStyles()
|
|
{
|
|
updateStyles(activeStyle);
|
|
}
|