]> git.lyx.org Git - features.git/blob - src/frontends/qt2/BulletsModule.h
dont use pragma impementation and interface anymore
[features.git] / src / frontends / qt2 / BulletsModule.h
1 // -*- C++ -*-
2 /**
3  * \file BulletsModule.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  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef QBULLETSMODULE_H
13 #define QBULLETSMODULE_H
14
15
16 #include "ui/BulletsModuleBase.h"
17 #include "LString.h"
18 #include <vector>
19 #include "Bullet.h"
20 #include <boost/array.hpp>
21
22 class QBrowseBox;
23 class QListViewItem;
24
25
26 class BulletsModule : public BulletsModuleBase {
27         Q_OBJECT
28 public:
29         BulletsModule(QWidget* parent = 0, const char* name = 0,
30                       WFlags fl = 0);
31         ~BulletsModule();
32
33         ///
34         void setBullet(int level, const Bullet & bullet);
35         ///
36         Bullet getBullet(int level);
37         
38 protected slots:
39         ///
40         void standard(int row, int col);
41         ///
42         void maths(int row, int col);
43         ///
44         void ding1(int row, int col);
45         ///
46         void ding2(int row, int col);
47         ///
48         void ding3(int row, int col);
49         ///
50         void ding4(int row, int col);
51         /// set custom (text) bullet
52         void setCustom();
53         /// make level active
54         void setActive(QListViewItem*);
55         /// set size
56         void setSize(int size);
57         
58 private:
59         /// get the pixmap that matches font/character
60         QPixmap getPixmap(int font, int character);
61         /// get the qlistviewitem of level
62         QListViewItem *  getItem(int level);
63         /// make level active
64         void setActive(int level);
65         /// set bullet for standard font/character
66         void setBullet(int font, int character);
67         /// set bullet for custom text
68         void setBullet(string text);
69         /// pointer to the bullet of the level we're at
70         Bullet * activebullet_;
71         /// qlistviewitem of the level we're at
72         QListViewItem * activeitem_;
73         /// store results
74         boost::array<Bullet,4> bullets_;
75         
76         QBrowseBox * standard_;
77         QBrowseBox * maths_;
78         QBrowseBox * ding1_;
79         QBrowseBox * ding2_;
80         QBrowseBox * ding3_;
81         QBrowseBox * ding4_;
82 };
83
84 #endif // BULLETSMODULE_H