reimplemented dragging all field types

This commit is contained in:
itsmattkc
2019-03-13 22:34:26 +11:00
parent 06ed5ea05d
commit 933cbb0304
28 changed files with 265 additions and 178 deletions
+3 -3
View File
@@ -20,13 +20,13 @@
#include "checkboxex.h"
#include "project/undo.h"
#include "undo/undo.h"
CheckboxEx::CheckboxEx(QWidget* parent) : QCheckBox(parent) {
// connect(this, SIGNAL(clicked(bool)), this, SLOT(checkbox_command()));
}
void CheckboxEx::checkbox_command() {
CheckboxCommand* c = new CheckboxCommand(this);
olive::UndoStack.push(c);
CheckboxCommand* c = new CheckboxCommand(this);
olive::UndoStack.push(c);
}
+1 -1
View File
@@ -33,7 +33,7 @@
#include "ui/checkboxex.h"
#include "ui/icons.h"
#include "debug.h"
#include "global/debug.h"
CollapsibleWidget::CollapsibleWidget(QWidget* parent) : QWidget(parent) {
selected = false;
-13
View File
@@ -20,8 +20,6 @@
#include "colorbutton.h"
#include "project/undo.h"
#include <QColorDialog>
ColorButton::ColorButton(QWidget *parent)
@@ -58,14 +56,3 @@ void ColorButton::open_dialog() {
emit color_changed(color);
}
}
ColorCommand::ColorCommand(ColorButton* s, QColor o, QColor n)
: sender(s), old_color(o), new_color(n) {}
void ColorCommand::undo() {
sender->set_color(old_color);
}
void ColorCommand::redo() {
sender->set_color(new_color);
}
-11
View File
@@ -42,15 +42,4 @@ private slots:
void open_dialog();
};
class ColorCommand : public QUndoCommand {
public:
ColorCommand(ColorButton* s, QColor o, QColor n);
void undo();
void redo();
private:
ColorButton* sender;
QColor old_color;
QColor new_color;
};
#endif // COLORBUTTON_H
+2
View File
@@ -66,6 +66,8 @@ EffectUI::EffectUI(Effect* e) :
KeyframeNavigator* nav = new KeyframeNavigator();
nav->enable_keyframes(row->IsKeyframing());
connect(nav, SIGNAL(goto_previous_key()), row, SLOT(GoToPreviousKeyframe()));
connect(nav, SIGNAL(toggle_key()), row, SLOT(ToggleKeyframe()));
connect(nav, SIGNAL(goto_next_key()), row, SLOT(GoToNextKeyframe()));
+2
View File
@@ -1,5 +1,7 @@
#include "icons.h"
#include <QDebug>
#include "global/global.h"
#include "global/config.h"
+2 -2
View File
@@ -20,8 +20,8 @@
#include "keyframedrawing.h"
#include "project/effect.h"
#include "project/clip.h"
#include "effects/effect.h"
#include "timeline/clip.h"
#define KEYFRAME_POINT_COUNT 4
+1
View File
@@ -24,6 +24,7 @@
#include <QPushButton>
#include <QApplication>
#include <QDesktopWidget>
#include <QDebug>
#include "ui/icons.h"
+1
View File
@@ -34,6 +34,7 @@ public:
~KeyframeNavigator();
void enable_keyframe_toggle(bool);
public slots:
void enable_keyframes(bool);
signals:
void goto_previous_key();
+1 -1
View File
@@ -24,7 +24,7 @@
#include <QStyle>
#include <QStyleOptionSlider>
#include "debug.h"
#include "global/debug.h"
#define RESIZE_HANDLE_SIZE 10
+10 -10
View File
@@ -30,19 +30,19 @@ class Media;
class SourceTable : public QTreeView
{
Q_OBJECT
Q_OBJECT
public:
SourceTable(QWidget* parent = 0);
Project* project_parent;
SourceTable(QWidget* parent = 0);
Project* project_parent;
protected:
void mousePressEvent(QMouseEvent*);
void mouseDoubleClickEvent(QMouseEvent *);
void dragEnterEvent(QDragEnterEvent *event);
void dragMoveEvent(QDragMoveEvent *event);
void dropEvent(QDropEvent *event);
void mousePressEvent(QMouseEvent*);
void mouseDoubleClickEvent(QMouseEvent *);
void dragEnterEvent(QDragEnterEvent *event);
void dragMoveEvent(QDragMoveEvent *event);
void dropEvent(QDropEvent *event);
private slots:
void item_click(const QModelIndex& index);
void show_context_menu();
void item_click(const QModelIndex& index);
void show_context_menu();
};
#endif // SOURCETABLE_H