Implemented drumpad preset detail widget
This commit is contained in:
@ -20,6 +20,7 @@ SOURCES += \
|
|||||||
drumpadjsonconverters.cpp \
|
drumpadjsonconverters.cpp \
|
||||||
drumpadpresets.cpp \
|
drumpadpresets.cpp \
|
||||||
drumpadpresetsmodel.cpp \
|
drumpadpresetsmodel.cpp \
|
||||||
|
drumpadpresettagsmodel.cpp \
|
||||||
graphrenderer.cpp \
|
graphrenderer.cpp \
|
||||||
jsonconverters.cpp \
|
jsonconverters.cpp \
|
||||||
loopstationjsonconverters.cpp \
|
loopstationjsonconverters.cpp \
|
||||||
@ -32,13 +33,13 @@ SOURCES += \
|
|||||||
synthisizer.cpp \
|
synthisizer.cpp \
|
||||||
treetotableproxymodel.cpp \
|
treetotableproxymodel.cpp \
|
||||||
widgets/djwidget.cpp \
|
widgets/djwidget.cpp \
|
||||||
|
widgets/drumpadpresetdetailwidget.cpp \
|
||||||
widgets/drumpadsampleswidget.cpp \
|
widgets/drumpadsampleswidget.cpp \
|
||||||
widgets/drumpadsamplewidget.cpp \
|
widgets/drumpadsamplewidget.cpp \
|
||||||
widgets/drumpadwidget.cpp \
|
widgets/drumpadwidget.cpp \
|
||||||
widgets/loopstationwidget.cpp \
|
widgets/loopstationwidget.cpp \
|
||||||
widgets/mainwindow.cpp \
|
widgets/mainwindow.cpp \
|
||||||
widgets/midibutton.cpp \
|
widgets/midibutton.cpp \
|
||||||
widgets/presetdetailwidget.cpp \
|
|
||||||
widgets/previewwidget.cpp \
|
widgets/previewwidget.cpp \
|
||||||
widgets/scratchwidget.cpp \
|
widgets/scratchwidget.cpp \
|
||||||
widgets/sequencerwidget.cpp \
|
widgets/sequencerwidget.cpp \
|
||||||
@ -55,6 +56,7 @@ HEADERS += \
|
|||||||
drumpadjsonconverters.h \
|
drumpadjsonconverters.h \
|
||||||
drumpadpresets.h \
|
drumpadpresets.h \
|
||||||
drumpadpresetsmodel.h \
|
drumpadpresetsmodel.h \
|
||||||
|
drumpadpresettagsmodel.h \
|
||||||
graphrenderer.h \
|
graphrenderer.h \
|
||||||
jsonconverters.h \
|
jsonconverters.h \
|
||||||
loopstationjsonconverters.h \
|
loopstationjsonconverters.h \
|
||||||
@ -66,13 +68,13 @@ HEADERS += \
|
|||||||
synthisizer.h \
|
synthisizer.h \
|
||||||
treetotableproxymodel.h \
|
treetotableproxymodel.h \
|
||||||
widgets/djwidget.h \
|
widgets/djwidget.h \
|
||||||
|
widgets/drumpadpresetdetailwidget.h \
|
||||||
widgets/drumpadsampleswidget.h \
|
widgets/drumpadsampleswidget.h \
|
||||||
widgets/drumpadsamplewidget.h \
|
widgets/drumpadsamplewidget.h \
|
||||||
widgets/drumpadwidget.h \
|
widgets/drumpadwidget.h \
|
||||||
widgets/loopstationwidget.h \
|
widgets/loopstationwidget.h \
|
||||||
widgets/mainwindow.h \
|
widgets/mainwindow.h \
|
||||||
widgets/midibutton.h \
|
widgets/midibutton.h \
|
||||||
widgets/presetdetailwidget.h \
|
|
||||||
widgets/previewwidget.h \
|
widgets/previewwidget.h \
|
||||||
widgets/scratchwidget.h \
|
widgets/scratchwidget.h \
|
||||||
widgets/sequencerwidget.h \
|
widgets/sequencerwidget.h \
|
||||||
@ -82,12 +84,12 @@ HEADERS += \
|
|||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
widgets/djwidget.ui \
|
widgets/djwidget.ui \
|
||||||
|
widgets/drumpadpresetdetailwidget.ui \
|
||||||
widgets/drumpadsampleswidget.ui \
|
widgets/drumpadsampleswidget.ui \
|
||||||
widgets/drumpadsamplewidget.ui \
|
widgets/drumpadsamplewidget.ui \
|
||||||
widgets/drumpadwidget.ui \
|
widgets/drumpadwidget.ui \
|
||||||
widgets/loopstationwidget.ui \
|
widgets/loopstationwidget.ui \
|
||||||
widgets/mainwindow.ui \
|
widgets/mainwindow.ui \
|
||||||
widgets/presetdetailwidget.ui \
|
|
||||||
widgets/sequencerwidget.ui \
|
widgets/sequencerwidget.ui \
|
||||||
widgets/settingsdialog.ui \
|
widgets/settingsdialog.ui \
|
||||||
widgets/synthisizerwidget.ui \
|
widgets/synthisizerwidget.ui \
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include "drumpadpresets.h"
|
#include "drumpadpresets.h"
|
||||||
|
|
||||||
namespace drumpad_presets { class Preset; class File; }
|
namespace drumpad_presets { struct Preset; struct File; }
|
||||||
|
|
||||||
class DrumPadFilesModel : public QAbstractTableModel
|
class DrumPadFilesModel : public QAbstractTableModel
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include <QAbstractTableModel>
|
#include <QAbstractTableModel>
|
||||||
|
|
||||||
namespace drumpad_presets { class Preset; }
|
namespace drumpad_presets { struct Preset; }
|
||||||
|
|
||||||
class DrumPadPresetsModel : public QAbstractTableModel
|
class DrumPadPresetsModel : public QAbstractTableModel
|
||||||
{
|
{
|
||||||
|
41
drumpadpresettagsmodel.cpp
Normal file
41
drumpadpresettagsmodel.cpp
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#include "drumpadpresettagsmodel.h"
|
||||||
|
|
||||||
|
DrumPadPresetTagsModel::DrumPadPresetTagsModel(QObject *parent) :
|
||||||
|
QAbstractListModel{parent}
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void DrumPadPresetTagsModel::setPreset(const drumpad_presets::Preset &preset)
|
||||||
|
{
|
||||||
|
beginResetModel();
|
||||||
|
if (preset.tags)
|
||||||
|
m_tags = *preset.tags;
|
||||||
|
else
|
||||||
|
m_tags.clear();
|
||||||
|
endResetModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
int DrumPadPresetTagsModel::rowCount(const QModelIndex &parent) const
|
||||||
|
{
|
||||||
|
Q_UNUSED(parent);
|
||||||
|
|
||||||
|
return m_tags.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
QVariant DrumPadPresetTagsModel::data(const QModelIndex &index, int role) const
|
||||||
|
{
|
||||||
|
if (!index.isValid())
|
||||||
|
return {};
|
||||||
|
|
||||||
|
if (index.row() < 0 || index.row() >= int(m_tags.size()))
|
||||||
|
return {};
|
||||||
|
|
||||||
|
switch (role)
|
||||||
|
{
|
||||||
|
case Qt::DisplayRole:
|
||||||
|
case Qt::EditRole:
|
||||||
|
return m_tags[index.row()];
|
||||||
|
}
|
||||||
|
|
||||||
|
return {};
|
||||||
|
}
|
21
drumpadpresettagsmodel.h
Normal file
21
drumpadpresettagsmodel.h
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <QAbstractListModel>
|
||||||
|
|
||||||
|
#include "drumpadpresets.h"
|
||||||
|
|
||||||
|
namespace drumpad_presets { struct Preset; }
|
||||||
|
|
||||||
|
class DrumPadPresetTagsModel : public QAbstractListModel
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DrumPadPresetTagsModel(QObject *parent = nullptr);
|
||||||
|
|
||||||
|
void setPreset(const drumpad_presets::Preset &preset);
|
||||||
|
|
||||||
|
int rowCount(const QModelIndex &parent) const override;
|
||||||
|
QVariant data(const QModelIndex &index, int role) const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::vector<QString> m_tags;
|
||||||
|
};
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include <QAbstractTableModel>
|
#include <QAbstractTableModel>
|
||||||
|
|
||||||
namespace loopstation_presets { class Preset; }
|
namespace loopstation_presets { struct Preset; }
|
||||||
|
|
||||||
class LoopStationPresetsModel : public QAbstractTableModel
|
class LoopStationPresetsModel : public QAbstractTableModel
|
||||||
{
|
{
|
||||||
|
67
widgets/drumpadpresetdetailwidget.cpp
Executable file
67
widgets/drumpadpresetdetailwidget.cpp
Executable file
@ -0,0 +1,67 @@
|
|||||||
|
#include "drumpadpresetdetailwidget.h"
|
||||||
|
#include "ui_drumpadpresetdetailwidget.h"
|
||||||
|
|
||||||
|
#include "drumpadpresets.h"
|
||||||
|
|
||||||
|
DrumPadPresetDetailWidget::DrumPadPresetDetailWidget(QWidget *parent) :
|
||||||
|
QScrollArea{parent},
|
||||||
|
m_ui{std::make_unique<Ui::DrumPadPresetDetailWidget>()}
|
||||||
|
{
|
||||||
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
|
m_ui->listViewTags->setModel(&m_tagsModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
DrumPadPresetDetailWidget::~DrumPadPresetDetailWidget() = default;
|
||||||
|
|
||||||
|
void DrumPadPresetDetailWidget::setPreset(const drumpad_presets::Preset &preset)
|
||||||
|
{
|
||||||
|
constexpr const auto applyField = [](QWidget *edit, const auto &field){
|
||||||
|
edit->setEnabled(field.has_value());
|
||||||
|
edit->setVisible(field.has_value());
|
||||||
|
};
|
||||||
|
constexpr const auto applyLineEdit = [applyField](QLineEdit *edit, const auto &field){
|
||||||
|
applyField(edit, field);
|
||||||
|
edit->setText(field ? *field : QString{});
|
||||||
|
};
|
||||||
|
constexpr const auto applySpinBox = [applyField](QSpinBox *edit, const auto &field){
|
||||||
|
applyField(edit, field);
|
||||||
|
edit->setValue(field ? *field : -1);
|
||||||
|
};
|
||||||
|
constexpr const auto applyCheckBox = [applyField](QCheckBox *edit, const auto &field){
|
||||||
|
applyField(edit, field);
|
||||||
|
edit->setChecked(field ? *field : false);
|
||||||
|
};
|
||||||
|
constexpr const auto applyDateTimeEdit = [applyField](QDateTimeEdit *edit, const auto &field){
|
||||||
|
applyField(edit, field);
|
||||||
|
edit->setDateTime(field ? *field : QDateTime{});
|
||||||
|
};
|
||||||
|
|
||||||
|
applyLineEdit(m_ui->lineEditId, preset.id);
|
||||||
|
applyLineEdit(m_ui->lineEditName, preset.name);
|
||||||
|
applyLineEdit(m_ui->lineEditAuthor, preset.author);
|
||||||
|
applyLineEdit(m_ui->lineEditOrderBy, preset.orderBy);
|
||||||
|
applyLineEdit(m_ui->lineEditVersion, preset.version);
|
||||||
|
applySpinBox(m_ui->spinBoxTempo, preset.tempo);
|
||||||
|
applyLineEdit(m_ui->lineEditIcon, preset.icon);
|
||||||
|
applySpinBox(m_ui->spinBoxPrice, preset.price);
|
||||||
|
applySpinBox(m_ui->spinBoxPriceForSession, preset.priceForSession);
|
||||||
|
applyCheckBox(m_ui->checkBoxHasInfo, preset.hasInfo);
|
||||||
|
applyField(m_ui->listViewTags, preset.tags);
|
||||||
|
applyCheckBox(m_ui->checkBoxDeleted, preset.DELETED);
|
||||||
|
applySpinBox(m_ui->spinBoxDifficulty, preset.difficulty);
|
||||||
|
applySpinBox(m_ui->spinBoxSample, preset.sample);
|
||||||
|
applyLineEdit(m_ui->lineEditAudioPreview1Name, preset.audioPreview1Name);
|
||||||
|
applyLineEdit(m_ui->lineEditAudioPreview1URL, preset.audioPreview1URL);
|
||||||
|
applyLineEdit(m_ui->lineEditAudioPreview2Name, preset.audioPreview2Name);
|
||||||
|
applyLineEdit(m_ui->lineEditAudioPreview2URL, preset.audioPreview2URL);
|
||||||
|
applyLineEdit(m_ui->lineEditImagePreview1, preset.imagePreview1);
|
||||||
|
applyLineEdit(m_ui->lineEditVideoPreview, preset.videoPreview);
|
||||||
|
applyLineEdit(m_ui->lineEditVideoTutorial, preset.videoTutorial);
|
||||||
|
// TODO files
|
||||||
|
// TODO beatschool
|
||||||
|
// TODO easyPlay
|
||||||
|
applyDateTimeEdit(m_ui->dateTimeEditTimestamp, preset.timestamp);
|
||||||
|
|
||||||
|
m_tagsModel.setPreset(preset);
|
||||||
|
}
|
26
widgets/drumpadpresetdetailwidget.h
Executable file
26
widgets/drumpadpresetdetailwidget.h
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
#include <QScrollArea>
|
||||||
|
|
||||||
|
#include "drumpadpresettagsmodel.h"
|
||||||
|
|
||||||
|
namespace Ui { class DrumPadPresetDetailWidget; }
|
||||||
|
namespace drumpad_presets { struct Preset; }
|
||||||
|
|
||||||
|
class DrumPadPresetDetailWidget : public QScrollArea
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit DrumPadPresetDetailWidget(QWidget *parent = nullptr);
|
||||||
|
~DrumPadPresetDetailWidget() override;
|
||||||
|
|
||||||
|
void setPreset(const drumpad_presets::Preset &preset);
|
||||||
|
|
||||||
|
private:
|
||||||
|
const std::unique_ptr<Ui::DrumPadPresetDetailWidget> m_ui;
|
||||||
|
|
||||||
|
DrumPadPresetTagsModel m_tagsModel;
|
||||||
|
};
|
@ -1,13 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>PresetDetailWidget</class>
|
<class>DrumPadPresetDetailWidget</class>
|
||||||
<widget class="QScrollArea" name="PresetDetailWidget">
|
<widget class="QScrollArea" name="DrumPadPresetDetailWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>320</width>
|
<width>389</width>
|
||||||
<height>633</height>
|
<height>774</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="widgetResizable">
|
<property name="widgetResizable">
|
||||||
@ -18,8 +18,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>318</width>
|
<width>387</width>
|
||||||
<height>631</height>
|
<height>772</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
@ -231,34 +231,109 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLineEdit" name="lineEditId"/>
|
<widget class="QLineEdit" name="lineEditId">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QLineEdit" name="lineEditName"/>
|
<widget class="QLineEdit" name="lineEditName">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QLineEdit" name="lineEditAuthor"/>
|
<widget class="QLineEdit" name="lineEditAuthor">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QLineEdit" name="lineEditOrderBy"/>
|
<widget class="QLineEdit" name="lineEditOrderBy">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QLineEdit" name="lineEditVersion"/>
|
<widget class="QLineEdit" name="lineEditVersion">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1">
|
<item row="5" column="1">
|
||||||
<widget class="QSpinBox" name="spinBoxTempo"/>
|
<widget class="QSpinBox" name="spinBoxTempo">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>-2147483647</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>2147483647</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="1">
|
<item row="6" column="1">
|
||||||
<widget class="QLineEdit" name="lineEditIcon"/>
|
<widget class="QLineEdit" name="lineEditIcon">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="1">
|
<item row="7" column="1">
|
||||||
<widget class="QSpinBox" name="spinBoxPrice"/>
|
<widget class="QSpinBox" name="spinBoxPrice">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>-2147483647</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>2147483647</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="1">
|
<item row="8" column="1">
|
||||||
<widget class="QSpinBox" name="spinBoxPriceForSession"/>
|
<widget class="QSpinBox" name="spinBoxPriceForSession">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>-2147483647</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>2147483647</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="1">
|
<item row="9" column="1">
|
||||||
<widget class="QCheckBox" name="checkBoxHasInfo">
|
<widget class="QCheckBox" name="checkBoxHasInfo">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>CheckBox</string>
|
<string>CheckBox</string>
|
||||||
</property>
|
</property>
|
||||||
@ -266,37 +341,145 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="11" column="1">
|
<item row="11" column="1">
|
||||||
<widget class="QCheckBox" name="checkBoxDeleted">
|
<widget class="QCheckBox" name="checkBoxDeleted">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>CheckBox</string>
|
<string>CheckBox</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="1">
|
<item row="12" column="1">
|
||||||
<widget class="QSpinBox" name="spinBoxDifficulty"/>
|
<widget class="QSpinBox" name="spinBoxDifficulty">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>-2147483647</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>2147483647</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="13" column="1">
|
<item row="13" column="1">
|
||||||
<widget class="QSpinBox" name="spinBoxSample"/>
|
<widget class="QSpinBox" name="spinBoxSample">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>-2147483647</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>2147483647</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="14" column="1">
|
<item row="14" column="1">
|
||||||
<widget class="QLineEdit" name="lineEditAudioPreview1Name"/>
|
<widget class="QLineEdit" name="lineEditAudioPreview1Name">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="15" column="1">
|
<item row="15" column="1">
|
||||||
<widget class="QLineEdit" name="lineEditAudioPreview1URL"/>
|
<widget class="QLineEdit" name="lineEditAudioPreview1URL">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="16" column="1">
|
<item row="16" column="1">
|
||||||
<widget class="QLineEdit" name="lineEditAudioPreview2Name"/>
|
<widget class="QLineEdit" name="lineEditAudioPreview2Name">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="17" column="1">
|
<item row="17" column="1">
|
||||||
<widget class="QLineEdit" name="lineEditAudioPreview2URL"/>
|
<widget class="QLineEdit" name="lineEditAudioPreview2URL">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="18" column="1">
|
<item row="18" column="1">
|
||||||
<widget class="QLineEdit" name="lineEditImagePreview1"/>
|
<widget class="QLineEdit" name="lineEditImagePreview1">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="19" column="1">
|
<item row="19" column="1">
|
||||||
<widget class="QLineEdit" name="lineEditVideoPreview"/>
|
<widget class="QLineEdit" name="lineEditVideoPreview">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="20" column="1">
|
<item row="20" column="1">
|
||||||
<widget class="QLineEdit" name="lineEditVideoTutorial"/>
|
<widget class="QLineEdit" name="lineEditVideoTutorial">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="22" column="0">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="21" column="0">
|
||||||
|
<widget class="QLabel" name="labelTimestamp">
|
||||||
|
<property name="text">
|
||||||
|
<string>Timestamp:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>dateTimeEditTimestamp</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="21" column="1">
|
||||||
|
<widget class="QDateTimeEdit" name="dateTimeEditTimestamp">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="1">
|
||||||
|
<widget class="QListView" name="listViewTags"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
@ -87,7 +87,7 @@
|
|||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="PresetDetailWidget" name="presetDetailWidget">
|
<widget class="DrumPadPresetDetailWidget" name="presetDetailWidget">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Properties</string>
|
<string>Properties</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
@ -120,9 +120,9 @@
|
|||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>PresetDetailWidget</class>
|
<class>DrumPadPresetDetailWidget</class>
|
||||||
<extends>QScrollArea</extends>
|
<extends>QScrollArea</extends>
|
||||||
<header>widgets/presetdetailwidget.h</header>
|
<header>widgets/drumpadpresetdetailwidget.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
@ -38,7 +38,8 @@ LoopStationWidget::~LoopStationWidget() = default;
|
|||||||
|
|
||||||
void LoopStationWidget::writeSamples(frame_t *begin, frame_t *end)
|
void LoopStationWidget::writeSamples(frame_t *begin, frame_t *end)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(begin)
|
||||||
|
Q_UNUSED(end)
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoopStationWidget::injectNetworkAccessManager(QNetworkAccessManager &networkAccessManager)
|
void LoopStationWidget::injectNetworkAccessManager(QNetworkAccessManager &networkAccessManager)
|
||||||
@ -49,7 +50,7 @@ void LoopStationWidget::injectNetworkAccessManager(QNetworkAccessManager &networ
|
|||||||
|
|
||||||
void LoopStationWidget::injectDecodingThread(QThread &thread)
|
void LoopStationWidget::injectDecodingThread(QThread &thread)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(thread)
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoopStationWidget::loadSettings(DrumMachineSettings &settings)
|
void LoopStationWidget::loadSettings(DrumMachineSettings &settings)
|
||||||
@ -69,7 +70,7 @@ void LoopStationWidget::sendColors()
|
|||||||
|
|
||||||
void LoopStationWidget::midiReceived(const midi::MidiMessage &message)
|
void LoopStationWidget::midiReceived(const midi::MidiMessage &message)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoopStationWidget::currentRowChanged(const QModelIndex ¤t)
|
void LoopStationWidget::currentRowChanged(const QModelIndex ¤t)
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
#include "presetdetailwidget.h"
|
|
||||||
#include "ui_presetdetailwidget.h"
|
|
||||||
|
|
||||||
PresetDetailWidget::PresetDetailWidget(QWidget *parent) :
|
|
||||||
QScrollArea{parent},
|
|
||||||
m_ui{std::make_unique<Ui::PresetDetailWidget>()}
|
|
||||||
{
|
|
||||||
m_ui->setupUi(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
PresetDetailWidget::~PresetDetailWidget() = default;
|
|
||||||
|
|
||||||
void PresetDetailWidget::setPreset(const drumpad_presets::Preset &preset)
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
#include <QScrollArea>
|
|
||||||
|
|
||||||
namespace Ui { class PresetDetailWidget; }
|
|
||||||
namespace drumpad_presets { class Preset; }
|
|
||||||
|
|
||||||
class PresetDetailWidget : public QScrollArea
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit PresetDetailWidget(QWidget *parent = nullptr);
|
|
||||||
~PresetDetailWidget() override;
|
|
||||||
|
|
||||||
void setPreset(const drumpad_presets::Preset &preset);
|
|
||||||
|
|
||||||
private:
|
|
||||||
const std::unique_ptr<Ui::PresetDetailWidget> m_ui;
|
|
||||||
};
|
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
class QLabel;
|
class QLabel;
|
||||||
namespace Ui { class SequencerWidget; }
|
namespace Ui { class SequencerWidget; }
|
||||||
namespace drumpad_presets { class Preset; class Sequence; }
|
namespace drumpad_presets { struct Preset; struct Sequence; }
|
||||||
class DrumMachineSettings;
|
class DrumMachineSettings;
|
||||||
namespace midi { struct MidiMessage; }
|
namespace midi { struct MidiMessage; }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user