mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-19 21:29:59 +01:00
added tr for strings
This commit is contained in:
@@ -5,20 +5,20 @@
|
||||
CaptureCamera::CaptureCamera(QWidget *parent) : QDialog(parent) {
|
||||
setGeometry(100, 100, 290, 120);
|
||||
setFixedSize(290, 120);
|
||||
setWindowTitle("Capture from Webcam");
|
||||
setWindowTitle(tr("Capture from Webcam"));
|
||||
setWindowIcon(QPixmap(":/images/icon.png"));
|
||||
createControls();
|
||||
}
|
||||
|
||||
void CaptureCamera::createControls() {
|
||||
QLabel *res = new QLabel("Resolution: ", this);
|
||||
QLabel *res = new QLabel(tr("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);
|
||||
QLabel *dev = new QLabel(tr("Device: "), this);
|
||||
dev->setGeometry(10, 35, 50, 20);
|
||||
combo_device = new QComboBox(this);
|
||||
combo_device->setGeometry(85, 35, 200, 25);
|
||||
@@ -28,14 +28,14 @@ void CaptureCamera::createControls() {
|
||||
stream << i;
|
||||
combo_device->addItem(*stream.string());
|
||||
}
|
||||
btn_select = new QPushButton("Save Directory", this);
|
||||
btn_select = new QPushButton(tr("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 = new QCheckBox(tr("Record"), this);
|
||||
chk_record->setGeometry(10, 95, 100, 20);
|
||||
btn_start = new QPushButton("Start", this);
|
||||
btn_start = new QPushButton(tr("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()));
|
||||
@@ -60,7 +60,7 @@ void CaptureCamera::btn_Start() {
|
||||
hide();
|
||||
|
||||
} else {
|
||||
QMessageBox::information(this, "Could not open Capture device", "Make sure you Webcam is pluged in. If you have more than one Webcam use the proper device index.");
|
||||
QMessageBox::information(this, tr("Could not open Capture device"), tr("Make sure you Webcam is pluged in. If you have more than one Webcam use the proper device index."));
|
||||
}
|
||||
} else {
|
||||
QMessageBox::information(this, tr("Error could not open device"), tr("Could not open capture device"));
|
||||
@@ -70,25 +70,25 @@ void CaptureCamera::btn_Start() {
|
||||
CaptureVideo::CaptureVideo(QWidget *parent) : QDialog(parent) {
|
||||
setGeometry(100, 100, 330, 100);
|
||||
setFixedSize(330, 100);
|
||||
setWindowTitle(("Capture from Video"));
|
||||
setWindowTitle(tr("Capture from Video"));
|
||||
setWindowIcon(QPixmap(":/images/icon.png"));
|
||||
createControls();
|
||||
}
|
||||
|
||||
void CaptureVideo::createControls() {
|
||||
btn_setedit = new QPushButton("Source File", this);
|
||||
btn_setedit = new QPushButton(tr("Source File"), this);
|
||||
btn_setedit->setGeometry(10, 10, 110, 20);
|
||||
edit_src = new QLineEdit(this);
|
||||
edit_src->setGeometry(120, 10, 200, 20);
|
||||
edit_src->setReadOnly(true);
|
||||
btn_setout = new QPushButton("Set Output", this);
|
||||
btn_setout = new QPushButton(tr("Set Output"), this);
|
||||
btn_setout->setGeometry(10, 30, 110, 20);
|
||||
edit_outdir = new QLineEdit(this);
|
||||
edit_outdir->setGeometry(120, 30, 200, 20);
|
||||
edit_outdir->setReadOnly(true);
|
||||
btn_start = new QPushButton("Start", this);
|
||||
btn_start = new QPushButton(tr("Start"), this);
|
||||
btn_start->setGeometry(10, 60, 100, 20);
|
||||
chk_record = new QCheckBox("Record", this);
|
||||
chk_record = new QCheckBox(tr("Record"), this);
|
||||
chk_record->setGeometry(110, 60, 100, 20);
|
||||
|
||||
connect(btn_setedit, SIGNAL(clicked()), this, SLOT(btn_SetSourceFile()));
|
||||
@@ -107,7 +107,7 @@ void CaptureVideo::btn_SetSourceFile() {
|
||||
}
|
||||
|
||||
void CaptureVideo::btn_SetOutputDir() {
|
||||
QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"), "/home",QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
|
||||
QString dir = QFileDialog::getExistingDirectory(this, tr("Set Output Directory"), "/home",QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
|
||||
if(dir != "")
|
||||
edit_outdir->setText(dir);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user