]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiExternal.h
renaming of some methods that hurt the eyes + removal of:
[lyx.git] / src / frontends / qt4 / GuiExternal.h
1 // -*- C++ -*-
2 /**
3  * \file GuiExternal.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GUIEXTERNAL_H
13 #define GUIEXTERNAL_H
14
15 #include "GuiDialogView.h"
16 #include "ControlExternal.h"
17 #include "ui_ExternalUi.h"
18
19 #include <QCloseEvent>
20 #include <QDialog>
21
22 #include <map>
23
24 namespace lyx {
25 namespace frontend {
26
27 class GuiExternal;
28
29 class GuiExternalDialog : public QDialog, public Ui::ExternalUi
30 {
31         Q_OBJECT
32 public:
33         GuiExternalDialog(GuiExternal * form);
34
35         virtual void showView();
36 protected Q_SLOTS:
37         virtual void bbChanged();
38         virtual void browseClicked();
39         virtual void change_adaptor();
40         virtual void editClicked();
41         virtual void extraChanged(const QString&);
42         virtual void formatChanged(const QString&);
43         virtual void getbbClicked();
44         virtual void sizeChanged();
45         virtual void templateChanged();
46         virtual void widthUnitChanged();
47
48 protected:
49         virtual void closeEvent(QCloseEvent * e);
50 private:
51         bool activateAspectratio() const;
52         GuiExternal * form_;
53 };
54
55
56 class GuiExternal : public GuiView<GuiExternalDialog>
57 {
58 public:
59         friend class GuiExternalDialog;
60
61         GuiExternal(GuiDialog &);
62         /// parent controller
63         ControlExternal & controller()
64         { return static_cast<ControlExternal &>(this->getController()); }
65         /// parent controller
66         ControlExternal const & controller() const
67         { return static_cast<ControlExternal const &>(this->getController()); }
68         ///
69         typedef std::map<std::string, QString> MapType;
70 private:
71         /// Apply changes
72         virtual void applyView();
73         /// update
74         virtual void update_contents();
75         /// build the dialog
76         virtual void build_dialog();
77
78         /// Helper function called when the template is changed.
79         void updateTemplate();
80         /// get bounding box from file
81         void getBB();
82
83         MapType extra_;
84 };
85
86 } // namespace frontend
87 } // namespace lyx
88
89 #endif // GUIEXTERNAL_H