mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-20 13:50:01 +01:00
start camera session dialog
This commit is contained in:
@@ -1,13 +1,48 @@
|
||||
#include "new_dialog.h"
|
||||
|
||||
CaptureCamera::CaptureCamera(QWidget *parent) : QDialog(parent) {
|
||||
setFixedSize(640, 480);
|
||||
setFixedSize(290, 120);
|
||||
setWindowTitle("Capture from Webcam");
|
||||
setWindowIcon(QPixmap(":/images/icon.png"));
|
||||
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() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,15 @@ class CaptureCamera : public QDialog {
|
||||
public:
|
||||
CaptureCamera(QWidget *parent = 0);
|
||||
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 {
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
#include<QAction>
|
||||
#include<QStatusBar>
|
||||
#include<QMessageBox>
|
||||
#include<QLabel>
|
||||
#include<QTextStream>
|
||||
#include<QLineEdit>
|
||||
#include"ac.h"
|
||||
#include"fractal.h"
|
||||
#include<unordered_map>
|
||||
|
||||
Reference in New Issue
Block a user