]> git.sesse.net Git - vlc/blob - plugins/kde/kde_disc.cpp
413e6ed837620c0a6a83e1a8aa33716401906486
[vlc] / plugins / kde / kde_disc.cpp
1 /***************************************************************************
2                           kde_disc.cpp  -  description
3                              -------------------
4     begin                : Sat Apr 7 2001
5     copyright            : (C) 2001 by andres
6     email                : dae@chez.com
7  ***************************************************************************/
8
9 #include "kde_disc.h"
10
11 #include <qhbox.h>
12 #include <qlabel.h>
13 #include <qradiobutton.h>
14 #include <qspinbox.h>
15 #include <qstring.h>
16 #include <qvbox.h>
17 #include <qvbuttongroup.h>
18 #include <qvgroupbox.h>
19 #include <qwidget.h>
20 #include <kdialogbase.h>
21 #include <klineedit.h>
22
23 KDiskDialog::KDiskDialog( QWidget *parent, const char *name ) :
24                 KDialogBase( parent, name, true, QString::null, Ok|Cancel, Ok, true )
25 {
26         QVBox *pageVBox = makeVBoxMainWidget();
27
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 );
35
36         QVGroupBox *startVBox = new QVGroupBox( "Starting position", deviceSelectHBox );
37
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 );
44
45         QHBox *deviceNameHBox = new QHBox( pageVBox );
46         QLabel *deviceNameLabel = new QLabel( "Device name ", deviceNameHBox );
47         fLineEdit = new KLineEdit( "/dev/dvd", deviceNameHBox );
48 }
49
50 KDiskDialog::~KDiskDialog()
51 {
52 }
53
54 QString KDiskDialog::type() const
55 {
56         if ( fDVDButton->isChecked() )
57         {
58                 return ( QString("dvd") );
59         }
60         else
61         {
62                 return ( QString("vcd") );
63         }
64 }
65
66 QString KDiskDialog::device() const
67 {
68         return ( fLineEdit->text() );
69 }
70
71 int KDiskDialog::title() const
72 {
73         return ( fTitle->value() );
74 }
75
76 int KDiskDialog::chapter() const
77 {
78         return ( fChapter->value() );
79 }