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