// -*- C++ -*-
/**
- * \file GuiTexinfo.h
+ * \file GuiTexInfo.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Edwin Leuven
+ * \author Herbert Voß
*
* Full author contact details are available in file CREDITS.
*/
-#ifndef QTEXINFO_H
-#define QTEXINFO_H
+#ifndef GUITEXINFO_H
+#define GUITEXINFO_H
-#include "GuiDialogView.h"
-#include "ControlTexinfo.h"
+#include "GuiDialog.h"
#include "ui_TexinfoUi.h"
+#include "qt_helpers.h"
-#include <QDialog>
-
-#include <map>
-#include <vector>
namespace lyx {
namespace frontend {
-class GuiTexinfo;
-
-class GuiTexinfoDialog : public QDialog, public Ui::TexinfoUi
+class GuiTexInfo : public GuiDialog, public Ui::TexinfoUi
{
Q_OBJECT
+
public:
- GuiTexinfoDialog(GuiTexinfo * form);
-public Q_SLOTS:
- virtual void updateView();
-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_;
-};
+ ///
+ GuiTexInfo(GuiView & lv);
+ /// the file extensions. order matters in GuiTexInfo::fileType()
+ enum TexFileType { ClsType = 0, StyType, BstType, DummyLastType };
+public Q_SLOTS:
+ ///
+ void updateView();
-///
-class GuiTexinfo : public GuiView<GuiTexinfoDialog>
-{
-public:
+private Q_SLOTS:
+ ///
+ void change_adaptor();
///
- friend class GuiTexinfoDialog;
+ void rescanClicked();
///
- GuiTexinfo(GuiDialog &);
- /// parent controller
- ControlTexinfo & controller()
- { return static_cast<ControlTexinfo &>(this->getController()); }
- /// parent controller
- ControlTexinfo const & controller() const
- { return static_cast<ControlTexinfo const &>(this->getController()); }
+ void viewClicked();
+ ///
+ void enableViewPB();
+
private:
- /// Apply changes
- virtual void applyView() {}
- /// update (do we need this?)
- virtual void update_contents() {}
- /// build the dialog
- virtual void build_dialog();
+ /// Nothing to initialise in this case.
+ bool initialiseParams(std::string const &) { return true; }
///
- void updateStyles(ControlTexinfo::texFileSuffix);
+ void clearParams() {}
///
- void updateStyles();
+ void dispatchParams() {}
///
- bool warningPosted;
+ bool isBufferDependent() const { return false; }
///
- ControlTexinfo::texFileSuffix activeStyle;
+ void apply() {}
+
+ ///
+ void updateStyles(TexFileType);
///
- typedef std::vector<std::string> ContentsType;
- std::map<ControlTexinfo::texFileSuffix, ContentsType> texdata_;
+ void updateStyles();
+ ///
+ bool warningPosted_;
+ ///
+ TexFileType activeStyle_;
+
+ /// show contents af a file
+ void viewFile(QString const & filename) const;
+ /// show all classoptions
+ //std::string classOptions(std::string const & filename) const;
+
+ QStringList texdata_[DummyLastType];
};
+
} // namespace frontend
} // namespace lyx
-#endif // QTEXINFO_H
+#endif // GUITEXINFO_H