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