Split Insert triplet button, and add mode menus

The "insert before" and "insert after" buttons will drop a menu to
select the new triplet mode, allowing triplets with different modes to
be inserted with one less mouse click.

The "insert copy" button still does the old behaviour of inserting a
copy of the currently selected triplet.
This commit is contained in:
G.K.MacGregor
2022-03-06 12:00:53 +00:00
parent cda458b5bf
commit 74ebc91ee6
5 changed files with 154 additions and 87 deletions

View File

@@ -36,8 +36,8 @@ public:
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role);
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
bool insertFirstRow();
bool insertRows(int position, int rows, const QModelIndex &parent);
bool insertRows(int position, int rows, const QModelIndex &parent, X26Triplet triplet);
bool removeRows(int position, int rows, const QModelIndex &index);
// Qt::ItemFlags flags(const QModelIndex &index) const;