mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-05 14:30:03 +01:00
added options to window
This commit is contained in:
@@ -15,6 +15,7 @@ DisplayWindow::DisplayWindow(QWidget *parent) : QDialog(parent) {
|
||||
hide();
|
||||
gl_display = new glDisplayWindow();
|
||||
gl_display->setAnimating(true);
|
||||
//gl_display->show();
|
||||
}
|
||||
|
||||
void DisplayWindow::showMax() {
|
||||
|
||||
@@ -19,6 +19,7 @@ void _gluPerspective( GLdouble fovY, GLdouble aspect, GLdouble zNear, GLdouble z
|
||||
glFrustum( -fW, fW, -fH, fH, zNear, zFar );
|
||||
}
|
||||
|
||||
|
||||
glDisplayWindow::glDisplayWindow(QWindow *parent)
|
||||
: QWindow(parent)
|
||||
, m_animating(false)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <QtGui/QWindow>
|
||||
#include <QtGui/QOpenGLFunctions>
|
||||
|
||||
#include"ac.h"
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QPainter;
|
||||
class QOpenGLContext;
|
||||
@@ -42,6 +42,7 @@ private:
|
||||
QOpenGLPaintDevice *m_device;
|
||||
GLuint tex;
|
||||
QImage frame;
|
||||
cv::Mat copy_mat;
|
||||
bool updated;
|
||||
};
|
||||
|
||||
|
||||
@@ -150,6 +150,7 @@ AC_MainWindow::AC_MainWindow(QWidget *parent) : QMainWindow(parent) {
|
||||
define_window = new DefineWindow(this);
|
||||
define_window->hide();
|
||||
define_window->main_window = this;
|
||||
|
||||
/*
|
||||
QString arg = "http://lostsidedead.com/ac/version.txt";
|
||||
QUrl url = QUrl::fromEncoded(arg.toLocal8Bit());
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
OptionsWindow::OptionsWindow(QWidget *parent) : QDialog(parent) {
|
||||
setFixedSize(170, 180);
|
||||
setFixedSize(170, 225);
|
||||
createControls();
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ void OptionsWindow::createControls() {
|
||||
label_x->setGeometry(10, 10, 100, 25);
|
||||
op_thread = new QLineEdit("4", this);
|
||||
op_thread->setGeometry(110, 10, 50, 25);
|
||||
QLabel *label_y = new QLabel(tr("Intensity: "), this);
|
||||
QLabel *label_y = new QLabel(tr("Difference: "), this);
|
||||
label_y->setGeometry(10, 40, 100, 25);
|
||||
op_intensity = new QLineEdit("55", this);
|
||||
op_intensity->setGeometry(110, 40, 50, 25);
|
||||
@@ -26,10 +26,21 @@ void OptionsWindow::createControls() {
|
||||
fps_delay = new QLineEdit("60", this);
|
||||
fps_delay->setGeometry(110, 100, 50, 25);
|
||||
|
||||
QLabel *_fwait = new QLabel(tr("Wait:"), this);
|
||||
_fwait->setGeometry(10, 130, 50, 25);
|
||||
fwait = new QLineEdit("5", this);
|
||||
fwait->setGeometry(110, 130, 50, 25);
|
||||
|
||||
QLabel *_level = new QLabel(tr("Level:"), this);
|
||||
_level->setGeometry(10, 160, 50, 25);
|
||||
level = new QLineEdit("125", this);
|
||||
level->setGeometry(110, 160, 50, 25);
|
||||
|
||||
op_setpref = new QPushButton(tr("Set"), this);
|
||||
op_setpref->setGeometry(10, 140, 100, 25);
|
||||
op_setpref->setGeometry(10, 190, 100, 25);
|
||||
connect(op_setpref, SIGNAL(clicked()), this, SLOT(setValues()));
|
||||
|
||||
|
||||
}
|
||||
|
||||
void OptionsWindow::setValues() {
|
||||
@@ -56,8 +67,18 @@ void OptionsWindow::setValues() {
|
||||
|
||||
ac::setMaxAllocated(max_frames);
|
||||
QString text;
|
||||
|
||||
int level_ = atoi(level->text().toStdString().c_str());
|
||||
int wait_ = atoi(fwait->text().toStdString().c_str());
|
||||
|
||||
if(level_ < 0 || wait_ < 0) {
|
||||
QMessageBox::information(this, tr("Error requires valid level/wait"), tr("Requires Level/Intensity greater than zero value"));
|
||||
return;
|
||||
}
|
||||
ac::setVariableWait(wait_);
|
||||
ac::setColorLevel(level_);
|
||||
QTextStream stream(&text);
|
||||
stream << tr("Thread Count set to: ") << thread_count << tr(" and Intensity set to: ") << intensity << tr("\nMaximum Stored Frames: ") << max_frames << tr("\n") << tr("Delay: ") << delay_value << "\n";;
|
||||
stream << tr("Thread Count set to: ") << thread_count << tr(" and Intensity set to: ") << intensity << tr("\nMaximum Stored Frames: ") << max_frames << tr("\n") << tr("Delay: ") << delay_value << "\n" << tr("Wait: ") << wait_ << "\n" << tr("Level: ") << level_ << "\n";
|
||||
QMessageBox::information(this, tr("Pref Value Set"), text);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ private:
|
||||
Playback *playback;
|
||||
QLineEdit *op_max_frames;
|
||||
QLineEdit *fps_delay;
|
||||
QLineEdit *level, *fwait;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -90,7 +90,6 @@ signals:
|
||||
void stopRecording();
|
||||
void frameIncrement();
|
||||
void resetIndex();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user