2017-07-19 23:20:32 +02:00
|
|
|
#pragma once
|
2015-03-04 21:37:09 +01:00
|
|
|
|
|
|
|
class lcTimelineWidget : public QTreeWidget
|
|
|
|
{
|
2015-03-13 06:26:01 +01:00
|
|
|
Q_OBJECT
|
|
|
|
|
2015-03-04 21:37:09 +01:00
|
|
|
public:
|
|
|
|
lcTimelineWidget(QWidget* Parent);
|
2020-03-22 23:44:41 +01:00
|
|
|
~lcTimelineWidget();
|
2015-03-04 21:37:09 +01:00
|
|
|
|
2015-07-05 03:04:27 +02:00
|
|
|
void Update(bool Clear, bool UpdateItems);
|
2015-03-13 06:26:01 +01:00
|
|
|
void UpdateSelection();
|
|
|
|
|
2020-01-27 03:41:31 +01:00
|
|
|
void InsertStepBefore();
|
|
|
|
void InsertStepAfter();
|
2015-03-15 20:42:11 +01:00
|
|
|
void RemoveStep();
|
2017-02-05 03:40:46 +01:00
|
|
|
void MoveSelection();
|
2023-01-09 02:22:54 +01:00
|
|
|
void MoveSelectionBefore();
|
|
|
|
void MoveSelectionAfter();
|
2017-02-05 03:40:46 +01:00
|
|
|
void SetCurrentStep();
|
|
|
|
|
|
|
|
public slots:
|
2019-12-29 20:48:55 +01:00
|
|
|
void CurrentItemChanged(QTreeWidgetItem* Current, QTreeWidgetItem* Previous);
|
2015-03-13 06:26:01 +01:00
|
|
|
void ItemSelectionChanged();
|
|
|
|
void CustomMenuRequested(QPoint Pos);
|
2020-10-03 12:02:27 +02:00
|
|
|
void PreviewSelection(QTreeWidgetItem* Current);
|
2015-03-08 01:27:11 +01:00
|
|
|
|
|
|
|
protected:
|
2020-03-22 23:44:41 +01:00
|
|
|
void dropEvent(QDropEvent* DropEvent) override;
|
|
|
|
void mousePressEvent(QMouseEvent* MouseEvent) override;
|
2020-12-18 21:15:35 +01:00
|
|
|
void mouseDoubleClickEvent(QMouseEvent* MouseEvent) override;
|
2017-02-05 03:40:46 +01:00
|
|
|
void UpdateModel();
|
2019-12-29 21:33:13 +01:00
|
|
|
void UpdateCurrentStepItem();
|
2015-03-13 06:26:01 +01:00
|
|
|
|
2015-04-15 20:49:17 +02:00
|
|
|
QMap<int, QIcon> mIcons;
|
2015-03-13 06:26:01 +01:00
|
|
|
QMap<lcPiece*, QTreeWidgetItem*> mItems;
|
2019-12-29 21:33:13 +01:00
|
|
|
QTreeWidgetItem* mCurrentStepItem;
|
2015-03-13 06:26:01 +01:00
|
|
|
bool mIgnoreUpdates;
|
2015-03-04 21:37:09 +01:00
|
|
|
};
|