-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working on blur and a preview window. WIP.
- Loading branch information
1 parent
06705d0
commit cf17d94
Showing
23 changed files
with
465 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#include "previewwindow.h" | ||
#include "ui_previewwindow.h" | ||
|
||
#include "layermanager.h" | ||
|
||
PreviewWindow::PreviewWindow(QWidget *parent) : | ||
QWidget(parent), | ||
ui(new Ui::PreviewWindow) | ||
{ | ||
ui->setupUi(this); | ||
|
||
connect(ui->btn5back, &QPushButton::clicked, this, &PreviewWindow::fiveBackwards); | ||
connect(ui->btn1back, &QPushButton::clicked, this, &PreviewWindow::oneBackwards); | ||
connect(ui->btn1fwd, &QPushButton::clicked, this, &PreviewWindow::oneForwards); | ||
connect(ui->btn5fwd, &QPushButton::clicked, this, &PreviewWindow::fiveForwards); | ||
connect(ui->btnClose, &QPushButton::clicked, this, &PreviewWindow::exitWindow); | ||
} | ||
|
||
PreviewWindow::~PreviewWindow() | ||
{ | ||
delete ui; | ||
} | ||
|
||
void PreviewWindow::setCore(Editor *editor) | ||
{ | ||
mEditor = editor; | ||
} | ||
|
||
void PreviewWindow::fiveBackwards() | ||
{ | ||
if (mEditor->currentFrame() > 5) | ||
mEditor->scrubTo(mEditor->currentFrame() - 5); | ||
else | ||
mEditor->scrubTo(1); | ||
} | ||
|
||
void PreviewWindow::oneBackwards() | ||
{ | ||
if (mEditor->currentFrame() > 1) | ||
mEditor->scrubBackward(); | ||
} | ||
|
||
void PreviewWindow::oneForwards() | ||
{ | ||
mEditor->scrubForward(); | ||
} | ||
|
||
void PreviewWindow::fiveForwards() | ||
{ | ||
mEditor->scrubTo(mEditor->currentFrame() + 5); | ||
} | ||
|
||
void PreviewWindow::exitWindow() | ||
{ | ||
mEditor->layers()->setIsPreview(false); | ||
close(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#ifndef PREVIEWWINDOW_H | ||
#define PREVIEWWINDOW_H | ||
|
||
#include <QWidget> | ||
#include <editor.h> | ||
|
||
class Editor; | ||
|
||
namespace Ui { | ||
class PreviewWindow; | ||
} | ||
|
||
class PreviewWindow : public QWidget | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit PreviewWindow(QWidget *parent = nullptr); | ||
~PreviewWindow(); | ||
|
||
void setCore(Editor* editor); | ||
|
||
private: | ||
Ui::PreviewWindow *ui; | ||
|
||
void fiveBackwards(); | ||
void oneBackwards(); | ||
void oneForwards(); | ||
void fiveForwards(); | ||
void exitWindow(); | ||
|
||
Editor* mEditor = nullptr; | ||
}; | ||
|
||
#endif // PREVIEWWINDOW_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.