mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-18 12:50:07 +01:00
working on chroma window
This commit is contained in:
@@ -3,9 +3,19 @@
|
|||||||
|
|
||||||
|
|
||||||
ChromaWindow::ChromaWindow(QWidget *parent) : QDialog(parent) {
|
ChromaWindow::ChromaWindow(QWidget *parent) : QDialog(parent) {
|
||||||
|
setFixedSize(800, 600);
|
||||||
|
setWindowTitle(tr("Chroma Key"));
|
||||||
|
setWindowIcon(QPixmap(":/images/icon.png"));
|
||||||
createControls();
|
createControls();
|
||||||
|
color_dialog = new QColorDialog(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChromaWindow::createControls() {
|
void ChromaWindow::createControls() {
|
||||||
|
button_select = new QPushButton("Select Color", this);
|
||||||
|
connect(button_select, SIGNAL(clicked()), this, SLOT(openColorSelect()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ChromaWindow::openColorSelect() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,13 @@ class ChromaWindow : public QDialog {
|
|||||||
public:
|
public:
|
||||||
ChromaWindow(QWidget *parent);
|
ChromaWindow(QWidget *parent);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void openColorSelect();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void createControls();
|
void createControls();
|
||||||
|
QColorDialog *color_dialog;
|
||||||
|
QPushButton *button_select;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -95,6 +95,8 @@ AC_MainWindow::AC_MainWindow(QWidget *parent) : QMainWindow(parent) {
|
|||||||
|
|
||||||
int cindex = filters->findText("Self AlphaBlend");
|
int cindex = filters->findText("Self AlphaBlend");
|
||||||
filters->setCurrentIndex(cindex);
|
filters->setCurrentIndex(cindex);
|
||||||
|
chroma_window = new ChromaWindow(this);
|
||||||
|
chroma_window->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AC_MainWindow::createControls() {
|
void AC_MainWindow::createControls() {
|
||||||
@@ -406,6 +408,9 @@ void AC_MainWindow::createMenu() {
|
|||||||
open_search = new QAction(tr("Search Filters"), this);
|
open_search = new QAction(tr("Search Filters"), this);
|
||||||
open_search->setShortcut(tr("Ctrl+S"));
|
open_search->setShortcut(tr("Ctrl+S"));
|
||||||
controls_menu->addAction(open_search);
|
controls_menu->addAction(open_search);
|
||||||
|
select_key = new QAction(tr("Set Chroma Key"), this);
|
||||||
|
controls_menu->addAction(select_key);
|
||||||
|
connect(select_key, SIGNAL(triggered()), this, SLOT(openColorWindow()));
|
||||||
connect(open_search,SIGNAL(triggered()), this, SLOT(openSearch()));
|
connect(open_search,SIGNAL(triggered()), this, SLOT(openSearch()));
|
||||||
connect(controls_snapshot, SIGNAL(triggered()), this, SLOT(controls_Snap()));
|
connect(controls_snapshot, SIGNAL(triggered()), this, SLOT(controls_Snap()));
|
||||||
connect(controls_pause, SIGNAL(triggered()), this, SLOT(controls_Pause()));
|
connect(controls_pause, SIGNAL(triggered()), this, SLOT(controls_Pause()));
|
||||||
@@ -1225,3 +1230,7 @@ void AC_MainWindow::help_About() {
|
|||||||
void AC_MainWindow::openSearch() {
|
void AC_MainWindow::openSearch() {
|
||||||
search_box->show();
|
search_box->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AC_MainWindow::openColorWindow() {
|
||||||
|
chroma_window->show();
|
||||||
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include "playback_thread.h"
|
#include "playback_thread.h"
|
||||||
#include "search_box.h"
|
#include "search_box.h"
|
||||||
#include "goto_window.h"
|
#include "goto_window.h"
|
||||||
|
#include "chroma_window.h"
|
||||||
|
|
||||||
class SearchWindow;
|
class SearchWindow;
|
||||||
|
|
||||||
@@ -48,6 +49,7 @@ public:
|
|||||||
QAction *clear_image;
|
QAction *clear_image;
|
||||||
QAction *repeat_v;
|
QAction *repeat_v;
|
||||||
QAction *fade_on;
|
QAction *fade_on;
|
||||||
|
QAction *select_key;
|
||||||
double speed_actions[7];
|
double speed_actions[7];
|
||||||
QRadioButton *filter_single, *filter_custom;
|
QRadioButton *filter_single, *filter_custom;
|
||||||
void updateList();
|
void updateList();
|
||||||
@@ -102,6 +104,7 @@ public slots:
|
|||||||
void clear_img();
|
void clear_img();
|
||||||
void repeat_vid();
|
void repeat_vid();
|
||||||
void setFade();
|
void setFade();
|
||||||
|
void openColorWindow();
|
||||||
private:
|
private:
|
||||||
void createControls();
|
void createControls();
|
||||||
void createMenu();
|
void createMenu();
|
||||||
@@ -109,6 +112,7 @@ private:
|
|||||||
CaptureCamera *cap_camera;
|
CaptureCamera *cap_camera;
|
||||||
CaptureVideo *cap_video;
|
CaptureVideo *cap_video;
|
||||||
SearchWindow *search_box;
|
SearchWindow *search_box;
|
||||||
|
ChromaWindow *chroma_window;
|
||||||
GotoWindow *goto_window;
|
GotoWindow *goto_window;
|
||||||
cv::VideoCapture capture_camera, capture_video;
|
cv::VideoCapture capture_camera, capture_video;
|
||||||
cv::VideoWriter writer;
|
cv::VideoWriter writer;
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#include<QProgressBar>
|
#include<QProgressBar>
|
||||||
#include<QRadioButton>
|
#include<QRadioButton>
|
||||||
#include<QLineEdit>
|
#include<QLineEdit>
|
||||||
|
#include<QColorDialog>
|
||||||
#include"ac.h"
|
#include"ac.h"
|
||||||
#include"fractal.h"
|
#include"fractal.h"
|
||||||
#include<unordered_map>
|
#include<unordered_map>
|
||||||
|
|||||||
Reference in New Issue
Block a user