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