changed edit requests from row index format to UniversalId/hint format

actorid
Marc Zinnschlag 11 years ago
parent 797f5527ee
commit 55195f819a

@ -45,7 +45,7 @@ namespace CSVDoc
signals:
void focusId (const CSMWorld::UniversalId& universalId);
void focusId (const CSMWorld::UniversalId& universalId, const std::string& hint);
};
}

@ -329,8 +329,8 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
mSubViewWindow.addDockWidget (Qt::TopDockWidgetArea, view);
connect (view, SIGNAL (focusId (const CSMWorld::UniversalId&)), this,
SLOT (addSubView (const CSMWorld::UniversalId&)));
connect (view, SIGNAL (focusId (const CSMWorld::UniversalId&, const std::string&)), this,
SLOT (addSubView (const CSMWorld::UniversalId&, const std::string&)));
CSMSettings::UserSettings::instance().updateSettings("Display Format");

@ -40,5 +40,5 @@ void CSVTools::ReportSubView::updateEditorSetting (const QString& key, const QSt
void CSVTools::ReportSubView::show (const QModelIndex& index)
{
focusId (mModel->getUniversalId (index.row()));
focusId (mModel->getUniversalId (index.row()), "");
}

@ -306,7 +306,7 @@ void CSVWorld::Table::editRecord()
QModelIndexList selectedRows = selectionModel()->selectedRows();
if (selectedRows.size()==1)
emit editRequest (selectedRows.begin()->row());
emit editRequest (getUniversalId (selectedRows.begin()->row()), "");
}
}

@ -86,7 +86,7 @@ namespace CSVWorld
signals:
void editRequest (int row);
void editRequest (const CSMWorld::UniversalId& id, const std::string& hint);
void selectionSizeChanged (int size);

@ -36,7 +36,8 @@ CSVWorld::TableSubView::TableSubView (const CSMWorld::UniversalId& id, CSMDoc::D
setWidget (widget);
connect (mTable, SIGNAL (editRequest (int)), this, SLOT (editRequest (int)));
connect (mTable, SIGNAL (editRequest (const CSMWorld::UniversalId&, const std::string&)),
this, SLOT (editRequest (const CSMWorld::UniversalId&, const std::string&)));
connect (mTable, SIGNAL (selectionSizeChanged (int)),
mBottom, SLOT (selectionSizeChanged (int)));
@ -81,9 +82,9 @@ void CSVWorld::TableSubView::setEditLock (bool locked)
mBottom->setEditLock (locked);
}
void CSVWorld::TableSubView::editRequest (int row)
void CSVWorld::TableSubView::editRequest (const CSMWorld::UniversalId& id, const std::string& hint)
{
focusId (mTable->getUniversalId (row));
focusId (id, hint);
}
void CSVWorld::TableSubView::updateEditorSetting(const QString &settingName, const QString &settingValue)

@ -53,7 +53,7 @@ namespace CSVWorld
private slots:
void editRequest (int row);
void editRequest (const CSMWorld::UniversalId& id, const std::string& hint);
void cloneRequest (const CSMWorld::UniversalId& toClone);
void createFilterRequest(std::vector< CSMWorld::UniversalId >& types,
Qt::DropAction action);

Loading…
Cancel
Save