lyx_mirror/src/frontends/qt4/GuiTexinfo.h
André Pönitz fc36725282 Merge QController into individual dialogs. Also various cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19961 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-31 22:16:11 +00:00

86 lines
1.7 KiB
C++

// -*- C++ -*-
/**
* \file GuiTexinfo.h
* 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.
*/
#ifndef QTEXINFO_H
#define QTEXINFO_H
#include "GuiDialogView.h"
#include "ControlTexinfo.h"
#include "ui_TexinfoUi.h"
#include <QDialog>
#include <map>
#include <vector>
namespace lyx {
namespace frontend {
class GuiTexinfo;
class GuiTexinfoDialog : public QDialog, public Ui::TexinfoUi
{
Q_OBJECT
public:
GuiTexinfoDialog(GuiTexinfo * form);
public Q_SLOTS:
virtual void update();
protected Q_SLOTS:
virtual void change_adaptor();
virtual void rescanClicked();
virtual void viewClicked();
virtual void enableViewPB();
protected:
virtual void closeEvent(QCloseEvent * e);
private:
GuiTexinfo * form_;
};
///
class GuiTexinfo : public GuiView<GuiTexinfoDialog>
{
public:
///
friend class GuiTexinfoDialog;
///
GuiTexinfo(Dialog &);
/// parent controller
ControlTexinfo & controller()
{ return static_cast<ControlTexinfo &>(this->getController()); }
/// parent controller
ControlTexinfo const & controller() const
{ return static_cast<ControlTexinfo const &>(this->getController()); }
private:
/// Apply changes
virtual void apply() {}
/// update (do we need this?)
virtual void update_contents() {}
/// build the dialog
virtual void build_dialog();
///
void updateStyles(ControlTexinfo::texFileSuffix);
///
void updateStyles();
///
bool warningPosted;
///
ControlTexinfo::texFileSuffix activeStyle;
///
typedef std::vector<std::string> ContentsType;
std::map<ControlTexinfo::texFileSuffix, ContentsType> texdata_;
};
} // namespace frontend
} // namespace lyx
#endif // QTEXINFO_H