]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiTexinfo.h
fix memory leaks
[lyx.git] / src / frontends / qt4 / GuiTexinfo.h
1 // -*- C++ -*-
2 /**
3  * \file GuiTexInfo.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Edwin Leuven
8  * \author Herbert Voß
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef GUITEXINFO_H
14 #define GUITEXINFO_H
15
16 #include "GuiDialog.h"
17 #include "ui_TexinfoUi.h"
18 #include "qt_helpers.h"
19
20 #include <map>
21 #include <vector>
22
23
24 namespace lyx {
25 namespace frontend {
26
27 class GuiTexInfo : public GuiDialog, public Ui::TexinfoUi
28 {
29         Q_OBJECT
30
31 public:
32         ///
33         GuiTexInfo(GuiView & lv);
34         /// the file extensions. order matters in GuiTexInfo::fileType()
35         enum TexFileType { ClsType, StyType, BstType };
36
37 public Q_SLOTS:
38         ///
39         void updateView();
40
41 private Q_SLOTS:
42         ///
43         void change_adaptor();
44         ///
45         void rescanClicked();
46         ///
47         void viewClicked();
48         ///
49         void enableViewPB();
50
51 private:
52         ///
53         void closeEvent(QCloseEvent * e);
54         ///
55         void updateStyles(TexFileType);
56         ///
57         void updateStyles();
58         ///
59         bool warningPosted;
60         ///
61         TexFileType activeStyle;
62         /// Nothing to initialise in this case.
63         bool initialiseParams(std::string const &) { return true; }
64         ///
65         void clearParams() {}
66         ///
67         void dispatchParams() {}
68         ///
69         bool isBufferDependent() const { return false; }
70         ///
71         void apply() {}
72
73         /// show contents af a file
74         void viewFile(std::string const & filename) const;
75         /// show all classoptions
76         std::string classOptions(std::string const & filename) const;
77         /// return file type as string
78         std::string fileType(TexFileType type) const;
79
80         typedef std::vector<std::string> ContentsType;
81         std::map<TexFileType, ContentsType> texdata_;
82 };
83
84
85 } // namespace frontend
86 } // namespace lyx
87
88 #endif // GUITEXINFO_H