classic fourtf commit
This commit is contained in:
+41
-1
@@ -2,19 +2,59 @@
|
||||
#define NOTEBOOKPAGE_H
|
||||
|
||||
#include "QWidget"
|
||||
#include "QRect"
|
||||
#include "QVector"
|
||||
#include "QHBoxLayout"
|
||||
#include "QVBoxLayout"
|
||||
#include "QDragEnterEvent"
|
||||
#include "notebookpage.h"
|
||||
#include "notebooktab.h"
|
||||
#include "chatwidget.h"
|
||||
#include "notebookpagedroppreview.h"
|
||||
|
||||
class NotebookPage : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
NotebookPage(NotebookTab *tab);
|
||||
NotebookPage(QWidget *parent, NotebookTab *tab);
|
||||
NotebookTab* tab;
|
||||
QVBoxLayout parentbox;
|
||||
QHBoxLayout hbox;
|
||||
|
||||
std::pair<int, int> removeFromLayout(ChatWidget* widget);
|
||||
void addToLayout(ChatWidget* widget, std::pair<int, int> position);
|
||||
|
||||
static bool isDraggingSplit;
|
||||
static ChatWidget* draggingSplit;
|
||||
static std::pair<int, int> dropPosition;
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
|
||||
|
||||
void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
|
||||
void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
|
||||
void dragLeaveEvent(QDragLeaveEvent *event) Q_DECL_OVERRIDE;
|
||||
void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
|
||||
|
||||
struct DropRegion
|
||||
{
|
||||
QRect rect;
|
||||
std::pair<int, int> position;
|
||||
|
||||
DropRegion(QRect rect, std::pair<int, int> position)
|
||||
{
|
||||
this->rect = rect;
|
||||
this->position = position;
|
||||
}
|
||||
};
|
||||
|
||||
std::vector<DropRegion> dropRegions;
|
||||
|
||||
NotebookPageDropPreview preview;
|
||||
|
||||
private:
|
||||
void setPreviewRect(QPoint mousePos);
|
||||
};
|
||||
|
||||
#endif // NOTEBOOKPAGE_H
|
||||
|
||||
Reference in New Issue
Block a user