X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FBulletsModule.h;h=8feeb22b908f2c53ecbcdbd59416605282f77625;hb=ee7dd4a11ea21851e7e32164c66b37d3bc8ac31d;hp=9481a64df36747dbec366c3c391e9abd1b11d67d;hpb=f92abd55763deb18c9056043aa3877d526fadc36;p=lyx.git diff --git a/src/frontends/qt4/BulletsModule.h b/src/frontends/qt4/BulletsModule.h index 9481a64df3..8feeb22b90 100644 --- a/src/frontends/qt4/BulletsModule.h +++ b/src/frontends/qt4/BulletsModule.h @@ -9,85 +9,53 @@ * Full author contact details are available in file CREDITS. */ -#ifndef QBULLETSMODULE_H -#define QBULLETSMODULE_H +#ifndef BULLETSMODULE_H +#define BULLETSMODULE_H - -#include "ui/BulletsUi.h" +#include "ui_BulletsUi.h" #include "Bullet.h" -#include #include -// class QBrowseBox; -class QPushButton; -class QComboBox; -class QPixmap; -class BulletsModule : public QWidget, public Ui::BulletsUi { - Q_OBJECT -public: +namespace lyx { - BulletsModule(QWidget * parent = 0, const char * name = 0, Qt::WFlags fl = 0); +class BulletsModule : public QWidget, public Ui::BulletsUi +{ + Q_OBJECT - ~BulletsModule(); +public: + /// + BulletsModule(QWidget * parent = 0); /// set a bullet - void setBullet(int level, const Bullet & bullet); - + void setBullet(int level, Bullet const & bullet); /// get bullet setting - Bullet const & getBullet(int level) const; + Bullet const & bullet(int level) const; + /// update 1st level + void init(); -signals: +Q_SIGNALS: void changed(); -protected slots: - - /// menu callbacks - 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); - - void updateSizes(); - - void clicked1(); - void clicked2(); - void clicked3(); - void clicked4(); - - void selected1(); - void selected2(); - void selected3(); - void selected4(); - - /// set custom (text) bullet - void setCustom(); +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: - QPixmap getPixmap(int font, int character); - - /// 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; + void selectItem(int font, int character, bool select); + void setupPanel(QListWidget * lw, QString const & panelname, + std::string const & fname); /// store results - boost::array bullets_; - -/* QBrowseBox * standard_; - QBrowseBox * maths_; - QBrowseBox * ding1_; - QBrowseBox * ding2_; - QBrowseBox * ding3_; - QBrowseBox * ding4_;*/ - Bullet * bullet_pressed_; + Bullet bullets_[4]; + int current_font_; + int current_char_; }; +} // namespace lyx + #endif // BULLETSMODULE_H