forked from teamnwah/openmw-tes3coop
added hint parameter for UniversalId viewing requests
This commit is contained in:
parent
cb3994281c
commit
797f5527ee
4 changed files with 13 additions and 3 deletions
|
@ -16,4 +16,6 @@ void CSVDoc::SubView::updateEditorSetting (const QString &settingName, const QSt
|
|||
{
|
||||
}
|
||||
|
||||
void CSVDoc::SubView::setStatusBar (bool show) {}
|
||||
void CSVDoc::SubView::setStatusBar (bool show) {}
|
||||
|
||||
void CSVDoc::SubView::useHint (const std::string& hint) {}
|
|
@ -40,6 +40,9 @@ namespace CSVDoc
|
|||
virtual void setStatusBar (bool show);
|
||||
///< Default implementation: ignored
|
||||
|
||||
virtual void useHint (const std::string& hint);
|
||||
///< Default implementation: ignored
|
||||
|
||||
signals:
|
||||
|
||||
void focusId (const CSMWorld::UniversalId& universalId);
|
||||
|
|
|
@ -310,7 +310,7 @@ void CSVDoc::View::updateProgress (int current, int max, int type, int threads)
|
|||
mOperations->setProgress (current, max, type, threads);
|
||||
}
|
||||
|
||||
void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id)
|
||||
void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::string& hint)
|
||||
{
|
||||
/// \todo add an user setting for limiting the number of sub views per top level view. Automatically open a new top level view if this
|
||||
/// number is exceeded
|
||||
|
@ -322,6 +322,9 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id)
|
|||
|
||||
SubView *view = mSubViewFactory.makeSubView (id, *mDocument);
|
||||
|
||||
if (!hint.empty())
|
||||
view->useHint (hint);
|
||||
|
||||
view->setStatusBar (mShowStatusBar->isChecked());
|
||||
|
||||
mSubViewWindow.addDockWidget (Qt::TopDockWidgetArea, view);
|
||||
|
|
|
@ -120,7 +120,9 @@ namespace CSVDoc
|
|||
|
||||
public slots:
|
||||
|
||||
void addSubView (const CSMWorld::UniversalId& id);
|
||||
void addSubView (const CSMWorld::UniversalId& id, const std::string& hint = "");
|
||||
///< \param hint Suggested view point (e.g. coordinates in a 3D scene or a line number
|
||||
/// in a script).
|
||||
|
||||
void abortOperation (int type);
|
||||
|
||||
|
|
Loading…
Reference in a new issue