]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/BulletsModule.h
Minipage is no more (long live the box inset)
[lyx.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 "Bullet.h"
18 #include <boost/array.hpp>
19
20 class QBrowseBox;
21 class QPushButton;
22 class QComboBox;
23 class QPixmap;
24
25 class BulletsModule : public BulletsModuleBase {
26         Q_OBJECT
27 public:
28
29         BulletsModule(QWidget * parent = 0, const char * name = 0, WFlags fl = 0);
30
31         ~BulletsModule();
32
33         /// set a bullet
34         void setBullet(int level, const Bullet & bullet);
35
36         /// get bullet setting
37         Bullet const getBullet(int level);
38
39 signals:
40         void changed();
41
42 protected slots:
43
44         /// menu callbacks
45         void standard(int row, int col);
46         void maths(int row, int col);
47         void ding1(int row, int col);
48         void ding2(int row, int col);
49         void ding3(int row, int col);
50         void ding4(int row, int col);
51
52         void updateSizes();
53
54         void pressed1();
55         void pressed2();
56         void pressed3();
57         void pressed4();
58
59         /// set custom (text) bullet
60         void setCustom();
61
62 private:
63         QPixmap getPixmap(int font, int character);
64
65         /// update GUI view
66         void setBullet(QPushButton * pb, QComboBox * co, Bullet const & b);
67
68         /// set from menu
69         void setCurrentBullet(int font, int character);
70
71         bool tmpbulletset;
72         Bullet tmpbullet;
73
74         /// store results
75         boost::array<Bullet, 4> bullets_;
76
77         QBrowseBox * standard_;
78         QBrowseBox * maths_;
79         QBrowseBox * ding1_;
80         QBrowseBox * ding2_;
81         QBrowseBox * ding3_;
82         QBrowseBox * ding4_;
83 };
84
85 #endif // BULLETSMODULE_H