3
Copyright (C) 1998 Stefan Westerfeld
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
#include "midiportdlg.h"
27
#include <kseparator.h>
28
#include <kbuttonbox.h>
29
#include <qlineedit.h>
31
MidiPortDlg::MidiPortDlg(QWidget *parent, const char *oldname, const char *title) :QDialog(parent,title,TRUE)
33
QVBoxLayout *mainlayout = new QVBoxLayout(this);
35
// caption label: title
37
mainlayout->addSpacing(5);
38
QLabel *captionlabel = new QLabel(this);
39
QFont labelfont(captionlabel->font());
40
labelfont.setPointSize(labelfont.pointSize()*3/2);
41
captionlabel->setFont(labelfont);
42
captionlabel->setText(i18n("OSS Midi Port"));
43
captionlabel->setAlignment(AlignCenter);
44
//min_size(captionlabel);
45
mainlayout->addWidget(captionlabel);
49
mainlayout->addSpacing(5);
50
KSeparator *ruler2 = new KSeparator( KSeparator::HLine, this);
51
mainlayout->addWidget(ruler2);
52
mainlayout->addSpacing(5);
56
edit = new QLineEdit(this);
57
edit->setText(oldname);
60
mainlayout->addWidget(edit);
64
mainlayout->addSpacing(5);
65
KSeparator *ruler = new KSeparator( KSeparator::HLine, this);
66
mainlayout->addWidget(ruler);
67
mainlayout->addSpacing(5);
71
QHBoxLayout *buttonlayout = new QHBoxLayout;
72
mainlayout->addSpacing(5);
73
mainlayout->addLayout(buttonlayout);
74
mainlayout->addSpacing(5);
76
buttonlayout->addSpacing(5);
77
KButtonBox *bbox = new KButtonBox(this);
79
bbox->addButton(i18n("Help"));
82
QButton *okbutton = bbox->addButton(i18n("OK"));
83
connect( okbutton, SIGNAL( clicked() ), SLOT(accept() ) );
87
buttonlayout->addWidget(bbox);
88
buttonlayout->addSpacing(5);
93
const char *MidiPortDlg::device()
95
return edit->text().ascii();
97
#include "midiportdlg.moc"