mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-17 12:20:00 +01:00
added tr for strings
This commit is contained in:
@@ -200,7 +200,7 @@ AC_MainWindow::AC_MainWindow(QWidget *parent) : QMainWindow(parent) {
|
||||
generate_map();
|
||||
setGeometry(100, 100, 800, 600);
|
||||
setFixedSize(800, 600);
|
||||
setWindowTitle("Acid Cam v2 - Qt");
|
||||
setWindowTitle(tr("Acid Cam v2 - Qt"));
|
||||
createControls();
|
||||
createMenu();
|
||||
|
||||
@@ -237,10 +237,10 @@ void AC_MainWindow::createControls() {
|
||||
filters->addItem(filter_n.c_str());
|
||||
}
|
||||
|
||||
btn_add = new QPushButton("Add", this);
|
||||
btn_remove = new QPushButton("Remove", this);
|
||||
btn_moveup = new QPushButton("Move Up", this);
|
||||
btn_movedown = new QPushButton("Move Down", this);
|
||||
btn_add = new QPushButton(tr("Add"), this);
|
||||
btn_remove = new QPushButton(tr("Remove"), this);
|
||||
btn_moveup = new QPushButton(tr("Move Up"), this);
|
||||
btn_movedown = new QPushButton(tr("Move Down"), this);
|
||||
|
||||
btn_add->setGeometry(10, 215, 100, 20);
|
||||
btn_remove->setGeometry(400, 215, 100, 20);
|
||||
@@ -256,14 +256,14 @@ void AC_MainWindow::createControls() {
|
||||
log_text->setGeometry(10, 250, 780,310);
|
||||
log_text->setReadOnly(true);
|
||||
|
||||
QString text = "Acid Cam Filters v";
|
||||
QString text = tr("Acid Cam Filters v");
|
||||
text += ac::version.c_str();
|
||||
text += " loaded.\n";
|
||||
log_text->setText(text);
|
||||
|
||||
filters->setCurrentRow(0);
|
||||
|
||||
chk_negate = new QCheckBox("Negate", this);
|
||||
chk_negate = new QCheckBox(tr("Negate"), this);
|
||||
chk_negate->setGeometry(120,215,100, 20);
|
||||
chk_negate->setCheckState(Qt::Unchecked);
|
||||
|
||||
@@ -271,10 +271,10 @@ void AC_MainWindow::createControls() {
|
||||
|
||||
combo_rgb = new QComboBox(this);
|
||||
combo_rgb->setGeometry(200,215, 190, 25);
|
||||
combo_rgb->addItem("RGB");
|
||||
combo_rgb->addItem("BGR");
|
||||
combo_rgb->addItem("BRG");
|
||||
combo_rgb->addItem("GRB");
|
||||
combo_rgb->addItem(tr("RGB"));
|
||||
combo_rgb->addItem(tr("BGR"));
|
||||
combo_rgb->addItem(tr("BRG"));
|
||||
combo_rgb->addItem(tr("GRB"));
|
||||
|
||||
setWindowIcon(QPixmap(":/images/icon.png"));
|
||||
|
||||
@@ -333,7 +333,7 @@ void AC_MainWindow::createMenu() {
|
||||
connect(combo_rgb, SIGNAL(currentIndexChanged(int)), this, SLOT(cb_SetIndex(int)));
|
||||
|
||||
controls_pause->setCheckable(true);
|
||||
controls_pause->setText("Pause");
|
||||
controls_pause->setText(tr("Pause"));
|
||||
controls_pause->setChecked(false);
|
||||
|
||||
help_about = new QAction(tr("About"), this);
|
||||
@@ -801,7 +801,7 @@ void AC_MainWindow::updateFrame(QImage img) {
|
||||
m = localtime(&t);
|
||||
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 << output_directory << "/" << "AC.Snapshot." << time_stream.str().c_str() << "." << ++index << ".png";
|
||||
stream << output_directory << "/" << "AC2.Snapshot." << time_stream.str().c_str() << "." << ++index << ".png";
|
||||
cv::imwrite(text.toStdString(), mat);
|
||||
QString total;
|
||||
QTextStream stream_total(&total);
|
||||
|
||||
@@ -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