Brief description of class still missing. More...
#include <SeedLinkStreamItem.h>
Public Member Functions | |
| virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| void | commit (const QModelIndex &i) |
| virtual QVariant | data (const QModelIndex &index, int role) const |
| virtual Qt::ItemFlags | flags (const QModelIndex &) const |
| virtual QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
| virtual QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
| bool | isStation (const QModelIndex &index) const |
| bool | isStream (const QModelIndex &index) const |
| virtual QModelIndex | parent (const QModelIndex &index) const |
| virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| SeedLinkStreamItem (QObject *parent=0) | |
| void | setServer (const SeedLinkServer *s) |
| SeedLinkStation * | station (const QModelIndex &index) const |
| SeedLinkStream * | stream (const QModelIndex &index) const |
| ~SeedLinkStreamItem () | |
Brief description of class still missing.
Full description of class still missing
| GeopsySLinkGui::SeedLinkStreamItem::SeedLinkStreamItem | ( | QObject * | parent = 0 | ) |
| int GeopsySLinkGui::SeedLinkStreamItem::columnCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const [virtual] |
| void GeopsySLinkGui::SeedLinkStreamItem::commit | ( | const QModelIndex & | i | ) | [inline] |
{emit dataChanged(index( i.row(), 0, parent(i)),
index(i.row(), columnCount(), parent(i)));}
| QVariant GeopsySLinkGui::SeedLinkStreamItem::data | ( | const QModelIndex & | index, |
| int | role | ||
| ) | const [virtual] |
References GeopsySLink::SeedLinkStream::beginRecNo(), GeopsySLink::SeedLinkStream::beginTime(), GeopsySLink::SeedLinkStation::description(), GeopsySLink::SeedLinkStream::endRecNo(), GeopsySLink::SeedLinkStream::endTime(), GeopsySLink::SeedLinkStream::gapCheck(), GeopsySLink::SeedLinkStream::gapThreshold(), isStream(), GeopsySLink::SeedLinkStream::listening(), GeopsySLink::SeedLinkStream::location(), GeopsySLink::SeedLinkStation::name(), GeopsySLink::SeedLinkStation::network(), GeopsySLink::SeedLinkStream::seedName(), station(), stream(), GeopsySLink::SeedLinkStation::streamCheck(), QGpCoreTools::tr(), TRACE, and GeopsySLink::SeedLinkStream::type().
{
TRACE;
if( !index.isValid()) return QVariant();
if(isStream(index)) {
SeedLinkStream * s=stream(index);
switch (role) {
case Qt::DisplayRole:
switch (index.column()) {
case 0: return s->location();
case 1: return s->seedName();
case 2: return s->type();
case 3: return s->beginTime();
case 4: return s->endTime();
case 5: return s->beginRecNo();
case 6: return s->endRecNo();
case 7: return s->gapCheck();
case 8: return s->gapThreshold();
default: return QVariant();
}
case Qt::DecorationRole:
switch (index.column()) {
case 0: return s->listening() ? QPixmap( ":/images/update_available.png" ) : QVariant();
default: return QVariant();
}
case Qt::ToolTipRole:
switch (index.column()) {
case 1: return tr("Stream name");
case 2: return tr("Type (D=data)");
default: return QVariant();
}
default:
return QVariant();
}
} else {
SeedLinkStation * s=station(index);
switch (role) {
case Qt::DisplayRole:
switch (index.column()) {
case 0: return s->network()+"_"+s->name()+" ("+s->description()+")"+(s->streamCheck() ? " checked" : "");
default: return QVariant();
}
case Qt::BackgroundRole:
return Qt::lightGray;
default:
return QVariant();
}
}
}
| virtual Qt::ItemFlags GeopsySLinkGui::SeedLinkStreamItem::flags | ( | const QModelIndex & | ) | const [inline, virtual] |
{return Qt::ItemIsSelectable | Qt::ItemIsEnabled;}
| QVariant GeopsySLinkGui::SeedLinkStreamItem::headerData | ( | int | section, |
| Qt::Orientation | orientation, | ||
| int | role = Qt::DisplayRole |
||
| ) | const [virtual] |
References QGpCoreTools::tr(), and TRACE.
{
TRACE;
if(orientation==Qt::Horizontal) {
switch (role) {
case Qt::DisplayRole:
switch (section) {
case 0: return tr("Location");
case 1: return tr("Seed name");
case 2: return tr("Type");
case 3: return tr("Begin time");
case 4: return tr("End time");
case 5: return tr("Begin recno");
case 6: return tr("End recno");
case 7: return tr("Gap check");
case 8: return tr("Gap treshold");
default: return QVariant();
}
default:
return QVariant();
}
} else
return QVariant();
}
| QModelIndex GeopsySLinkGui::SeedLinkStreamItem::index | ( | int | row, |
| int | column, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | const [virtual] |
References GeopsySLink::SeedLinkServer::at(), GeopsySLink::SeedLinkStation::at(), station(), and TRACE.
Referenced by GeopsySLinkGui::SeedLinkLoader::selectStreams().
| bool GeopsySLinkGui::SeedLinkStreamItem::isStation | ( | const QModelIndex & | index | ) | const |
References TRACE.
Referenced by rowCount().
| bool GeopsySLinkGui::SeedLinkStreamItem::isStream | ( | const QModelIndex & | index | ) | const |
| QModelIndex GeopsySLinkGui::SeedLinkStreamItem::parent | ( | const QModelIndex & | index | ) | const [virtual] |
References GeopsySLink::SeedLinkServer::indexOf(), isStream(), GeopsySLink::SeedLinkStream::station(), str, stream(), and TRACE.
| int GeopsySLinkGui::SeedLinkStreamItem::rowCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const [virtual] |
References GeopsySLink::SeedLinkServer::at(), GeopsySLink::SeedLinkServer::count(), isStation(), and TRACE.
Referenced by GeopsySLinkGui::SeedLinkLoader::selectStreams().
| void GeopsySLinkGui::SeedLinkStreamItem::setServer | ( | const SeedLinkServer * | s | ) |
| SeedLinkStation * GeopsySLinkGui::SeedLinkStreamItem::station | ( | const QModelIndex & | index | ) | const |
| SeedLinkStream * GeopsySLinkGui::SeedLinkStreamItem::stream | ( | const QModelIndex & | index | ) | const |