summaryrefslogtreecommitdiff
path: root/src/mainwindow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cc')
-rw-r--r--src/mainwindow.cc53
1 files changed, 27 insertions, 26 deletions
diff --git a/src/mainwindow.cc b/src/mainwindow.cc
index 81beae0..69e4398 100644
--- a/src/mainwindow.cc
+++ b/src/mainwindow.cc
@@ -85,7 +85,7 @@ MainWindow::MainWindow()
//canvas = new Canvas(this);
canvaswidget = new CanvasWidget(this);
- QToolBar* toolbar = addToolBar("Tools");
+ QToolBar* toolbar = addToolBar(tr("Tools"));
listen = new CanvasToolListen(canvaswidget->canvas, player);
addTool(toolbar, canvaswidget->canvas, listen);
threshold = new CanvasToolThreshold(canvaswidget->canvas);
@@ -102,8 +102,8 @@ MainWindow::MainWindow()
canvaswidget->canvas, SLOT(update()));
addTool(toolbar, canvaswidget->canvas, tool_selections);
- QMenu* fileMenu = menuBar()->addMenu("&File");
- QAction* act_quit = new QAction("&Quit", this);
+ QMenu* fileMenu = menuBar()->addMenu(tr("&File"));
+ QAction* act_quit = new QAction(tr("&Quit"), this);
fileMenu->addAction(act_quit);
connect(act_quit, SIGNAL(triggered()), this, SLOT(close()));
@@ -145,7 +145,7 @@ MainWindow::MainWindow()
connect(&selections, SIGNAL(activeChanged(sel_id_t)),
sorter, SLOT(relayout()));
- QPushButton* btn_playsamples = new QPushButton("Play samples");
+ QPushButton* btn_playsamples = new QPushButton(tr("Play samples"));
connect(btn_playsamples, SIGNAL(clicked()), this, SLOT(playSamples()));
sb_playsamples = new QScrollBar(Qt::Horizontal);
@@ -176,10 +176,10 @@ MainWindow::MainWindow()
//dockWidget->widget()->layout()->addWidget(presets);
tabs = new QTabWidget(this);
- tabs->addTab(createFilesTab(), "Files");
- generateTabId = tabs->addTab(createGenerateTab(), "Generate");
- tabs->addTab(createEditTab(), "Edit");
- tabs->addTab(createExportTab(), "Export");
+ tabs->addTab(createFilesTab(), tr("Files"));
+ generateTabId = tabs->addTab(createGenerateTab(), tr("Generate"));
+ tabs->addTab(createEditTab(), tr("Edit"));
+ tabs->addTab(createExportTab(), tr("Export"));
connect(tabs, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)));
tabChanged(tabs->currentIndex());
@@ -222,7 +222,7 @@ MainWindow::MainWindow()
// presets->addItem(presetname, v);
//}
- statusBar()->showMessage("Ready");
+ statusBar()->showMessage(tr("Ready"));
}
MainWindow::~MainWindow()
@@ -243,9 +243,9 @@ QWidget* MainWindow::createFilesTab()
QVBoxLayout* l = new QVBoxLayout();
w->setLayout(l);
- l->addWidget(new QLabel("Files: (double-click to set as master)"));
+ l->addWidget(new QLabel(tr("Files: (double-click to set as master)")));
QPushButton* loadbtn = new QPushButton();
- loadbtn->setText("Add files...");
+ loadbtn->setText(tr("Add files..."));
l->addWidget(loadbtn);
filelist = new FileList();
@@ -312,7 +312,7 @@ QWidget* MainWindow::createGenerateTab()
QHBoxLayout* btns = new QHBoxLayout();
QPushButton* autosel = new QPushButton();
- autosel->setText("Generate");
+ autosel->setText(tr("Generate"));
connect(autosel, SIGNAL(clicked()),
tool_selections, SLOT(clearSelections()));
connect(autosel, SIGNAL(clicked()),
@@ -324,7 +324,7 @@ QWidget* MainWindow::createGenerateTab()
tool_selections, SLOT(autoCreateSelectionsPreview()));
QPushButton* clearsel = new QPushButton();
- clearsel->setText("Clear");
+ clearsel->setText(tr("Clear"));
connect(clearsel, SIGNAL(clicked()),
tool_selections, SLOT(clearSelections()));
@@ -333,35 +333,35 @@ QWidget* MainWindow::createGenerateTab()
l->addLayout(btns);
- slider_attacklength = createAttribute(w, "Attack length:", 10, 1000);
+ slider_attacklength = createAttribute(w, tr("Attack length:"), 10, 1000);
connect(slider_attacklength, SIGNAL(valueChanged(int)),
sorter, SLOT(setAttackLength(int)));
connect(slider_attacklength, SIGNAL(valueChanged(int)),
tool_selections, SLOT(autoCreateSelectionsPreview()));
slider_attacklength->setValue(300);
- slider_spread = createAttribute(w, "Power spread:", 1, 2000);
+ slider_spread = createAttribute(w, tr("Power spread:"), 1, 2000);
connect(slider_spread, SIGNAL(valueChanged(int)),
sorter, SLOT(setSpreadFactor(int)));
connect(slider_spread, SIGNAL(valueChanged(int)),
tool_selections, SLOT(autoCreateSelectionsPreview()));
slider_spread->setValue(1000);
- slider_hold = createAttribute(w, "Minimum size (samples):", 0, 200000);
+ slider_hold = createAttribute(w, tr("Minimum size (samples):"), 0, 200000);
connect(slider_hold, SIGNAL(valueChanged(int)),
tool_selections, SLOT(holdChanged(int)));
connect(slider_hold, SIGNAL(valueChanged(int)),
tool_selections, SLOT(autoCreateSelectionsPreview()));
slider_hold->setValue(100);
- slider_falloff = createAttribute(w, "Falloff:", 10, 5000);
+ slider_falloff = createAttribute(w, tr("Falloff:"), 10, 5000);
connect(slider_falloff, SIGNAL(valueChanged(int)),
tool_selections, SLOT(noiseFloorChanged(int)));
connect(slider_falloff, SIGNAL(valueChanged(int)),
tool_selections, SLOT(autoCreateSelectionsPreview()));
slider_falloff->setValue(300);
- slider_fadelength = createAttribute(w, "Fadelength:", 0, 2000);
+ slider_fadelength = createAttribute(w, tr("Fadelength:"), 0, 2000);
connect(slider_fadelength, SIGNAL(valueChanged(int)),
tool_selections, SLOT(fadeoutChanged(int)));
connect(slider_fadelength, SIGNAL(valueChanged(int)),
@@ -379,26 +379,26 @@ QWidget* MainWindow::createExportTab()
QVBoxLayout* l = new QVBoxLayout();
w->setLayout(l);
- l->addWidget(new QLabel("Prefix:"));
+ l->addWidget(new QLabel(tr("Prefix:")));
prefix = new QLineEdit();
connect(prefix, SIGNAL(textChanged(const QString &)),
extractor, SLOT(setOutputPrefix(const QString &)));
l->addWidget(prefix);
- l->addWidget(new QLabel("Export path:"));
+ l->addWidget(new QLabel(tr("Export path:")));
QHBoxLayout* lo_exportp = new QHBoxLayout();
lineed_exportp = new QLineEdit();
connect(lineed_exportp, SIGNAL(textChanged(const QString &)),
extractor, SLOT(setExportPath(const QString &)));
lo_exportp->addWidget(lineed_exportp);
- QPushButton* btn_browse = new QPushButton("...");
+ QPushButton* btn_browse = new QPushButton(tr("..."));
connect(btn_browse, SIGNAL(clicked()), this, SLOT(browse()));
lo_exportp->addWidget(btn_browse);
l->addLayout(lo_exportp);
QPushButton* exportsel = new QPushButton();
- exportsel->setText("Export");
+ exportsel->setText(tr("Export"));
connect(exportsel, SIGNAL(clicked()), this, SLOT(doExport()));
l->addWidget(exportsel);
@@ -535,7 +535,7 @@ void MainWindow::doExport()
void MainWindow::loadFile(QString filename)
{
setCursor(Qt::WaitCursor);
- statusBar()->showMessage("Loading...");
+ statusBar()->showMessage(tr("Loading..."));
qApp->processEvents();
sorter->setWavData(NULL, 0);
@@ -546,7 +546,7 @@ void MainWindow::loadFile(QString filename)
sorter->setWavData(canvaswidget->canvas->data, canvaswidget->canvas->size);
player.setPcmData(canvaswidget->canvas->data, canvaswidget->canvas->size);
- statusBar()->showMessage("Ready");
+ statusBar()->showMessage(tr("Ready"));
setCursor(Qt::ArrowCursor);
}
@@ -562,7 +562,8 @@ void MainWindow::setPreset(int index)
void MainWindow::browse()
{
- QString path = QFileDialog::getExistingDirectory(this, "Select export path",
- lineed_exportp->text());
+ QString path =
+ QFileDialog::getExistingDirectory(this, tr("Select export path"),
+ lineed_exportp->text());
lineed_exportp->setText(path);
}