lyx_mirror/src/frontends/qt4/BulletsModule.h
Edwin Leuven 3931b65341 * replace many toggled(bool) with changed() signals
the former is also trigged when updating dialogs. we should use toggled(bool) to en/disable widgets and in situations when we are sure that we always want to act on a toggle

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16724 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-17 13:06:16 +00:00

65 lines
1.3 KiB
C++

// -*- 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>
#include <QWidget>
namespace lyx {
class BulletsModule : public QWidget, public Ui::BulletsUi {
Q_OBJECT
public:
BulletsModule(QWidget * parent = 0, const char * name = 0, Qt::WFlags fl = 0);
~BulletsModule();
/// set a bullet
void setBullet(int level, Bullet const & bullet);
/// get bullet setting
Bullet const & getBullet(int level) const;
/// update 1st level
void init();
Q_SIGNALS:
void changed();
protected Q_SLOTS:
void on_bulletsizeCO_activated(int level);
void on_customCB_clicked(bool);
void on_customLE_textEdited(const QString &);
void bulletSelected(QListWidgetItem *, QListWidgetItem*);
void showLevel(int);
private:
void selectItem(int font, int character, bool select);
void setupPanel(QListWidget * lw, QString panelname, std::string fname);
/// store results
boost::array<Bullet, 4> bullets_;
int current_font_;
int current_char_;
};
} // namespace lyx
#endif // BULLETSMODULE_H