~ubuntu-branches/ubuntu/trusty/audex/trusty

« back to all changes in this revision

Viewing changes to dialogs/commandwizarddialog.cpp

  • Committer: Package Import Robot
  • Author(s): Logan Rosen
  • Date: 2013-05-15 20:26:51 UTC
  • mfrom: (4.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20130515202651-p5a2nm17bjato1ut
Tags: 0.77~b1-2ubuntu1
* Merge from Debian unstable (LP: #398234, #1085025). Remaining changes:
  - Build-depend on libkcddb-dev and libkcompactdisc-dev instead of
    kde-multimedia, as that package doesn't exist anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* AUDEX CDDA EXTRACTOR
2
 
 * Copyright (C) 2007-2011 Marco Nelles (audex@maniatek.com)
 
2
 * Copyright (C) 2007-2013 Marco Nelles (audex@maniatek.com)
3
3
 * <http://kde.maniatek.com/audex>
4
4
 *
5
5
 * This program is free software: you can redistribute it and/or modify
48
48
  connect(ui.kpushbutton_date, SIGNAL(clicked()), this, SLOT(insDate()));
49
49
  connect(ui.kpushbutton_genre, SIGNAL(clicked()), this, SLOT(insGenre()));
50
50
  connect(ui.kpushbutton_cover_file, SIGNAL(clicked()), this, SLOT(insCoverFile()));
 
51
  connect(ui.kpushbutton_nooftracks, SIGNAL(clicked()), this, SLOT(insNoOfTracks()));
51
52
  connect(ui.kpushbutton_input_file, SIGNAL(clicked()), this, SLOT(insInFile()));
52
53
  connect(ui.kpushbutton_output_file, SIGNAL(clicked()), this, SLOT(insOutFile()));
53
54
 
94
95
                               "<tr><td>$ttitle</td><td>The track title. Normally each track on a CD has its own title, which is the name of the song.</td></tr>"
95
96
                               "<tr><td>$trackno</td><td>The track number. First track is 1.</td></tr>"
96
97
                               "<tr><td>$cover</td><td>The cover file.</td></tr>"
 
98
                               "<tr><td>$nooftracks</td><td>The total number of audio tracks of the CD.</td></tr>"
97
99
                               "<tr><td>$i</td><td>The temporary WAV file (input file) created by Audex from CD audio track. You can use it as a normal input file for your command line encoder.</td></tr>"
98
100
                               "<tr><td>$o</td><td>The full output filename and path (output file). Use it as the output for your command line encoder.</td></tr>"
 
101
                               "<tr><td>$encoder</td><td>Encoder name and version.</td></tr>"
 
102
                               "<tr><td>$audex</td><td>Audex name and version.</td></tr>"
99
103
                               "</table></p>"),
100
104
                          ui.kurllabel_aboutcommandlineschemes);
101
105
}
158
162
 
159
163
void CommandWizardDialog::insCDNo() {
160
164
  QString text = ui.klineedit_command->text();
161
 
  text.insert(ui.klineedit_command->cursorPosition(), "$"+QString(VAR_CDNO));
 
165
  text.insert(ui.klineedit_command->cursorPosition(), "$"+QString(VAR_CD_NO));
162
166
  ui.klineedit_command->setText(text);
163
167
  update_example();
164
168
}
184
188
  update_example();
185
189
}
186
190
 
 
191
void CommandWizardDialog::insNoOfTracks() {
 
192
  QString text = ui.klineedit_command->text();
 
193
  text.insert(ui.klineedit_command->cursorPosition(), QString("$"VAR_NO_OF_TRACKS));
 
194
  ui.klineedit_command->setText(text);
 
195
  update_example();
 
196
}
 
197
 
187
198
void CommandWizardDialog::insInFile() {
188
199
  QString text = ui.klineedit_command->text();
189
200
  text.insert(ui.klineedit_command->cursorPosition(), "$"+QString(VAR_INPUT_FILE));
208
219
  PatternParser patternparser;
209
220
  QString filename = patternparser.parseCommandPattern(ui.klineedit_command->text(),
210
221
        "/tmp/tmp.wav", QString("%1/music/Meat Loaf/02 - Meat Loaf - Blind As A Bat.ogg").arg(QDir::homePath()),
211
 
        2, 1, 1,
 
222
        2, 1, 1, 12,
212
223
        "Meat Loaf", "Bat Out Of Hell III", "Meat Loaf", "Blind As A Bat",
213
 
        "2006", "Rock", "ogg", NULL, FALSE, QDir::tempPath(), TRUE);
 
224
        "2006", "Rock", "ogg", NULL, FALSE, QDir::tempPath(), "LAME 3.98.2", TRUE);
214
225
  ui.klineedit_album_example->setText(filename);
215
226
  ui.klineedit_album_example->setCursorPosition(0);
216
227
  filename = patternparser.parseCommandPattern(ui.klineedit_command->text(),
217
228
        "/tmp/tmp.wav", QString("%1/music/Alternative Hits/Volume 4/04 - Wolfsheim - Approaching Lightspeed.ogg").arg(QDir::homePath()),
218
 
        4, 2, 1,
 
229
        4, 2, 1, 18,
219
230
        "Alternative Hits", "Volume 4", "Wolfsheim", "Approaching Lightspeed",
220
 
        "2003", "Darkwave", "ogg", NULL, FALSE, QDir::tempPath(), TRUE);
 
231
        "2003", "Darkwave", "ogg", NULL, FALSE, QDir::tempPath(), "LAME 3.98.2", TRUE);
221
232
  ui.klineedit_sampler_example->setText(filename);
222
233
  ui.klineedit_sampler_example->setCursorPosition(0);
223
234
}