23#ifndef BCEOBJWEIGHTSTABLEMODEL_HPP
24#define BCEOBJWEIGHTSTABLEMODEL_HPP
27#include <QAbstractTableModel>
30#include "bceenumeration.hpp"
56 if (cellLocation[1]==0)
85 while (currLabelIndex < game->getNumObjectives() + 1) {
95 Qt::ItemFlags
flags(
const QModelIndex & index)
const
96 {
return Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable; }
99 int rowCount(
const QModelIndex & parent = QModelIndex()) const Q_DECL_OVERRIDE
102 int columnCount(
const QModelIndex & parent = QModelIndex()) const Q_DECL_OVERRIDE
107 { emit layoutChanged(); }
112 QVariant
data(
const QModelIndex & index,
113 int role)
const Q_DECL_OVERRIDE;
117 bool setData(
const QModelIndex & index,
const QVariant & value,
int role);
123 Qt::Orientation orientation,
124 int role)
const Q_DECL_OVERRIDE;
150 vector<vector<double> > weightData;
int getNumObjectives() const
Returns the number of objectives.
Definition: bceabstractgame.hpp:245
string getObjLabels(int obj)
Gets an entry from objective label vector.
Definition: bceabstractgame.hpp:213
The base class for games of incomplete information.
Definition: bcegame.hpp:40
Model for Objective Weights in the BCEViewer.
Definition: bceobjweightstablemodel.hpp:46
void resetObjectiveWeights()
Resets weights on objectives.
Definition: bceobjweightstablemodel.hpp:157
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE
Reimplements the data method.
Definition: bceobjweightstablemodel.cpp:25
const vector< double > getSolverData()
Returns a reference to the weight data vector.
Definition: bceobjweightstablemodel.hpp:144
void setWeightData(vector< int > cellLocation, double value)
Sets data in the objective weights vectors.
Definition: bceobjweightstablemodel.hpp:55
vector< double > mainObjWeights
Vector storing weights on main objective.
Definition: bceobjweightstablemodel.hpp:51
int columnCount(const QModelIndex &parent=QModelIndex()) const Q_DECL_OVERRIDE
Returns the number of column player actions.
Definition: bceobjweightstablemodel.hpp:102
BCEGame * game
Pointer to the associated game.
Definition: bceobjweightstablemodel.hpp:169
void emitLayoutChanged()
Emits layoutChanged signal.
Definition: bceobjweightstablemodel.hpp:106
Qt::ItemFlags flags(const QModelIndex &index) const
Returns flags.
Definition: bceobjweightstablemodel.hpp:95
void removeObjective(int position)
Removes an objective from the weight data and label vectors.
Definition: bceobjweightstablemodel.hpp:137
bool setData(const QModelIndex &index, const QVariant &value, int role)
Reimplements the setData method.
Definition: bceobjweightstablemodel.cpp:47
BCEObjWeightsTableModel(BCEGame *_game)
Constructor.
Definition: bceobjweightstablemodel.hpp:71
vector< double > secondaryObjWeights
Vector storing weights on secondary objective.
Definition: bceobjweightstablemodel.hpp:53
int rowCount(const QModelIndex &parent=QModelIndex()) const Q_DECL_OVERRIDE
Returns the number of row player actions.
Definition: bceobjweightstablemodel.hpp:99
QVariant headerData(int section, Qt::Orientation orientation, int role) const Q_DECL_OVERRIDE
Returns formatted header data.
Definition: bceobjweightstablemodel.cpp:66
const vector< vector< double > > getMapBoundaryData()
Returns a reference to the weight data vector.
Definition: bceobjweightstablemodel.hpp:149
vector< string > objectiveLabels
Vector storing objective labels.
Definition: bceobjweightstablemodel.hpp:62
void addObjective(int position)
Adds an objective to the weight data vector.
Definition: bceobjweightstablemodel.hpp:127