]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/BulletsModule.h
Fix unreported bug related to 3246 by Richard Heck:
[lyx.git] / src / frontends / qt4 / 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/BulletsUi.h"
17 #include "Bullet.h"
18 #include <boost/array.hpp>
19
20 #include <QWidget>
21
22
23 namespace lyx {
24
25 class BulletsModule : public QWidget, public Ui::BulletsUi {
26         Q_OBJECT
27 public:
28
29         BulletsModule(QWidget * parent = 0, const char * name = 0, Qt::WFlags fl = 0);
30
31         ~BulletsModule();
32
33         /// set a bullet
34         void setBullet(int level, Bullet const & bullet);
35         /// get bullet setting
36         Bullet const & getBullet(int level) const;
37         /// update 1st level
38         void init();
39
40 Q_SIGNALS:
41         void changed();
42
43 protected Q_SLOTS:
44
45         void on_bulletsizeCO_activated(int level);
46         void on_customCB_clicked(bool);
47         void on_customLE_textEdited(const QString &);
48         void bulletSelected(QListWidgetItem *, QListWidgetItem*);
49         void showLevel(int);
50
51 private:
52         void selectItem(int font, int character, bool select);
53         void setupPanel(QListWidget * lw, QString panelname, std::string fname);
54
55         /// store results
56         boost::array<Bullet, 4> bullets_;
57         int current_font_;
58         int current_char_;
59 };
60
61
62 } // namespace lyx
63
64 #endif // BULLETSMODULE_H