summaryrefslogtreecommitdiffstats
path: root/arts/tools/midiinstdlg.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
commite654398e46e37abf457b2b1122ab898d2c51c49f (patch)
treed39ee6440f3c3663c3ead84a2d4cc2d034667e96 /arts/tools/midiinstdlg.cpp
parente4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff)
downloadtdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz
tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'arts/tools/midiinstdlg.cpp')
-rw-r--r--arts/tools/midiinstdlg.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/arts/tools/midiinstdlg.cpp b/arts/tools/midiinstdlg.cpp
index 519d6b85..f606bbae 100644
--- a/arts/tools/midiinstdlg.cpp
+++ b/arts/tools/midiinstdlg.cpp
@@ -24,36 +24,36 @@
#include <kstandarddirs.h>
#include <kapplication.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qfile.h>
-#include <qdir.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqfile.h>
+#include <tqdir.h>
#include <kbuttonbox.h>
#include <kseparator.h>
#include <kdebug.h>
-#include <qbutton.h>
-#include <qpushbutton.h>
+#include <tqbutton.h>
+#include <tqpushbutton.h>
#include <kstdguiitem.h>
-static QStringList getArtsPath()
+static TQStringList getArtsPath()
{
- QStringList artsPath;
- QString dir = locate("data", "artsbuilder/examples/");
+ TQStringList artsPath;
+ TQString dir = locate("data", "artsbuilder/examples/");
artsPath += dir;
- QString home = QDir::homeDirPath() + "/arts/structures/";
+ TQString home = TQDir::homeDirPath() + "/arts/structures/";
artsPath += home;
return artsPath;
}
-static QStringList listFiles(QString directory, QString extension)
+static TQStringList listFiles(TQString directory, TQString extension)
{
- QStringList result;
- QStringList artsPath = getArtsPath();
+ TQStringList result;
+ TQStringList artsPath = getArtsPath();
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = artsPath.begin(); it != artsPath.end(); it++ ) {
- QString pathname = *it + "/" + directory;
- QDir dir(pathname, extension);
+ TQString pathname = *it + "/" + directory;
+ TQDir dir(pathname, extension);
if (dir.exists()) {
//kdDebug() << "found dir " << dir.absPath() << endl;
result += dir.entryList();
@@ -63,19 +63,19 @@ static QStringList listFiles(QString directory, QString extension)
return result;
}
-MidiInstDlg::MidiInstDlg(QWidget *parent)
- :QDialog(parent,"instrument",TRUE)
+MidiInstDlg::MidiInstDlg(TQWidget *parent)
+ :TQDialog(parent,"instrument",TRUE)
{
- QVBoxLayout *mainlayout = new QVBoxLayout(this);
+ TQVBoxLayout *mainlayout = new TQVBoxLayout(this);
// caption label: title
mainlayout->addSpacing(5);
- QLabel *captionlabel = new QLabel(this);
- QFont labelfont(captionlabel->font());
+ TQLabel *captionlabel = new TQLabel(this);
+ TQFont labelfont(captionlabel->font());
labelfont.setPointSize(labelfont.pointSize()*3/2);
captionlabel->setFont(labelfont);
- captionlabel->setText(QString(" ")+i18n("Instrument")+QString(" "));
+ captionlabel->setText(TQString(" ")+i18n("Instrument")+TQString(" "));
captionlabel->setAlignment(AlignCenter);
//min_size(captionlabel);
mainlayout->addWidget(captionlabel);
@@ -89,13 +89,13 @@ MidiInstDlg::MidiInstDlg(QWidget *parent)
// combobox
- box = new QComboBox(this);
+ box = new TQComboBox(this);
- QStringList instruments = listFiles(".","*.arts");
- QStringList::Iterator it;
+ TQStringList instruments = listFiles(".","*.arts");
+ TQStringList::Iterator it;
for ( it = instruments.begin(); it != instruments.end(); it++ ) {
- QString modname = *it;
- QString prefix = QString::fromLatin1("instrument_");
+ TQString modname = *it;
+ TQString prefix = TQString::fromLatin1("instrument_");
if (modname.length() > 5)
modname.truncate(modname.length()-5); // kill .arts extension
if ( (modname.startsWith(prefix)) && (!modname.contains("_GUI")) )
@@ -104,11 +104,11 @@ MidiInstDlg::MidiInstDlg(QWidget *parent)
}
- QStringList maps = listFiles(".","*.arts-map");
+ TQStringList maps = listFiles(".","*.arts-map");
for ( it = maps.begin(); it != maps.end(); it++ ) {
- QString modname = *it;
- QString prefix = QString::fromLatin1("instrument_");
+ TQString modname = *it;
+ TQString prefix = TQString::fromLatin1("instrument_");
if (modname.length() > 9)
modname.truncate(modname.length()-9); // kill .arts-map extension
if (modname.startsWith(prefix))
@@ -127,7 +127,7 @@ MidiInstDlg::MidiInstDlg(QWidget *parent)
// buttons
- QHBoxLayout *buttonlayout = new QHBoxLayout;
+ TQHBoxLayout *buttonlayout = new QHBoxLayout;
mainlayout->addSpacing(5);
mainlayout->addLayout(buttonlayout);
mainlayout->addSpacing(5);
@@ -135,11 +135,11 @@ MidiInstDlg::MidiInstDlg(QWidget *parent)
buttonlayout->addSpacing(5);
KButtonBox *bbox = new KButtonBox(this);
- bbox->addButton(KStdGuiItem::help(), this, SLOT( help() ));
+ bbox->addButton(KStdGuiItem::help(), this, TQT_SLOT( help() ));
bbox->addStretch(1);
- QButton *okbutton = bbox->addButton(KStdGuiItem::ok());
- connect( okbutton, SIGNAL( clicked() ), SLOT(accept() ) );
+ TQButton *okbutton = bbox->addButton(KStdGuiItem::ok());
+ connect( okbutton, TQT_SIGNAL( clicked() ), TQT_SLOT(accept() ) );
bbox->layout();
@@ -149,23 +149,23 @@ MidiInstDlg::MidiInstDlg(QWidget *parent)
mainlayout->freeze();
}
-QCString MidiInstDlg::filename()
+TQCString MidiInstDlg::filename()
{
- QStringList artsPath = getArtsPath();
- QString instrument = box->currentText();
+ TQStringList artsPath = getArtsPath();
+ TQString instrument = box->currentText();
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = artsPath.begin(); it != artsPath.end(); it++ ) {
- QString pathname = *it + QString::fromLatin1("/instrument_") + instrument + QString::fromLatin1(".arts");
- QFileInfo fi(pathname);
+ TQString pathname = *it + TQString::fromLatin1("/instrument_") + instrument + TQString::fromLatin1(".arts");
+ TQFileInfo fi(pathname);
if (fi.exists() && fi.isReadable())
- return QFile::encodeName(pathname);
+ return TQFile::encodeName(pathname);
- pathname = *it + QString::fromLatin1("/instrument_") + instrument + QString::fromLatin1(".arts-map");
+ pathname = *it + TQString::fromLatin1("/instrument_") + instrument + TQString::fromLatin1(".arts-map");
fi.setFile(pathname);
if (fi.exists() && fi.isReadable())
- return QFile::encodeName(pathname);
+ return TQFile::encodeName(pathname);
}
return "";