20#ifndef __SYNTHCLONE_UTIL_H__
21#define __SYNTHCLONE_UTIL_H__
23#include <QtCore/QCoreApplication>
43#define CONFIRM(condition, message) \
44 if (! (condition)) { \
45 synthclone::_die(__FILE__, Q_FUNC_INFO, __LINE__, message); \
55 _die(
const char *path,
const char *func,
int line,
const QString &message);
73 getChild(
const QObject *
object,
const QString &name=QString())
75 T *child =
object->findChild<T *>(name);
77 qApp->tr(
"object has no child with name '%1' and base type "
78 "'%2'").arg(name, T::staticMetaObject.className()));
Type
Contains format types supported by sample streams.
Definition: samplestream.h:107
Definition: component.h:26
QWidget * loadForm(const QString &path, QWidget *parent=0)
Loads the main widget from a QtDesigner form.
T * getChild(const QObject *object, const QString &name=QString())
Finds a child object of an object.
Definition: util.h:73
ControlType getMIDIControlType(MIDIData control)
Gets the default MIDI control type.
quint8 MIDIData
Holds a byte of MIDI data.
Definition: types.h:59
ControlType
MIDI control types.
Definition: types.h:32
QString getMIDINoteString(MIDIData note)
Gets a string representation of a MIDI note.
QString getMIDIControlString(MIDIData control)
Gets a string representation of a MIDI control.
QString getSampleFilenameExtension(SampleStream::Type type)
Gets an appropriate filename extension for a sample type.
#define CONFIRM(condition, message)
Confirms that a given condition is true, regardless of whether or not NDEBUG is set.
Definition: util.h:43