]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiSymbols.h
cf2507782f20a399a10de50f5ec954f50c582184
[lyx.git] / src / frontends / qt4 / GuiSymbols.h
1 // -*- C++ -*-
2 /**
3  * \file GuiSymbols.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Jürgen Spitzmüller
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GUISYMBOLSDIALOG_H
13 #define GUISYMBOLSDIALOG_H
14
15 #include "DialogView.h"
16 #include "ui_SymbolsUi.h"
17
18 class QListWidgetItem;
19
20 namespace lyx {
21 namespace frontend {
22
23 class GuiSymbols : public DialogView, public Ui::SymbolsUi
24 {
25         Q_OBJECT
26
27 public:
28         GuiSymbols(GuiView & lv);
29
30         /// Dialog inherited methods
31         //@{
32         void updateView();
33         void dispatchParams();
34         void enableView(bool enable);
35         bool isBufferDependent() const { return true; }
36         virtual kb_action getLfun() const { return LFUN_SELF_INSERT; }\r
37         //@}
38
39 public Q_SLOTS:
40         void on_applyPB_clicked();
41         void on_okPB_clicked();
42         void on_closePB_clicked();
43         void on_symbolsLW_itemActivated(QListWidgetItem *);
44         void on_symbolsLW_itemClicked(QListWidgetItem * item);
45         void on_categoryCO_activated(QString const & text);
46         void on_chosenLE_returnPressed();
47         void on_chosenLE_textChanged(QString const &);
48
49 private:
50         /// update the widgets (symbol browser, category combo)
51         void updateSymbolList();
52         /// get the unicode block associated with \p c
53         QString const getBlock(char_type c) const;
54         /// the encoding at cursor position
55         std::string encoding_;
56         /// which blocks do we actually include?
57         typedef std::map<QString, QListWidgetItem *> UsedBlocks;
58         ///
59         UsedBlocks used_blocks;
60 };
61
62 } // namespace frontend
63 } // namespace lyx
64
65 #endif // GUISYMBOLSDIALOG_H