|
mkRPG
|
00001 #ifndef BDOCK_H 00002 #define BDOCK_H 00003 00004 #include <QtWidgets> 00005 #include "intertie.h" 00006 #include "bdockwidget.h" 00007 00026 class BDock : public QFrame 00027 { 00028 Q_OBJECT 00029 Q_PROPERTY(bool unfold READ unfold WRITE setUnfold) 00030 Q_PROPERTY(int currentSize READ currentSize WRITE setCurrentSize) 00031 public: 00032 explicit BDock(QString title, BDockWidget *dock, QWidget *parent = 0); 00033 bool unfold() const; 00034 int currentSize() const; 00035 void setCurrentSize(int t); 00036 void setIndex(int i); 00037 inline int index() const{return ind;} 00038 void moveTo(int i, bool inert = true); 00039 void setLength(int l); 00040 00041 signals: 00042 void mouseClick(int i, const QPoint &p); 00043 void mouseMove(int i, const QPoint &p); 00044 void mouseRelease(int i, const QPoint &p); 00045 void movementFinished(int i); 00046 00047 public slots: 00048 void setTitle(QString s); 00049 void setUnfold(bool v); 00050 00051 private slots: 00052 void mouseDoubleClickEvent(QMouseEvent *me); 00053 void mousePressEvent(QMouseEvent *me); 00054 void mouseMoveEvent(QMouseEvent *me); 00055 void mouseReleaseEvent(QMouseEvent *me); 00056 void paintEvent(QPaintEvent *pe); 00057 void resizeEvent(QResizeEvent *re); 00058 void setPosition(int i); 00059 void endOfMovement(); 00060 00061 private: 00062 int ind; 00063 int wHeight; 00064 Intertie zoneSize; 00065 Intertie position; 00066 BDockWidget *dock; 00067 QLabel *name; 00068 QVBoxLayout *lay; 00069 QHBoxLayout *button; 00070 QScrollArea *container; 00071 QToolButton *bUnfold, *bLinked; 00072 BinaryStateMachine dLinked, dUnfold; 00073 }; 00074 00075 #endif // BDOCK_H
1.7.6.1