|
LibDMRConf
0.6.0
A library to program DMR radios.
|
Container class holding all channels (analog and digital) for a specific configuration (Config).
More...
#include <channel.hh>
Signals | |
| void | modified () |
| Gets emitted once the table has been changed. | |
Public Member Functions | |
| ChannelList (QObject *parent=nullptr) | |
| Constructs an empty channel list. | |
| int | count () const |
| Returns the number of channels in this list. | |
| void | clear () |
| Clears the list. | |
| int | indexOf (Channel *channel) const |
| Returns the index of the channel. | |
| Channel * | channel (int idx) const |
| Gets the channel at the specified index. | |
| DigitalChannel * | findDigitalChannel (double rx, double tx, DigitalChannel::TimeSlot ts, uint cc) const |
| Finds a digial channel with the given frequencies, time slot and color code. More... | |
| AnalogChannel * | findAnalogChannelByTxFreq (double freq) const |
| Finds an analog channel with the given frequeny. | |
| int | addChannel (Channel *channel, int row=-1) |
| Adds a channel to the list at the specified row. More... | |
| bool | remChannel (Channel *channel) |
| Removes the given channel from the list. | |
| bool | remChannel (int idx) |
| Removes the channel at the given index from the list. | |
| bool | moveUp (int idx) |
Moves the channel at index idx one step up. | |
| bool | moveDown (int idx) |
Moves the channel at index idx one step up. | |
| int | rowCount (const QModelIndex &index) const |
| Implements QAbstractTableModel, returns number of rows. | |
| int | columnCount (const QModelIndex &index) const |
| Implements QAbstractTableModel, returns number of colums. | |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
| Implements QAbstractTableModel, returns data at cell. | |
| QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
| Implements QAbstractTableModel, returns header at section. | |
Protected Slots | |
| void | onChannelDeleted (QObject *obj) |
| Internal callback on deleted channels. | |
| void | onChannelEdited () |
| Internal callback on modified channels. | |
Protected Attributes | |
| QVector< Channel * > | _channels |
| Just the vector of channels. | |
Container class holding all channels (analog and digital) for a specific configuration (Config).
This class also implements the QAbstractTableModel and can therefore be displayed using a default QTableView instance.
| int ChannelList::addChannel | ( | Channel * | channel, |
| int | row = -1 |
||
| ) |
Adds a channel to the list at the specified row.
If row<0 the channel gets appendet to the list.
| DigitalChannel * ChannelList::findDigitalChannel | ( | double | rx, |
| double | tx, | ||
| DigitalChannel::TimeSlot | ts, | ||
| uint | cc | ||
| ) | const |
Finds a digial channel with the given frequencies, time slot and color code.
1.8.17