mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Mod doc set style de same
This commit is contained in:
@@ -18,11 +18,11 @@
|
||||
#include "itemmodelcommand.h"
|
||||
|
||||
/**
|
||||
* @brief ModelIndexCommand::ModelIndexCommand
|
||||
* @param model
|
||||
* @param index
|
||||
* @param parent
|
||||
*/
|
||||
@brief ModelIndexCommand::ModelIndexCommand
|
||||
@param model
|
||||
@param index
|
||||
@param parent
|
||||
*/
|
||||
ModelIndexCommand::ModelIndexCommand(QAbstractItemModel *model, const QModelIndex &index, QUndoCommand *parent):
|
||||
QUndoCommand(parent),
|
||||
m_model(model),
|
||||
@@ -30,10 +30,10 @@ ModelIndexCommand::ModelIndexCommand(QAbstractItemModel *model, const QModelInde
|
||||
{}
|
||||
|
||||
/**
|
||||
* @brief ModelIndexCommand::setData
|
||||
* @param value
|
||||
* @param role
|
||||
*/
|
||||
@brief ModelIndexCommand::setData
|
||||
@param value
|
||||
@param role
|
||||
*/
|
||||
void ModelIndexCommand::setData(const QVariant &value, int role)
|
||||
{
|
||||
m_new_value = value;
|
||||
@@ -47,9 +47,9 @@ void ModelIndexCommand::setData(const QVariant &value, int role)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ModelIndexCommand::redo
|
||||
* Reimplemented from QUndoCommand
|
||||
*/
|
||||
@brief ModelIndexCommand::redo
|
||||
Reimplemented from QUndoCommand
|
||||
*/
|
||||
void ModelIndexCommand::redo() {
|
||||
if (m_model && m_index.isValid()) {
|
||||
m_model->setData(m_index, m_new_value, m_role);
|
||||
@@ -57,9 +57,9 @@ void ModelIndexCommand::redo() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ModelIndexCommand::undo
|
||||
* Reimplemented from QUndoCommand
|
||||
*/
|
||||
@brief ModelIndexCommand::undo
|
||||
Reimplemented from QUndoCommand
|
||||
*/
|
||||
void ModelIndexCommand::undo() {
|
||||
if (m_model && m_index.isValid()) {
|
||||
m_model->setData(m_index, m_old_value, m_role);
|
||||
@@ -67,23 +67,23 @@ void ModelIndexCommand::undo() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ModelHeaderDataCommand::ModelHeaderDataCommand
|
||||
* @param model
|
||||
* @param parent
|
||||
*/
|
||||
@brief ModelHeaderDataCommand::ModelHeaderDataCommand
|
||||
@param model
|
||||
@param parent
|
||||
*/
|
||||
ModelHeaderDataCommand::ModelHeaderDataCommand(QAbstractItemModel *model, QUndoCommand *parent) :
|
||||
QUndoCommand(parent),
|
||||
m_model(model)
|
||||
{}
|
||||
|
||||
/**
|
||||
* @brief ModelHeaderDataCommand::setData
|
||||
* See QAbstractItemModel::setHeaderData
|
||||
* @param section
|
||||
* @param orientation
|
||||
* @param value
|
||||
* @param role
|
||||
*/
|
||||
@brief ModelHeaderDataCommand::setData
|
||||
See QAbstractItemModel::setHeaderData
|
||||
@param section
|
||||
@param orientation
|
||||
@param value
|
||||
@param role
|
||||
*/
|
||||
void ModelHeaderDataCommand::setData(int section, Qt::Orientation orientation, const QVariant &value, int role)
|
||||
{
|
||||
m_section = section;
|
||||
@@ -98,9 +98,9 @@ void ModelHeaderDataCommand::setData(int section, Qt::Orientation orientation, c
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ModelHeaderDataCommand::redo
|
||||
* Reimplemented from QUndoCommand
|
||||
*/
|
||||
@brief ModelHeaderDataCommand::redo
|
||||
Reimplemented from QUndoCommand
|
||||
*/
|
||||
void ModelHeaderDataCommand::redo()
|
||||
{
|
||||
if (m_model) {
|
||||
@@ -109,9 +109,9 @@ void ModelHeaderDataCommand::redo()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ModelHeaderDataCommand::undo
|
||||
* Reimplemented from QUndoCommand
|
||||
*/
|
||||
@brief ModelHeaderDataCommand::undo
|
||||
Reimplemented from QUndoCommand
|
||||
*/
|
||||
void ModelHeaderDataCommand::undo()
|
||||
{
|
||||
if (m_model) {
|
||||
|
||||
Reference in New Issue
Block a user