1 /***************************************************************************
2 kde_disc.cpp - description
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, Ok|Cancel, Ok, true )
26 QVBox *pageVBox = makeVBoxMainWidget();
28 QHBox *deviceSelectHBox = new QHBox( pageVBox );
29 deviceSelectHBox->setSpacing( 5 );
30 fButtonGroup = new QVButtonGroup( "Disk type", deviceSelectHBox );
31 fDVDButton = new QRadioButton( "DVD", fButtonGroup);
32 fDVDButton->setChecked( true );
33 fVCDButton = new QRadioButton( "VCD", fButtonGroup);
34 fVCDButton->setEnabled( false );
36 QVGroupBox *startVBox = new QVGroupBox( "Starting position", deviceSelectHBox );
38 QHBox *titleHBox = new QHBox( startVBox );
39 QLabel *titleLabel = new QLabel( "Title ", titleHBox );
40 fTitle = new QSpinBox( titleHBox );
41 QHBox *chapterHBox = new QHBox( startVBox );
42 QLabel *chapterLabel = new QLabel( "Chapter ", chapterHBox );
43 fChapter = new QSpinBox( chapterHBox );
45 QHBox *deviceNameHBox = new QHBox( pageVBox );
46 QLabel *deviceNameLabel = new QLabel( "Device name ", deviceNameHBox );
47 fLineEdit = new KLineEdit( "/dev/dvd", deviceNameHBox );
50 KDiskDialog::~KDiskDialog()
54 QString KDiskDialog::type() const
56 if ( fDVDButton->isChecked() )
58 return ( QString("dvd") );
62 return ( QString("vcd") );
66 QString KDiskDialog::device() const
68 return ( fLineEdit->text() );
71 int KDiskDialog::title() const
73 return ( fTitle->value() );
76 int KDiskDialog::chapter() const
78 return ( fChapter->value() );