MCPcopy Create free account
hub / github.com/KDE/kid3 / SubframesEditor

Method SubframesEditor

src/gui/widgets/subframeseditor.cpp:50–84  ·  view source on GitHub ↗

* Constructor. * * @param platformTools platform tools * @param app application context * @param taggedFile tagged file * @param tagNr tag number * @param parent parent widget */

Source from the content-addressed store, hash-verified

48 * @param parent parent widget
49 */
50SubframesEditor::SubframesEditor(IPlatformTools* platformTools,
51 Kid3Application* app,
52 const TaggedFile* taggedFile,
53 Frame::TagNumber tagNr,
54 QWidget* parent)
55 : QWidget(parent), m_platformTools(platformTools), m_app(app),
56 m_taggedFile(taggedFile), m_tagNr(tagNr),
57 m_editFrameDialog(nullptr), m_editFrameRow(-1)
58{
59 setObjectName(QLatin1String("SubframesEditor"));
60 auto layout = new QHBoxLayout(this);
61 m_frameTableModel = new FrameTableModel(
62 false, platformTools->iconProvider(), this);
63 m_frameTable = new FrameTable(m_frameTableModel, new GenreModel(false, this),
64 this);
65 layout->addWidget(m_frameTable);
66 auto buttonLayout = new QVBoxLayout;
67 m_editButton = new QPushButton(tr("Edit..."));
68 m_editButton->setDefault(false);
69 m_editButton->setAutoDefault(false);
70 connect(m_editButton, &QAbstractButton::clicked, this, &SubframesEditor::onEditClicked);
71 buttonLayout->addWidget(m_editButton);
72 m_addButton = new QPushButton(tr("Add..."));
73 m_addButton->setDefault(false);
74 m_addButton->setAutoDefault(false);
75 connect(m_addButton, &QAbstractButton::clicked, this, &SubframesEditor::onAddClicked);
76 buttonLayout->addWidget(m_addButton);
77 m_deleteButton = new QPushButton(tr("Delete"));
78 m_deleteButton->setDefault(false);
79 m_deleteButton->setAutoDefault(false);
80 connect(m_deleteButton, &QAbstractButton::clicked, this, &SubframesEditor::onDeleteClicked);
81 buttonLayout->addWidget(m_deleteButton);
82 buttonLayout->addStretch();
83 layout->addLayout(buttonLayout);
84}
85
86/**
87 * Set subframes.

Callers

nothing calls this directly

Calls 1

iconProviderMethod · 0.45

Tested by

no test coverage detected