#pragma once #include #include "iProperty_global.h" class QPainter; namespace Ui { class I_PROPERTY_EXPORT ZxSymbolPullList; } class ZxSymbolPullList : public QFrame { Q_OBJECT public: explicit ZxSymbolPullList(QWidget *parent = 0); ~ZxSymbolPullList(); int symbolNo(); void moveToProperPlace(const QPoint& ownerPosGlobal, const QSize & ownerSize); signals: void symbolChanged(int); public slots: void sltScrollBarChanged(int); protected: virtual void paintEvent(QPaintEvent *e); virtual void mouseMoveEvent(QMouseEvent *e); virtual void mousePressEvent(QMouseEvent *e); private: void drawCellSymbols(); void drawCellSelectedFlag(); int findCurrentCell(QPoint pos); private: Ui::ZxSymbolPullList *ui; int curSymbolIndex; int startSerialNumber; };