diff --git a/src/display_window.cpp b/src/display_window.cpp
old mode 100755
new mode 100644
diff --git a/src/display_window.h b/src/display_window.h
old mode 100755
new mode 100644
diff --git a/src/main.cpp b/src/main.cpp
old mode 100755
new mode 100644
diff --git a/src/main_window.cpp b/src/main_window.cpp
old mode 100755
new mode 100644
index d21f22a..9da9566
--- a/src/main_window.cpp
+++ b/src/main_window.cpp
@@ -66,6 +66,9 @@ AC_MainWindow::AC_MainWindow(QWidget *parent) : QMainWindow(parent) {
cap_video = new CaptureVideo(this);
cap_video->setParent(this);
+ search_box = new SearchWindow(this);
+ search_box->setParent(this);
+
statusBar()->showMessage(tr("Acid Cam v2 Loaded - Use File Menu to Start"));
take_snapshot = false;
disp = new DisplayWindow(this);
@@ -232,12 +235,12 @@ void AC_MainWindow::createControls() {
log_text->setGeometry(10, 325, 780,310);
log_text->setReadOnly(true);
-
- QString text = tr("Acid Cam Filters v");
- text += ac::version.c_str();
- text += " loaded.\n";
+ QString text;
+ QTextStream stream(&text);
+ stream << tr("Acid Cam Filters v");
+ stream << ac::version.c_str();
+ stream << " loaded " << filters->count() << " filters.\n";
log_text->setText(text);
-
chk_negate = new QCheckBox(tr("Negate"), this);
chk_negate->setGeometry(120,215,100, 20);
chk_negate->setCheckState(Qt::Unchecked);
@@ -323,6 +326,10 @@ void AC_MainWindow::createMenu() {
controls_showvideo->setEnabled(false);
controls_showvideo->setCheckable(true);
+ open_search = new QAction(tr("Search Filters"), this);
+ open_search->setShortcut(tr("Ctrl+S"));
+ controls_menu->addAction(open_search);
+ connect(open_search,SIGNAL(triggered()), this, SLOT(openSearch()));
connect(controls_snapshot, SIGNAL(triggered()), this, SLOT(controls_Snap()));
connect(controls_pause, SIGNAL(triggered()), this, SLOT(controls_Pause()));
connect(controls_step, SIGNAL(triggered()), this, SLOT(controls_Step()));
@@ -504,11 +511,7 @@ bool AC_MainWindow::startCamera(int res, int dev, const QString &outdir, bool re
struct tm *m;
m = localtime(&t);
QString ext;
-#if defined(__APPLE__) || defined(__linux__)
ext = (type == 0) ? ".mov" : ".avi";
-#else
- ext = (type == 0) ? ".mov" : ".mov";
-#endif
Log(tr("Capture Device Opened [Camera]\n"));
std::ostringstream time_stream;
time_stream << "-" << (m->tm_year + 1900) << "." << (m->tm_mon + 1) << "." << m->tm_mday << "_" << m->tm_hour << "." << m->tm_min << "." << m->tm_sec << "_";
@@ -543,12 +546,8 @@ bool AC_MainWindow::startCamera(int res, int dev, const QString &outdir, bool re
if(recording) {
video_file_name = output_name;
-
-#if defined(__linux__) || defined(__APPLE__)
writer = cv::VideoWriter(output_name.toStdString(), (type == 0) ? CV_FOURCC('m', 'p', '4', 'v') : CV_FOURCC('X','V','I','D'), video_fps, cv::Size(res_w, res_h), true);
-#else
- writer = cv::VideoWriter(output_name.toStdString(), CV_FOURCC('m', 'p', '4', 'v'), video_fps, cv::Size(res_w, res_h), true);
-#endif
+
if(!writer.isOpened()) {
Log(tr("Could not create video writer..\n"));
QMessageBox::information(this, tr("Error"), tr("Incorrect Pathname/Or you do not have permission to write to the directory."));
@@ -614,11 +613,7 @@ bool AC_MainWindow::startVideo(const QString &filename, const QString &outdir, b
struct tm *m;
m = localtime(&t);
QString ext;
-#if defined(__APPLE__) || defined(__linux__)
ext = (type == 0) ? ".mov" : ".avi";
-#else
- ext = (type == 0) ? ".mov" : ".mov";
-#endif
std::ostringstream time_stream;
time_stream << "-" << (m->tm_year + 1900) << "." << (m->tm_mon + 1) << "." << m->tm_mday << "_" << m->tm_hour << "." << m->tm_min << "." << m->tm_sec << "_";
stream_ << outdir << "/" << "Video" << time_stream.str().c_str() << "AC2.Output." << (++index) << ext;
@@ -626,11 +621,8 @@ bool AC_MainWindow::startVideo(const QString &filename, const QString &outdir, b
if(recording) {
video_file_name = output_name;
-#if defined(__linux__) || defined(__APPLE__)
writer = cv::VideoWriter(output_name.toStdString(), (type == 0) ? CV_FOURCC('m', 'p', '4', 'v') : CV_FOURCC('X','V','I','D'), video_fps, cv::Size(res_w, res_h), true);
-#else
- writer = cv::VideoWriter(output_name.toStdString(), CV_FOURCC('m', 'p', '4', 'v'), video_fps, cv::Size(res_w, res_h), true);
-#endif
+
if(!writer.isOpened()) {
Log("Error could not open video writer.\n");
QMessageBox::information(this, tr("Error invalid path"), tr("Incorrect Pathname/Or you do not have permission to write to the directory."));
@@ -885,9 +877,12 @@ void AC_MainWindow::frameInc() {
void AC_MainWindow::help_About() {
QString about_str;
QTextStream stream(&about_str);
- stream << tr("Acid Cam Qt version: ") << ac_version << "
";
+ stream << tr("Acid Cam Qt version: ") << ac_version << " filters: " << ac::version.c_str() << "
";
stream << tr("Engineering by Jared Bruni
This software is dedicated to all the people that struggle with mental illness.
My Social Media Accounts
\n\n GitHub
\nYouTube
Instagram
LostSideDead Facebook
My Facebook
Twitter
\n");
QMessageBox::information(this, tr("About Acid Cam"), about_str);
}
+void AC_MainWindow::openSearch() {
+ search_box->show();
+}
diff --git a/src/main_window.h b/src/main_window.h
old mode 100755
new mode 100644
index a265b5d..7ed4106
--- a/src/main_window.h
+++ b/src/main_window.h
@@ -12,6 +12,7 @@
#include "new_dialog.h"
#include "display_window.h"
#include "playback_thread.h"
+#include "search_box.h"
class AC_MainWindow : public QMainWindow {
Q_OBJECT
@@ -33,6 +34,7 @@ public:
QAction *file_exit, *file_new_capture, *file_new_video;
QAction *controls_snapshot, *controls_pause, *controls_step, *controls_stop, *controls_setimage,*controls_setkey,*controls_showvideo, *clear_images, *reset_filters;
QAction *help_about;
+ QAction *open_search;
QRadioButton *filter_single, *filter_custom;
public slots:
@@ -65,12 +67,14 @@ public slots:
void comboFilterChanged(int pos);
void setFilterSingle();
void setFilterCustom();
+ void openSearch();
private:
void createControls();
void createMenu();
DisplayWindow *disp;
CaptureCamera *cap_camera;
CaptureVideo *cap_video;
+ SearchWindow *search_box;
cv::VideoCapture capture_camera, capture_video;
cv::VideoWriter writer;
unsigned long video_frames;
diff --git a/src/new_dialog.cpp b/src/new_dialog.cpp
old mode 100755
new mode 100644
index 693a33a..4064875
--- a/src/new_dialog.cpp
+++ b/src/new_dialog.cpp
@@ -48,13 +48,10 @@ void CaptureCamera::createControls() {
connect(btn_start, SIGNAL(clicked()), this, SLOT(btn_Start()));
connect(btn_select, SIGNAL(clicked()), this, SLOT(btn_Select()));
-#if defined(__APPLE__) || defined(__linux__)
video_type = new QComboBox(this);
video_type->setGeometry(80, 90, 90, 25);
video_type->addItem("MOV");
video_type->addItem("AVI");
-#endif
-
}
void CaptureCamera::setParent(AC_MainWindow *p) {
@@ -82,11 +79,7 @@ void CaptureCamera::btn_Select() {
void CaptureCamera::btn_Start() {
int vtype;
-#if defined(__APPLE__) || defined(__linux__)
vtype = video_type->currentIndex();
-#else
- vtype = 1;
-#endif
if(output_dir->text().length() > 0) {
if(win_parent->startCamera(combo_res->currentIndex(), combo_device->currentIndex(), output_dir->text(), chk_record->isChecked(), vtype)) {
@@ -124,13 +117,10 @@ void CaptureVideo::createControls() {
chk_record = new QCheckBox(tr("Record"), this);
chk_record->setGeometry(110, 60, 80, 20);
-#if defined(__APPLE__) || defined(__linux__)
video_type = new QComboBox(this);
video_type->setGeometry(180, 55, 120, 25);
video_type->addItem("MOV");
video_type->addItem("AVI");
-#endif
-
connect(btn_setedit, SIGNAL(clicked()), this, SLOT(btn_SetSourceFile()));
connect(btn_setout, SIGNAL(clicked()), this, SLOT(btn_SetOutputDir()));
connect(btn_start, SIGNAL(clicked()), this, SLOT(btn_Start()));
@@ -182,11 +172,7 @@ void CaptureVideo::btn_Start() {
}
int num;
-#if defined(__APPLE__) || defined(__linux__)
num = video_type->currentIndex();
-#else
- num = 1;
-#endif
if(win_parent->startVideo(edit_src->text(), edit_outdir->text(), chk_record->isChecked(), num)) {
hide();
diff --git a/src/new_dialog.h b/src/new_dialog.h
old mode 100755
new mode 100644
diff --git a/src/playback_thread.cpp b/src/playback_thread.cpp
old mode 100755
new mode 100644
diff --git a/src/playback_thread.h b/src/playback_thread.h
old mode 100755
new mode 100644
diff --git a/src/plugin.cpp b/src/plugin.cpp
old mode 100755
new mode 100644
diff --git a/src/plugin.h b/src/plugin.h
old mode 100755
new mode 100644
diff --git a/src/qtheaders.h b/src/qtheaders.h
old mode 100755
new mode 100644
index a65eb88..d8fa074
--- a/src/qtheaders.h
+++ b/src/qtheaders.h
@@ -6,23 +6,7 @@
#ifndef _QT_HEADERS__
#define _QT_HEADERS__
-
-#ifdef __linux__
-#define ac_version "v1.14"
-#endif
-
-#ifdef __APPLE__
-#define ac_version "v1.14"
-#endif
-
-#ifdef _WIN32
-#define ac_version "v1.14"
-#endif
-
-#ifndef ac_version
-#define ac_version "v1.14"
-#endif
-
+#define ac_version "v1.15"
#include
#include
#include
diff --git a/src/search_box.cpp b/src/search_box.cpp
new file mode 100644
index 0000000..bcde78d
--- /dev/null
+++ b/src/search_box.cpp
@@ -0,0 +1,13 @@
+#include "search_box.h"
+
+SearchWindow::SearchWindow(QWidget *parent) : QDialog(parent) {
+ setFixedSize(640, 480);
+ setWindowTitle("Search Filters");
+ setWindowIcon(QPixmap(":/images/icon.png"));
+ createControls();
+}
+
+
+void SearchWindow::createControls() {
+
+}
diff --git a/src/search_box.h b/src/search_box.h
new file mode 100644
index 0000000..3e3c326
--- /dev/null
+++ b/src/search_box.h
@@ -0,0 +1,17 @@
+
+#ifndef __SEARCHBOX__H__
+#define __SEARCHBOX__H__
+
+#include "qtheaders.h"
+
+class SearchWindow : public QDialog {
+ Q_OBJECT
+public:
+ SearchWindow(QWidget *parent = 0);
+ void createControls();
+};
+
+
+
+#endif
+
diff --git a/src/select_image.cpp b/src/select_image.cpp
old mode 100755
new mode 100644
diff --git a/src/select_image.h b/src/select_image.h
old mode 100755
new mode 100644