2006-03-05 17:24:44 +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
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QBULLETSMODULE_H
|
|
|
|
#define QBULLETSMODULE_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "ui/BulletsUi.h"
|
|
|
|
#include "Bullet.h"
|
|
|
|
#include <boost/array.hpp>
|
|
|
|
|
2006-04-05 14:02:37 +00:00
|
|
|
#include <QWidget>
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2006-04-05 14:02:37 +00:00
|
|
|
class BulletsModule : public QWidget, public Ui::BulletsUi {
|
2006-03-05 17:24:44 +00:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
|
|
|
|
BulletsModule(QWidget * parent = 0, const char * name = 0, Qt::WFlags fl = 0);
|
|
|
|
|
|
|
|
~BulletsModule();
|
|
|
|
|
|
|
|
/// set a bullet
|
2006-08-13 15:44:05 +00:00
|
|
|
void setBullet(int level, Bullet const & bullet);
|
2006-03-05 17:24:44 +00:00
|
|
|
/// get bullet setting
|
|
|
|
Bullet const & getBullet(int level) const;
|
2006-08-13 15:44:05 +00:00
|
|
|
/// update 1st level
|
|
|
|
void init();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2006-06-30 14:37:33 +00:00
|
|
|
Q_SIGNALS:
|
2006-03-05 17:24:44 +00:00
|
|
|
void changed();
|
|
|
|
|
2006-06-30 14:37:33 +00:00
|
|
|
protected Q_SLOTS:
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2006-08-13 15:44:05 +00:00
|
|
|
void on_bulletsizeCO_activated(int level);
|
|
|
|
void on_customCB_toggled(bool);
|
|
|
|
void on_customLE_textEdited(const QString &);
|
|
|
|
void bulletSelected(QListWidgetItem *, QListWidgetItem*);
|
|
|
|
void showLevel(int);
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
private:
|
2006-08-14 15:07:13 +00:00
|
|
|
void selectItem(int font, int character, bool select);
|
2006-08-13 15:44:05 +00:00
|
|
|
void setupPanel(QListWidget * lw, QString panelname, std::string fname);
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
/// store results
|
|
|
|
boost::array<Bullet, 4> bullets_;
|
2006-08-13 15:44:05 +00:00
|
|
|
int current_font_;
|
2006-08-14 15:07:13 +00:00
|
|
|
int current_char_;
|
2006-03-05 17:24:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // BULLETSMODULE_H
|