2002-10-09 08:59:02 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file BulletsModule.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Edwin Leuven
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-10-09 08:59:02 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QBULLETSMODULE_H
|
|
|
|
#define QBULLETSMODULE_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "ui/BulletsModuleBase.h"
|
2002-12-16 22:24:33 +00:00
|
|
|
#include "Bullet.h"
|
|
|
|
#include <boost/array.hpp>
|
2002-10-20 01:48:28 +00:00
|
|
|
|
2002-10-09 08:59:02 +00:00
|
|
|
class QBrowseBox;
|
2003-03-29 01:29:20 +00:00
|
|
|
class QPushButton;
|
|
|
|
class QComboBox;
|
|
|
|
class QPixmap;
|
2002-10-09 08:59:02 +00:00
|
|
|
|
2002-10-20 01:48:28 +00:00
|
|
|
class BulletsModule : public BulletsModuleBase {
|
2002-10-09 08:59:02 +00:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2003-03-29 01:29:20 +00:00
|
|
|
|
|
|
|
BulletsModule(QWidget * parent = 0, const char * name = 0, WFlags fl = 0);
|
|
|
|
|
2002-10-09 08:59:02 +00:00
|
|
|
~BulletsModule();
|
2002-11-12 10:12:06 +00:00
|
|
|
|
2003-03-29 01:29:20 +00:00
|
|
|
/// set a bullet
|
2002-12-16 22:24:33 +00:00
|
|
|
void setBullet(int level, const Bullet & bullet);
|
2003-03-29 01:29:20 +00:00
|
|
|
|
|
|
|
/// get bullet setting
|
|
|
|
Bullet const getBullet(int level);
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void changed();
|
2003-02-25 13:35:26 +00:00
|
|
|
|
2002-11-12 10:12:06 +00:00
|
|
|
protected slots:
|
2003-03-29 01:29:20 +00:00
|
|
|
|
|
|
|
/// menu callbacks
|
2002-11-12 10:12:06 +00:00
|
|
|
void standard(int row, int col);
|
|
|
|
void maths(int row, int col);
|
|
|
|
void ding1(int row, int col);
|
|
|
|
void ding2(int row, int col);
|
|
|
|
void ding3(int row, int col);
|
|
|
|
void ding4(int row, int col);
|
2003-03-29 01:29:20 +00:00
|
|
|
|
|
|
|
void updateSizes();
|
|
|
|
|
|
|
|
void pressed1();
|
|
|
|
void pressed2();
|
|
|
|
void pressed3();
|
|
|
|
void pressed4();
|
|
|
|
|
2002-12-16 22:24:33 +00:00
|
|
|
/// set custom (text) bullet
|
|
|
|
void setCustom();
|
2003-02-25 13:35:26 +00:00
|
|
|
|
2002-10-09 08:59:02 +00:00
|
|
|
private:
|
2002-12-16 22:24:33 +00:00
|
|
|
QPixmap getPixmap(int font, int character);
|
2003-03-29 01:29:20 +00:00
|
|
|
|
|
|
|
/// update GUI view
|
|
|
|
void setBullet(QPushButton * pb, QComboBox * co, Bullet const & b);
|
|
|
|
|
|
|
|
/// set from menu
|
|
|
|
void setCurrentBullet(int font, int character);
|
|
|
|
|
|
|
|
bool tmpbulletset;
|
|
|
|
Bullet tmpbullet;
|
|
|
|
|
2002-12-16 22:24:33 +00:00
|
|
|
/// store results
|
2003-03-29 01:29:20 +00:00
|
|
|
boost::array<Bullet, 4> bullets_;
|
2003-02-25 13:35:26 +00:00
|
|
|
|
2002-11-12 10:12:06 +00:00
|
|
|
QBrowseBox * standard_;
|
|
|
|
QBrowseBox * maths_;
|
|
|
|
QBrowseBox * ding1_;
|
|
|
|
QBrowseBox * ding2_;
|
|
|
|
QBrowseBox * ding3_;
|
|
|
|
QBrowseBox * ding4_;
|
2002-10-09 08:59:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // BULLETSMODULE_H
|