created base for all the list based settings
This commit is contained in:
@@ -14,13 +14,13 @@ Command::Command(const QString &_text)
|
||||
return;
|
||||
}
|
||||
|
||||
this->name = _text.mid(0, index);
|
||||
this->func = _text.mid(index + 1);
|
||||
this->name = _text.mid(0, index).trimmed();
|
||||
this->func = _text.mid(index + 1).trimmed();
|
||||
}
|
||||
|
||||
Command::Command(const QString &_name, const QString &_func)
|
||||
: name(_name)
|
||||
, func(_func)
|
||||
: name(_name.trimmed())
|
||||
, func(_func.trimmed())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -25,18 +25,6 @@ void CommandModel::getRowFromItem(const Command &item, std::vector<QStandardItem
|
||||
row[1]->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable);
|
||||
}
|
||||
|
||||
// returns the related index of the SignalVector
|
||||
int CommandModel::getVectorIndexFromModelIndex(int index)
|
||||
{
|
||||
return index;
|
||||
}
|
||||
|
||||
// returns the related index of the model
|
||||
int CommandModel::getModelIndexFromVectorIndex(int index)
|
||||
{
|
||||
return index;
|
||||
}
|
||||
|
||||
} // namespace commands
|
||||
} // namespace controllers
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -22,12 +22,6 @@ protected:
|
||||
// turns a row in the model into a vector item
|
||||
virtual void getRowFromItem(const Command &item, std::vector<QStandardItem *> &row) override;
|
||||
|
||||
// returns the related index of the SignalVector
|
||||
virtual int getVectorIndexFromModelIndex(int index) override;
|
||||
|
||||
// returns the related index of the model
|
||||
virtual int getModelIndexFromVectorIndex(int index) override;
|
||||
|
||||
friend class CommandController;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user