mainWindows spinBox decleration

This commit is contained in:
moerp
2021-05-24 23:25:17 +02:00
parent ddf2f0b513
commit fc4875dd27
6 changed files with 112 additions and 6 deletions

View File

@ -5,6 +5,16 @@ SQMTableModel::SQMTableModel(QObject *parent)
: QAbstractTableModel(parent) {
}
int SQMTableModel::rowCount(const QModelIndex & parent) const {
return binLen;
}
int SQMTableModel::columnCount(const QModelIndex & parent) const {
return 3;
}
QVariant SQMTableModel::data(const QModelIndex &index, int role) const {
if (role == Qt::DisplayRole) {
@ -16,6 +26,7 @@ QVariant SQMTableModel::data(const QModelIndex &index, int role) const {
return QVariant();
}
void SQMTableModel::SetStartValues(int pBase, int pExp, int pMod) {
base = pBase;
exp = pExp;
@ -37,7 +48,7 @@ std::string SQMTableModel::IntToBinary(int n) {
void SQMTableModel::CalculateSqmMatrix(int startRow) {
string bin = IntToBinary(exp);
int binLen = bin.length();
binLen = bin.length();
// Initialize bin column
vector<int> colBin;