1 /***************************************************************************
5 copyright : (C) 2001 by andres
7 ***************************************************************************/
13 #include <qradiobutton.h>
17 #include <qvbuttongroup.h>
18 #include <qvgroupbox.h>
20 #include <kdialogbase.h>
21 #include <klineedit.h>
23 KDiskDialog::KDiskDialog( QWidget *parent, const char *name )
24 :KDialogBase( parent, name, true, QString::null,
27 QVBox *pageVBox = makeVBoxMainWidget();
29 QHBox *deviceSelectHBox = new QHBox( pageVBox );
30 deviceSelectHBox->setSpacing( 5 );
31 fButtonGroup = new QVButtonGroup( _("Disk type"), deviceSelectHBox );
32 fDVDButton = new QRadioButton( "DVD", fButtonGroup);
33 fDVDButton->setChecked( true );
34 fVCDButton = new QRadioButton( "VCD", fButtonGroup);
35 fVCDButton->setEnabled( false );
37 QVGroupBox *startVBox = new QVGroupBox( _("Starting position"), deviceSelectHBox );
39 QHBox *titleHBox = new QHBox( startVBox );
40 new QLabel( _("Title "), titleHBox );
41 fTitle = new QSpinBox( titleHBox );
42 QHBox *chapterHBox = new QHBox( startVBox );
43 new QLabel( _("Chapter "), chapterHBox );
44 fChapter = new QSpinBox( chapterHBox );
46 QHBox *deviceNameHBox = new QHBox( pageVBox );
47 new QLabel( _("Device name "), deviceNameHBox );
48 fLineEdit = new KLineEdit( "/dev/dvd", deviceNameHBox );
51 KDiskDialog::~KDiskDialog()
55 QString KDiskDialog::type() const
57 if ( fDVDButton->isChecked() )
59 return ( QString("dvd") );
63 return ( QString("vcd") );
67 QString KDiskDialog::device() const
69 return ( fLineEdit->text() );
72 int KDiskDialog::title() const
74 return ( fTitle->value() );
77 int KDiskDialog::chapter() const
79 return ( fChapter->value() );