start camera session dialog

This commit is contained in:
lostjared
2017-02-02 01:29:08 -08:00
parent 066e5c965d
commit 5a4c8b3f5d
3 changed files with 48 additions and 1 deletions

View File

@@ -1,13 +1,48 @@
#include "new_dialog.h" #include "new_dialog.h"
CaptureCamera::CaptureCamera(QWidget *parent) : QDialog(parent) { CaptureCamera::CaptureCamera(QWidget *parent) : QDialog(parent) {
setFixedSize(640, 480); setFixedSize(290, 120);
setWindowTitle("Capture from Webcam"); setWindowTitle("Capture from Webcam");
setWindowIcon(QPixmap(":/images/icon.png")); setWindowIcon(QPixmap(":/images/icon.png"));
createControls(); createControls();
} }
void CaptureCamera::createControls() { void CaptureCamera::createControls() {
QLabel *res = new QLabel("Resolution: ", this);
res->setGeometry(10, 10, 75, 20);
combo_res = new QComboBox(this);
combo_res->setGeometry(85, 10, 200, 25);
combo_res->addItem("640x480 (SD)");
combo_res->addItem("1280x720 (HD)");
combo_res->addItem("1920x1080 (Full HD)");
QLabel *dev = new QLabel("Device: ", this);
dev->setGeometry(10, 35, 50, 20);
combo_device = new QComboBox(this);
combo_device->setGeometry(85, 35, 200, 25);
for(int i = 0; i < 10; ++i) {
QString s;
QTextStream stream(&s);
stream << i;
combo_device->addItem(*stream.string());
}
btn_select = new QPushButton("Save Directory", this);
btn_select->setGeometry(10, 65, 100, 20);
output_dir = new QLineEdit("", this);
output_dir->setGeometry(110, 65, 175, 20);
output_dir->setReadOnly(true);
chk_record = new QCheckBox("Record", this);
chk_record->setGeometry(10, 95, 100, 20);
btn_start = new QPushButton("Start", this);
btn_start->setGeometry(185, 95, 100, 20);
connect(btn_start, SIGNAL(clicked()), this, SLOT(btn_Start()));
connect(btn_select, SIGNAL(clicked()), this, SLOT(btn_Select()));
}
void CaptureCamera::btn_Select() {
}
void CaptureCamera::btn_Start() {
} }

View File

@@ -9,6 +9,15 @@ class CaptureCamera : public QDialog {
public: public:
CaptureCamera(QWidget *parent = 0); CaptureCamera(QWidget *parent = 0);
void createControls(); void createControls();
QComboBox *combo_res, *combo_device;
QLineEdit *output_dir;
QCheckBox *chk_record;
QPushButton *btn_start, *btn_select;
public slots:
void btn_Select();
void btn_Start();
}; };
class CaptureVideo : public QDialog { class CaptureVideo : public QDialog {

View File

@@ -15,6 +15,9 @@
#include<QAction> #include<QAction>
#include<QStatusBar> #include<QStatusBar>
#include<QMessageBox> #include<QMessageBox>
#include<QLabel>
#include<QTextStream>
#include<QLineEdit>
#include"ac.h" #include"ac.h"
#include"fractal.h" #include"fractal.h"
#include<unordered_map> #include<unordered_map>