File indexing completed on 2024-06-16 07:42:27

0001 /*
0002     SPDX-FileCopyrightText: 1998-2008 Sebastian Trueg <trueg@k3b.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "k3bstdguiitems.h"
0008 #include "k3b_i18n.h"
0009 
0010 #include <QPalette>
0011 #include <QCheckBox>
0012 #include <QComboBox>
0013 #include <QFrame>
0014 #include <QToolTip>
0015 
0016 
0017 QCheckBox* K3b::StdGuiItems::simulateCheckbox( QWidget* parent )
0018 {
0019     QCheckBox* c = new QCheckBox( i18n("Simulate"), parent );
0020     c->setWhatsThis( i18n("<p>If this option is checked K3b will perform all writing steps with the "
0021                           "laser turned off."
0022                           "<p>This is useful, for example, to test a higher writing speed "
0023                           "or whether your system is able to write on-the-fly."
0024                           "<p><b>Caution:</b> DVD+R(W) does not support simulated writing.") );
0025     c->setToolTip( i18n("Only simulate the writing process") );
0026     return c;
0027 }
0028 
0029 QCheckBox* K3b::StdGuiItems::daoCheckbox( QWidget* parent )
0030 {
0031     QCheckBox* c = new QCheckBox( i18n("Disk at once"), parent );
0032     c->setWhatsThis( i18n("<p>If this option is checked, K3b will write the CD in 'disk at once' mode as "
0033                           "compared to 'track at once' (TAO)."
0034                           "<p>It is always recommended to use DAO where possible."
0035                           "<p><b>Caution:</b> Track pregaps with a length other than 2 seconds are only supported "
0036                           "in DAO mode.") );
0037     c->setToolTip( i18n("Write in disk at once mode") );
0038     return c;
0039 }
0040 
0041 QCheckBox* K3b::StdGuiItems::burnproofCheckbox( QWidget* parent )
0042 {
0043     QCheckBox* c = new QCheckBox( i18n("Use Burnfree"), parent );
0044     c->setToolTip( i18n("Enable Burnfree (or Just Link) to avoid buffer underruns") );
0045     c->setWhatsThis( i18n("<p>If this option is checked, K3b enables <em>Burnfree</em> "
0046                           "(or <em>Just Link</em>). This is "
0047                           "a feature of the CD writer which avoids buffer underruns."
0048                           "<p>Without <em>burnfree</em>, if the writer cannot get any more "
0049                           "data a buffer underrun would occur, since the writer needs "
0050                           "a constant stream of data to write the CD."
0051                           "<p>With <em>burnfree</em> the writer can <em>mark</em> the current "
0052                           "position of the laser and get back to it when the buffer is filled again; "
0053                           "but, since this means having little data gaps on the CD, <b>it is "
0054                           "highly recommended to always choose an appropriate writing "
0055                           "speed to prevent the usage of burnfree, especially for audio CDs</b> "
0056                           "(in the worst case one would hear the gap)."
0057                           "<p><em>Burnfree</em> was formerly known as <em>Burnproof</em>, "
0058                           "but has since been renamed when it became part of the MMC standard.") );
0059     return c;
0060 }
0061 
0062 QCheckBox* K3b::StdGuiItems::onlyCreateImagesCheckbox( QWidget* parent )
0063 {
0064     QCheckBox* c = new QCheckBox( i18n("Only create image"), parent );
0065     c->setWhatsThis( i18n("<p>If this option is checked, K3b will only create an "
0066                           "image and not do any actual writing."
0067                           "<p>The image can later be written to a CD/DVD with most current writing "
0068                           "programs (including K3b of course).") );
0069     c->setToolTip( i18n("Only create an image") );
0070     return c;
0071 }
0072 
0073 QCheckBox* K3b::StdGuiItems::createCacheImageCheckbox( QWidget* parent )
0074 {
0075     QCheckBox* c = new QCheckBox( i18n("Create image"), parent );
0076     c->setWhatsThis( i18n("<p>If this option is checked, K3b will create an image before writing "
0077                           "the files to the CD/DVD. Otherwise the data will be written <em>on-the-fly</em>, "
0078                           "i.e. no intermediate image will be created."
0079                           "<p><b>Caution:</b> Although writing on-the-fly should work on most systems, make sure "
0080                           "the data is sent to the writer fast enough.")
0081                      + i18n("<p>It is recommended to try a simulation first.") );
0082     c->setToolTip( i18n("Cache the data to be written on the harddisk") );
0083     return c;
0084 }
0085 
0086 QCheckBox* K3b::StdGuiItems::removeImagesCheckbox( QWidget* parent )
0087 {
0088     QCheckBox* c = new QCheckBox( i18n("Remove image"), parent );
0089     c->setWhatsThis( i18n("<p>If this option is checked, K3b will remove any created images after the "
0090                           "writing has finished."
0091                           "<p>Uncheck this if you want to keep the images.") );
0092     c->setToolTip( i18n("Remove images from disk when finished") );
0093     return c;
0094 }
0095 
0096 QCheckBox* K3b::StdGuiItems::onTheFlyCheckbox( QWidget* parent )
0097 {
0098     QCheckBox* c = new QCheckBox( i18n("On the fly"), parent );
0099     c->setWhatsThis( i18n("<p>If this option is checked, K3b will not create an image first but write "
0100                           "the files directly to the CD/DVD."
0101                           "<p><b>Caution:</b> Although this should work on most systems, make sure "
0102                           "the data is sent to the writer fast enough.")
0103                      + i18n("<p>It is recommended to try a simulation first.") );
0104     c->setToolTip( i18n("Write files directly to CD/DVD without creating an image") );
0105     return c;
0106 }
0107 
0108 QCheckBox* K3b::StdGuiItems::cdTextCheckbox( QWidget* parent )
0109 {
0110     QCheckBox* c = new QCheckBox( i18n("Write CD-Text"), parent );
0111     c->setToolTip( i18n("Create CD-Text entries") );
0112     c->setWhatsThis( i18n("<p>If this option is checked K3b uses some otherwise-unused space on the audio "
0113                           "CD to store additional information, such as the artist's name, or the CD title."
0114                           "<p>CD-Text is an extension to the audio CD standard introduced by Sony."
0115                           "<p>CD-Text will only be usable on CD players that support this extension "
0116                           "(mostly car CD players)."
0117                           "<p>Since a CD-Text-enhanced CD will work in any CD player it is never a bad "
0118                           "idea to enable this (if you specify CD-Text data.)") );
0119     return c;
0120 }
0121 
0122 
0123 QComboBox* K3b::StdGuiItems::paranoiaModeComboBox( QWidget* parent )
0124 {
0125     QComboBox* c = new QComboBox( parent );
0126     c->addItem( "0" );
0127     c->addItem( "1" );
0128     c->addItem( "2" );
0129     c->addItem( "3" );
0130     c->setCurrentIndex( 3 );
0131     c->setToolTip( i18n("Set the paranoia level for reading audio CDs") );
0132     c->setWhatsThis( i18n("<p>Sets the correction mode for digital audio extraction."
0133                           "<ul><li>0: No checking, data is copied directly from the drive. "
0134                           "<li>1: Perform overlapped reading to avoid jitter.</li>"
0135                           "<li>2: Like 1 but with additional checks of the read audio data.</li>"
0136                           "<li>3: Like 2 but with additional scratch detection and repair.</li></ul>"
0137                           "<p><b>The extraction speed reduces from 0 to 3.</b>") );
0138     return c;
0139 }
0140 
0141 
0142 QCheckBox* K3b::StdGuiItems::startMultisessionCheckBox( QWidget* parent )
0143 {
0144     QCheckBox* c = new QCheckBox( i18n("Start multisession CD"), parent );
0145     c->setToolTip( i18n("Do not close the disk to allow additional sessions to be added later") );
0146     c->setWhatsThis( i18n("<p>If this option is checked K3b will not close the CD, and will write "
0147                           "a temporary table of contents.</p>"
0148                           "<p>This allows further sessions to be appended to the CD later.</p>") );
0149     return c;
0150 }
0151 
0152 
0153 QCheckBox* K3b::StdGuiItems::normalizeCheckBox( QWidget* parent )
0154 {
0155     QCheckBox* c = new QCheckBox( i18n("Normalize volume levels"), parent );
0156     c->setToolTip( i18n("Adjust the volume levels of all tracks") );
0157     c->setWhatsThis( i18n("<p>If this option is checked K3b will adjust the volume of all tracks "
0158                           "to a standard level. This is useful for things like creating mixes, "
0159                           "where different recording levels on different albums can cause the volume "
0160                           "to vary greatly from song to song."
0161                           "<p><b>Be aware that K3b currently does not support normalizing when writing "
0162                           "on the fly.</b>") );
0163     return c;
0164 }
0165 
0166 
0167 QCheckBox* K3b::StdGuiItems::verifyCheckBox( QWidget* parent )
0168 {
0169     QCheckBox* c = new QCheckBox( i18n("Verify written data"), parent );
0170     c->setToolTip( i18n("Compare original with written data") );
0171     c->setWhatsThis( i18n("<p>If this option is checked, then after successfully "
0172                           "writing the disk K3b will compare the original source data "
0173                           "with the written data to verify that the disk has been written "
0174                           "correctly.") );
0175     return c;
0176 }
0177 
0178 
0179 QCheckBox* K3b::StdGuiItems::ignoreAudioReadErrorsCheckBox( QWidget* parent )
0180 {
0181     QCheckBox* c = new QCheckBox( i18n("Ignore read errors"), parent );
0182     c->setToolTip( i18n("Skip unreadable audio sectors") );
0183     c->setWhatsThis( i18n("<p>If this option is checked and K3b is not able to read an "
0184                           "audio sector from the source CD it will be replaced with zeros "
0185                           "on the resulting copy."
0186                           "<p>Since audio CD Player are able to interpolate small errors "
0187                           "in the data it is no problem to let K3b skip unreadable sectors.") );
0188     return c;
0189 }
0190 
0191 
0192 QFrame* K3b::StdGuiItems::horizontalLine( QWidget* parent )
0193 {
0194     QFrame* line = new QFrame( parent );
0195     line->setFrameStyle( QFrame::HLine | QFrame::Sunken );
0196     return line;
0197 }
0198 
0199 QFrame* K3b::StdGuiItems::verticalLine( QWidget* parent )
0200 {
0201     QFrame* line = new QFrame( parent );
0202     line->setFrameStyle( QFrame::VLine | QFrame::Sunken );
0203     return line;
0204 }