##// END OF EJS Templates
Fixed bug 388...
Fixed bug 388 Added cassini FGM download from Time table files. Fixed smal issue on export function. Some Work on QLop database.

File last commit:

r14:0e9217f77498 default
r14:0e9217f77498 default
Show More
qlopdatabaseviewermodel.cpp
90 lines | 1.9 KiB | text/x-c | CppLexer
/ src / Core / Widgets / qlopdatabaseviewermodel.cpp
Spec file ready for rpm packaging....
r13 #include "qlopdatabaseviewermodel.h"
QLopDataBaseViewerModel::QLopDataBaseViewerModel(QObject *parent)
: QAbstractTableModel(parent)
{
beginResetModel();
endResetModel();
}
QLopDataBaseViewerModel::~QLopDataBaseViewerModel()
{
}
int QLopDataBaseViewerModel::rowCount(const QModelIndex &parent) const
{
return QLopDataBase::count();
}
int QLopDataBaseViewerModel::columnCount(const QModelIndex &parent) const
{
Fixed bug #388...
r14 return 5;
Spec file ready for rpm packaging....
r13 }
QVariant QLopDataBaseViewerModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid() || role != Qt::DisplayRole)
return QVariant();
QLopData* data=QLopDataBase::self()->getDataFromIdex(index.row());
if(data)
Fixed bug #388...
r14 {
switch (index.column()) {
case 0:
return data->name;
break;
case 1:
return data->source;
break;
case 2:
return data->typeStr();
break;
case 3:
return data->unit;
break;
case 4:
return data->size();
break;
default:
return data->name;
break;
}
}
Spec file ready for rpm packaging....
r13 else QVariant();
}
QVariant QLopDataBaseViewerModel::headerData(int section, Qt::Orientation orientation, int role) const
{
Fixed bug #388...
r14 //if (role == Qt::SizeHintRole)
// return QSize(1, 1);
if(orientation==Qt::Horizontal && role==Qt::DisplayRole)
{
switch (section) {
case 0:
return QVariant("Name");
break;
case 1:
return QVariant("Source");
break;
case 2:
return QVariant("Type");
break;
case 3:
return QVariant("Unit");
break;
case 4:
return QVariant("Size");
break;
default:
break;
}
}
Spec file ready for rpm packaging....
r13 return QVariant();
}
Fixed bug #388...
r14 void QLopDataBaseViewerModel::DBChanged()
{
beginResetModel();
endResetModel();
}