]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiSymbols.h
* some cleanups
[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         //@}
37
38 public Q_SLOTS:
39         void on_applyPB_clicked();
40         void on_okPB_clicked();
41         void on_closePB_clicked();
42         void on_symbolsLW_itemActivated(QListWidgetItem *);
43         void on_symbolsLW_itemClicked(QListWidgetItem * item);
44         void on_categoryCO_activated(QString const & text);
45         void on_chosenLE_returnPressed();
46         void on_chosenLE_textChanged(QString const &);
47
48 private:
49         /// update the widgets (symbol browser, category combo)
50         void updateSymbolList();
51         /// get the unicode block associated with \p c
52         QString const getBlock(char_type c) const;
53         /// the encoding at cursor position
54         std::string encoding_;
55         /// which blocks do we actually include?
56         typedef std::map<QString, QListWidgetItem *> UsedBlocks;
57         ///
58         UsedBlocks used_blocks;
59 };
60
61 } // namespace frontend
62 } // namespace lyx
63
64 #endif // GUISYMBOLSDIALOG_H